diff --git a/src/assets/info-pannes.png b/src/assets/info-pannes.png
new file mode 100644
index 0000000..fcfe362
Binary files /dev/null and b/src/assets/info-pannes.png differ
diff --git a/src/i18n/en-ca/index.ts b/src/i18n/en-ca/index.ts
index 8c41cd3..6f9234d 100644
--- a/src/i18n/en-ca/index.ts
+++ b/src/i18n/en-ca/index.ts
@@ -245,6 +245,9 @@ export default {
page_header: "Timesheet",
week: "week",
total_hours: "total hours: ",
+ total_expenses: "total expenses: ",
+ vacation_available: "vacation time available: ",
+ sick_available: "sick time available: ",
current_shifts: "shifts worked",
apply_preset: "auto-fill",
apply_preset_day: "Apply schedule to day",
diff --git a/src/i18n/fr-ca/index.ts b/src/i18n/fr-ca/index.ts
index 3dc02c8..0ef60ca 100644
--- a/src/i18n/fr-ca/index.ts
+++ b/src/i18n/fr-ca/index.ts
@@ -246,6 +246,9 @@ export default {
page_header: "Carte de temps",
week: "semaine",
total_hours: "heures totales: ",
+ total_expenses: "dépenses totales: ",
+ vacation_available: "vacances disponibles: ",
+ sick_available: "congés maladie disponible: ",
current_shifts: "quarts entrées",
apply_preset: "auto-remplir",
apply_preset_day: "Appliquer horaire pour la journée",
diff --git a/src/modules/dashboard/components/employee/shortcut-card.vue b/src/modules/dashboard/components/employee/shortcut-card.vue
index a2db0b6..90ee54e 100644
--- a/src/modules/dashboard/components/employee/shortcut-card.vue
+++ b/src/modules/dashboard/components/employee/shortcut-card.vue
@@ -16,7 +16,7 @@
{
const options = schedule_preset_store.schedule_presets.map(preset => { return { label: preset.name, value: preset.id } });
- options.push({ label: '', value: -1 });
+ options.push({ label: 'Aucun', value: -1 });
return options;
};
diff --git a/src/modules/employee-list/components/add-modify-dialog.vue b/src/modules/employee-list/components/add-modify-dialog.vue
index 5fb2340..df83a8d 100644
--- a/src/modules/employee-list/components/add-modify-dialog.vue
+++ b/src/modules/employee-list/components/add-modify-dialog.vue
@@ -58,21 +58,21 @@
name="form"
icon="las la-id-card"
:label="$q.screen.lt.sm ? '' : $t('employee_management.details_label')"
- class="rounded-25 q-ma-xs"
+ class="rounded-25 q-ma-xs bg-dark"
style="border: 2px solid var(--q-accent);"
/>
diff --git a/src/modules/employee-list/components/employee-list-table.vue b/src/modules/employee-list/components/employee-list-table.vue
index b612718..5af2c2a 100644
--- a/src/modules/employee-list/components/employee-list-table.vue
+++ b/src/modules/employee-list/components/employee-list-table.vue
@@ -184,7 +184,7 @@
:row="props.row"
:index="props.rowIndex"
:is-management="is_management"
- @on-profile-click="is_management ? employee_store.openAddModifyDialog : ''"
+ @on-profile-click="email => is_management ? employee_store.openAddModifyDialog(email) : ''"
/>
diff --git a/src/modules/employee-list/components/schedule-presets-dialog-row.vue b/src/modules/employee-list/components/schedule-presets-dialog-row.vue
index f4270b7..a9db807 100644
--- a/src/modules/employee-list/components/schedule-presets-dialog-row.vue
+++ b/src/modules/employee-list/components/schedule-presets-dialog-row.vue
@@ -72,7 +72,7 @@
v-model="shift.is_remote"
dense
keep-color
- size="3em"
+ size="2.5em"
color="accent"
icon="las la-building"
checked-icon="las la-laptop"
diff --git a/src/modules/timesheet-approval/components/details-dialog.vue b/src/modules/timesheet-approval/components/details-dialog.vue
index 5dadf21..abd6e44 100644
--- a/src/modules/timesheet-approval/components/details-dialog.vue
+++ b/src/modules/timesheet-approval/components/details-dialog.vue
@@ -37,7 +37,7 @@
@@ -50,8 +50,8 @@
-
diff --git a/src/modules/timesheets/components/shift-list-day-row.vue b/src/modules/timesheets/components/shift-list-day-row.vue
index b59a86e..75ec4d8 100644
--- a/src/modules/timesheets/components/shift-list-day-row.vue
+++ b/src/modules/timesheets/components/shift-list-day-row.vue
@@ -151,7 +151,7 @@
-
+
+ import { useAuthStore } from 'src/stores/auth-store';
+import { getHoursMinutesStringFromHoursFloat } from 'src/utils/date-and-time-utils';
+
+ const { mode = 'totals', totalHours = 0, vacationHours = 0, sickHours = 0, totalExpenses = 0 } = defineProps<{
+ mode: 'total-hours' | 'off-hours';
+ totalHours?: number;
+ vacationHours?: number;
+ sickHours?: number;
+ totalExpenses?: number;
+ }>();
+
+ const auth_store = useAuthStore();
+ const is_management = auth_store.user?.user_module_access.includes('timesheets_approval');
+
+
+
+
+
+
+
+ {{ $t('timesheet.total_hours') }}
+
+
+ {{ getHoursMinutesStringFromHoursFloat(totalHours) }}
+
+
+
+
+ {{ $t('timesheet.total_expenses') }}
+
+
+ {{ totalExpenses }}$
+
+
+
+
+
+
+
+ {{ $t('timesheet.vacation_available') }}
+
+
+ {{ Math.floor(vacationHours / 8) }}
+
+
+
+
+ {{ $t('timesheet.sick_available') }}
+
+
+ {{ Math.floor(sickHours / 8) }}
+
+
+
+
\ No newline at end of file
diff --git a/src/modules/timesheets/components/shift-list.vue b/src/modules/timesheets/components/shift-list.vue
index ac19285..637662f 100644
--- a/src/modules/timesheets/components/shift-list.vue
+++ b/src/modules/timesheets/components/shift-list.vue
@@ -11,7 +11,7 @@
import { useTimesheetStore } from 'src/stores/timesheet-store';
import { Shift } from 'src/modules/timesheets/models/shift.models';
import { useTimesheetApi } from 'src/modules/timesheets/composables/use-timesheet-api';
- import type { QScrollArea } from 'quasar';
+ import type { QScrollArea, TouchSwipeValue } from 'quasar';
import type { TimesheetDay } from 'src/modules/timesheets/models/timesheet.models';
const CURRENT_DATE_STRING = new Date().toISOString().slice(0, 10);
@@ -34,7 +34,9 @@
const currentDayComponent = ref(null);
const currentDayComponentWatcher = ref(currentDayComponent);
- const scroll_y = computed(() => timesheet_page.value?.getScrollPosition().top ?? 0)
+ const scroll_y = computed(() => timesheet_page.value?.getScrollPosition().top ?? 0);
+ const timesheet_container = ref(null);
+ const scroll_area_height = ref(0);
const addNewShift = (day_shifts: Shift[], date: string, timesheet_id: number) => {
ui_store.focus_next_component = true;
@@ -57,10 +59,10 @@
return day.shifts.every(shift => shift.is_approved === true);
};
- const handleSwipe = async (direction: 'left' | 'up' | 'down' | 'right' | undefined, distance: { x?: number, y?: number }) => {
- mobile_animation_direction.value = direction === 'left' ? 'fadeInRight' : 'fadeInLeft';
- if (distance.x && Math.abs(distance.x) > 10) {
- await timesheet_api.getTimesheetsBySwiping(direction === 'left' ? 1 : -1)
+ const handleSwipe: TouchSwipeValue = (details) => {
+ mobile_animation_direction.value = details.direction === 'left' ? 'fadeInRight' : 'fadeInLeft';
+ if (details.distance && details.distance.x && Math.abs(details.distance.x) > 10) {
+ timesheet_api.getTimesheetsBySwiping(details.direction === 'left' ? 1 : -1).catch(error => console.error(error));
}
};
@@ -71,8 +73,12 @@
watch(currentDayComponentWatcher, () => {
if (currentDayComponent.value && timesheet_page.value && q.platform.is.mobile) {
console.log('setting scroll position to offsetTop of currentDayComponent: ', currentDayComponent.value[0]!.offsetTop);
- timesheet_page.value.setScrollPosition('vertical', currentDayComponent.value[0]!.offsetTop, 800);
- return;
+ timesheet_page.value.setScrollPosition('vertical', currentDayComponent.value[0]!.offsetTop, 800);
+ return;
+ }
+
+ if (timesheet_container.value !== null && mode === 'approval') {
+ scroll_area_height.value = timesheet_container.value.offsetHeight
}
})
@@ -81,12 +87,13 @@
@@ -97,7 +104,7 @@
style="min-height: 20vh;"
>
{{ $t('shared.error.no_data_found')
- }}
+ }}
diff --git a/src/modules/timesheets/components/timesheet-wrapper.vue b/src/modules/timesheets/components/timesheet-wrapper.vue
index 65db1be..36e92cb 100644
--- a/src/modules/timesheets/components/timesheet-wrapper.vue
+++ b/src/modules/timesheets/components/timesheet-wrapper.vue
@@ -4,10 +4,12 @@
>
/* eslint-disable */
import ShiftList from 'src/modules/timesheets/components/shift-list.vue';
+ import LoadingOverlay from 'src/modules/shared/components/loading-overlay.vue';
import ExpenseDialog from 'src/modules/timesheets/components/expense-dialog.vue';
+ import PageHeaderTemplate from 'src/modules/shared/components/page-header-template.vue';
import PayPeriodNavigator from 'src/modules/shared/components/pay-period-navigator.vue';
import TimesheetErrorWidget from 'src/modules/timesheets/components/timesheet-error-widget.vue';
- import LoadingOverlay from 'src/modules/shared/components/loading-overlay.vue';
+ import ShiftListWeeklyOverview from 'src/modules/timesheets/components/shift-list-weekly-overview.vue';
import ShiftListWeeklyOverviewMobile from 'src/modules/timesheets/components/mobile/shift-list-weekly-overview-mobile.vue';
import { computed, onMounted } from 'vue';
@@ -37,9 +39,41 @@
-
+
+
+
+ {{ $t('timesheet.page_header') }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
{{ $t('timesheet.page_header') }}
-
@@ -107,7 +135,8 @@
+
+
+
+
diff --git a/src/pages/timesheet-approval-page.vue b/src/pages/timesheet-approval-page.vue
index 1e42598..cdc2787 100644
--- a/src/pages/timesheet-approval-page.vue
+++ b/src/pages/timesheet-approval-page.vue
@@ -20,7 +20,7 @@
const headerComponent = ref(null);
const table_max_height = computed(() => {
- const height = page_height.value - (headerComponent.value?.offsetHeight ?? 0);
+ const height = page_height.value - (headerComponent.value?.clientHeight ?? 0);
return height;
});
diff --git a/src/pages/timesheet-page.vue b/src/pages/timesheet-page.vue
index 4c0a619..067341b 100644
--- a/src/pages/timesheet-page.vue
+++ b/src/pages/timesheet-page.vue
@@ -2,14 +2,12 @@
setup
lang="ts"
>
- import PageHeaderTemplate from 'src/modules/shared/components/page-header-template.vue';
+
import TimesheetWrapper from 'src/modules/timesheets/components/timesheet-wrapper.vue';
import { useAuthStore } from 'src/stores/auth-store';
- import { useTimesheetStore } from 'src/stores/timesheet-store';
const { user } = useAuthStore();
- const timesheet_store = useTimesheetStore();
@@ -17,13 +15,6 @@
-
-