@nixweb/nixloc-ui 0.0.181 → 0.0.182

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.181",
3
+ "version": "0.0.182",
4
4
  "description": "Componentes UI",
5
5
  "author": "Fábio Ávila <fabio@nixweb.com.br>",
6
6
  "private": false,
@@ -6,9 +6,12 @@
6
6
  <br />
7
7
  <Loading type="line" :center="false" v-show="loadingSearch" />
8
8
  <div v-show="!showFilter">
9
- <div class="div-progress" v-if="liveTotalRecords != baseParams.totalRecords && !loadingSearch">
10
- <ProgressBar :text="`Carregando ${liveTotalRecords} registro(s) de ${baseParams.totalRecords}`"
9
+ <div class="div-progress" v-if="liveTotalRecords != baseParams.totalRecords && !loadingSearch && !cancel">
10
+ <ProgressBar :text="`Carregando ${liveTotalRecords} registros de ${baseParams.totalRecords}`"
11
11
  :value="liveTotalRecords" :max="baseParams.totalRecords" size="medium" />
12
+ <div class="text-center cancel" @click="stop">
13
+ <i class="fa-solid fa-ban"></i> Cancelar
14
+ </div>
12
15
  </div>
13
16
  <Molded>
14
17
  <b-row>
@@ -125,7 +128,7 @@ export default {
125
128
  },
126
129
  baseParams: {
127
130
  currentPage: 0,
128
- totalPerPage: 50,
131
+ totalPerPage: 100,
129
132
  totalPage: 0,
130
133
  totalRecords: 0,
131
134
  },
@@ -140,6 +143,7 @@ export default {
140
143
  isLoading: false,
141
144
  showBodyReport: false,
142
145
  showFilter: false,
146
+ cancel: false,
143
147
  };
144
148
  },
145
149
  mounted() {
@@ -184,6 +188,7 @@ export default {
184
188
  getAll() {
185
189
  this.btnSearchDisabled = true;
186
190
  this.loadingSearch = true;
191
+ this.cancel = false;
187
192
 
188
193
  if (this.rulesIsValid) {
189
194
  this.getTotalRecords();
@@ -284,6 +289,12 @@ export default {
284
289
  self.removeLoading(["panel"]);
285
290
  }, 350);
286
291
  },
292
+ stop() {
293
+ this.cancel = true;
294
+ this.btnSearchDisabled = false;
295
+ this.btnSaveDisabled = false;
296
+ this.isLoading = false;
297
+ }
287
298
  },
288
299
  computed: {
289
300
  ...mapGetters("generic", ["showModal", "event"]),
@@ -322,12 +333,10 @@ export default {
322
333
  },
323
334
  "content.totalPages": {
324
335
  handler(totalPages) {
325
- if (totalPages.length > 0) {
326
- console.log("Total Pages...");
336
+ if (totalPages.length > 0 && !this.cancel) {
327
337
  let self = this;
328
338
  setTimeout(function () {
329
339
  self.getAllManyPages();
330
- console.log("Get All Many Pages...");
331
340
  }, 1000);
332
341
  }
333
342
  if (totalPages.length == 1) this.isLoading = false;
@@ -406,4 +415,9 @@ export default {
406
415
  .body-report {
407
416
  margin-top: 30px;
408
417
  }
418
+
419
+ .cancel {
420
+ color: red;
421
+ cursor: pointer;
422
+ }
409
423
  </style>