MissionDetail.vue 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209
  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="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. Location :
  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>
  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 v-if="mdAndUp">
  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 v-if="mdAndUp" />
  91. </v-row>
  92. <div v-if="smAndDown">
  93. <p>PARTAGER</p>
  94. <CommonShare />
  95. </div>
  96. </div>
  97. </div>
  98. </div>
  99. </LayoutContainer>
  100. </template>
  101. <script setup lang="ts">
  102. import "vue3-carousel/dist/carousel.css";
  103. import { useEntityFetch } from "~/composables/data/useEntityFetch";
  104. import JobPosting from "~/models/Maestro/JobPosting";
  105. import DateUtils from "~/services/utils/dateUtils";
  106. import { useDisplay } from "vuetify";
  107. const { mdAndUp, smAndDown } = useDisplay()
  108. const route = useRoute();
  109. const { fetch } = useEntityFetch()
  110. const jobId: number = parseInt(route.params.id as string)
  111. if (!jobId || isNaN(jobId)) {
  112. throw new Error('Missing or invalid id')
  113. }
  114. const { data: job, pending } = fetch(JobPosting, jobId)
  115. const formatDate = (date: string) => {
  116. console.log(date)
  117. if (!date) {
  118. return "-"
  119. }
  120. return DateUtils.format(new Date(date), "dd/MM/yyyy")
  121. };
  122. </script>
  123. <style scoped lang="scss">
  124. .progress {
  125. margin: 32px auto 128px auto;
  126. }
  127. .job-section {
  128. margin: 32px 12%;
  129. .details {
  130. background-color: var(--secondary-color);
  131. color: var(--on-secondary-color);
  132. height: 10rem;
  133. @media (max-width: 600px) {
  134. height: auto;
  135. }
  136. .v-row {
  137. width: 90%;
  138. margin-left: auto;
  139. margin-right: auto;
  140. }
  141. div {
  142. margin: 12px 0;
  143. font-weight: 500;
  144. font-size: 25px;
  145. line-height: 18px;
  146. @media (max-width: 600px) {
  147. font-size: 16px;
  148. }
  149. }
  150. }
  151. .description {
  152. color: var(--primary-color);
  153. text-align: justify;
  154. font-size: 1.875rem;
  155. font-weight: 500;
  156. line-height: 2.125rem;
  157. }
  158. }
  159. @media (max-width: 600px) {
  160. .job-section {
  161. margin: 32px 6%;
  162. }
  163. }
  164. .btn-apply {
  165. background: var(--secondary-color);
  166. color: var(--neutral-color);
  167. display: flex;
  168. left: 0;
  169. padding: 25px 28px;
  170. align-items: center;
  171. gap: 9px;
  172. font-size: 0.9rem;
  173. border-radius: 5px;
  174. font-weight: 700;
  175. line-height: 15px;
  176. letter-spacing: 1.3px;
  177. text-transform: uppercase;
  178. margin-bottom: -1rem;
  179. }
  180. </style>