mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-24 15:25:46 +00:00
refactor(FE): Rename available_qty to transfer_available_qty
This commit is contained in:
@@ -82,7 +82,7 @@ const MovementForm = ({ type = 'add', initialValues }: MovementFormProps) => {
|
|||||||
warehouse_id: number;
|
warehouse_id: number;
|
||||||
warehouse_name: string;
|
warehouse_name: string;
|
||||||
quantity: number;
|
quantity: number;
|
||||||
available_qty?: number;
|
transfer_available_qty?: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ===== USE SELECT HOOKS =====
|
// ===== USE SELECT HOOKS =====
|
||||||
@@ -394,7 +394,7 @@ const MovementForm = ({ type = 'add', initialValues }: MovementFormProps) => {
|
|||||||
warehouse_id: pw.warehouse.id,
|
warehouse_id: pw.warehouse.id,
|
||||||
warehouse_name: pw.warehouse.name,
|
warehouse_name: pw.warehouse.name,
|
||||||
quantity: pw.quantity,
|
quantity: pw.quantity,
|
||||||
available_qty: pw.available_qty,
|
transfer_available_qty: pw.transfer_available_qty,
|
||||||
}))
|
}))
|
||||||
: [];
|
: [];
|
||||||
}, [productWarehouses]);
|
}, [productWarehouses]);
|
||||||
@@ -844,7 +844,11 @@ const MovementForm = ({ type = 'add', initialValues }: MovementFormProps) => {
|
|||||||
(pw) => pw.product_id === productId
|
(pw) => pw.product_id === productId
|
||||||
);
|
);
|
||||||
|
|
||||||
return productWarehouse?.available_qty ?? productWarehouse?.quantity ?? 0;
|
return (
|
||||||
|
productWarehouse?.transfer_available_qty ??
|
||||||
|
productWarehouse?.quantity ??
|
||||||
|
0
|
||||||
|
);
|
||||||
},
|
},
|
||||||
[productWarehouseOptions, type]
|
[productWarehouseOptions, type]
|
||||||
);
|
);
|
||||||
@@ -865,7 +869,7 @@ const MovementForm = ({ type = 'add', initialValues }: MovementFormProps) => {
|
|||||||
const productWarehouse = productWarehouseOptions.find(
|
const productWarehouse = productWarehouseOptions.find(
|
||||||
(pw) => pw.product_id === productId
|
(pw) => pw.product_id === productId
|
||||||
);
|
);
|
||||||
return productWarehouse?.available_qty !== undefined;
|
return productWarehouse?.transfer_available_qty !== undefined;
|
||||||
},
|
},
|
||||||
[productWarehouseOptions]
|
[productWarehouseOptions]
|
||||||
);
|
);
|
||||||
|
|||||||
+1
-1
@@ -9,7 +9,7 @@ export type BaseProductWarehouse = {
|
|||||||
warehouse_id: number;
|
warehouse_id: number;
|
||||||
uom: Uom;
|
uom: Uom;
|
||||||
quantity: number;
|
quantity: number;
|
||||||
available_qty?: number;
|
transfer_available_qty?: number;
|
||||||
product: Product;
|
product: Product;
|
||||||
warehouse: Warehouse;
|
warehouse: Warehouse;
|
||||||
project_flock_kandang?: {
|
project_flock_kandang?: {
|
||||||
|
|||||||
Reference in New Issue
Block a user