diff --git a/src/pages/Customer/Card/CustomerDescriptor.vue b/src/pages/Customer/Card/CustomerDescriptor.vue index 3dca43925..2b7665ba1 100644 --- a/src/pages/Customer/Card/CustomerDescriptor.vue +++ b/src/pages/Customer/Card/CustomerDescriptor.vue @@ -113,7 +113,7 @@ const debtWarning = computed(() => { {{ t('customer.card.hasDebt') }} @@ -125,7 +125,7 @@ const debtWarning = computed(() => { color="primary" > {{ t('customer.card.notChecked') }} - + { } }; -const ticketCreateFormDialog = ref(null); const openTicketCreateForm = () => { - ticketCreateFormDialog.value.show(); + const query = { + table: { + clientFk: $props.customer.id, + }, + createForm: { + clientId: $props.customer.id, + addressId: $props.customer.defaultAddressFk, + }, + }; + openWindow('ticket', query); }; -const orderCreateFormDialog = ref(null); const openOrderCreateForm = () => { - orderCreateFormDialog.value.show(); + const query = { + table: { + clientFk: $props.customer.id, + }, + createForm: { + clientFk: $props.customer.id, + addressId: $props.customer.defaultAddressFk, + }, + }; + openWindow('order', query); +}; + +const openWindow = (type, { createForm, table }) => { + window.open( + `/#/${type}/list?createForm=${JSON.stringify(createForm)}&table=${JSON.stringify( + table + )}`, + '_blank' + ); }; @@ -58,17 +80,11 @@ const openOrderCreateForm = () => { {{ t('globals.pageTitles.createTicket') }} - - - {{ t('globals.pageTitles.createOrder') }} - - - diff --git a/src/pages/Customer/CustomerList.vue b/src/pages/Customer/CustomerList.vue index 63f5149e8..815ec57fa 100644 --- a/src/pages/Customer/CustomerList.vue +++ b/src/pages/Customer/CustomerList.vue @@ -68,7 +68,6 @@ const columns = computed(() => [ fields: ['id', 'name'], where: { role: 'salesPerson' }, optionFilter: 'firstName', - useLike: false, }, create: false, columnField: { @@ -429,9 +428,10 @@ function handleLocation(data, location) { :params="{ departmentCodes: ['VT', 'shopping'], }" - :fields="['id', 'nickname']" + :fields="['id', 'nickname', 'code']" sort-by="nickname ASC" - :use-like="false" + option-label="nickname" + option-value="id" emit-value auto-load > diff --git a/src/pages/Order/OrderList.vue b/src/pages/Order/OrderList.vue index 6b6b41828..72c9eb7ec 100644 --- a/src/pages/Order/OrderList.vue +++ b/src/pages/Order/OrderList.vue @@ -1,7 +1,7 @@