mirror of
https://github.com/Spythere/genera-tor.git
synced 2026-05-02 21:18:12 +00:00
refactor: moved order utils
This commit is contained in:
@@ -1,4 +1,7 @@
|
||||
// For use inside OrderS and OrderN
|
||||
export const getOrderFullId = (orderNumber: string, sceneryHash: string) => {
|
||||
return `RD-${orderNumber}-${sceneryHash}-${new Date().getUTCFullYear().toString().slice(2)}`;
|
||||
};
|
||||
|
||||
export const handleOrderPlaceholders = (isRowEnabled: boolean, rowRef: HTMLTableElement) => {
|
||||
rowRef.querySelectorAll('input[type="text"]').forEach((node) => {
|
||||
if (!isRowEnabled) {
|
||||
@@ -22,4 +25,4 @@ export const handleOrderPlaceholders = (isRowEnabled: boolean, rowRef: HTMLTable
|
||||
node.setAttribute('holder', node.getAttribute('placeholder')!);
|
||||
node.removeAttribute('placeholder');
|
||||
});
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user