Merge branch 'dev' into fix_claimSummaryUrl
gitea/salix-front/pipeline/pr-dev This commit is unstable
Details
gitea/salix-front/pipeline/pr-dev This commit is unstable
Details
This commit is contained in:
commit
34e65ea386
|
@ -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 {
|
||||||
|
|
|
@ -1,50 +1,56 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { onBeforeMount, computed } from 'vue';
|
import { onBeforeMount } from 'vue';
|
||||||
import { useRoute, useRouter, onBeforeRouteUpdate } from 'vue-router';
|
import { useRouter, onBeforeRouteUpdate, onBeforeRouteLeave } from 'vue-router';
|
||||||
import { useArrayData } from 'src/composables/useArrayData';
|
import { useArrayData } from 'src/composables/useArrayData';
|
||||||
import { useStateStore } from 'stores/useStateStore';
|
import { useStateStore } from 'stores/useStateStore';
|
||||||
import useCardSize from 'src/composables/useCardSize';
|
import useCardSize from 'src/composables/useCardSize';
|
||||||
import VnSubToolbar from '../ui/VnSubToolbar.vue';
|
import VnSubToolbar from '../ui/VnSubToolbar.vue';
|
||||||
import VnSearchbar from 'components/ui/VnSearchbar.vue';
|
|
||||||
import LeftMenu from 'components/LeftMenu.vue';
|
|
||||||
import RightMenu from 'components/common/RightMenu.vue';
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
dataKey: { type: String, required: true },
|
dataKey: { type: String, required: true },
|
||||||
url: { type: String, default: undefined },
|
url: { type: String, default: undefined },
|
||||||
|
idInWhere: { type: Boolean, default: false },
|
||||||
filter: { type: Object, default: () => {} },
|
filter: { type: Object, default: () => {} },
|
||||||
descriptor: { type: Object, required: true },
|
descriptor: { type: Object, required: true },
|
||||||
filterPanel: { type: Object, default: undefined },
|
filterPanel: { type: Object, default: undefined },
|
||||||
idInWhere: { type: Boolean, default: false },
|
|
||||||
searchDataKey: { type: String, default: undefined },
|
searchDataKey: { type: String, default: undefined },
|
||||||
searchbarProps: { type: Object, default: undefined },
|
searchbarProps: { type: Object, default: undefined },
|
||||||
redirectOnError: { type: Boolean, default: false },
|
redirectOnError: { type: Boolean, default: false },
|
||||||
});
|
});
|
||||||
|
|
||||||
const stateStore = useStateStore();
|
const stateStore = useStateStore();
|
||||||
const route = useRoute();
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const searchRightDataKey = computed(() => {
|
|
||||||
if (!props.searchDataKey) return route.name;
|
|
||||||
return props.searchDataKey;
|
|
||||||
});
|
|
||||||
|
|
||||||
const arrayData = useArrayData(props.dataKey, {
|
const arrayData = useArrayData(props.dataKey, {
|
||||||
url: props.url,
|
url: props.url,
|
||||||
userFilter: props.filter,
|
userFilter: props.filter,
|
||||||
oneRecord: true,
|
oneRecord: true,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
onBeforeRouteLeave(() => {
|
||||||
|
stateStore.cardDescriptorChangeValue(null);
|
||||||
|
});
|
||||||
|
|
||||||
onBeforeMount(async () => {
|
onBeforeMount(async () => {
|
||||||
|
stateStore.cardDescriptorChangeValue(props.descriptor);
|
||||||
|
|
||||||
|
const route = router.currentRoute.value;
|
||||||
try {
|
try {
|
||||||
await fetch(route.params.id);
|
await fetch(route.params.id);
|
||||||
} catch {
|
} catch {
|
||||||
const { matched: matches } = router.currentRoute.value;
|
const { matched: matches } = route;
|
||||||
const { path } = matches.at(-1);
|
const { path } = matches.at(-1);
|
||||||
router.push({ path: path.replace(/:id.*/, '') });
|
router.push({ path: path.replace(/:id.*/, '') });
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
onBeforeRouteUpdate(async (to, from) => {
|
onBeforeRouteUpdate(async (to, from) => {
|
||||||
|
if (hasRouteParam(to.params)) {
|
||||||
|
const { matched } = router.currentRoute.value;
|
||||||
|
const { name } = matched.at(-3);
|
||||||
|
if (name) {
|
||||||
|
router.push({ name, params: to.params });
|
||||||
|
}
|
||||||
|
}
|
||||||
const id = to.params.id;
|
const id = to.params.id;
|
||||||
if (id !== from.params.id) await fetch(id, true);
|
if (id !== from.params.id) await fetch(id, true);
|
||||||
});
|
});
|
||||||
|
@ -56,34 +62,13 @@ async function fetch(id, append = false) {
|
||||||
else arrayData.store.url = props.url.replace(regex, `/${id}`);
|
else arrayData.store.url = props.url.replace(regex, `/${id}`);
|
||||||
await arrayData.fetch({ append, updateRouter: false });
|
await arrayData.fetch({ append, updateRouter: false });
|
||||||
}
|
}
|
||||||
|
function hasRouteParam(params, valueToCheck = ':addressId') {
|
||||||
|
return Object.values(params).includes(valueToCheck);
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<QDrawer
|
<VnSubToolbar />
|
||||||
v-model="stateStore.leftDrawer"
|
<div :class="[useCardSize(), $attrs.class]">
|
||||||
show-if-above
|
<RouterView :key="$route.path" />
|
||||||
:width="256"
|
</div>
|
||||||
v-if="stateStore.isHeaderMounted()"
|
|
||||||
>
|
|
||||||
<QScrollArea class="fit">
|
|
||||||
<component :is="descriptor" />
|
|
||||||
<QSeparator />
|
|
||||||
<LeftMenu source="card" />
|
|
||||||
</QScrollArea>
|
|
||||||
</QDrawer>
|
|
||||||
<slot name="searchbar" v-if="props.searchDataKey">
|
|
||||||
<VnSearchbar :data-key="props.searchDataKey" v-bind="props.searchbarProps" />
|
|
||||||
</slot>
|
|
||||||
<RightMenu>
|
|
||||||
<template #right-panel v-if="props.filterPanel">
|
|
||||||
<component :is="props.filterPanel" :data-key="searchRightDataKey" />
|
|
||||||
</template>
|
|
||||||
</RightMenu>
|
|
||||||
<QPageContainer>
|
|
||||||
<QPage>
|
|
||||||
<VnSubToolbar />
|
|
||||||
<div :class="[useCardSize(), $attrs.class]">
|
|
||||||
<RouterView :key="$route.path" />
|
|
||||||
</div>
|
|
||||||
</QPage>
|
|
||||||
</QPageContainer>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -1,74 +0,0 @@
|
||||||
<script setup>
|
|
||||||
import { onBeforeMount } from 'vue';
|
|
||||||
import { useRouter, onBeforeRouteUpdate, onBeforeRouteLeave } from 'vue-router';
|
|
||||||
import { useArrayData } from 'src/composables/useArrayData';
|
|
||||||
import { useStateStore } from 'stores/useStateStore';
|
|
||||||
import useCardSize from 'src/composables/useCardSize';
|
|
||||||
import VnSubToolbar from '../ui/VnSubToolbar.vue';
|
|
||||||
|
|
||||||
const props = defineProps({
|
|
||||||
dataKey: { type: String, required: true },
|
|
||||||
url: { type: String, default: undefined },
|
|
||||||
idInWhere: { type: Boolean, default: false },
|
|
||||||
filter: { type: Object, default: () => {} },
|
|
||||||
descriptor: { type: Object, required: true },
|
|
||||||
filterPanel: { type: Object, default: undefined },
|
|
||||||
searchDataKey: { type: String, default: undefined },
|
|
||||||
searchbarProps: { type: Object, default: undefined },
|
|
||||||
redirectOnError: { type: Boolean, default: false },
|
|
||||||
});
|
|
||||||
|
|
||||||
const stateStore = useStateStore();
|
|
||||||
const router = useRouter();
|
|
||||||
const arrayData = useArrayData(props.dataKey, {
|
|
||||||
url: props.url,
|
|
||||||
userFilter: props.filter,
|
|
||||||
oneRecord: true,
|
|
||||||
});
|
|
||||||
|
|
||||||
onBeforeRouteLeave(() => {
|
|
||||||
stateStore.cardDescriptorChangeValue(null);
|
|
||||||
});
|
|
||||||
|
|
||||||
onBeforeMount(async () => {
|
|
||||||
stateStore.cardDescriptorChangeValue(props.descriptor);
|
|
||||||
|
|
||||||
const route = router.currentRoute.value;
|
|
||||||
try {
|
|
||||||
await fetch(route.params.id);
|
|
||||||
} catch {
|
|
||||||
const { matched: matches } = route;
|
|
||||||
const { path } = matches.at(-1);
|
|
||||||
router.push({ path: path.replace(/:id.*/, '') });
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
onBeforeRouteUpdate(async (to, from) => {
|
|
||||||
if (hasRouteParam(to.params)) {
|
|
||||||
const { matched } = router.currentRoute.value;
|
|
||||||
const { name } = matched.at(-3);
|
|
||||||
if (name) {
|
|
||||||
router.push({ name, params: to.params });
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const id = to.params.id;
|
|
||||||
if (id !== from.params.id) await fetch(id, true);
|
|
||||||
});
|
|
||||||
|
|
||||||
async function fetch(id, append = false) {
|
|
||||||
const regex = /\/(\d+)/;
|
|
||||||
if (props.idInWhere) arrayData.store.filter.where = { id };
|
|
||||||
else if (!regex.test(props.url)) arrayData.store.url = `${props.url}/${id}`;
|
|
||||||
else arrayData.store.url = props.url.replace(regex, `/${id}`);
|
|
||||||
await arrayData.fetch({ append, updateRouter: false });
|
|
||||||
}
|
|
||||||
function hasRouteParam(params, valueToCheck = ':addressId') {
|
|
||||||
return Object.values(params).includes(valueToCheck);
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
<template>
|
|
||||||
<VnSubToolbar />
|
|
||||||
<div :class="[useCardSize(), $attrs.class]">
|
|
||||||
<RouterView :key="$route.path" />
|
|
||||||
</div>
|
|
||||||
</template>
|
|
|
@ -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>
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import VnCardBeta from 'components/common/VnCardBeta.vue';
|
import VnCard from 'components/common/VnCard.vue';
|
||||||
import AliasDescriptor from './AliasDescriptor.vue';
|
import AliasDescriptor from './AliasDescriptor.vue';
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<VnCardBeta
|
<VnCard
|
||||||
data-key="Alias"
|
data-key="Alias"
|
||||||
url="MailAliases"
|
url="MailAliases"
|
||||||
:descriptor="AliasDescriptor"
|
:descriptor="AliasDescriptor"
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import VnCardBeta from 'components/common/VnCardBeta.vue';
|
import VnCard from 'components/common/VnCard.vue';
|
||||||
import AccountDescriptor from './AccountDescriptor.vue';
|
import AccountDescriptor from './AccountDescriptor.vue';
|
||||||
import filter from './AccountFilter.js';
|
import filter from './AccountFilter.js';
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<VnCardBeta
|
<VnCard
|
||||||
url="VnUsers/preview"
|
url="VnUsers/preview"
|
||||||
:id-in-where="true"
|
:id-in-where="true"
|
||||||
data-key="Account"
|
data-key="Account"
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import VnCardBeta from 'components/common/VnCardBeta.vue';
|
import VnCard from 'components/common/VnCard.vue';
|
||||||
import RoleDescriptor from './RoleDescriptor.vue';
|
import RoleDescriptor from './RoleDescriptor.vue';
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<VnCardBeta
|
<VnCard
|
||||||
url="VnRoles"
|
url="VnRoles"
|
||||||
data-key="Role"
|
data-key="Role"
|
||||||
:id-in-where="true"
|
:id-in-where="true"
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import VnCardBeta from 'components/common/VnCardBeta.vue';
|
import VnCard from 'components/common/VnCard.vue';
|
||||||
import ClaimDescriptor from './ClaimDescriptor.vue';
|
import ClaimDescriptor from './ClaimDescriptor.vue';
|
||||||
import filter from './ClaimFilter.js';
|
import filter from './ClaimFilter.js';
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<VnCardBeta
|
<VnCard
|
||||||
data-key="Claim"
|
data-key="Claim"
|
||||||
url="Claims"
|
url="Claims"
|
||||||
:descriptor="ClaimDescriptor"
|
:descriptor="ClaimDescriptor"
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import VnCardBeta from 'components/common/VnCardBeta.vue';
|
import VnCard from 'components/common/VnCard.vue';
|
||||||
import CustomerDescriptor from './CustomerDescriptor.vue';
|
import CustomerDescriptor from './CustomerDescriptor.vue';
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<VnCardBeta
|
<VnCard
|
||||||
data-key="Customer"
|
data-key="Customer"
|
||||||
:url="`Clients/${$route.params.id}/getCard`"
|
:url="`Clients/${$route.params.id}/getCard`"
|
||||||
:descriptor="CustomerDescriptor"
|
:descriptor="CustomerDescriptor"
|
||||||
|
|
|
@ -17,7 +17,6 @@ const filter = {
|
||||||
{ relation: 'company', scope: { fields: ['id', 'code'] } },
|
{ relation: 'company', scope: { fields: ['id', 'code'] } },
|
||||||
],
|
],
|
||||||
order: ['created DESC'],
|
order: ['created DESC'],
|
||||||
limit: 20,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const columns = computed(() => [
|
const columns = computed(() => [
|
||||||
|
@ -31,7 +30,7 @@ const columns = computed(() => [
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
cardVisible: true,
|
cardVisible: true,
|
||||||
format: ({ company }) => company.code,
|
format: ({ company }) => company?.code,
|
||||||
label: t('globals.company'),
|
label: t('globals.company'),
|
||||||
name: 'company',
|
name: 'company',
|
||||||
},
|
},
|
||||||
|
|
|
@ -5,7 +5,7 @@ import { useRoute } from 'vue-router';
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
import { getClientRisk } from '../composables/getClientRisk';
|
import { getClientRisk } from '../composables/getClientRisk';
|
||||||
import { useDialogPluginComponent } from 'quasar';
|
import { useDialogPluginComponent } from 'quasar';
|
||||||
|
import FormModelPopup from 'components/FormModelPopup.vue';
|
||||||
import { usePrintService } from 'composables/usePrintService';
|
import { usePrintService } from 'composables/usePrintService';
|
||||||
import useNotify from 'src/composables/useNotify.js';
|
import useNotify from 'src/composables/useNotify.js';
|
||||||
import FetchData from 'components/FetchData.vue';
|
import FetchData from 'components/FetchData.vue';
|
||||||
|
@ -74,26 +74,24 @@ onBeforeMount(() => {
|
||||||
urlCreate.value = `Clients/${route.params.id}/createReceipt`;
|
urlCreate.value = `Clients/${route.params.id}/createReceipt`;
|
||||||
});
|
});
|
||||||
|
|
||||||
function setPaymentType(accounting) {
|
function setPaymentType(data, accounting) {
|
||||||
|
data.bankFk = accounting.id;
|
||||||
if (!accounting) return;
|
if (!accounting) return;
|
||||||
accountingType.value = accounting.accountingType;
|
accountingType.value = accounting.accountingType;
|
||||||
initialData.description = [];
|
data.description = [];
|
||||||
initialData.payed = Date.vnNew();
|
data.payed = Date.vnNew();
|
||||||
isCash.value = accountingType.value.code == 'cash';
|
isCash.value = accountingType.value.code == 'cash';
|
||||||
viewReceipt.value = isCash.value;
|
viewReceipt.value = isCash.value;
|
||||||
if (accountingType.value.daysInFuture)
|
if (accountingType.value.daysInFuture)
|
||||||
initialData.payed.setDate(
|
data.payed.setDate(data.payed.getDate() + accountingType.value.daysInFuture);
|
||||||
initialData.payed.getDate() + accountingType.value.daysInFuture,
|
|
||||||
);
|
|
||||||
maxAmount.value = accountingType.value && accountingType.value.maxAmount;
|
maxAmount.value = accountingType.value && accountingType.value.maxAmount;
|
||||||
if (accountingType.value.code == 'compensation')
|
if (accountingType.value.code == 'compensation') return (data.description = '');
|
||||||
return (initialData.description = '');
|
|
||||||
|
|
||||||
let descriptions = [];
|
let descriptions = [];
|
||||||
if (accountingType.value.receiptDescription)
|
if (accountingType.value.receiptDescription)
|
||||||
descriptions.push(accountingType.value.receiptDescription);
|
descriptions.push(accountingType.value.receiptDescription);
|
||||||
if (initialData.description) descriptions.push(initialData.description);
|
if (data.description) descriptions.push(data.description);
|
||||||
initialData.description = descriptions.join(', ');
|
data.description = descriptions.join(', ');
|
||||||
}
|
}
|
||||||
|
|
||||||
const calculateFromAmount = (event) => {
|
const calculateFromAmount = (event) => {
|
||||||
|
@ -113,7 +111,6 @@ function onBeforeSave(data) {
|
||||||
if (isCash.value && shouldSendEmail.value && !data.email)
|
if (isCash.value && shouldSendEmail.value && !data.email)
|
||||||
return notify(t('There is no assigned email for this client'), 'negative');
|
return notify(t('There is no assigned email for this client'), 'negative');
|
||||||
|
|
||||||
data.bankFk = data.bankFk?.id;
|
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -181,42 +178,19 @@ async function getAmountPaid() {
|
||||||
auto-load
|
auto-load
|
||||||
url="Clients/findOne"
|
url="Clients/findOne"
|
||||||
/>
|
/>
|
||||||
<FormModel
|
<FormModelPopup
|
||||||
ref="formModelRef"
|
ref="formModelRef"
|
||||||
:form-initial-data="initialData"
|
:form-initial-data="initialData"
|
||||||
:observe-form-changes="false"
|
|
||||||
:url-create="urlCreate"
|
:url-create="urlCreate"
|
||||||
:mapper="onBeforeSave"
|
:mapper="onBeforeSave"
|
||||||
@on-data-saved="onDataSaved"
|
@on-data-saved="onDataSaved"
|
||||||
prevent-submit
|
:prevent-submit="true"
|
||||||
>
|
>
|
||||||
<template #form="{ data, validate }">
|
<template #form-inputs="{ data, validate }">
|
||||||
<span ref="closeButton" class="row justify-end close-icon" v-close-popup>
|
|
||||||
<QIcon name="close" size="sm" />
|
|
||||||
</span>
|
|
||||||
|
|
||||||
<h5 class="q-mt-none">{{ t('New payment') }}</h5>
|
<h5 class="q-mt-none">{{ t('New payment') }}</h5>
|
||||||
|
|
||||||
<VnRow>
|
|
||||||
<VnInputDate
|
|
||||||
:label="t('Date')"
|
|
||||||
:required="true"
|
|
||||||
v-model="data.payed"
|
|
||||||
/>
|
|
||||||
<VnSelect
|
|
||||||
:label="t('Company')"
|
|
||||||
:options="companyOptions"
|
|
||||||
:required="true"
|
|
||||||
:rules="validate('entry.companyFk')"
|
|
||||||
hide-selected
|
|
||||||
option-label="code"
|
|
||||||
option-value="id"
|
|
||||||
v-model="data.companyFk"
|
|
||||||
@update:model-value="getAmountPaid()"
|
|
||||||
/>
|
|
||||||
</VnRow>
|
|
||||||
<VnRow>
|
<VnRow>
|
||||||
<VnSelect
|
<VnSelect
|
||||||
|
autofocus
|
||||||
:label="t('Bank')"
|
:label="t('Bank')"
|
||||||
v-model="data.bankFk"
|
v-model="data.bankFk"
|
||||||
url="Accountings"
|
url="Accountings"
|
||||||
|
@ -225,9 +199,10 @@ async function getAmountPaid() {
|
||||||
sort-by="id"
|
sort-by="id"
|
||||||
:limit="0"
|
:limit="0"
|
||||||
@update:model-value="
|
@update:model-value="
|
||||||
(value, options) => setPaymentType(value, options)
|
(value, options) => setPaymentType(data, value, options)
|
||||||
"
|
"
|
||||||
:emit-value="false"
|
:emit-value="false"
|
||||||
|
data-cy="paymentBank"
|
||||||
>
|
>
|
||||||
<template #option="scope">
|
<template #option="scope">
|
||||||
<QItem v-bind="scope.itemProps">
|
<QItem v-bind="scope.itemProps">
|
||||||
|
@ -245,8 +220,28 @@ async function getAmountPaid() {
|
||||||
@update:model-value="calculateFromAmount($event)"
|
@update:model-value="calculateFromAmount($event)"
|
||||||
clearable
|
clearable
|
||||||
v-model.number="data.amountPaid"
|
v-model.number="data.amountPaid"
|
||||||
|
data-cy="paymentAmount"
|
||||||
/>
|
/>
|
||||||
</VnRow>
|
</VnRow>
|
||||||
|
<VnRow>
|
||||||
|
<VnInputDate
|
||||||
|
:label="t('Date')"
|
||||||
|
v-model="data.payed"
|
||||||
|
:required="true"
|
||||||
|
/>
|
||||||
|
<VnSelect
|
||||||
|
:label="t('Company')"
|
||||||
|
:options="companyOptions"
|
||||||
|
:required="true"
|
||||||
|
:rules="validate('entry.companyFk')"
|
||||||
|
hide-selected
|
||||||
|
option-label="code"
|
||||||
|
option-value="id"
|
||||||
|
v-model="data.companyFk"
|
||||||
|
@update:model-value="getAmountPaid()"
|
||||||
|
/>
|
||||||
|
</VnRow>
|
||||||
|
|
||||||
<div v-if="data.bankFk?.accountingType?.code == 'compensation'">
|
<div v-if="data.bankFk?.accountingType?.code == 'compensation'">
|
||||||
<div class="text-h6">
|
<div class="text-h6">
|
||||||
{{ t('Compensation') }}
|
{{ t('Compensation') }}
|
||||||
|
@ -287,27 +282,8 @@ async function getAmountPaid() {
|
||||||
<QCheckbox v-model="shouldSendEmail" :label="t('Send email')" />
|
<QCheckbox v-model="shouldSendEmail" :label="t('Send email')" />
|
||||||
</VnRow>
|
</VnRow>
|
||||||
</div>
|
</div>
|
||||||
<div class="q-mt-lg row justify-end">
|
|
||||||
<QBtn
|
|
||||||
:disabled="formModelRef.isLoading"
|
|
||||||
:label="t('globals.cancel')"
|
|
||||||
:loading="formModelRef.isLoading"
|
|
||||||
class="q-ml-sm"
|
|
||||||
color="primary"
|
|
||||||
flat
|
|
||||||
type="reset"
|
|
||||||
v-close-popup
|
|
||||||
/>
|
|
||||||
<QBtn
|
|
||||||
:disabled="formModelRef.isLoading"
|
|
||||||
:label="t('globals.save')"
|
|
||||||
:loading="formModelRef.isLoading"
|
|
||||||
color="primary"
|
|
||||||
@click="formModelRef.save()"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
</FormModel>
|
</FormModelPopup>
|
||||||
</QDialog>
|
</QDialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import VnCardBeta from 'components/common/VnCardBeta.vue';
|
import VnCard from 'components/common/VnCard.vue';
|
||||||
import EntryDescriptor from './EntryDescriptor.vue';
|
import EntryDescriptor from './EntryDescriptor.vue';
|
||||||
import filter from './EntryFilter.js';
|
import filter from './EntryFilter.js';
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<VnCardBeta
|
<VnCard
|
||||||
data-key="Entry"
|
data-key="Entry"
|
||||||
url="Entries"
|
url="Entries"
|
||||||
:descriptor="EntryDescriptor"
|
:descriptor="EntryDescriptor"
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import VnCardBeta from 'components/common/VnCardBeta.vue';
|
import VnCard from 'components/common/VnCard.vue';
|
||||||
import InvoiceInDescriptor from './InvoiceInDescriptor.vue';
|
import InvoiceInDescriptor from './InvoiceInDescriptor.vue';
|
||||||
import { onBeforeRouteUpdate } from 'vue-router';
|
import { onBeforeRouteUpdate } from 'vue-router';
|
||||||
import { setRectificative } from '../composables/setRectificative';
|
import { setRectificative } from '../composables/setRectificative';
|
||||||
|
@ -9,7 +9,7 @@ onBeforeRouteUpdate(async (to) => await setRectificative(to));
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<VnCardBeta
|
<VnCard
|
||||||
data-key="InvoiceIn"
|
data-key="InvoiceIn"
|
||||||
url="InvoiceIns"
|
url="InvoiceIns"
|
||||||
:descriptor="InvoiceInDescriptor"
|
:descriptor="InvoiceInDescriptor"
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import InvoiceOutDescriptor from './InvoiceOutDescriptor.vue';
|
import InvoiceOutDescriptor from './InvoiceOutDescriptor.vue';
|
||||||
import VnCardBeta from 'components/common/VnCardBeta.vue';
|
import VnCard from 'components/common/VnCard.vue';
|
||||||
import filter from './InvoiceOutFilter.js';
|
import filter from './InvoiceOutFilter.js';
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<VnCardBeta
|
<VnCard
|
||||||
data-key="InvoiceOut"
|
data-key="InvoiceOut"
|
||||||
url="InvoiceOuts"
|
url="InvoiceOuts"
|
||||||
:filter="filter"
|
:filter="filter"
|
||||||
|
|
|
@ -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>
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import VnCardBeta from 'components/common/VnCardBeta.vue';
|
import VnCard from 'components/common/VnCard.vue';
|
||||||
import ItemDescriptor from './ItemDescriptor.vue';
|
import ItemDescriptor from './ItemDescriptor.vue';
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<VnCardBeta
|
<VnCard
|
||||||
data-key="Item"
|
data-key="Item"
|
||||||
:url="`Items/${$route.params.id}/getCard`"
|
:url="`Items/${$route.params.id}/getCard`"
|
||||||
:descriptor="ItemDescriptor"
|
:descriptor="ItemDescriptor"
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import VnCardBeta from 'components/common/VnCardBeta.vue';
|
import VnCard from 'components/common/VnCard.vue';
|
||||||
import ItemTypeDescriptor from 'src/pages/Item/ItemType/Card/ItemTypeDescriptor.vue';
|
import ItemTypeDescriptor from 'src/pages/Item/ItemType/Card/ItemTypeDescriptor.vue';
|
||||||
import filter from './ItemTypeFilter.js';
|
import filter from './ItemTypeFilter.js';
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<VnCardBeta
|
<VnCard
|
||||||
data-key="ItemType"
|
data-key="ItemType"
|
||||||
url="ItemTypes"
|
url="ItemTypes"
|
||||||
:filter="filter"
|
:filter="filter"
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import VnCardBeta from 'components/common/VnCardBeta.vue';
|
import VnCard from 'components/common/VnCard.vue';
|
||||||
import OrderDescriptor from 'pages/Order/Card/OrderDescriptor.vue';
|
import OrderDescriptor from 'pages/Order/Card/OrderDescriptor.vue';
|
||||||
import filter from './OrderFilter.js';
|
import filter from './OrderFilter.js';
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<VnCardBeta
|
<VnCard
|
||||||
data-key="Order"
|
data-key="Order"
|
||||||
url="Orders"
|
url="Orders"
|
||||||
:filter="filter"
|
:filter="filter"
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import AgencyDescriptor from 'pages/Route/Agency/Card/AgencyDescriptor.vue';
|
import AgencyDescriptor from 'pages/Route/Agency/Card/AgencyDescriptor.vue';
|
||||||
import VnCardBeta from 'src/components/common/VnCardBeta.vue';
|
import VnCard from 'src/components/common/VnCard.vue';
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<VnCardBeta data-key="Agency" url="Agencies" :descriptor="AgencyDescriptor" />
|
<VnCard data-key="Agency" url="Agencies" :descriptor="AgencyDescriptor" />
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import RouteDescriptor from 'pages/Route/Card/RouteDescriptor.vue';
|
import RouteDescriptor from 'pages/Route/Card/RouteDescriptor.vue';
|
||||||
import VnCardBeta from 'src/components/common/VnCardBeta.vue';
|
import VnCard from 'src/components/common/VnCard.vue';
|
||||||
import filter from './RouteFilter.js';
|
import filter from './RouteFilter.js';
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<VnCardBeta
|
<VnCard
|
||||||
data-key="Route"
|
data-key="Route"
|
||||||
url="Routes"
|
url="Routes"
|
||||||
:filter="filter"
|
:filter="filter"
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import VnCardBeta from 'components/common/VnCardBeta.vue';
|
import VnCard from 'components/common/VnCard.vue';
|
||||||
import RoadmapDescriptor from 'pages/Route/Roadmap/RoadmapDescriptor.vue';
|
import RoadmapDescriptor from 'pages/Route/Roadmap/RoadmapDescriptor.vue';
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<VnCardBeta data-key="Roadmap" url="Roadmaps" :descriptor="RoadmapDescriptor" />
|
<VnCard data-key="Roadmap" url="Roadmaps" :descriptor="RoadmapDescriptor" />
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import VnCardBeta from 'components/common/VnCardBeta.vue';
|
import VnCard from 'components/common/VnCard.vue';
|
||||||
import VehicleDescriptor from './VehicleDescriptor.vue';
|
import VehicleDescriptor from './VehicleDescriptor.vue';
|
||||||
import VehicleFilter from '../VehicleFilter.js';
|
import VehicleFilter from '../VehicleFilter.js';
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<VnCardBeta
|
<VnCard
|
||||||
data-key="Vehicle"
|
data-key="Vehicle"
|
||||||
url="Vehicles"
|
url="Vehicles"
|
||||||
:filter="VehicleFilter"
|
:filter="VehicleFilter"
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import VnCardBeta from 'components/common/VnCardBeta.vue';
|
import VnCard from 'components/common/VnCard.vue';
|
||||||
import ShelvingDescriptor from 'pages/Shelving/Card/ShelvingDescriptor.vue';
|
import ShelvingDescriptor from 'pages/Shelving/Card/ShelvingDescriptor.vue';
|
||||||
import filter from './ShelvingFilter.js';
|
import filter from './ShelvingFilter.js';
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<VnCardBeta
|
<VnCard
|
||||||
data-key="Shelving"
|
data-key="Shelving"
|
||||||
url="Shelvings"
|
url="Shelvings"
|
||||||
:filter="filter"
|
:filter="filter"
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import VnCardBeta from 'components/common/VnCardBeta.vue';
|
import VnCard from 'components/common/VnCard.vue';
|
||||||
import ParkingDescriptor from 'pages/Shelving/Parking/Card/ParkingDescriptor.vue';
|
import ParkingDescriptor from 'pages/Shelving/Parking/Card/ParkingDescriptor.vue';
|
||||||
import filter from './ParkingFilter.js';
|
import filter from './ParkingFilter.js';
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<VnCardBeta
|
<VnCard
|
||||||
data-key="Parking"
|
data-key="Parking"
|
||||||
url="Parkings"
|
url="Parkings"
|
||||||
:filter="filter"
|
:filter="filter"
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import SupplierDescriptor from './SupplierDescriptor.vue';
|
import SupplierDescriptor from './SupplierDescriptor.vue';
|
||||||
import VnCardBeta from 'src/components/common/VnCardBeta.vue';
|
import VnCard from 'src/components/common/VnCard.vue';
|
||||||
import filter from './SupplierFilter.js';
|
import filter from './SupplierFilter.js';
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<VnCardBeta
|
<VnCard
|
||||||
data-key="Supplier"
|
data-key="Supplier"
|
||||||
url="Suppliers"
|
url="Suppliers"
|
||||||
:descriptor="SupplierDescriptor"
|
:descriptor="SupplierDescriptor"
|
||||||
|
|
|
@ -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"
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import VnCardBeta from 'components/common/VnCardBeta.vue';
|
import VnCard from 'components/common/VnCard.vue';
|
||||||
import TicketDescriptor from './TicketDescriptor.vue';
|
import TicketDescriptor from './TicketDescriptor.vue';
|
||||||
import filter from './TicketFilter.js';
|
import filter from './TicketFilter.js';
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<VnCardBeta
|
<VnCard
|
||||||
data-key="Ticket"
|
data-key="Ticket"
|
||||||
url="Tickets"
|
url="Tickets"
|
||||||
:descriptor="TicketDescriptor"
|
:descriptor="TicketDescriptor"
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import TravelDescriptor from './TravelDescriptor.vue';
|
import TravelDescriptor from './TravelDescriptor.vue';
|
||||||
import VnCardBeta from 'src/components/common/VnCardBeta.vue';
|
import VnCard from 'src/components/common/VnCard.vue';
|
||||||
import filter from './TravelFilter.js';
|
import filter from './TravelFilter.js';
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<VnCardBeta
|
<VnCard
|
||||||
data-key="Travel"
|
data-key="Travel"
|
||||||
url="Travels"
|
url="Travels"
|
||||||
:descriptor="TravelDescriptor"
|
:descriptor="TravelDescriptor"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import VnCardBeta from 'src/components/common/VnCardBeta.vue';
|
import VnCard from 'src/components/common/VnCard.vue';
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<VnCardBeta data-key="Wagon" url="Wagons" :descriptor="{}" />
|
<VnCard data-key="Wagon" url="Wagons" :descriptor="{}" />
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -96,6 +96,7 @@ async function setAdvancedSummary(data) {
|
||||||
option-label="name"
|
option-label="name"
|
||||||
option-value="code"
|
option-value="code"
|
||||||
v-model="data.maritalStatus"
|
v-model="data.maritalStatus"
|
||||||
|
data-cy="MaritalStatus"
|
||||||
/>
|
/>
|
||||||
</VnRow>
|
</VnRow>
|
||||||
|
|
||||||
|
@ -107,6 +108,7 @@ async function setAdvancedSummary(data) {
|
||||||
option-label="name"
|
option-label="name"
|
||||||
option-value="id"
|
option-value="id"
|
||||||
v-model="data.originCountryFk"
|
v-model="data.originCountryFk"
|
||||||
|
data-cy="country"
|
||||||
/>
|
/>
|
||||||
<VnSelect
|
<VnSelect
|
||||||
:label="t('Education level')"
|
:label="t('Education level')"
|
||||||
|
@ -132,7 +134,7 @@ async function setAdvancedSummary(data) {
|
||||||
<VnInputDate :label="t('seniority')" v-model="data.seniority" />
|
<VnInputDate :label="t('seniority')" v-model="data.seniority" />
|
||||||
</VnRow>
|
</VnRow>
|
||||||
<VnRow>
|
<VnRow>
|
||||||
<VnInput v-model="data.fi" :label="t('fi')" />
|
<VnInput v-model="data.fi" :label="t('fi')" data-cy="fi" />
|
||||||
<VnInputDate :label="t('birth')" v-model="data.birth" />
|
<VnInputDate :label="t('birth')" v-model="data.birth" />
|
||||||
</VnRow>
|
</VnRow>
|
||||||
<VnRow wrap>
|
<VnRow wrap>
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import WorkerDescriptor from './WorkerDescriptor.vue';
|
import WorkerDescriptor from './WorkerDescriptor.vue';
|
||||||
import VnCardBeta from 'src/components/common/VnCardBeta.vue';
|
import VnCard from 'src/components/common/VnCard.vue';
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<VnCardBeta
|
<VnCard
|
||||||
data-key="Worker"
|
data-key="Worker"
|
||||||
url="Workers/summary"
|
url="Workers/summary"
|
||||||
:id-in-where="true"
|
:id-in-where="true"
|
||||||
|
|
|
@ -98,12 +98,14 @@ watch(
|
||||||
<VnInput
|
<VnInput
|
||||||
:label="t('worker.operator.numberOfWagons')"
|
:label="t('worker.operator.numberOfWagons')"
|
||||||
v-model="row.numberOfWagons"
|
v-model="row.numberOfWagons"
|
||||||
|
data-cy="numberOfWagons"
|
||||||
/>
|
/>
|
||||||
<VnSelect
|
<VnSelect
|
||||||
:label="t('worker.operator.train')"
|
:label="t('worker.operator.train')"
|
||||||
:options="trainsData"
|
:options="trainsData"
|
||||||
hide-selected
|
hide-selected
|
||||||
v-model="row.trainFk"
|
v-model="row.trainFk"
|
||||||
|
data-cy="train"
|
||||||
:required="true"
|
:required="true"
|
||||||
/>
|
/>
|
||||||
</VnRow>
|
</VnRow>
|
||||||
|
@ -116,6 +118,7 @@ watch(
|
||||||
option-value="code"
|
option-value="code"
|
||||||
v-model="row.itemPackingTypeFk"
|
v-model="row.itemPackingTypeFk"
|
||||||
:required="true"
|
:required="true"
|
||||||
|
data-cy="itemPackingType"
|
||||||
/>
|
/>
|
||||||
<VnSelect
|
<VnSelect
|
||||||
:label="t('worker.operator.warehouse')"
|
:label="t('worker.operator.warehouse')"
|
||||||
|
@ -123,6 +126,7 @@ watch(
|
||||||
hide-selected
|
hide-selected
|
||||||
v-model="row.warehouseFk"
|
v-model="row.warehouseFk"
|
||||||
:required="true"
|
:required="true"
|
||||||
|
data-cy="warehouse"
|
||||||
/>
|
/>
|
||||||
</VnRow>
|
</VnRow>
|
||||||
<VnRow>
|
<VnRow>
|
||||||
|
@ -132,6 +136,7 @@ watch(
|
||||||
hide-selected
|
hide-selected
|
||||||
option-label="description"
|
option-label="description"
|
||||||
v-model="row.sectorFk"
|
v-model="row.sectorFk"
|
||||||
|
data-cy="sector"
|
||||||
/>
|
/>
|
||||||
<VnSelect
|
<VnSelect
|
||||||
:label="t('worker.operator.labeler')"
|
:label="t('worker.operator.labeler')"
|
||||||
|
@ -139,6 +144,7 @@ watch(
|
||||||
hide-selected
|
hide-selected
|
||||||
option-label="name"
|
option-label="name"
|
||||||
v-model="row.labelerFk"
|
v-model="row.labelerFk"
|
||||||
|
data-cy="labeler"
|
||||||
>
|
>
|
||||||
<template #option="scope">
|
<template #option="scope">
|
||||||
<QItem v-bind="scope.itemProps">
|
<QItem v-bind="scope.itemProps">
|
||||||
|
@ -160,11 +166,13 @@ watch(
|
||||||
:label="t('worker.operator.linesLimit')"
|
:label="t('worker.operator.linesLimit')"
|
||||||
v-model="row.linesLimit"
|
v-model="row.linesLimit"
|
||||||
lazy-rules
|
lazy-rules
|
||||||
|
data-cy="linesLimit"
|
||||||
/>
|
/>
|
||||||
<VnInput
|
<VnInput
|
||||||
:label="t('worker.operator.volumeLimit')"
|
:label="t('worker.operator.volumeLimit')"
|
||||||
v-model="row.volumeLimit"
|
v-model="row.volumeLimit"
|
||||||
lazy-rules
|
lazy-rules
|
||||||
|
data-cy="volumeLimit"
|
||||||
/>
|
/>
|
||||||
</VnRow>
|
</VnRow>
|
||||||
<VnRow>
|
<VnRow>
|
||||||
|
@ -172,6 +180,7 @@ watch(
|
||||||
:label="t('worker.operator.sizeLimit')"
|
:label="t('worker.operator.sizeLimit')"
|
||||||
v-model="row.sizeLimit"
|
v-model="row.sizeLimit"
|
||||||
lazy-rules
|
lazy-rules
|
||||||
|
data-cy="sizeLimit"
|
||||||
/>
|
/>
|
||||||
<VnInput
|
<VnInput
|
||||||
:label="t('worker.operator.isOnReservationMode')"
|
:label="t('worker.operator.isOnReservationMode')"
|
||||||
|
|
|
@ -68,8 +68,14 @@ const deleteRelative = async (id) => {
|
||||||
:label="t('familySituation')"
|
:label="t('familySituation')"
|
||||||
clearable
|
clearable
|
||||||
v-model="data.familySituation"
|
v-model="data.familySituation"
|
||||||
|
data-cy="familySituation"
|
||||||
|
/>
|
||||||
|
<VnInput
|
||||||
|
:label="t('spouseNif')"
|
||||||
|
clearable
|
||||||
|
v-model="data.spouseNif"
|
||||||
|
data-cy="spouseNif"
|
||||||
/>
|
/>
|
||||||
<VnInput :label="t('spouseNif')" clearable v-model="data.spouseNif" />
|
|
||||||
</VnRow>
|
</VnRow>
|
||||||
<VnRow>
|
<VnRow>
|
||||||
<VnSelect
|
<VnSelect
|
||||||
|
@ -93,11 +99,13 @@ const deleteRelative = async (id) => {
|
||||||
clearable
|
clearable
|
||||||
v-model="data.childPension"
|
v-model="data.childPension"
|
||||||
:label="t(`childPension`)"
|
:label="t(`childPension`)"
|
||||||
|
data-cy="childPension"
|
||||||
/>
|
/>
|
||||||
<VnInput
|
<VnInput
|
||||||
clearable
|
clearable
|
||||||
v-model="data.spousePension"
|
v-model="data.spousePension"
|
||||||
:label="t(`spousePension`)"
|
:label="t(`spousePension`)"
|
||||||
|
data-cy="spousePension"
|
||||||
/>
|
/>
|
||||||
</VnRow>
|
</VnRow>
|
||||||
<VnRow wrap>
|
<VnRow wrap>
|
||||||
|
@ -190,12 +198,14 @@ const deleteRelative = async (id) => {
|
||||||
type="number"
|
type="number"
|
||||||
v-model="row.birthed"
|
v-model="row.birthed"
|
||||||
:label="t(`birthed`)"
|
:label="t(`birthed`)"
|
||||||
|
data-cy="birthed"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<VnInput
|
<VnInput
|
||||||
type="number"
|
type="number"
|
||||||
v-model="row.adoptionYear"
|
v-model="row.adoptionYear"
|
||||||
:label="t(`adoptionYear`)"
|
:label="t(`adoptionYear`)"
|
||||||
|
data-cy="adoptionYear"
|
||||||
/>
|
/>
|
||||||
<QCheckbox
|
<QCheckbox
|
||||||
v-model="row.isDependend"
|
v-model="row.isDependend"
|
||||||
|
|
|
@ -53,7 +53,7 @@ const title = computed(() => (isEditMode.value ? t('Edit entry') : t('Add time')
|
||||||
const urlCreate = computed(() =>
|
const urlCreate = computed(() =>
|
||||||
isEditMode.value
|
isEditMode.value
|
||||||
? `WorkerTimeControls/${$props.entryId}/updateTimeEntry`
|
? `WorkerTimeControls/${$props.entryId}/updateTimeEntry`
|
||||||
: `WorkerTimeControls/${route.params.id}/addTimeEntry`
|
: `WorkerTimeControls/${route.params.id}/addTimeEntry`,
|
||||||
);
|
);
|
||||||
|
|
||||||
onBeforeMount(() => {
|
onBeforeMount(() => {
|
||||||
|
@ -83,6 +83,7 @@ onBeforeMount(() => {
|
||||||
autofocus
|
autofocus
|
||||||
:required="true"
|
:required="true"
|
||||||
:is-clearable="false"
|
:is-clearable="false"
|
||||||
|
data-cy="entryHour"
|
||||||
/>
|
/>
|
||||||
<VnSelect
|
<VnSelect
|
||||||
:label="t('Type')"
|
:label="t('Type')"
|
||||||
|
@ -91,6 +92,7 @@ onBeforeMount(() => {
|
||||||
option-value="code"
|
option-value="code"
|
||||||
option-label="description"
|
option-label="description"
|
||||||
hide-selected
|
hide-selected
|
||||||
|
data-cy="entryType"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
</FormModelPopup>
|
</FormModelPopup>
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import VnCardBeta from 'components/common/VnCardBeta.vue';
|
import VnCard from 'components/common/VnCard.vue';
|
||||||
import DepartmentDescriptor from 'pages/Worker/Department/Card/DepartmentDescriptor.vue';
|
import DepartmentDescriptor from 'pages/Worker/Department/Card/DepartmentDescriptor.vue';
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<VnCardBeta
|
<VnCard
|
||||||
class="q-pa-md column items-center"
|
class="q-pa-md column items-center"
|
||||||
v-bind="{ ...$attrs }"
|
v-bind="{ ...$attrs }"
|
||||||
data-key="Department"
|
data-key="Department"
|
||||||
|
|
|
@ -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,7 +1,7 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import VnCardBeta from 'src/components/common/VnCardBeta.vue';
|
import VnCard from 'src/components/common/VnCard.vue';
|
||||||
import ZoneDescriptor from './ZoneDescriptor.vue';
|
import ZoneDescriptor from './ZoneDescriptor.vue';
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<VnCardBeta data-key="Zone" url="Zones" :descriptor="ZoneDescriptor" />
|
<VnCard data-key="Zone" url="Zones" :descriptor="ZoneDescriptor" />
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -8,4 +8,10 @@ describe('Client balance', () => {
|
||||||
it('Should load layout', () => {
|
it('Should load layout', () => {
|
||||||
cy.get('.q-page').should('be.visible');
|
cy.get('.q-page').should('be.visible');
|
||||||
});
|
});
|
||||||
|
it('Should create a mandate', () => {
|
||||||
|
cy.get('.q-page-sticky > div > .q-btn').click();
|
||||||
|
cy.dataCy('paymentBank').type({ arroyDown });
|
||||||
|
cy.dataCy('paymentAmount').type('100');
|
||||||
|
cy.saveCard();
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -34,8 +34,8 @@ describe('OrderList', () => {
|
||||||
cy.dataCy('Customer ID_input').type('1101{enter}');
|
cy.dataCy('Customer ID_input').type('1101{enter}');
|
||||||
cy.dataCy('vnTableCreateBtn').click();
|
cy.dataCy('vnTableCreateBtn').click();
|
||||||
cy.dataCy('landedDate').find('input').type('06/01/2001');
|
cy.dataCy('landedDate').find('input').type('06/01/2001');
|
||||||
cy.get(agencyCreateSelect).click();
|
cy.selectOption(agencyCreateSelect, 1);
|
||||||
cy.get('.q-menu > div> .q-item:nth-child(1)').click();
|
|
||||||
cy.intercept('GET', /\/api\/Orders\/\d/).as('orderSale');
|
cy.intercept('GET', /\/api\/Orders\/\d/).as('orderSale');
|
||||||
cy.get('[data-cy="FormModelPopup_save"] > .q-btn__content > .block').click();
|
cy.get('[data-cy="FormModelPopup_save"] > .q-btn__content > .block').click();
|
||||||
cy.wait('@orderSale');
|
cy.wait('@orderSale');
|
||||||
|
@ -60,8 +60,8 @@ describe('OrderList', () => {
|
||||||
cy.get(clientCreateSelect).should('have.value', 'Bruce Wayne');
|
cy.get(clientCreateSelect).should('have.value', 'Bruce Wayne');
|
||||||
cy.get(addressCreateSelect).should('have.value', 'Bruce Wayne');
|
cy.get(addressCreateSelect).should('have.value', 'Bruce Wayne');
|
||||||
cy.dataCy('landedDate').find('input').type('06/01/2001');
|
cy.dataCy('landedDate').find('input').type('06/01/2001');
|
||||||
cy.get(agencyCreateSelect).click();
|
cy.selectOption(agencyCreateSelect, 1);
|
||||||
cy.get('.q-menu > div> .q-item:nth-child(1)').click();
|
|
||||||
cy.intercept('GET', /\/api\/Orders\/\d/).as('orderSale');
|
cy.intercept('GET', /\/api\/Orders\/\d/).as('orderSale');
|
||||||
cy.get('[data-cy="FormModelPopup_save"] > .q-btn__content > .block').click();
|
cy.get('[data-cy="FormModelPopup_save"] > .q-btn__content > .block').click();
|
||||||
cy.wait('@orderSale');
|
cy.wait('@orderSale');
|
||||||
|
|
|
@ -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}');
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,15 @@
|
||||||
|
describe('WorkerBasicData', () => {
|
||||||
|
beforeEach(() => {
|
||||||
|
cy.viewport(1280, 720);
|
||||||
|
cy.login('developer');
|
||||||
|
cy.visit('/#/worker/1107/basic-data');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should modify worker summary', () => {
|
||||||
|
cy.dataCy('MaritalStatus').type('Married');
|
||||||
|
cy.dataCy('fi').type('42572374H');
|
||||||
|
cy.dataCy('country').type('Alemania');
|
||||||
|
cy.saveCard();
|
||||||
|
cy.checkNotification('Data saved');
|
||||||
|
});
|
||||||
|
});
|
|
@ -0,0 +1,34 @@
|
||||||
|
describe('WorkerBusiness', () => {
|
||||||
|
const saveBtn = '.q-mt-lg > .q-btn--standard';
|
||||||
|
const contributionCode = `Representantes de comercio`;
|
||||||
|
const contractType = `INDEFINIDO A TIEMPO COMPLETO`;
|
||||||
|
|
||||||
|
const Business = {
|
||||||
|
'Start Date': { val: '26-12-2002', type: 'date' },
|
||||||
|
Company: { val: `VNL`, type: 'select' },
|
||||||
|
Department: { val: `RECICLAJE`, type: 'select' },
|
||||||
|
'Professional Category': { val: `employee`, type: 'select' },
|
||||||
|
'Work Calendar': { val: `General schedule`, type: 'select' },
|
||||||
|
'Work Center': { val: `Silla`, type: 'select' },
|
||||||
|
'Contract Category': { val: `INFORMATICA`, type: 'select' },
|
||||||
|
'Contribution Code': { val: contributionCode, type: 'select' },
|
||||||
|
Rate: { val: `5` },
|
||||||
|
'Contract Type': { val: contractType, type: 'select' },
|
||||||
|
'Transport Workers Salary': { val: `1000` },
|
||||||
|
};
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
cy.viewport(1280, 720);
|
||||||
|
cy.login('hr');
|
||||||
|
cy.visit('/#/worker/1107/business');
|
||||||
|
cy.addCard();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should create a business', () => {
|
||||||
|
cy.fillInForm({
|
||||||
|
...Business,
|
||||||
|
});
|
||||||
|
cy.get(saveBtn).click();
|
||||||
|
cy.checkNotification('Data created');
|
||||||
|
});
|
||||||
|
});
|
|
@ -0,0 +1,23 @@
|
||||||
|
/// <reference types="cypress" />
|
||||||
|
describe('WorkerMutual', () => {
|
||||||
|
const userId = 1106;
|
||||||
|
const saveBtn = '.q-mt-lg > .q-btn--standard';
|
||||||
|
const medicalReview = {
|
||||||
|
Date: { val: '01-01-2001', type: 'date' },
|
||||||
|
'Formation Center': { val: '1', type: 'select' },
|
||||||
|
Invoice: { val: '24532' },
|
||||||
|
Amount: { val: '540' },
|
||||||
|
};
|
||||||
|
beforeEach(() => {
|
||||||
|
cy.viewport(1280, 720);
|
||||||
|
cy.login('developer');
|
||||||
|
cy.visit(`/#/worker/${userId}/medical`);
|
||||||
|
cy.addCard();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should create a medical Review', () => {
|
||||||
|
cy.fillInForm(medicalReview);
|
||||||
|
cy.get(saveBtn).click();
|
||||||
|
cy.checkNotification('Data created');
|
||||||
|
});
|
||||||
|
});
|
|
@ -0,0 +1,13 @@
|
||||||
|
/// <reference types="cypress" />
|
||||||
|
describe('WorkerNotes', () => {
|
||||||
|
const userId = 1106;
|
||||||
|
beforeEach(() => {
|
||||||
|
cy.viewport(1280, 720);
|
||||||
|
cy.login('developer');
|
||||||
|
cy.visit(`/#/worker/${userId}/notes`);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('Should load layout', () => {
|
||||||
|
cy.get('.q-card').should('be.visible');
|
||||||
|
});
|
||||||
|
});
|
|
@ -0,0 +1,19 @@
|
||||||
|
/// <reference types="cypress" />
|
||||||
|
describe('WorkerOperator', () => {
|
||||||
|
const userId = 1106;
|
||||||
|
beforeEach(() => {
|
||||||
|
cy.viewport(1280, 720);
|
||||||
|
cy.login('hr');
|
||||||
|
cy.visit(`/#/worker/${userId}/operator`);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should fill the operator form', () => {
|
||||||
|
cy.dataCy('numberOfWagons').type('4');
|
||||||
|
cy.dataCy('linesLimit').type('6');
|
||||||
|
cy.dataCy('volumeLimit').type('3');
|
||||||
|
cy.dataCy('sizeLimit').type('3');
|
||||||
|
cy.saveCard();
|
||||||
|
|
||||||
|
cy.checkNotification('Data saved');
|
||||||
|
});
|
||||||
|
});
|
|
@ -1,19 +1,5 @@
|
||||||
describe('WorkerPit', () => {
|
describe('WorkerPit', () => {
|
||||||
const familySituationInput = '[data-cy="Family Situation_input"]';
|
|
||||||
const familySituation = '1';
|
|
||||||
const childPensionInput = '[data-cy="Child Pension_input"]';
|
|
||||||
const childPension = '120';
|
|
||||||
const spouseNifInput = '[data-cy="Spouse Pension_input"]';
|
|
||||||
const spouseNif = '65117125P';
|
|
||||||
const spousePensionInput = '[data-cy="Spouse Pension_input"]';
|
|
||||||
const spousePension = '120';
|
|
||||||
const addRelative = '[data-cy="addRelative"]';
|
const addRelative = '[data-cy="addRelative"]';
|
||||||
const isDescendantSelect = '[data-cy="Descendant/Ascendant"]';
|
|
||||||
const Descendant = 'Descendiente';
|
|
||||||
const birthedInput = '[data-cy="Birth Year_input"]';
|
|
||||||
const birthed = '2002';
|
|
||||||
const adoptionYearInput = '[data-cy="Adoption Year_input"]';
|
|
||||||
const adoptionYear = '2004';
|
|
||||||
const saveRelative = '[data-cy="workerPitRelativeSaveBtn"]';
|
const saveRelative = '[data-cy="workerPitRelativeSaveBtn"]';
|
||||||
const savePIT = '#st-actions > .q-btn-group > .q-btn--standard';
|
const savePIT = '#st-actions > .q-btn-group > .q-btn--standard';
|
||||||
|
|
||||||
|
@ -24,15 +10,15 @@ describe('WorkerPit', () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
it('complete PIT', () => {
|
it('complete PIT', () => {
|
||||||
cy.get(familySituationInput).type(familySituation);
|
cy.dataCy('familySituation').type('1');
|
||||||
cy.get(childPensionInput).type(childPension);
|
cy.dataCy('childPension').type('120');
|
||||||
cy.get(spouseNifInput).type(spouseNif);
|
cy.dataCy('spouseNif').type('65117125P');
|
||||||
cy.get(spousePensionInput).type(spousePension);
|
cy.dataCy('spousePension').type('120');
|
||||||
cy.get(savePIT).click();
|
cy.get(savePIT).click();
|
||||||
cy.get(addRelative).click();
|
cy.get(addRelative).click();
|
||||||
cy.get(isDescendantSelect).type(Descendant);
|
cy.dataCy('Descendant/Ascendant').type('Descendiente');
|
||||||
cy.get(birthedInput).type(birthed);
|
cy.dataCy('birthed').type('2002');
|
||||||
cy.get(adoptionYearInput).type(adoptionYear);
|
cy.dataCy('adoptionYear').type('2004');
|
||||||
cy.get(saveRelative).click();
|
cy.get(saveRelative).click();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
describe('WorkerSummary', () => {
|
describe('WorkerSummary', () => {
|
||||||
|
const departmentDescriptor = ':nth-child(1) > :nth-child(3) > .value > .link';
|
||||||
|
const roleDescriptor = ':nth-child(3) > :nth-child(4) > .value > .link';
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
cy.viewport(1280, 720);
|
cy.viewport(1280, 720);
|
||||||
cy.login('developer');
|
cy.login('developer');
|
||||||
|
@ -10,7 +12,17 @@ describe('WorkerSummary', () => {
|
||||||
cy.get('.summaryHeader > div').should('have.text', '19 - salesboss salesboss');
|
cy.get('.summaryHeader > div').should('have.text', '19 - salesboss salesboss');
|
||||||
cy.get(':nth-child(1) > :nth-child(2) > .value > span').should(
|
cy.get(':nth-child(1) > :nth-child(2) > .value > span').should(
|
||||||
'have.text',
|
'have.text',
|
||||||
'salesBossNick'
|
'salesBossNick',
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('should try descriptors', () => {
|
||||||
|
cy.waitForElement('.summaryHeader');
|
||||||
|
cy.get(departmentDescriptor).click();
|
||||||
|
cy.get('.descriptor').should('be.visible');
|
||||||
|
cy.get('.q-item > .q-item__label').should('include.text', '43');
|
||||||
|
cy.get(roleDescriptor).click();
|
||||||
|
cy.get('.descriptor').should('be.visible');
|
||||||
|
cy.get('.q-item > .q-item__label').should('include.text', '19');
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue