7489-testToMaster #408

Merged
alexm merged 292 commits from 7489-testToMaster into master 2024-05-28 05:33:17 +00:00
1 changed files with 3 additions and 7 deletions
Showing only changes of commit ac0993aa11 - Show all commits

View File

@ -16,6 +16,7 @@ const stateStore = useStateStore();
const route = useRoute();
const { t } = useI18n();
const workerIsFreelance = ref();
const WorkerFreelanceRef = ref();
const workerCalendarFilterRef = ref(null);
const workerCalendarRef = ref(null);
const absenceType = ref(null);
@ -34,12 +35,6 @@ const onFetchActiveContract = (data) => {
hasWorkCenter.value = Boolean(data?.workCenterFk);
};
const isFreelance = async () => {
const { data } = await axios.get(`Workers/${route.params.id}`);
workerIsFreelance.value = data.isFreelance;
};
const addEvent = (day, newEvent, isFestive = false) => {
const timestamp = new Date(day).getTime();
let event = eventsMap.value[timestamp];
@ -136,7 +131,7 @@ const refreshData = () => {
updateYearHolidays();
updateContractHolidays();
getAbsences();
isFreelance();
WorkerFreelanceRef.value.fetch();
};
const onDeletedEvent = (timestamp) => {
@ -172,6 +167,7 @@ watch([year, businessFk], () => refreshData());
<FetchData
:url="`Workers/${route.params.id}`"
@on-fetch="(data) => (workerIsFreelance = data.isFreelance)"
ref="WorkerFreelanceRef"
auto-load
/>
<template v-if="stateStore.isHeaderMounted()">