mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-20 13:32:00 +00:00
refactor(FE-311): Show previous values only in edit mode
This commit is contained in:
@@ -719,7 +719,10 @@ const PurchaseOrderStaffApprovalForm = ({
|
||||
'min-w-52 md:min-w-72 lg:min-w-80',
|
||||
}}
|
||||
bottomLabel={
|
||||
'Previous: ' + purchaseItem.product.name
|
||||
type === 'edit'
|
||||
? 'Previous: ' +
|
||||
purchaseItem.product.name
|
||||
: undefined
|
||||
}
|
||||
/>
|
||||
</td>
|
||||
@@ -819,7 +822,11 @@ const PurchaseOrderStaffApprovalForm = ({
|
||||
thousandSeparator=','
|
||||
decimalSeparator='.'
|
||||
inputPrefix={'Rp'}
|
||||
bottomLabel={`Previous: Rp${formatNumber(initialValues?.items?.find((item) => item.id === purchaseItem.id)?.price || 0, 'id-ID', 2, 2)}`}
|
||||
bottomLabel={
|
||||
type === 'edit'
|
||||
? `Previous: Rp${formatNumber(initialValues?.items?.find((item) => item.id === purchaseItem.id)?.price || 0, 'id-ID', 2, 2)}`
|
||||
: undefined
|
||||
}
|
||||
isError={
|
||||
isRepeaterInputError(
|
||||
formItemIndex,
|
||||
@@ -857,7 +864,11 @@ const PurchaseOrderStaffApprovalForm = ({
|
||||
thousandSeparator=','
|
||||
decimalSeparator='.'
|
||||
inputPrefix={'Rp'}
|
||||
bottomLabel={`Previous: Rp${formatNumber(initialValues?.items?.find((item) => item.id === purchaseItem.id)?.total_price || 0, 'id-ID', 2, 2)}`}
|
||||
bottomLabel={
|
||||
type === 'edit'
|
||||
? `Previous: Rp${formatNumber(initialValues?.items?.find((item) => item.id === purchaseItem.id)?.total_price || 0, 'id-ID', 2, 2)}`
|
||||
: undefined
|
||||
}
|
||||
isError={
|
||||
isRepeaterInputError(
|
||||
formItemIndex,
|
||||
|
||||
Reference in New Issue
Block a user