mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-22 14:25:47 +00:00
refactor(FE): Consolidate date filters into trans_date
This commit is contained in:
@@ -60,8 +60,7 @@ const CustomerPaymentTab = ({ tabId }: CustomerPaymentTabProps) => {
|
||||
|
||||
const dataTypeOptions = useMemo(
|
||||
() => [
|
||||
{ value: 'do_date', label: 'Tanggal Jual' },
|
||||
{ value: 'payment_date', label: 'Tanggal Bayar' },
|
||||
{ value: 'trans_date', label: 'Tanggal Jual/Bayar' },
|
||||
{ value: 'realization_date', label: 'Tanggal Realisasi' },
|
||||
],
|
||||
[]
|
||||
@@ -182,10 +181,7 @@ const CustomerPaymentTab = ({ tabId }: CustomerPaymentTabProps) => {
|
||||
// filterSales.length > 0
|
||||
// ? filterSales.map((v) => String(v.value)).join(',')
|
||||
// : undefined,
|
||||
filter_by: filterByType.value as
|
||||
| 'do_date'
|
||||
| 'payment_date'
|
||||
| 'realization_date',
|
||||
filter_by: filterByType.value as 'trans_date' | 'realization_date',
|
||||
start_date: filterStartDate || undefined,
|
||||
end_date: filterEndDate || undefined,
|
||||
page: currentPage,
|
||||
@@ -228,10 +224,7 @@ const CustomerPaymentTab = ({ tabId }: CustomerPaymentTabProps) => {
|
||||
// filterSales.length > 0
|
||||
// ? filterSales.map((v) => String(v.value)).join(',')
|
||||
// : undefined,
|
||||
filter_by: filterByType.value as
|
||||
| 'do_date'
|
||||
| 'payment_date'
|
||||
| 'realization_date',
|
||||
filter_by: filterByType.value as 'trans_date' | 'realization_date',
|
||||
start_date: filterStartDate || undefined,
|
||||
end_date: filterEndDate || undefined,
|
||||
limit: 100,
|
||||
@@ -310,10 +303,7 @@ const CustomerPaymentTab = ({ tabId }: CustomerPaymentTabProps) => {
|
||||
// : undefined,
|
||||
start_date: filterStartDate || undefined,
|
||||
end_date: filterEndDate || undefined,
|
||||
filter_by: filterByType.value as
|
||||
| 'do_date'
|
||||
| 'payment_date'
|
||||
| 'realization_date',
|
||||
filter_by: filterByType.value as 'trans_date' | 'realization_date',
|
||||
},
|
||||
});
|
||||
toast.success('PDF berhasil dibuat dan diunduh.');
|
||||
|
||||
Reference in New Issue
Block a user