@burh/nuxt-core 1.0.240 → 1.0.242

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,356 +1,355 @@
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
- margin-right: 22px;
338
- word-break: break-word;
339
-
340
- .history-text {
341
- font-size: 13px;
342
- color: #62778c;
343
- }
344
-
345
- span {
346
- font-size: 11px;
347
- line-height: 16px;
348
-
349
- color: #8da2b5;
350
- }
351
- }
352
-
353
- .cursor-disabled {
354
- cursor: no-drop;
355
- }
356
- </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 :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>