MissionDetail.vue 4.6 KB

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