diff --git a/src/assets/google_thumbnail.png b/src/assets/google_thumbnail.png new file mode 100644 index 0000000..7ca64d8 Binary files /dev/null and b/src/assets/google_thumbnail.png differ diff --git a/src/assets/targo_help_banner.png b/src/assets/targo_help_banner.png index a55cf4d..be0c2b5 100644 Binary files a/src/assets/targo_help_banner.png and b/src/assets/targo_help_banner.png differ diff --git a/src/i18n/en-ca/index.ts b/src/i18n/en-ca/index.ts index 16ce7c2..8c41cd3 100644 --- a/src/i18n/en-ca/index.ts +++ b/src/i18n/en-ca/index.ts @@ -4,8 +4,9 @@ export default { welcome_title: "Welcome to the new Targo Application!", welcome_message: "Development is complete and the application is live! Things have remained mostly the same, but with a new coat of paint, a more streamlined user experience, and most importantly, drastically improved security and optimization!", help_title: "We have a help page!", - help_message: "We did our best to keep the app intuitive with as few clicks and changes as possible, but it's not always perfect! We made this page to explain every part of the app if you any of it ever feels confusing.", + help_message: "We've modernized the app while trying to make as few functional changes as possible, but if there's ever any part of the site that leaves you scratching your head, feel free to check out the help page.", }, + useful_links: "useful links", }, help: { label: "Centre d'aide", @@ -207,6 +208,7 @@ export default { modify: "modify", close: "close", download: "download", + open: "open", }, misc: { or: "or", diff --git a/src/i18n/fr-ca/index.ts b/src/i18n/fr-ca/index.ts index 9d8ffaa..3dc02c8 100644 --- a/src/i18n/fr-ca/index.ts +++ b/src/i18n/fr-ca/index.ts @@ -2,10 +2,11 @@ export default { dashboard: { carousel: { welcome_title: "Bienvenue dans la nouvelle application Targo!", - welcome_message: "Le développement est terminé et l'application est officiellement en ligne! Les fonctionnalités demeurent grandement intactes comparé à l'ancienne version, mise à part une nouvelle couche de peinture, une expérience utilisateur plus intuitive et surtout une sécurité et optimization drastiquement amélioriés!", + welcome_message: "La nouvelle application est officiellement en ligne ! Plus performante et plus sécuritaire, elle conserve l’essentiel avec un design rafraîchie.", help_title: "Nous avons une page d'aide!", - help_message: "Nous avons fait notre possible pour rendre l'application plus intuitive et facile d'accès en suivant les tendances modernes, mais il y a toujours place à l'amélioration! La page d'aide est là pour vous si jamais nous avons raté la cible et qu'une partie du site semble nébuleux.", + help_message: "L’application a été pensée pour être plus intuitive et moderne. En cas de doute, la page d’aide est à votre disposition.", }, + useful_links: "liens utiles", }, help: { label: "Centre d'aide", @@ -208,6 +209,7 @@ export default { modify: "modifier", close: "fermer", download: "télécharger", + open: "ouvrir", }, misc: { or: "ou", diff --git a/src/layouts/components/main-layout-left-drawer.vue b/src/layouts/components/main-layout-left-drawer.vue index 688f10e..371a57a 100644 --- a/src/layouts/components/main-layout-left-drawer.vue +++ b/src/layouts/components/main-layout-left-drawer.vue @@ -2,7 +2,8 @@ setup lang="ts" > - import { ref } from 'vue'; + import { onMounted, ref } from 'vue'; + import { useQuasar } from 'quasar'; import { useRouter } from 'vue-router'; import { useAuthStore } from 'src/stores/auth-store'; import { useUiStore } from 'src/stores/ui-store'; @@ -18,6 +19,7 @@ { i18n_key: 'nav_bar.help', icon: "contact_support", route: RouteNames.HELP }, ] + const q = useQuasar(); const auth_store = useAuthStore(); const ui_store = useUiStore(); const router = useRouter(); @@ -27,7 +29,7 @@ ui_store.current_page = page_name; is_mini.value = true; - router.push({ name: page_name }).catch( error => { + router.push({ name: page_name }).catch(error => { console.error('failed to reach page: ', error); }); }; @@ -39,6 +41,12 @@ console.error('could not log you out: ', err); }) }; + + onMounted(() => { + if(q.platform.is.mobile) { + ui_store.is_left_drawer_open = false; + } + }) + + diff --git a/src/modules/timesheets/components/shift-list.vue b/src/modules/timesheets/components/shift-list.vue index ca95b19..dd0f2fc 100644 --- a/src/modules/timesheets/components/shift-list.vue +++ b/src/modules/timesheets/components/shift-list.vue @@ -6,7 +6,7 @@ import ShiftListDateWidget from 'src/modules/timesheets/components/shift-list-date-widget.vue'; import { date } from 'quasar'; - import { computed, ref } from 'vue'; + import { computed, ref, watch } from 'vue'; import { useUiStore } from 'src/stores/ui-store'; import { useTimesheetStore } from 'src/stores/timesheet-store'; import { Shift } from 'src/modules/timesheets/models/shift.models'; @@ -14,13 +14,15 @@ import type { QScrollArea } from 'quasar'; import type { TimesheetDay } from 'src/modules/timesheets/models/timesheet.models'; + const CURRENT_DATE_STRING = new Date().toISOString().slice(0, 10); + const { extractDate } = date; const ui_store = useUiStore(); const timesheet_store = useTimesheetStore(); const timesheet_api = useTimesheetApi(); - const { mode = 'normal'} = defineProps<{ + const { mode = 'normal' } = defineProps<{ mode: 'normal' | 'approval'; }>(); @@ -28,6 +30,9 @@ const animation_style = computed(() => ui_store.is_mobile_mode ? mobile_animation_direction.value : 'fadeInDown'); const timesheet_page = ref(null); + const currentDayComponent = ref(null); + const currentDayComponentWatcher = ref(currentDayComponent); + const scroll_y = computed(() => timesheet_page.value?.getScrollPosition().top ?? 0) const addNewShift = (day_shifts: Shift[], date: string, timesheet_id: number) => { @@ -44,25 +49,37 @@ const shifts_without_deleted_shift = day.shifts.filter(shift => shift.id !== 0); day.shifts = shifts_without_deleted_shift; } - } + }; const getDayApproval = (day: TimesheetDay) => { if (day.shifts.length < 1) return false; 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 getMobileDayRef = (iso_date_string: string): string => { + return iso_date_string === CURRENT_DATE_STRING ? 'currentDayComponent' : ''; + }; + + watch(currentDayComponentWatcher, () => { + if (currentDayComponent.value && timesheet_page.value) { + console.log('setting scroll position to offsetTop of currentDayComponent: ', currentDayComponent.value[0]!.offsetTop); + timesheet_page.value.setScrollPosition('vertical', currentDayComponent.value[0]!.offsetTop, 800); + return; + } + })