refactor: handle _count
This commit is contained in:
parent
fc52acf541
commit
c1a9d93026
1 changed files with 4 additions and 2 deletions
|
|
@ -59,10 +59,12 @@ export const useQuotationStore = defineStore('quotation-store', () => {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
async function createQuotation(payload: QuotationPayload) {
|
async function createQuotation(data: QuotationPayload) {
|
||||||
|
const { _count, ...payload } = data;
|
||||||
|
|
||||||
const res = await api.post('/quotation', {
|
const res = await api.post('/quotation', {
|
||||||
...payload,
|
...payload,
|
||||||
productServiceList: payload.productServiceList.map((v) => ({
|
productServiceList: data.productServiceList.map((v) => ({
|
||||||
vat: v.vat,
|
vat: v.vat,
|
||||||
amount: v.amount,
|
amount: v.amount,
|
||||||
pricePerUnit: v.pricePerUnit,
|
pricePerUnit: v.pricePerUnit,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue