forked from verdnatura/salix-front
revert: #6943 address star feature
This commit is contained in:
parent
bdd36f6ba1
commit
4d8432feb5
|
@ -278,8 +278,9 @@ const fetchAddresses = async (formData) => {
|
||||||
if (!formData.clientId) return;
|
if (!formData.clientId) return;
|
||||||
|
|
||||||
const filter = {
|
const filter = {
|
||||||
fields: ['nickname', 'street', 'city', 'id', 'isActive'],
|
fields: ['nickname', 'street', 'city', 'id'],
|
||||||
order: ['isDefaultAddress DESC', 'isActive DESC', 'nickname ASC'],
|
where: { isActive: true },
|
||||||
|
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`, {
|
||||||
|
@ -651,22 +652,7 @@ function setReference(data) {
|
||||||
@update:model-value="() => fetchAvailableAgencies(data)"
|
@update:model-value="() => fetchAvailableAgencies(data)"
|
||||||
>
|
>
|
||||||
<template #option="scope">
|
<template #option="scope">
|
||||||
<QItem
|
<QItem v-bind="scope.itemProps">
|
||||||
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 }}
|
||||||
|
|
Loading…
Reference in New Issue