@burh/nuxt-core 1.0.62 → 1.0.64

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,9 +1,8 @@
1
1
  <template>
2
- <div class="quill">
3
- <div :id="toolbarId">
4
- </div>
5
- <div :id="editorId" :name="name" class ref="editor"></div>
6
- </div>
2
+ <div class="quill">
3
+ <div :id="toolbarId"></div>
4
+ <div :id="editorId" :name="name" class ref="editor"></div>
5
+ </div>
7
6
  </template>
8
7
  <script>
9
8
  import 'quill/dist/quill.core.css'
@@ -17,6 +16,10 @@ export default {
17
16
  default: "",
18
17
  },
19
18
  name: String,
19
+ configTools: {
20
+ type: Array,
21
+ default: () => null
22
+ }
20
23
  },
21
24
  data() {
22
25
  return {
@@ -32,25 +35,25 @@ export default {
32
35
  this.editor = new Quill(`#${this.editorId}`, {
33
36
  theme: "snow",
34
37
  modules: {
35
- toolbar: [
36
- [{ 'font': [] }],
37
- [{ 'color': [] }, { 'background': [] }],
38
+ toolbar: this.configTools || [
39
+ //[{ 'font': [] }],
40
+ //[{ 'color': [] }, { 'background': [] }],
38
41
 
39
42
  [{ 'size': ['small', false, 'large', 'huge'] }], // custom dropdown
40
- [{ 'header': [1, 2, 3, 4, 5, 6, false] }],
43
+ //[{ 'header': [1, 2, 3, 4, 5, 6, false] }],
41
44
 
42
- [{ 'align': '' }, {'align': 'center'}, {'align': 'justify'}, {'align': 'right'}],
45
+ //[{ 'align': '' }, {'align': 'center'}, {'align': 'justify'}, {'align': 'right'}],
43
46
 
44
47
  ['bold', 'italic', 'underline', 'strike'], // toggled buttons
45
48
 
46
49
  [ 'link', 'image' ], // add's image support
47
50
 
48
- ['blockquote', 'code-block'],
51
+ //['blockquote', 'code-block'],
49
52
 
50
53
  [{ 'list': 'ordered'}, { 'list': 'bullet' }],
51
- [{ 'script': 'sub'}, { 'script': 'super' }], // superscript/subscript
54
+ //[{ 'script': 'sub'}, { 'script': 'super' }], // superscript/subscript
52
55
  [{ 'indent': '-1'}, { 'indent': '+1' }], // outdent/indent
53
- [{ 'direction': 'rtl' }], // text direction
56
+ //[{ 'direction': 'rtl' }], // text direction
54
57
 
55
58
  ['clean']
56
59
  ]
@@ -112,16 +115,15 @@ export default {
112
115
  };
113
116
  </script>
114
117
  <style lang="scss">
115
-
116
118
  .ql-clipboard {
117
- display: none;
119
+ display: none;
118
120
  }
119
121
  .ql-editor {
120
- margin-bottom: 1.5rem;
121
- resize: vertical;
122
- overflow-y: scroll;
122
+ margin-bottom: 1.5rem;
123
+ resize: vertical;
124
+ overflow-y: scroll;
123
125
  }
124
126
  .ql-container.ql-snow {
125
- border: 0;
127
+ border: 0;
126
128
  }
127
129
  </style>
@@ -0,0 +1,119 @@
1
+ <template>
2
+ <modal :show.sync="openModal" v-on:close="closeModal()" class="modal modal-docs" modalContentClasses="container-fluid" headerClasses="row px-4 pt-5" bodyClasses="px-4">
3
+ <template slot="header">
4
+ <div class="d-flex mx-auto flex-column pl-4">
5
+ <i class="display-1 fas fa-file mx-auto primary"></i>
6
+ <h2 class="display-4 mx-auto">Testes</h2>
7
+ </div>
8
+ </template>
9
+
10
+ <ul class="list-group list-group-flush" data-toggle="checklist">
11
+ <li class="list-group-item px-0"
12
+ v-for="item in modalData.slice((currentPage-1)*pageSize,currentPage*pageSize)"
13
+ :key="item.id"
14
+ >
15
+ <div class="checklist-item checklist-item-info">
16
+ <div class="checklist-info">
17
+ <h5 class="checklist-title mb-0 mr-4">{{item.test.name}} - <small>{{$moment(item.created_at).format('DD/MM/YYYY H:mm')}}</small></h5>
18
+ <badge v-if="item.finished_at" :type="item.avarage < courseInfo.course.minimun_score ? 'danger' : 'secondary'">Nota: {{item.avarage}}</badge>
19
+ </div>
20
+ <div>
21
+ <el-tooltip v-if="item.started_at && item.finished_at === null" :content="'Teste em andamento'" placement="top" class="px-4">
22
+ <i class="fas fa-clock"></i>
23
+ </el-tooltip>
24
+ <el-tooltip v-if="item.started_at === null" :content="'Teste enviado'" placement="top" class="px-4">
25
+ <i class="fas fa-info-circle"></i>
26
+ </el-tooltip>
27
+ <el-tooltip v-if="item.finished_at !== null" :content="'Reenviar teste'" placement="top" class="px-4">
28
+ <i
29
+ class="fas fa-external-link-alt cursor-pointer"
30
+ @click="redoTest(item.id)"
31
+ >
32
+ </i>
33
+ </el-tooltip>
34
+ </div>
35
+ </div>
36
+ </li>
37
+ </ul>
38
+ <div class="card-footer py-4 d-flex">
39
+ <base-pagination class="mx-auto" v-model="currentPage" :perPage="3" :total=modalData.length></base-pagination>
40
+ </div>
41
+
42
+ </modal>
43
+ </template>
44
+ <script>
45
+ import swal from 'sweetalert2';
46
+ import { mask } from 'vue-the-mask';
47
+ import { Checkbox, CheckboxGroup } from 'element-ui'
48
+ export default {
49
+ name: 'tests-modal',
50
+ directives: { mask },
51
+ components: {
52
+ [Checkbox.name]: Checkbox,
53
+ [CheckboxGroup.name]: CheckboxGroup,
54
+ },
55
+ data(){
56
+ return{
57
+ filtrarPorTexto: '',
58
+ currentPage: 1,
59
+ pageSize: 3,
60
+ downloadItems: [],
61
+ checkList: []
62
+ }
63
+ },
64
+ props:{
65
+ modalData: null,
66
+ show: false,
67
+ courseInfo: null
68
+ },
69
+ model:{
70
+ prop: 'show'
71
+ },
72
+ computed:{
73
+ openModal:{
74
+ get(){return this.show;},
75
+ set(show){this.$emit('input', show);}
76
+ }
77
+ },
78
+ methods:{
79
+ goToTest(testId){
80
+ this.$emit('go-to-test', testId)
81
+ },
82
+ closeModal(){
83
+ this.downloadItems = []
84
+ this.checkList = []
85
+ this.$emit('close-modal')
86
+ },
87
+ async redoTest(testId){
88
+ let test_id = this.courseInfo.tests.find(e => e.id === testId)
89
+ console.log(this.courseInfo);
90
+ let payload = {
91
+ company_id: this.courseInfo.course.company_id,
92
+ users:[
93
+ {
94
+ user_id: this.courseInfo.user_id,
95
+ test_id: test_id.test.id,
96
+ course_id: this.courseInfo.course.id
97
+ }
98
+ ]
99
+ }
100
+ this.$emit('send-test', payload);
101
+ this.$emit('close-modal')
102
+ }
103
+ }
104
+ }
105
+ </script>
106
+ <style lang="scss">
107
+ .modal-docs{
108
+ .modal-header .close {
109
+ padding: 1.25rem;
110
+ margin: -1rem -1rem -1rem !important;
111
+ }
112
+ .modal-footer{
113
+ padding-top: 0 !important
114
+ }
115
+ .el-checkbox__label{
116
+ display: none !important;
117
+ }
118
+ }
119
+ </style>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@burh/nuxt-core",
3
- "version": "1.0.62",
3
+ "version": "1.0.64",
4
4
  "description": "Design System and Components.",
5
5
  "author": "Burh",
6
6
  "scripts": {