Add Jobs link to CV and fix auth race on job applications page
All checks were successful
Deploy with Docker Compose / deploy (push) Successful in 19s
All checks were successful
Deploy with Docker Compose / deploy (push) Successful in 19s
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import { ref, shallowRef, defineAsyncComponent } from "vue";
|
import { ref, shallowRef, defineAsyncComponent } from "vue";
|
||||||
|
import { RouterLink } from "vue-router";
|
||||||
import CVGeneral from "./CVGeneral.vue";
|
import CVGeneral from "./CVGeneral.vue";
|
||||||
import CVBackend from "./CVBackend.vue";
|
import CVBackend from "./CVBackend.vue";
|
||||||
import CVFrontend from "./CVFrontend.vue";
|
import CVFrontend from "./CVFrontend.vue";
|
||||||
@@ -34,6 +35,7 @@ function print() {
|
|||||||
{{ t.label }}
|
{{ t.label }}
|
||||||
</button>
|
</button>
|
||||||
<button class="cv-btn cv-print-btn" @click="print()">Print</button>
|
<button class="cv-btn cv-print-btn" @click="print()">Print</button>
|
||||||
|
<RouterLink to="/cv/jobs" class="cv-btn cv-jobs-btn">Jobs</RouterLink>
|
||||||
</div>
|
</div>
|
||||||
<Transition name="cv-fade" mode="out-in">
|
<Transition name="cv-fade" mode="out-in">
|
||||||
<component :is="currentComponent" :key="selected" />
|
<component :is="currentComponent" :key="selected" />
|
||||||
@@ -85,6 +87,11 @@ function print() {
|
|||||||
margin-left: 1rem;
|
margin-left: 1rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.cv-jobs-btn {
|
||||||
|
text-decoration: none;
|
||||||
|
margin-left: auto;
|
||||||
|
}
|
||||||
|
|
||||||
.cv-fade-enter-active,
|
.cv-fade-enter-active,
|
||||||
.cv-fade-leave-active {
|
.cv-fade-leave-active {
|
||||||
transition:
|
transition:
|
||||||
|
|||||||
@@ -1,10 +1,12 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import { ref, onMounted } from "vue";
|
import { ref, watch } from "vue";
|
||||||
import { useRouter, RouterLink } from "vue-router";
|
import { useRouter, RouterLink } from "vue-router";
|
||||||
import { useAuthStore } from "@/stores/auth";
|
import { useAuthStore } from "@/stores/auth";
|
||||||
|
import { useHomeDataStore } from "@/stores/homeData";
|
||||||
import { gql } from "@/graphql";
|
import { gql } from "@/graphql";
|
||||||
|
|
||||||
const auth = useAuthStore();
|
const auth = useAuthStore();
|
||||||
|
const homeData = useHomeDataStore();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
|
||||||
const applications = ref([]);
|
const applications = ref([]);
|
||||||
@@ -148,13 +150,18 @@ function statusClass(status) {
|
|||||||
return map[status] ?? "";
|
return map[status] ?? "";
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
watch(
|
||||||
if (!auth.user.admin) {
|
() => homeData.loaded,
|
||||||
router.push("/admin");
|
(loaded) => {
|
||||||
} else {
|
if (!loaded) return;
|
||||||
fetchApplications();
|
if (!auth.user.admin) {
|
||||||
}
|
router.push("/admin");
|
||||||
});
|
} else {
|
||||||
|
fetchApplications();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{ immediate: true },
|
||||||
|
);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|||||||
Reference in New Issue
Block a user