@burh/nuxt-core 1.0.443 → 1.0.445

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.
@@ -13,21 +13,25 @@
13
13
  />
14
14
  </span>
15
15
  <upgrade-plan @send-contact="sendContact" v-if="isLocked" />
16
+
16
17
  <p class="notes-title mb-0">Histórico com sua empresa</p>
17
18
  <div class="line mb-3"></div>
18
- <div
19
- class="mt-3"
20
- v-for="(item, index) in orderByDate(companyHistory())"
21
- :key="index"
22
- >
23
- <p class="history-text mb-0">
24
- {{ item.text }}
19
+
20
+ <template v-if="!isLocked">
21
+ <div
22
+ class="mt-3"
23
+ v-for="(item, index) in orderByDate(companyHistory())"
24
+ :key="index"
25
+ >
26
+ <p class="history-text mb-0">
27
+ {{ item.text }}
28
+ </p>
29
+ <span>{{ item.date | convertDate }}</span>
30
+ </div>
31
+ <p v-if="companyHistory().length === 0" class="history-text">
32
+ Histórico vazio.
25
33
  </p>
26
- <span>{{ item.date | convertDate }}</span>
27
- </div>
28
- <p v-if="companyHistory().length === 0" class="history-text">
29
- Histórico vazio.
30
- </p>
34
+ </template>
31
35
  </el-tab-pane>
32
36
 
33
37
  <el-tab-pane name="notes" class="ml-2" v-if="isNotesActived">
@@ -37,44 +41,50 @@
37
41
  src="../../../../assets/images/icons/notesCv.svg"
38
42
  />
39
43
  </span>
44
+
40
45
  <upgrade-plan @send-contact="sendContact" v-if="isLocked" />
46
+
41
47
  <p class="notes-title mb-0">Notas da equipe</p>
42
48
  <div class="line mb-3"></div>
43
- <div
44
- v-show="notes.length > 0"
45
- v-for="(note, index) in notes.slice(0, 5)"
46
- :key="index"
47
- >
48
- <div class="notes-baloon">
49
- <div class="notes-text ml-3 pt-1">
50
- <p class="mt-3">{{ note.text }}</p>
51
- </div>
49
+
50
+ <template v-if="!isLocked">
51
+ <template v-if="notes.length > 0">
52
52
  <div
53
- class="d-flex justify-content-end align-items-center mr-3"
53
+ v-for="(note, index) in notes.slice(0, 5)"
54
+ :key="index"
54
55
  >
55
- <p class="notes-date">
56
- {{ note.created_at | convertDate }}
57
- </p>
56
+ <div class="notes-baloon">
57
+ <div class="notes-text ml-3 pt-1">
58
+ <p class="mt-3">{{ note.text }}</p>
59
+ </div>
60
+ <div
61
+ class="d-flex justify-content-end align-items-center mr-3"
62
+ >
63
+ <p class="notes-date">
64
+ {{ note.created_at | convertDate }}
65
+ </p>
66
+ </div>
67
+ </div>
68
+ <div class="notes-owner d-flex mt-2">
69
+ <img
70
+ v-if="note.user.urlAvatar"
71
+ :src="note.user.urlAvatar"
72
+ :alt="note.user.name"
73
+ />
74
+ <div
75
+ v-if="!note.user.urlAvatar"
76
+ class="notes-avatar"
77
+ ></div>
78
+ <p class="ml-1">
79
+ {{ note.user.name }}
80
+ </p>
81
+ </div>
58
82
  </div>
83
+ </template>
84
+ <div class="notes-text" v-if="notes.length === 0">
85
+ <p>Nenhuma nota criada.</p>
59
86
  </div>
60
- <div class="notes-owner d-flex mt-2">
61
- <img
62
- v-if="note.user.urlAvatar"
63
- :src="note.user.urlAvatar"
64
- :alt="note.user.name"
65
- />
66
- <div
67
- v-if="!note.user.urlAvatar"
68
- class="notes-avatar"
69
- ></div>
70
- <p class="ml-1">
71
- {{ note.user.name }}
72
- </p>
73
- </div>
74
- </div>
75
- <div class="notes-text" v-if="notes.length === 0">
76
- <p>Nenhuma nota criada.</p>
77
- </div>
87
+ </template>
78
88
 
79
89
  <div class="input-container" v-if="!isLocked">
80
90
  <input
@@ -102,55 +112,58 @@
102
112
  src="../../../../assets/images/icons/icon3.svg"
103
113
  />
104
114
  </span>
115
+
105
116
  <upgrade-plan @send-contact="sendContact" v-if="isLocked" />
117
+
106
118
  <p class="notes-title mb-0">Documentos anexados</p>
107
119
  <div class="line mb-3"></div>
108
120
 
109
- <div class="archive-content">
110
- <div v-for="(item, index) in archives" :key="index">
111
- <div @click="openArchive(item)" class="archive-container">
112
- <div>
113
- <img class="archive-img" src="../../../../assets/images/icons/icon3.svg" >
114
- </div>
115
- <div class="archive-name">
116
- <span>{{item.name}}</span>
117
- <div class="archive-icon">
118
- <i @click.stop.prevent="openRemoveSection(item, (index+1))" class="far fa-trash-alt"></i>
121
+ <template v-if="!isLocked">
122
+ <div class="archive-content">
123
+ <div v-for="(item, index) in archives" :key="index">
124
+ <div @click="openArchive(item)" class="archive-container">
125
+ <div>
126
+ <img class="archive-img" src="../../../../assets/images/icons/icon3.svg" >
127
+ </div>
128
+ <div class="archive-name">
129
+ <span>{{item.name}}</span>
130
+ <div class="archive-icon">
131
+ <i @click.stop.prevent="openRemoveSection(item, (index+1))" class="far fa-trash-alt"></i>
132
+ </div>
119
133
  </div>
120
134
  </div>
121
- </div>
122
- <div v-if="hasRemove && hasRemove == (index+1)" class="archive-remove">
123
- <p>Você tem certeza que deseja apagar este arquivo?</p>
124
- <div class="d-flex">
125
- <base-button
126
- @click="removeArchive(currentRemoveItem, index)"
127
- size="sm"
128
- class="btn-outline-primary col-6 p-1"
129
- >
130
- Apagar
131
- </base-button>
132
- <base-button
133
- @click="hasRemove = false"
134
- size="sm"
135
- class="btn-outline-danger col-6 p-1"
136
- >
137
- Cancelar
138
- </base-button>
135
+ <div v-if="hasRemove && hasRemove == (index+1)" class="archive-remove">
136
+ <p>Você tem certeza que deseja apagar este arquivo?</p>
137
+ <div class="d-flex">
138
+ <base-button
139
+ @click="removeArchive(currentRemoveItem, index)"
140
+ size="sm"
141
+ class="btn-outline-primary col-6 p-1"
142
+ >
143
+ Apagar
144
+ </base-button>
145
+ <base-button
146
+ @click="hasRemove = false"
147
+ size="sm"
148
+ class="btn-outline-danger col-6 p-1"
149
+ >
150
+ Cancelar
151
+ </base-button>
152
+ </div>
139
153
  </div>
140
154
  </div>
141
155
  </div>
142
156
 
143
- </div>
144
- <div class="notes-text" v-if="archives == null">
145
- <p>Nenhum arquvio anexado.</p>
146
- </div>
157
+ <div class="notes-text" v-if="archives == null">
158
+ <p>Nenhum arquvio anexado.</p>
159
+ </div>
160
+ </template>
147
161
 
148
162
  <div class="input-container" v-if="!isLocked">
149
163
  <div class="mt-5">
150
-
151
164
  <dropzone-file-upload
152
165
  disabled
153
- @error="ifMessageError"
166
+ @error="showMessageError"
154
167
  ref="MyDropzone"
155
168
  :options="dropzoneOptions"
156
169
  v-model="fileToUpload"
@@ -176,107 +189,111 @@
176
189
  <p class="notes-title mb-0">Laudo do Candidato</p>
177
190
  <div class="line mb-3"></div>
178
191
 
179
- <div class="input-container" v-if="!isLocked && !userReportData.annex">
180
- <dropzone-file-upload
181
- disabled
182
- ref="MyReportDropzone"
183
- v-model="reportFileUpload"
184
- :options="reportsDropdownzoneOptions"
185
- @error="ifMessageError"
186
- />
192
+ <template v-if="!isLocked">
193
+ <div class="input-container" v-if="!userReportData.annex">
194
+ <dropzone-file-upload
195
+ disabled
196
+ ref="MyReportDropzone"
197
+ v-model="reportFileUpload"
198
+ :options="reportsDropdownzoneOptions"
199
+ @error="showMessageError"
200
+ />
187
201
 
188
- <div class="archive-buttons" v-if="reportFileUpload.length > 0">
189
- <base-button @click="saveReport" size="sm" class="btn-outline-primary btn-rounded col-12">Salvar</base-button>
202
+ <div class="archive-buttons" v-if="reportFileUpload.length > 0">
203
+ <base-button @click="saveReport" size="sm" class="btn-outline-primary btn-rounded col-12">Salvar</base-button>
204
+ </div>
190
205
  </div>
191
- </div>
192
206
 
193
- <div class="archive-content" v-else-if="userReportData.annex">
194
- <div @click="openArchive(userReportData.annex)" class="archive-container">
195
- <div>
196
- <img class="archive-img" src="../../../../assets/images/icons/icon6.svg" >
197
- </div>
198
- <div class="archive-name">
199
- <span>{{ userReportData.annex.name }}</span>
200
- <div class="archive-icon">
201
- <i @click.stop.prevent="openReportRemoveSection(userReportData.annex)" class="far fa-trash-alt"></i>
207
+ <div class="archive-content" v-else-if="userReportData.annex">
208
+ <div @click="openArchive(userReportData.annex)" class="archive-container">
209
+ <div>
210
+ <img class="archive-img" src="../../../../assets/images/icons/icon6.svg" >
211
+ </div>
212
+ <div class="archive-name">
213
+ <span>{{ userReportData.annex.name }}</span>
214
+ <div class="archive-icon">
215
+ <i @click.stop.prevent="openReportRemoveSection(userReportData.annex)" class="far fa-trash-alt"></i>
216
+ </div>
202
217
  </div>
203
218
  </div>
204
- </div>
205
- <div v-if="hasReportRemove" class="archive-remove">
206
- <p>Você tem certeza que deseja apagar este arquivo?</p>
207
- <div class="d-flex">
208
- <base-button
209
- @click="removeReportArchive(currentRemoveItem)"
210
- size="sm"
211
- class="btn-outline-primary col-6 p-1"
212
- >
213
- Apagar
214
- </base-button>
215
- <base-button
216
- @click="hasRemove = false"
217
- size="sm"
218
- class="btn-outline-danger col-6 p-1"
219
- >
220
- Cancelar
221
- </base-button>
219
+ <div v-if="hasReportRemove" class="archive-remove">
220
+ <p>Você tem certeza que deseja apagar este arquivo?</p>
221
+ <div class="d-flex">
222
+ <base-button
223
+ @click="removeReportArchive(currentRemoveItem)"
224
+ size="sm"
225
+ class="btn-outline-primary col-6 p-1"
226
+ >
227
+ Apagar
228
+ </base-button>
229
+ <base-button
230
+ @click="hasRemove = false"
231
+ size="sm"
232
+ class="btn-outline-danger col-6 p-1"
233
+ >
234
+ Cancelar
235
+ </base-button>
236
+ </div>
222
237
  </div>
223
238
  </div>
224
- </div>
239
+ </template>
225
240
 
226
241
  <p class="notes-title mb-0">Comentários Recrutador</p>
227
242
  <div class="line mb-3"></div>
228
243
 
229
- <div v-if="!isLocked && userReportData.comment">
230
- <div class="notes-baloon fullsize">
231
- <div class="notes-text mx-3 pt-1">
232
- <p class="mt-3">{{ userReportData.comment.comment }}</p>
233
- </div>
234
- <div
235
- class="d-flex justify-content-between align-items-center mx-3"
236
- >
237
- <p @click.prevent="hasCommentRemove = !hasCommentRemove" class="notes-date remove-baloon">
238
- Excluir
239
- </p>
244
+ <template v-if="!isLocked">
245
+ <div v-if="userReportData.comment">
246
+ <div class="notes-baloon fullsize">
247
+ <div class="notes-text mx-3 pt-1">
248
+ <p class="mt-3">{{ userReportData.comment.comment }}</p>
249
+ </div>
250
+ <div
251
+ class="d-flex justify-content-between align-items-center mx-3"
252
+ >
253
+ <p @click.prevent="hasCommentRemove = !hasCommentRemove" class="notes-date remove-baloon">
254
+ Excluir
255
+ </p>
240
256
 
241
- <p class="notes-date">
242
- {{ userReportData.comment.created_at | convertDate }}
243
- </p>
257
+ <p class="notes-date">
258
+ {{ userReportData.comment.created_at | convertDate }}
259
+ </p>
260
+ </div>
244
261
  </div>
245
- </div>
246
- <div v-if="hasCommentRemove" class="archive-remove">
247
- <p>Você tem certeza que deseja apagar este comentário?</p>
248
- <div class="d-flex">
249
- <base-button
250
- @click="removeComment(userReportData.comment.id)"
251
- size="sm"
252
- class="btn-outline-primary col-6 p-1"
253
- >
254
- Apagar
255
- </base-button>
256
- <base-button
257
- @click="hasCommentRemove = false"
258
- size="sm"
259
- class="btn-outline-danger col-6 p-1"
260
- >
261
- Cancelar
262
- </base-button>
262
+ <div v-if="hasCommentRemove" class="archive-remove">
263
+ <p>Você tem certeza que deseja apagar este comentário?</p>
264
+ <div class="d-flex">
265
+ <base-button
266
+ @click="removeComment(userReportData.comment.id)"
267
+ size="sm"
268
+ class="btn-outline-primary col-6 p-1"
269
+ >
270
+ Apagar
271
+ </base-button>
272
+ <base-button
273
+ @click="hasCommentRemove = false"
274
+ size="sm"
275
+ class="btn-outline-danger col-6 p-1"
276
+ >
277
+ Cancelar
278
+ </base-button>
279
+ </div>
280
+ </div>
281
+ <div class="notes-owner d-flex mt-2">
282
+ <img
283
+ v-if="userReportData.comment.user.urlAvatar"
284
+ :src="userReportData.comment.user.urlAvatar"
285
+ :alt="userReportData.comment.user.name"
286
+ />
287
+ <div
288
+ v-else
289
+ class="notes-avatar"
290
+ ></div>
291
+ <p class="ml-1">
292
+ {{ userReportData.comment.user.name }}
293
+ </p>
263
294
  </div>
264
295
  </div>
265
- <div class="notes-owner d-flex mt-2">
266
- <img
267
- v-if="userReportData.comment.user.urlAvatar"
268
- :src="userReportData.comment.user.urlAvatar"
269
- :alt="userReportData.comment.user.name"
270
- />
271
- <div
272
- v-else
273
- class="notes-avatar"
274
- ></div>
275
- <p class="ml-1">
276
- {{ userReportData.comment.user.name }}
277
- </p>
278
- </div>
279
- </div>
296
+ </template>
280
297
 
281
298
  <div class="input-container" v-if="!isLocked && !userReportData.comment">
282
299
  <input
@@ -293,15 +310,6 @@
293
310
  ></i>
294
311
  </div>
295
312
  </el-tab-pane>
296
-
297
- <!-- <el-tab-pane :disabled="true">
298
- <span class="tab__icon-pane cursor-disabled" slot="label">
299
- <img
300
- class="img__icon-pane"
301
- src="../../../../assets/images/icons/icon4.svg"
302
- />
303
- </span>
304
- </el-tab-pane> -->
305
313
  </el-tabs>
306
314
  </div>
307
315
  </template>
@@ -374,9 +382,6 @@ export default {
374
382
  userReportData: [],
375
383
  hasReportRemove: false,
376
384
  hasCommentRemove: false,
377
- isLocked: !this.companyHasProduct(
378
- this.$store.state.loja && this.$store.state.loja.ifableProducts && this.$store.state.loja.ifableProducts['HISTORICO_USUARIO'] || false
379
- ),
380
385
  };
381
386
  },
382
387
  props: {
@@ -419,11 +424,11 @@ export default {
419
424
  this.currentRemoveItem = item;
420
425
  },
421
426
 
422
- ifToast(type, title){
427
+ showToast(type, title){
423
428
  const Toast = swal.mixin({
424
429
  toast: true,
425
430
  position: 'top-end',
426
- ifConfirmButton: false,
431
+ showConfirmButton: false,
427
432
  timer: 3100,
428
433
  });
429
434
 
@@ -433,12 +438,12 @@ export default {
433
438
  });
434
439
  },
435
440
 
436
- ifMessageError(file, message) {
441
+ showMessageError(file, message) {
437
442
  this.isError = true;
438
443
  this.$refs.Mydropzone && this.$refs.Mydropzone.removeAllFiles();
439
444
 
440
445
  if (file.status !== 'canceled'){
441
- this.ifToast('error', message);
446
+ this.showToast('error', message);
442
447
  }
443
448
  },
444
449
 
@@ -450,13 +455,13 @@ export default {
450
455
  if (!this.isError) {
451
456
  this.$emit('save-archive', this.fileToUpload[0], this.userData.id);
452
457
  this.$refs.MyDropzone && this.$refs.MyDropzone.removeAllFiles();
453
- this.ifToast('success', 'Arquivo enviado com sucesso.');
458
+ this.showToast('success', 'Arquivo enviado com sucesso.');
454
459
 
455
460
  } else {
456
461
  if (this.fileToUpload.length > 0) {
457
- this.ifToast('error', 'Arquivo invalido.');
462
+ this.showToast('error', 'Arquivo invalido.');
458
463
  } else {
459
- this.ifToast('warning', 'Selecione um arquivo.');
464
+ this.showToast('warning', 'Selecione um arquivo.');
460
465
  }
461
466
  }
462
467
  },
@@ -465,13 +470,13 @@ export default {
465
470
  if (!this.isError) {
466
471
  this.$emit('save-report', this.reportFileUpload[0], this.userFolderId);
467
472
  this.$refs.MyReportDropzone && this.$refs.MyReportDropzone.removeAllFiles();
468
- this.ifToast('success', 'Arquivo enviado com sucesso.');
473
+ this.showToast('success', 'Arquivo enviado com sucesso.');
469
474
 
470
475
  } else {
471
476
  if (this.reportFileUpload.length > 0) {
472
- this.ifToast('error', 'Arquivo invalido.');
477
+ this.showToast('error', 'Arquivo invalido.');
473
478
  } else {
474
- this.ifToast('warning', 'Selecione um arquivo.');
479
+ this.showToast('warning', 'Selecione um arquivo.');
475
480
  }
476
481
  }
477
482
  },
@@ -565,6 +570,13 @@ export default {
565
570
  };
566
571
  }
567
572
  },
573
+ computed: {
574
+ isLocked() {
575
+ return !this.companyHasProduct(
576
+ this.$store.state.loja && this.$store.state.loja.showableProducts && this.$store.state.loja.showableProducts['HISTORICO_USUARIO'] || false
577
+ );
578
+ }
579
+ }
568
580
  };
569
581
  </script>
570
582
  <style>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@burh/nuxt-core",
3
- "version": "1.0.443",
3
+ "version": "1.0.445",
4
4
  "description": "Design System and Components.",
5
5
  "author": "Burh",
6
6
  "scripts": {