feat: store it full response as source
This commit is contained in:
parent
c22dc7d945
commit
42cc0175f8
3 changed files with 5 additions and 0 deletions
|
|
@ -70,6 +70,7 @@ export const useQuotationForm = defineStore('form-quotation', () => {
|
|||
);
|
||||
const currentFormState = ref<{
|
||||
mode: null | 'info' | 'create' | 'edit';
|
||||
source?: QuotationFull;
|
||||
createdBy: (locale: string) => string;
|
||||
}>({
|
||||
mode: null,
|
||||
|
|
@ -105,6 +106,8 @@ export const useQuotationForm = defineStore('form-quotation', () => {
|
|||
|
||||
if (!data) return; // NOTE: Error should be handled globally by axios instance
|
||||
|
||||
currentFormState.value.source = data;
|
||||
|
||||
quotationFull.value = data;
|
||||
resetFormData = Object.assign(data, {
|
||||
productServiceList: data.productServiceList.map((v) => ({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue