refactor(form-quotation): layout
This commit is contained in:
parent
3b3979e403
commit
bedbcd1a95
4 changed files with 446 additions and 475 deletions
|
|
@ -71,10 +71,12 @@ export const useQuotationForm = defineStore('form-quotation', () => {
|
|||
const currentFormState = ref<{
|
||||
mode: null | 'info' | 'create' | 'edit';
|
||||
source?: QuotationFull;
|
||||
createdAt: string | Date;
|
||||
createdBy: (locale: string) => string;
|
||||
}>({
|
||||
mode: null,
|
||||
createdBy: (_) => getName() || '',
|
||||
createdAt: '',
|
||||
});
|
||||
|
||||
function isFormDataDifferent() {
|
||||
|
|
@ -137,6 +139,8 @@ export const useQuotationForm = defineStore('form-quotation', () => {
|
|||
? data.createdBy.firstNameEN + ' ' + data.createdBy.lastNameEN
|
||||
: data.createdBy.firstName + ' ' + data.createdBy.lastName;
|
||||
|
||||
currentFormState.value.createdAt = data.createdAt;
|
||||
|
||||
if (mode === 'assign') return;
|
||||
|
||||
currentFormState.value.mode = mode;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue