MissionDetail.vue 4.6 KB

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