innoboxrr-vue-datatable 1.1.0 → 1.1.1
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 +1 -1
- package/src/DataTable.vue +23 -10
package/package.json
CHANGED
package/src/DataTable.vue
CHANGED
|
@@ -473,24 +473,37 @@
|
|
|
473
473
|
|
|
474
474
|
actionButtonClicked(actions) {
|
|
475
475
|
|
|
476
|
-
|
|
477
|
-
let id = actions[0].params.id;
|
|
476
|
+
const id = actions[0].params.id;
|
|
478
477
|
|
|
479
|
-
|
|
478
|
+
const requestData = {
|
|
480
479
|
|
|
481
480
|
_token: csrf_token,
|
|
482
481
|
|
|
483
482
|
id: id
|
|
484
483
|
|
|
485
|
-
}
|
|
484
|
+
};
|
|
485
|
+
|
|
486
|
+
const requestConfig = {
|
|
487
|
+
|
|
488
|
+
method: this.policyMethod,
|
|
489
|
+
|
|
490
|
+
url: this.policyUrl,
|
|
491
|
+
|
|
492
|
+
data: this.policyMethod === 'post' ? requestData : null,
|
|
493
|
+
|
|
494
|
+
params: this.policyMethod === 'get' ? requestData : null
|
|
495
|
+
|
|
496
|
+
};
|
|
497
|
+
|
|
498
|
+
axios(requestConfig).then(res => {
|
|
486
499
|
|
|
487
500
|
this.fetchPoliciesAttempts = 0;
|
|
488
501
|
|
|
489
|
-
|
|
502
|
+
const policies = res.data;
|
|
490
503
|
|
|
491
|
-
actions.forEach(
|
|
504
|
+
actions.forEach(action => {
|
|
492
505
|
|
|
493
|
-
if(policies[action.id]) {
|
|
506
|
+
if (policies[action.id]) {
|
|
494
507
|
|
|
495
508
|
action.policy = true;
|
|
496
509
|
|
|
@@ -500,9 +513,9 @@
|
|
|
500
513
|
|
|
501
514
|
}).catch(error => {
|
|
502
515
|
|
|
503
|
-
if(this.fetchPoliciesAttempts <= 3) {
|
|
516
|
+
if (this.fetchPoliciesAttempts <= 3) {
|
|
504
517
|
|
|
505
|
-
setTimeout(
|
|
518
|
+
setTimeout(() => {
|
|
506
519
|
|
|
507
520
|
++this.fetchPoliciesAttempts;
|
|
508
521
|
|
|
@@ -512,7 +525,7 @@
|
|
|
512
525
|
|
|
513
526
|
} else {
|
|
514
527
|
|
|
515
|
-
setTimeout(
|
|
528
|
+
setTimeout(() => {
|
|
516
529
|
|
|
517
530
|
this.fetchPoliciesAttempts = 0;
|
|
518
531
|
|