|
|
|
@ -415,16 +415,14 @@ export const useProductsStore = create(
|
|
|
|
|
quotationList: newQuotationList
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
let promiseDelete = Promise.resolve(newQuotationList)
|
|
|
|
|
|
|
|
|
|
if (isNotEmpty(quotationId)) {
|
|
|
|
|
const { result, success } = await deleteQuotationAction(quotationId)
|
|
|
|
|
if (!success) {
|
|
|
|
|
promiseDelete = Promise.reject(result)
|
|
|
|
|
const { success } = await deleteQuotationAction(quotationId)
|
|
|
|
|
if (success) {
|
|
|
|
|
return Promise.resolve(newQuotationList)
|
|
|
|
|
} else {
|
|
|
|
|
return Promise.reject(newQuotationList)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return promiseDelete
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
// side effects
|
|
|
|
|