diff --git a/src/i18n/en-ca/index.ts b/src/i18n/en-ca/index.ts index 58909a6..d2d1823 100644 --- a/src/i18n/en-ca/index.ts +++ b/src/i18n/en-ca/index.ts @@ -374,6 +374,7 @@ export default { expense: "an expense", shift: "a shift", preset: "many shifts", + update_notification: "the data was updated automatically", }, print_report: { title: "Download options", diff --git a/src/i18n/fr-ca/index.ts b/src/i18n/fr-ca/index.ts index 27d8ff3..70c5d95 100644 --- a/src/i18n/fr-ca/index.ts +++ b/src/i18n/fr-ca/index.ts @@ -374,6 +374,7 @@ export default { expense: "une dépense", shift: " un quart de travail", preset: "plusieurs quarts de travail", + update_notification: "les données ont été mises à jour automatiquement", }, print_report: { title: "options de téléchargement", diff --git a/src/modules/timesheet-approval/services/timesheet-approval-service.ts b/src/modules/timesheet-approval/services/timesheet-approval-service.ts index 34416f0..955a571 100644 --- a/src/modules/timesheet-approval/services/timesheet-approval-service.ts +++ b/src/modules/timesheet-approval/services/timesheet-approval-service.ts @@ -20,6 +20,6 @@ export const timesheetApprovalService = { }, subscribeToPayPeriodObservable: (): EventSource => { - return new EventSource('http://localhost:3000/pay-periods/subscribe'); + return new EventSource(`${import.meta.env.VITE_TARGO_BACKEND_URL}/pay-periods/subscribe`); }, }; \ No newline at end of file diff --git a/src/stores/timesheet-store.ts b/src/stores/timesheet-store.ts index 41663c2..f1b5e47 100644 --- a/src/stores/timesheet-store.ts +++ b/src/stores/timesheet-store.ts @@ -197,7 +197,10 @@ export const useTimesheetStore = defineStore('timesheet', () => { const employee_name = overview?.employee_first_name + ' ' + overview?.employee_last_name; Notify.create({ - message: `${employee_name} ${t('timesheet_approvals.event.' + pay_period_event.action)} ${t('timesheet_approvals.event.' + pay_period_event.event_type)}` + message: `${employee_name} ${t('timesheet_approvals.event.' + pay_period_event.action)} ${t('timesheet_approvals.event.' + pay_period_event.event_type)}`, + color: 'warning', + classes: 'text-weight-bolder text-primary', + caption: t('timesheet_approvals.event.update_notification'), }) } }