| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308 |
- <template>
- <LayoutContainer>
- <div v-if="pending">
- <v-row class="justify-center progress">
- <v-progress-circular
- indeterminate
- color="grey"
- />
- </v-row>
- </div>
- <div
- v-else
- v-for="(job, index) in jobs"
- :key="index"
- class="mission-container"
- >
- <v-row class="title-container">
- <NuxtLink
- :to="`/nous-rejoindre/${job.id}`"
- class="title"
- >
- {{ job.title }} - {{ job.contractType }}
- <v-icon
- v-if="job.featured"
- class="star fas fa-star"
- />
- </NuxtLink>
- <v-btn
- :to="`/nous-rejoindre/${job.id}`"
- class="btn-more"
- >
- En savoir plus
- </v-btn>
- </v-row>
- <v-row class="location-container">
- <v-icon icon="fas fa-map-marker" />
- <div class="location">
- {{ job.city }}
- </div>
- </v-row>
- </div>
- <v-row>
- <v-col cols="12">
- <LayoutPagination
- v-if="jobCollection && jobCollection.pagination"
- :model-value="page"
- :pagination="jobCollection.pagination"
- @update:model-value="onPageUpdated"
- class="mt-4"
- />
- </v-col>
- </v-row>
- <v-row class="ml-6 mb-6">
- <v-col cols="12">
- <p class="apply-now">
- Nous sommes toujours à la recherche de nouveaux talents. N'hésitez pas
- à déposer votre candidature ci-dessous :
- </p>
- </v-col>
- </v-row>
- <v-row>
- <v-col cols="12">
- <v-btn
- class="btn-send"
- @click="dialog = true"
- >
- Envoyer ma candidature
- </v-btn>
- </v-col>
- </v-row>
- <!-- Boite de dialogue "soumettre une candidature" -->
- <v-dialog
- v-model="dialog"
- max-width="600px"
- >
- <v-card>
- <v-card-title
- class="text-center"
- >
- Formulaire de Candidature
- </v-card-title>
- <v-card-text>
- <v-form>
- <v-text-field
- label="Nom*"
- required
- />
- <v-text-field
- label="Prénom*"
- required
- />
- <v-text-field
- label="Téléphone*"
- required
- />
- <v-text-field
- label="Email*"
- required
- />
- <v-file-input
- label="Dépôt de CV*"
- accept=".pdf, .jpeg, .png"
- required
- />
- <v-file-input
- label="Dépôt de lettre de motivation"
- accept=".pdf, .jpeg, .png"
- />
- <v-textarea
- label="Message*"
- required
- />
- </v-form>
- </v-card-text>
- <p class="text-right mr-6">
- * Champs obligatoires
- </p>
- <v-card-actions class="justify-center">
- <v-btn
- class="btn-more mb-4"
- @click="sendApplication"
- >
- Envoyer
- </v-btn>
- </v-card-actions>
- </v-card>
- </v-dialog>
- </LayoutContainer>
- </template>
- <script setup lang="ts">
- import { useEntityFetch } from "~/composables/data/useEntityFetch";
- import JobPosting from "~/models/Maestro/JobPosting";
- import { ComputedRef } from "vue";
- import { AnyJson } from "~/types/data";
- const i18n = useI18n();
- const router = useRouter()
- const { fetchCollection } = useEntityFetch()
- const page: Ref<number> = ref(1);
- const query: ComputedRef<AnyJson> = computed(() => {
- return { type: "ENTREPRISE", page: page.value }
- }
- )
- const { data: jobCollection, pending, refresh } = fetchCollection(
- JobPosting,
- null,
- query
- )
- // TODO: voir pourquoi on se retrouve obligé de passer par ce computed pour avoir le type TS correct?
- const jobs: ComputedRef<JobPosting[]> = computed(() => {
- return jobCollection.value !== null ?
- jobCollection.value.items as JobPosting[] :
- []
- })
- const onPageUpdated = async (newVal: number): Promise<void> => {
- page.value = newVal
- pending.value = true
- await refresh()
- // TODO: remplacer par un watcher sur pending?
- setTimeout(
- async () => await navigateTo({ path: '', hash: '#join-us-anchor' }),
- 200
- )
- }
- /**
- * Faut-il afficher la boite de dialogue de candidature
- */
- const dialog = ref(false);
- /**
- * Soumet le formulaire de candidature (boite de dialogue)
- */
- const sendApplication = () => {
- // TODO: implémenter le submit
- dialog.value = false;
- };
- </script>
- <style scoped lang="scss">
- .progress {
- margin: 32px auto 128px auto;
- }
- .v-btn {
- font-weight: 600;
- height: 50px;
- background: var(--secondary-color);
- border-radius: 6px;
- color: var(--on-secondary-color);
- gap: 9px;
- }
- .mission-container {
- margin: 64px 12%;
- .title-container {
- display: flex;
- justify-content: space-between;
- align-items: center;
- background: var(--primary-color);
- color: var(--on-primary-color);
- height: 80px;
- padding: 10px 10px 10px 1px;
- .title {
- font-family: "Barlow",serif;
- font-style: normal;
- font-weight: 600;
- font-size: 1.5rem;
- line-height: 39px;
- color: #ffffff;
- text-decoration: none;
- margin-left: 36px;
- }
- .star {
- margin-left: 12px;
- font-size: 24px;
- color: yellow;
- vertical-align: baseline;
- }
- .btn-more {
- margin-right: 8px;
- display: flex;
- align-items: center;
- }
- }
- .location-container {
- background: #9edbdd;
- display: flex;
- align-items: center;
- padding: 10px;
- .v-icon {
- font-size: 1rem !important;
- color: #0e2d32;
- }
- .location {
- color: var(--primary-color);
- margin-left: 10px;
- font-size: 1.3rem;
- }
- }
- }
- @media (max-width: 600px) {
- .mission-container {
- margin: 64px 6%;
- }
- }
- .btn-send {
- display: flex;
- justify-content: center;
- align-items: center;
- width: 30%;
- margin-left: auto;
- margin-right: auto;
- font-weight: 700;
- }
- .apply-now {
- text-align: center;
- font-style: italic;
- font-weight: 300;
- font-size: 34px;
- line-height: 40px;
- color: #091d20;
- margin-bottom: 2rem;
- }
- .v-dialog {
- font-family: Barlow, serif;
- .btn-more {
- width: 128px;
- }
- }
- </style>
|