@nixweb/nixloc-ui 0.0.202 → 0.0.204

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.202",
3
+ "version": "0.0.204",
4
4
  "description": "Componentes UI",
5
5
  "author": "Fábio Ávila <fabio@nixweb.com.br>",
6
6
  "private": false,
@@ -12,9 +12,10 @@
12
12
  <slot v-else></slot>
13
13
  <vue-numeric :style="_style" class="form-control" v-on:keyup.enter.native="pressedEnter"
14
14
  :class="{ 'is-invalid': notifications.length > 0 && formDirty }" :placeholder="placeholder" :disabled="disabled"
15
- currency="R$" separator="." :minus="allowNegative" v-bind:precision="2" v-model="valueLocal"></vue-numeric>
16
- </div>
15
+ currency="R$" separator="." :minus="allowNegative" v-bind:precision="precision" v-model="valueLocal">
16
+ </vue-numeric>
17
17
 
18
+ </div>
18
19
  <div v-if="formDirty">
19
20
  <div v-for="message in notifications" :key="message">
20
21
  <span class="invalid">{{ message }}</span>
@@ -39,6 +40,10 @@ export default {
39
40
  placeholder: String,
40
41
  formName: String,
41
42
  _style: String,
43
+ precision: {
44
+ type: Number,
45
+ default: 2,
46
+ },
42
47
  markFormDirty: {
43
48
  type: Boolean,
44
49
  default: true,
@@ -61,6 +66,7 @@ export default {
61
66
  formDirty: false,
62
67
  _value: 0,
63
68
  valueLocal: 20,
69
+ isPrecision: false
64
70
  };
65
71
  },
66
72
  created() {
@@ -144,8 +150,4 @@ export default {
144
150
  color: #f0134d;
145
151
  font-size: 14px;
146
152
  }
147
-
148
- .margin-button {
149
- margin-top: -2px;
150
- }
151
153
  </style>
@@ -1,7 +1,8 @@
1
1
  <template>
2
2
  <div>
3
- <InputDecimal v-if="!discount.discountByPercentage" :markFormDirty="markFormDirty" :title="title" field="discount"
4
- :required="required" :formName="formName" _style="color:red;" :disabled="disabled" v-model="discount.discount">
3
+ <InputDecimal v-if="!discount.discountByPercentage" :markFormDirty="markFormDirty" :title="title"
4
+ :precision="precision" field="discount" :required="required" :formName="formName" _style="color:red;"
5
+ :disabled="disabled" v-model="discount.discount">
5
6
  <div class="glyphicon margin-button">
6
7
  <Button _key="btnDiscount" title="" type="primary" classIcon="fa-solid fa-brazilian-real-sign" size="small"
7
8
  :disabled="disabled" :clicked="change" />
@@ -32,7 +33,7 @@ export default {
32
33
  InputDecimal,
33
34
  Button,
34
35
  },
35
- props: ["formName", "disabled", "_style", "required", "markFormDirty", "value"],
36
+ props: ["formName", "disabled", "_style", "required", "precision", "markFormDirty", "value"],
36
37
  data() {
37
38
  return {
38
39
  title: "Desconto em R$",
@@ -91,7 +91,7 @@ export default {
91
91
  </script>
92
92
  <style scoped>
93
93
  .div-main {
94
- margin: auto;
94
+
95
95
  padding: 0px;
96
96
  }
97
97
 
@@ -1,7 +1,8 @@
1
1
  <template>
2
2
  <div>
3
- {{ title }}
4
- <span class="timer">{{ time }}</span> segundos...
3
+ <span class="title"> {{ title }}</span>
4
+ <span class="title timer"> {{ time }} </span>
5
+ <span class="title">segundos...</span>
5
6
  </div>
6
7
  </template>
7
8
  <script>
@@ -6,11 +6,7 @@
6
6
  <div class="div-custom">
7
7
  <b-row>
8
8
  <b-col sm="6">
9
- <SelectRule
10
- :options="rules"
11
- class="select"
12
- v-model="selectedRule"
13
- />
9
+ <SelectRule :options="rules" class="select" v-model="selectedRule" />
14
10
  </b-col>
15
11
  <b-col sm="3">
16
12
  <div class="div-btn">
@@ -21,13 +17,10 @@
21
17
  <div class="div-and-or">
22
18
  <b-row>
23
19
  <b-col sm="3">
24
- <RadioGroup
25
- :options="[
26
- { text: 'e', value: 'and' },
27
- { text: 'ou', value: 'or' },
28
- ]"
29
- v-model="andOr"
30
- />
20
+ <RadioGroup :options="[
21
+ { text: 'e', value: 'and' },
22
+ { text: 'ou', value: 'or' },
23
+ ]" v-model="andOr" />
31
24
  </b-col>
32
25
  </b-row>
33
26
  </div>
@@ -13,15 +13,23 @@ export default class ConvertToOdata {
13
13
  if (operator === "maior") return `${rule.name} gt ${rule.value}`;
14
14
  if (operator === "maior ou igual") return `${rule.name} ge ${rule.value}`;
15
15
 
16
- if (rule.typeField === "dateTime") return this.convertDateTime(rule.name, rule.value);
16
+ if (rule.typeField === "dateTime") return this.convertDateTime(rule);
17
17
  if (rule.typeField === "select") return this.convertSelect(rule.name, rule.value);
18
18
  if (rule.typeField === "checkbox") return this.convertCheckbox(rule.name, rule.title, rule.type, rule.value);
19
19
 
20
20
  }
21
- convertDateTime(name, value) {
22
- let start = this.convertDate(value[0]);
23
- let end = this.convertDate(value[1]);
24
- return `${name} ge ${start} and ${name} le ${end}`;
21
+ convertDateTime(rule) {
22
+ let start = this.convertDate(rule.value[0]);
23
+ let end = this.convertDate(rule.value[1]);
24
+
25
+ if (rule.name.includes("&")) {
26
+ var parts = rule.name.split("&");
27
+ var first = parts[0];
28
+ var second = parts[1];
29
+ return `${first} ge ${start} and ${second} le ${end}`;
30
+ } else {
31
+ return `${rule.name} ge ${start} and ${rule.name} le ${end}`;
32
+ }
25
33
  }
26
34
  convertSelect(name, value) {
27
35
  return `${name} eq '${value.id}'`;
@@ -48,6 +56,9 @@ export default class ConvertToOdata {
48
56
  return `${query}`;
49
57
  }
50
58
  convertDate(data) {
59
+ // a verificação abaixo valida se tem valor, pois quando não tem está retornando um array com 3 posições em brando
60
+ if (data.length == 3) return;
61
+
51
62
  let str = data.replace("/", "").replace("/", "");
52
63
 
53
64
  let date = {
@@ -44,6 +44,7 @@
44
44
  </b-col>
45
45
  <b-col sm="11" @click="navegateTo(report)">
46
46
  <div class="title-report side-by-side">{{ report.name }}</div>
47
+ <div><span class="description-report">{{ report.description }}</span></div>
47
48
  </b-col>
48
49
  </b-row>
49
50
  </Molded>
@@ -207,4 +208,9 @@ export default {
207
208
  background: #fafafc !important;
208
209
  height: 1px !important;
209
210
  }
211
+
212
+ .description-report {
213
+ font-size: 13px;
214
+ color: rgb(110, 110, 110);
215
+ }
210
216
  </style>
@@ -259,6 +259,7 @@ export default {
259
259
  this.content.data = [];
260
260
  this.content.totalPages = [];
261
261
  this.baseParams.currentPage = 0;
262
+ this.baseParams.totalRecords = 0;
262
263
  this.noDataReturned = false;
263
264
  },
264
265
  executeOpenModal(params) {
@@ -344,7 +345,7 @@ export default {
344
345
  deep: true,
345
346
  },
346
347
  oDataFilter: {
347
- handler(totalPages) {
348
+ handler() {
348
349
  this.btnSearchDisabled = false;
349
350
  this.btnSaveDisabled = false;
350
351
  this.showBodyReport = false;
@@ -353,14 +354,14 @@ export default {
353
354
  deep: true,
354
355
  },
355
356
  oDataSelect: {
356
- handler(totalPages) {
357
+ handler() {
357
358
  this.btnSearchDisabled = false;
358
359
  this.btnSaveDisabled = false;
359
360
  },
360
361
  deep: true,
361
362
  },
362
363
  oDataOrderBy: {
363
- handler(totalPages) {
364
+ handler() {
364
365
  this.btnSearchDisabled = false;
365
366
  this.btnSaveDisabled = false;
366
367
  },