forked from verdnatura/salix-front
fix: refs #7323 show prev month week color
This commit is contained in:
parent
7bbad14f53
commit
f809e0fb31
|
@ -326,16 +326,21 @@ const updateData = async () => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const getMailStates = async (date) => {
|
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 = {
|
const params = {
|
||||||
month: date.getMonth() + 1,
|
month,
|
||||||
year: date.getFullYear(),
|
year: date.getFullYear(),
|
||||||
};
|
};
|
||||||
|
|
||||||
const { data } = await axios.get(
|
const curMonthStates = (await axios.get(url, { params })).data;
|
||||||
`WorkerTimeControls/${route.params.id}/getMailStates`,
|
prevMonthStates = (await axios.get(url, { params: { ...params, month: prevMonth } }))
|
||||||
{ params }
|
.data;
|
||||||
);
|
|
||||||
workerTimeControlMails.value = data;
|
workerTimeControlMails.value = curMonthStates.concat(prevMonthStates);
|
||||||
};
|
};
|
||||||
|
|
||||||
const showWorkerTimeForm = (propValue, formType) => {
|
const showWorkerTimeForm = (propValue, formType) => {
|
||||||
|
|
Loading…
Reference in New Issue