Fix : Payment Receive List

This commit is contained in:
elforjani3
2020-11-07 19:08:42 +02:00
parent 9b6b2e67db
commit 435e4c3b99
6 changed files with 34 additions and 26 deletions

View File

@@ -67,7 +67,9 @@ function PaymentReceiveForm({
const { formatMessage } = useIntl();
const [localPaymentEntries, setLocalPaymentEntries] = useState(paymentReceiveEntries);
const [localPaymentEntries, setLocalPaymentEntries] = useState(
paymentReceiveEntries,
);
useEffect(() => {
if (localPaymentEntries !== paymentReceiveEntries) {
@@ -340,8 +342,9 @@ function PaymentReceiveForm({
onConfirm={handleConfirmAmountChangeAlert}
>
<p>
Changing full amount will change all credits and payment were
applied, Is this okay?
<T
id={'changing_full_amount_will_change_all_credits_and_payment'}
/>
</p>
</Alert>
@@ -354,8 +357,7 @@ function PaymentReceiveForm({
onConfirm={handleConfirmClearLines}
>
<p>
Clearing the table lines will delete all credits and payment were
applied, Is this okay?
<T id={'clearing_the_table_lines_will_delete_all_credits'} />
</p>
</Alert>
@@ -367,12 +369,12 @@ function PaymentReceiveForm({
onCancel={handleCancelClearFormAlert}
onConfirm={handleConfirmCancelClearFormAlert}
>
<p>Are you sure you want to clear this transaction?</p>
<p>
<T id={'are_you_sure_you_want_to_clear_this_transaction'} />
</p>
</Alert>
<PaymentReceiveFormFooter
getFieldProps={getFieldProps}
/>
<PaymentReceiveFormFooter getFieldProps={getFieldProps} />
<PaymentReceiveFloatingActions
isSubmitting={isSubmitting}

View File

@@ -164,7 +164,6 @@ function PaymentReceiveFormHeader({
label={<T id={'payment_receive_no'} />}
inline={true}
className={('form-group--payment_receive_no', CLASSES.FILL)}
labelInfo={<FieldRequiredHint />}
intent={
errors.payment_receive_no &&
touched.payment_receive_no &&

View File

@@ -95,9 +95,13 @@ function PaymentReceivesDataTable({
const actionMenuList = useCallback(
(paymentReceive) => (
<Menu>
<MenuItem text={formatMessage({ id: 'view_details' })} />
<MenuItem
icon={<Icon icon="reader-18" />}
text={formatMessage({ id: 'view_details' })}
/>
<MenuDivider />
<MenuItem
icon={<Icon icon="pen-18" />}
text={formatMessage({ id: 'edit_payment_receive' })}
onClick={handleEditPaymentReceive(paymentReceive)}
/>
@@ -138,7 +142,7 @@ function PaymentReceivesDataTable({
{
id: 'payment_receive_no',
Header: formatMessage({ id: 'payment_receive_no' }),
accessor: (row) => `#${row.payment_receive_no}`,
accessor: (row) => (row.payment_receive_no ? `#${row.payment_receive_no}` : null),
width: 140,
className: 'payment_receive_no',
},