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,
|
Quotation,
|
||||||
QuotationFull,
|
QuotationFull,
|
||||||
QuotationPayload,
|
QuotationPayload,
|
||||||
|
QuotationPaymentData,
|
||||||
QuotationStats,
|
QuotationStats,
|
||||||
} from './types';
|
} from './types';
|
||||||
import { PaginationResult } from 'src/types';
|
import { PaginationResult } from 'src/types';
|
||||||
|
|
@ -125,3 +126,19 @@ export const useQuotationStore = defineStore('quotation-store', () => {
|
||||||
deleteQuottaion,
|
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;
|
remark: string;
|
||||||
registeredBranchId: 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