mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-25 07:45:47 +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',
|
'min-w-52 md:min-w-72 lg:min-w-80',
|
||||||
}}
|
}}
|
||||||
bottomLabel={
|
bottomLabel={
|
||||||
'Previous: ' + purchaseItem.product.name
|
type === 'edit'
|
||||||
|
? 'Previous: ' +
|
||||||
|
purchaseItem.product.name
|
||||||
|
: undefined
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
</td>
|
</td>
|
||||||
@@ -819,7 +822,11 @@ const PurchaseOrderStaffApprovalForm = ({
|
|||||||
thousandSeparator=','
|
thousandSeparator=','
|
||||||
decimalSeparator='.'
|
decimalSeparator='.'
|
||||||
inputPrefix={'Rp'}
|
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={
|
isError={
|
||||||
isRepeaterInputError(
|
isRepeaterInputError(
|
||||||
formItemIndex,
|
formItemIndex,
|
||||||
@@ -857,7 +864,11 @@ const PurchaseOrderStaffApprovalForm = ({
|
|||||||
thousandSeparator=','
|
thousandSeparator=','
|
||||||
decimalSeparator='.'
|
decimalSeparator='.'
|
||||||
inputPrefix={'Rp'}
|
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={
|
isError={
|
||||||
isRepeaterInputError(
|
isRepeaterInputError(
|
||||||
formItemIndex,
|
formItemIndex,
|
||||||
|
|||||||
Reference in New Issue
Block a user