@burh/nuxt-core 1.0.248 → 1.0.249

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,73 +1,74 @@
1
- <template>
2
- <div class="feature__card">
3
- <div class="feature__card__image" :style="`--icon-bg-color: #${iconBgColor}`">
4
- <img :src="icon" :alt="title">
5
- </div>
6
- <div class="feature__card__title">
7
- <p>{{ title }}</p>
8
- </div>
9
- <div class="feature__card__description">
10
- <span>{{ description }}</span>
11
- </div>
12
- </div>
13
- </template>
14
-
15
- <script>
16
- export default {
17
- name: 'FeatureBusinessCard',
18
- props: {
19
- icon: String,
20
- iconBgColor: {
21
- type: String,
22
- default: '5983FE'
23
- },
24
- title: String,
25
- description: String,
26
- }
27
- };
28
- </script>
29
-
30
- <style lang="scss" scoped>
31
- .feature__card {
32
- background: #fff;
33
- padding: 20px;
34
- display: flex;
35
- flex-direction: column;
36
- align-items: flex-start;
37
- box-shadow: 5px 5px 50px 2px #E9EEF2;
38
- border-radius: 10px;
39
- width: 300px;
40
- margin: 0 auto;
41
- transition: transform 0.25s, box-shadow 0.5s;
42
- &__image {
43
- display: flex;
44
- align-items: center;
45
- justify-content: center;
46
- width: 45px;
47
- height: 45px;
48
- border-radius: 10px;
49
- background: var(--icon-bg-color);
50
- img {
51
- display: block;
52
- width: 25px;
53
- }
54
- }
55
- &__title {
56
- padding: 10px 0;
57
- p {
58
- font-size: 1.5625rem;
59
- font-weight: 600;
60
- margin-bottom: 0;
61
- }
62
- }
63
- &__description {
64
- text-align: left;
65
- font-weight: 400;
66
- font-size: 0.875rem;
67
- }
68
- &:hover {
69
- transform: translateY(-10px);
70
- box-shadow: 7px 15px 20px rgba(0, 0, 0, 0.05);
71
- }
72
- }
73
- </style>
1
+ <template>
2
+ <div class="feature__card">
3
+ <div class="feature__card__image" :style="`--icon-bg-color: #${iconBgColor}`">
4
+ <img :src="icon" :alt="title">
5
+ </div>
6
+ <div class="feature__card__title">
7
+ <p>{{ title }}</p>
8
+ </div>
9
+ <div class="feature__card__description">
10
+ <span>{{ description }}</span>
11
+ </div>
12
+ </div>
13
+ </template>
14
+
15
+ <script>
16
+ export default {
17
+ name: 'FeatureBusinessCard',
18
+ props: {
19
+ icon: String,
20
+ iconBgColor: {
21
+ type: String,
22
+ default: '5983FE'
23
+ },
24
+ title: String,
25
+ description: String,
26
+ }
27
+ };
28
+ </script>
29
+
30
+ <style lang="scss" scoped>
31
+ .feature__card {
32
+ background: #fff;
33
+ padding: 20px;
34
+ display: flex;
35
+ flex-direction: column;
36
+ align-items: flex-start;
37
+ box-shadow: 5px 5px 50px 2px #E9EEF2;
38
+ border-radius: 10px;
39
+ width: 90%;
40
+ max-width: 300px;
41
+ margin: 0 auto;
42
+ transition: transform 0.25s, box-shadow 0.5s;
43
+ &__image {
44
+ display: flex;
45
+ align-items: center;
46
+ justify-content: center;
47
+ width: 45px;
48
+ height: 45px;
49
+ border-radius: 10px;
50
+ background: var(--icon-bg-color);
51
+ img {
52
+ display: block;
53
+ width: 25px;
54
+ }
55
+ }
56
+ &__title {
57
+ padding: 10px 0;
58
+ p {
59
+ font-size: 1.5625rem;
60
+ font-weight: 600;
61
+ margin-bottom: 0;
62
+ }
63
+ }
64
+ &__description {
65
+ text-align: left;
66
+ font-weight: 400;
67
+ font-size: 0.875rem;
68
+ }
69
+ &:hover {
70
+ transform: translateY(-10px);
71
+ box-shadow: 7px 15px 20px rgba(0, 0, 0, 0.05);
72
+ }
73
+ }
74
+ </style>
@@ -1,583 +1,584 @@
1
- <template>
2
- <div class="bg-white content-right tabs ">
3
- <el-tabs
4
- :class="active"
5
- class="mt-3 ml-4 handle-icon-color"
6
- v-model="active"
7
- >
8
- <el-tab-pane class="history" name="history">
9
- <span class="tab__icon-pane" slot="label">
10
- <img
11
- class="img__icon-pane img__icon--history"
12
- src="../../../../assets/images/icons/historicCv.svg"
13
- />
14
- </span>
15
- <p class="notes-title mb-0">Histórico com sua empresa</p>
16
- <div class="line mb-3"></div>
17
-
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 }}
25
- </p>
26
- <span>{{ item.date | convertDate }}</span>
27
- </div>
28
- <p v-show="companyHistory().length === 0" class="history-text">
29
- Histórico vazio.
30
- </p>
31
- </el-tab-pane>
32
-
33
- <el-tab-pane name="notes" v-if="isNotesActived">
34
- <span class="tab__icon-pane" slot="label">
35
- <img
36
- class="img__icon-pane img__icon--notes"
37
- src="../../../../assets/images/icons/notesCv.svg"
38
- />
39
- </span>
40
- <p class="notes-title mb-0">Notas da equipe</p>
41
- <div class="line mb-3"></div>
42
- <div
43
- v-show="notes.length > 0"
44
- v-for="(note, index) in notes.slice(0, 5)"
45
- :key="index"
46
- >
47
- <div class="notes-baloon">
48
- <div class="notes-text ml-3 pt-1">
49
- <p class="mt-3">{{ note.text }}</p>
50
- </div>
51
- <div
52
- class="d-flex justify-content-end align-items-center mr-3"
53
- >
54
- <p class="notes-date">
55
- {{ note.created_at | convertDate }}
56
- </p>
57
- </div>
58
- </div>
59
- <div class="notes-owner d-flex mt-2">
60
- <img
61
- v-show="note.user.urlAvatar"
62
- :src="note.user.urlAvatar"
63
- :alt="note.user.name"
64
- />
65
- <div
66
- v-show="!note.user.urlAvatar"
67
- class="notes-avatar"
68
- ></div>
69
- <p class="ml-1">
70
- {{ note.user.name }}
71
- </p>
72
- </div>
73
- </div>
74
- <div class="notes-text" v-show="notes.length === 0">
75
- <p>Nenhuma nota criada.</p>
76
- </div>
77
-
78
- <div class="input-container">
79
- <input
80
- class="notes-new pl-4 mt-3 mb-3 form-rounded"
81
- type="text"
82
- placeholder="Escrever anotação"
83
- v-model="newNote"
84
- @change="$emit('new-note', newNote, userData.id)"
85
- v-on:change="cleatInput()"
86
- />
87
- <i
88
- @click="
89
- newNote.length > 0 &&
90
- $emit('new-note', newNote, userData.id)
91
- "
92
- class="fas fa-paper-plane input-icon"
93
- ></i>
94
- </div>
95
- </el-tab-pane>
96
-
97
- <el-tab-pane name="documents">
98
- <span class="tab__icon-pane" slot="label">
99
- <img
100
- class="img__icon-pane img__icon--documents"
101
- src="../../../../assets/images/icons/icon3.svg"
102
- />
103
- </span>
104
- <p class="notes-title mb-0">Documentos anexados</p>
105
- <div class="line mb-3"></div>
106
-
107
- <div class="archive-content">
108
- <div v-for="(item, index) in archives" :key="index">
109
- <div @click="openArchive(item)" class="archive-container">
110
- <div>
111
- <img class="archive-img" src="../../../../assets/images/icons/icon3.svg" >
112
- </div>
113
- <div class="archive-name">
114
- <p>
115
- <span>{{item.name}}</span>
116
- <div class="archive-icon">
117
- <i @click.stop.prevent="openRemoveSection(item, (index+1))" class="far fa-trash-alt"></i>
118
- </div>
119
- </p>
120
- </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>
139
- </div>
140
- </div>
141
- </div>
142
-
143
- </div>
144
- <div class="notes-text" v-show="archives == null">
145
- <p>Nenhum arquvio anexado.</p>
146
- </div>
147
-
148
- <div class="input-container">
149
- <div class="mt-5">
150
-
151
- <dropzone-file-upload
152
- disabled
153
- @error="showMessageError"
154
- ref="Mydropzone"
155
- :options="dropzoneOptions"
156
- v-model="fileToUpload"
157
- />
158
- </div>
159
-
160
- <div class="archive-buttons">
161
- <base-button @click="saveImage" size="sm" class="btn-outline-primary btn-rounded col-12">Salvar</base-button>
162
- </div>
163
- </div>
164
- </el-tab-pane>
165
-
166
- <el-tab-pane :disabled="true">
167
- <span class="tab__icon-pane cursor-disabled" slot="label">
168
- <img
169
- class="img__icon-pane"
170
- src="../../../../assets/images/icons/icon4.svg"
171
- />
172
- </span>
173
- </el-tab-pane>
174
- </el-tabs>
175
- </div>
176
- </template>
177
-
178
- <script>
179
- import { Tabs, TabPane } from 'element-ui';
180
- import DropzoneFileUpload from '@burh/nuxt-core/components/argon-core/Inputs/DropzoneFileUpload.vue';
181
- import swal from 'sweetalert2';
182
-
183
- export default {
184
- name: 'user-cv-right-side',
185
- filters: {
186
- convertDate(data) {
187
- if (typeof data !== 'string') {
188
- data = '2020-01-01 12:00:00';
189
- }
190
- let d = new Date(data);
191
- let options = { hour: '2-digit', minute: '2-digit' };
192
- return d.toLocaleDateString('pt-BR', options);
193
- }
194
- },
195
- watch:{
196
- fileToUpload(value){
197
- if(value.length > 0 && value[0].accepted) {
198
- this.isError = false;
199
- }
200
- }
201
- },
202
- components: {
203
- [Tabs.name]: Tabs,
204
- [TabPane.name]: TabPane,
205
- DropzoneFileUpload,
206
- },
207
- data(){
208
- return {
209
- newNote: '',
210
- active: this.activeName,
211
- hasRemove: null,
212
- isError: true,
213
- currentRemoveItem: null,
214
- fileToUpload: [],
215
- dropzoneOptions: {
216
- maxFilesize: 0.2,
217
- dictFileTooBig:'Seu arquivo é poderoso demais (Máximo 200kb).',
218
- dictDefaultMessage: 'Clique ou arraste seu arquivo aqui.',
219
- dictInvalidFileType: 'Arquivo invalido.',
220
- dictMaxFilesExceeded: 'Não é permitido mais de um arquivo por vez.',
221
- acceptedFiles: 'image/*, application/pdf',
222
- }
223
- };
224
- },
225
- props: {
226
- archives: Array,
227
- userData: Object,
228
- notes: Array,
229
- activeName: String,
230
- isNotesActived: {
231
- type: Boolean,
232
- default: true
233
- },
234
- },
235
- mounted() {
236
- this.companyHistory();
237
- },
238
- methods: {
239
- openRemoveSection(item, index) {
240
- this.hasRemove = index;
241
- this.currentRemoveItem = item;
242
- },
243
-
244
- showToast(type, title){
245
- const Toast = swal.mixin({
246
- toast: true,
247
- position: 'top-end',
248
- showConfirmButton: false,
249
- timer: 3100,
250
- });
251
-
252
- return Toast.fire({
253
- type: type,
254
- title: title
255
- });
256
- },
257
-
258
- showMessageError(file, message) {
259
- this.isError = true;
260
- this.$refs.Mydropzone.removeAllFiles();
261
-
262
- if (file.status !== 'canceled'){
263
- this.showToast('error', message);
264
- }
265
- },
266
-
267
- openArchive(item) {
268
- window.open(item.annex_url, '_blank');
269
- },
270
-
271
- saveImage(){
272
- if (!this.isError) {
273
- this.$emit('save-archive', this.fileToUpload[0], this.userData.id);
274
- this.$refs.Mydropzone.removeAllFiles();
275
- this.showToast('success', 'Arquivo enviado com sucesso.');
276
-
277
- } else {
278
- if (this.fileToUpload.length > 0) {
279
- this.showToast('error', 'Arquivo invalido.');
280
- } else {
281
- this.showToast('warning', 'Selecione um arquivo.');
282
- }
283
- }
284
- },
285
-
286
- removeArchive(archive, index){
287
- this.$emit('remove-archive', archive, archive.id, index);
288
- this.hasRemove = null;
289
- },
290
-
291
- cleatInput() {
292
- this.newNote = '';
293
- },
294
- companyHistory() {
295
- let sms = this.userData.company_sms.map(x => ({
296
- date: x.created_at,
297
- text: 'Recebeu um SMS'
298
- }));
299
- let tests = this.userData.tests.map(x => ({
300
- date: x.finished_at,
301
- text: `Finalizou o teste ${x.test.name.toUpperCase()}`
302
- }));
303
- let discs = this.userData.solides.map(x => ({
304
- date: x.end,
305
- text: 'Realizou um teste DISC'
306
- }));
307
-
308
- return sms.concat(tests, discs);
309
- },
310
- orderByDate(data) {
311
- let sortedArray = data.sort((a, b) => {
312
- a = a.date || '2020-01-01 12:00:00';
313
- b = b.date || '2020-01-01 12:00:00';
314
-
315
- return new Date(b).getTime() - new Date(a).getTime();
316
- });
317
-
318
- return sortedArray;
319
- },
320
- },
321
- };
322
- </script>
323
- <style>
324
- .el-tabs__nav-wrap::after {
325
- background: #fff !important;
326
- }
327
-
328
- .el-tabs__active-bar {
329
- width: 34px !important;
330
- height: 4px !important;
331
- border-radius: 10px 10px 0px 0px;
332
- }
333
- </style>
334
-
335
- <style lang="scss">
336
- .swal2-title {
337
- font-size: 1rem !important;
338
- }
339
- .swal2-container {
340
- z-index: 5000 !important;
341
- }
342
- </style>
343
-
344
- <style lang="scss" scoped>
345
- @import '@burh/nuxt-core/assets/sass/burh-ds/variables/_colors.scss';
346
-
347
- /deep/.dropzone {
348
- width: 95%;
349
-
350
- .dz-message {
351
- padding: 2rem 1rem !important;
352
- }
353
-
354
- button.dz-button {
355
- background-color: transparent;
356
- border: 0;
357
- }
358
- }
359
-
360
- /deep/ .el-tab-pane {
361
- max-height: 760px;
362
- overflow: hidden;
363
- overflow-y: auto;
364
- position: relative;
365
-
366
- > .notes-title {
367
- position: sticky;
368
- position: -webkit-sticky;
369
- top: 0;
370
- background: white;
371
- padding: 10px 0;
372
- }
373
-
374
- > .input-container {
375
- position: sticky;
376
- position: -webkit-sticky;
377
- bottom: 0;
378
- background: white;
379
- > .input-icon {
380
- cursor: pointer;
381
- position: absolute;
382
- top: 50%;
383
- right: 30px;
384
- transform: translateY(-50%);
385
- color: #c8c8c8;
386
- }
387
- }
388
-
389
- &::-webkit-scrollbar {
390
- width: 8px;
391
- }
392
-
393
- &::-webkit-scrollbar-track {
394
- background: #f5f5f5;
395
- }
396
-
397
- &::-webkit-scrollbar-thumb {
398
- background: #e9e8e8;
399
- border-radius: 10px;
400
- }
401
-
402
- .archive-content {
403
- width: 95%;
404
-
405
- p {
406
- margin-bottom: 0;
407
- font-size: 0.875rem;
408
- padding: .3rem .6rem 0 .6rem;
409
- }
410
-
411
- .archive-container {
412
- display: flex;
413
- align-items: center;
414
- padding: 0.5rem 0.5rem 0.438rem;
415
- cursor: pointer;
416
- user-select: none;
417
-
418
- &:hover{
419
- background-color: #f6f9fc;
420
- border-radius: 5px;
421
- }
422
-
423
- .archive-img {
424
- background-color: #f5f5f5;
425
- border-radius: 6px;
426
- padding: 7px;
427
- }
428
-
429
- .archive-name {
430
- display: flex;
431
- margin-left: .8rem;
432
- width: 145%;
433
- justify-content: space-between !important;
434
-
435
- .archive-icon {
436
- margin-left: 1.5rem;
437
- }
438
-
439
- p {
440
- margin: 0;
441
- padding: 0;
442
- width: 13rem;
443
- white-space: nowrap;
444
- overflow: hidden;
445
- text-overflow: ellipsis;
446
- }
447
- }
448
-
449
- .upload-container {
450
- position: sticky;
451
- position: -webkit-sticky;
452
- bottom: 0;
453
- background: white;
454
- width: 231px;
455
- }
456
- }
457
- }
458
-
459
- .archive-buttons {
460
- display: flex;
461
- margin-top: -1rem;
462
- width: 95%;
463
- }
464
-
465
- .archive-remove {
466
- width: 90%;
467
- word-break: break-word;
468
- }
469
- }
470
-
471
- .readmore {
472
- overflow: hidden;
473
- text-overflow: ellipsis;
474
- display: -webkit-box;
475
- -webkit-line-clamp: 3;
476
- -webkit-box-orient: vertical;
477
- }
478
-
479
- .tab__icon-pane {
480
- .img__icon-pane {
481
- background-color: #f5f5f5 !important;
482
- border-radius: 30%;
483
- padding: 7px;
484
- margin-bottom: 1rem;
485
- }
486
- }
487
-
488
- .content-right {
489
- width: 25%;
490
- }
491
-
492
- .notes-title {
493
- font-size: 14px;
494
- color: #1d364b;
495
- font-weight: bold;
496
- background-color: white;
497
- z-index: 500;
498
- }
499
-
500
- .notes-baloon {
501
- width: 231px;
502
- height: auto;
503
-
504
- background: #eff5fd;
505
- border-radius: 10px 10px 10px 0px;
506
- }
507
-
508
- .notes-text {
509
- p {
510
- font-size: 13px;
511
- color: #62778c;
512
- }
513
- }
514
-
515
- .notes-date {
516
- font-size: 11px;
517
- text-align: right;
518
-
519
- color: #8da2b5;
520
- top: calc(50% - 17px / 2 - 444.5px);
521
- }
522
-
523
- .notes-owner {
524
- img {
525
- width: 23px;
526
- height: 23px;
527
- border-radius: 50%;
528
- }
529
-
530
- .notes-avatar {
531
- width: 23px;
532
- height: 23px;
533
- border-radius: 50%;
534
- background-color: #adb5bd;
535
- }
536
-
537
- p {
538
- font-size: 13px;
539
- font-weight: 600;
540
- text-transform: uppercase;
541
-
542
- color: #62778c;
543
- }
544
- }
545
-
546
- .notes-new {
547
- width: 95%;
548
- height: 33px;
549
-
550
- background: #f5f5f5;
551
- border-radius: 16.5px;
552
- border: none;
553
-
554
- outline: 0;
555
- }
556
-
557
- .line {
558
- width: 221px;
559
- height: 0px;
560
-
561
- border: 1px solid #ececec5c;
562
- }
563
-
564
- .history {
565
- word-break: break-word;
566
-
567
- .history-text {
568
- font-size: 13px;
569
- color: #62778c;
570
- }
571
-
572
- span {
573
- font-size: 11px;
574
- line-height: 16px;
575
-
576
- color: #8da2b5;
577
- }
578
- }
579
-
580
- .cursor-disabled {
581
- cursor: no-drop;
582
- }
583
- </style>
1
+ <template>
2
+ <div class="bg-white content-right tabs ">
3
+ <el-tabs
4
+ :class="active"
5
+ class="mt-3 ml-4 handle-icon-color"
6
+ v-model="active"
7
+ >
8
+ <el-tab-pane class="history" name="history">
9
+ <span class="tab__icon-pane" slot="label">
10
+ <img
11
+ class="img__icon-pane img__icon--history"
12
+ src="../../../../assets/images/icons/historicCv.svg"
13
+ />
14
+ </span>
15
+ <p class="notes-title mb-0">Histórico com sua empresa</p>
16
+ <div class="line mb-3"></div>
17
+
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 }}
25
+ </p>
26
+ <span>{{ item.date | convertDate }}</span>
27
+ </div>
28
+ <p v-show="companyHistory().length === 0" class="history-text">
29
+ Histórico vazio.
30
+ </p>
31
+ </el-tab-pane>
32
+
33
+ <el-tab-pane name="notes" v-if="isNotesActived">
34
+ <span class="tab__icon-pane" slot="label">
35
+ <img
36
+ class="img__icon-pane img__icon--notes"
37
+ src="../../../../assets/images/icons/notesCv.svg"
38
+ />
39
+ </span>
40
+ <p class="notes-title mb-0">Notas da equipe</p>
41
+ <div class="line mb-3"></div>
42
+ <div
43
+ v-show="notes.length > 0"
44
+ v-for="(note, index) in notes.slice(0, 5)"
45
+ :key="index"
46
+ >
47
+ <div class="notes-baloon">
48
+ <div class="notes-text ml-3 pt-1">
49
+ <p class="mt-3">{{ note.text }}</p>
50
+ </div>
51
+ <div
52
+ class="d-flex justify-content-end align-items-center mr-3"
53
+ >
54
+ <p class="notes-date">
55
+ {{ note.created_at | convertDate }}
56
+ </p>
57
+ </div>
58
+ </div>
59
+ <div class="notes-owner d-flex mt-2">
60
+ <img
61
+ v-show="note.user.urlAvatar"
62
+ :src="note.user.urlAvatar"
63
+ :alt="note.user.name"
64
+ />
65
+ <div
66
+ v-show="!note.user.urlAvatar"
67
+ class="notes-avatar"
68
+ ></div>
69
+ <p class="ml-1">
70
+ {{ note.user.name }}
71
+ </p>
72
+ </div>
73
+ </div>
74
+ <div class="notes-text" v-show="notes.length === 0">
75
+ <p>Nenhuma nota criada.</p>
76
+ </div>
77
+
78
+ <div class="input-container">
79
+ <input
80
+ class="notes-new pl-4 mt-3 mb-3 form-rounded"
81
+ type="text"
82
+ placeholder="Escrever anotação"
83
+ v-model="newNote"
84
+ @change="$emit('new-note', newNote, userData.id)"
85
+ v-on:change="cleatInput()"
86
+ />
87
+ <i
88
+ @click="
89
+ newNote.length > 0 &&
90
+ $emit('new-note', newNote, userData.id)
91
+ "
92
+ class="fas fa-paper-plane input-icon"
93
+ ></i>
94
+ </div>
95
+ </el-tab-pane>
96
+
97
+ <el-tab-pane name="documents">
98
+ <span class="tab__icon-pane" slot="label">
99
+ <img
100
+ class="img__icon-pane img__icon--documents"
101
+ src="../../../../assets/images/icons/icon3.svg"
102
+ />
103
+ </span>
104
+ <p class="notes-title mb-0">Documentos anexados</p>
105
+ <div class="line mb-3"></div>
106
+
107
+ <div class="archive-content">
108
+ <div v-for="(item, index) in archives" :key="index">
109
+ <div @click="openArchive(item)" class="archive-container">
110
+ <div>
111
+ <img class="archive-img" src="../../../../assets/images/icons/icon3.svg" >
112
+ </div>
113
+ <div class="archive-name">
114
+ <p>
115
+ <span>{{item.name}}</span>
116
+ <div class="archive-icon">
117
+ <i @click.stop.prevent="openRemoveSection(item, (index+1))" class="far fa-trash-alt"></i>
118
+ </div>
119
+ </p>
120
+ </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>
139
+ </div>
140
+ </div>
141
+ </div>
142
+
143
+ </div>
144
+ <div class="notes-text" v-show="archives == null">
145
+ <p>Nenhum arquvio anexado.</p>
146
+ </div>
147
+
148
+ <div class="input-container">
149
+ <div class="mt-5">
150
+
151
+ <dropzone-file-upload
152
+ disabled
153
+ @error="showMessageError"
154
+ ref="Mydropzone"
155
+ :options="dropzoneOptions"
156
+ v-model="fileToUpload"
157
+ />
158
+ </div>
159
+
160
+ <div class="archive-buttons">
161
+ <base-button @click="saveImage" size="sm" class="btn-outline-primary btn-rounded col-12">Salvar</base-button>
162
+ </div>
163
+ </div>
164
+ </el-tab-pane>
165
+
166
+ <el-tab-pane :disabled="true">
167
+ <span class="tab__icon-pane cursor-disabled" slot="label">
168
+ <img
169
+ class="img__icon-pane"
170
+ src="../../../../assets/images/icons/icon4.svg"
171
+ />
172
+ </span>
173
+ </el-tab-pane>
174
+ </el-tabs>
175
+ </div>
176
+ </template>
177
+
178
+ <script>
179
+ import { Tabs, TabPane } from 'element-ui';
180
+ import DropzoneFileUpload from '@burh/nuxt-core/components/argon-core/Inputs/DropzoneFileUpload.vue';
181
+ import swal from 'sweetalert2';
182
+
183
+ export default {
184
+ name: 'user-cv-right-side',
185
+ filters: {
186
+ convertDate(data) {
187
+ if (typeof data !== 'string') {
188
+ data = '2020-01-01 12:00:00';
189
+ }
190
+ let d = new Date(data);
191
+ let options = { hour: '2-digit', minute: '2-digit' };
192
+ return d.toLocaleDateString('pt-BR', options);
193
+ }
194
+ },
195
+ watch:{
196
+ fileToUpload(value){
197
+ if(value.length > 0 && value[0].accepted) {
198
+ this.isError = false;
199
+ }
200
+ }
201
+ },
202
+ components: {
203
+ [Tabs.name]: Tabs,
204
+ [TabPane.name]: TabPane,
205
+ DropzoneFileUpload,
206
+ },
207
+ data(){
208
+ return {
209
+ newNote: '',
210
+ active: this.activeName,
211
+ hasRemove: null,
212
+ isError: true,
213
+ currentRemoveItem: null,
214
+ fileToUpload: [],
215
+ dropzoneOptions: {
216
+ maxFilesize: 0.2,
217
+ dictFileTooBig:'Seu arquivo é poderoso demais (Máximo 200kb).',
218
+ dictDefaultMessage: 'Clique ou arraste seu arquivo aqui.',
219
+ dictInvalidFileType: 'Arquivo invalido.',
220
+ dictMaxFilesExceeded: 'Não é permitido mais de um arquivo por vez.',
221
+ acceptedFiles: 'image/*, application/pdf',
222
+ }
223
+ };
224
+ },
225
+ props: {
226
+ archives: Array,
227
+ userData: Object,
228
+ notes: Array,
229
+ activeName: String,
230
+ isNotesActived: {
231
+ type: Boolean,
232
+ default: true
233
+ },
234
+ },
235
+ mounted() {
236
+ this.companyHistory();
237
+ },
238
+ methods: {
239
+ openRemoveSection(item, index) {
240
+ this.hasRemove = index;
241
+ this.currentRemoveItem = item;
242
+ },
243
+
244
+ showToast(type, title){
245
+ const Toast = swal.mixin({
246
+ toast: true,
247
+ position: 'top-end',
248
+ showConfirmButton: false,
249
+ timer: 3100,
250
+ });
251
+
252
+ return Toast.fire({
253
+ type: type,
254
+ title: title
255
+ });
256
+ },
257
+
258
+ showMessageError(file, message) {
259
+ this.isError = true;
260
+ this.$refs.Mydropzone.removeAllFiles();
261
+
262
+ if (file.status !== 'canceled'){
263
+ this.showToast('error', message);
264
+ }
265
+ },
266
+
267
+ openArchive(item) {
268
+ window.open(item.annex_url, '_blank');
269
+ },
270
+
271
+ saveImage(){
272
+ if (!this.isError) {
273
+ this.$emit('save-archive', this.fileToUpload[0], this.userData.id);
274
+ this.$refs.Mydropzone.removeAllFiles();
275
+ this.showToast('success', 'Arquivo enviado com sucesso.');
276
+
277
+ } else {
278
+ if (this.fileToUpload.length > 0) {
279
+ this.showToast('error', 'Arquivo invalido.');
280
+ } else {
281
+ this.showToast('warning', 'Selecione um arquivo.');
282
+ }
283
+ }
284
+ },
285
+
286
+ removeArchive(archive, index){
287
+ console.log(archive)
288
+ this.$emit('remove-archive', archive.user_id, archive.id, archive.company_id, index);
289
+ this.hasRemove = null;
290
+ },
291
+
292
+ cleatInput() {
293
+ this.newNote = '';
294
+ },
295
+ companyHistory() {
296
+ let sms = this.userData.company_sms.map(x => ({
297
+ date: x.created_at,
298
+ text: 'Recebeu um SMS'
299
+ }));
300
+ let tests = this.userData.tests.map(x => ({
301
+ date: x.finished_at,
302
+ text: `Finalizou o teste ${x.test.name.toUpperCase()}`
303
+ }));
304
+ let discs = this.userData.solides.map(x => ({
305
+ date: x.end,
306
+ text: 'Realizou um teste DISC'
307
+ }));
308
+
309
+ return sms.concat(tests, discs);
310
+ },
311
+ orderByDate(data) {
312
+ let sortedArray = data.sort((a, b) => {
313
+ a = a.date || '2020-01-01 12:00:00';
314
+ b = b.date || '2020-01-01 12:00:00';
315
+
316
+ return new Date(b).getTime() - new Date(a).getTime();
317
+ });
318
+
319
+ return sortedArray;
320
+ },
321
+ },
322
+ };
323
+ </script>
324
+ <style>
325
+ .el-tabs__nav-wrap::after {
326
+ background: #fff !important;
327
+ }
328
+
329
+ .el-tabs__active-bar {
330
+ width: 34px !important;
331
+ height: 4px !important;
332
+ border-radius: 10px 10px 0px 0px;
333
+ }
334
+ </style>
335
+
336
+ <style lang="scss">
337
+ .swal2-title {
338
+ font-size: 1rem !important;
339
+ }
340
+ .swal2-container {
341
+ z-index: 5000 !important;
342
+ }
343
+ </style>
344
+
345
+ <style lang="scss" scoped>
346
+ @import '@burh/nuxt-core/assets/sass/burh-ds/variables/_colors.scss';
347
+
348
+ /deep/.dropzone {
349
+ width: 95%;
350
+
351
+ .dz-message {
352
+ padding: 2rem 1rem !important;
353
+ }
354
+
355
+ button.dz-button {
356
+ background-color: transparent;
357
+ border: 0;
358
+ }
359
+ }
360
+
361
+ /deep/ .el-tab-pane {
362
+ max-height: 760px;
363
+ overflow: hidden;
364
+ overflow-y: auto;
365
+ position: relative;
366
+
367
+ > .notes-title {
368
+ position: sticky;
369
+ position: -webkit-sticky;
370
+ top: 0;
371
+ background: white;
372
+ padding: 10px 0;
373
+ }
374
+
375
+ > .input-container {
376
+ position: sticky;
377
+ position: -webkit-sticky;
378
+ bottom: 0;
379
+ background: white;
380
+ > .input-icon {
381
+ cursor: pointer;
382
+ position: absolute;
383
+ top: 50%;
384
+ right: 30px;
385
+ transform: translateY(-50%);
386
+ color: #c8c8c8;
387
+ }
388
+ }
389
+
390
+ &::-webkit-scrollbar {
391
+ width: 8px;
392
+ }
393
+
394
+ &::-webkit-scrollbar-track {
395
+ background: #f5f5f5;
396
+ }
397
+
398
+ &::-webkit-scrollbar-thumb {
399
+ background: #e9e8e8;
400
+ border-radius: 10px;
401
+ }
402
+
403
+ .archive-content {
404
+ width: 95%;
405
+
406
+ p {
407
+ margin-bottom: 0;
408
+ font-size: 0.875rem;
409
+ padding: .3rem .6rem 0 .6rem;
410
+ }
411
+
412
+ .archive-container {
413
+ display: flex;
414
+ align-items: center;
415
+ padding: 0.5rem 0.5rem 0.438rem;
416
+ cursor: pointer;
417
+ user-select: none;
418
+
419
+ &:hover{
420
+ background-color: #f6f9fc;
421
+ border-radius: 5px;
422
+ }
423
+
424
+ .archive-img {
425
+ background-color: #f5f5f5;
426
+ border-radius: 6px;
427
+ padding: 7px;
428
+ }
429
+
430
+ .archive-name {
431
+ display: flex;
432
+ margin-left: .8rem;
433
+ width: 145%;
434
+ justify-content: space-between !important;
435
+
436
+ .archive-icon {
437
+ margin-left: 1.5rem;
438
+ }
439
+
440
+ p {
441
+ margin: 0;
442
+ padding: 0;
443
+ width: 13rem;
444
+ white-space: nowrap;
445
+ overflow: hidden;
446
+ text-overflow: ellipsis;
447
+ }
448
+ }
449
+
450
+ .upload-container {
451
+ position: sticky;
452
+ position: -webkit-sticky;
453
+ bottom: 0;
454
+ background: white;
455
+ width: 231px;
456
+ }
457
+ }
458
+ }
459
+
460
+ .archive-buttons {
461
+ display: flex;
462
+ margin-top: -1rem;
463
+ width: 95%;
464
+ }
465
+
466
+ .archive-remove {
467
+ width: 90%;
468
+ word-break: break-word;
469
+ }
470
+ }
471
+
472
+ .readmore {
473
+ overflow: hidden;
474
+ text-overflow: ellipsis;
475
+ display: -webkit-box;
476
+ -webkit-line-clamp: 3;
477
+ -webkit-box-orient: vertical;
478
+ }
479
+
480
+ .tab__icon-pane {
481
+ .img__icon-pane {
482
+ background-color: #f5f5f5 !important;
483
+ border-radius: 30%;
484
+ padding: 7px;
485
+ margin-bottom: 1rem;
486
+ }
487
+ }
488
+
489
+ .content-right {
490
+ width: 25%;
491
+ }
492
+
493
+ .notes-title {
494
+ font-size: 14px;
495
+ color: #1d364b;
496
+ font-weight: bold;
497
+ background-color: white;
498
+ z-index: 500;
499
+ }
500
+
501
+ .notes-baloon {
502
+ width: 231px;
503
+ height: auto;
504
+
505
+ background: #eff5fd;
506
+ border-radius: 10px 10px 10px 0px;
507
+ }
508
+
509
+ .notes-text {
510
+ p {
511
+ font-size: 13px;
512
+ color: #62778c;
513
+ }
514
+ }
515
+
516
+ .notes-date {
517
+ font-size: 11px;
518
+ text-align: right;
519
+
520
+ color: #8da2b5;
521
+ top: calc(50% - 17px / 2 - 444.5px);
522
+ }
523
+
524
+ .notes-owner {
525
+ img {
526
+ width: 23px;
527
+ height: 23px;
528
+ border-radius: 50%;
529
+ }
530
+
531
+ .notes-avatar {
532
+ width: 23px;
533
+ height: 23px;
534
+ border-radius: 50%;
535
+ background-color: #adb5bd;
536
+ }
537
+
538
+ p {
539
+ font-size: 13px;
540
+ font-weight: 600;
541
+ text-transform: uppercase;
542
+
543
+ color: #62778c;
544
+ }
545
+ }
546
+
547
+ .notes-new {
548
+ width: 95%;
549
+ height: 33px;
550
+
551
+ background: #f5f5f5;
552
+ border-radius: 16.5px;
553
+ border: none;
554
+
555
+ outline: 0;
556
+ }
557
+
558
+ .line {
559
+ width: 221px;
560
+ height: 0px;
561
+
562
+ border: 1px solid #ececec5c;
563
+ }
564
+
565
+ .history {
566
+ word-break: break-word;
567
+
568
+ .history-text {
569
+ font-size: 13px;
570
+ color: #62778c;
571
+ }
572
+
573
+ span {
574
+ font-size: 11px;
575
+ line-height: 16px;
576
+
577
+ color: #8da2b5;
578
+ }
579
+ }
580
+
581
+ .cursor-disabled {
582
+ cursor: no-drop;
583
+ }
584
+ </style>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@burh/nuxt-core",
3
- "version": "1.0.248",
3
+ "version": "1.0.249",
4
4
  "description": "Design System and Components.",
5
5
  "author": "Burh",
6
6
  "scripts": {