mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-21 05:45:46 +00:00
feat(FE): adding report debt supplier report with temporary data types and dummy data
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
import { getDebtSupllierDummy } from '@/dummy/report/debt.supllier.dummy';
|
||||
import { BaseApiService } from '@/services/api/base';
|
||||
import { BaseApiResponse } from '@/types/api/api-general';
|
||||
import { CustomerPaymentReport } from '@/types/api/report/customer-payment';
|
||||
import { DebtSupplier } from '@/types/api/report/debt-supplier';
|
||||
|
||||
export class FinanceApiService extends BaseApiService<
|
||||
CustomerPaymentReport,
|
||||
@@ -36,6 +38,31 @@ export class FinanceApiService extends BaseApiService<
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
async getDebtSupplierReport(
|
||||
supplier_id?: string,
|
||||
filter_by?: 'do_date',
|
||||
start_date?: string,
|
||||
end_date?: string,
|
||||
page?: number,
|
||||
limit?: number
|
||||
): Promise<BaseApiResponse<DebtSupplier[]> | undefined> {
|
||||
return (await getDebtSupllierDummy()) as BaseApiResponse<DebtSupplier[]>;
|
||||
return await this.customRequest<BaseApiResponse<DebtSupplier[]>>(
|
||||
`debt-supplier`,
|
||||
{
|
||||
method: 'GET',
|
||||
params: {
|
||||
supplier_id: supplier_id,
|
||||
filter_by: filter_by,
|
||||
start_date: start_date,
|
||||
end_date: end_date,
|
||||
page: page,
|
||||
limit: limit,
|
||||
},
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export const FinanceApi = new FinanceApiService('reports');
|
||||
|
||||
Reference in New Issue
Block a user