MissionDetail.vue 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207
  1. <template>
  2. <LayoutContainer>
  3. <div class="job-section">
  4. <v-row class="mb-6 center-90">
  5. <v-col class="d-flex align-items-center">
  6. <v-btn
  7. to="/nous-rejoindre"
  8. prepend-icon="fas fa-arrow-left"
  9. variant="outlined"
  10. class="back-button"
  11. >
  12. Retour aux annonces
  13. </v-btn>
  14. </v-col>
  15. </v-row>
  16. <div>
  17. <div v-if="pending">
  18. <v-row class="justify-center progress">
  19. <v-progress-circular indeterminate color="grey" />
  20. </v-row>
  21. </div>
  22. <div v-else-if="job !== null">
  23. <CommonMeta :title="job.title" description="Offre d'emploi" />
  24. <h3>
  25. {{ job.title }}
  26. </h3>
  27. <v-row class="details blue-content my-6">
  28. <v-col cols="12" md="6">
  29. <v-row>
  30. <div>
  31. Type de contrat :
  32. <b>{{ $t(job.contractType) }} </b>
  33. </div>
  34. </v-row>
  35. <v-row>
  36. <div>
  37. Localisation :
  38. <b>{{ job.postalCode }} {{ job.city }}</b>
  39. </div>
  40. </v-row>
  41. </v-col>
  42. <v-col cols="12" md="6">
  43. <v-row v-if="job.sector.length > 0">
  44. <div>
  45. Secteur d'activité : <b>{{ job.sector.join(', ') }}</b>
  46. </div>
  47. </v-row>
  48. <v-row>
  49. <div>
  50. Date de parution :
  51. <b>{{ formatDate(job.startPublication) }}</b>
  52. </div>
  53. </v-row>
  54. </v-col>
  55. </v-row>
  56. <v-row class="center-90">
  57. <p class="center-90 description mb-12" v-html="job.content" />
  58. </v-row>
  59. <v-row class="d-flex justify-center align-center">
  60. <v-btn class="btn-apply mb-12" @click="apply"> Je postule </v-btn>
  61. </v-row>
  62. <JoinUsDialog v-model="dialog" :job-posting-id="job.id" />
  63. <v-row class="d-flex justify-space-between center-90">
  64. <p v-if="job.tags.length > 0">MOTS CLÉS</p>
  65. <div v-if="mdAndUp">
  66. <p>PARTAGER</p>
  67. </div>
  68. </v-row>
  69. <v-row class="d-flex justify-space-between mb-8 center-90">
  70. <p v-if="job.tags.length > 0" class="key-word mt-3">
  71. <span v-for="tag in job.tags" :key="tag.id" class="mr-2">
  72. {{ tag.name }}
  73. </span>
  74. </p>
  75. <CommonShare v-if="mdAndUp" />
  76. </v-row>
  77. <div v-if="smAndDown">
  78. <p>PARTAGER</p>
  79. <CommonShare />
  80. </div>
  81. </div>
  82. </div>
  83. </div>
  84. </LayoutContainer>
  85. </template>
  86. <script setup lang="ts">
  87. import 'vue3-carousel/dist/carousel.css'
  88. import { useDisplay } from 'vuetify'
  89. import { useEntityFetch } from '~/composables/data/useEntityFetch'
  90. import JobPosting from '~/models/Maestro/JobPosting'
  91. import DateUtils from '~/services/utils/dateUtils'
  92. const { mdAndUp, smAndDown } = useDisplay()
  93. const route = useRoute()
  94. const { fetch } = useEntityFetch()
  95. const jobId: number = parseInt(route.params.id as string)
  96. if (!jobId || isNaN(jobId)) {
  97. throw new Error('Missing or invalid id')
  98. }
  99. const { data: job, pending } = fetch(JobPosting, jobId)
  100. const formatDate = (date: string) => {
  101. if (!date) {
  102. return '-'
  103. }
  104. return DateUtils.format(new Date(date), 'dd/MM/yyyy')
  105. }
  106. const dialog: Ref<boolean> = ref(false)
  107. const apply = () => {
  108. dialog.value = true
  109. }
  110. </script>
  111. <style scoped lang="scss">
  112. .progress {
  113. margin: 32px auto 128px auto;
  114. }
  115. .job-section {
  116. margin: 32px 0;
  117. h3 {
  118. font-size: 32px;
  119. width: 100%;
  120. text-align: center;
  121. text-transform: uppercase;
  122. }
  123. .details {
  124. padding: 0 20%;
  125. background-color: var(--secondary-color);
  126. color: var(--on-secondary-color);
  127. height: 10rem;
  128. @media (max-width: 600px) {
  129. height: auto;
  130. }
  131. .v-row {
  132. width: 90%;
  133. margin-left: auto;
  134. margin-right: auto;
  135. }
  136. div {
  137. margin: 12px 0;
  138. font-weight: 500;
  139. font-size: 25px;
  140. line-height: 18px;
  141. @media (max-width: 600px) {
  142. font-size: 16px;
  143. }
  144. }
  145. }
  146. .description {
  147. color: var(--on-neutral-color);
  148. font-size: 21px;
  149. font-weight: 500;
  150. line-height: 2.125rem;
  151. padding: 12px 36px;
  152. }
  153. }
  154. @media (max-width: 600px) {
  155. .job-section {
  156. margin: 32px 6%;
  157. }
  158. }
  159. .btn-apply {
  160. background: var(--secondary-color);
  161. color: var(--on-secondary-color);
  162. display: flex;
  163. left: 0;
  164. padding: 25px 28px;
  165. align-items: center;
  166. gap: 9px;
  167. font-size: 0.9rem;
  168. border-radius: 5px;
  169. font-weight: 700;
  170. line-height: 15px;
  171. letter-spacing: 1.3px;
  172. text-transform: uppercase;
  173. margin-bottom: -1rem;
  174. }
  175. </style>