@nixweb/nixloc-ui 0.0.180 → 0.0.181

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.180",
3
+ "version": "0.0.181",
4
4
  "description": "Componentes UI",
5
5
  "author": "Fábio Ávila <fabio@nixweb.com.br>",
6
6
  "private": false,
@@ -6,26 +6,13 @@
6
6
  <Tip :field="field" :formName="formName" />
7
7
  </label>
8
8
  <div class="inner-addon right-addon">
9
- <div
10
- class="required glyphicon"
11
- v-if="notifications.length > 0 && formDirty"
12
- >
9
+ <div class="required glyphicon" v-if="notifications.length > 0 && formDirty">
13
10
  <i class="fas fa-exclamation-triangle"></i>
14
11
  </div>
15
12
  <slot v-else></slot>
16
- <vue-numeric
17
- :style="_style"
18
- class="form-control"
19
- v-on:keyup.enter.native="pressedEnter"
20
- :class="{ 'is-invalid': notifications.length > 0 && formDirty }"
21
- :placeholder="placeholder"
22
- :disabled="disabled"
23
- currency="R$"
24
- separator="."
25
- :minus="allowNegative"
26
- v-bind:precision="2"
27
- v-model="valueLocal"
28
- ></vue-numeric>
13
+ <vue-numeric :style="_style" class="form-control" v-on:keyup.enter.native="pressedEnter"
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>
29
16
  </div>
30
17
 
31
18
  <div v-if="formDirty">
@@ -147,14 +134,17 @@ export default {
147
134
  color: #0a0a0a;
148
135
  letter-spacing: 0.5px !important;
149
136
  }
137
+
150
138
  .success {
151
139
  color: #94aa2a;
152
140
  font-size: 14px;
153
141
  }
142
+
154
143
  .invalid {
155
144
  color: #f0134d;
156
145
  font-size: 14px;
157
146
  }
147
+
158
148
  .margin-button {
159
149
  margin-top: -2px;
160
150
  }
@@ -1,47 +1,17 @@
1
1
  <template>
2
2
  <div>
3
- <InputDecimal
4
- v-if="!discount.discountByPercentage"
5
- :title="title"
6
- field="discount"
7
- :required="required"
8
- :formName="formName"
9
- _style="color:red;"
10
- :disabled="disabled"
11
- v-model="discount.discount"
12
- >
3
+ <InputDecimal v-if="!discount.discountByPercentage" :title="title" field="discount" :required="required"
4
+ :formName="formName" _style="color:red;" :disabled="disabled" v-model="discount.discount">
13
5
  <div class="glyphicon margin-button">
14
- <Button
15
- _key="btnDiscount"
16
- title=""
17
- type="primary"
18
- classIcon="fa-solid fa-brazilian-real-sign"
19
- size="small"
20
- :disabled="disabled"
21
- :clicked="change"
22
- /></div
23
- ></InputDecimal>
24
- <InputNumber
25
- v-if="discount.discountByPercentage"
26
- :title="title"
27
- field="discount"
28
- :formName="formName"
29
- :required="false"
30
- :disabled="disabled"
31
- _style="color:red;"
32
- :maxLength="5"
33
- type="float"
34
- v-model="discount.discount"
35
- ><div class="glyphicon margin-button">
36
- <Button
37
- _key="btnDiscount"
38
- title=""
39
- type="primary"
40
- :disabled="disabled"
41
- classIcon="fa-solid fa-percent"
42
- size="small"
43
- :clicked="change"
44
- />
6
+ <Button _key="btnDiscount" title="" type="primary" classIcon="fa-solid fa-brazilian-real-sign" size="small"
7
+ :disabled="disabled" :clicked="change" />
8
+ </div>
9
+ </InputDecimal>
10
+ <InputNumber v-if="discount.discountByPercentage" :title="title" field="discount" :formName="formName"
11
+ :required="false" :disabled="disabled" _style="color:red;" :maxLength="5" type="float" v-model="discount.discount">
12
+ <div class="glyphicon margin-button">
13
+ <Button _key="btnDiscount" title="" type="primary" :disabled="disabled" classIcon="fa-solid fa-percent"
14
+ size="small" :clicked="change" />
45
15
  </div>
46
16
  </InputNumber>
47
17
  </div>
@@ -68,6 +38,12 @@ export default {
68
38
  discount: { discountByPercentage: false, discount: 0 },
69
39
  };
70
40
  },
41
+ mounted() {
42
+ let self = this;
43
+ setTimeout(function () {
44
+ self.discount = self.value;
45
+ }, 100);
46
+ },
71
47
  methods: {
72
48
  ...mapMutations("generic", ["removeLoading"]),
73
49
  change() {
@@ -28,6 +28,7 @@ export default {
28
28
  type: Boolean,
29
29
  default: true,
30
30
  },
31
+ changed: Function,
31
32
  value: Number,
32
33
  },
33
34
  data() {
@@ -10,22 +10,12 @@
10
10
  <div class="text-center">
11
11
  <img class="photo" :src="urlPhoto" />
12
12
  </div>
13
- <div
14
- class="box-main"
15
- v-for="(item, index) in menuFilter(true)"
16
- :key="index"
17
- >
18
- <a
19
- href="#"
20
- @click.prevent="openSubMenu(item.module)"
21
- :class="highlightSession(item.module)"
22
- >
23
- <div
24
- :class="{
25
- 'icon-active': menuActive == item.module,
26
- 'icon-normal': menuActive != item.module,
27
- }"
28
- >
13
+ <div class="box-main" v-for="(item, index) in menuFilter(true)" :key="index">
14
+ <a href="#" @click.prevent="openSubMenu(item.module)" :class="highlightSession(item.module)">
15
+ <div :class="{
16
+ 'icon-active': menuActive == item.module,
17
+ 'icon-normal': menuActive != item.module,
18
+ }">
29
19
  <b-row>
30
20
  <b-col sm="12">
31
21
  <div class="box-icon text-center">
@@ -61,29 +51,15 @@
61
51
  <li v-for="(item, index) in subMenuFilter(false)" :key="index">
62
52
  <h5 v-if="item.type === 'group'" class="context-menu__title">
63
53
  <span class="sub-title"> {{ item.groupName }}</span>
64
- <span
65
- v-if="index === 0"
66
- @click.prevent="hideSubMenu"
67
- class="context-menu__btn-close icon-close"
68
- href="#"
69
- >
54
+ <span v-if="index === 0" @click.prevent="hideSubMenu" class="context-menu__btn-close icon-close" href="#">
70
55
  <i class="fas fa-times-circle"></i>
71
56
  </span>
72
57
  </h5>
73
58
 
74
- <a
75
- v-else
76
- href="#"
77
- @click.prevent="navegateTo(item)"
78
- :class="classSubMenu(item.title)"
79
- >
59
+ <a v-else href="#" @click.prevent="navegateTo(item)" :class="classSubMenu(item.title)">
80
60
  <b-row>
81
61
  <b-col sm="1">
82
- <i
83
- class="menu-icon"
84
- :style="'color:' + item.iconColor"
85
- :class="item.icon"
86
- ></i>
62
+ <i class="menu-icon" :style="'color:' + item.iconColor" :class="item.icon"></i>
87
63
  </b-col>
88
64
  <b-col sm="10">
89
65
  <span class="title-sub"> {{ item.title }}</span>
@@ -158,15 +134,27 @@ export default {
158
134
  subMenuFilter(isModule) {
159
135
  let filter = [];
160
136
  let self = this;
137
+ let userLogged = this.userLogged.user.userName;
161
138
  this.menu.items.forEach(function (obj) {
162
- if (obj.isModule == isModule && obj.module === self.module)
163
- filter.push(obj);
139
+
140
+
141
+ if (obj.isModule == isModule && obj.module === self.module) {
142
+ if (obj.isVisible == "all")
143
+ filter.push(obj);
144
+
145
+ if (obj.isVisible == "support" && userLogged == "UserTemp")
146
+ filter.push(obj);
147
+ }
148
+
149
+ console.log(obj.isVisible);
150
+ console.log(userLogged);
151
+
164
152
  });
165
153
  return filter;
166
154
  },
167
155
  },
168
156
  computed: {
169
- ...mapState("user", ["menu"]),
157
+ ...mapState("user", ["menu", "userLogged"]),
170
158
  },
171
159
  watch: {
172
160
  $route: {
@@ -184,6 +172,7 @@ export default {
184
172
  width: 350px;
185
173
  z-index: 1000;
186
174
  }
175
+
187
176
  .div-logo {
188
177
  padding-top: 12px;
189
178
  padding-left: 10px;
@@ -125,7 +125,7 @@ export default {
125
125
  },
126
126
  baseParams: {
127
127
  currentPage: 0,
128
- totalPerPage: 100,
128
+ totalPerPage: 50,
129
129
  totalPage: 0,
130
130
  totalRecords: 0,
131
131
  },