feat: add get quotation payment
This commit is contained in:
parent
314d33aefa
commit
4feaa5cd75
2 changed files with 26 additions and 0 deletions
|
|
@ -7,6 +7,7 @@ import {
|
|||
Quotation,
|
||||
QuotationFull,
|
||||
QuotationPayload,
|
||||
QuotationPaymentData,
|
||||
QuotationStats,
|
||||
} from './types';
|
||||
import { PaginationResult } from 'src/types';
|
||||
|
|
@ -125,3 +126,19 @@ export const useQuotationStore = defineStore('quotation-store', () => {
|
|||
deleteQuottaion,
|
||||
};
|
||||
});
|
||||
|
||||
export const useQuotationPayment = defineStore('quotation-payment', () => {
|
||||
async function getQuotationPayment(quotationId: string) {
|
||||
const res = await api.get<
|
||||
Quotation & { quotationPaymentData: QuotationPaymentData[] }
|
||||
>(`/quotation/${quotationId}/payment`);
|
||||
if (res.status < 400) {
|
||||
return res.data;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
return {
|
||||
getQuotationPayment,
|
||||
};
|
||||
});
|
||||
|
|
|
|||
|
|
@ -331,3 +331,12 @@ export type ProductGroup = {
|
|||
remark: string;
|
||||
registeredBranchId: string;
|
||||
};
|
||||
|
||||
export type QuotationPaymentData = {
|
||||
quotationId: string;
|
||||
paymentStatus: string;
|
||||
amount: number;
|
||||
remark: string;
|
||||
date: string;
|
||||
id: string;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue