MissionDetail.vue 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200
  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>{{ 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>
  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"> Je postule </v-btn>
  61. </v-row>
  62. <v-row class="d-flex justify-space-between center-90">
  63. <p>MOTS CLÉS</p>
  64. <div v-if="mdAndUp">
  65. <p>PARTAGER</p>
  66. </div>
  67. </v-row>
  68. <v-row class="d-flex justify-space-between mb-8 center-90">
  69. <p class="key-word mt-3">
  70. <span v-for="tag in job.tags" :key="tag.id" class="mr-2">
  71. {{ tag.name }}
  72. </span>
  73. </p>
  74. <CommonShare v-if="mdAndUp" />
  75. </v-row>
  76. <div v-if="smAndDown">
  77. <p>PARTAGER</p>
  78. <CommonShare />
  79. </div>
  80. </div>
  81. </div>
  82. </div>
  83. </LayoutContainer>
  84. </template>
  85. <script setup lang="ts">
  86. import 'vue3-carousel/dist/carousel.css'
  87. import { useDisplay } from 'vuetify'
  88. import { useEntityFetch } from '~/composables/data/useEntityFetch'
  89. import JobPosting from '~/models/Maestro/JobPosting'
  90. import DateUtils from '~/services/utils/dateUtils'
  91. const { mdAndUp, smAndDown } = useDisplay()
  92. const route = useRoute()
  93. const { fetch } = useEntityFetch()
  94. const jobId: number = parseInt(route.params.id as string)
  95. if (!jobId || isNaN(jobId)) {
  96. throw new Error('Missing or invalid id')
  97. }
  98. const { data: job, pending } = fetch(JobPosting, jobId)
  99. const formatDate = (date: string) => {
  100. console.log(date)
  101. if (!date) {
  102. return '-'
  103. }
  104. return DateUtils.format(new Date(date), 'dd/MM/yyyy')
  105. }
  106. </script>
  107. <style scoped lang="scss">
  108. .progress {
  109. margin: 32px auto 128px auto;
  110. }
  111. .job-section {
  112. margin: 32px 0;
  113. h3 {
  114. font-size: 32px;
  115. width: 100%;
  116. text-align: center;
  117. text-transform: uppercase;
  118. }
  119. .details {
  120. padding: 0 20%;
  121. background-color: var(--secondary-color);
  122. color: var(--on-secondary-color);
  123. height: 10rem;
  124. @media (max-width: 600px) {
  125. height: auto;
  126. }
  127. .v-row {
  128. width: 90%;
  129. margin-left: auto;
  130. margin-right: auto;
  131. }
  132. div {
  133. margin: 12px 0;
  134. font-weight: 500;
  135. font-size: 25px;
  136. line-height: 18px;
  137. @media (max-width: 600px) {
  138. font-size: 16px;
  139. }
  140. }
  141. }
  142. .description {
  143. color: var(--on-neutral-color);
  144. font-size: 21px;
  145. font-weight: 500;
  146. line-height: 2.125rem;
  147. padding: 12px 36px;
  148. }
  149. }
  150. @media (max-width: 600px) {
  151. .job-section {
  152. margin: 32px 6%;
  153. }
  154. }
  155. .btn-apply {
  156. background: var(--secondary-color);
  157. color: var(--on-secondary-color);
  158. display: flex;
  159. left: 0;
  160. padding: 25px 28px;
  161. align-items: center;
  162. gap: 9px;
  163. font-size: 0.9rem;
  164. border-radius: 5px;
  165. font-weight: 700;
  166. line-height: 15px;
  167. letter-spacing: 1.3px;
  168. text-transform: uppercase;
  169. margin-bottom: -1rem;
  170. }
  171. </style>