MissionDetail.vue 4.7 KB

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