@burh/nuxt-core 1.1.14 → 1.1.15
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
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
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
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
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
|
|
232
|
-
import { Select, Option } from
|
|
233
|
-
import jobDetail from
|
|
234
|
-
import InterfaceSpa from
|
|
235
|
-
import opportunityCard from
|
|
236
|
-
import ShareModal from
|
|
237
|
-
import AutoComplete from
|
|
238
|
-
import https from
|
|
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
|
|
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
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
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 há 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">
|