diff --git a/frontend/src/components/Controls/Code.vue b/frontend/src/components/Controls/Code.vue index 3440f90e..175bd937 100644 --- a/frontend/src/components/Controls/Code.vue +++ b/frontend/src/components/Controls/Code.vue @@ -107,7 +107,7 @@ async function setLanguageExtension() { if (!languageImport) return const module = await languageImport() - languageExtension.value = (module as any)[props.language]() + languageExtension.value = (module as any)[props.language]?.() if (props.completions) { const languageData = (module as any)[`${props.language}Language`] diff --git a/frontend/src/components/InstallPrompt.vue b/frontend/src/components/InstallPrompt.vue index eea93d0c..ab913feb 100644 --- a/frontend/src/components/InstallPrompt.vue +++ b/frontend/src/components/InstallPrompt.vue @@ -76,7 +76,14 @@ const isIos = () => { const isInStandaloneMode = () => 'standalone' in window.navigator && window.navigator.standalone -if (isIos() && !isInStandaloneMode()) iosInstallMessage.value = true +if ( + isIos() && + !isInStandaloneMode() && + localStorage.getItem('learningIosInstallPromptShown') !== 'true' +) { + iosInstallMessage.value = true + localStorage.setItem('learningIosInstallPromptShown', 'true') +} window.addEventListener('beforeinstallprompt', (e) => { e.preventDefault() diff --git a/frontend/src/components/Modals/Event.vue b/frontend/src/components/Modals/Event.vue index f331981a..04804f49 100644 --- a/frontend/src/components/Modals/Event.vue +++ b/frontend/src/components/Modals/Event.vue @@ -189,6 +189,8 @@ const user = inject('$user') const dayjs = inject('$dayjs') const tabIndex = ref(0) const showCertification = ref(false) +const evaluation = reactive({}) +const certificate = reactive({}) const props = defineProps({ event: { @@ -197,9 +199,6 @@ const props = defineProps({ }, }) -const evaluation = reactive({}) -const certificate = reactive({}) - watch(user, () => { if (userIsEvaluator()) { defaultTemplate.reload() diff --git a/frontend/src/components/UpcomingEvaluations.vue b/frontend/src/components/UpcomingEvaluations.vue index 8a64bfc6..edc5551c 100644 --- a/frontend/src/components/UpcomingEvaluations.vue +++ b/frontend/src/components/UpcomingEvaluations.vue @@ -14,7 +14,10 @@
-
+
diff --git a/frontend/src/pages/Home/StudentHome.vue b/frontend/src/pages/Home/StudentHome.vue index 50335af8..babc0dd3 100644 --- a/frontend/src/pages/Home/StudentHome.vue +++ b/frontend/src/pages/Home/StudentHome.vue @@ -64,7 +64,7 @@
-
+
diff --git a/frontend/src/pages/JobApplications.vue b/frontend/src/pages/JobApplications.vue index 92080299..09871823 100644 --- a/frontend/src/pages/JobApplications.vue +++ b/frontend/src/pages/JobApplications.vue @@ -66,38 +66,38 @@ v-if="column.key === 'full_name'" class="flex items-center space-x-3" > - -
- -
- {{ item }} + + {{ item }}
-
-
+
+ {{ item }} +
+
{{ item }}
- +
import { + Avatar, Button, Breadcrumbs, Dialog, @@ -252,6 +253,7 @@ const sendEmail = (close) => { } const downloadResume = (resumeUrl) => { + console.log(resumeUrl) window.open(resumeUrl, '_blank') } @@ -288,7 +290,7 @@ const applicationColumns = computed(() => { }, { label: __('Applied On'), - key: 'applied_date', + key: 'applied_on', width: 1, icon: 'calendar', }, @@ -305,7 +307,7 @@ const applicantRows = computed(() => { return applications.data.map((application) => ({ ...application, full_name: application.full_name, - applied_date: dayjs(application.creation).format('MMM DD, YYYY'), + applied_on: dayjs(application.creation).fromNow(), })) }) diff --git a/frontend/src/pages/Profile.vue b/frontend/src/pages/Profile.vue index e0dc20da..74a8d420 100644 --- a/frontend/src/pages/Profile.vue +++ b/frontend/src/pages/Profile.vue @@ -129,8 +129,10 @@ onMounted(() => { const profile = createResource({ url: 'lms.lms.api.get_profile_details', - params: { - username: props.username, + makeParams() { + return { + username: props.username, + } }, }) @@ -185,18 +187,25 @@ const editProfile = () => { } const isSessionUser = () => { - return $user.data?.email === profile.data?.email + return $user.data?.email === profile.data?.name } -const hasHigherAccess = () => { +const currentUserHasHigherAccess = () => { return $user.data?.is_evaluator || $user.data?.is_moderator } +const isEvaluatorOrModerator = () => { + return ( + profile.data?.roles?.includes('Batch Evaluator') || + profile.data?.roles?.includes('Moderator') + ) +} + const getTabButtons = () => { let buttons = [{ label: 'About' }, { label: 'Certificates' }] if ($user.data?.is_moderator) buttons.push({ label: 'Roles' }) - if (hasHigherAccess()) { + if (currentUserHasHigherAccess() && isEvaluatorOrModerator()) { buttons.push({ label: 'Slots' }) buttons.push({ label: 'Schedule' }) } diff --git a/frontend/src/pages/ProfileEvaluationSchedule.vue b/frontend/src/pages/ProfileEvaluationSchedule.vue index 6efc257e..9e12f7ab 100644 --- a/frontend/src/pages/ProfileEvaluationSchedule.vue +++ b/frontend/src/pages/ProfileEvaluationSchedule.vue @@ -36,7 +36,7 @@
- +