diff --git a/src/pages/Worker/Card/WorkerTimeControl.vue b/src/pages/Worker/Card/WorkerTimeControl.vue index 0870c78b7..65fbf4b43 100644 --- a/src/pages/Worker/Card/WorkerTimeControl.vue +++ b/src/pages/Worker/Card/WorkerTimeControl.vue @@ -345,7 +345,7 @@ const getMailStates = async (date) => { const prevMonth = month == 1 ? 12 : month - 1; const params = { month, - year: selectedDateYear.value, + year: date.getFullYear(), }; const curMonthStates = (await axios.get(url, { params })).data; diff --git a/src/pages/Worker/Card/WorkerTimeControlCalendar.vue b/src/pages/Worker/Card/WorkerTimeControlCalendar.vue index 2717a71f4..46ae4b698 100644 --- a/src/pages/Worker/Card/WorkerTimeControlCalendar.vue +++ b/src/pages/Worker/Card/WorkerTimeControlCalendar.vue @@ -102,8 +102,7 @@ const getWorkWeekElements = () => { }; const paintWorkWeeks = async () => { - for (var i = 0; i < workWeeksElements.value.length; i++) { - const element = workWeeksElements.value[i]; + for (const element of workWeeksElements.value) { const week = Number(element.innerHTML); const weekState = workerTimeControlMailsMap.value.get(week); const { className, title } = stateClasses[weekState] || {};