From 00a18d694b704dc3aa5a3260e7f5198922cbf89c Mon Sep 17 00:00:00 2001 From: Melissa Autumn Date: Thu, 20 Jun 2024 10:27:59 -0700 Subject: [PATCH] First pass at setup schedule --- frontend/src/assets/styles/colours.css | 1 + frontend/src/assets/styles/custom-media.pcss | 5 + frontend/src/assets/styles/variables.css | 2 +- .../src/components/FTUE/ConnectCalendars.vue | 13 +- .../src/components/FTUE/SetupSchedule.vue | 175 ++++++++++++++++++ frontend/src/main.js | 2 +- frontend/src/stores/ftue-store.js | 2 +- frontend/src/tbpro/elements/BaseButton.vue | 1 + frontend/src/tbpro/elements/SelectInput.vue | 17 +- frontend/src/tbpro/elements/SyncCard.vue | 25 ++- frontend/src/tbpro/elements/TextInput.vue | 6 +- .../src/views/FirstTimeUserExperienceView.vue | 19 +- 12 files changed, 253 insertions(+), 15 deletions(-) create mode 100644 frontend/src/assets/styles/custom-media.pcss create mode 100644 frontend/src/components/FTUE/SetupSchedule.vue diff --git a/frontend/src/assets/styles/colours.css b/frontend/src/assets/styles/colours.css index eb0d7e33a..a448e941b 100644 --- a/frontend/src/assets/styles/colours.css +++ b/frontend/src/assets/styles/colours.css @@ -10,6 +10,7 @@ html { --surface-base: #FEFFFF; --surface-subtle: #F7F7F7; --surface-lower: #F7F7F7; + --surface-raised: var(--neutral); --surface-border: var(--neutral-200); --surface-intense: #777580; --success-pressed: #194E2C; diff --git a/frontend/src/assets/styles/custom-media.pcss b/frontend/src/assets/styles/custom-media.pcss new file mode 100644 index 000000000..e141d2f28 --- /dev/null +++ b/frontend/src/assets/styles/custom-media.pcss @@ -0,0 +1,5 @@ +/* PostCSS Custom Media Plugin */ +@custom-media --sm (min-width: 40.0rem); /* 640px */ +@custom-media --md (min-width: 48.0rem); /* 768px */ +@custom-media --lg (min-width: 64.0rem); /* 1024px */ +@custom-media --xl (min-width: 80.0rem); /* 1280px */ diff --git a/frontend/src/assets/styles/variables.css b/frontend/src/assets/styles/variables.css index e09951ed9..9f9c46bed 100644 --- a/frontend/src/assets/styles/variables.css +++ b/frontend/src/assets/styles/variables.css @@ -1,5 +1,5 @@ html { --border-radius: 0.1875rem; /* 3px */ - --txt-input: 0.8125rem; /* 13px */ + --txt-input: 0.8125rem; /* 13px */ --line-height-input: 1.25rem; /* 20px */ } diff --git a/frontend/src/components/FTUE/ConnectCalendars.vue b/frontend/src/components/FTUE/ConnectCalendars.vue index 3da9974d8..4f9bbf42c 100644 --- a/frontend/src/components/FTUE/ConnectCalendars.vue +++ b/frontend/src/components/FTUE/ConnectCalendars.vue @@ -72,11 +72,14 @@ onMounted(async () => { }); const onSubmit = async () => { - // await nextStep(); + isLoading.value = true; + await nextStep(); }; diff --git a/frontend/src/components/FTUE/SetupSchedule.vue b/frontend/src/components/FTUE/SetupSchedule.vue new file mode 100644 index 000000000..ff66fdcd4 --- /dev/null +++ b/frontend/src/components/FTUE/SetupSchedule.vue @@ -0,0 +1,175 @@ + + + + + diff --git a/frontend/src/main.js b/frontend/src/main.js index 63519529b..a942145eb 100644 --- a/frontend/src/main.js +++ b/frontend/src/main.js @@ -13,7 +13,7 @@ import useDayJS from '@/composables/dayjs'; import i18ninstance from '@/composables/i18n'; // init basic css with tailwind imports -import '@/assets/main.css'; +import '@/assets/styles/main.css'; // init sentry // eslint-disable-next-line import/no-extraneous-dependencies diff --git a/frontend/src/stores/ftue-store.js b/frontend/src/stores/ftue-store.js index ea4c34166..fb53478a1 100644 --- a/frontend/src/stores/ftue-store.js +++ b/frontend/src/stores/ftue-store.js @@ -43,7 +43,7 @@ export const useFTUEStore = defineStore('FTUE', () => { [ftueStep.setupSchedule]: { previous: ftueStep.connectCalendars, next: ftueStep.connectVideoConferencing, - title: 'Create schedule', + title: 'Set up your appointment availability', }, [ftueStep.connectVideoConferencing]: { previous: ftueStep.setupSchedule, diff --git a/frontend/src/tbpro/elements/BaseButton.vue b/frontend/src/tbpro/elements/BaseButton.vue index e1a6343c8..67dca8a64 100644 --- a/frontend/src/tbpro/elements/BaseButton.vue +++ b/frontend/src/tbpro/elements/BaseButton.vue @@ -125,4 +125,5 @@ button { height: 1.25rem } } + diff --git a/frontend/src/tbpro/elements/SelectInput.vue b/frontend/src/tbpro/elements/SelectInput.vue index 0a4ffdc0b..c75cc6281 100644 --- a/frontend/src/tbpro/elements/SelectInput.vue +++ b/frontend/src/tbpro/elements/SelectInput.vue @@ -43,7 +43,7 @@ const onInvalid = (evt) => { {{ option.label }} - + {{ validationMessage }} @@ -66,6 +66,21 @@ const onInvalid = (evt) => { font-weight: 600; } +.help-label { + visibility: hidden; + display: flex; + color: var(--critical-default); + + width: 100%; + min-height: 0.9375rem; + font-size: 0.625rem; + line-height: 0.9375rem; +} + +.visible { + visibility: visible; +} + .required { color: var(--critical); } diff --git a/frontend/src/tbpro/elements/SyncCard.vue b/frontend/src/tbpro/elements/SyncCard.vue index 6f25b3332..bf0561799 100644 --- a/frontend/src/tbpro/elements/SyncCard.vue +++ b/frontend/src/tbpro/elements/SyncCard.vue @@ -41,9 +41,11 @@ defineProps({ }); diff --git a/frontend/src/tbpro/elements/TextInput.vue b/frontend/src/tbpro/elements/TextInput.vue index 19bceafc6..649401979 100644 --- a/frontend/src/tbpro/elements/TextInput.vue +++ b/frontend/src/tbpro/elements/TextInput.vue @@ -3,6 +3,10 @@ import { ref } from 'vue'; defineProps({ name: String, + type: { + type: String, + default: 'text', + }, placeholder: { type: String, default: '', @@ -36,7 +40,7 @@ const onInvalid = (evt) => { +