2023-07-18 13:50:47 +00:00
|
|
|
<script>
|
2023-07-28 09:06:03 +01:00
|
|
|
import Modal from '../Modal/index.svelte';
|
2025-11-01 15:49:29 +01:00
|
|
|
import { page } from '$app/state';
|
2023-11-23 13:21:44 -08:00
|
|
|
import { goto } from '$app/navigation';
|
|
|
|
|
import { currentOrgPath } from '$lib/utils/store/org';
|
2025-11-01 15:49:29 +01:00
|
|
|
import { triggerSendEmail, NOTIFICATION_NAME } from '$lib/utils/services/notification/notification';
|
2024-03-22 06:30:24 +01:00
|
|
|
import { profile } from '$lib/utils/store/user';
|
|
|
|
|
|
2025-11-01 15:49:29 +01:00
|
|
|
let query = new URLSearchParams(page.url.search);
|
2024-04-19 05:45:48 +01:00
|
|
|
let welcomePopup = query.get('welcomePopup');
|
|
|
|
|
import { t } from '$lib/utils/functions/translations';
|
2023-07-18 13:50:47 +00:00
|
|
|
|
2023-07-28 09:06:03 +01:00
|
|
|
const closeModal = () => {
|
2024-03-22 06:30:24 +01:00
|
|
|
triggerSendEmail(NOTIFICATION_NAME.WELCOME_TO_APP, {
|
|
|
|
|
to: $profile.email,
|
|
|
|
|
name: $profile.fullname
|
|
|
|
|
});
|
2025-09-21 19:35:41 +01:00
|
|
|
|
2024-04-19 05:45:48 +01:00
|
|
|
goto($currentOrgPath + '/courses?create=true');
|
2023-07-28 09:06:03 +01:00
|
|
|
};
|
2023-07-18 13:50:47 +00:00
|
|
|
</script>
|
|
|
|
|
|
2025-11-01 15:49:29 +01:00
|
|
|
<Modal onClose={closeModal} open={welcomePopup === 'true'} width="w-9/12" maxWidth="w-[800px]" modalHeading="Welcome">
|
2025-09-21 19:35:41 +01:00
|
|
|
<p class="text-sm text-black md:text-base lg:text-lg dark:text-white">
|
2024-04-19 05:45:48 +01:00
|
|
|
{$t('welcome_modal.we_at')}
|
2025-11-01 15:49:29 +01:00
|
|
|
<a href="https://app.classroomio.com/" class="text-primary-700 no-underline hover:no-underline">ClassroomIO</a>
|
2024-04-26 17:54:11 +01:00
|
|
|
{$t('welcome_modal.small_team')}
|
|
|
|
|
<span class="text-primary-700">{$t('welcome_modal.thank_you')};</span>
|
|
|
|
|
{$t('welcome_modal.deeply_appreciate')}
|
2023-07-28 09:06:03 +01:00
|
|
|
</p>
|
2025-09-21 19:35:41 +01:00
|
|
|
<img src="/images/welcome-img.svg" alt="A welcome banner" class="my-6 w-full" />
|
2023-07-28 09:06:03 +01:00
|
|
|
</Modal>
|