MissionDetail.vue 4.2 KB

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