fix: #8417 fixed claimPhoto e2e test #1512
|
@ -26,6 +26,7 @@ node {
|
||||||
// https://www.jenkins.io/doc/book/pipeline/jenkinsfile/#using-environment-variables
|
// https://www.jenkins.io/doc/book/pipeline/jenkinsfile/#using-environment-variables
|
||||||
echo "NODE_NAME: ${env.NODE_NAME}"
|
echo "NODE_NAME: ${env.NODE_NAME}"
|
||||||
echo "WORKSPACE: ${env.WORKSPACE}"
|
echo "WORKSPACE: ${env.WORKSPACE}"
|
||||||
|
echo "CHANGE_TARGET: ${env.CHANGE_TARGET}"
|
||||||
|
|
||||||
configFileProvider([
|
configFileProvider([
|
||||||
configFile(fileId: 'salix-front.properties',
|
configFile(fileId: 'salix-front.properties',
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "salix-front",
|
"name": "salix-front",
|
||||||
"version": "25.10.0",
|
"version": "25.12.0",
|
||||||
"description": "Salix frontend",
|
"description": "Salix frontend",
|
||||||
"productName": "Salix",
|
"productName": "Salix",
|
||||||
"author": "Verdnatura",
|
"author": "Verdnatura",
|
||||||
|
@ -71,4 +71,4 @@
|
||||||
"vite": "^6.0.11",
|
"vite": "^6.0.11",
|
||||||
"vitest": "^0.31.1"
|
"vitest": "^0.31.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -343,19 +343,29 @@ const updateData = async () => {
|
||||||
|
|
||||||
const getMailStates = async (date) => {
|
const getMailStates = async (date) => {
|
||||||
const url = `WorkerTimeControls/${route.params.id}/getMailStates`;
|
const url = `WorkerTimeControls/${route.params.id}/getMailStates`;
|
||||||
|
const year = date.getFullYear();
|
||||||
const month = date.getMonth() + 1;
|
const month = date.getMonth() + 1;
|
||||||
const prevMonth = month == 1 ? 12 : month - 1;
|
|
||||||
const params = {
|
const getMonthStates = async (month, year) => {
|
||||||
month,
|
return (await axios.get(url, { params: { month, year } })).data;
|
||||||
year: date.getFullYear(),
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const curMonthStates = (await axios.get(url, { params })).data;
|
const curMonthStates = await getMonthStates(month, year);
|
||||||
const prevMonthStates = (
|
|
||||||
await axios.get(url, { params: { ...params, month: prevMonth } })
|
|
||||||
).data;
|
|
||||||
|
|
||||||
workerTimeControlMails.value = curMonthStates.concat(prevMonthStates);
|
const prevMonthStates = await getMonthStates(
|
||||||
|
month === 1 ? 12 : month - 1,
|
||||||
|
month === 1 ? year - 1 : year,
|
||||||
|
);
|
||||||
|
|
||||||
|
const postMonthStates = await getMonthStates(
|
||||||
|
month === 12 ? 1 : month + 1,
|
||||||
|
month === 12 ? year + 1 : year,
|
||||||
|
);
|
||||||
|
workerTimeControlMails.value = [
|
||||||
|
...curMonthStates,
|
||||||
|
...prevMonthStates,
|
||||||
|
...postMonthStates,
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
const showWorkerTimeForm = (propValue, formType) => {
|
const showWorkerTimeForm = (propValue, formType) => {
|
||||||
|
|
|
@ -9,22 +9,22 @@ import VnInputTime from 'src/components/common/VnInputTime.vue';
|
||||||
import VnSelect from 'src/components/common/VnSelect.vue';
|
import VnSelect from 'src/components/common/VnSelect.vue';
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const validAddresses = ref([]);
|
|
||||||
const addresses = ref([]);
|
const addresses = ref([]);
|
||||||
|
|
||||||
const setFilteredAddresses = (data) => {
|
const setFilteredAddresses = (data) => {
|
||||||
const validIds = new Set(validAddresses.value.map((item) => item.addressFk));
|
addresses.value = data.map(({ address }) => address);
|
||||||
addresses.value = data.filter((address) => validIds.has(address.id));
|
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<FetchData
|
<FetchData
|
||||||
url="RoadmapAddresses"
|
url="RoadmapAddresses"
|
||||||
|
:filter="{
|
||||||
|
include: { relation: 'address' },
|
||||||
|
}"
|
||||||
auto-load
|
auto-load
|
||||||
@on-fetch="(data) => (validAddresses = data)"
|
@on-fetch="setFilteredAddresses"
|
||||||
/>
|
/>
|
||||||
<FetchData url="Addresses" auto-load @on-fetch="setFilteredAddresses" />
|
|
||||||
<FormModel auto-load model="Zone">
|
<FormModel auto-load model="Zone">
|
||||||
<template #form="{ data, validate }">
|
<template #form="{ data, validate }">
|
||||||
<VnRow>
|
<VnRow>
|
||||||
|
@ -125,7 +125,6 @@ const setFilteredAddresses = (data) => {
|
||||||
map-options
|
map-options
|
||||||
:rules="validate('data.addressFk')"
|
:rules="validate('data.addressFk')"
|
||||||
:filter-options="['id']"
|
:filter-options="['id']"
|
||||||
:where="filterWhere"
|
|
||||||
/>
|
/>
|
||||||
</VnRow>
|
</VnRow>
|
||||||
<VnRow>
|
<VnRow>
|
||||||
|
|
Loading…
Reference in New Issue