feat: quotation attachment (#49)
* fix: i18n * fix: 18n * feat: file upload component * feat: quotation attachment --------- Co-authored-by: puriphatt <puriphat@frappet.com>
This commit is contained in:
parent
7817f8bd40
commit
0ef389c69b
5 changed files with 235 additions and 3 deletions
|
|
@ -58,7 +58,7 @@ export const useQuotationStore = defineStore('quotation-store', () => {
|
|||
| 'BillSplitCustom';
|
||||
query?: string;
|
||||
}) {
|
||||
const res = await api.get<PaginationResult<Quotation>>(`/quotation`, {
|
||||
const res = await api.get<PaginationResult<Quotation>>('/quotation', {
|
||||
params,
|
||||
});
|
||||
if (res.status < 400) {
|
||||
|
|
@ -141,6 +141,8 @@ export const useQuotationStore = defineStore('quotation-store', () => {
|
|||
return null;
|
||||
}
|
||||
|
||||
const fileManager = manageAttachment(api, 'quotation');
|
||||
|
||||
return {
|
||||
data,
|
||||
page,
|
||||
|
|
@ -154,6 +156,8 @@ export const useQuotationStore = defineStore('quotation-store', () => {
|
|||
editQuotation,
|
||||
deleteQuotation,
|
||||
changeStatus,
|
||||
|
||||
...fileManager,
|
||||
};
|
||||
});
|
||||
|
||||
|
|
@ -163,7 +167,7 @@ export const useQuotationStore = defineStore('quotation-store', () => {
|
|||
export const useQuotationPayment = defineStore('quotation-payment', () => {
|
||||
async function getQuotationPayment(quotationId: string) {
|
||||
const res = await api.get<PaginationResult<QuotationPaymentData>>(
|
||||
`/payment`,
|
||||
'/payment',
|
||||
{ params: { quotationId } },
|
||||
);
|
||||
if (res.status < 400) {
|
||||
|
|
@ -186,7 +190,7 @@ export const useQuotationPayment = defineStore('quotation-payment', () => {
|
|||
return null;
|
||||
}
|
||||
|
||||
const fileManager = manageAttachment(api, `payment`);
|
||||
const fileManager = manageAttachment(api, 'payment');
|
||||
|
||||
return {
|
||||
getQuotationPayment,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue