MissionDetail.vue 4.3 KB

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