+
+
+ {{ $t('timesheet.page_header') }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
timesheet_api.getTimesheetsByDate(date_value)"
+ @date-selected="timesheet_api.getTimesheetsByDate"
@pressed-previous-button="timesheet_api.getTimesheetsByCurrentPayPeriod"
@pressed-next-button="timesheet_api.getTimesheetsByCurrentPayPeriod"
/>
@@ -66,9 +100,6 @@
@click="expenses_store.open"
/>
-
- {{ $t('timesheet.page_header') }}
-
@@ -100,9 +131,13 @@
-
+
-
+
diff --git a/src/modules/timesheets/composables/use-shift-api.ts b/src/modules/timesheets/composables/use-shift-api.ts
index 9e06cbc..05bc0de 100644
--- a/src/modules/timesheets/composables/use-shift-api.ts
+++ b/src/modules/timesheets/composables/use-shift-api.ts
@@ -21,8 +21,8 @@ export const useShiftApi = () => {
const saveShiftChanges = async () => {
timesheet_store.is_loading = true;
- const create_success = await shift_store.createNewShifts();
const update_success = await shift_store.updateShifts();
+ const create_success = await shift_store.createNewShifts();
if (create_success || update_success){
await timesheet_store.getTimesheetsByOptionalEmployeeEmail(auth_store.user?.email ?? '');
diff --git a/src/modules/timesheets/composables/use-timesheet-api.ts b/src/modules/timesheets/composables/use-timesheet-api.ts
index dd3cd6e..33eb159 100644
--- a/src/modules/timesheets/composables/use-timesheet-api.ts
+++ b/src/modules/timesheets/composables/use-timesheet-api.ts
@@ -5,6 +5,7 @@ export const useTimesheetApi = () => {
const timesheet_store = useTimesheetStore();
const getTimesheetsByDate = async (date_string: string, employee_email?: string) => {
+ timesheet_store.timesheets = [];
timesheet_store.is_loading = true;
const success = await timesheet_store.getPayPeriodByDateOrYearAndNumber(date_string);
diff --git a/src/modules/timesheets/models/timesheet.models.ts b/src/modules/timesheets/models/timesheet.models.ts
index 9e06725..e293813 100644
--- a/src/modules/timesheets/models/timesheet.models.ts
+++ b/src/modules/timesheets/models/timesheet.models.ts
@@ -5,6 +5,7 @@ export const TIME_FORMAT_PATTERN = /^(\d{2}:\d{2})?$/;
export const DATE_FORMAT_PATTERN = /^\d{4}-\d{2}-\d{2}$/;
export interface TimesheetResponse {
+ has_preset_schedule: boolean;
employee_fullname: string;
timesheets: Timesheet[];
}
@@ -41,79 +42,4 @@ export interface TotalExpenses {
per_diem: number;
on_call: number;
mileage: number;
-}
-
-// export const test_timesheets: Timesheet[] = [
-// {
-// timehsid: 1,
-// is_approved: false,
-// weekly_hours: { regular: 8, evening: 0, emergency: 0, overtime: 0, vacation: 0, holiday: 0, sick: 0, absent: 0 },
-// weekly_expenses: { expenses: 15.5, mileage: 0 },
-// days: [
-// {
-// date: '2025-10-18',
-// daily_hours: { regular: 8, evening: 0, emergency: 0, overtime: 0, vacation: 0, holiday: 0, sick: 0, absent: 0 },
-// daily_expenses: { expenses: 15.5, mileage: 0 },
-// shifts: [
-// { id: 101, date: '2025-01-06', type: 'REGULAR', start_time: '08:00', end_time: '12:00', comment: 'blah', is_approved: false, is_remote: false, },
-// { id: 102, date: '2025-01-06', type: 'REGULAR', start_time: '13:00', end_time: '17:00', comment: undefined, is_approved: false, is_remote: false, },
-// ],
-// expenses: [
-// { id: 201, date: '2025-01-06', type: 'EXPENSES', amount: 15.5, comment: 'Lunch receipt', is_approved: false, },
-// ],
-// },
-// ],
-// },
-// {
-// id: 2,
-// is_approved: true,
-// weekly_hours: {
-// regular: 0,
-// evening: 0,
-// emergency: 0,
-// overtime: 8,
-// vacation: 0,
-// holiday: 0,
-// sick: 0,
-// absent: 0,
-// },
-// weekly_expenses: {
-// expenses: 0,
-// mileage: 32.4,
-// },
-// days: [
-// {
-// date: '2025-10-27',
-// daily_hours: {
-// regular: 0,
-// evening: 0,
-// emergency: 0,
-// overtime: 8,
-// vacation: 0,
-// holiday: 0,
-// sick: 0,
-// absent: 0,
-// },
-// daily_expenses: {
-// expenses: 0,
-// mileage: 32.4,
-// },
-// shifts: [
-// { id: 101, date: '2025-10-27', type: 'REGULAR', start_time: '08:00', end_time: '12:00', comment: undefined, is_approved: false, is_remote: false, },
-// { id: 102, date: '2025-10-27', type: 'REGULAR', start_time: '13:00', end_time: '17:00', comment: undefined, is_approved: false, is_remote: false, },
-// ],
-// expenses: [
-// {
-// id: 202,
-// date: '2025-10-27',
-// type: 'MILEAGE',
-// amount: 0,
-// mileage: 32.4,
-// comment: 'Travel to client site',
-// is_approved: true,
-// },
-// ],
-// },
-// ],
-// },
-// ];
+}
\ No newline at end of file
diff --git a/src/pages/dashboard-page.vue b/src/pages/dashboard-page.vue
index f7f1b95..448e56c 100644
--- a/src/pages/dashboard-page.vue
+++ b/src/pages/dashboard-page.vue
@@ -2,15 +2,14 @@
setup
lang="ts"
>
- import { ref } from 'vue';
-
- const slide = ref('welcome');
+ import MainCarousel from 'src/modules/dashboard/components/main-carousel.vue';
+ import ShortcutCard from 'src/modules/dashboard/components/employee/shortcut-card.vue';
@@ -19,71 +18,45 @@
-
-
-
-
-
-
-
- {{ $t('dashboard.carousel.welcome_title') }}
-
-
+
+
+
+
-
- {{ $t('dashboard.carousel.welcome_message') }}
-
-
-
+
{{ $t('dashboard.useful_links') }}
-
-
-
-
-
- {{ $t('dashboard.carousel.help_title') }}
-
-
+
+
+
+
-
- {{ $t('dashboard.carousel.help_message') }}
-
-
-
-
+
+
+
-
@@ -97,7 +70,7 @@