@burh/nuxt-core 1.0.176 → 1.0.178

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,70 +1,72 @@
1
1
  <template>
2
- <card
3
- class="card-app card-app--training"
4
- :class="icon ? 'card--icon' : ''"
5
- @click.native="$emit('course-click')"
6
- >
7
- <base-dropdown
8
- @click.native.stop
9
- class="top-right custom"
10
- v-if="showMenu"
2
+ <div>
3
+ <card
4
+ class="card-app card-app--training"
5
+ :class="icon ? 'card--icon' : ''"
6
+ @click.native="$emit('course-click')"
11
7
  >
12
- <i
13
- slot="title-container"
14
- class="fa fa-ellipsis-h custom"
15
- aria-hidden="true"
16
- />
17
- <li
18
- v-for="actions in dropdownActions"
19
- class="dropdown-item d-flex align-items-center w-100"
20
- @click="$emit(actions.action)"
21
- :key="actions.name"
22
- >
23
- <i
24
- :class="actions.icon ? actions.icon : 'fa fa-paper-plane'"
25
- aria-hidden="true"
26
- />
27
- <span> {{ actions.name }} </span>
28
- </li>
29
- <li
30
- v-if="defaultAction"
31
- class="dropdown-item d-flex align-items-center w-100"
32
- @click="$emit(defaultAction.action)"
8
+ <base-dropdown
9
+ @click.native.stop
10
+ class="top-right custom"
11
+ v-if="showMenu"
33
12
  >
34
13
  <i
35
- :class="
36
- defaultAction.icon ? defaultAction.icon : 'fa fa-clone'
37
- "
14
+ slot="title-container"
15
+ class="fa fa-ellipsis-h custom"
38
16
  aria-hidden="true"
39
17
  />
40
- <span>
41
- {{ defaultAction.name }}
42
- </span>
43
- </li>
44
- </base-dropdown>
45
- <img
46
- v-if="image"
47
- slot="image"
48
- class=""
49
- :src="image"
50
- alt="Card image cap"
51
- />
18
+ <li
19
+ v-for="actions in dropdownActions"
20
+ class="dropdown-item d-flex align-items-center w-100"
21
+ @click="$emit(actions.action)"
22
+ :key="actions.name"
23
+ >
24
+ <i
25
+ :class="
26
+ actions.icon ? actions.icon : 'fa fa-paper-plane'
27
+ "
28
+ aria-hidden="true"
29
+ />
30
+ <span> {{ actions.name }} </span>
31
+ </li>
32
+ <li
33
+ v-if="defaultAction"
34
+ class="dropdown-item d-flex align-items-center w-100"
35
+ @click="$emit(defaultAction.action)"
36
+ >
37
+ <i
38
+ :class="
39
+ defaultAction.icon
40
+ ? defaultAction.icon
41
+ : 'fa fa-clone'
42
+ "
43
+ aria-hidden="true"
44
+ />
45
+ <span>
46
+ {{ defaultAction.name }}
47
+ </span>
48
+ </li>
49
+ </base-dropdown>
50
+ <img
51
+ v-if="image"
52
+ slot="image"
53
+ class=""
54
+ :src="image"
55
+ alt="Card image cap"
56
+ />
52
57
 
53
- <i
54
- v-if="icon"
55
- slot="image"
56
- :class="icon"
57
- class="card-img-top card__icon border-bottom"
58
- />
59
- <!-- title -->
60
- <h3 class="h6 mb-2 content-block">{{ title }}</h3>
61
- <!-- descrição -->
62
- <p v-if="description" class="card-title mb-2">{{ description }}</p>
63
- <!-- another information -->
64
- <p v-if="info" class="card-title">
65
- <small class="text-muted">{{ info }}</small>
66
- </p>
67
- </card>
58
+ <i v-if="icon" slot="image" :class="icon" class="card__icon" />
59
+ <!-- title -->
60
+ <h3 v-if="image" class="h6 mb-2 content-block">{{ title }}</h3>
61
+ <!-- descrição -->
62
+ <p v-if="description" class="card-title mb-2">{{ description }}</p>
63
+ <!-- another information -->
64
+ <p v-if="info" class="card-title">
65
+ <small class="text-muted">{{ info }}</small>
66
+ </p>
67
+ </card>
68
+ <span v-if="icon" class="card-title">{{ title }}</span>
69
+ </div>
68
70
  </template>
69
71
 
70
72
  <script>
@@ -115,6 +117,10 @@ export default {
115
117
  display: block;
116
118
  }
117
119
  }
120
+
121
+ &__icon {
122
+ margin-top: 3rem;
123
+ }
118
124
  }
119
125
 
120
126
  .custom {
@@ -1,5 +1,137 @@
1
1
  <template>
2
- <modal :show="isModalOpen" v-on:close="closeModal" size="xl" class="modal">
2
+ <el-dialog
3
+ :visible.sync="isModalOpen"
4
+ width="54%"
5
+ custom-class="position-relative"
6
+ @close="$emit('close')"
7
+ >
8
+ <template>
9
+ <div class="ml-5 mr-5">
10
+ <div class="row send send-test mx-0">
11
+ <h5>Insira o e-mail que deseja enviar o teste</h5>
12
+ </div>
13
+
14
+ <div class="row mt-3 send send-form">
15
+ <div class="col-6">
16
+ <label for="teste">Selecione a vaga</label>
17
+ <el-select
18
+ filterable
19
+ no-match-text="Nenhuma vaga encontrada"
20
+ no-data-text="Nenhuma vaga encontrada"
21
+ placeholder="Escolha a vaga"
22
+ v-model="jobid"
23
+ class="w-100"
24
+ >
25
+ <el-option
26
+ v-for="job in allJobs"
27
+ class="select-danger"
28
+ :value="job.id"
29
+ :label="job.name"
30
+ :key="job.id"
31
+ ></el-option>
32
+ </el-select>
33
+ <span></span>
34
+ </div>
35
+
36
+ <div class="col-6">
37
+ <label for="teste">Selecione o teste</label>
38
+ <el-select
39
+ filterable
40
+ no-match-text="Nenhuma teste encontrado"
41
+ no-data-text="Nenhum teste encontrado"
42
+ placeholder="Escolha o teste"
43
+ v-model="testid"
44
+ class="w-100"
45
+ >
46
+ <el-option
47
+ v-for="test in allTests"
48
+ class="select-danger"
49
+ :value="test.id"
50
+ :label="test.name"
51
+ :key="test.id"
52
+ :disabled="
53
+ !categoryIsAllowedToSend(
54
+ test.category_test_id
55
+ )
56
+ "
57
+ ></el-option>
58
+ </el-select>
59
+ </div>
60
+ </div>
61
+
62
+ <hr />
63
+
64
+ <validation-observer ref="sendTest">
65
+ <div
66
+ class="row mt-3 send send-form"
67
+ v-for="(slot, idx) in slots"
68
+ :key="idx"
69
+ >
70
+ <!-- <label for="name">Nome</label> -->
71
+ <div class="col-6">
72
+ <validation-provider
73
+ tag="div"
74
+ :vid="`send-name-${idx}`"
75
+ name="Nome"
76
+ rules="required"
77
+ v-slot="{ errors }"
78
+ >
79
+ <base-input
80
+ v-model="slot.name"
81
+ :error="errors[0]"
82
+ :valid="errors.length ? true : false"
83
+ class="w-100"
84
+ placeholder="Nome do usuário/candidato"
85
+ />
86
+ </validation-provider>
87
+ </div>
88
+
89
+ <div class="col-5">
90
+ <validation-provider
91
+ tag="div"
92
+ :vid="`send-email-${idx}`"
93
+ name="Email"
94
+ rules="required|email"
95
+ v-slot="{ errors }"
96
+ >
97
+ <base-input
98
+ v-model="slot.email"
99
+ :error="errors[0]"
100
+ :valid="errors.length ? true : false"
101
+ class="w-100"
102
+ placeholder="E-mail do usuário/candidato"
103
+ />
104
+ </validation-provider>
105
+ </div>
106
+
107
+ <div class="col-1 mt-2">
108
+ <i
109
+ v-if="idx !== slots.length - 1"
110
+ class="fa fa-trash pointer"
111
+ @click="removeSlot(slot.id)"
112
+ ></i>
113
+ <i
114
+ v-else
115
+ class="fa fa-plus pointer"
116
+ @click="addSlot"
117
+ ></i>
118
+ </div>
119
+ </div>
120
+ </validation-observer>
121
+ </div>
122
+ <!-- <div class="send send-line mt-3 ml-3"></div> -->
123
+
124
+ <span class="tool tool-close" @click="$emit('close')">
125
+ Fechar
126
+ <font-awesome-icon
127
+ :icon="['fas', 'times']"
128
+ class="text-white ml-1"
129
+ />
130
+ </span>
131
+ </template>
132
+ </el-dialog>
133
+
134
+ <!-- <modal :show="isModalOpen" v-on:close="closeModal" size="xl" class="modal">
3
135
  <template slot="header">
4
136
  <h2 class="display-4 px-4">
5
137
  Insira os e-mail que deseja enviar o teste
@@ -106,104 +238,165 @@
106
238
  >Enviar teste</base-button
107
239
  >
108
240
  </div>
109
- </modal>
241
+ </modal> -->
110
242
  </template>
111
243
 
112
244
  <script>
113
- import { Select, Option } from 'element-ui';
245
+ import { Dialog, Select, Option } from 'element-ui';
114
246
 
115
247
  export default {
116
- name: 'send-test',
117
- components: {
118
- [Select.name]: Select,
119
- [Option.name]: Option
120
- },
121
- props: {
122
- allTests: Array,
123
- allJobs: Array,
124
- isModalOpen: {
125
- type: Boolean,
126
- default: false
127
- },
248
+ name: 'send-test',
249
+ components: {
250
+ [Select.name]: Select,
251
+ [Option.name]: Option,
252
+ [Dialog.name]: Dialog
253
+ },
254
+ props: {
255
+ allTests: Array,
256
+ allJobs: Array,
257
+ isModalOpen: {
258
+ type: Boolean,
259
+ default: false
260
+ },
128
261
  selectedTest: Number,
129
262
  categoriesAllowedToSend: {
130
263
  type: Object,
131
264
  default: () => ({})
132
265
  }
133
- },
134
- methods: {
135
- closeModal(e) {
136
- this.$emit('closemodal', e);
137
- },
138
- removeSlot(id) {
139
- this.slots = this.slots.filter(slot => slot.id !== id);
140
- },
141
- addSlot() {
142
- const newSlot = {
143
- id: new Date().getTime(),
144
- name: '',
145
- email: '',
146
- selected: 8
147
- };
148
-
149
- this.slots = [...this.slots, newSlot];
150
- },
151
- async sendTest() {
152
- const pass = await this.$refs.sendTest.validate();
153
- if (!pass) {
154
- return;
155
- }
156
- const filterSlots = slot => slot.email !== '';
157
- const formatRequest = slot => ({
158
- ...slot,
159
- jobid: this.jobid,
160
- testid: this.testid
161
- });
162
- const testRequest = this.slots
163
- .filter(filterSlots)
164
- .map(formatRequest);
165
- this.$emit('send-test', testRequest);
266
+ },
267
+ methods: {
268
+ closeModal(e) {
269
+ this.$emit('closemodal', e);
270
+ },
271
+ removeSlot(id) {
272
+ this.slots = this.slots.filter(slot => slot.id !== id);
273
+ },
274
+ addSlot() {
275
+ const newSlot = {
276
+ id: new Date().getTime(),
277
+ name: '',
278
+ email: '',
279
+ selected: 8
280
+ };
281
+
282
+ this.slots = [...this.slots, newSlot];
283
+ },
284
+ async sendTest() {
285
+ const pass = await this.$refs.sendTest.validate();
286
+ if (!pass) {
287
+ return;
288
+ }
289
+ const filterSlots = slot => slot.email !== '';
290
+ const formatRequest = slot => ({
291
+ ...slot,
292
+ jobid: this.jobid,
293
+ testid: this.testid
294
+ });
295
+ const testRequest = this.slots
296
+ .filter(filterSlots)
297
+ .map(formatRequest);
298
+ this.$emit('send-test', testRequest);
166
299
  },
167
300
  categoryIsAllowedToSend(categoryId) {
168
- const categoryIsAllowToSend = Object.values(this.categoriesAllowedToSend).find(id => id == categoryId);
169
- return categoryIsAllowToSend ? true : false
301
+ const categoryIsAllowToSend = Object.values(
302
+ this.categoriesAllowedToSend
303
+ ).find(id => id == categoryId);
304
+ return categoryIsAllowToSend ? true : false;
305
+ }
306
+ },
307
+ watch: {
308
+ selectedTest(newValue) {
309
+ this.testid = newValue;
170
310
  }
171
- },
172
- watch: {
173
- selectedTest(newValue) {
174
- this.testid = newValue;
175
- }
176
- },
177
- data() {
178
- return {
179
- jobid: null,
180
- testid: this.selectedTest,
181
- slots: [
182
- {
183
- id: 'first',
184
- name: '',
185
- email: ''
186
- }
187
- ]
188
- };
189
- }
311
+ },
312
+ data() {
313
+ return {
314
+ jobid: null,
315
+ testid: this.selectedTest,
316
+ slots: [
317
+ {
318
+ id: 'first',
319
+ name: '',
320
+ email: ''
321
+ }
322
+ ]
323
+ };
324
+ }
190
325
  };
191
326
  </script>
192
327
  <style lang="scss" scoped>
193
- .send-test-modal {
194
- position: fixed;
195
- overflow-y: scroll;
196
- overflow-x: hidden;
197
- width: 60%;
198
- height: 50%;
199
- background-color: #ffffff;
200
- z-index: 999 !important;
201
- top: 20% !important;
202
- left: 20% !important;
203
- box-sizing: border-box;
328
+ @import '@burh/nuxt-core/assets/sass/burh-ds/variables/_colors.scss';
329
+
330
+ /deep/ .el-dialog__header {
331
+ display: none;
204
332
  }
205
333
 
206
- .pointer {
334
+ /deep/ .el-dialog {
335
+ overflow: hidden;
336
+ border-radius: 10px;
337
+ padding-bottom: 50px;
338
+ max-width: 734px;
339
+ }
340
+
341
+ /deep/ .mt-2,
342
+ .my-2 {
343
+ margin-top: 0.7rem !important;
344
+ }
345
+
346
+ .send {
347
+ &-test {
348
+ h5 {
349
+ font-family: Poppins;
350
+ font-style: normal;
351
+ font-weight: 600;
352
+ font-size: 20px;
353
+ line-height: 30px;
354
+ color: #32325d;
355
+ }
356
+ }
357
+
358
+ &-form {
359
+ label {
360
+ font-style: normal;
361
+ font-weight: normal;
362
+ font-size: 14px;
363
+ line-height: 21px;
364
+
365
+ color: #525f7f;
366
+ }
367
+ }
368
+
369
+ &-line {
370
+ width: 668px;
371
+ height: 0px;
372
+
373
+ border: 1px solid #e9ecef;
374
+ }
375
+ }
376
+
377
+ .tool {
378
+ position: absolute;
379
+ top: 1rem;
380
+ z-index: 10;
381
+ color: $primary;
207
382
  cursor: pointer;
383
+
384
+ &-close {
385
+ position: absolute;
386
+ width: 88px;
387
+ height: 27px;
388
+ right: 7px;
389
+ top: 7px;
390
+ display: flex;
391
+ justify-content: center;
392
+ align-items: center;
393
+
394
+ font-size: 11px;
395
+
396
+ font-weight: 500;
397
+ background: rgba(0, 0, 0, 0.2);
398
+ border-radius: 17.5px;
399
+ color: #fff;
400
+ }
208
401
  }
209
402
  </style>
package/nuxt.config.js CHANGED
@@ -73,7 +73,7 @@ module.exports = {
73
73
  /*
74
74
  ** Customize the progress-bar color
75
75
  */
76
- loading: { color: '#fff' },
76
+ // loading: { color: '#fff' },
77
77
 
78
78
  /*
79
79
  ** Global CSS
@@ -169,7 +169,7 @@ module.exports = {
169
169
  ],
170
170
 
171
171
  /*
172
-
172
+
173
173
  ** Axios module configuration
174
174
  */
175
175
  axios: {
@@ -203,4 +203,4 @@ module.exports = {
203
203
  ]
204
204
  }
205
205
  }
206
- };
206
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@burh/nuxt-core",
3
- "version": "1.0.176",
3
+ "version": "1.0.178",
4
4
  "description": "Design System and Components.",
5
5
  "author": "Burh",
6
6
  "scripts": {