HOTFIX: #6943 CustomerList form salesPersons options #790

Closed
jsegarra wants to merge 84 commits from hotfix_newCustomer_SalesPerson into master
1 changed files with 26 additions and 5 deletions
Showing only changes of commit 49ec3d8d4b - Show all commits

View File

@ -205,9 +205,8 @@ const fetchAddresses = async (formData) => {
if (!formData.clientId) return; if (!formData.clientId) return;
const filter = { const filter = {
fields: ['nickname', 'street', 'city', 'id'], fields: ['nickname', 'street', 'city', 'id', 'isActive'],
where: { isActive: true }, order: ['isDefaultAddress DESC', 'isActive DESC', 'nickname ASC'],
order: 'nickname ASC',
}; };
const params = { filter: JSON.stringify(filter) }; const params = { filter: JSON.stringify(filter) };
const { data } = await axios.get(`Clients/${formData.clientId}/addresses`, { const { data } = await axios.get(`Clients/${formData.clientId}/addresses`, {
@ -301,7 +300,22 @@ onMounted(() => {
@update:model-value="() => fetchAvailableAgencies(data)" @update:model-value="() => fetchAvailableAgencies(data)"
> >
<template #option="scope"> <template #option="scope">
<QItem v-bind="scope.itemProps"> <QItem
v-bind="scope.itemProps"
:class="{ disabled: !scope.opt.isActive }"
>
<QItemSection style="min-width: min-content" avatar>
<QIcon
v-if="
scope.opt.isActive &&
selectedClient?.defaultAddressFk === scope.opt.id
"
size="sm"
color="grey"
name="star"
class="fill-icon"
/>
</QItemSection>
<QItemSection> <QItemSection>
<QItemLabel> <QItemLabel>
{{ scope.opt.nickname }} {{ scope.opt.nickname }}
@ -360,7 +374,14 @@ onMounted(() => {
</template> </template>
</VnTable> </VnTable>
</template> </template>
<style scoped>
.disabled,
.disabled *,
[disabled],
[disabled] * {
cursor: pointer !important;
}
</style>
<i18n> <i18n>
es: es:
Search ticket: Buscar ticket Search ticket: Buscar ticket