vue-laravel-crud 1.6.7 → 1.6.9

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": "vue-laravel-crud",
3
- "version": "1.6.7",
3
+ "version": "1.6.9",
4
4
  "description": "",
5
5
  "homepage": "https://github.com/clonixdev/vue-laravel-crud",
6
6
  "main": "dist/vue-laravel-crud.ssr.js",
@@ -343,6 +343,12 @@ export default /*#__PURE__*/ {
343
343
  type: String,
344
344
  default: "id",
345
345
  },
346
+
347
+ bulkDelete: {
348
+ type: Boolean,
349
+ default: false,
350
+ },
351
+
346
352
  },
347
353
 
348
354
  mounted() {
@@ -853,8 +859,26 @@ export default /*#__PURE__*/ {
853
859
  });
854
860
  },
855
861
 
856
-
857
-
862
+ confirmBulkDelete(){
863
+ this.$bvModal
864
+ .msgBoxConfirm(this.messageRemoveConfirm, {
865
+ size: "sm",
866
+ buttonSize: "sm",
867
+ okVariant: "danger",
868
+ okTitle: this.messageRemove,
869
+ cancelTitle: "NO",
870
+ centered: true,
871
+ })
872
+ .then((value) => {
873
+ if (value) {
874
+ this.deleteItemBulk();
875
+ }
876
+ })
877
+ .catch((error) => {
878
+ this.toastError(error);
879
+ this.loading = false;
880
+ });
881
+ },
858
882
  deleteItemBulk(){
859
883
  if (this.useVuexORM) {
860
884
  return this.deleteItemBulkVuex();
@@ -1439,11 +1463,12 @@ export default /*#__PURE__*/ {
1439
1463
  <slot name="tableActions" v-bind:createItem="createItem" v-bind:toggleDisplayMode="toggleDisplayMode"
1440
1464
  v-bind:loading="loading">
1441
1465
  <slot name="tableActionsPrepend" v-bind:loading="loading"> </slot>
1466
+
1442
1467
  <b-button variant="info" v-if="showPrincipalSortBtn" @click="togglePrincipalSort()" :disabled="loading">
1443
1468
  <b-icon-sort-numeric-down v-if="principalSort"></b-icon-sort-numeric-down>
1444
1469
  <b-icon-sort-numeric-up v-else></b-icon-sort-numeric-up>
1445
1470
  </b-button>
1446
-
1471
+ <b-button variant="danger" @click="confirmBulkDelete()" v-if="bulkDelete"><b-icon-trash></b-icon-trash></b-button>
1447
1472
  <b-button variant="success" v-if="showCreateBtn" @click="createItem()" :disabled="loading">
1448
1473
  <b-icon-plus></b-icon-plus>{{ messageNew }}
1449
1474
  </b-button>
@@ -1544,9 +1569,10 @@ export default /*#__PURE__*/ {
1544
1569
 
1545
1570
  </div>
1546
1571
  </slot>
1547
-
1572
+ <span v-else-if="column.type == 'select'">
1573
+ <b-form-checkbox name="select-all" @change="toggleAll()"></b-form-checkbox>
1574
+ </span>
1548
1575
  <span v-else>{{ column.label }}</span>
1549
-
1550
1576
  <span v-if="sortable && internalFilterByProp(column.prop + '_sort')" class="sort-filter"
1551
1577
  @click="toggleSortFilter(column)"><b-icon-sort-down
1552
1578
  v-if="!internalFilterByProp(column.prop + '_sort').value"></b-icon-sort-down><b-icon-sort-up
@@ -1840,7 +1866,6 @@ tr td:first-child {
1840
1866
 
1841
1867
  .custom-control {
1842
1868
  position: relative;
1843
- top: -15px;
1844
1869
  }
1845
1870
 
1846
1871