+
+
+ {{ $t('timesheet.shift.types.REMOTE') }}
+
+
+
-
-
- {{ $t('timesheet.shift.types.REMOTE') }}
-
-
\ No newline at end of file
diff --git a/src/modules/timesheets/components/shift-crud-dialog.vue b/src/modules/timesheets/components/shift-crud-dialog.vue
deleted file mode 100644
index 59c0948..0000000
--- a/src/modules/timesheets/components/shift-crud-dialog.vue
+++ /dev/null
@@ -1,127 +0,0 @@
-
-
-
-
-
-
-
-
-
- {{
- shift_store.mode === 'create'
- ? $t('timesheet.shift.actions.add')
- : shift_store.mode === 'update'
- ? $t('timesheet.shift.actions.edit')
- : $t('timesheet.shift.actions.delete')
- }}
-
-
-
- {{ shift_store.date_iso }}
-
-
-
-
-
-
-
-
-
-
- {{ $t('timesheet.shift.actions.delete_confirmation_msg') }}
-
-
-
-
{{ errorBanner }}
-
-
Conflits :
-
- -
- {{ c.start_time }}–{{ c.end_time }} ({{ c.type }})
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/modules/timesheets/components/shift-list-header.vue b/src/modules/timesheets/components/shift-list-header.vue
deleted file mode 100644
index 780e833..0000000
--- a/src/modules/timesheets/components/shift-list-header.vue
+++ /dev/null
@@ -1,33 +0,0 @@
-
-
-
-
-
-
-
-
- {{ $t('shared.misc.in') }}
-
-
-
-
-
-
-
-
-
-
- {{ $t('shared.misc.out') }}
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/modules/timesheets/components/shift-list-row.vue b/src/modules/timesheets/components/shift-list-row.vue
index 56a8f1b..e5f22fd 100644
--- a/src/modules/timesheets/components/shift-list-row.vue
+++ b/src/modules/timesheets/components/shift-list-row.vue
@@ -5,7 +5,7 @@
import { computed, ref } from 'vue';
import { useQuasar } from 'quasar';
import type { Shift } from 'src/modules/timesheets/models/shift.models';
-
+
const q = useQuasar();
const { shift, dense = false } = defineProps<{
@@ -19,15 +19,9 @@
'request-delete': [shift: Shift];
}>();
- const has_comment = computed(() => {
- const comment = shift.comment ?? '';
- return typeof comment === 'string' && comment.trim().length > 0;
- })
- const comment_icon = computed(() => (has_comment.value ? 'announcement' : 'chat_bubble_outline'));
- const comment_color = computed(() => (has_comment.value ? 'primary' : 'grey-8'));
const hour_font_size = computed(() => dense ? 'font-size: 1em;' : 'font-size: 1.5em;')
const is_hovering = ref(false);
- const font_color = computed(() => shift.type === 'REGULAR' ? ( q.dark.isActive ? ' text-blue-grey-2' : ' text-grey-8' ) : ' text-white' )
+ const font_color = computed(() => shift.type === 'REGULAR' ? (q.dark.isActive ? ' text-blue-grey-2' : ' text-grey-8') : ' text-white')
const get_shift_color = (type: string): string => {
switch (type) {
@@ -58,16 +52,7 @@
@mouseenter="is_hovering = true"
@mouseleave="is_hovering = false"
>
-
-
-
-
+
@@ -130,10 +115,11 @@
diff --git a/src/modules/timesheets/components/shift-list.vue b/src/modules/timesheets/components/shift-list.vue
index 89cdfa2..ad719a1 100644
--- a/src/modules/timesheets/components/shift-list.vue
+++ b/src/modules/timesheets/components/shift-list.vue
@@ -2,16 +2,14 @@
setup
lang="ts"
>
+ /* eslint-disable */
import { date } from 'quasar';
- import ShiftListHeader from 'src/modules/timesheets/components/shift-list-header.vue';
import ShiftListRow from 'src/modules/timesheets/components/shift-list-row.vue';
- import { useShiftStore } from 'src/stores/shift-store';
import { useTimesheetStore } from 'src/stores/timesheet-store';
import { type Shift, default_shift } from 'src/modules/timesheets/models/shift.models';
-import { computed } from 'vue';
+ import { computed } from 'vue';
const timesheet_store = useTimesheetStore();
- const { openCreate, openDelete, openUpdate } = useShiftStore();
const { dense = false } = defineProps<{
dense?: boolean;
}>();
@@ -72,33 +70,22 @@ import { computed } from 'vue';
-
-
+
openUpdate(to_iso_date(day.short_date), value)"
- @request-delete="value => openDelete(to_iso_date(day.short_date), value)"
+ @request-update=""
+ @request-delete=""
/>
-
-
-
-
\ No newline at end of file
diff --git a/src/modules/timesheets/components/timesheet-wrapper.vue b/src/modules/timesheets/components/timesheet-wrapper.vue
index d4d0271..3acb746 100644
--- a/src/modules/timesheets/components/timesheet-wrapper.vue
+++ b/src/modules/timesheets/components/timesheet-wrapper.vue
@@ -2,13 +2,13 @@
setup
lang="ts"
>
+ import GenericLoader from 'src/modules/shared/components/generic-loader.vue';
import ShiftList from 'src/modules/timesheets/components/shift-list.vue';
- import ShiftCrudDialog from 'src/modules/timesheets/components/shift-crud-dialog.vue';
import ExpenseCrudDialog from 'src/modules/timesheets/components/expense-crud-dialog.vue';
import PayPeriodNavigator from 'src/modules/shared/components/pay-period-navigator.vue';
import ShiftListLegend from 'src/modules/timesheets/components/shift-list-legend.vue';
import { useTimesheetStore } from 'src/stores/timesheet-store';
- import { useTimesheetApi } from 'src/modules/timesheets/composables/api/use-timesheet-api';
+ import { useTimesheetApi } from 'src/modules/timesheets/composables/use-timesheet-api';
import { useExpensesStore } from 'src/stores/expense-store';
import { provide } from 'vue';
@@ -19,71 +19,79 @@
dense?: boolean;
}>();
- const { is_loading } = useTimesheetStore();
+ const timesheet_store = useTimesheetStore();
const timesheet_api = useTimesheetApi();
provide('employeeEmail', employeeEmail);
-
-
+
-
-
-
-
-
+
+
+
-
-
+
+
-
+
+
-
-
+
-
+
+
-
-
-
-
+
-
+
+
+
+
-
+
+
\ No newline at end of file
diff --git a/src/modules/timesheets/composables/api/use-expense-api.ts b/src/modules/timesheets/composables/api/use-expense-api.ts
deleted file mode 100644
index ee9a3fd..0000000
--- a/src/modules/timesheets/composables/api/use-expense-api.ts
+++ /dev/null
@@ -1,41 +0,0 @@
-import { normalizeObject } from "src/utils/normalize-object";
-import { useExpensesStore } from "src/stores/expense-store";
-import { expense_validation_schema } from "src/modules/timesheets/models/expense.validation";
-import type { Expense, UpsertExpense } from "src/modules/timesheets/models/expense.models";
-
-export const useExpensesApi = () => {
- const expenses_store = useExpensesStore();
-
- const toUpsertExpense = (obj: {
- old_expense?: Expense;
- new_expense?: Expense;
- }) => obj as UpsertExpense;
-
- const createExpenseByEmployeeEmail = async (employee_email: string, date: string): Promise