refactor: refs #8828 update filter logic to use boolean
gitea/salix-front/pipeline/pr-dev There was a failure building this commit
Details
gitea/salix-front/pipeline/pr-dev There was a failure building this commit
Details
This commit is contained in:
parent
cb76d7e93b
commit
5eeae1143c
|
@ -157,9 +157,7 @@ const selectTravel = ({ id }) => {
|
|||
option-value="id"
|
||||
v-model="travelFilterParams.warehouseOutFk"
|
||||
:where="{
|
||||
isOrigin: {
|
||||
neq: 0,
|
||||
},
|
||||
isOrigin: true,
|
||||
}"
|
||||
/>
|
||||
<VnSelect
|
||||
|
@ -170,9 +168,7 @@ const selectTravel = ({ id }) => {
|
|||
option-value="id"
|
||||
v-model="travelFilterParams.warehouseInFk"
|
||||
:where="{
|
||||
isDestiny: {
|
||||
neq: 0,
|
||||
},
|
||||
isDestiny: true,
|
||||
}"
|
||||
/>
|
||||
<VnInputDate
|
||||
|
|
|
@ -41,9 +41,7 @@ const onDataSaved = (data) => {
|
|||
@on-fetch="(data) => (warehousesOptions = data)"
|
||||
auto-load
|
||||
:where="{
|
||||
isInventory: {
|
||||
neq: 0,
|
||||
},
|
||||
isInventory: true,
|
||||
}"
|
||||
/>
|
||||
<FormModelPopup
|
||||
|
|
|
@ -163,9 +163,7 @@ const entryFilterPanel = ref();
|
|||
@update:model-value="searchFn()"
|
||||
url="Warehouses"
|
||||
:where="{
|
||||
isOrigin: {
|
||||
neq: 0,
|
||||
},
|
||||
isOrigin: true,
|
||||
}"
|
||||
:fields="['id', 'name']"
|
||||
sort-by="name ASC"
|
||||
|
@ -183,9 +181,7 @@ const entryFilterPanel = ref();
|
|||
@update:model-value="searchFn()"
|
||||
url="Warehouses"
|
||||
:where="{
|
||||
isDestiny: {
|
||||
neq: 0,
|
||||
},
|
||||
isDestiny: true,
|
||||
}"
|
||||
:fields="['id', 'name']"
|
||||
sort-by="name ASC"
|
||||
|
|
|
@ -240,9 +240,7 @@ async function getZone(options) {
|
|||
url="Warehouses"
|
||||
@on-fetch="(data) => (warehousesOptions = data)"
|
||||
:where="{
|
||||
isForTicket: {
|
||||
neq: 0,
|
||||
},
|
||||
isForTicket: true,
|
||||
}"
|
||||
auto-load
|
||||
/>
|
||||
|
|
|
@ -51,9 +51,7 @@ const setUserParams = (params) => {
|
|||
url="Warehouses"
|
||||
@on-fetch="(data) => (warehouses = data)"
|
||||
:where="{
|
||||
isForTicket: {
|
||||
neq: 0,
|
||||
},
|
||||
isForTicket: true,
|
||||
}"
|
||||
auto-load
|
||||
/>
|
||||
|
|
|
@ -52,9 +52,7 @@ onMounted(async () => await getItemPackingTypes());
|
|||
url="Warehouses"
|
||||
@on-fetch="(data) => (warehousesOptions = data)"
|
||||
:where="{
|
||||
isForTicket: {
|
||||
neq: 0,
|
||||
},
|
||||
isForTicket: true,
|
||||
}"
|
||||
auto-load
|
||||
/>
|
||||
|
|
|
@ -91,9 +91,7 @@ const redirectToTicketList = (_, { id }) => {
|
|||
url="Warehouses"
|
||||
@on-fetch="(data) => (warehousesOptions = data)"
|
||||
:where="{
|
||||
isForTicket: {
|
||||
neq: 0,
|
||||
},
|
||||
isForTicket: true,
|
||||
}"
|
||||
order="name"
|
||||
auto-load
|
||||
|
|
|
@ -85,9 +85,7 @@ const redirectToTicketList = (_, { id }) => {
|
|||
url="Warehouses"
|
||||
@on-fetch="(data) => (warehousesOptions = data)"
|
||||
:where="{
|
||||
isForTicket: {
|
||||
neq: 0,
|
||||
},
|
||||
isForTicket: true,
|
||||
}"
|
||||
order="name"
|
||||
auto-load
|
||||
|
|
|
@ -46,9 +46,7 @@ const groupedStates = ref([]);
|
|||
@on-fetch="(data) => (warehouses = data)"
|
||||
auto-load
|
||||
:where="{
|
||||
isForTicket: {
|
||||
neq: 0,
|
||||
},
|
||||
isForTicket: true,
|
||||
}"
|
||||
/>
|
||||
<VnFilterPanel
|
||||
|
|
|
@ -56,9 +56,7 @@ onMounted(async () => {
|
|||
url="Warehouses"
|
||||
@on-fetch="(data) => (warehousesOptions = data)"
|
||||
:where="{
|
||||
isForTicket: {
|
||||
neq: 0,
|
||||
},
|
||||
isForTicket: true,
|
||||
}"
|
||||
auto-load
|
||||
/>
|
||||
|
|
|
@ -205,9 +205,7 @@ const columns = computed(() => [
|
|||
url: 'warehouses',
|
||||
fields: ['id', 'name'],
|
||||
where: {
|
||||
isForTicket: {
|
||||
neq: 0,
|
||||
},
|
||||
isForTicket: true,
|
||||
},
|
||||
},
|
||||
format: (row) => row.warehouse,
|
||||
|
@ -678,9 +676,7 @@ function setReference(data) {
|
|||
hide-selected
|
||||
required
|
||||
:where="{
|
||||
isForTicket: {
|
||||
neq: 0,
|
||||
},
|
||||
isForTicket: true,
|
||||
}"
|
||||
@update:model-value="() => fetchAvailableAgencies(data)"
|
||||
/>
|
||||
|
|
|
@ -103,7 +103,7 @@ const columns = computed(() => [
|
|||
url: 'Warehouses',
|
||||
fields: ['id', 'name'],
|
||||
where: {
|
||||
isForTicket: { neq: 0 },
|
||||
isForTicket: true,
|
||||
},
|
||||
},
|
||||
inWhere: true,
|
||||
|
|
|
@ -29,9 +29,7 @@ const warehousesOptionsIn = ref([]);
|
|||
@on-fetch="(data) => (warehousesOptionsOut = data)"
|
||||
auto-load
|
||||
:where="{
|
||||
isOrigin: {
|
||||
neq: 0,
|
||||
},
|
||||
isOrigin: true,
|
||||
}"
|
||||
/>
|
||||
<FetchData
|
||||
|
@ -39,9 +37,7 @@ const warehousesOptionsIn = ref([]);
|
|||
@on-fetch="(data) => (warehousesOptionsIn = data)"
|
||||
auto-load
|
||||
:where="{
|
||||
isDestiny: {
|
||||
neq: 0,
|
||||
},
|
||||
isDestiny: true,
|
||||
}"
|
||||
/>
|
||||
<FormModel :url-update="`Travels/${route.params.id}`" model="Travel">
|
||||
|
|
|
@ -184,7 +184,7 @@ warehouses();
|
|||
:label="t('extraCommunity.filter.warehouseOutFk')"
|
||||
v-model="params.warehouseOutFk"
|
||||
:options="
|
||||
warehousesOptions.filter((option) => option.isOrigin !== 0)
|
||||
warehousesOptions.filter((option) => option.isOrigin === true)
|
||||
"
|
||||
option-value="id"
|
||||
option-label="name"
|
||||
|
@ -200,7 +200,9 @@ warehouses();
|
|||
:label="t('extraCommunity.filter.warehouseInFk')"
|
||||
v-model="params.warehouseInFk"
|
||||
:options="
|
||||
warehousesOptions.filter((option) => option.isDestiny !== 0)
|
||||
warehousesOptions.filter(
|
||||
(option) => option.isDestiny === true,
|
||||
)
|
||||
"
|
||||
option-value="id"
|
||||
option-label="name"
|
||||
|
|
|
@ -82,9 +82,7 @@ const redirectToTravelBasicData = (_, { id }) => {
|
|||
option-label="name"
|
||||
hide-selected
|
||||
:where="{
|
||||
isOrigin: {
|
||||
neq: 0,
|
||||
},
|
||||
isOrigin: true,
|
||||
}"
|
||||
/>
|
||||
<VnSelect
|
||||
|
@ -95,9 +93,7 @@ const redirectToTravelBasicData = (_, { id }) => {
|
|||
option-label="name"
|
||||
hide-selected
|
||||
:where="{
|
||||
isDestiny: {
|
||||
neq: 0,
|
||||
},
|
||||
isDestiny: true,
|
||||
}"
|
||||
/>
|
||||
</VnRow>
|
||||
|
|
|
@ -65,9 +65,7 @@ defineExpose({ states });
|
|||
dense
|
||||
filled
|
||||
:where="{
|
||||
isDestiny: {
|
||||
neq: 0,
|
||||
},
|
||||
isDestiny: true,
|
||||
}"
|
||||
/>
|
||||
<VnInputDate
|
||||
|
@ -95,9 +93,7 @@ defineExpose({ states });
|
|||
dense
|
||||
filled
|
||||
:where="{
|
||||
isOrigin: {
|
||||
neq: 0,
|
||||
},
|
||||
isOrigin: true,
|
||||
}"
|
||||
/>
|
||||
<VnInputDate
|
||||
|
|
|
@ -99,7 +99,7 @@ const columns = computed(() => [
|
|||
fields: ['id', 'name'],
|
||||
optionLabel: 'name',
|
||||
optionValue: 'id',
|
||||
where: { isDestiny: { neq: 0 } },
|
||||
where: { isDestiny: true },
|
||||
},
|
||||
format: (row) => row.warehouseInName,
|
||||
columnField: {
|
||||
|
@ -134,7 +134,7 @@ const columns = computed(() => [
|
|||
attrs: {
|
||||
url: 'warehouses',
|
||||
fields: ['id', 'name'],
|
||||
where: { isOrigin: { neq: 0 } },
|
||||
where: { isOrigin: true },
|
||||
},
|
||||
format: (row) => row.warehouseOutName,
|
||||
columnField: {
|
||||
|
|
Loading…
Reference in New Issue