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(
|
const dataTypeOptions = useMemo(
|
||||||
() => [
|
() => [
|
||||||
{ value: 'do_date', label: 'Tanggal Jual' },
|
{ value: 'trans_date', label: 'Tanggal Jual/Bayar' },
|
||||||
{ value: 'payment_date', label: 'Tanggal Bayar' },
|
|
||||||
{ value: 'realization_date', label: 'Tanggal Realisasi' },
|
{ value: 'realization_date', label: 'Tanggal Realisasi' },
|
||||||
],
|
],
|
||||||
[]
|
[]
|
||||||
@@ -182,10 +181,7 @@ const CustomerPaymentTab = ({ tabId }: CustomerPaymentTabProps) => {
|
|||||||
// filterSales.length > 0
|
// filterSales.length > 0
|
||||||
// ? filterSales.map((v) => String(v.value)).join(',')
|
// ? filterSales.map((v) => String(v.value)).join(',')
|
||||||
// : undefined,
|
// : undefined,
|
||||||
filter_by: filterByType.value as
|
filter_by: filterByType.value as 'trans_date' | 'realization_date',
|
||||||
| 'do_date'
|
|
||||||
| 'payment_date'
|
|
||||||
| 'realization_date',
|
|
||||||
start_date: filterStartDate || undefined,
|
start_date: filterStartDate || undefined,
|
||||||
end_date: filterEndDate || undefined,
|
end_date: filterEndDate || undefined,
|
||||||
page: currentPage,
|
page: currentPage,
|
||||||
@@ -228,10 +224,7 @@ const CustomerPaymentTab = ({ tabId }: CustomerPaymentTabProps) => {
|
|||||||
// filterSales.length > 0
|
// filterSales.length > 0
|
||||||
// ? filterSales.map((v) => String(v.value)).join(',')
|
// ? filterSales.map((v) => String(v.value)).join(',')
|
||||||
// : undefined,
|
// : undefined,
|
||||||
filter_by: filterByType.value as
|
filter_by: filterByType.value as 'trans_date' | 'realization_date',
|
||||||
| 'do_date'
|
|
||||||
| 'payment_date'
|
|
||||||
| 'realization_date',
|
|
||||||
start_date: filterStartDate || undefined,
|
start_date: filterStartDate || undefined,
|
||||||
end_date: filterEndDate || undefined,
|
end_date: filterEndDate || undefined,
|
||||||
limit: 100,
|
limit: 100,
|
||||||
@@ -310,10 +303,7 @@ const CustomerPaymentTab = ({ tabId }: CustomerPaymentTabProps) => {
|
|||||||
// : undefined,
|
// : undefined,
|
||||||
start_date: filterStartDate || undefined,
|
start_date: filterStartDate || undefined,
|
||||||
end_date: filterEndDate || undefined,
|
end_date: filterEndDate || undefined,
|
||||||
filter_by: filterByType.value as
|
filter_by: filterByType.value as 'trans_date' | 'realization_date',
|
||||||
| 'do_date'
|
|
||||||
| 'payment_date'
|
|
||||||
| 'realization_date',
|
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
toast.success('PDF berhasil dibuat dan diunduh.');
|
toast.success('PDF berhasil dibuat dan diunduh.');
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ export class FinanceApiService extends BaseApiService<
|
|||||||
customer_ids?: string,
|
customer_ids?: string,
|
||||||
// TODO: Uncomment when BE is ready
|
// TODO: Uncomment when BE is ready
|
||||||
// sales_id?: string,
|
// sales_id?: string,
|
||||||
filter_by?: 'do_date' | 'payment_date' | 'realization_date',
|
filter_by?: 'trans_date' | 'realization_date',
|
||||||
start_date?: string,
|
start_date?: string,
|
||||||
end_date?: string,
|
end_date?: string,
|
||||||
page?: number,
|
page?: number,
|
||||||
|
|||||||
Reference in New Issue
Block a user