@burh/nuxt-core 1.1.14 → 1.1.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,160 +1,159 @@
1
1
  <template>
2
- <interface-spa
3
- :class="isMobileOnlyWatch ? 'interface-spa--mobile' : ''"
4
- classesHeader="jobs-aside--header"
5
- classesAside="jobs-aside"
6
- class="printable"
7
- asideSize="big"
8
- >
9
- <burh-modals
10
- slot="interface-header"
11
- :render="['phone', 'address']"
12
- :active="activeModal"
13
- v-on:modal-close="clearActive($event)"
14
- v-on:updatedOtherInformations="setUpdatedOtherInformations($event)"
15
- :title="'Aviso'"
16
- :description="`Para se candidatar é necessário informar seu ${activeModal == 'phone' ? 'telefone': 'endereço'}`"
17
- >
18
- </burh-modals>
19
-
20
- <div class="interface-spa__filter" slot="interface-header">
21
-
22
- <span class="d-block bg-lighter px-4 w-100 h-100" v-if="isMobileOnlyWatch" v-on:click="toggleFilterMobile()">
23
- <!-- <font-awesome-icon :icon="['fas', 'chevron-down']" /> Sorocaba - CLT, PJ Sorocaba - CLT, PJ Sorocaba - CLT, PJ -->
24
- <font-awesome-icon :icon="['fas', 'filter']" class="mr-2" /> <span>Filtros Avançados</span>
25
- </span>
26
- <h4 class="interface-spa__filter__header" v-on:click="toggleFilterMobile()">
27
- <font-awesome-icon :icon="['fas', 'chevron-left']" class="mr-2" /> <span>Filtros avançados</span>
28
- </h4>
29
- <div class="interface-spa__filter__fields">
30
- <auto-complete :valueDefault="city" :preventDefaultValue="true" v-on:change="onAutoCompleteChange($event)" txtPlaceholder="Cidade" :request="true" :doRequest="funcRequest" :listWords="['itu', 'itupeva', 'sorocaba', 'votorantim', 'salto', 'salto de pirapora']" class="mr-2"/>
31
-
32
- <base-input class="mr-2">
33
- <el-select
34
- v-model="selects.hiringType"
35
- filterable
36
- placeholder="Tipo de contratação"
37
- popper-class="z-master"
38
- @change="searchParams()"
39
- >
40
- <el-option
41
- v-for="option in hiringType"
42
- :key="option.label"
43
- :label="option.label"
44
- :value="option.label"
45
- ></el-option>
46
- </el-select>
47
- </base-input>
48
- <base-input class="mr-2">
49
- <el-select
50
- v-model="selects.date"
51
- filterable
52
- placeholder="Tempo de Abertura"
53
- popper-class="z-master"
54
- @change="searchParams()"
55
- >
56
- <el-option
57
- v-for="option in date"
58
- :key="option.label"
59
- :label="option.label"
60
- :value="option.value"
61
- ></el-option>
62
- </el-select>
63
- </base-input>
64
- <base-input class="mr-2">
65
- <el-select
66
- v-model="selects.handicapped"
67
- filterable
68
- placeholder="PCD"
69
- popper-class="z-master"
70
- @change="searchParams()"
71
- >
72
- <el-option
73
- v-for="option in handicapped"
74
- :key="option.label"
75
- :label="option.label"
76
- :value="option.value"
77
- ></el-option>
78
- </el-select>
79
- </base-input>
80
-
81
- <button class="btn btn-primary btn-sm btn-block mt-4" v-if="isMobileOnlyWatch" v-on:click="toggleFilterMobile()">Aplicar filtro</button>
82
- </div>
83
- </div>
84
-
85
- <div v-if="!isMobileOnlyWatch" slot="aside-header" class="d-flex">
86
- <template v-if="details != null && details.total != null">
87
- Página {{currentPage}} de {{details.total}} vagas.
88
- <br />
89
- </template>
90
- </div>
91
-
92
- <ul class="list-unstyled search__list" slot="aside-body">
93
- <template v-if="!searchEmpty">
94
- <li class="search__list__item" v-if="(jobs == null || jobs.length <= 0)">
95
- <div class="card card--job cursor-pointer skeleton">
96
- <div class="card-header">
97
- <span class="avatar rounded-circle">
98
- </span>
99
- <ul class="card__controls list-inline">
100
- <li class="list-inline-item"></li>
101
- <li class="list-inline-item"></li>
102
- </ul>
103
- </div>
104
- <div class="card-body">
105
- <span class="card__company"></span>
106
- <h5 class="card-title"></h5>
107
- <span class="card__local"></span>
108
- </div>
109
- <div class="card-footer">
110
- <p class="card__published"></p>
111
- </div>
112
- </div>
113
- </li>
114
- </template>
115
- <template v-if="!searchEmpty">
116
- <li class="search__list__item" v-for="(job, index) in jobs" :key="job.job_id" :class="{'search__list__item--opened': details != null && job.job_id == details.job_id}">
117
- <opportunityCard
118
- v-on:share-click="onClickShareJob"
119
- v-on:save-click="onClickSaveJob(job)"
120
- v-on:card-click="featureDetails(job.job_id, index)"
121
- v-on:avatar-click="featureDetails(job.job_id, index)"
122
- v-on:company-name-click="featureDetails(job.job_id, index)"
123
- :fullHeart="job.subscription != null && job.subscription.user_bookmarked"
124
- :link="job.job_id"
125
- :img="!job.private ? job.company_logo : '/img/content/logoempresaconfidencial.png'"
126
- :title="job.job_title"
127
- :date="job.created_at"
128
- :href="''"
129
- :company="!job.private ? job.company_name : 'Empresa Confidencial'"
130
- :local="job.city_name"
131
- :pcd="job.handicapped"
132
- ></opportunityCard>
133
- </li>
134
- <li class="p-4">
135
- <v-pagination
136
- v-if="details.last_page != null"
137
- v-model="currentPage"
138
- :classes="bootstrapPaginationClasses"
139
- :labels="paginationAnchorTexts"
140
- :page-count="details.last_page"
141
- ></v-pagination>
142
- </li>
143
- </template>
144
- <template v-if="searchEmpty && isMobileOnlyWatch">
145
- <li class="search__list__item">
146
- <div class="p-4">
147
- <h2 class="display-3 mt-5">Sem Resultados</h2>
148
- <p>Para conseguir mais resultados, tente ajustar alterando a sua busca ou verifique se a Burh já esta disponível em sua cidade.</p>
149
- <button class="btn btn-sm btn-outline-primary" @click="$router.push('/busca')">Ver sugestões</button>
150
- </div>
151
- </li>
152
- </template>
153
- <share-modal :show="modals" :url="jobLinkShare" />
154
- </ul>
155
-
156
-
157
- <!-- <div slot="aside-footer" class="d-none d-sm-block">
2
+ <interface-spa
3
+ :class="isMobileOnlyWatch ? 'interface-spa--mobile' : ''"
4
+ classesHeader="jobs-aside--header"
5
+ classesAside="jobs-aside"
6
+ class="printable"
7
+ asideSize="big"
8
+ >
9
+ <burh-modals
10
+ slot="interface-header"
11
+ :render="['phone', 'address']"
12
+ :active="activeModal"
13
+ v-on:modal-close="clearActive($event)"
14
+ v-on:updatedOtherInformations="setUpdatedOtherInformations($event)"
15
+ :title="'Aviso'"
16
+ :description="`Para se candidatar é necessário informar seu ${activeModal == 'phone' ? 'telefone': 'endereço'}`"
17
+ >
18
+ </burh-modals>
19
+
20
+ <div class="interface-spa__filter" slot="interface-header">
21
+
22
+ <span class="d-block bg-lighter px-4 w-100 h-100" v-if="isMobileOnlyWatch" v-on:click="toggleFilterMobile()">
23
+ <!-- <font-awesome-icon :icon="['fas', 'chevron-down']" /> Sorocaba - CLT, PJ Sorocaba - CLT, PJ Sorocaba - CLT, PJ -->
24
+ <font-awesome-icon :icon="['fas', 'filter']" class="mr-2" /> <span>Filtros Avançados</span>
25
+ </span>
26
+ <h4 class="interface-spa__filter__header" v-on:click="toggleFilterMobile()">
27
+ <font-awesome-icon :icon="['fas', 'chevron-left']" class="mr-2" /> <span>Filtros avançados</span>
28
+ </h4>
29
+ <div class="interface-spa__filter__fields">
30
+ <auto-complete :valueDefault="city" :preventDefaultValue="true" v-on:change="onAutoCompleteChange($event)" txtPlaceholder="Cidade" :request="true" :doRequest="funcRequest" :listWords="['itu', 'itupeva', 'sorocaba', 'votorantim', 'salto', 'salto de pirapora']" class="mr-2"/>
31
+
32
+ <base-input class="mr-2">
33
+ <el-select
34
+ v-model="selects.hiringType"
35
+ filterable
36
+ placeholder="Tipo de contratação"
37
+ popper-class="z-master"
38
+ @change="searchParams()"
39
+ >
40
+ <el-option
41
+ v-for="option in hiringType"
42
+ :key="option.label"
43
+ :label="option.label"
44
+ :value="option.label"
45
+ ></el-option>
46
+ </el-select>
47
+ </base-input>
48
+ <base-input class="mr-2">
49
+ <el-select
50
+ v-model="selects.date"
51
+ filterable
52
+ placeholder="Tempo de Abertura"
53
+ popper-class="z-master"
54
+ @change="searchParams()"
55
+ >
56
+ <el-option
57
+ v-for="option in date"
58
+ :key="option.label"
59
+ :label="option.label"
60
+ :value="option.value"
61
+ ></el-option>
62
+ </el-select>
63
+ </base-input>
64
+ <base-input class="mr-2">
65
+ <el-select
66
+ v-model="selects.handicapped"
67
+ filterable
68
+ placeholder="PCD"
69
+ popper-class="z-master"
70
+ @change="searchParams()"
71
+ >
72
+ <el-option
73
+ v-for="option in handicapped"
74
+ :key="option.label"
75
+ :label="option.label"
76
+ :value="option.value"
77
+ ></el-option>
78
+ </el-select>
79
+ </base-input>
80
+
81
+ <button class="btn btn-primary btn-sm btn-block mt-4" v-if="isMobileOnlyWatch" v-on:click="toggleFilterMobile()">Aplicar filtro</button>
82
+ </div>
83
+ </div>
84
+
85
+ <div v-if="!isMobileOnlyWatch" slot="aside-header" class="d-flex">
86
+ <template v-if="details != null && details.total != null">
87
+ Página {{currentPage}} de {{details.total}} vagas.
88
+ <br />
89
+ </template>
90
+ </div>
91
+
92
+ <ul class="list-unstyled search__list" slot="aside-body">
93
+ <template v-if="!searchEmpty">
94
+ <li class="search__list__item" v-if="(jobs == null || jobs.length <= 0)">
95
+ <div class="card card--job cursor-pointer skeleton">
96
+ <div class="card-header">
97
+ <span class="avatar rounded-circle">
98
+ </span>
99
+ <ul class="card__controls list-inline">
100
+ <li class="list-inline-item"></li>
101
+ <li class="list-inline-item"></li>
102
+ </ul>
103
+ </div>
104
+ <div class="card-body">
105
+ <span class="card__company"></span>
106
+ <h5 class="card-title"></h5>
107
+ <span class="card__local"></span>
108
+ </div>
109
+ <div class="card-footer">
110
+ <p class="card__published"></p>
111
+ </div>
112
+ </div>
113
+ </li>
114
+ </template>
115
+ <template v-if="!searchEmpty">
116
+ <li class="search__list__item" v-for="(job, index) in jobs" :key="job.job_id" :class="{'search__list__item--opened': details != null && job.job_id == details.job_id}">
117
+ <opportunityCard
118
+ v-on:share-click="onClickShareJob"
119
+ v-on:save-click="onClickSaveJob(job)"
120
+ v-on:card-click="featureDetails(job.job_id, index)"
121
+ v-on:avatar-click="featureDetails(job.job_id, index)"
122
+ v-on:company-name-click="featureDetails(job.job_id, index)"
123
+ :fullHeart="job.subscription != null && job.subscription.user_bookmarked"
124
+ :link="job.job_id"
125
+ :img="!job.private ? job.company_logo : '/img/content/logoempresaconfidencial.png'"
126
+ :title="job.job_title"
127
+ :date="job.created_at"
128
+ :href="''"
129
+ :company="!job.private ? job.company_name : 'Empresa Confidencial'"
130
+ :local="job.city_name"
131
+ :pcd="job.handicapped"
132
+ ></opportunityCard>
133
+ </li>
134
+ <li class="p-4">
135
+ <v-pagination
136
+ v-if="details.last_page != null"
137
+ v-model="currentPage"
138
+ :classes="bootstrapPaginationClasses"
139
+ :labels="paginationAnchorTexts"
140
+ :page-count="details.last_page"
141
+ ></v-pagination>
142
+ </li>
143
+ </template>
144
+ <template v-if="searchEmpty && isMobileOnlyWatch">
145
+ <li class="search__list__item">
146
+ <div class="p-4">
147
+ <h2 class="display-3 mt-5">Sem Resultados</h2>
148
+ <p>Para conseguir mais resultados, tente ajustar alterando a sua busca ou verifique se a Burh já esta disponível em sua cidade.</p>
149
+ <button class="btn btn-sm btn-outline-primary" @click="$router.push('/busca')">Ver sugestões</button>
150
+ </div>
151
+ </li>
152
+ </template>
153
+ <share-modal :show="modals" :url="jobLinkShare" />
154
+ </ul>
155
+
156
+ <!-- <div slot="aside-footer" class="d-none d-sm-block">
158
157
  <template v-if="jobs != null && jobs.length > 0">
159
158
  <font-awesome-icon :icon="['far', 'eye']" />
160
159
  <small>
@@ -164,538 +163,540 @@
164
163
  </template>
165
164
  </div> -->
166
165
 
167
- <!-- <job-detail :title="this.details.title" :img="this.details.img" :location="this.details.location" :company="this.details.company" :description="this.details.description"></job-detail> -->
168
- <job-detail
169
- class="skeleton"
170
- :link="''"
171
- v-if="jobs == null || jobs.length <= 0"
172
- slot="content"
173
- :title="''"
174
- :hiring="''"
175
- :img="''"
176
- :location="''"
177
- :company="''"
178
- :description="''"
179
- :benefits="[]"
180
- :company_private="true"
181
- :searchEmpty="searchEmpty"
182
- :skeleton="true"
183
- ></job-detail>
184
-
185
- <job-detail
186
- v-on:share-click="onClickShareJob"
187
- v-on:save-click="onClickSaveJobDetail(details)"
188
- :link="this.details.job_id"
189
- v-if="this.details.total"
190
- slot="content"
191
- :fullHeart="this.details.user_bookmarked"
192
- :title="this.details.title"
193
- :hiring="this.details.hiring"
194
- :img="this.details.img"
195
- :location="this.details.location"
196
- :company="this.details.company"
197
- :description="this.details.description"
198
- :benefits="this.details.benefits"
199
- :company_private="this.details.private"
200
- :company_slug="this.details.company_slug"
201
- :applied="this.details.applied"
202
- :canUnSubscribe="this.details.can_unsubscribe"
203
- :handicapped="this.details.handicapped"
204
- :salary="this.details.salary"
205
- :searchEmpty="searchEmpty"
206
- v-on:apply-to-job="applyToJob($event)"
207
- >
208
- <div class="row printable__qrcode" slot="qrcode">
209
- <div class="col mb-4">
210
- <div class="qr-code">
211
- <qrcode
212
- :value="baseUrl +'/'+ details.link"
213
- :options="{ width: 156, height: 156 }"
214
- class="border"
215
- ></qrcode>
216
- </div>
217
- </div>
218
- </div>
219
- </job-detail>
220
-
221
- <div class="job-detail__footer d-flex w-100 justify-content-end" slot="footer-content">
222
- <div class="box-payment mr-md-4">
223
- <span class="text-muted d-block">Salário</span>
224
- <bpInterfaceSpa class="lead">R$ {{this.details.salary}}</bpInterfaceSpa>
225
- </div>
226
- <button class="btn btn-primary" @click="applyToJob()">Candidatar-se</button>
227
- </div>
228
- </interface-spa>
166
+ <!-- <job-detail :title="this.details.title" :img="this.details.img" :location="this.details.location" :company="this.details.company" :description="this.details.description"></job-detail> -->
167
+ <job-detail
168
+ class="skeleton"
169
+ :link="''"
170
+ v-if="jobs == null || jobs.length <= 0"
171
+ slot="content"
172
+ :title="''"
173
+ :hiring="''"
174
+ :img="''"
175
+ :location="''"
176
+ :company="''"
177
+ :description="''"
178
+ :benefits="[]"
179
+ :company_private="true"
180
+ :searchEmpty="searchEmpty"
181
+ :skeleton="true"
182
+ ></job-detail>
183
+
184
+ <job-detail
185
+ v-on:share-click="onClickShareJob"
186
+ v-on:save-click="onClickSaveJobDetail(details)"
187
+ :link="this.details.job_id"
188
+ v-if="this.details.total"
189
+ slot="content"
190
+ :fullHeart="this.details.user_bookmarked"
191
+ :title="this.details.title"
192
+ :hiring="this.details.hiring"
193
+ :img="this.details.img"
194
+ :location="this.details.location"
195
+ :company="this.details.company"
196
+ :description="this.details.description"
197
+ :benefits="this.details.benefits"
198
+ :company_private="this.details.private"
199
+ :company_slug="this.details.company_slug"
200
+ :applied="this.details.applied"
201
+ :canUnSubscribe="this.details.can_unsubscribe"
202
+ :handicapped="this.details.handicapped"
203
+ :salary="this.details.salary"
204
+ :searchEmpty="searchEmpty"
205
+ v-on:apply-to-job="applyToJob($event)"
206
+ >
207
+ <div class="row printable__qrcode" slot="qrcode">
208
+ <div class="col mb-4">
209
+ <div class="qr-code">
210
+ <qrcode
211
+ :value="baseUrl +'/'+ details.link"
212
+ :options="{ width: 156, height: 156 }"
213
+ class="border"
214
+ ></qrcode>
215
+ </div>
216
+ </div>
217
+ </div>
218
+ </job-detail>
219
+
220
+ <div class="job-detail__footer d-flex w-100 justify-content-end" slot="footer-content">
221
+ <div class="box-payment mr-md-4">
222
+ <span class="text-muted d-block">Salário</span>
223
+ <bpInterfaceSpa class="lead">R$ {{this.details.salary}}</bpInterfaceSpa>
224
+ </div>
225
+ <button class="btn btn-primary" @click="applyToJob()">Candidatar-se</button>
226
+ </div>
227
+ </interface-spa>
229
228
  </template>
230
229
  <script>
231
- import { isMobile, isMobileOnly } from "mobile-device-detect";
232
- import { Select, Option } from "element-ui";
233
- import jobDetail from "~/components/burh-ds/Jobs/JobDetail.vue";
234
- import InterfaceSpa from "~/components/burh-ds/InterfaceSpa/InterfaceSpa.vue";
235
- import opportunityCard from "~/components/burh-ds/Cards/OpportunityCard.vue";
236
- import ShareModal from "~/components/burh-ds/Modals/ShareModal.vue";
237
- import AutoComplete from "~/components/burh-ds/Input/AutoComplete.vue";
238
- import https from "https";
230
+ import { isMobile, isMobileOnly } from 'mobile-device-detect';
231
+ import { Select, Option } from 'element-ui';
232
+ import jobDetail from '~/components/burh-ds/Jobs/JobDetail.vue';
233
+ import InterfaceSpa from '~/components/burh-ds/InterfaceSpa/InterfaceSpa.vue';
234
+ import opportunityCard from '~/components/burh-ds/Cards/OpportunityCard.vue';
235
+ import ShareModal from '~/components/burh-ds/Modals/ShareModal.vue';
236
+ import AutoComplete from '~/components/burh-ds/Input/AutoComplete.vue';
237
+ import https from 'https';
239
238
  import swal from 'sweetalert2';
240
- import BurhModals from "@/pages/burh/modals/modals";
239
+ import BurhModals from '@/pages/burh/modals/modals';
241
240
  import { getCookie } from '~/util/cookie';
242
- import {userSaveJob} from '~/services/user'
243
-
241
+ import { userSaveJob } from '~/services/user';
244
242
 
245
243
  export default {
246
- name: "search-slug",
247
- components: {
248
- InterfaceSpa,
249
- opportunityCard,
250
- jobDetail,
251
- [Select.name]: Select,
252
- [Option.name]: Option,
253
- ShareModal,
254
- BurhModals,
255
- AutoComplete
256
- },
257
- props: ['searchData'],
258
- watch:{
259
- '$store.state.localStorage.currentUser'(newValue){
260
- this.currentUser = newValue;
261
- },
262
- $route (to, from){
263
- this.term = to.query.term;
264
- if (from.query.term != to.query.term) {
265
- this.search(1, true);
266
- }
267
- },
268
- currentPage(newValue) {
269
- this.searchParams(newValue);
270
- }
271
- },
272
-
273
- async mounted() {
274
- this.currentUser = this.$store.state.localStorage.currentUser;
275
- this.isMobileOnlyWatch = isMobileOnly;
276
-
277
- if(this.city == null) {
278
- this.city = await this.$location();
279
- }
280
-
281
- this.onLoadSearch();
282
- },
283
-
284
- updated() {
285
- this.selects.handicapped = this.$route.query.handicapped
286
- ? this.$route.query.handicapped == "true"
287
- ? "Sim"
288
- : "Não"
289
- : "";
290
- this.selects.hiringType = this.$route.query.type
291
- ? this.$route.query.type
292
- : "";
293
- // this.autoComplete();
294
- },
295
-
296
- data() {
297
- return {
298
- city: null,
299
- currentUser: null,
300
- funcRequest: {"request": this.doSearchCities},
301
- isMobileOnlyWatch: false,
302
- searching: false,
303
- bootstrapPaginationClasses: {
304
- ul: 'pagination pagination-sm',
305
- li: 'page-item',
306
- liActive: 'active',
307
- liDisable: 'disabled',
308
- button: 'page-link'
309
- },
310
- paginationAnchorTexts: {
311
- first: false,
312
- prev: 'Anterior',
313
- next: 'Próximo',
314
- last: false,
315
- },
316
- pagination: {
317
- default: 1,
318
- last: 1
319
- },
320
- baseUrl: process.env.baseAppUrl,
321
- userPhoneNumber: null,
322
- activeModal: '',
323
- jobLinkShare: "",
324
- modals: {
325
- modal0: false
326
- },
327
- autocomplete: null,
328
- jobs: [],
329
- currentresult: 15,
330
- details: {
331
- img: "",
332
- title: "",
333
- description: "",
334
- location: "",
335
- company: "",
336
- salary: null,
337
- total: 0,
338
- hiring: "",
339
- private: false,
340
- link: "",
341
- job_id: null,
342
- company_slug: null,
343
- applied: null,
344
- can_unsubscribe: null,
345
- user_bookmarked: null,
346
- index: null,
347
- },
348
- loading: false,
349
- address: "",
350
- handicapped: [
351
- {
352
- label: "Sim",
353
- value: true
354
- },
355
- {
356
- label: "Não",
357
- value: false
358
- }
359
- ],
360
- date: [
361
- {
362
- label: "90 dias",
363
- value: 90
364
- },
365
- {
366
- label: "60 dias",
367
- value: 60
368
- },
369
- {
370
- label: "30 dias",
371
- value: 30
372
- },
373
- {
374
- label: "15 dias",
375
- value: 15
376
- },
377
- {
378
- label: "7 dias",
379
- value: 7
380
- },
381
- {
382
- label: "Hoje",
383
- value: 1
384
- }
385
- ],
386
- hiringType: [
387
- {
388
- label: "Todos",
389
- value: 1
390
- },
391
- {
392
- label: "CLT",
393
- value: 2
394
- },
395
- {
396
- label: "CNPJ",
397
- value: 3
398
- },
399
- {
400
- label: "Estágio",
401
- value: 4
402
- },
403
- {
404
- label: "RPA",
405
- value: 5
406
- },
407
- {
408
- label: "Temporário",
409
- value: 6
410
- }
411
- ],
412
- searchEmpty: false,
413
- selects: this.searchData.selects,
414
- term: this.searchData.term,
415
- city: this.searchData.city,
416
- currentPage: this.searchData.currentPage
417
- };
418
- },
419
-
420
- methods: {
421
- async onClickSaveJob(item){
422
- if ( this.currentUser == null ) {
423
- swal.fire({
424
- title: `Aviso`,
425
- html: `Você precisa estar logado para realizar esta função.`,
426
- buttonsStyling: false,
427
- confirmButtonClass: 'btn btn-primary btn-fill',
428
- });
429
- return;
430
- }
431
-
432
- if(await userSaveJob(item.job_id, item.subscription.user_bookmarked)) {
433
- item.subscription.user_bookmarked = !item.subscription.user_bookmarked;
434
- if (item.job_id == this.details.job_id) {
435
- this.details.user_bookmarked = item.subscription.user_bookmarked ;
436
- }
437
- }
438
- },
439
-
440
- async onClickSaveJobDetail(item){
441
- if ( this.currentUser == null ) {
442
- swal.fire({
443
- title: `Aviso`,
444
- html: `Você precisa estar logado para realizar esta função.`,
445
- buttonsStyling: false,
446
- confirmButtonClass: 'btn btn-primary btn-fill',
447
- });
448
- return;
449
- }
450
-
451
- if(await userSaveJob(item.job_id, item.user_bookmarked)) {
452
- item.user_bookmarked = !item.user_bookmarked;
453
- this.jobs[item.index].subscription.user_bookmarked = item.user_bookmarked;
454
- }
455
- },
456
-
457
- onAutoCompleteChange(e) {
458
- if(e == this.$route.query.city) {
459
- return;
460
- }
461
- this.city = e.split(`,`)[0].replace('value:','');
462
- this.searchParams();
463
- },
464
-
465
- async doSearchCities(key = null){
466
- let {data} = await this.$axios.get(process.env.routes.api.searchCities.replace(':hash',key));
467
- let items = [...new Set(data.data.cities)]; //remove cities duplicated
468
- return items;
469
- },
470
-
471
- onLoadSearch() {
472
- this.search(1, false);
473
- },
474
- openModal(modal, data = null, index = null) {
475
- //this.index = index;
476
- this.activeModal = modal;
477
- //this.userData = data;
478
- document.body.classList.add("modal-open");
479
- document.body.classList.add("no-scroll");
480
- },
481
-
482
- clearActive(e) {
483
- this.activeModal = "";
484
- //this.userData = null;
485
- document.body.classList.remove("no-scroll");
486
- document.body.classList.remove("modal-open");
487
- document.getElementsByTagName("html")[0].classList.remove("modal-open");
488
- },
489
-
490
- getUserPhoneNumber(){
491
- if(this.currentUser.contact != null && this.currentUser.contact.cellphone){
492
- this.userPhoneNumber = this.currentUser.contact.cellphone;
493
- }else{
494
- this.userPhoneNumber = null;
495
- }
496
- },
497
- jobsLeft() {
498
- if(this.details.total == null || this.jobs == null) { return 0 }
499
- return this.details.total - this.jobs.length;
500
- },
501
- async applyToJob(applied) {
502
- if(this.currentUser == null) {
503
- swal.fire({
504
- title: `Login necessário`,
505
- html: necessário ter uma conta e estar credenciado para realizar essa ação.`,
506
- buttonsStyling: false,
507
- confirmButtonText: 'Ir para login',
508
- confirmButtonClass: 'btn btn-primary btn-fill',
509
- showCancelButton: true,
510
- cancelButtonText: 'Cancelar',
511
- cancelButtonClass: 'btn btn-outline-default btn-fill',
512
- reverseButtons: true
513
- }).then((result) => {
514
- if(result.value) {
515
- let rollback = this.$route.fullPath;
516
-
517
- this.$router.push('/entrar?rollback=' + rollback);
518
- }
519
- });
520
- } else if(this.currentUser.profile_completion >= 60) {
521
-
522
- this.getUserPhoneNumber();
523
-
524
- if (this.userPhoneNumber == null && applied == true){
525
- this.openModal('phone');
526
- return;
527
- }
528
-
529
- if (this.currentUser.profile_pendencies.includes('Endereço') && applied == true) {
530
- this.openModal('address');
531
- return;
532
- }
533
-
534
- let obj = {
535
- data: {
536
- job_id: this.details.job_id,
537
- user_id: this.currentUser.user_id
538
- }
539
- }
540
-
541
- let {data} = await this.$axios.post(process.env.routes.api.user.applyToJob, obj, {
542
- headers: {
543
- Authorization: `Bearer ${this.$store.state.localStorage.token}`
544
- }
545
- });
546
-
547
- this.details.applied = applied;
548
- this.details.can_unsubscribe = true;
549
- let index = this.jobs.findIndex(job => job.job_id === this.details.job_id);
550
- if(index != -1) { //equal -1 job_id is not found.
551
- this.jobs[index].subscription.applied = applied
552
- }
553
-
554
- swal.fire({
555
- title: `${applied ? "Inscrição realizada com sucesso" : "Você saiu dessa vaga"}`,
556
- buttonsStyling: false,
557
- confirmButtonClass: 'btn btn-primary btn-fill'
558
- });
559
- } else if(this.details.applied){
560
- let obj = {
561
- data:{
562
- job_id: this.details.job_id,
563
- user_id: this.currentUser.user_id
564
- }
565
- }
566
-
567
- let {data} = await this.$axios.post(process.env.routes.api.user.applyToJob, obj, {
568
- headers: {
569
- Authorization: `Bearer ${this.$store.state.localStorage.token}`
570
- }
571
- });
572
-
573
- swal.fire({
574
- title: {"Você saiu dessa vaga": !this.details.applied },
575
- buttonsStyling: false,
576
- confirmButtonClass: 'btn btn-primary btn-fill'
577
- });
578
-
579
- this.details.applied = !this.details.applied;
580
- let index = this.jobs.findIndex(job => job.job_id === this.details.job_id);
581
- if(index != -1) { //equal -1 job_id is not found.
582
- this.jobs[index].subscription.applied = this.details.applied;
583
- }
584
-
585
- } else {
586
- swal.fire({
587
- title: `Perfil Incompleto`,
588
- html: `Alguma das informações que faltam em seu perfil: ${this.currentUser.profile_pendencies.join(', ')}`,
589
- buttonsStyling: false,
590
- confirmButtonClass: 'btn btn-primary btn-fill',
591
- showCancelButton: true,
592
- cancelButtonText: 'Cancelar',
593
- cancelButtonClass: 'btn btn-outline-default btn-fill',
594
- reverseButtons: true
595
- });
596
- }
597
- },
598
- onClickShareJob(idJob) {
599
- this.jobLinkShare = process.env.baseAppUrl + "/vagas/" + idJob;
600
- this.modals.modal0 = true;
601
- },
602
- async search(page, reset) {
603
- this.searching = true;
604
- let search = {
605
- city: this.city == null || this.city.trim() == '' ? null : this.city,
606
- date_posted: this.$route.query.date
607
- ? parseInt(this.$route.query.date)
608
- : 90,
609
- query: this.$route.query.term ? this.$route.query.term : "",
610
- handicapped: this.$route.query.handicapped
611
- ? this.$route.query.handicapped == "true"
612
- ? true
613
- : false
614
- : "",
615
- hiring_type: this.$route.query.type ? this.$route.query.type : null
616
- };
617
-
618
- let response = await this.$axios.post(`${process.env.baseApiUrl}/nb/jobs/search?page=${page ? page : 1}${this.$store.state.localStorage.currentUser ? "&id=" + this.$store.state.localStorage.currentUser.user_id :''}`, search, {
619
- headers: {
620
- 'Content-Type': 'application/json',
621
- 'Authorization': `Bearer ${this.$store.state.localStorage.token}`
622
- },
623
- httpsAgent: new https.Agent({
624
- rejectUnauthorized: false
625
- })
626
- });
627
- this.details.total = response.data.data.total;
628
- this.details.last_page = response.data.data.last_page;
629
- this.jobs = response.data.data.data;
630
-
631
- var text = "";
632
- if (this.details.total > 0) {
633
- this.getDetails(this.jobs[0].job_id);
634
- if (this.$route.query.term) {
635
- text = `Página 1 de ${this.details.total} vagas de ${this.$route.query.term}`;
636
- } else if (this.details.total > 15) {
637
- text = `Página 1 de ${this.details.total - 5} vagas`;
638
- } else {
639
- text = "Resultados para sua busca";
640
- }
641
- this.searchEmpty = false;
642
- } else {
643
- text = "Não há resultados para sua busca";
644
- this.searchEmpty = true;
645
-
646
-
647
- //this.$router.push({ path: "/", query: { term: this.$route.query.term, city: this.$route.query.city ? this.$route.query.city : await this.$location(), type: this.$route.query.type, date: this.$route.query.date, page: 1, handicapped: this.$route.query.handicapped, error: "404_job"}, });
648
- }
649
- this.searchtext = text;
650
-
651
- this.currentresult = this.jobs.length;
652
- this.pagination.last = response.data.data.last_page;
653
- this.searching = false;
654
- },
655
- async featureDetails(id, index){
656
- await this.getDetails(id, index);
657
- this.goToDetails(id);
658
- },
659
-
660
- goToDetails(id){
661
- if(this.isMobileOnlyWatch){
662
- this.$router.push('/vagas/' + id);
663
- }
664
- },
665
-
666
- async getDetails(id, index = 0) {
667
- let jobs = this.jobs;
668
- let job = await jobs.filter(function(e) {
669
- return e.job_id == id;
670
- });
671
-
672
- this.details.job_id = id;
673
- this.details.index = index;
674
- this.details.img = job[0].company_logo;
675
- this.details.title = job[0].job_title;
676
- this.details.description = job[0].job_description;
677
- this.details.location = job[0].city_name;
678
- this.details.company = job[0].company_name;
679
- this.details.salary = job[0].salary;
680
- this.details.benefits = job[0].job_benefits ? job[0].job_benefits.length > 0 ? job[0].job_benefits : null : null;
681
- this.details.hiring = job[0].type_hiring;
682
- this.details.private = job[0].private;
683
- this.details.link = process.env.baseAppUrl + '/vagas/' + id;
684
- this.details.applied = job[0].subscription == null ? false : job[0].subscription.applied;
685
- this.details.can_unsubscribe = job[0].subscription == null ? false : job[0].subscription.can_unsubscribe;
686
- this.details.user_bookmarked = job[0].subscription == null ? false : job[0].subscription.user_bookmarked;
687
- this.details.handicapped = job[0].handicapped;
688
- this.details.company_slug = job[0].company_slug;
689
- },
690
-
691
- searchParams(page = 1) {
692
- window.location.href= `/busca?term=${this.term}&city=${this.city}&type=${this.selects.hiringType}&date=${this.selects.date}&handicapped=${this.selects.handicapped}&page=${page}`;
693
- },
694
- toggleFilterMobile: function() {
695
- let el = document.querySelector('.interface-spa.interface-spa--mobile');
696
- el.classList.toggle('opened');
697
- },
698
- }
244
+ name: 'search-slug',
245
+ components: {
246
+ InterfaceSpa,
247
+ opportunityCard,
248
+ jobDetail,
249
+ [Select.name]: Select,
250
+ [Option.name]: Option,
251
+ ShareModal,
252
+ BurhModals,
253
+ AutoComplete
254
+ },
255
+ props: ['searchData'],
256
+ watch:{
257
+ '$store.state.localStorage.currentUser'(newValue){
258
+ this.currentUser = newValue;
259
+ },
260
+ $route (to, from){
261
+ this.term = to.query.term;
262
+ if (from.query.term != to.query.term) {
263
+ this.search(1, true);
264
+ }
265
+ },
266
+ currentPage(newValue) {
267
+ this.searchParams(newValue);
268
+ }
269
+ },
270
+
271
+ async mounted() {
272
+ this.currentUser = this.$store.state.localStorage.currentUser;
273
+ this.isMobileOnlyWatch = isMobileOnly;
274
+
275
+ if(this.city == null) {
276
+ this.city = await this.$location();
277
+ }
278
+
279
+ this.onLoadSearch();
280
+ },
281
+
282
+ updated() {
283
+ this.selects.handicapped = this.$route.query.handicapped
284
+ ? this.$route.query.handicapped == 'true'
285
+ ? 'Sim'
286
+ : 'Não'
287
+ : '';
288
+ this.selects.hiringType = this.$route.query.type
289
+ ? this.$route.query.type
290
+ : '';
291
+ // this.autoComplete();
292
+ },
293
+
294
+ data() {
295
+ return {
296
+ city: null,
297
+ currentUser: null,
298
+ funcRequest: { 'request': this.doSearchCities },
299
+ isMobileOnlyWatch: false,
300
+ searching: false,
301
+ bootstrapPaginationClasses: {
302
+ ul: 'pagination pagination-sm',
303
+ li: 'page-item',
304
+ liActive: 'active',
305
+ liDisable: 'disabled',
306
+ button: 'page-link'
307
+ },
308
+ paginationAnchorTexts: {
309
+ first: false,
310
+ prev: 'Anterior',
311
+ next: 'Próximo',
312
+ last: false,
313
+ },
314
+ pagination: {
315
+ default: 1,
316
+ last: 1
317
+ },
318
+ baseUrl: process.env.baseAppUrl,
319
+ userPhoneNumber: null,
320
+ activeModal: '',
321
+ jobLinkShare: '',
322
+ modals: {
323
+ modal0: false
324
+ },
325
+ autocomplete: null,
326
+ jobs: [],
327
+ currentresult: 15,
328
+ details: {
329
+ img: '',
330
+ title: '',
331
+ description: '',
332
+ location: '',
333
+ company: '',
334
+ salary: null,
335
+ total: 0,
336
+ hiring: '',
337
+ private: false,
338
+ link: '',
339
+ job_id: null,
340
+ company_slug: null,
341
+ applied: null,
342
+ can_unsubscribe: null,
343
+ user_bookmarked: null,
344
+ index: null,
345
+ },
346
+ loading: false,
347
+ address: '',
348
+ handicapped: [
349
+ {
350
+ label: 'Sim',
351
+ value: true
352
+ },
353
+ {
354
+ label: 'Não',
355
+ value: false
356
+ }
357
+ ],
358
+ date: [
359
+ {
360
+ label: '90 dias',
361
+ value: 90
362
+ },
363
+ {
364
+ label: '60 dias',
365
+ value: 60
366
+ },
367
+ {
368
+ label: '30 dias',
369
+ value: 30
370
+ },
371
+ {
372
+ label: '15 dias',
373
+ value: 15
374
+ },
375
+ {
376
+ label: '7 dias',
377
+ value: 7
378
+ },
379
+ {
380
+ label: 'Hoje',
381
+ value: 1
382
+ }
383
+ ],
384
+ hiringType: [
385
+ {
386
+ label: 'Todos',
387
+ value: 1
388
+ },
389
+ {
390
+ label: 'CLT',
391
+ value: 2
392
+ },
393
+ {
394
+ label: 'PJ',
395
+ value: 3
396
+ },
397
+ {
398
+ label: 'Estágio',
399
+ value: 4
400
+ },
401
+ {
402
+ label: 'RPA',
403
+ value: 5
404
+ },
405
+ {
406
+ label: 'Temporário',
407
+ value: 6
408
+ },
409
+ {
410
+ label: 'Outros',
411
+ value: 8
412
+ }
413
+ ],
414
+ searchEmpty: false,
415
+ selects: this.searchData.selects,
416
+ term: this.searchData.term,
417
+ city: this.searchData.city,
418
+ currentPage: this.searchData.currentPage
419
+ };
420
+ },
421
+
422
+ methods: {
423
+ async onClickSaveJob(item){
424
+ if ( this.currentUser == null ) {
425
+ swal.fire({
426
+ title: 'Aviso',
427
+ html: 'Você precisa estar logado para realizar esta função.',
428
+ buttonsStyling: false,
429
+ confirmButtonClass: 'btn btn-primary btn-fill',
430
+ });
431
+ return;
432
+ }
433
+
434
+ if(await userSaveJob(item.job_id, item.subscription.user_bookmarked)) {
435
+ item.subscription.user_bookmarked = !item.subscription.user_bookmarked;
436
+ if (item.job_id == this.details.job_id) {
437
+ this.details.user_bookmarked = item.subscription.user_bookmarked ;
438
+ }
439
+ }
440
+ },
441
+
442
+ async onClickSaveJobDetail(item){
443
+ if ( this.currentUser == null ) {
444
+ swal.fire({
445
+ title: 'Aviso',
446
+ html: 'Você precisa estar logado para realizar esta função.',
447
+ buttonsStyling: false,
448
+ confirmButtonClass: 'btn btn-primary btn-fill',
449
+ });
450
+ return;
451
+ }
452
+
453
+ if(await userSaveJob(item.job_id, item.user_bookmarked)) {
454
+ item.user_bookmarked = !item.user_bookmarked;
455
+ this.jobs[item.index].subscription.user_bookmarked = item.user_bookmarked;
456
+ }
457
+ },
458
+
459
+ onAutoCompleteChange(e) {
460
+ if(e == this.$route.query.city) {
461
+ return;
462
+ }
463
+ this.city = e.split(',')[0].replace('value:', '');
464
+ this.searchParams();
465
+ },
466
+
467
+ async doSearchCities(key = null){
468
+ let { data } = await this.$axios.get(process.env.routes.api.searchCities.replace(':hash', key));
469
+ let items = [...new Set(data.data.cities)]; //remove cities duplicated
470
+ return items;
471
+ },
472
+
473
+ onLoadSearch() {
474
+ this.search(1, false);
475
+ },
476
+ openModal(modal, data = null, index = null) {
477
+ //this.index = index;
478
+ this.activeModal = modal;
479
+ //this.userData = data;
480
+ document.body.classList.add('modal-open');
481
+ document.body.classList.add('no-scroll');
482
+ },
483
+
484
+ clearActive(e) {
485
+ this.activeModal = '';
486
+ //this.userData = null;
487
+ document.body.classList.remove('no-scroll');
488
+ document.body.classList.remove('modal-open');
489
+ document.getElementsByTagName('html')[0].classList.remove('modal-open');
490
+ },
491
+
492
+ getUserPhoneNumber(){
493
+ if(this.currentUser.contact != null && this.currentUser.contact.cellphone){
494
+ this.userPhoneNumber = this.currentUser.contact.cellphone;
495
+ }else{
496
+ this.userPhoneNumber = null;
497
+ }
498
+ },
499
+ jobsLeft() {
500
+ if(this.details.total == null || this.jobs == null) { return 0; }
501
+ return this.details.total - this.jobs.length;
502
+ },
503
+ async applyToJob(applied) {
504
+ if(this.currentUser == null) {
505
+ swal.fire({
506
+ title: 'Login necessário',
507
+ html: 'É necessário ter uma conta e estar credenciado para realizar essa ação.',
508
+ buttonsStyling: false,
509
+ confirmButtonText: 'Ir para login',
510
+ confirmButtonClass: 'btn btn-primary btn-fill',
511
+ showCancelButton: true,
512
+ cancelButtonText: 'Cancelar',
513
+ cancelButtonClass: 'btn btn-outline-default btn-fill',
514
+ reverseButtons: true
515
+ }).then((result) => {
516
+ if(result.value) {
517
+ let rollback = this.$route.fullPath;
518
+
519
+ this.$router.push('/entrar?rollback=' + rollback);
520
+ }
521
+ });
522
+ } else if(this.currentUser.profile_completion >= 60) {
523
+
524
+ this.getUserPhoneNumber();
525
+
526
+ if (this.userPhoneNumber == null && applied == true){
527
+ this.openModal('phone');
528
+ return;
529
+ }
530
+
531
+ if (this.currentUser.profile_pendencies.includes('Endereço') && applied == true) {
532
+ this.openModal('address');
533
+ return;
534
+ }
535
+
536
+ let obj = {
537
+ data: {
538
+ job_id: this.details.job_id,
539
+ user_id: this.currentUser.user_id
540
+ }
541
+ };
542
+
543
+ let { data } = await this.$axios.post(process.env.routes.api.user.applyToJob, obj, {
544
+ headers: {
545
+ Authorization: `Bearer ${this.$store.state.localStorage.token}`
546
+ }
547
+ });
548
+
549
+ this.details.applied = applied;
550
+ this.details.can_unsubscribe = true;
551
+ let index = this.jobs.findIndex(job => job.job_id === this.details.job_id);
552
+ if(index != -1) { //equal -1 job_id is not found.
553
+ this.jobs[index].subscription.applied = applied;
554
+ }
555
+
556
+ swal.fire({
557
+ title: `${applied ? 'Inscrição realizada com sucesso' : 'Você saiu dessa vaga'}`,
558
+ buttonsStyling: false,
559
+ confirmButtonClass: 'btn btn-primary btn-fill'
560
+ });
561
+ } else if(this.details.applied){
562
+ let obj = {
563
+ data:{
564
+ job_id: this.details.job_id,
565
+ user_id: this.currentUser.user_id
566
+ }
567
+ };
568
+
569
+ let { data } = await this.$axios.post(process.env.routes.api.user.applyToJob, obj, {
570
+ headers: {
571
+ Authorization: `Bearer ${this.$store.state.localStorage.token}`
572
+ }
573
+ });
574
+
575
+ swal.fire({
576
+ title: { 'Você saiu dessa vaga': !this.details.applied },
577
+ buttonsStyling: false,
578
+ confirmButtonClass: 'btn btn-primary btn-fill'
579
+ });
580
+
581
+ this.details.applied = !this.details.applied;
582
+ let index = this.jobs.findIndex(job => job.job_id === this.details.job_id);
583
+ if(index != -1) { //equal -1 job_id is not found.
584
+ this.jobs[index].subscription.applied = this.details.applied;
585
+ }
586
+
587
+ } else {
588
+ swal.fire({
589
+ title: 'Perfil Incompleto',
590
+ html: `Alguma das informações que faltam em seu perfil: ${this.currentUser.profile_pendencies.join(', ')}`,
591
+ buttonsStyling: false,
592
+ confirmButtonClass: 'btn btn-primary btn-fill',
593
+ showCancelButton: true,
594
+ cancelButtonText: 'Cancelar',
595
+ cancelButtonClass: 'btn btn-outline-default btn-fill',
596
+ reverseButtons: true
597
+ });
598
+ }
599
+ },
600
+ onClickShareJob(idJob) {
601
+ this.jobLinkShare = process.env.baseAppUrl + '/vagas/' + idJob;
602
+ this.modals.modal0 = true;
603
+ },
604
+ async search(page, reset) {
605
+ this.searching = true;
606
+ let search = {
607
+ city: this.city == null || this.city.trim() == '' ? null : this.city,
608
+ date_posted: this.$route.query.date
609
+ ? parseInt(this.$route.query.date)
610
+ : 90,
611
+ query: this.$route.query.term ? this.$route.query.term : '',
612
+ handicapped: this.$route.query.handicapped
613
+ ? this.$route.query.handicapped == 'true'
614
+ ? true
615
+ : false
616
+ : '',
617
+ hiring_type: this.$route.query.type ? this.$route.query.type : null
618
+ };
619
+
620
+ let response = await this.$axios.post(`${process.env.baseApiUrl}/nb/jobs/search?page=${page ? page : 1}${this.$store.state.localStorage.currentUser ? '&id=' + this.$store.state.localStorage.currentUser.user_id :''}`, search, {
621
+ headers: {
622
+ 'Content-Type': 'application/json',
623
+ 'Authorization': `Bearer ${this.$store.state.localStorage.token}`
624
+ },
625
+ httpsAgent: new https.Agent({
626
+ rejectUnauthorized: false
627
+ })
628
+ });
629
+ this.details.total = response.data.data.total;
630
+ this.details.last_page = response.data.data.last_page;
631
+ this.jobs = response.data.data.data;
632
+
633
+ var text = '';
634
+ if (this.details.total > 0) {
635
+ this.getDetails(this.jobs[0].job_id);
636
+ if (this.$route.query.term) {
637
+ text = `Página 1 de ${this.details.total} vagas de ${this.$route.query.term}`;
638
+ } else if (this.details.total > 15) {
639
+ text = `Página 1 de ${this.details.total - 5} vagas`;
640
+ } else {
641
+ text = 'Resultados para sua busca';
642
+ }
643
+ this.searchEmpty = false;
644
+ } else {
645
+ text = 'Não resultados para sua busca';
646
+ this.searchEmpty = true;
647
+
648
+ //this.$router.push({ path: "/", query: { term: this.$route.query.term, city: this.$route.query.city ? this.$route.query.city : await this.$location(), type: this.$route.query.type, date: this.$route.query.date, page: 1, handicapped: this.$route.query.handicapped, error: "404_job"}, });
649
+ }
650
+ this.searchtext = text;
651
+
652
+ this.currentresult = this.jobs.length;
653
+ this.pagination.last = response.data.data.last_page;
654
+ this.searching = false;
655
+ },
656
+ async featureDetails(id, index){
657
+ await this.getDetails(id, index);
658
+ this.goToDetails(id);
659
+ },
660
+
661
+ goToDetails(id){
662
+ if(this.isMobileOnlyWatch){
663
+ this.$router.push('/vagas/' + id);
664
+ }
665
+ },
666
+
667
+ async getDetails(id, index = 0) {
668
+ let jobs = this.jobs;
669
+ let job = await jobs.filter(function(e) {
670
+ return e.job_id == id;
671
+ });
672
+
673
+ this.details.job_id = id;
674
+ this.details.index = index;
675
+ this.details.img = job[0].company_logo;
676
+ this.details.title = job[0].job_title;
677
+ this.details.description = job[0].job_description;
678
+ this.details.location = job[0].city_name;
679
+ this.details.company = job[0].company_name;
680
+ this.details.salary = job[0].salary;
681
+ this.details.benefits = job[0].job_benefits ? job[0].job_benefits.length > 0 ? job[0].job_benefits : null : null;
682
+ this.details.hiring = job[0].type_hiring;
683
+ this.details.private = job[0].private;
684
+ this.details.link = process.env.baseAppUrl + '/vagas/' + id;
685
+ this.details.applied = job[0].subscription == null ? false : job[0].subscription.applied;
686
+ this.details.can_unsubscribe = job[0].subscription == null ? false : job[0].subscription.can_unsubscribe;
687
+ this.details.user_bookmarked = job[0].subscription == null ? false : job[0].subscription.user_bookmarked;
688
+ this.details.handicapped = job[0].handicapped;
689
+ this.details.company_slug = job[0].company_slug;
690
+ },
691
+
692
+ searchParams(page = 1) {
693
+ window.location.href= `/busca?term=${this.term}&city=${this.city}&type=${this.selects.hiringType}&date=${this.selects.date}&handicapped=${this.selects.handicapped}&page=${page}`;
694
+ },
695
+ toggleFilterMobile: function() {
696
+ let el = document.querySelector('.interface-spa.interface-spa--mobile');
697
+ el.classList.toggle('opened');
698
+ },
699
+ }
699
700
  };
700
701
  </script>
701
702
  <style lang="scss">