8144-devToTest_2444 #852
|
@ -20,11 +20,33 @@ const provinces = ref([]);
|
|||
const states = ref([]);
|
||||
const agencies = ref([]);
|
||||
const warehouses = ref([]);
|
||||
const alertLevels = ref([]);
|
||||
const groupedStates = ref([]);
|
||||
|
||||
const getGroupedStates = () => {
|
||||
for (const state of alertLevels.value) {
|
||||
groupedStates.value.push({
|
||||
id: state.id,
|
||||
name: t(`${state.code}`),
|
||||
code: state.code,
|
||||
});
|
||||
}
|
||||
console.log(groupedStates.value);
|
||||
};
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<FetchData url="Provinces" @on-fetch="(data) => (provinces = data)" auto-load />
|
||||
<FetchData url="States" @on-fetch="(data) => (states = data)" auto-load />
|
||||
<FetchData
|
||||
url="AlertLevels"
|
||||
@on-fetch="
|
||||
(data) => {
|
||||
(alertLevels = data), getGroupedStates();
|
||||
}
|
||||
"
|
||||
auto-load
|
||||
/>
|
||||
<FetchData url="AgencyModes" @on-fetch="(data) => (agencies = data)" auto-load />
|
||||
<FetchData url="Warehouses" @on-fetch="(data) => (warehouses = data)" auto-load />
|
||||
<FetchData
|
||||
|
@ -100,12 +122,35 @@ const warehouses = ref([]);
|
|||
option-label="name"
|
||||
emit-value
|
||||
map-options
|
||||
use-input
|
||||
dense
|
||||
outlined
|
||||
rounded
|
||||
/>
|
||||
</QItemSection>
|
||||
</QItem>
|
||||
<QItem>
|
||||
<QItemSection v-if="!alertLevels">
|
||||
<QSkeleton type="QInput" class="full-width" />
|
||||
</QItemSection>
|
||||
<QItemSection v-if="alertLevels">
|
||||
<QSelect
|
||||
:label="t('Grouped state')"
|
||||
v-model="params.groupedStates"
|
||||
@update:model-value="searchFn()"
|
||||
:options="groupedStates"
|
||||
option-value="id"
|
||||
option-label="name"
|
||||
emit-value
|
||||
map-options
|
||||
use-input
|
||||
dense
|
||||
outlined
|
||||
rounded
|
||||
sort-by="name ASC"
|
||||
/>
|
||||
</QItemSection>
|
||||
</QItem>
|
||||
<QItem>
|
||||
<QItemSection>
|
||||
<VnInput
|
||||
|
@ -124,6 +169,15 @@ const warehouses = ref([]);
|
|||
/>
|
||||
</QItemSection>
|
||||
</QItem>
|
||||
<QItem>
|
||||
<QItemSection>
|
||||
<VnInput
|
||||
v-model="params.nickname"
|
||||
:label="t('Nickname')"
|
||||
is-outlined
|
||||
/>
|
||||
</QItemSection>
|
||||
</QItem>
|
||||
<QItem>
|
||||
<QItemSection>
|
||||
<QCheckbox
|
||||
|
@ -186,6 +240,7 @@ const warehouses = ref([]);
|
|||
option-label="name"
|
||||
emit-value
|
||||
map-options
|
||||
use-input
|
||||
dense
|
||||
outlined
|
||||
rounded
|
||||
|
@ -206,6 +261,7 @@ const warehouses = ref([]);
|
|||
option-label="name"
|
||||
emit-value
|
||||
map-options
|
||||
use-input
|
||||
dense
|
||||
outlined
|
||||
rounded
|
||||
|
@ -226,12 +282,22 @@ const warehouses = ref([]);
|
|||
option-label="name"
|
||||
emit-value
|
||||
map-options
|
||||
use-input
|
||||
dense
|
||||
outlined
|
||||
rounded
|
||||
/>
|
||||
</QItemSection>
|
||||
</QItem>
|
||||
<QItem>
|
||||
<QItemSection>
|
||||
<VnInput
|
||||
v-model="params.collectionFk"
|
||||
:label="t('Collection')"
|
||||
is-outlined
|
||||
/>
|
||||
</QItemSection>
|
||||
</QItem>
|
||||
</QExpansionItem>
|
||||
</template>
|
||||
</VnFilterPanel>
|
||||
|
@ -255,6 +321,11 @@ en:
|
|||
provinceFk: Province
|
||||
agencyModeFk: Agency
|
||||
warehouseFk: Warehouse
|
||||
FREE: Free
|
||||
ON_PREPARATION: On preparation
|
||||
PACKED: Packed
|
||||
DELIVERED: Delivered
|
||||
ON_PREVIOUS: ON_PREVIOUS
|
||||
es:
|
||||
params:
|
||||
search: Contiene
|
||||
|
@ -288,4 +359,12 @@ es:
|
|||
Yes: Si
|
||||
No: No
|
||||
Days onward: Días adelante
|
||||
Grouped state: Estado agrupado
|
||||
FREE: Libre
|
||||
ON_PREPARATION: En preparación
|
||||
PACKED: Encajado
|
||||
DELIVERED: Servido
|
||||
ON_PREVIOUS: ON_PREVIOUS
|
||||
Collection: Colección
|
||||
Nickname: Nombre mostrado
|
||||
</i18n>
|
||||
|
|
|
@ -548,7 +548,7 @@ function setReference(data) {
|
|||
</template>
|
||||
<template #column-salesPersonFk="{ row }">
|
||||
<span class="link" @click.stop>
|
||||
{{ row.salesPerson }}
|
||||
{{ row.userName }}
|
||||
<CustomerDescriptorProxy :id="row.salesPersonFk" />
|
||||
</span>
|
||||
</template>
|
||||
|
|
Loading…
Reference in New Issue