@nixweb/nixloc-ui 0.0.160 → 0.0.162

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.160",
3
+ "version": "0.0.162",
4
4
  "description": "Componentes UI",
5
5
  "author": "Fábio Ávila <fabio@nixweb.com.br>",
6
6
  "private": false,
@@ -24,12 +24,12 @@
24
24
  :clicked="saveDocument"
25
25
  />
26
26
  </div>
27
- <div class="side-by-side">
27
+ <div class="side-by-side" v-if="showByRule">
28
28
  <Button
29
29
  v-if="id"
30
30
  _key="saveAs"
31
31
  type="success"
32
- title="Fazer uma cópia"
32
+ title="Clonar"
33
33
  classIcon="fas fa-clone"
34
34
  size="small"
35
35
  :clicked="saveAs"
@@ -37,7 +37,7 @@
37
37
  </div>
38
38
  </b-col>
39
39
  <b-col class="text-right" sm="6">
40
- <div class="side-by-side" v-if="id">
40
+ <div class="side-by-side" v-if="id && showByRule">
41
41
  <Button
42
42
  key="showModalConfig"
43
43
  type="info"
@@ -46,20 +46,18 @@
46
46
  :clicked="showModalConfig"
47
47
  />
48
48
  </div>
49
- <div class="side-by-side">
49
+ <div class="side-by-side" v-if="showByRule">
50
50
  <Button
51
51
  key="showModalLegend"
52
- title="Parâmetros"
53
52
  type="info"
54
53
  classIcon="fas fa-book-reader"
55
54
  size="small"
56
55
  :clicked="showModalLegend"
57
56
  />
58
57
  </div>
59
- <div class="side-by-side">
58
+ <div class="side-by-side" v-if="showByRule">
60
59
  <Button
61
60
  key="showModalCode"
62
- title="Código"
63
61
  type="info"
64
62
  classIcon="far fa-code"
65
63
  size="small"
@@ -187,8 +185,14 @@ export default {
187
185
  }, 1500);
188
186
  },
189
187
  computed: {
188
+ ...mapState("user", ["userLogged"]),
190
189
  ...mapState("generic", ["modal", "documentHtml"]),
191
190
  ...mapGetters("generic", ["showModal", "event", "documentPreview"]),
191
+ showByRule() {
192
+ if (this.userLogged.user.userName == "UserTemp" || this.userLogged.companyId == 3)
193
+ return true;
194
+ return false;
195
+ },
192
196
  },
193
197
  methods: {
194
198
  ...mapMutations("generic", [
@@ -11,7 +11,7 @@
11
11
  <br />
12
12
  <div
13
13
  class="div-progress"
14
- v-if="liveTotalRecords != baseParams.totalRecords"
14
+ v-if="liveTotalRecords != baseParams.totalRecords && isLoading"
15
15
  >
16
16
  <ProgressBar
17
17
  :text="`Carregando ${liveTotalRecords} registro(s) de ${baseParams.totalRecords}`"
@@ -241,6 +241,7 @@ export default {
241
241
  this.resetData();
242
242
 
243
243
  this.getApiOdata(paramsQuery).then((response) => {
244
+ this.isLoading = true;
244
245
  let totalRecords = response["@odata.count"];
245
246
  if (totalRecords == 0) this.noDataReturned = true;
246
247
 
@@ -291,7 +292,7 @@ export default {
291
292
  this.baseParams.currentPage++;
292
293
  },
293
294
  resetData() {
294
- this.isLoading = true;
295
+ this.isLoading = false;
295
296
  this.content.data = [];
296
297
  this.content.totalPages = [];
297
298
  this.baseParams.currentPage = 0;
@@ -370,6 +371,8 @@ export default {
370
371
  handler(totalPages) {
371
372
  this.btnSearchDisabled = false;
372
373
  this.btnSaveDisabled = false;
374
+ this.showBodyReport = false;
375
+ this.resetData();
373
376
  },
374
377
  deep: true,
375
378
  },