@nixweb/nixloc-ui 0.0.305 → 0.0.307

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nixweb/nixloc-ui",
3
- "version": "0.0.305",
3
+ "version": "0.0.307",
4
4
  "description": "Componentes UI",
5
5
  "author": "Fábio Ávila <fabio@nixweb.com.br>",
6
6
  "private": false,
@@ -55,17 +55,21 @@
55
55
  <b-row>
56
56
  <b-col sm="2" v-if="item.title">
57
57
  <i :class="item.icon"></i>
58
-
59
58
  </b-col>
60
59
  <b-col sm="9">
61
60
  <div v-if="item.groupName" class="div-group">
62
61
  {{ item.groupName }}
63
62
  </div>
64
63
  <span>
64
+
65
65
  <span> {{ item.title }}</span>
66
- <span class="div-support" v-if="item.isVisible == 'support'">
66
+ <span class="div-new" v-if="item.isVisible == 'support'">
67
67
  Suporte
68
68
  </span>
69
+ <span class="div-new"
70
+ v-if="item.showNewUntil && showNewUntil(item.showNewUntil)">
71
+ Novo
72
+ </span>
69
73
  </span>
70
74
  </b-col>
71
75
  </b-row>
@@ -136,6 +140,17 @@ export default {
136
140
  },
137
141
  methods: {
138
142
  ...mapMutations("generic", ["addEvent", "toggleMenu"]),
143
+ showNewUntil(dateStr) {
144
+ const [day, month, year] = dateStr.split('/');
145
+ const inputDate = new Date(year, month - 1, day);
146
+ const today = new Date();
147
+
148
+ // Zerar horas para comparar apenas a data
149
+ inputDate.setHours(0, 0, 0, 0);
150
+ today.setHours(0, 0, 0, 0);
151
+
152
+ return today < inputDate;
153
+ },
139
154
  updatePageSize() {
140
155
  const windowHeight = window.innerHeight;
141
156
  this.pageSize = windowHeight;
@@ -445,11 +460,11 @@ export default {
445
460
  padding: 5px;
446
461
  }
447
462
 
448
- .div-support {
463
+ .div-new {
449
464
  background-color: #0A36DB;
450
465
  font-size: 11px;
451
466
  border-radius: 20px;
452
- padding: 1px 2px 2px 2px;
467
+ padding: 1px 3px 2px 2px;
453
468
  margin-left: 5px;
454
469
  color: white !important;
455
470
  }
@@ -64,7 +64,7 @@ export default {
64
64
  </script>
65
65
  <style scoped>
66
66
  table tbody tr td {
67
- max-width: 350px;
67
+ width: 1100px;
68
68
  }
69
69
 
70
70
  .table thead tr {
@@ -1,16 +1,16 @@
1
1
  <template>
2
2
  <div class="preview">
3
3
  <div class="toolbar">
4
- <div class="icon-toolbar" v-print="'#printMe'">
4
+ <div class="icon-toolbar" v-print="'#printMeSub'">
5
5
  <i class="fas fa-print"></i>
6
6
  </div>
7
7
  <div class="icon-toolbar icon-excel">
8
- <ExportExcel :header="header" :data="data" />
8
+ <ExportExcel :nameFile="name" :header="header" :data="data" />
9
9
  </div>
10
10
  </div>
11
- <ScrollBar :minHeight="400" :maxHeight="820">
11
+ <ScrollBar :minHeight="400" :maxHeight="500">
12
12
  <br />
13
- <div id="printMe" :style="'min-height:' + minHeight + 'px'" class="a4 footer">
13
+ <div id="printMeSub" :style="'min-height:' + minHeight + 'px'" class="a4 footer">
14
14
  <HeaderReport :title="titleHeader" />
15
15
  <table class="table table-responsive-md">
16
16
  <thead>
@@ -27,19 +27,19 @@
27
27
  <tr v-for="(row, index) in data" :key="index" :style="row.rowCss">
28
28
  <td v-for="(obj, ind) in header" :key="ind">
29
29
  <div :style="obj.styleBody" @click="sendEvent(obj.eventName, row)" :class="convertClass(row[obj.fieldComparison], obj.classCssBody)
30
- " v-if="obj.type === 'text'">
30
+ " v-if="obj.type === 'text'">
31
31
  {{ row[obj.field] }}
32
32
  </div>
33
33
  <div :style="obj.styleBody" @click="sendEvent(obj.eventName, row)" :class="convertClass(row[obj.fieldComparison], obj.classCssBody)
34
- " v-if="obj.type === 'date'">
34
+ " v-if="obj.type === 'date'">
35
35
  {{ row[obj.field] | moment("DD/MM/YYYY") }}
36
36
  </div>
37
37
  <div :style="obj.styleBody" @click="sendEvent(obj.eventName, row)" :class="convertClass(row[obj.fieldComparison], obj.classCssBody)
38
- " v-if="obj.type === 'dateTime'">
38
+ " v-if="obj.type === 'dateTime'">
39
39
  {{ row[obj.field] | moment("DD/MM/YYYY HH:mm") }}
40
40
  </div>
41
41
  <div :style="obj.styleBody" @click="sendEvent(obj.eventName, row)" :class="convertClass(row[obj.fieldComparison], obj.classCssBody)
42
- " v-if="obj.type === 'currency'">
42
+ " v-if="obj.type === 'currency'">
43
43
  {{ row[obj.field] | currency }}
44
44
  </div>
45
45
  </td>
@@ -75,7 +75,7 @@ export default {
75
75
  directives: {
76
76
  print,
77
77
  },
78
- props: ["titleHeader", "header", "data", "totalization", "totalizationCustom", "minHeight"],
78
+ props: ["name", "titleHeader", "header", "data", "totalization", "totalizationCustom", "minHeight"],
79
79
  components: { ScrollBar, HeaderReport, TotalizationReport, ExportExcel },
80
80
  methods: {
81
81
  ...mapMutations("generic", ["addEvent"]),
@@ -95,14 +95,14 @@ export default {
95
95
  },
96
96
  sendEvent(eventName, data) {
97
97
  if (eventName) this.addEvent({ name: eventName, data: data });
98
- }
98
+ },
99
99
  },
100
100
  };
101
101
  </script>
102
102
 
103
103
  <style scoped>
104
104
  table tbody tr td {
105
- max-width: 350px;
105
+ width: 1100px;
106
106
  }
107
107
 
108
108
  .table thead tr {
@@ -3,19 +3,19 @@
3
3
  <hr class="hr-report" />
4
4
  <div class="text-right">
5
5
  <b-row>
6
- <b-col sm="10">
6
+ <b-col sm="9">
7
7
  <span class="title-report-header"> Total de Registros .................. </span>
8
8
  </b-col>
9
- <b-col sm="2">
9
+ <b-col sm="3">
10
10
  <span class="title-report-header value-report-header"> {{ totalRecords }} </span>
11
11
  </b-col>
12
12
  </b-row>
13
13
  <!-- Utilizado para calculo do subReport -->
14
14
  <b-row v-if="totalizationCustom">
15
- <b-col sm="10">
15
+ <b-col sm="9">
16
16
  <span class="title-report-header"> {{ totalizationCustom[0].title }} .................. </span>
17
17
  </b-col>
18
- <b-col sm="2">
18
+ <b-col sm="3">
19
19
  <span class="title-report-header value-report-header"> {{ totalizationCustom[0].value | currency }} </span>
20
20
  </b-col>
21
21
  </b-row>
@@ -14,6 +14,7 @@
14
14
  </div>
15
15
 
16
16
  <Modal title="Filtros" :width="700" :height="750" v-show="showModal('filter')">
17
+ <slot></slot>
17
18
  <FilterBuilder :filters="filters" v-model="filterFinal" />
18
19
  </Modal>
19
20
  </div>
@@ -43,6 +43,9 @@
43
43
  <i class="fas fa-file-alt icon-report"></i>
44
44
  </b-col>
45
45
  <b-col sm="11" @click="navegateTo(report)">
46
+ <div v-if="report.showNewUntil && showNewUntil(report.showNewUntil)" class="side-by-side div-new">
47
+ <span>Novo</span>
48
+ </div>
46
49
  <div class="title-report side-by-side">{{ report.name }}</div>
47
50
  <div><span class="description-report">{{ report.description }}</span></div>
48
51
  </b-col>
@@ -80,6 +83,7 @@ export default {
80
83
  },
81
84
  computed: {
82
85
  ...mapState("generic", ["search", "executedSearch", "clearedSearch"]),
86
+
83
87
  },
84
88
  mounted() {
85
89
  this.getAll();
@@ -89,6 +93,16 @@ export default {
89
93
  methods: {
90
94
  ...mapMutations("generic", ["removeLoading"]),
91
95
  ...mapActions("generic", ["getApi", "deleteAllApi"]),
96
+ showNewUntil(dateStr) {
97
+ const [day, month, year] = dateStr.split('/');
98
+ const inputDate = new Date(year, month - 1, day);
99
+ const today = new Date();
100
+
101
+ inputDate.setHours(0, 0, 0, 0);
102
+ today.setHours(0, 0, 0, 0);
103
+
104
+ return today < inputDate;
105
+ },
92
106
  getAll() {
93
107
  let obj = { module: this.panel.module };
94
108
  let params = { url: this.urlGetAll, obj: obj };
@@ -191,6 +205,15 @@ export default {
191
205
  color: #577696;
192
206
  }
193
207
 
208
+ .div-new {
209
+ background-color: #0A36DB;
210
+ font-size: 11px;
211
+ border-radius: 20px;
212
+ padding: 1px 8px 2px 8px;
213
+ margin-right: 10px;
214
+ color: white !important;
215
+ }
216
+
194
217
  .div-molded {
195
218
  margin-bottom: 10px;
196
219
  cursor: pointer;