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