@burh/nuxt-core 1.0.244 → 1.0.245

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