MissionDetail.vue 4.6 KB

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