mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-20 13:32:00 +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.');
|
||||
|
||||
@@ -15,7 +15,7 @@ export class FinanceApiService extends BaseApiService<
|
||||
customer_ids?: string,
|
||||
// TODO: Uncomment when BE is ready
|
||||
// sales_id?: string,
|
||||
filter_by?: 'do_date' | 'payment_date' | 'realization_date',
|
||||
filter_by?: 'trans_date' | 'realization_date',
|
||||
start_date?: string,
|
||||
end_date?: string,
|
||||
page?: number,
|
||||
|
||||
Reference in New Issue
Block a user