Merge branch 'dev' into 8683-vnSelectSortByOptionLabel
gitea/salix-front/pipeline/pr-dev Something is wrong with the build of this commit
Details
gitea/salix-front/pipeline/pr-dev Something is wrong with the build of this commit
Details
This commit is contained in:
commit
4e1a2aa8d2
|
@ -123,7 +123,7 @@ pipeline {
|
||||||
sh "docker-compose ${env.COMPOSE_PARAMS} up -d"
|
sh "docker-compose ${env.COMPOSE_PARAMS} up -d"
|
||||||
|
|
||||||
image.inside("--network ${env.COMPOSE_PROJECT}_default -e CI -e TZ --init") {
|
image.inside("--network ${env.COMPOSE_PROJECT}_default -e CI -e TZ --init") {
|
||||||
sh 'sh test/cypress/cypressParallel.sh 3'
|
sh 'sh test/cypress/cypressParallel.sh 2'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1136,9 +1136,13 @@ es:
|
||||||
|
|
||||||
.grid-create {
|
.grid-create {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: repeat(auto-fit, minmax(150px, max-content));
|
grid-template-columns: 1fr 1fr;
|
||||||
|
max-width: 100%;
|
||||||
grid-gap: 20px;
|
grid-gap: 20px;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
|
.col-span-2 {
|
||||||
|
grid-column: span 2;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.flex-one {
|
.flex-one {
|
||||||
|
|
|
@ -149,14 +149,12 @@ const columns = computed(() => [
|
||||||
:right-search="false"
|
:right-search="false"
|
||||||
>
|
>
|
||||||
<template #more-create-dialog="{ data }">
|
<template #more-create-dialog="{ data }">
|
||||||
<QCardSection>
|
|
||||||
<VnInputPassword
|
<VnInputPassword
|
||||||
:label="t('Password')"
|
:label="t('Password')"
|
||||||
v-model="data.password"
|
v-model="data.password"
|
||||||
:required="true"
|
:required="true"
|
||||||
autocomplete="new-password"
|
autocomplete="new-password"
|
||||||
/>
|
/>
|
||||||
</QCardSection>
|
|
||||||
</template>
|
</template>
|
||||||
</VnTable>
|
</VnTable>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -16,7 +16,6 @@ const filter = {
|
||||||
{ relation: 'mandateType', scope: { fields: ['id', 'code'] } },
|
{ relation: 'mandateType', scope: { fields: ['id', 'code'] } },
|
||||||
{ relation: 'company', scope: { fields: ['id', 'code'] } },
|
{ relation: 'company', scope: { fields: ['id', 'code'] } },
|
||||||
],
|
],
|
||||||
where: { clientFk: route.params.id },
|
|
||||||
order: ['created DESC'],
|
order: ['created DESC'],
|
||||||
limit: 20,
|
limit: 20,
|
||||||
};
|
};
|
||||||
|
@ -65,7 +64,8 @@ const columns = computed(() => [
|
||||||
<VnTable
|
<VnTable
|
||||||
data-key="Mandates"
|
data-key="Mandates"
|
||||||
url="Mandates"
|
url="Mandates"
|
||||||
:filter="filter"
|
:user-filter="filter"
|
||||||
|
:filter="{ where: { clientFk: route.params.id } }"
|
||||||
auto-load
|
auto-load
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
class="full-width q-mt-md"
|
class="full-width q-mt-md"
|
||||||
|
|
|
@ -146,9 +146,8 @@ async function deleteEntry() {
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<CardDescriptor
|
<CardDescriptor
|
||||||
ref="entryDescriptorRef"
|
|
||||||
:url="`Entries/${entityId}`"
|
:url="`Entries/${entityId}`"
|
||||||
:userFilter="entryFilter"
|
:filter="entryFilter"
|
||||||
title="supplier.nickname"
|
title="supplier.nickname"
|
||||||
data-key="Entry"
|
data-key="Entry"
|
||||||
width="lg-width"
|
width="lg-width"
|
||||||
|
|
|
@ -283,7 +283,11 @@ onBeforeMount(async () => {
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<VnSection :data-key="dataKey" prefix="entry">
|
<VnSection
|
||||||
|
:data-key="dataKey"
|
||||||
|
prefix="entry"
|
||||||
|
:array-data-props="{ url: 'Entries/filter' }"
|
||||||
|
>
|
||||||
<template #advanced-menu>
|
<template #advanced-menu>
|
||||||
<EntryFilter :data-key="dataKey" />
|
<EntryFilter :data-key="dataKey" />
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -230,7 +230,7 @@ watchEffect(selectedRows);
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
<template #more-create-dialog="{ data }">
|
<template #more-create-dialog="{ data }">
|
||||||
<div class="row q-col-gutter-xs">
|
<div class="row q-col-gutter-xs col-span-2">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<div class="q-col-gutter-xs">
|
<div class="q-col-gutter-xs">
|
||||||
<VnRow fixed>
|
<VnRow fixed>
|
||||||
|
|
|
@ -156,9 +156,7 @@ const columns = computed(() => [
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
if (!route.query) return;
|
if (!route.query) return;
|
||||||
if (route.query?.createForm) {
|
if (route.query?.createForm) {
|
||||||
const query = JSON.parse(route.query?.createForm);
|
await onClientSelected(JSON.parse(route.query?.createForm));
|
||||||
formInitialData.value = query;
|
|
||||||
await onClientSelected({ ...formInitialData.value, clientFk: query?.clientFk });
|
|
||||||
} else if (route.query?.table) {
|
} else if (route.query?.table) {
|
||||||
const query = JSON.parse(route.query?.table);
|
const query = JSON.parse(route.query?.table);
|
||||||
const clientFk = query?.clientFk;
|
const clientFk = query?.clientFk;
|
||||||
|
@ -177,7 +175,6 @@ watch(
|
||||||
tableRef.value.create.formInitialData = formInitialData.value;
|
tableRef.value.create.formInitialData = formInitialData.value;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ immediate: true },
|
|
||||||
);
|
);
|
||||||
|
|
||||||
async function onClientSelected({ clientFk }, formData = {}) {
|
async function onClientSelected({ clientFk }, formData = {}) {
|
||||||
|
@ -191,13 +188,17 @@ async function onClientSelected({ clientFk }, formData = {}) {
|
||||||
addressOptions.value = data;
|
addressOptions.value = data;
|
||||||
formData.defaultAddressFk = data[0].client.defaultAddressFk;
|
formData.defaultAddressFk = data[0].client.defaultAddressFk;
|
||||||
formData.addressId = formData.defaultAddressFk;
|
formData.addressId = formData.defaultAddressFk;
|
||||||
|
formInitialData.value = { ...formData, clientFk };
|
||||||
formInitialData.value = { addressId: formData.addressId, clientFk };
|
|
||||||
await fetchAgencies(formData);
|
await fetchAgencies(formData);
|
||||||
}
|
}
|
||||||
|
|
||||||
async function fetchAgencies({ landed, addressId }) {
|
async function fetchAgencies(formData) {
|
||||||
if (!landed || !addressId) return (agencyList.value = []);
|
const { landed, addressId } = formData;
|
||||||
|
if (!landed || !addressId) {
|
||||||
|
formData.defaultAddressFk = formInitialData.value.defaultAddressFk;
|
||||||
|
|
||||||
|
return (agencyList.value = []);
|
||||||
|
}
|
||||||
|
|
||||||
const { data } = await axios.get('Agencies/landsThatDay', {
|
const { data } = await axios.get('Agencies/landsThatDay', {
|
||||||
params: {
|
params: {
|
||||||
|
@ -220,6 +221,11 @@ const getDateColor = (date) => {
|
||||||
if (difference == 0) return 'bg-warning';
|
if (difference == 0) return 'bg-warning';
|
||||||
if (difference < 0) return 'bg-success';
|
if (difference < 0) return 'bg-success';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const isDefaultAddress = (opt, data) => {
|
||||||
|
const addressId = data.defaultAddressFk ?? data.addressId;
|
||||||
|
return addressId === opt.id && opt.isActive;
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
@ -310,10 +316,7 @@ const getDateColor = (date) => {
|
||||||
>
|
>
|
||||||
<QItemSection style="min-width: min-content" avatar>
|
<QItemSection style="min-width: min-content" avatar>
|
||||||
<QIcon
|
<QIcon
|
||||||
v-if="
|
v-if="isDefaultAddress(scope.opt, data)"
|
||||||
scope.opt.isActive &&
|
|
||||||
data.defaultAddressFk === scope.opt.id
|
|
||||||
"
|
|
||||||
size="sm"
|
size="sm"
|
||||||
color="grey"
|
color="grey"
|
||||||
name="star"
|
name="star"
|
||||||
|
|
|
@ -172,6 +172,7 @@ const filterColumns = computed(() => {
|
||||||
>
|
>
|
||||||
<template #more-create-dialog="{ data }">
|
<template #more-create-dialog="{ data }">
|
||||||
<VnInput
|
<VnInput
|
||||||
|
class="col-span-2"
|
||||||
:label="t('globals.name')"
|
:label="t('globals.name')"
|
||||||
v-model="data.socialName"
|
v-model="data.socialName"
|
||||||
:uppercase="true"
|
:uppercase="true"
|
||||||
|
|
|
@ -54,8 +54,7 @@ onBeforeMount(() => {
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
if (!route.query) return;
|
if (!route.query) return;
|
||||||
if (route.query?.createForm) {
|
if (route.query?.createForm) {
|
||||||
formInitialData.value = JSON.parse(route.query?.createForm);
|
await onClientSelected(JSON.parse(route.query?.createForm));
|
||||||
await onClientSelected(formInitialData.value);
|
|
||||||
} else if (route.query?.table) {
|
} else if (route.query?.table) {
|
||||||
const query = route.query?.table;
|
const query = route.query?.table;
|
||||||
const clientId = +JSON.parse(query)?.clientFk;
|
const clientId = +JSON.parse(query)?.clientFk;
|
||||||
|
@ -273,12 +272,18 @@ const fetchAddresses = async (formData) => {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const { data } = await getAddresses(formData.clientId);
|
const { data } = await getAddresses(formData.clientId);
|
||||||
formInitialData.value = { clientId: formData.clientId };
|
|
||||||
if (!data) return;
|
if (!data) {
|
||||||
|
formInitialData.value = { clientId: formData.clientId };
|
||||||
|
return;
|
||||||
|
}
|
||||||
addressesOptions.value = data;
|
addressesOptions.value = data;
|
||||||
selectedClient.value = data[0].client;
|
selectedClient.value = data[0].client;
|
||||||
formData.addressId = selectedClient.value.defaultAddressFk;
|
formData.addressId = selectedClient.value.defaultAddressFk;
|
||||||
formInitialData.value.addressId = formData.addressId;
|
formInitialData.value = {
|
||||||
|
clientId: formData.clientId,
|
||||||
|
addressId: formData.addressId,
|
||||||
|
};
|
||||||
};
|
};
|
||||||
watch(
|
watch(
|
||||||
() => route.query.table,
|
() => route.query.table,
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import VnCard from 'components/common/VnCard.vue';
|
import VnCardBeta from 'src/components/common/VnCardBeta.vue';
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<VnCard data-key="Wagon" url="Wagons" />
|
<VnCardBeta data-key="Wagon" url="Wagons" :descriptor="{}" />
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -8,6 +8,7 @@ import VnTable from 'src/components/VnTable/VnTable.vue';
|
||||||
import { computed, ref } from 'vue';
|
import { computed, ref } from 'vue';
|
||||||
import VnSelect from 'src/components/common/VnSelect.vue';
|
import VnSelect from 'src/components/common/VnSelect.vue';
|
||||||
import VnInput from 'src/components/common/VnInput.vue';
|
import VnInput from 'src/components/common/VnInput.vue';
|
||||||
|
import VnSection from 'src/components/common/VnSection.vue';
|
||||||
|
|
||||||
const quasar = useQuasar();
|
const quasar = useQuasar();
|
||||||
const arrayData = useArrayData('WagonList');
|
const arrayData = useArrayData('WagonList');
|
||||||
|
@ -15,6 +16,7 @@ const store = arrayData.store;
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const tableRef = ref();
|
const tableRef = ref();
|
||||||
|
const dataKey = 'WagonList';
|
||||||
const filter = {
|
const filter = {
|
||||||
include: {
|
include: {
|
||||||
relation: 'type',
|
relation: 'type',
|
||||||
|
@ -75,101 +77,110 @@ function navigate(id) {
|
||||||
}
|
}
|
||||||
|
|
||||||
async function remove(row) {
|
async function remove(row) {
|
||||||
try {
|
await axios.delete(`Wagons/${row.id}`).then(async () => {
|
||||||
await axios.delete(`Wagons/${row.id}`).then(async () => {
|
quasar.notify({
|
||||||
quasar.notify({
|
message: t('wagon.list.removeItem'),
|
||||||
message: t('wagon.list.removeItem'),
|
type: 'positive',
|
||||||
type: 'positive',
|
|
||||||
});
|
|
||||||
store.data.splice(store.data.indexOf(row), 1);
|
|
||||||
window.location.reload();
|
|
||||||
});
|
});
|
||||||
} catch (error) {
|
store.data.splice(store.data.indexOf(row), 1);
|
||||||
//
|
window.location.reload();
|
||||||
}
|
});
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<QPage class="column items-center q-pa-md">
|
<QPage class="column items-center q-pa-md">
|
||||||
<VnTable
|
<VnSection
|
||||||
ref="tableRef"
|
:data-key="dataKey"
|
||||||
data-key="WagonList"
|
|
||||||
url="Wagons"
|
|
||||||
:filter="filter"
|
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
order="id DESC"
|
prefix="card"
|
||||||
:column-search="false"
|
:array-data-props="{
|
||||||
:default-mode="'card'"
|
url: 'Wagons',
|
||||||
:disable-option="{ table: true }"
|
exprBuilder,
|
||||||
:create="{
|
order: 'id DESC',
|
||||||
urlCreate: 'Wagons',
|
|
||||||
title: t('Create new wagon'),
|
|
||||||
onDataSaved: () => tableRef.reload(),
|
|
||||||
formInitialData: {},
|
|
||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
<template #more-create-dialog="{ data }">
|
<template #body>
|
||||||
<VnInput
|
<VnTable
|
||||||
filled
|
ref="tableRef"
|
||||||
v-model="data.label"
|
:data-key="dataKey"
|
||||||
:label="t('wagon.create.label')"
|
:create="{
|
||||||
type="number"
|
urlCreate: 'Wagons',
|
||||||
min="0"
|
title: t('Create new wagon'),
|
||||||
:rules="[(val) => !!val || t('wagon.warnings.labelNotEmpty')]"
|
onDataSaved: () => tableRef.reload(),
|
||||||
/>
|
formInitialData: {},
|
||||||
<VnInput
|
}"
|
||||||
filled
|
:filter="filter"
|
||||||
v-model="data.plate"
|
:columns="columns"
|
||||||
:label="t('wagon.list.plate')"
|
:column-search="false"
|
||||||
:rules="[(val) => !!val || t('wagon.warnings.plateNotEmpty')]"
|
:default-mode="'card'"
|
||||||
/>
|
:disable-option="{ table: true }"
|
||||||
<VnInput
|
:right-search="false"
|
||||||
filled
|
|
||||||
v-model="data.volume"
|
|
||||||
:label="t('wagon.list.volume')"
|
|
||||||
type="number"
|
|
||||||
min="0"
|
|
||||||
:rules="[(val) => !!val || t('wagon.warnings.volumeNotEmpty')]"
|
|
||||||
/>
|
|
||||||
<VnSelect
|
|
||||||
url="WagonTypes"
|
|
||||||
filled
|
|
||||||
v-model="data.typeFk"
|
|
||||||
use-input
|
|
||||||
fill-input
|
|
||||||
hide-selected
|
|
||||||
input-debounce="0"
|
|
||||||
option-label="name"
|
|
||||||
option-value="id"
|
|
||||||
emit-value
|
|
||||||
map-options
|
|
||||||
:label="t('globals.type')"
|
|
||||||
:options="filteredWagonTypes"
|
|
||||||
:rules="[(val) => !!val || t('wagon.warnings.typeNotEmpty')]"
|
|
||||||
@filter="filterType"
|
|
||||||
>
|
>
|
||||||
<template v-if="data.typeFk" #append>
|
<template #more-create-dialog="{ data }">
|
||||||
<QIcon
|
<VnInput
|
||||||
name="cancel"
|
filled
|
||||||
@click.stop.prevent="data.typeFk = null"
|
v-model="data.label"
|
||||||
class="cursor-pointer"
|
:label="t('wagon.create.label')"
|
||||||
|
type="number"
|
||||||
|
min="0"
|
||||||
|
:rules="[(val) => !!val || t('wagon.warnings.labelNotEmpty')]"
|
||||||
/>
|
/>
|
||||||
|
<VnInput
|
||||||
|
filled
|
||||||
|
v-model="data.plate"
|
||||||
|
:label="t('wagon.list.plate')"
|
||||||
|
:rules="[(val) => !!val || t('wagon.warnings.plateNotEmpty')]"
|
||||||
|
/>
|
||||||
|
<VnInput
|
||||||
|
filled
|
||||||
|
v-model="data.volume"
|
||||||
|
:label="t('wagon.list.volume')"
|
||||||
|
type="number"
|
||||||
|
min="0"
|
||||||
|
:rules="[
|
||||||
|
(val) => !!val || t('wagon.warnings.volumeNotEmpty'),
|
||||||
|
]"
|
||||||
|
/>
|
||||||
|
<VnSelect
|
||||||
|
url="WagonTypes"
|
||||||
|
filled
|
||||||
|
v-model="data.typeFk"
|
||||||
|
use-input
|
||||||
|
fill-input
|
||||||
|
hide-selected
|
||||||
|
input-debounce="0"
|
||||||
|
option-label="name"
|
||||||
|
option-value="id"
|
||||||
|
emit-value
|
||||||
|
map-options
|
||||||
|
:label="t('globals.type')"
|
||||||
|
:options="filteredWagonTypes"
|
||||||
|
:rules="[(val) => !!val || t('wagon.warnings.typeNotEmpty')]"
|
||||||
|
@filter="filterType"
|
||||||
|
>
|
||||||
|
<template v-if="data.typeFk" #append>
|
||||||
|
<QIcon
|
||||||
|
name="cancel"
|
||||||
|
@click.stop.prevent="data.typeFk = null"
|
||||||
|
class="cursor-pointer"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
<template #no-option>
|
||||||
|
<QItem>
|
||||||
|
<QItemSection class="text-grey">
|
||||||
|
{{ t('wagon.warnings.noData') }}
|
||||||
|
</QItemSection>
|
||||||
|
</QItem>
|
||||||
|
</template>
|
||||||
|
</VnSelect>
|
||||||
</template>
|
</template>
|
||||||
<template #no-option>
|
</VnTable>
|
||||||
<QItem>
|
|
||||||
<QItemSection class="text-grey">
|
|
||||||
{{ t('wagon.warnings.noData') }}
|
|
||||||
</QItemSection>
|
|
||||||
</QItem>
|
|
||||||
</template>
|
|
||||||
</VnSelect>
|
|
||||||
</template>
|
</template>
|
||||||
</VnTable>
|
</VnSection>
|
||||||
</QPage>
|
</QPage>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<i18n>
|
<i18n>
|
||||||
es:
|
es:
|
||||||
Create new wagon: Crear nuevo vagón
|
Create new wagon: Crear nuevo vagón
|
||||||
</i18n>
|
</i18n>
|
||||||
|
|
|
@ -223,7 +223,7 @@ async function autofillBic(worker) {
|
||||||
:right-search="false"
|
:right-search="false"
|
||||||
>
|
>
|
||||||
<template #more-create-dialog="{ data }">
|
<template #more-create-dialog="{ data }">
|
||||||
<div class="q-pa-lg full-width">
|
<div class="col-span-2">
|
||||||
<VnRadio
|
<VnRadio
|
||||||
v-model="data.isFreelance"
|
v-model="data.isFreelance"
|
||||||
:val="false"
|
:val="false"
|
||||||
|
|
|
@ -1,52 +1,60 @@
|
||||||
import { RouterView } from 'vue-router';
|
import { RouterView } from 'vue-router';
|
||||||
|
|
||||||
|
const wagonCard = {
|
||||||
|
name: 'WagonCard',
|
||||||
|
path: ':id',
|
||||||
|
component: () => import('src/pages/Wagon/Card/WagonCard.vue'),
|
||||||
|
redirect: { name: 'WagonEdit' },
|
||||||
|
meta: {
|
||||||
|
menu: ['WagonEdit'],
|
||||||
|
},
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
path: 'edit',
|
||||||
|
name: 'WagonEdit',
|
||||||
|
meta: {
|
||||||
|
title: 'wagonEdit',
|
||||||
|
icon: 'edit',
|
||||||
|
},
|
||||||
|
component: () => import('src/pages/Wagon/WagonCreate.vue'),
|
||||||
|
},
|
||||||
|
],
|
||||||
|
};
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
path: '/wagon',
|
|
||||||
name: 'Wagon',
|
name: 'Wagon',
|
||||||
|
path: '/wagon',
|
||||||
meta: {
|
meta: {
|
||||||
title: 'wagons',
|
title: 'wagons',
|
||||||
icon: 'vn:trolley',
|
icon: 'vn:trolley',
|
||||||
moduleName: 'Wagon',
|
moduleName: 'Wagon',
|
||||||
|
menu: ['WagonList', 'WagonTypeList', 'WagonCounter'],
|
||||||
},
|
},
|
||||||
component: RouterView,
|
component: RouterView,
|
||||||
redirect: { name: 'WagonMain' },
|
redirect: { name: 'WagonMain' },
|
||||||
menus: {
|
|
||||||
main: ['WagonList', 'WagonTypeList', 'WagonCounter', 'WagonTray'],
|
|
||||||
card: [],
|
|
||||||
},
|
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
path: '/wagon',
|
path: '',
|
||||||
name: 'WagonMain',
|
name: 'WagonMain',
|
||||||
component: () => import('src/components/common/VnModule.vue'),
|
component: () => import('src/components/common/VnModule.vue'),
|
||||||
redirect: { name: 'WagonList' },
|
redirect: { name: 'WagonIndexMain' },
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
path: 'list',
|
path: '',
|
||||||
name: 'WagonList',
|
name: 'WagonIndexMain',
|
||||||
meta: {
|
redirect: { name: 'WagonList' },
|
||||||
title: 'list',
|
|
||||||
icon: 'vn:trolley',
|
|
||||||
},
|
|
||||||
component: () => import('src/pages/Wagon/WagonList.vue'),
|
component: () => import('src/pages/Wagon/WagonList.vue'),
|
||||||
},
|
children: [
|
||||||
{
|
{
|
||||||
path: 'create',
|
name: 'WagonList',
|
||||||
name: 'WagonCreate',
|
path: 'list',
|
||||||
meta: {
|
meta: {
|
||||||
title: 'wagonCreate',
|
title: 'list',
|
||||||
icon: 'create',
|
icon: 'view_list',
|
||||||
},
|
},
|
||||||
component: () => import('src/pages/Wagon/WagonCreate.vue'),
|
},
|
||||||
},
|
wagonCard,
|
||||||
{
|
],
|
||||||
path: ':id/edit',
|
|
||||||
name: 'WagonEdit',
|
|
||||||
meta: {
|
|
||||||
title: 'wagonEdit',
|
|
||||||
icon: 'edit',
|
|
||||||
},
|
|
||||||
component: () => import('src/pages/Wagon/WagonCreate.vue'),
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'counter',
|
path: 'counter',
|
||||||
|
@ -57,40 +65,32 @@ export default {
|
||||||
},
|
},
|
||||||
component: () => import('src/pages/Wagon/WagonCounter.vue'),
|
component: () => import('src/pages/Wagon/WagonCounter.vue'),
|
||||||
},
|
},
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: '/wagon/type',
|
|
||||||
name: 'WagonTypeMain',
|
|
||||||
component: () => import('src/components/common/VnModule.vue'),
|
|
||||||
redirect: { name: 'WagonTypeList' },
|
|
||||||
children: [
|
|
||||||
{
|
{
|
||||||
path: 'list',
|
path: 'type',
|
||||||
name: 'WagonTypeList',
|
name: 'WagonTypeMain',
|
||||||
meta: {
|
redirect: { name: 'WagonTypeList' },
|
||||||
title: 'typesList',
|
children: [
|
||||||
icon: 'view_list',
|
{
|
||||||
},
|
path: 'list',
|
||||||
component: () => import('src/pages/Wagon/Type/WagonTypeList.vue'),
|
name: 'WagonTypeList',
|
||||||
},
|
meta: {
|
||||||
{
|
title: 'typesList',
|
||||||
path: 'create',
|
icon: 'view_list',
|
||||||
name: 'WagonTypeCreate',
|
},
|
||||||
meta: {
|
component: () =>
|
||||||
title: 'typeCreate',
|
import('src/pages/Wagon/Type/WagonTypeList.vue'),
|
||||||
icon: 'create',
|
},
|
||||||
},
|
{
|
||||||
component: () => import('src/pages/Wagon/Type/WagonTypeList.vue'),
|
path: ':id/edit',
|
||||||
},
|
name: 'WagonTypeEdit',
|
||||||
{
|
meta: {
|
||||||
path: ':id/edit',
|
title: 'typeEdit',
|
||||||
name: 'WagonTypeEdit',
|
icon: 'edit',
|
||||||
meta: {
|
},
|
||||||
title: 'typeEdit',
|
component: () =>
|
||||||
icon: 'edit',
|
import('src/pages/Wagon/Type/WagonTypeEdit.vue'),
|
||||||
},
|
},
|
||||||
component: () => import('src/pages/Wagon/Type/WagonTypeEdit.vue'),
|
],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
|
|
@ -139,7 +139,7 @@ describe.skip('Ticket Lack detail', () => {
|
||||||
cy.wait('@getItemGetSimilar');
|
cy.wait('@getItemGetSimilar');
|
||||||
});
|
});
|
||||||
describe('Replace item if', () => {
|
describe('Replace item if', () => {
|
||||||
it('Quantity is less than available', () => {
|
it.skip('Quantity is less than available', () => {
|
||||||
cy.get(':nth-child(1) > .text-right > .q-btn').click();
|
cy.get(':nth-child(1) > .text-right > .q-btn').click();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -38,8 +38,8 @@ describe('TicketList', () => {
|
||||||
it('filter client and create ticket', () => {
|
it('filter client and create ticket', () => {
|
||||||
cy.intercept('GET', /\/api\/Tickets\/filter/).as('ticketSearchbar');
|
cy.intercept('GET', /\/api\/Tickets\/filter/).as('ticketSearchbar');
|
||||||
searchResults();
|
searchResults();
|
||||||
|
cy.wait('@ticketSearchbar');
|
||||||
|
|
||||||
cy.intercept('GET', /\/api\/Tickets\/filter/).as('ticketFilter');
|
|
||||||
cy.dataCy('Customer ID_input').clear('1');
|
cy.dataCy('Customer ID_input').clear('1');
|
||||||
cy.dataCy('Customer ID_input').type('1101{enter}');
|
cy.dataCy('Customer ID_input').type('1101{enter}');
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
describe.skip('WagonCreate', () => {
|
describe('WagonCreate', () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
cy.viewport(1280, 720);
|
cy.viewport(1280, 720);
|
||||||
cy.login('developer');
|
cy.login('developer');
|
||||||
|
@ -17,7 +17,7 @@ describe.skip('WagonCreate', () => {
|
||||||
'.grid-create > [label="Volume"] > .q-field > .q-field__inner > .q-field__control > .q-field__control-container > [data-cy="Volume_input"]',
|
'.grid-create > [label="Volume"] > .q-field > .q-field__inner > .q-field__control > .q-field__control-container > [data-cy="Volume_input"]',
|
||||||
).type('100');
|
).type('100');
|
||||||
cy.selectOption('[data-cy="Type_select"]', '1');
|
cy.selectOption('[data-cy="Type_select"]', '1');
|
||||||
|
cy.dataCy('FormModelPopup_save').click();
|
||||||
cy.get('[title="Remove"] > .q-btn__content > .q-icon').first().click();
|
cy.get('[title="Remove"] > .q-btn__content > .q-icon').first().click();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -2,7 +2,7 @@ describe('WagonTypeCreate', () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
cy.viewport(1920, 1080);
|
cy.viewport(1920, 1080);
|
||||||
cy.login('developer');
|
cy.login('developer');
|
||||||
cy.visit('/#/wagon/type/create');
|
cy.visit('/#/wagon/type/list');
|
||||||
cy.waitForElement('.q-page', 6000);
|
cy.waitForElement('.q-page', 6000);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue