8179-testToMaster #909

Merged
alexm merged 448 commits from 8179-testToMaster into master 2024-11-12 07:01:12 +00:00
1 changed files with 11 additions and 6 deletions
Showing only changes of commit f809e0fb31 - Show all commits

View File

@ -326,16 +326,21 @@ const updateData = async () => {
};
const getMailStates = async (date) => {
const url = `WorkerTimeControls/${route.params.id}/getMailStates`;
const month = date.getMonth() + 1;
const prevMonth = month == 1 ? 12 : month - 1;
let prevMonthStates = [];
const params = {
month: date.getMonth() + 1,
month,
year: date.getFullYear(),
};
const { data } = await axios.get(
`WorkerTimeControls/${route.params.id}/getMailStates`,
{ params }
);
workerTimeControlMails.value = data;
const curMonthStates = (await axios.get(url, { params })).data;
prevMonthStates = (await axios.get(url, { params: { ...params, month: prevMonth } }))
.data;
workerTimeControlMails.value = curMonthStates.concat(prevMonthStates);
};
const showWorkerTimeForm = (propValue, formType) => {