mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-23 23:05:46 +00:00
refactor(FE-208,212): enhance PurchaseOrderDetail and PurchaseOrderStaffApprovalForm to conditionally render invoice and item receipt based on approval steps
This commit is contained in:
@@ -43,7 +43,7 @@ const PurchaseOrderStaffApprovalForm = ({
|
||||
if (!initialValues?.approval) return false;
|
||||
|
||||
const currentStep = initialValues.approval.step_number;
|
||||
return currentStep >= 4;
|
||||
return currentStep >= 3;
|
||||
}, [initialValues?.approval]);
|
||||
|
||||
const getPurchaseItemError = (
|
||||
@@ -127,7 +127,7 @@ const PurchaseOrderStaffApprovalForm = ({
|
||||
onSubmit: async (values) => {
|
||||
if (type === 'edit' && !canUpdatePurchaseItems) {
|
||||
setPurchaseOrderFormErrorMessage(
|
||||
'Tidak bisa diupdate. Harus melewati step 4 dahulu (Tahapan Penerimaan Produk).'
|
||||
'Tidak bisa diupdate. Harus melewati step 3 dahulu (Approval dari Manager Purchasing).'
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user