diff --git a/src/css/quasar.variables.scss b/src/css/quasar.variables.scss index f919a2b..4279286 100644 --- a/src/css/quasar.variables.scss +++ b/src/css/quasar.variables.scss @@ -24,7 +24,7 @@ $dark: #000; $dark-page: #323232; $positive: #21ba45; -$negative: #ff576ba9; -$info: #54bbdd; -$warning: #eec964; +$negative: #e6364b; +$info: #6bb9e7; +$warning: #e4a944; $white: white; diff --git a/src/i18n/en-ca/index.ts b/src/i18n/en-ca/index.ts index fe6b433..79802dd 100644 --- a/src/i18n/en-ca/index.ts +++ b/src/i18n/en-ca/index.ts @@ -247,7 +247,7 @@ export default { newUsers: 'New user', updateUsers: 'Update user', timeSheets: 'Time sheet', - timeSheetValidations: 'Time sheet', + timeSheetValidations: 'Time sheet approvals', }, timesheet: { //employee's timesheet page @@ -289,13 +289,13 @@ export default { shiftComment: 'Comment', overTimeTitle: 'Overtime regular hours: ', totalPayedHours: 'Total hours worked: ', - //shiftOptions - regularShift: 'Regular', - eveningShift: 'Evening', - emergencyShift: 'Emergency', - sickDay: 'Sick working day', - vacancyDay: 'vacation', - holiday: 'Holiday', + // shift options + shiftRegular: 'regular', + shiftEvening: 'evening', + shiftEmergency: 'emergency', + shiftSick: 'sick', + shiftVacation: 'vacation', + shiftHoliday: 'holiday', dateRangesFrom: 'from', dateRangesTo: 'to', shiftBankedHours: 'Total hours to bank', @@ -371,13 +371,13 @@ export default { reportFilterVacation: 'Vacation', }, shiftColumns: { - title: 'Shifts', - column_1: 'Type', - column_2: 'Start time', - column_3: 'End time', - column_4: 'Comment', - column_5: 'Status', - column_6: 'Supervisor’s report', + title: 'shifts', + labelType: 'type', + labelIn: 'start', + labelOut: 'end', + labelComment: 'comment', + labelState: 'state', + labelSupervisorReport: 'supervisor report', }, expenseColumns: { title: 'Expenses', @@ -398,7 +398,7 @@ export default { message_start: 'Attention: You will be automatically logged out in', message_end: 'seconds if you do not interact with the screen.', }, - daysOfWeek: { + weekdays: { Sunday: ' Sunday', Monday: 'Monday', Tuesday: 'Tuesday', diff --git a/src/i18n/fr-ca/index.ts b/src/i18n/fr-ca/index.ts index bed8c78..f7cd6e9 100644 --- a/src/i18n/fr-ca/index.ts +++ b/src/i18n/fr-ca/index.ts @@ -55,7 +55,7 @@ export default { message_start: 'Attention : vous serez automatiquement déconnecté dans', message_end: 'secondes si vous n’interagissez pas avec l’écran.', }, - daysOfWeek: { + weekdays: { Sunday: 'dimanche', Monday: 'lundi', Tuesday: 'mardi', @@ -237,12 +237,12 @@ export default { }, shiftColumns: { title: 'Quarts de travail', - column_1: 'Type', - column_2: 'Entrée', - column_3: 'Sortie', - column_4: 'Commentaire', - column_5: 'État', - column_6: 'Rapport du superviseur', + labelType: 'type', + labelIn: 'entrée', + labelOut: 'sortie', + labelComment: 'commentaire', + labelState: 'état', + labelSupervisorReport: 'rapport du superviseur', }, shiftsTemplate: { tabTitle1: 'Quarts de travail', @@ -340,13 +340,13 @@ export default { shiftComment: 'Commentaire', overTimeTitle: 'Heures régulières supplémentaires: ', totalPayedHours: 'Total des heures travaillées: ', - //shiftOptions - regularShift: 'Régulier', - eveningShift: 'Soir', - emergencyShift: 'Urgence', - sickDay: 'Maladie', - vacancyDay: 'Vacances', - holiday: 'Férié', + // shift options + shiftRegular: 'régulier', + shiftEvening: 'soir', + shiftEmergency: 'urgence', + shiftSick: 'maladie', + shiftVacation: 'vacances', + shiftHoliday: 'férié', dateRangesFrom: 'du', dateRangesTo: 'au', shiftBankedHours: 'Totale d’heures à banquer', diff --git a/src/modules/employee-list/components/supervisor/supervisor-crew-table.vue b/src/modules/employee-list/components/supervisor/supervisor-crew-table.vue index df4b982..8b40260 100644 --- a/src/modules/employee-list/components/supervisor/supervisor-crew-table.vue +++ b/src/modules/employee-list/components/supervisor/supervisor-crew-table.vue @@ -68,24 +68,26 @@ diff --git a/src/modules/shared/components/navigation/header-bar-avatar.vue b/src/modules/shared/components/navigation/header-bar-avatar.vue index 420a6cb..89e7edf 100644 --- a/src/modules/shared/components/navigation/header-bar-avatar.vue +++ b/src/modules/shared/components/navigation/header-bar-avatar.vue @@ -14,7 +14,7 @@ - {{ notifAmount }} + {{ notifAmount }} diff --git a/src/modules/timesheet-approval/components/graphs/timesheet-approval-employee-details-hours-worked-chart.vue b/src/modules/timesheet-approval/components/graphs/timesheet-approval-employee-details-hours-worked-chart.vue index 95bcbfc..728e623 100644 --- a/src/modules/timesheet-approval/components/graphs/timesheet-approval-employee-details-hours-worked-chart.vue +++ b/src/modules/timesheet-approval/components/graphs/timesheet-approval-employee-details-hours-worked-chart.vue @@ -1,61 +1,61 @@ \ No newline at end of file diff --git a/src/modules/timesheet-approval/components/graphs/timesheet-approval-employee-details-shift-types-chart.vue b/src/modules/timesheet-approval/components/graphs/timesheet-approval-employee-details-shift-types-chart.vue new file mode 100644 index 0000000..2e6cad1 --- /dev/null +++ b/src/modules/timesheet-approval/components/graphs/timesheet-approval-employee-details-shift-types-chart.vue @@ -0,0 +1,67 @@ + + + \ No newline at end of file diff --git a/src/modules/timesheet-approval/components/graphs/timesheet-approval-employee-expenses-chart.vue b/src/modules/timesheet-approval/components/graphs/timesheet-approval-employee-expenses-chart.vue new file mode 100644 index 0000000..9382ccd --- /dev/null +++ b/src/modules/timesheet-approval/components/graphs/timesheet-approval-employee-expenses-chart.vue @@ -0,0 +1,96 @@ + + + \ No newline at end of file diff --git a/src/modules/timesheet-approval/components/timesheet-approval-employee-details-shifts-row-header.vue b/src/modules/timesheet-approval/components/timesheet-approval-employee-details-shifts-row-header.vue new file mode 100644 index 0000000..14cce9d --- /dev/null +++ b/src/modules/timesheet-approval/components/timesheet-approval-employee-details-shifts-row-header.vue @@ -0,0 +1,33 @@ + \ No newline at end of file diff --git a/src/modules/timesheet-approval/components/timesheet-approval-employee-details-shifts-row.vue b/src/modules/timesheet-approval/components/timesheet-approval-employee-details-shifts-row.vue new file mode 100644 index 0000000..97da77d --- /dev/null +++ b/src/modules/timesheet-approval/components/timesheet-approval-employee-details-shifts-row.vue @@ -0,0 +1,104 @@ + + + \ No newline at end of file diff --git a/src/modules/timesheet-approval/components/timesheet-approval-employee-details-shifts.vue b/src/modules/timesheet-approval/components/timesheet-approval-employee-details-shifts.vue new file mode 100644 index 0000000..14c2d6c --- /dev/null +++ b/src/modules/timesheet-approval/components/timesheet-approval-employee-details-shifts.vue @@ -0,0 +1,72 @@ + + + \ No newline at end of file diff --git a/src/modules/timesheet-approval/components/timesheet-approval-employee-details.vue b/src/modules/timesheet-approval/components/timesheet-approval-employee-details.vue deleted file mode 100644 index cf235b1..0000000 --- a/src/modules/timesheet-approval/components/timesheet-approval-employee-details.vue +++ /dev/null @@ -1,48 +0,0 @@ - - - \ No newline at end of file diff --git a/src/modules/timesheet-approval/components/timesheet-approval-employee-overview-list-item.vue b/src/modules/timesheet-approval/components/timesheet-approval-employee-overview-list-item.vue index 3fbf2a1..4952663 100644 --- a/src/modules/timesheet-approval/components/timesheet-approval-employee-overview-list-item.vue +++ b/src/modules/timesheet-approval/components/timesheet-approval-employee-overview-list-item.vue @@ -52,7 +52,7 @@ dense v-for="(button, index) in card_buttons" :key="index" - class="q-py-none bg-white q-my-xs" + class="q-py-none q-my-xs" color="primary" :icon="button.icon" @click="button.onClick" @@ -60,7 +60,7 @@ {{$t(button.label)}} diff --git a/src/modules/timesheet-approval/components/timesheet-approval-employee-overview-list.vue b/src/modules/timesheet-approval/components/timesheet-approval-employee-overview-list.vue index 3f361fb..d7626a9 100644 --- a/src/modules/timesheet-approval/components/timesheet-approval-employee-overview-list.vue +++ b/src/modules/timesheet-approval/components/timesheet-approval-employee-overview-list.vue @@ -2,32 +2,27 @@ /* eslint-disable */ import { computed, onMounted, ref } from 'vue'; import { useI18n } from 'vue-i18n'; - import { useTimesheetStore } from 'src/stores/timesheet-store'; import { useTimesheetApprovalApi } from '../composables/use-timesheet-approval-api'; - import TimesheetApprovalPeriodPicker from '../components/timesheet-approval-period-picker.vue'; import TimesheetApprovalEmployeeOverviewListItem from './timesheet-approval-employee-overview-list-item.vue'; - import TimesheetApprovalEmployeeDetails from '../components/timesheet-approval-employee-details.vue'; - + import TimesheetApprovalEmployeeDetails from 'src/modules/timesheet-approval/pages/timesheet-approval-employee-details.vue'; import { date, type QTableColumn } from 'quasar'; import type { PayPeriodOverviewEmployee } from '../types/timesheet-approval-pay-period-overview-employee-interface'; const { t } = useI18n(); const timesheet_store = useTimesheetStore(); const timesheet_approval_api = useTimesheetApprovalApi(); - const FORWARD = 1 const BACKWARD = -1 - const filter = ref(''); const original_approvals = ref>({}); const is_showing_details = ref(false); const report_filter_company = ref([true, true]); const report_filter_type = ref([true, true, true, true]); const clicked_employee_name = ref(''); + const clicked_employee_email = ref(''); const update_key = ref(0); - const columns = computed((): QTableColumn[] => [ { name: 'employee_name', @@ -75,25 +70,21 @@ sortable: true } ]); - const has_changes = computed(() => { return timesheet_store.pay_period_overview_employees.some(emp => { return emp.is_approved !== original_approvals.value[emp.email]; }); }); - const is_not_enough_filters = computed(() => { return report_filter_company.value.filter(val => val === true).length < 1 || report_filter_type.value.filter(val => val === true).length < 1; }) - const filter_types_labels = [ t('timeSheetValidations.reportFilterShifts'), t('timeSheetValidations.reportFilterExpenses'), t('timeSheetValidations.reportFilterHoliday'), t('timeSheetValidations.reportFilterVacation'), ] - const is_calendar_limit = computed( () => { return timesheet_store.current_pay_period.pay_year === 2024 && timesheet_store.current_pay_period.pay_period_no <= 1; @@ -114,13 +105,19 @@ } } + const getEmployeeOverview = (email: string): PayPeriodOverviewEmployee => { + return timesheet_approval_api.getPayPeriodOverviewByEmployeeEmail(email); + } + const onDateSelected = async (date_string: string) => { await timesheet_approval_api.getPayPeriodOverviewByDate(date_string); }; const onClickedDetails = async (email: string, name: string) => { - clicked_employee_name.value = name; + clicked_employee_name.value = name; + clicked_employee_email.value = email; is_showing_details.value = true; + await timesheet_approval_api.getTimesheetsByPayPeriodAndEmail(email); }; @@ -143,13 +140,16 @@ transition-show="jump-down" transition-hide="jump-down" @before-show="() => update_key += 1" + full-width + :full-height="$q.screen.gt.sm" >
@@ -171,7 +171,7 @@ >