@burh/nuxt-core 1.0.447 → 1.0.449

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.
@@ -2,7 +2,7 @@
2
2
  <li class="performance-item" :class="primary && ' primary'">
3
3
  <span class="performance-item--title">{{ formatedTitle }}</span>
4
4
  <span v-if="!skeleton" class="performance-item--value">{{
5
- value > 999 ? formatedValue + ' mil' : formatedValue + ''
5
+ formatedValue
6
6
  }}</span>
7
7
  <span
8
8
  v-if="skeleton"
@@ -33,9 +33,9 @@ export default {
33
33
  },
34
34
  computed: {
35
35
  formatedValue() {
36
- if (this.value > 999) return this.value / 1000;
36
+ // if (this.value > 999) return this.value / 1000;
37
37
 
38
- return this.value;
38
+ return this.value.toLocaleString('pt-BR');
39
39
  },
40
40
  formatedTitle() {
41
41
  const title = this.title.toLowerCase();
@@ -1,154 +1,157 @@
1
1
  <template>
2
- <modal
3
- :show.sync="openModal"
4
- v-on:close="closeModal()"
5
- class="modal modal-docs"
6
- modalContentClasses="container-fluid"
7
- headerClasses="row px-4 pt-5"
8
- bodyClasses="px-4"
9
- >
10
- <template slot="header">
11
- <div class="d-flex mx-auto flex-column pl-4">
12
- <i class="display-1 fas fa-file mx-auto primary"></i>
13
- <h2 class="display-4 mx-auto">Avaliações</h2>
14
- </div>
15
- </template>
2
+ <modal
3
+ :show.sync="openModal"
4
+ v-on:close="closeModal()"
5
+ class="modal modal-docs"
6
+ modalContentClasses="container-fluid"
7
+ headerClasses="row px-4 pt-5"
8
+ bodyClasses="px-4"
9
+ >
10
+ <template slot="header">
11
+ <div class="d-flex mx-auto flex-column pl-4">
12
+ <i class="display-1 fas fa-file mx-auto primary"></i>
13
+ <h2 class="display-4 mx-auto">Avaliações</h2>
14
+ </div>
15
+ </template>
16
16
 
17
- <ul class="list-group list-group-flush" data-toggle="checklist">
18
- <li
19
- class="list-group-item px-0"
20
- v-for="item in modalData.slice(
21
- (currentPage - 1) * pageSize,
22
- currentPage * pageSize
23
- )"
24
- :key="item.id"
25
- >
26
- <div
27
- v-if="item.test"
28
- class="checklist-item checklist-item-info"
29
- >
30
- <div class="checklist-info">
31
- <h5 class="checklist-title mb-0 mr-4">
32
- {{ item.test.name }} -
33
- <small>{{
34
- $moment(item.created_at).format(
35
- 'DD/MM/YYYY H:mm'
36
- )
37
- }}</small>
38
- </h5>
39
- <badge
40
- v-if="item.finished_at"
41
- :type="
42
- item.avarage < courseInfo.course.minimun_score
43
- ? 'danger'
44
- : 'secondary'
45
- "
46
- >Nota: {{ item.avarage }}</badge
47
- >
48
- </div>
49
- <div>
50
- <!-- <el-tooltip v-if="item.started_at && item.finished_at === null" :content="'Teste em andamento'" placement="top" class="px-4">
17
+ <ul class="list-group list-group-flush" data-toggle="checklist">
18
+ <li
19
+ class="list-group-item px-0"
20
+ v-for="item in modalData.slice(
21
+ (currentPage - 1) * pageSize,
22
+ currentPage * pageSize
23
+ )"
24
+ :key="item.id"
25
+ >
26
+ <div
27
+ v-if="item.test"
28
+ class="checklist-item checklist-item-info"
29
+ >
30
+ <div class="checklist-info">
31
+ <h5 class="checklist-title mb-0 mr-4">
32
+ {{ item.test.name }} -
33
+ <small>{{
34
+ $moment(item.created_at).format(
35
+ 'DD/MM/YYYY H:mm'
36
+ )
37
+ }}</small>
38
+ </h5>
39
+ <badge
40
+ v-if="item.finished_at"
41
+ :type="
42
+ item.avarage < courseInfo.course.minimun_score
43
+ ? 'danger'
44
+ : 'secondary'
45
+ "
46
+ >Nota: {{ item.avarage }}</badge
47
+ >
48
+ </div>
49
+ <div>
50
+ <!-- <el-tooltip v-if="item.started_at && item.finished_at === null" :content="'Teste em andamento'" placement="top" class="px-4">
51
51
  <i class="fas fa-clock"></i>
52
52
  </el-tooltip> -->
53
- <el-tooltip
54
- v-if="item.started_at === null"
55
- :content="'Teste enviado'"
56
- placement="top"
57
- class="px-4"
58
- >
59
- <i class="fas fa-info-circle"></i>
60
- </el-tooltip>
61
- <el-tooltip
62
- v-if="item.finished_at !== null"
63
- :content="'Reenviar teste'"
64
- placement="top"
65
- class="px-4"
66
- >
67
- <i
68
- class="fas fa-external-link-alt cursor-pointer"
69
- @click="redoTest(item.id)"
70
- >
71
- </i>
72
- </el-tooltip>
73
- </div>
74
- </div>
75
- </li>
76
- </ul>
77
- <div class="card-footer py-4 d-flex">
78
- <base-pagination
79
- class="mx-auto"
80
- v-model="currentPage"
81
- :perPage="3"
82
- :total="modalData.length"
83
- ></base-pagination>
84
- </div>
85
- </modal>
53
+ <el-tooltip
54
+ v-if="item.started_at === null"
55
+ :content="'Teste enviado'"
56
+ placement="top"
57
+ class="px-4"
58
+ >
59
+ <i class="fas fa-info-circle"></i>
60
+ </el-tooltip>
61
+ <el-tooltip
62
+ v-if="item.finished_at !== null"
63
+ :content="'Reenviar teste'"
64
+ placement="top"
65
+ class="px-4"
66
+ >
67
+ <i
68
+ class="fas fa-external-link-alt cursor-pointer"
69
+ @click="redoTest(item.test.id)"
70
+ >
71
+ </i>
72
+ </el-tooltip>
73
+ </div>
74
+ </div>
75
+ </li>
76
+ </ul>
77
+ <div class="card-footer py-4 d-flex">
78
+ <base-pagination
79
+ class="mx-auto"
80
+ v-model="currentPage"
81
+ :perPage="3"
82
+ :total="modalData.length"
83
+ ></base-pagination>
84
+ </div>
85
+ </modal>
86
86
  </template>
87
87
  <script>
88
- import swal from 'sweetalert2';
89
88
  import { mask } from 'vue-the-mask';
90
89
  import { Checkbox, CheckboxGroup } from 'element-ui';
91
90
  export default {
92
- name: 'tests-modal',
93
- directives: { mask },
94
- components: {
95
- [Checkbox.name]: Checkbox,
96
- [CheckboxGroup.name]: CheckboxGroup
97
- },
98
- data() {
99
- return {
100
- filtrarPorTexto: '',
101
- currentPage: 1,
102
- pageSize: 3,
103
- downloadItems: [],
104
- checkList: []
105
- };
106
- },
107
- props: {
108
- modalData: null,
109
- show: false,
110
- courseInfo: null
111
- },
112
- model: {
113
- prop: 'show'
114
- },
115
- computed: {
116
- openModal: {
117
- get() {
118
- return this.show;
119
- },
120
- set(show) {
121
- this.$emit('input', show);
122
- }
123
- }
124
- },
125
- mounted() {},
126
- methods: {
127
- goToTest(testId) {
128
- this.$emit('go-to-test', testId);
129
- },
130
- closeModal() {
131
- this.downloadItems = [];
132
- this.checkList = [];
133
- this.$emit('close-modal');
134
- },
135
- async redoTest(testId) {
136
- let test_id = this.courseInfo.tests.find(e => e.id === testId);
91
+ name: 'tests-modal',
92
+ directives: { mask },
93
+ components: {
94
+ [Checkbox.name]: Checkbox,
95
+ [CheckboxGroup.name]: CheckboxGroup
96
+ },
97
+ data() {
98
+ return {
99
+ filtrarPorTexto: '',
100
+ currentPage: 1,
101
+ pageSize: 3,
102
+ downloadItems: [],
103
+ checkList: []
104
+ };
105
+ },
106
+ props: {
107
+ modalData: null,
108
+ show: {
109
+ type: Boolean,
110
+ default: false
111
+ },
112
+ courseInfo: null
113
+ },
114
+ model: {
115
+ prop: 'show'
116
+ },
117
+ computed: {
118
+ openModal: {
119
+ get() {
120
+ return this.show;
121
+ },
122
+ set(show) {
123
+ this.$emit('input', show);
124
+ }
125
+ }
126
+ },
127
+ mounted() {},
128
+ methods: {
129
+ goToTest(testId) {
130
+ this.$emit('go-to-test', testId);
131
+ },
132
+ closeModal() {
133
+ this.downloadItems = [];
134
+ this.checkList = [];
135
+ this.$emit('close-modal');
136
+ },
137
+ async redoTest(testId) {
138
+ let test_id = this.courseInfo && this.courseInfo.course && this.courseInfo.course.tests.find(test => test.company_test_id === testId);
137
139
 
138
- let payload = {
139
- company_id: this.courseInfo.course.company_id,
140
- users: [
141
- {
142
- user_id: this.courseInfo.user_id,
143
- test_id: test_id.test.id,
144
- course_id: this.courseInfo.course.id
145
- }
146
- ]
147
- };
148
- this.$emit('send-test', payload);
149
- this.$emit('close-modal');
150
- }
151
- }
140
+ let payload = {
141
+ company_id: this.courseInfo.course.company_id,
142
+ users: [
143
+ {
144
+ user_id: this.courseInfo.user_id,
145
+ test_id: test_id && test_id.company_test_id || '',
146
+ course_id: this.courseInfo.course.id
147
+ }
148
+ ]
149
+ };
150
+
151
+ this.$emit('send-test', payload);
152
+ this.$emit('close-modal');
153
+ }
154
+ }
152
155
  };
153
156
  </script>
154
157
  <style lang="scss">
@@ -168,7 +168,7 @@
168
168
  </div>
169
169
  </div>
170
170
  <el-checkbox
171
- v-show="switchSingle"
171
+ v-if="switchSingle"
172
172
  class="checkbox-user"
173
173
  v-model="payload.all_users"
174
174
  > Enviar para todos
@@ -188,7 +188,7 @@
188
188
  class="col-12"
189
189
  style="height: 50px"
190
190
  name="Treinamento"
191
- :vid="`send-training-${idx}`"
191
+ vid="send-training"
192
192
  rules="required"
193
193
  v-slot="{ errors }"
194
194
  >
@@ -92,13 +92,12 @@
92
92
  v-for="(slot, idx) in slots"
93
93
  :key="idx"
94
94
  >
95
- <!-- <label for="name">Nome</label> -->
96
95
  <div class="col-6">
97
96
  <validation-provider
98
97
  tag="div"
99
98
  :vid="`send-name-${idx}`"
100
99
  name="Nome"
101
- rules="required"
100
+ rules="required|alpha_spaces|regex:\w+\s+\w+"
102
101
  v-slot="{ errors }"
103
102
  >
104
103
  <label for="email">Nome</label>
@@ -90,7 +90,10 @@ export default {
90
90
  type: String,
91
91
  default: ''
92
92
  },
93
- openModal: false,
93
+ openModal: {
94
+ type: Boolean,
95
+ default: false
96
+ },
94
97
  userTrainings: {
95
98
  type: Array,
96
99
  default: () => []
@@ -107,7 +110,6 @@ export default {
107
110
  },
108
111
  watch: {
109
112
  userTrainings(newValue) {
110
- console.log(newValue);
111
113
  this.userTrainingsSelecteds = newValue;
112
114
 
113
115
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@burh/nuxt-core",
3
- "version": "1.0.447",
3
+ "version": "1.0.449",
4
4
  "description": "Design System and Components.",
5
5
  "author": "Burh",
6
6
  "scripts": {