@nixweb/nixloc-ui 0.0.263 → 0.0.265

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.263",
3
+ "version": "0.0.265",
4
4
  "description": "Componentes UI",
5
5
  "author": "Fábio Ávila <fabio@nixweb.com.br>",
6
6
  "private": false,
@@ -6,9 +6,9 @@
6
6
  <Tip :field="field" :formName="formName" />
7
7
  </label>
8
8
  <div class="select" :class="{
9
- 'select-invalid': notifications.length > 0 && formDirty,
10
- border: showBorder,
11
- }">
9
+ 'select-invalid': notifications.length > 0 && formDirty,
10
+ border: showBorder,
11
+ }">
12
12
  <multiselect @open="onOpen" @select="onSelected" @search-change="onSearch" :options="data"
13
13
  v-model.trim="currentValue" :custom-label="label" placeholder :disabled="disabled" :showLabels="true"
14
14
  :noResult="false" :maxHeight="250" ref="multiselect" selectLabel deselectLabel selectedLabel>
@@ -1,28 +1,13 @@
1
1
  <template>
2
2
  <div>
3
- <FixedBar
4
- :position="positionFixedBar"
5
- backgroundColor="#FAFAFC"
6
- v-show="formDirty && !modal.open && on || showFixed"
7
- >
3
+ <FixedBar :position="positionFixedBar" backgroundColor="#FAFAFC"
4
+ v-show="formDirty && !modal.open && on || showFixed">
8
5
  <div class="margin" :style="'margin-bottom:' + marginBottom + 'px'">
9
- <Button
10
- _key="cancelSaveCancel"
11
- eventName="cancelSaveCancel"
12
- title="Cancelar"
13
- type="danger"
14
- size="small"
15
- :clicked="cancel"
16
- />
17
- <Button
18
- _key="saveSaveCancel"
19
- :eventName="eventName"
20
- classIcon="fa-solid fa-floppy-disk"
21
- title="Salvar"
22
- type="success"
23
- :disabled="!isFormValid(formName)"
24
- size="medium"
25
- />
6
+ <Button _key="cancelSaveCancel" eventName="cancelSaveCancel" title="Cancelar" type="danger" size="small"
7
+ :clicked="cancel" />
8
+ <Button _key="saveSaveCancel" :eventName="eventName" classIcon="fa-solid fa-floppy-disk" title="Salvar"
9
+ type="success" :disabled="!isFormValid(formName)" size="medium" />
10
+ <slot></slot>
26
11
  </div>
27
12
  </FixedBar>
28
13
  </div>
@@ -2,23 +2,52 @@
2
2
  <div>
3
3
  <hr class="hr-report" />
4
4
  <div class="text-right">
5
- <span class="title-report-header"> Total de Registro(s) </span>
6
- <span class="title-report-header value-report-header"> {{ totalRecords }} </span>
5
+ <b-row>
6
+ <b-col sm="10">
7
+ <span class="title-report-header"> Total de Registros .................. </span>
8
+ </b-col>
9
+ <b-col sm="2">
10
+ <span class="title-report-header value-report-header"> {{ totalRecords }} </span>
11
+ </b-col>
12
+ </b-row>
7
13
  </div>
8
14
  <div class="text-right" v-for="item in totalization" :key="item.title">
9
- <span :class="convertName(item[0]).classCss">
15
+ <b-row>
16
+ <b-col sm="10">
17
+ <span v-if="convertName(item[0]).type == 'currency'">
18
+ <span class="title-report-header">
19
+ {{ convertName(item[0]).title }} ..................
20
+ </span>
21
+ </span>
22
+ </b-col>
23
+ <b-col sm="2">
24
+ <span v-if="convertName(item[0]).type == 'currency'">
25
+ {{ item[1] | currency }}
26
+ </span>
27
+ <span v-if="convertName(item[0]).type == 'numeric'">
28
+ {{ Math.round(item[1]) }}
29
+ </span>
30
+ </b-col>
31
+ </b-row>
32
+
33
+
34
+ <!-- <span :class="convertName(item[0]).classCss">
10
35
  <span class="title-report-header">
11
36
  {{ convertName(item[0]).title }}
12
37
  <span class="title-report-header value-report-header">
13
- <span v-if="convertName(item[0]).type == 'currency'">
14
- {{ item[1] | currency }}
15
- </span>
16
- <span v-if="convertName(item[0]).type == 'numeric'">
17
- {{ Math.round(item[1]) }}
18
- </span>
38
+ <div class="side-by-side div-title">
39
+ <span v-if="convertName(item[0]).type == 'currency'">
40
+ {{ item[1] | currency }}
41
+ </span>
42
+ </div>
43
+ <div class="side-by-side div-value">
44
+ <span v-if="convertName(item[0]).type == 'numeric'">
45
+ {{ Math.round(item[1]) }}
46
+ </span>
47
+ </div>
19
48
  </span>
20
49
  </span>
21
- </span>
50
+ </span> -->
22
51
  </div>
23
52
  </div>
24
53
  </template>
@@ -60,4 +89,8 @@ export default {
60
89
  .receipt {
61
90
  color: darkblue;
62
91
  }
92
+
93
+ .div-title {
94
+ margin-right: 0px;
95
+ }
63
96
  </style>
@@ -46,7 +46,11 @@ export default class ConvertToOdata {
46
46
  if (seq + 1 != size) query += ` or `;
47
47
  }
48
48
  if (type == "totalization") {
49
- query += `${name} with ${value} as ${value}${name.charAt(0).toUpperCase() + name.slice(1)}`;
49
+
50
+ let field = value.split('_').pop();
51
+ field = field.charAt(0).toLowerCase() + field.slice(1);
52
+
53
+ query += `${field} with ${value.split('_')[0]} as ${value.replace(/_/g, '')}`;
50
54
  if (seq + 1 != size) query += `,`;
51
55
  }
52
56
  seq++;
@@ -153,6 +153,8 @@ export default {
153
153
  rules: this.templateReport.rules,
154
154
  });
155
155
 
156
+ this.clearTotalization();
157
+
156
158
  if (this.id) this.getById();
157
159
 
158
160
  if (!this.id) this.removeLoadingWithTime();
@@ -166,6 +168,7 @@ export default {
166
168
  "addReport",
167
169
  "addInitialReportCustom",
168
170
  "removeInitialReportCustom",
171
+
169
172
  ]),
170
173
  ...mapMutations("generic", [
171
174
  "addEvent",
@@ -173,6 +176,9 @@ export default {
173
176
  "hideModal",
174
177
  "removeLoading",
175
178
  ]),
179
+ ...mapMutations("report", [
180
+ "clearTotalization"
181
+ ]),
176
182
  getById() {
177
183
  let params = { url: this.urlGetById, obj: { id: this.id } };
178
184
  this.getApi(params).then((response) => {
@@ -202,6 +208,7 @@ export default {
202
208
  let paramsQuery = { url: this.urlQuery };
203
209
  this.resetData();
204
210
  this.getApiOdata(paramsQuery).then((response) => {
211
+
205
212
  this.isLoading = true;
206
213
  let totalRecords = response["@odata.count"];
207
214
  this.loadingSearch = false;
@@ -448,6 +448,7 @@ export default {
448
448
  context.commit('removeNotificarions');
449
449
  return response.data;
450
450
  } else {
451
+
451
452
  context.commit('addNotifications', response.data.notifications)
452
453
  context.commit('addToast', 'falhaGenerica');
453
454
  return response.data;
@@ -254,6 +254,9 @@ export default {
254
254
  }
255
255
  });
256
256
  },
257
+ clearTotalization: (state) => {
258
+ state.finalQueryFormatOData.totalization = [];
259
+ }
257
260
  },
258
261
  actions: {
259
262
  addReport: async function (context, report) {