vue-laravel-crud 2.0.5 → 2.0.7
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/dist/vue-laravel-crud.esm.js +1572 -337
- package/dist/vue-laravel-crud.min.js +3 -3
- package/dist/vue-laravel-crud.ssr.js +1592 -356
- package/package.json +1 -1
- package/src/ItemCard.vue +45 -4
- package/src/components/CrudCards.vue +131 -98
- package/src/components/CrudCustom.vue +58 -29
- package/src/components/CrudFilters.vue +319 -167
- package/src/components/CrudHeader.vue +154 -142
- package/src/components/CrudKanban.vue +36 -20
- package/src/components/CrudModals.vue +132 -25
- package/src/components/CrudPagination.vue +207 -200
- package/src/components/CrudTable.vue +103 -70
- package/src/components/kanban/KanbanBoard.vue +5 -1
- package/src/components/kanban/KanbanCard.vue +45 -4
- package/src/components/kanban/KanbanColumn.vue +6 -2
- package/src/components/table/TableCell.vue +66 -20
- package/src/components/table/TableHeader.vue +21 -6
- package/src/components/table/TableRow.vue +5 -1
- package/src/vue-laravel-crud.vue +718 -697
|
@@ -538,9 +538,116 @@ function _nonIterableRest() {
|
|
|
538
538
|
exports: scriptExports,
|
|
539
539
|
options: options
|
|
540
540
|
}
|
|
541
|
-
}
|
|
541
|
+
}// Componente funcional para renderizar filtros custom con callback
|
|
542
|
+
var RenderCustomFilter = {
|
|
543
|
+
functional: true,
|
|
544
|
+
props: {
|
|
545
|
+
renderFunction: {
|
|
546
|
+
type: Function,
|
|
547
|
+
required: true
|
|
548
|
+
},
|
|
549
|
+
customFilter: {
|
|
550
|
+
type: Object,
|
|
551
|
+
required: true
|
|
552
|
+
},
|
|
553
|
+
filter: {
|
|
554
|
+
type: Array,
|
|
555
|
+
default: function _default() {
|
|
556
|
+
return [];
|
|
557
|
+
}
|
|
558
|
+
},
|
|
559
|
+
internalFilterByProp: {
|
|
560
|
+
type: Function,
|
|
561
|
+
required: true
|
|
562
|
+
},
|
|
563
|
+
getFilterForColumn: {
|
|
564
|
+
type: Function,
|
|
565
|
+
required: true
|
|
566
|
+
},
|
|
567
|
+
onChangeFilter: {
|
|
568
|
+
type: Function,
|
|
569
|
+
required: true
|
|
570
|
+
}
|
|
571
|
+
},
|
|
572
|
+
render: function render(h, context) {
|
|
573
|
+
var _context$props = context.props,
|
|
574
|
+
renderFunction = _context$props.renderFunction,
|
|
575
|
+
customFilter = _context$props.customFilter,
|
|
576
|
+
filter = _context$props.filter,
|
|
577
|
+
internalFilterByProp = _context$props.internalFilterByProp,
|
|
578
|
+
getFilterForColumn = _context$props.getFilterForColumn,
|
|
579
|
+
onChangeFilter = _context$props.onChangeFilter;
|
|
580
|
+
return renderFunction(h, {
|
|
581
|
+
column: customFilter,
|
|
582
|
+
filter: filter,
|
|
583
|
+
internalFilterByProp: internalFilterByProp,
|
|
584
|
+
getFilterForColumn: getFilterForColumn,
|
|
585
|
+
onChangeFilter: onChangeFilter
|
|
586
|
+
});
|
|
587
|
+
}
|
|
588
|
+
};
|
|
589
|
+
var _sfc_main$f = {
|
|
542
590
|
name: 'CrudFilters',
|
|
543
|
-
|
|
591
|
+
components: {
|
|
592
|
+
RenderCustomFilter: RenderCustomFilter
|
|
593
|
+
},
|
|
594
|
+
inject: ['columns', 'customFilters', 'isColumnHasFilter', 'isCustomFilterEnabled', 'filter', 'internalFilterByProp', 'optionsLoaded', 'onChangeFilter', 'resetFilters', 'setupFilters', 'internalFilters'],
|
|
595
|
+
methods: {
|
|
596
|
+
// Método helper para obtener el filtro de forma segura, creándolo si no existe
|
|
597
|
+
getFilterForColumn: function getFilterForColumn(column) {
|
|
598
|
+
var filter = this.internalFilterByProp(column.prop);
|
|
599
|
+
|
|
600
|
+
// Si el filtro no existe, intentar inicializar los filtros
|
|
601
|
+
if (!filter) {
|
|
602
|
+
// Verificar si hay filtros inicializados
|
|
603
|
+
if (this.internalFilters && this.internalFilters.length === 0) {
|
|
604
|
+
this.setupFilters();
|
|
605
|
+
// Intentar obtener el filtro nuevamente después de inicializar
|
|
606
|
+
filter = this.internalFilterByProp(column.prop);
|
|
607
|
+
}
|
|
608
|
+
}
|
|
609
|
+
|
|
610
|
+
// Si aún no existe, crear un objeto temporal para evitar errores
|
|
611
|
+
if (!filter) {
|
|
612
|
+
return {
|
|
613
|
+
value: null
|
|
614
|
+
};
|
|
615
|
+
}
|
|
616
|
+
return filter;
|
|
617
|
+
},
|
|
618
|
+
// Método helper específico para campos de fecha (from)
|
|
619
|
+
getFilterForDateFrom: function getFilterForDateFrom(column) {
|
|
620
|
+
var filter = this.internalFilterByProp(column.prop + '_from');
|
|
621
|
+
if (!filter) {
|
|
622
|
+
if (this.internalFilters && this.internalFilters.length === 0) {
|
|
623
|
+
this.setupFilters();
|
|
624
|
+
return this.internalFilterByProp(column.prop + '_from') || {
|
|
625
|
+
value: null
|
|
626
|
+
};
|
|
627
|
+
}
|
|
628
|
+
return {
|
|
629
|
+
value: null
|
|
630
|
+
};
|
|
631
|
+
}
|
|
632
|
+
return filter;
|
|
633
|
+
},
|
|
634
|
+
// Método helper específico para campos de fecha (to)
|
|
635
|
+
getFilterForDateTo: function getFilterForDateTo(column) {
|
|
636
|
+
var filter = this.internalFilterByProp(column.prop + '_to');
|
|
637
|
+
if (!filter) {
|
|
638
|
+
if (this.internalFilters && this.internalFilters.length === 0) {
|
|
639
|
+
this.setupFilters();
|
|
640
|
+
return this.internalFilterByProp(column.prop + '_to') || {
|
|
641
|
+
value: null
|
|
642
|
+
};
|
|
643
|
+
}
|
|
644
|
+
return {
|
|
645
|
+
value: null
|
|
646
|
+
};
|
|
647
|
+
}
|
|
648
|
+
return filter;
|
|
649
|
+
}
|
|
650
|
+
}
|
|
544
651
|
};
|
|
545
652
|
var _sfc_render$f = function render() {
|
|
546
653
|
var _vm = this,
|
|
@@ -550,15 +657,15 @@ var _sfc_render$f = function render() {
|
|
|
550
657
|
}, [_vm._l(_vm.columns, function (column, indexc) {
|
|
551
658
|
return _c('div', {
|
|
552
659
|
key: indexc
|
|
553
|
-
}, [_vm.isColumnHasFilter(column) ? _c('div', [_vm.
|
|
660
|
+
}, [_vm.isColumnHasFilter(column) ? _c('div', [_vm._t('sidebar-filter-' + column.prop, function () {
|
|
554
661
|
return [column.type == 'boolean' ? _c('div', {
|
|
555
662
|
staticClass: "form-group"
|
|
556
663
|
}, [_c('label', [_vm._v(_vm._s(column.label))]), _c('select', {
|
|
557
664
|
directives: [{
|
|
558
665
|
name: "model",
|
|
559
666
|
rawName: "v-model",
|
|
560
|
-
value: _vm.
|
|
561
|
-
expression: "
|
|
667
|
+
value: _vm.getFilterForColumn(column).value,
|
|
668
|
+
expression: "getFilterForColumn(column).value"
|
|
562
669
|
}],
|
|
563
670
|
staticClass: "form-control",
|
|
564
671
|
on: {
|
|
@@ -569,7 +676,7 @@ var _sfc_render$f = function render() {
|
|
|
569
676
|
var val = "_value" in o ? o._value : o.value;
|
|
570
677
|
return val;
|
|
571
678
|
});
|
|
572
|
-
_vm.$set(_vm.
|
|
679
|
+
_vm.$set(_vm.getFilterForColumn(column), "value", $event.target.multiple ? $$selectedVal : $$selectedVal[0]);
|
|
573
680
|
}, function ($event) {
|
|
574
681
|
return _vm.onChangeFilter($event);
|
|
575
682
|
}]
|
|
@@ -600,11 +707,11 @@ var _sfc_render$f = function render() {
|
|
|
600
707
|
"locale": "es"
|
|
601
708
|
},
|
|
602
709
|
model: {
|
|
603
|
-
value: _vm.
|
|
710
|
+
value: _vm.getFilterForDateFrom(column).value,
|
|
604
711
|
callback: function callback($$v) {
|
|
605
|
-
_vm.$set(_vm.
|
|
712
|
+
_vm.$set(_vm.getFilterForDateFrom(column), "value", $$v);
|
|
606
713
|
},
|
|
607
|
-
expression: "
|
|
714
|
+
expression: "getFilterForDateFrom(column).value\n "
|
|
608
715
|
}
|
|
609
716
|
})], 1), _c('div', {
|
|
610
717
|
staticClass: "col-6"
|
|
@@ -616,20 +723,90 @@ var _sfc_render$f = function render() {
|
|
|
616
723
|
"locale": "es"
|
|
617
724
|
},
|
|
618
725
|
model: {
|
|
619
|
-
value: _vm.
|
|
726
|
+
value: _vm.getFilterForDateTo(column).value,
|
|
620
727
|
callback: function callback($$v) {
|
|
621
|
-
_vm.$set(_vm.
|
|
728
|
+
_vm.$set(_vm.getFilterForDateTo(column), "value", $$v);
|
|
622
729
|
},
|
|
623
|
-
expression: "
|
|
730
|
+
expression: "getFilterForDateTo(column).value\n "
|
|
624
731
|
}
|
|
625
|
-
})], 1)])]) : column.type == '
|
|
732
|
+
})], 1)])]) : column.type == 'number' || column.type == 'money' ? _c('div', {
|
|
626
733
|
staticClass: "form-group"
|
|
627
|
-
}, [_c('label', [_vm._v(_vm._s(column.label))]),
|
|
734
|
+
}, [_c('label', [_vm._v(_vm._s(column.label))]), _c('div', {
|
|
735
|
+
staticClass: "row"
|
|
736
|
+
}, [_c('div', {
|
|
737
|
+
staticClass: "col-6"
|
|
738
|
+
}, [_c('input', {
|
|
739
|
+
directives: [{
|
|
740
|
+
name: "model",
|
|
741
|
+
rawName: "v-model.number",
|
|
742
|
+
value: _vm.getFilterForDateFrom(column).value,
|
|
743
|
+
expression: "getFilterForDateFrom(column).value",
|
|
744
|
+
modifiers: {
|
|
745
|
+
"number": true
|
|
746
|
+
}
|
|
747
|
+
}],
|
|
748
|
+
staticClass: "form-control",
|
|
749
|
+
attrs: {
|
|
750
|
+
"type": "number",
|
|
751
|
+
"step": column.type == 'money' ? '0.01' : '1',
|
|
752
|
+
"placeholder": "Desde"
|
|
753
|
+
},
|
|
754
|
+
domProps: {
|
|
755
|
+
"value": _vm.getFilterForDateFrom(column).value
|
|
756
|
+
},
|
|
757
|
+
on: {
|
|
758
|
+
"change": function change($event) {
|
|
759
|
+
return _vm.onChangeFilter($event);
|
|
760
|
+
},
|
|
761
|
+
"input": function input($event) {
|
|
762
|
+
if ($event.target.composing) return;
|
|
763
|
+
_vm.$set(_vm.getFilterForDateFrom(column), "value", _vm._n($event.target.value));
|
|
764
|
+
},
|
|
765
|
+
"blur": function blur($event) {
|
|
766
|
+
return _vm.$forceUpdate();
|
|
767
|
+
}
|
|
768
|
+
}
|
|
769
|
+
})]), _c('div', {
|
|
770
|
+
staticClass: "col-6"
|
|
771
|
+
}, [_c('input', {
|
|
772
|
+
directives: [{
|
|
773
|
+
name: "model",
|
|
774
|
+
rawName: "v-model.number",
|
|
775
|
+
value: _vm.getFilterForDateTo(column).value,
|
|
776
|
+
expression: "getFilterForDateTo(column).value",
|
|
777
|
+
modifiers: {
|
|
778
|
+
"number": true
|
|
779
|
+
}
|
|
780
|
+
}],
|
|
781
|
+
staticClass: "form-control",
|
|
782
|
+
attrs: {
|
|
783
|
+
"type": "number",
|
|
784
|
+
"step": column.type == 'money' ? '0.01' : '1',
|
|
785
|
+
"placeholder": "Hasta"
|
|
786
|
+
},
|
|
787
|
+
domProps: {
|
|
788
|
+
"value": _vm.getFilterForDateTo(column).value
|
|
789
|
+
},
|
|
790
|
+
on: {
|
|
791
|
+
"change": function change($event) {
|
|
792
|
+
return _vm.onChangeFilter($event);
|
|
793
|
+
},
|
|
794
|
+
"input": function input($event) {
|
|
795
|
+
if ($event.target.composing) return;
|
|
796
|
+
_vm.$set(_vm.getFilterForDateTo(column), "value", _vm._n($event.target.value));
|
|
797
|
+
},
|
|
798
|
+
"blur": function blur($event) {
|
|
799
|
+
return _vm.$forceUpdate();
|
|
800
|
+
}
|
|
801
|
+
}
|
|
802
|
+
})])])]) : column.type == 'state' ? _c('div', {
|
|
803
|
+
staticClass: "form-group"
|
|
804
|
+
}, [_c('label', [_vm._v(_vm._s(column.label))]), column.options && Array.isArray(column.options) ? _c('select', {
|
|
628
805
|
directives: [{
|
|
629
806
|
name: "model",
|
|
630
807
|
rawName: "v-model",
|
|
631
|
-
value: _vm.
|
|
632
|
-
expression: "
|
|
808
|
+
value: _vm.getFilterForColumn(column).value,
|
|
809
|
+
expression: "getFilterForColumn(column).value"
|
|
633
810
|
}],
|
|
634
811
|
staticClass: "form-control",
|
|
635
812
|
on: {
|
|
@@ -640,7 +817,7 @@ var _sfc_render$f = function render() {
|
|
|
640
817
|
var val = "_value" in o ? o._value : o.value;
|
|
641
818
|
return val;
|
|
642
819
|
});
|
|
643
|
-
_vm.$set(_vm.
|
|
820
|
+
_vm.$set(_vm.getFilterForColumn(column), "value", $event.target.multiple ? $$selectedVal : $$selectedVal[0]);
|
|
644
821
|
}, function ($event) {
|
|
645
822
|
return _vm.onChangeFilter($event);
|
|
646
823
|
}]
|
|
@@ -651,19 +828,19 @@ var _sfc_render$f = function render() {
|
|
|
651
828
|
}
|
|
652
829
|
}), _vm._l(column.options, function (option) {
|
|
653
830
|
return _c('option', {
|
|
654
|
-
key: option.
|
|
831
|
+
key: option.value || option.id,
|
|
655
832
|
domProps: {
|
|
656
|
-
"value": option.
|
|
833
|
+
"value": option.value
|
|
657
834
|
}
|
|
658
|
-
}, [_vm._v(" " + _vm._s(option.text
|
|
835
|
+
}, [_vm._v(" " + _vm._s(option.text) + " ")]);
|
|
659
836
|
})], 2) : _vm._e()]) : column.type == 'array' ? _c('div', {
|
|
660
837
|
staticClass: "form-group"
|
|
661
|
-
}, [_c('label', [_vm._v(_vm._s(column.label))]),
|
|
838
|
+
}, [_c('label', [_vm._v(_vm._s(column.label))]), column.options && Array.isArray(column.options) ? _c('select', {
|
|
662
839
|
directives: [{
|
|
663
840
|
name: "model",
|
|
664
841
|
rawName: "v-model",
|
|
665
|
-
value: _vm.
|
|
666
|
-
expression: "
|
|
842
|
+
value: _vm.getFilterForColumn(column).value,
|
|
843
|
+
expression: "getFilterForColumn(column).value"
|
|
667
844
|
}],
|
|
668
845
|
staticClass: "form-control",
|
|
669
846
|
on: {
|
|
@@ -674,7 +851,7 @@ var _sfc_render$f = function render() {
|
|
|
674
851
|
var val = "_value" in o ? o._value : o.value;
|
|
675
852
|
return val;
|
|
676
853
|
});
|
|
677
|
-
_vm.$set(_vm.
|
|
854
|
+
_vm.$set(_vm.getFilterForColumn(column), "value", $event.target.multiple ? $$selectedVal : $$selectedVal[0]);
|
|
678
855
|
}, function ($event) {
|
|
679
856
|
return _vm.onChangeFilter($event);
|
|
680
857
|
}]
|
|
@@ -683,32 +860,32 @@ var _sfc_render$f = function render() {
|
|
|
683
860
|
attrs: {
|
|
684
861
|
"value": ""
|
|
685
862
|
}
|
|
686
|
-
}),
|
|
863
|
+
}), _vm._l(column.options, function (option) {
|
|
687
864
|
return _c('option', {
|
|
688
|
-
key: option.
|
|
865
|
+
key: option.value || option.id,
|
|
689
866
|
domProps: {
|
|
690
|
-
"value": option.
|
|
867
|
+
"value": option.value
|
|
691
868
|
}
|
|
692
|
-
}, [_vm._v(" " + _vm._s(option.text
|
|
693
|
-
})
|
|
869
|
+
}, [_vm._v(" " + _vm._s(option.text) + " ")]);
|
|
870
|
+
})], 2) : _vm._e()]) : _c('div', {
|
|
694
871
|
staticClass: "form-group"
|
|
695
872
|
}, [_c('label', [_vm._v(_vm._s(column.label))]), _c('input', {
|
|
696
873
|
directives: [{
|
|
697
874
|
name: "model",
|
|
698
875
|
rawName: "v-model.lazy",
|
|
699
|
-
value: _vm.
|
|
700
|
-
expression: "
|
|
876
|
+
value: _vm.getFilterForColumn(column).value,
|
|
877
|
+
expression: "getFilterForColumn(column).value",
|
|
701
878
|
modifiers: {
|
|
702
879
|
"lazy": true
|
|
703
880
|
}
|
|
704
881
|
}],
|
|
705
882
|
staticClass: "form-control",
|
|
706
883
|
domProps: {
|
|
707
|
-
"value": _vm.
|
|
884
|
+
"value": _vm.getFilterForColumn(column).value
|
|
708
885
|
},
|
|
709
886
|
on: {
|
|
710
887
|
"change": [function ($event) {
|
|
711
|
-
_vm.$set(_vm.
|
|
888
|
+
_vm.$set(_vm.getFilterForColumn(column), "value", $event.target.value);
|
|
712
889
|
}, function ($event) {
|
|
713
890
|
return _vm.onChangeFilter($event);
|
|
714
891
|
}]
|
|
@@ -717,8 +894,261 @@ var _sfc_render$f = function render() {
|
|
|
717
894
|
}, {
|
|
718
895
|
"column": column,
|
|
719
896
|
"filter": _vm.filter,
|
|
720
|
-
"internalFilterByProp": _vm.internalFilterByProp
|
|
721
|
-
|
|
897
|
+
"internalFilterByProp": _vm.internalFilterByProp,
|
|
898
|
+
"getFilterForColumn": _vm.getFilterForColumn
|
|
899
|
+
})], 2) : _vm._e()]);
|
|
900
|
+
}), _vm._l(_vm.customFilters, function (customFilter, indexcf) {
|
|
901
|
+
return _c('div', {
|
|
902
|
+
key: 'custom-' + indexcf
|
|
903
|
+
}, [_vm.isCustomFilterEnabled(customFilter) ? _c('div', [_vm._t('sidebar-filter-custom-' + customFilter.prop, function () {
|
|
904
|
+
return [typeof customFilter.type === 'function' ? _c('RenderCustomFilter', {
|
|
905
|
+
attrs: {
|
|
906
|
+
"render-function": customFilter.type,
|
|
907
|
+
"custom-filter": customFilter,
|
|
908
|
+
"filter": _vm.filter,
|
|
909
|
+
"internal-filter-by-prop": _vm.internalFilterByProp,
|
|
910
|
+
"get-filter-for-column": _vm.getFilterForColumn,
|
|
911
|
+
"on-change-filter": _vm.onChangeFilter
|
|
912
|
+
}
|
|
913
|
+
}) : [customFilter.type == 'boolean' ? _c('div', {
|
|
914
|
+
staticClass: "form-group"
|
|
915
|
+
}, [_c('label', [_vm._v(_vm._s(customFilter.label))]), _c('select', {
|
|
916
|
+
directives: [{
|
|
917
|
+
name: "model",
|
|
918
|
+
rawName: "v-model",
|
|
919
|
+
value: _vm.getFilterForColumn(customFilter).value,
|
|
920
|
+
expression: "getFilterForColumn(customFilter).value"
|
|
921
|
+
}],
|
|
922
|
+
staticClass: "form-control",
|
|
923
|
+
on: {
|
|
924
|
+
"change": [function ($event) {
|
|
925
|
+
var $$selectedVal = Array.prototype.filter.call($event.target.options, function (o) {
|
|
926
|
+
return o.selected;
|
|
927
|
+
}).map(function (o) {
|
|
928
|
+
var val = "_value" in o ? o._value : o.value;
|
|
929
|
+
return val;
|
|
930
|
+
});
|
|
931
|
+
_vm.$set(_vm.getFilterForColumn(customFilter), "value", $event.target.multiple ? $$selectedVal : $$selectedVal[0]);
|
|
932
|
+
}, function ($event) {
|
|
933
|
+
return _vm.onChangeFilter($event);
|
|
934
|
+
}]
|
|
935
|
+
}
|
|
936
|
+
}, [_c('option', {
|
|
937
|
+
attrs: {
|
|
938
|
+
"value": ""
|
|
939
|
+
}
|
|
940
|
+
}), _c('option', {
|
|
941
|
+
attrs: {
|
|
942
|
+
"value": "1"
|
|
943
|
+
}
|
|
944
|
+
}, [_vm._v("Sí")]), _c('option', {
|
|
945
|
+
attrs: {
|
|
946
|
+
"value": "0"
|
|
947
|
+
}
|
|
948
|
+
}, [_vm._v("No")])])]) : customFilter.type == 'date' ? _c('div', {
|
|
949
|
+
staticClass: "form-group"
|
|
950
|
+
}, [_c('label', [_vm._v(_vm._s(customFilter.label))]), _c('div', {
|
|
951
|
+
staticClass: "row"
|
|
952
|
+
}, [_c('div', {
|
|
953
|
+
staticClass: "col-6"
|
|
954
|
+
}, [_c('b-form-datepicker', {
|
|
955
|
+
attrs: {
|
|
956
|
+
"today-button": "",
|
|
957
|
+
"reset-button": "",
|
|
958
|
+
"close-button": "",
|
|
959
|
+
"locale": "es"
|
|
960
|
+
},
|
|
961
|
+
model: {
|
|
962
|
+
value: _vm.getFilterForDateFrom(customFilter).value,
|
|
963
|
+
callback: function callback($$v) {
|
|
964
|
+
_vm.$set(_vm.getFilterForDateFrom(customFilter), "value", $$v);
|
|
965
|
+
},
|
|
966
|
+
expression: "getFilterForDateFrom(customFilter).value\n "
|
|
967
|
+
}
|
|
968
|
+
})], 1), _c('div', {
|
|
969
|
+
staticClass: "col-6"
|
|
970
|
+
}, [_c('b-form-datepicker', {
|
|
971
|
+
attrs: {
|
|
972
|
+
"today-button": "",
|
|
973
|
+
"reset-button": "",
|
|
974
|
+
"close-button": "",
|
|
975
|
+
"locale": "es"
|
|
976
|
+
},
|
|
977
|
+
model: {
|
|
978
|
+
value: _vm.getFilterForDateTo(customFilter).value,
|
|
979
|
+
callback: function callback($$v) {
|
|
980
|
+
_vm.$set(_vm.getFilterForDateTo(customFilter), "value", $$v);
|
|
981
|
+
},
|
|
982
|
+
expression: "getFilterForDateTo(customFilter).value\n "
|
|
983
|
+
}
|
|
984
|
+
})], 1)])]) : customFilter.type == 'number' || customFilter.type == 'money' ? _c('div', {
|
|
985
|
+
staticClass: "form-group"
|
|
986
|
+
}, [_c('label', [_vm._v(_vm._s(customFilter.label))]), _c('div', {
|
|
987
|
+
staticClass: "row"
|
|
988
|
+
}, [_c('div', {
|
|
989
|
+
staticClass: "col-6"
|
|
990
|
+
}, [_c('input', {
|
|
991
|
+
directives: [{
|
|
992
|
+
name: "model",
|
|
993
|
+
rawName: "v-model.number",
|
|
994
|
+
value: _vm.getFilterForDateFrom(customFilter).value,
|
|
995
|
+
expression: "getFilterForDateFrom(customFilter).value",
|
|
996
|
+
modifiers: {
|
|
997
|
+
"number": true
|
|
998
|
+
}
|
|
999
|
+
}],
|
|
1000
|
+
staticClass: "form-control",
|
|
1001
|
+
attrs: {
|
|
1002
|
+
"type": "number",
|
|
1003
|
+
"step": customFilter.type == 'money' ? '0.01' : '1',
|
|
1004
|
+
"placeholder": "Desde"
|
|
1005
|
+
},
|
|
1006
|
+
domProps: {
|
|
1007
|
+
"value": _vm.getFilterForDateFrom(customFilter).value
|
|
1008
|
+
},
|
|
1009
|
+
on: {
|
|
1010
|
+
"change": function change($event) {
|
|
1011
|
+
return _vm.onChangeFilter($event);
|
|
1012
|
+
},
|
|
1013
|
+
"input": function input($event) {
|
|
1014
|
+
if ($event.target.composing) return;
|
|
1015
|
+
_vm.$set(_vm.getFilterForDateFrom(customFilter), "value", _vm._n($event.target.value));
|
|
1016
|
+
},
|
|
1017
|
+
"blur": function blur($event) {
|
|
1018
|
+
return _vm.$forceUpdate();
|
|
1019
|
+
}
|
|
1020
|
+
}
|
|
1021
|
+
})]), _c('div', {
|
|
1022
|
+
staticClass: "col-6"
|
|
1023
|
+
}, [_c('input', {
|
|
1024
|
+
directives: [{
|
|
1025
|
+
name: "model",
|
|
1026
|
+
rawName: "v-model.number",
|
|
1027
|
+
value: _vm.getFilterForDateTo(customFilter).value,
|
|
1028
|
+
expression: "getFilterForDateTo(customFilter).value",
|
|
1029
|
+
modifiers: {
|
|
1030
|
+
"number": true
|
|
1031
|
+
}
|
|
1032
|
+
}],
|
|
1033
|
+
staticClass: "form-control",
|
|
1034
|
+
attrs: {
|
|
1035
|
+
"type": "number",
|
|
1036
|
+
"step": customFilter.type == 'money' ? '0.01' : '1',
|
|
1037
|
+
"placeholder": "Hasta"
|
|
1038
|
+
},
|
|
1039
|
+
domProps: {
|
|
1040
|
+
"value": _vm.getFilterForDateTo(customFilter).value
|
|
1041
|
+
},
|
|
1042
|
+
on: {
|
|
1043
|
+
"change": function change($event) {
|
|
1044
|
+
return _vm.onChangeFilter($event);
|
|
1045
|
+
},
|
|
1046
|
+
"input": function input($event) {
|
|
1047
|
+
if ($event.target.composing) return;
|
|
1048
|
+
_vm.$set(_vm.getFilterForDateTo(customFilter), "value", _vm._n($event.target.value));
|
|
1049
|
+
},
|
|
1050
|
+
"blur": function blur($event) {
|
|
1051
|
+
return _vm.$forceUpdate();
|
|
1052
|
+
}
|
|
1053
|
+
}
|
|
1054
|
+
})])])]) : customFilter.type == 'state' ? _c('div', {
|
|
1055
|
+
staticClass: "form-group"
|
|
1056
|
+
}, [_c('label', [_vm._v(_vm._s(customFilter.label))]), customFilter.options && Array.isArray(customFilter.options) ? _c('select', {
|
|
1057
|
+
directives: [{
|
|
1058
|
+
name: "model",
|
|
1059
|
+
rawName: "v-model",
|
|
1060
|
+
value: _vm.getFilterForColumn(customFilter).value,
|
|
1061
|
+
expression: "getFilterForColumn(customFilter).value"
|
|
1062
|
+
}],
|
|
1063
|
+
staticClass: "form-control",
|
|
1064
|
+
on: {
|
|
1065
|
+
"change": [function ($event) {
|
|
1066
|
+
var $$selectedVal = Array.prototype.filter.call($event.target.options, function (o) {
|
|
1067
|
+
return o.selected;
|
|
1068
|
+
}).map(function (o) {
|
|
1069
|
+
var val = "_value" in o ? o._value : o.value;
|
|
1070
|
+
return val;
|
|
1071
|
+
});
|
|
1072
|
+
_vm.$set(_vm.getFilterForColumn(customFilter), "value", $event.target.multiple ? $$selectedVal : $$selectedVal[0]);
|
|
1073
|
+
}, function ($event) {
|
|
1074
|
+
return _vm.onChangeFilter($event);
|
|
1075
|
+
}]
|
|
1076
|
+
}
|
|
1077
|
+
}, [_c('option', {
|
|
1078
|
+
attrs: {
|
|
1079
|
+
"value": ""
|
|
1080
|
+
}
|
|
1081
|
+
}), _vm._l(customFilter.options, function (option) {
|
|
1082
|
+
return _c('option', {
|
|
1083
|
+
key: option.value || option.id,
|
|
1084
|
+
domProps: {
|
|
1085
|
+
"value": option.value
|
|
1086
|
+
}
|
|
1087
|
+
}, [_vm._v(" " + _vm._s(option.text) + " ")]);
|
|
1088
|
+
})], 2) : _vm._e()]) : customFilter.type == 'array' ? _c('div', {
|
|
1089
|
+
staticClass: "form-group"
|
|
1090
|
+
}, [_c('label', [_vm._v(_vm._s(customFilter.label))]), customFilter.options && Array.isArray(customFilter.options) ? _c('select', {
|
|
1091
|
+
directives: [{
|
|
1092
|
+
name: "model",
|
|
1093
|
+
rawName: "v-model",
|
|
1094
|
+
value: _vm.getFilterForColumn(customFilter).value,
|
|
1095
|
+
expression: "getFilterForColumn(customFilter).value"
|
|
1096
|
+
}],
|
|
1097
|
+
staticClass: "form-control",
|
|
1098
|
+
on: {
|
|
1099
|
+
"change": [function ($event) {
|
|
1100
|
+
var $$selectedVal = Array.prototype.filter.call($event.target.options, function (o) {
|
|
1101
|
+
return o.selected;
|
|
1102
|
+
}).map(function (o) {
|
|
1103
|
+
var val = "_value" in o ? o._value : o.value;
|
|
1104
|
+
return val;
|
|
1105
|
+
});
|
|
1106
|
+
_vm.$set(_vm.getFilterForColumn(customFilter), "value", $event.target.multiple ? $$selectedVal : $$selectedVal[0]);
|
|
1107
|
+
}, function ($event) {
|
|
1108
|
+
return _vm.onChangeFilter($event);
|
|
1109
|
+
}]
|
|
1110
|
+
}
|
|
1111
|
+
}, [_c('option', {
|
|
1112
|
+
attrs: {
|
|
1113
|
+
"value": ""
|
|
1114
|
+
}
|
|
1115
|
+
}), _vm._l(customFilter.options, function (option) {
|
|
1116
|
+
return _c('option', {
|
|
1117
|
+
key: option.value || option.id,
|
|
1118
|
+
domProps: {
|
|
1119
|
+
"value": option.value
|
|
1120
|
+
}
|
|
1121
|
+
}, [_vm._v(" " + _vm._s(option.text) + " ")]);
|
|
1122
|
+
})], 2) : _vm._e()]) : _c('div', {
|
|
1123
|
+
staticClass: "form-group"
|
|
1124
|
+
}, [_c('label', [_vm._v(_vm._s(customFilter.label))]), _c('input', {
|
|
1125
|
+
directives: [{
|
|
1126
|
+
name: "model",
|
|
1127
|
+
rawName: "v-model.lazy",
|
|
1128
|
+
value: _vm.getFilterForColumn(customFilter).value,
|
|
1129
|
+
expression: "getFilterForColumn(customFilter).value",
|
|
1130
|
+
modifiers: {
|
|
1131
|
+
"lazy": true
|
|
1132
|
+
}
|
|
1133
|
+
}],
|
|
1134
|
+
staticClass: "form-control",
|
|
1135
|
+
domProps: {
|
|
1136
|
+
"value": _vm.getFilterForColumn(customFilter).value
|
|
1137
|
+
},
|
|
1138
|
+
on: {
|
|
1139
|
+
"change": [function ($event) {
|
|
1140
|
+
_vm.$set(_vm.getFilterForColumn(customFilter), "value", $event.target.value);
|
|
1141
|
+
}, function ($event) {
|
|
1142
|
+
return _vm.onChangeFilter($event);
|
|
1143
|
+
}]
|
|
1144
|
+
}
|
|
1145
|
+
})])]];
|
|
1146
|
+
}, {
|
|
1147
|
+
"column": customFilter,
|
|
1148
|
+
"filter": _vm.filter,
|
|
1149
|
+
"internalFilterByProp": _vm.internalFilterByProp,
|
|
1150
|
+
"getFilterForColumn": _vm.getFilterForColumn
|
|
1151
|
+
})], 2) : _vm._e()]);
|
|
722
1152
|
}), _c('div', {
|
|
723
1153
|
staticClass: "mt-3 d-flex justify-content-center"
|
|
724
1154
|
}, [_c('button', {
|
|
@@ -739,17 +1169,27 @@ var _sfc_render$f = function render() {
|
|
|
739
1169
|
};
|
|
740
1170
|
var _sfc_staticRenderFns$f = [];
|
|
741
1171
|
var __component__$f = /*#__PURE__*/normalizeComponent(_sfc_main$f, _sfc_render$f, _sfc_staticRenderFns$f, false, null, null, null, null);
|
|
742
|
-
var CrudFilters = __component__$f.exports;var e=[],t=[];function n(n,r){if(n&&"undefined"!=typeof document){var a,s=!0===r.prepend?"prepend":"append",d=!0===r.singleTag,i="string"==typeof r.container?document.querySelector(r.container):document.getElementsByTagName("head")[0];if(d){var u=e.indexOf(i);-1===u&&(u=e.push(i)-1,t[u]={}),a=t[u]&&t[u][s]?t[u][s]:t[u][s]=c();}else a=c();65279===n.charCodeAt(0)&&(n=n.substring(1)),a.styleSheet?a.styleSheet.cssText+=n:a.appendChild(document.createTextNode(n));}function c(){var e=document.createElement("style");if(e.setAttribute("type","text/css"),r.attributes)for(var t=Object.keys(r.attributes),n=0;n<t.length;n++)e.setAttribute(t[n],r.attributes[t[n]]);var a="prepend"===s?"afterbegin":"beforeend";return i.insertAdjacentElement(a,e),e}}var css$
|
|
743
|
-
n(css$
|
|
1172
|
+
var CrudFilters = __component__$f.exports;var e=[],t=[];function n(n,r){if(n&&"undefined"!=typeof document){var a,s=!0===r.prepend?"prepend":"append",d=!0===r.singleTag,i="string"==typeof r.container?document.querySelector(r.container):document.getElementsByTagName("head")[0];if(d){var u=e.indexOf(i);-1===u&&(u=e.push(i)-1,t[u]={}),a=t[u]&&t[u][s]?t[u][s]:t[u][s]=c();}else a=c();65279===n.charCodeAt(0)&&(n=n.substring(1)),a.styleSheet?a.styleSheet.cssText+=n:a.appendChild(document.createTextNode(n));}function c(){var e=document.createElement("style");if(e.setAttribute("type","text/css"),r.attributes)for(var t=Object.keys(r.attributes),n=0;n<t.length;n++)e.setAttribute(t[n],r.attributes[t[n]]);var a="prepend"===s?"afterbegin":"beforeend";return i.insertAdjacentElement(a,e),e}}var css$9 = "\n.crud-header[data-v-4fb65bb3] {\n display: flex;\n justify-content: space-between;\n max-height: 3rem;\n}\n.crud-title[data-v-4fb65bb3] {\n margin: 0;\n}\n.crud-search[data-v-4fb65bb3] {\n max-width: 15rem;\n}\n.crud-search .btn[data-v-4fb65bb3] {\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n border-top-right-radius: 0.375rem;\n border-bottom-right-radius: 0.375rem;\n}\n.crud-search .btn.open[data-v-4fb65bb3] {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n}\n.table-options[data-v-4fb65bb3] {\n margin-bottom: 1rem;\n display: flex;\n align-items: center;\n justify-content: flex-end;\n}\n";
|
|
1173
|
+
n(css$9, {});var _sfc_main$e = {
|
|
744
1174
|
name: 'CrudHeader',
|
|
745
1175
|
components: {
|
|
746
1176
|
CrudFilters: CrudFilters
|
|
747
1177
|
},
|
|
748
|
-
inject: ['showHeader', 'showTitle', 'title', 'filterSidebarOpen', 'showImport', 'showExport', 'showPrincipalSortBtn', 'principalSort', 'bulkDelete', 'showCreateBtn', 'enableFilters', 'displayModeToggler', 'displayMode', 'displayModes', 'showSearch', 'displaySearch', 'search', 'searchPlaceholder', 'loading', 'messageImport', 'messageExport', 'messageNew', 'createItem', 'toggleDisplayMode', 'togglePrincipalSort', 'confirmBulkDelete', 'toggleFilters', 'refresh'],
|
|
1178
|
+
inject: ['showHeader', 'showTitle', 'title', 'filterSidebarOpen', 'showImport', 'showExport', 'showPrincipalSortBtn', 'principalSort', 'bulkDelete', 'showCreateBtn', 'enableFilters', 'displayModeToggler', 'displayMode', 'displayModes', 'showSearch', 'displaySearch', 'search', 'searchPlaceholder', 'loading', 'messageImport', 'messageExport', 'messageNew', 'createItem', 'toggleDisplayMode', 'togglePrincipalSort', 'confirmBulkDelete', 'toggleFilters', 'refresh', 'showImportModal', 'showExportModal'],
|
|
749
1179
|
computed: {
|
|
750
1180
|
sidebarVisible: function sidebarVisible() {
|
|
751
1181
|
// Acceder directamente al componente padre para obtener reactividad
|
|
752
1182
|
return this.$parent ? this.$parent.filterSidebarOpen : this.filterSidebarOpen;
|
|
1183
|
+
},
|
|
1184
|
+
currentDisplayMode: function currentDisplayMode() {
|
|
1185
|
+
if (!this.displayMode) return 1;
|
|
1186
|
+
if (this.displayMode.value !== undefined) {
|
|
1187
|
+
return this.displayMode.value;
|
|
1188
|
+
}
|
|
1189
|
+
if (typeof this.displayMode === 'function') {
|
|
1190
|
+
return this.displayMode();
|
|
1191
|
+
}
|
|
1192
|
+
return this.displayMode;
|
|
753
1193
|
}
|
|
754
1194
|
},
|
|
755
1195
|
methods: {
|
|
@@ -859,7 +1299,7 @@ var _sfc_render$e = function render() {
|
|
|
859
1299
|
return _vm.toggleDisplayMode();
|
|
860
1300
|
}
|
|
861
1301
|
}
|
|
862
|
-
}, [_vm.
|
|
1302
|
+
}, [_vm.currentDisplayMode == _vm.displayModes.MODE_TABLE ? _c('b-icon-card-list') : _vm.currentDisplayMode == _vm.displayModes.MODE_CARDS ? _c('b-icon-table') : _vm._e()], 1) : _vm._e(), _vm.showSearch ? _c('div', {
|
|
863
1303
|
staticClass: "crud-search m-0"
|
|
864
1304
|
}, [_c('b-input-group', [_c('b-input-group-prepend', [_c('b-button', {
|
|
865
1305
|
class: {
|
|
@@ -898,7 +1338,7 @@ var _sfc_render$e = function render() {
|
|
|
898
1338
|
})], 2)], 1)], 1) : _vm._e();
|
|
899
1339
|
};
|
|
900
1340
|
var _sfc_staticRenderFns$e = [];
|
|
901
|
-
var __component__$e = /*#__PURE__*/normalizeComponent(_sfc_main$e, _sfc_render$e, _sfc_staticRenderFns$e, false, null, "
|
|
1341
|
+
var __component__$e = /*#__PURE__*/normalizeComponent(_sfc_main$e, _sfc_render$e, _sfc_staticRenderFns$e, false, null, "4fb65bb3", null, null);
|
|
902
1342
|
var CrudHeader = __component__$e.exports;var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
903
1343
|
|
|
904
1344
|
function getDefaultExportFromCjs (x) {
|
|
@@ -1154,7 +1594,7 @@ function toggleClass(el, name, state) {
|
|
|
1154
1594
|
}
|
|
1155
1595
|
}
|
|
1156
1596
|
|
|
1157
|
-
function css$
|
|
1597
|
+
function css$8(el, prop, val) {
|
|
1158
1598
|
var style = el && el.style;
|
|
1159
1599
|
|
|
1160
1600
|
if (style) {
|
|
@@ -1183,7 +1623,7 @@ function matrix(el, selfOnly) {
|
|
|
1183
1623
|
appliedTransforms = el;
|
|
1184
1624
|
} else {
|
|
1185
1625
|
do {
|
|
1186
|
-
var transform = css$
|
|
1626
|
+
var transform = css$8(el, 'transform');
|
|
1187
1627
|
|
|
1188
1628
|
if (transform && transform !== 'none') {
|
|
1189
1629
|
appliedTransforms = transform + ' ' + appliedTransforms;
|
|
@@ -1265,11 +1705,11 @@ function getRect(el, relativeToContainingBlock, relativeToNonStaticParent, undoS
|
|
|
1265
1705
|
|
|
1266
1706
|
if (!IE11OrLess) {
|
|
1267
1707
|
do {
|
|
1268
|
-
if (container && container.getBoundingClientRect && (css$
|
|
1708
|
+
if (container && container.getBoundingClientRect && (css$8(container, 'transform') !== 'none' || relativeToNonStaticParent && css$8(container, 'position') !== 'static')) {
|
|
1269
1709
|
var containerRect = container.getBoundingClientRect(); // Set relative to edges of padding box of container
|
|
1270
1710
|
|
|
1271
|
-
top -= containerRect.top + parseInt(css$
|
|
1272
|
-
left -= containerRect.left + parseInt(css$
|
|
1711
|
+
top -= containerRect.top + parseInt(css$8(container, 'border-top-width'));
|
|
1712
|
+
left -= containerRect.left + parseInt(css$8(container, 'border-left-width'));
|
|
1273
1713
|
bottom = top + elRect.height;
|
|
1274
1714
|
right = left + elRect.width;
|
|
1275
1715
|
break;
|
|
@@ -1376,7 +1816,7 @@ function getChild(el, childNum, options) {
|
|
|
1376
1816
|
function lastChild(el, selector) {
|
|
1377
1817
|
var last = el.lastElementChild;
|
|
1378
1818
|
|
|
1379
|
-
while (last && (last === Sortable.ghost || css$
|
|
1819
|
+
while (last && (last === Sortable.ghost || css$8(last, 'display') === 'none' || selector && !matches(last, selector))) {
|
|
1380
1820
|
last = last.previousElementSibling;
|
|
1381
1821
|
}
|
|
1382
1822
|
|
|
@@ -1462,7 +1902,7 @@ function getParentAutoScrollElement(el, includeSelf) {
|
|
|
1462
1902
|
do {
|
|
1463
1903
|
// we don't need to get elem css if it isn't even overflowing in the first place (performance)
|
|
1464
1904
|
if (elem.clientWidth < elem.scrollWidth || elem.clientHeight < elem.scrollHeight) {
|
|
1465
|
-
var elemCSS = css$
|
|
1905
|
+
var elemCSS = css$8(elem);
|
|
1466
1906
|
|
|
1467
1907
|
if (elem.clientWidth < elem.scrollWidth && (elemCSS.overflowX == 'auto' || elemCSS.overflowX == 'scroll') || elem.clientHeight < elem.scrollHeight && (elemCSS.overflowY == 'auto' || elemCSS.overflowY == 'scroll')) {
|
|
1468
1908
|
if (!elem.getBoundingClientRect || elem === document.body) return getWindowScrollingElement();
|
|
@@ -1538,19 +1978,19 @@ function clone(el) {
|
|
|
1538
1978
|
}
|
|
1539
1979
|
|
|
1540
1980
|
function setRect(el, rect) {
|
|
1541
|
-
css$
|
|
1542
|
-
css$
|
|
1543
|
-
css$
|
|
1544
|
-
css$
|
|
1545
|
-
css$
|
|
1981
|
+
css$8(el, 'position', 'absolute');
|
|
1982
|
+
css$8(el, 'top', rect.top);
|
|
1983
|
+
css$8(el, 'left', rect.left);
|
|
1984
|
+
css$8(el, 'width', rect.width);
|
|
1985
|
+
css$8(el, 'height', rect.height);
|
|
1546
1986
|
}
|
|
1547
1987
|
|
|
1548
1988
|
function unsetRect(el) {
|
|
1549
|
-
css$
|
|
1550
|
-
css$
|
|
1551
|
-
css$
|
|
1552
|
-
css$
|
|
1553
|
-
css$
|
|
1989
|
+
css$8(el, 'position', '');
|
|
1990
|
+
css$8(el, 'top', '');
|
|
1991
|
+
css$8(el, 'left', '');
|
|
1992
|
+
css$8(el, 'width', '');
|
|
1993
|
+
css$8(el, 'height', '');
|
|
1554
1994
|
}
|
|
1555
1995
|
|
|
1556
1996
|
var expando = 'Sortable' + new Date().getTime();
|
|
@@ -1564,7 +2004,7 @@ function AnimationStateManager() {
|
|
|
1564
2004
|
if (!this.options.animation) return;
|
|
1565
2005
|
var children = [].slice.call(this.el.children);
|
|
1566
2006
|
children.forEach(function (child) {
|
|
1567
|
-
if (css$
|
|
2007
|
+
if (css$8(child, 'display') === 'none' || child === Sortable.ghost) return;
|
|
1568
2008
|
animationStates.push({
|
|
1569
2009
|
target: child,
|
|
1570
2010
|
rect: getRect(child)
|
|
@@ -1671,8 +2111,8 @@ function AnimationStateManager() {
|
|
|
1671
2111
|
},
|
|
1672
2112
|
animate: function animate(target, currentRect, toRect, duration) {
|
|
1673
2113
|
if (duration) {
|
|
1674
|
-
css$
|
|
1675
|
-
css$
|
|
2114
|
+
css$8(target, 'transition', '');
|
|
2115
|
+
css$8(target, 'transform', '');
|
|
1676
2116
|
var elMatrix = matrix(this.el),
|
|
1677
2117
|
scaleX = elMatrix && elMatrix.a,
|
|
1678
2118
|
scaleY = elMatrix && elMatrix.d,
|
|
@@ -1680,15 +2120,15 @@ function AnimationStateManager() {
|
|
|
1680
2120
|
translateY = (currentRect.top - toRect.top) / (scaleY || 1);
|
|
1681
2121
|
target.animatingX = !!translateX;
|
|
1682
2122
|
target.animatingY = !!translateY;
|
|
1683
|
-
css$
|
|
2123
|
+
css$8(target, 'transform', 'translate3d(' + translateX + 'px,' + translateY + 'px,0)');
|
|
1684
2124
|
repaint(target); // repaint
|
|
1685
2125
|
|
|
1686
|
-
css$
|
|
1687
|
-
css$
|
|
2126
|
+
css$8(target, 'transition', 'transform ' + duration + 'ms' + (this.options.easing ? ' ' + this.options.easing : ''));
|
|
2127
|
+
css$8(target, 'transform', 'translate3d(0,0,0)');
|
|
1688
2128
|
typeof target.animated === 'number' && clearTimeout(target.animated);
|
|
1689
2129
|
target.animated = setTimeout(function () {
|
|
1690
|
-
css$
|
|
1691
|
-
css$
|
|
2130
|
+
css$8(target, 'transition', '');
|
|
2131
|
+
css$8(target, 'transform', '');
|
|
1692
2132
|
target.animated = false;
|
|
1693
2133
|
target.animatingX = false;
|
|
1694
2134
|
target.animatingY = false;
|
|
@@ -1957,12 +2397,12 @@ supportDraggable = documentExists && !ChromeForAndroid && !IOS && 'draggable' in
|
|
|
1957
2397
|
return el.style.pointerEvents === 'auto';
|
|
1958
2398
|
}(),
|
|
1959
2399
|
_detectDirection = function _detectDirection(el, options) {
|
|
1960
|
-
var elCSS = css$
|
|
2400
|
+
var elCSS = css$8(el),
|
|
1961
2401
|
elWidth = parseInt(elCSS.width) - parseInt(elCSS.paddingLeft) - parseInt(elCSS.paddingRight) - parseInt(elCSS.borderLeftWidth) - parseInt(elCSS.borderRightWidth),
|
|
1962
2402
|
child1 = getChild(el, 0, options),
|
|
1963
2403
|
child2 = getChild(el, 1, options),
|
|
1964
|
-
firstChildCSS = child1 && css$
|
|
1965
|
-
secondChildCSS = child2 && css$
|
|
2404
|
+
firstChildCSS = child1 && css$8(child1),
|
|
2405
|
+
secondChildCSS = child2 && css$8(child2),
|
|
1966
2406
|
firstChildWidth = firstChildCSS && parseInt(firstChildCSS.marginLeft) + parseInt(firstChildCSS.marginRight) + getRect(child1).width,
|
|
1967
2407
|
secondChildWidth = secondChildCSS && parseInt(secondChildCSS.marginLeft) + parseInt(secondChildCSS.marginRight) + getRect(child2).width;
|
|
1968
2408
|
|
|
@@ -2051,12 +2491,12 @@ _detectNearestEmptySortable = function _detectNearestEmptySortable(x, y) {
|
|
|
2051
2491
|
},
|
|
2052
2492
|
_hideGhostForTarget = function _hideGhostForTarget() {
|
|
2053
2493
|
if (!supportCssPointerEvents && ghostEl) {
|
|
2054
|
-
css$
|
|
2494
|
+
css$8(ghostEl, 'display', 'none');
|
|
2055
2495
|
}
|
|
2056
2496
|
},
|
|
2057
2497
|
_unhideGhostForTarget = function _unhideGhostForTarget() {
|
|
2058
2498
|
if (!supportCssPointerEvents && ghostEl) {
|
|
2059
|
-
css$
|
|
2499
|
+
css$8(ghostEl, 'display', '');
|
|
2060
2500
|
}
|
|
2061
2501
|
}; // #1184 fix - Prevent click event on fallback if dragged but item not changed position
|
|
2062
2502
|
|
|
@@ -2591,10 +3031,10 @@ Sortable.prototype =
|
|
|
2591
3031
|
}
|
|
2592
3032
|
|
|
2593
3033
|
var cssMatrix = "matrix(".concat(ghostMatrix.a, ",").concat(ghostMatrix.b, ",").concat(ghostMatrix.c, ",").concat(ghostMatrix.d, ",").concat(ghostMatrix.e, ",").concat(ghostMatrix.f, ")");
|
|
2594
|
-
css$
|
|
2595
|
-
css$
|
|
2596
|
-
css$
|
|
2597
|
-
css$
|
|
3034
|
+
css$8(ghostEl, 'webkitTransform', cssMatrix);
|
|
3035
|
+
css$8(ghostEl, 'mozTransform', cssMatrix);
|
|
3036
|
+
css$8(ghostEl, 'msTransform', cssMatrix);
|
|
3037
|
+
css$8(ghostEl, 'transform', cssMatrix);
|
|
2598
3038
|
lastDx = dx;
|
|
2599
3039
|
lastDy = dy;
|
|
2600
3040
|
touchEvt = touch;
|
|
@@ -2615,7 +3055,7 @@ Sortable.prototype =
|
|
|
2615
3055
|
// Get relatively positioned parent
|
|
2616
3056
|
ghostRelativeParent = container;
|
|
2617
3057
|
|
|
2618
|
-
while (css$
|
|
3058
|
+
while (css$8(ghostRelativeParent, 'position') === 'static' && css$8(ghostRelativeParent, 'transform') === 'none' && ghostRelativeParent !== document) {
|
|
2619
3059
|
ghostRelativeParent = ghostRelativeParent.parentNode;
|
|
2620
3060
|
}
|
|
2621
3061
|
|
|
@@ -2634,22 +3074,22 @@ Sortable.prototype =
|
|
|
2634
3074
|
toggleClass(ghostEl, options.ghostClass, false);
|
|
2635
3075
|
toggleClass(ghostEl, options.fallbackClass, true);
|
|
2636
3076
|
toggleClass(ghostEl, options.dragClass, true);
|
|
2637
|
-
css$
|
|
2638
|
-
css$
|
|
2639
|
-
css$
|
|
2640
|
-
css$
|
|
2641
|
-
css$
|
|
2642
|
-
css$
|
|
2643
|
-
css$
|
|
2644
|
-
css$
|
|
2645
|
-
css$
|
|
2646
|
-
css$
|
|
2647
|
-
css$
|
|
2648
|
-
css$
|
|
3077
|
+
css$8(ghostEl, 'transition', '');
|
|
3078
|
+
css$8(ghostEl, 'transform', '');
|
|
3079
|
+
css$8(ghostEl, 'box-sizing', 'border-box');
|
|
3080
|
+
css$8(ghostEl, 'margin', 0);
|
|
3081
|
+
css$8(ghostEl, 'top', rect.top);
|
|
3082
|
+
css$8(ghostEl, 'left', rect.left);
|
|
3083
|
+
css$8(ghostEl, 'width', rect.width);
|
|
3084
|
+
css$8(ghostEl, 'height', rect.height);
|
|
3085
|
+
css$8(ghostEl, 'opacity', '0.8');
|
|
3086
|
+
css$8(ghostEl, 'position', PositionGhostAbsolutely ? 'absolute' : 'fixed');
|
|
3087
|
+
css$8(ghostEl, 'zIndex', '100000');
|
|
3088
|
+
css$8(ghostEl, 'pointerEvents', 'none');
|
|
2649
3089
|
Sortable.ghost = ghostEl;
|
|
2650
3090
|
container.appendChild(ghostEl); // Set transform-origin
|
|
2651
3091
|
|
|
2652
|
-
css$
|
|
3092
|
+
css$8(ghostEl, 'transform-origin', tapDistanceLeft / parseInt(ghostEl.style.width) * 100 + '% ' + tapDistanceTop / parseInt(ghostEl.style.height) * 100 + '%');
|
|
2653
3093
|
}
|
|
2654
3094
|
},
|
|
2655
3095
|
_onDragStart: function _onDragStart(
|
|
@@ -2718,7 +3158,7 @@ Sortable.prototype =
|
|
|
2718
3158
|
|
|
2719
3159
|
on(document, 'drop', _this); // #1276 fix:
|
|
2720
3160
|
|
|
2721
|
-
css$
|
|
3161
|
+
css$8(dragEl, 'transform', 'translateZ(0)');
|
|
2722
3162
|
}
|
|
2723
3163
|
|
|
2724
3164
|
awaitingDragStarted = true;
|
|
@@ -2727,7 +3167,7 @@ Sortable.prototype =
|
|
|
2727
3167
|
moved = true;
|
|
2728
3168
|
|
|
2729
3169
|
if (Safari) {
|
|
2730
|
-
css$
|
|
3170
|
+
css$8(document.body, 'user-select', 'none');
|
|
2731
3171
|
}
|
|
2732
3172
|
},
|
|
2733
3173
|
// Returns true - if no further action is needed (either inserted or another condition)
|
|
@@ -2947,7 +3387,7 @@ Sortable.prototype =
|
|
|
2947
3387
|
do {
|
|
2948
3388
|
dragIndex -= direction;
|
|
2949
3389
|
sibling = parentEl.children[dragIndex];
|
|
2950
|
-
} while (sibling && (css$
|
|
3390
|
+
} while (sibling && (css$8(sibling, 'display') === 'none' || sibling === ghostEl));
|
|
2951
3391
|
} // If dragEl is already beside target: Do not insert
|
|
2952
3392
|
|
|
2953
3393
|
|
|
@@ -3062,10 +3502,10 @@ Sortable.prototype =
|
|
|
3062
3502
|
this._offUpEvents();
|
|
3063
3503
|
|
|
3064
3504
|
if (Safari) {
|
|
3065
|
-
css$
|
|
3505
|
+
css$8(document.body, 'user-select', '');
|
|
3066
3506
|
}
|
|
3067
3507
|
|
|
3068
|
-
css$
|
|
3508
|
+
css$8(dragEl, 'transform', '');
|
|
3069
3509
|
|
|
3070
3510
|
if (evt) {
|
|
3071
3511
|
if (moved) {
|
|
@@ -3340,7 +3780,7 @@ Sortable.prototype =
|
|
|
3340
3780
|
if (!cloneHidden) {
|
|
3341
3781
|
pluginEvent('hideClone', this);
|
|
3342
3782
|
if (Sortable.eventCanceled) return;
|
|
3343
|
-
css$
|
|
3783
|
+
css$8(cloneEl, 'display', 'none');
|
|
3344
3784
|
|
|
3345
3785
|
if (this.options.removeCloneOnHide && cloneEl.parentNode) {
|
|
3346
3786
|
cloneEl.parentNode.removeChild(cloneEl);
|
|
@@ -3372,7 +3812,7 @@ Sortable.prototype =
|
|
|
3372
3812
|
this.animate(dragEl, cloneEl);
|
|
3373
3813
|
}
|
|
3374
3814
|
|
|
3375
|
-
css$
|
|
3815
|
+
css$8(cloneEl, 'display', '');
|
|
3376
3816
|
cloneHidden = false;
|
|
3377
3817
|
}
|
|
3378
3818
|
}
|
|
@@ -3547,7 +3987,7 @@ if (documentExists) {
|
|
|
3547
3987
|
Sortable.utils = {
|
|
3548
3988
|
on: on,
|
|
3549
3989
|
off: off,
|
|
3550
|
-
css: css$
|
|
3990
|
+
css: css$8,
|
|
3551
3991
|
find: find,
|
|
3552
3992
|
is: function is(el, selector) {
|
|
3553
3993
|
return !!closest(el, selector, el, false);
|
|
@@ -3774,7 +4214,7 @@ var autoScroll = throttle(function (evt, options, rootEl, isFallback) {
|
|
|
3774
4214
|
canScrollY = void 0,
|
|
3775
4215
|
scrollWidth = el.scrollWidth,
|
|
3776
4216
|
scrollHeight = el.scrollHeight,
|
|
3777
|
-
elCSS = css$
|
|
4217
|
+
elCSS = css$8(el),
|
|
3778
4218
|
scrollPosX = el.scrollLeft,
|
|
3779
4219
|
scrollPosY = el.scrollTop;
|
|
3780
4220
|
|
|
@@ -4110,7 +4550,7 @@ function MultiDragPlugin() {
|
|
|
4110
4550
|
if (!this.isMultiDrag) return;
|
|
4111
4551
|
insertMultiDragClones(false, rootEl);
|
|
4112
4552
|
multiDragClones.forEach(function (clone) {
|
|
4113
|
-
css$
|
|
4553
|
+
css$8(clone, 'display', '');
|
|
4114
4554
|
});
|
|
4115
4555
|
cloneNowShown();
|
|
4116
4556
|
clonesHidden = false;
|
|
@@ -4124,7 +4564,7 @@ function MultiDragPlugin() {
|
|
|
4124
4564
|
cancel = _ref5.cancel;
|
|
4125
4565
|
if (!this.isMultiDrag) return;
|
|
4126
4566
|
multiDragClones.forEach(function (clone) {
|
|
4127
|
-
css$
|
|
4567
|
+
css$8(clone, 'display', 'none');
|
|
4128
4568
|
|
|
4129
4569
|
if (_this.options.removeCloneOnHide && clone.parentNode) {
|
|
4130
4570
|
clone.parentNode.removeChild(clone);
|
|
@@ -4168,7 +4608,7 @@ function MultiDragPlugin() {
|
|
|
4168
4608
|
if (this.options.animation) {
|
|
4169
4609
|
multiDragElements.forEach(function (multiDragElement) {
|
|
4170
4610
|
if (multiDragElement === dragEl$1) return;
|
|
4171
|
-
css$
|
|
4611
|
+
css$8(multiDragElement, 'position', 'absolute');
|
|
4172
4612
|
});
|
|
4173
4613
|
var dragRect = getRect(dragEl$1, false, true, true);
|
|
4174
4614
|
multiDragElements.forEach(function (multiDragElement) {
|
|
@@ -7049,8 +7489,8 @@ Sortable.mount(Remove, Revert);var sortable_esm=/*#__PURE__*/Object.freeze({__pr
|
|
|
7049
7489
|
} (vuedraggable_umd, vuedraggable_umd.exports));
|
|
7050
7490
|
|
|
7051
7491
|
var vuedraggable_umdExports = vuedraggable_umd.exports;
|
|
7052
|
-
var draggable = /*@__PURE__*/getDefaultExportFromCjs(vuedraggable_umdExports);var css$
|
|
7053
|
-
n(css$
|
|
7492
|
+
var draggable = /*@__PURE__*/getDefaultExportFromCjs(vuedraggable_umdExports);var css$7 = "\r\n/* Fijar ancho de la columna de acciones en el header */\n.actions-header[data-v-3de96e53] {\r\n width: 1%;\r\n white-space: nowrap;\n}\n.sort-filter[data-v-3de96e53] {\r\n cursor: pointer;\r\n visibility: hidden;\r\n display: inline-block;\n}\n.sort-filter-visible[data-v-3de96e53] {\r\n visibility: visible;\n}\r\n";
|
|
7493
|
+
n(css$7, {});var _sfc_main$d = {
|
|
7054
7494
|
name: 'TableHeader',
|
|
7055
7495
|
inject: ['columns', 'enableFilters', 'filtersVisible', 'isColumnHasFilter', 'internalFilterByProp', 'onChangeFilter', 'toggleAll', 'toggleSortFilter', 'sortable', 'optionsLoaded', 'isAllSelected'],
|
|
7056
7496
|
data: function data() {
|
|
@@ -7106,7 +7546,7 @@ var _sfc_render$d = function render() {
|
|
|
7106
7546
|
_vm.hoveredColumn = null;
|
|
7107
7547
|
}
|
|
7108
7548
|
}
|
|
7109
|
-
}, [_vm.enableFilters && _vm.filtersVisible && _vm.isColumnHasFilter(column) && _vm.internalFilterByProp(column.prop) ? _vm._t('filter-' + column.prop, function () {
|
|
7549
|
+
}, [_vm.enableFilters && _vm.filtersVisible && _vm.isColumnHasFilter(column) && (_vm.internalFilterByProp(column.prop) || _vm.internalFilterByProp(column.prop + '_from')) ? _vm._t('filter-' + column.prop, function () {
|
|
7110
7550
|
return [_c('div', {
|
|
7111
7551
|
staticClass: "form-group"
|
|
7112
7552
|
}, [column.type == 'boolean' ? _c('select', {
|
|
@@ -7178,7 +7618,75 @@ var _sfc_render$d = function render() {
|
|
|
7178
7618
|
},
|
|
7179
7619
|
expression: "internalFilterByProp(column.prop + '_to').value\n "
|
|
7180
7620
|
}
|
|
7181
|
-
})], 1)]) : column.type == '
|
|
7621
|
+
})], 1)]) : column.type == 'number' || column.type == 'money' || column.type == 'price' ? _c('div', {
|
|
7622
|
+
staticClass: "row"
|
|
7623
|
+
}, [_c('div', {
|
|
7624
|
+
staticClass: "col-6"
|
|
7625
|
+
}, [_c('input', {
|
|
7626
|
+
directives: [{
|
|
7627
|
+
name: "model",
|
|
7628
|
+
rawName: "v-model.number",
|
|
7629
|
+
value: _vm.internalFilterByProp(column.prop + '_from').value,
|
|
7630
|
+
expression: "internalFilterByProp(column.prop + '_from').value",
|
|
7631
|
+
modifiers: {
|
|
7632
|
+
"number": true
|
|
7633
|
+
}
|
|
7634
|
+
}],
|
|
7635
|
+
staticClass: "form-control form-control-md p-2",
|
|
7636
|
+
attrs: {
|
|
7637
|
+
"type": "number",
|
|
7638
|
+
"step": column.type == 'money' || column.type == 'price' ? '0.01' : '1',
|
|
7639
|
+
"placeholder": "Desde"
|
|
7640
|
+
},
|
|
7641
|
+
domProps: {
|
|
7642
|
+
"value": _vm.internalFilterByProp(column.prop + '_from').value
|
|
7643
|
+
},
|
|
7644
|
+
on: {
|
|
7645
|
+
"change": function change($event) {
|
|
7646
|
+
return _vm.onChangeFilter($event);
|
|
7647
|
+
},
|
|
7648
|
+
"input": function input($event) {
|
|
7649
|
+
if ($event.target.composing) return;
|
|
7650
|
+
_vm.$set(_vm.internalFilterByProp(column.prop + '_from'), "value", _vm._n($event.target.value));
|
|
7651
|
+
},
|
|
7652
|
+
"blur": function blur($event) {
|
|
7653
|
+
return _vm.$forceUpdate();
|
|
7654
|
+
}
|
|
7655
|
+
}
|
|
7656
|
+
})]), _c('div', {
|
|
7657
|
+
staticClass: "col-6"
|
|
7658
|
+
}, [_c('input', {
|
|
7659
|
+
directives: [{
|
|
7660
|
+
name: "model",
|
|
7661
|
+
rawName: "v-model.number",
|
|
7662
|
+
value: _vm.internalFilterByProp(column.prop + '_to').value,
|
|
7663
|
+
expression: "internalFilterByProp(column.prop + '_to').value",
|
|
7664
|
+
modifiers: {
|
|
7665
|
+
"number": true
|
|
7666
|
+
}
|
|
7667
|
+
}],
|
|
7668
|
+
staticClass: "form-control form-control-md p-2",
|
|
7669
|
+
attrs: {
|
|
7670
|
+
"type": "number",
|
|
7671
|
+
"step": column.type == 'money' || column.type == 'price' ? '0.01' : '1',
|
|
7672
|
+
"placeholder": "Hasta"
|
|
7673
|
+
},
|
|
7674
|
+
domProps: {
|
|
7675
|
+
"value": _vm.internalFilterByProp(column.prop + '_to').value
|
|
7676
|
+
},
|
|
7677
|
+
on: {
|
|
7678
|
+
"change": function change($event) {
|
|
7679
|
+
return _vm.onChangeFilter($event);
|
|
7680
|
+
},
|
|
7681
|
+
"input": function input($event) {
|
|
7682
|
+
if ($event.target.composing) return;
|
|
7683
|
+
_vm.$set(_vm.internalFilterByProp(column.prop + '_to'), "value", _vm._n($event.target.value));
|
|
7684
|
+
},
|
|
7685
|
+
"blur": function blur($event) {
|
|
7686
|
+
return _vm.$forceUpdate();
|
|
7687
|
+
}
|
|
7688
|
+
}
|
|
7689
|
+
})])]) : column.type == 'state' && column.options && Array.isArray(column.options) ? _c('select', {
|
|
7182
7690
|
directives: [{
|
|
7183
7691
|
name: "model",
|
|
7184
7692
|
rawName: "v-model",
|
|
@@ -7210,10 +7718,10 @@ var _sfc_render$d = function render() {
|
|
|
7210
7718
|
return _c('option', {
|
|
7211
7719
|
key: indexo,
|
|
7212
7720
|
domProps: {
|
|
7213
|
-
"value": option.
|
|
7721
|
+
"value": option.value
|
|
7214
7722
|
}
|
|
7215
|
-
}, [_vm._v(" " + _vm._s(option.text
|
|
7216
|
-
})], 2) : column.type == 'array' &&
|
|
7723
|
+
}, [_vm._v(" " + _vm._s(option.text) + " ")]);
|
|
7724
|
+
})], 2) : column.type == 'array' && column.options && Array.isArray(column.options) ? _c('select', {
|
|
7217
7725
|
directives: [{
|
|
7218
7726
|
name: "model",
|
|
7219
7727
|
rawName: "v-model",
|
|
@@ -7245,9 +7753,9 @@ var _sfc_render$d = function render() {
|
|
|
7245
7753
|
return _c('option', {
|
|
7246
7754
|
key: indexo,
|
|
7247
7755
|
domProps: {
|
|
7248
|
-
"value": option.
|
|
7756
|
+
"value": option.value
|
|
7249
7757
|
}
|
|
7250
|
-
}, [_vm._v(" " + _vm._s(option.text
|
|
7758
|
+
}, [_vm._v(" " + _vm._s(option.text) + " ")]);
|
|
7251
7759
|
})], 2) : column.type == 'checkbox' ? _c('b-form-checkbox', {
|
|
7252
7760
|
attrs: {
|
|
7253
7761
|
"name": "select-all",
|
|
@@ -7308,19 +7816,26 @@ var _sfc_render$d = function render() {
|
|
|
7308
7816
|
on: {
|
|
7309
7817
|
"change": _vm.toggleAll
|
|
7310
7818
|
}
|
|
7311
|
-
})], 1) : _c('span', [_vm._v(_vm._s(column.label))]), _vm.isSortableColumn(column)
|
|
7312
|
-
staticClass: "sort-filter",
|
|
7819
|
+
})], 1) : _c('span', [_vm._v(_vm._s(column.label))]), _vm.isSortableColumn(column) ? _c('span', {
|
|
7820
|
+
staticClass: "sort-filter ml-1",
|
|
7821
|
+
class: {
|
|
7822
|
+
'sort-filter-visible': _vm.shouldShowSortIcon(column)
|
|
7823
|
+
},
|
|
7313
7824
|
on: {
|
|
7314
7825
|
"click": function click($event) {
|
|
7315
7826
|
return _vm.toggleSortFilter(column);
|
|
7316
7827
|
}
|
|
7317
7828
|
}
|
|
7318
|
-
}, [_vm.getSortIconDirection(column) === 'up' ? _c('b-icon-sort-up') : _vm.
|
|
7829
|
+
}, [_vm.getSortIconDirection(column) === 'up' ? _c('b-icon-sort-up') : _vm.getSortIconDirection(column) === 'down' ? _c('b-icon-sort-down') : _c('b-icon-sort-up', {
|
|
7830
|
+
staticStyle: {
|
|
7831
|
+
"visibility": "hidden"
|
|
7832
|
+
}
|
|
7833
|
+
})], 1) : _vm._e()], 2);
|
|
7319
7834
|
});
|
|
7320
7835
|
})], 2)]);
|
|
7321
7836
|
};
|
|
7322
7837
|
var _sfc_staticRenderFns$d = [];
|
|
7323
|
-
var __component__$d = /*#__PURE__*/normalizeComponent(_sfc_main$d, _sfc_render$d, _sfc_staticRenderFns$d, false, null, "
|
|
7838
|
+
var __component__$d = /*#__PURE__*/normalizeComponent(_sfc_main$d, _sfc_render$d, _sfc_staticRenderFns$d, false, null, "3de96e53", null, null);
|
|
7324
7839
|
var TableHeader = __component__$d.exports;function commonjsRequire(path) {
|
|
7325
7840
|
throw new Error('Could not dynamically require "' + path + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
|
|
7326
7841
|
}var moment$1 = {exports: {}};moment$1.exports;
|
|
@@ -13008,8 +13523,8 @@ var TableHeader = __component__$d.exports;function commonjsRequire(path) {
|
|
|
13008
13523
|
} (moment$1, moment$1.exports));
|
|
13009
13524
|
|
|
13010
13525
|
var momentExports = moment$1.exports;
|
|
13011
|
-
var moment = /*@__PURE__*/getDefaultExportFromCjs(momentExports);var css$
|
|
13012
|
-
n(css$
|
|
13526
|
+
var moment = /*@__PURE__*/getDefaultExportFromCjs(momentExports);var css$6 = "\r\n/* Fijar ancho de la columna de acciones */\n.actions-cell[data-v-e38a3192] {\r\n width: 1%;\r\n white-space: nowrap;\n}\n.actions-button-group[data-v-e38a3192] {\r\n display: inline-flex;\r\n flex-wrap: nowrap;\n}\n.actions-dropdown[data-v-e38a3192] {\r\n display: inline-block;\n}\r\n\r\n/* Asegurar que los botones no se expandan */\n.actions-button-group .btn[data-v-e38a3192] {\r\n flex-shrink: 0;\n}\r\n";
|
|
13527
|
+
n(css$6, {});var _sfc_main$c = {
|
|
13013
13528
|
name: 'TableCell',
|
|
13014
13529
|
props: {
|
|
13015
13530
|
column: Object,
|
|
@@ -13017,11 +13532,54 @@ n(css$5, {});var _sfc_main$c = {
|
|
|
13017
13532
|
index: Number,
|
|
13018
13533
|
columnIndex: Number
|
|
13019
13534
|
},
|
|
13020
|
-
inject: ['itemValue', 'getStateValue', 'getArrayValue', 'onCheckSelect', 'showItem', 'updateItem', 'removeItem', 'optionsLoaded'],
|
|
13535
|
+
inject: ['itemValue', 'getStateValue', 'getStateOptions', 'getStateBadgeVariant', 'getArrayValue', 'onCheckSelect', 'showItem', 'updateItem', 'removeItem', 'optionsLoaded'],
|
|
13021
13536
|
data: function data() {
|
|
13022
13537
|
return {
|
|
13023
13538
|
moment: moment
|
|
13024
13539
|
};
|
|
13540
|
+
},
|
|
13541
|
+
computed: {
|
|
13542
|
+
stateOptions: function stateOptions() {
|
|
13543
|
+
// Permitir usar opciones incluso si optionsLoaded es false, ya que getStateOptions normaliza internamente
|
|
13544
|
+
if (this.column.type === 'state' && this.column.options && Array.isArray(this.column.options)) {
|
|
13545
|
+
var itemVal = this.itemValue(this.column, this.item);
|
|
13546
|
+
var options = this.column.options;
|
|
13547
|
+
var result = this.getStateOptions(itemVal, options);
|
|
13548
|
+
return result;
|
|
13549
|
+
}
|
|
13550
|
+
return [];
|
|
13551
|
+
}
|
|
13552
|
+
},
|
|
13553
|
+
methods: {
|
|
13554
|
+
formatNumber: function formatNumber(value, column) {
|
|
13555
|
+
if (value === null || value === undefined || value === '') {
|
|
13556
|
+
return '';
|
|
13557
|
+
}
|
|
13558
|
+
var numValue = parseFloat(value);
|
|
13559
|
+
if (isNaN(numValue)) {
|
|
13560
|
+
return value;
|
|
13561
|
+
}
|
|
13562
|
+
var thousandsSep = column.thousandsSeparator || '.';
|
|
13563
|
+
var decimalSep = column.decimalSeparator || ',';
|
|
13564
|
+
var decimals = column.decimals !== undefined ? column.decimals : numValue % 1 === 0 ? 0 : 2;
|
|
13565
|
+
|
|
13566
|
+
// Formatear número con separadores
|
|
13567
|
+
var parts = numValue.toFixed(decimals).split('.');
|
|
13568
|
+
var integerPart = parts[0].replace(/\B(?=(\d{3})+(?!\d))/g, thousandsSep);
|
|
13569
|
+
var decimalPart = parts[1] || '';
|
|
13570
|
+
if (decimals > 0 && decimalPart) {
|
|
13571
|
+
return "".concat(integerPart).concat(decimalSep).concat(decimalPart);
|
|
13572
|
+
}
|
|
13573
|
+
return integerPart;
|
|
13574
|
+
},
|
|
13575
|
+
formatMoney: function formatMoney(value, column) {
|
|
13576
|
+
var formatted = this.formatNumber(value, column);
|
|
13577
|
+
if (formatted === '') {
|
|
13578
|
+
return '';
|
|
13579
|
+
}
|
|
13580
|
+
var symbol = column.symbol || '$';
|
|
13581
|
+
return "".concat(symbol).concat(formatted);
|
|
13582
|
+
}
|
|
13025
13583
|
}
|
|
13026
13584
|
};
|
|
13027
13585
|
var _sfc_render$c = function render() {
|
|
@@ -13069,7 +13627,15 @@ var _sfc_render$c = function render() {
|
|
|
13069
13627
|
},
|
|
13070
13628
|
expression: "item.selected"
|
|
13071
13629
|
}
|
|
13072
|
-
})], 1) : _vm.column.type == 'state'
|
|
13630
|
+
})], 1) : _vm.column.type == 'state' ? _c('span', [_vm.stateOptions.length > 0 ? _vm._l(_vm.stateOptions, function (option, optIndex) {
|
|
13631
|
+
return _c('b-badge', {
|
|
13632
|
+
key: optIndex,
|
|
13633
|
+
staticClass: "mr-1",
|
|
13634
|
+
attrs: {
|
|
13635
|
+
"variant": _vm.getStateBadgeVariant(option)
|
|
13636
|
+
}
|
|
13637
|
+
}, [_vm._v(" " + _vm._s(option.text) + " ")]);
|
|
13638
|
+
}) : _c('span', [_vm._v(" " + _vm._s(_vm.itemValue(_vm.column, _vm.item)) + " ")])], 2) : _vm.column.type == 'array' && _vm.optionsLoaded ? _c('span', [_vm._v(" " + _vm._s(_vm.getArrayValue(_vm.itemValue(_vm.column, _vm.item), _vm.column.displayProp, _vm.column.options)) + " ")]) : _vm.column.type == 'money' || _vm.column.type == 'price' ? _c('span', [_vm._v(" " + _vm._s(_vm.formatMoney(_vm.itemValue(_vm.column, _vm.item), _vm.column)) + " ")]) : _vm.column.type == 'number' && (_vm.column.thousandsSeparator || _vm.column.decimalSeparator || _vm.column.decimals !== undefined) ? _c('span', [_vm._v(" " + _vm._s(_vm.formatNumber(_vm.itemValue(_vm.column, _vm.item), _vm.column)) + " ")]) : _c('span', [_vm._v(" " + _vm._s(_vm.itemValue(_vm.column, _vm.item)) + " ")])];
|
|
13073
13639
|
}, {
|
|
13074
13640
|
"item": _vm.item,
|
|
13075
13641
|
"index": _vm.index,
|
|
@@ -13088,27 +13654,35 @@ var _sfc_render$c = function render() {
|
|
|
13088
13654
|
},
|
|
13089
13655
|
proxy: true
|
|
13090
13656
|
}], null, false, 4241371057)
|
|
13091
|
-
}, [_vm._t("
|
|
13092
|
-
return [
|
|
13093
|
-
|
|
13094
|
-
|
|
13095
|
-
|
|
13657
|
+
}, [_vm._t("rowActions", function () {
|
|
13658
|
+
return [_vm._t("rowAction", function () {
|
|
13659
|
+
return [_c('b-dropdown-item', {
|
|
13660
|
+
on: {
|
|
13661
|
+
"click": function click($event) {
|
|
13662
|
+
return _vm.showItem(_vm.item.id, _vm.index);
|
|
13663
|
+
}
|
|
13096
13664
|
}
|
|
13097
|
-
}
|
|
13098
|
-
|
|
13099
|
-
|
|
13100
|
-
|
|
13101
|
-
|
|
13665
|
+
}, [_c('b-icon-eye'), _vm._v(" Ver ")], 1), _c('b-dropdown-item', {
|
|
13666
|
+
on: {
|
|
13667
|
+
"click": function click($event) {
|
|
13668
|
+
return _vm.updateItem(_vm.item.id, _vm.index);
|
|
13669
|
+
}
|
|
13102
13670
|
}
|
|
13103
|
-
}
|
|
13104
|
-
|
|
13105
|
-
|
|
13106
|
-
|
|
13107
|
-
|
|
13108
|
-
|
|
13671
|
+
}, [_c('b-icon-pencil'), _vm._v(" Editar ")], 1), _c('b-dropdown-item', {
|
|
13672
|
+
staticClass: "text-danger",
|
|
13673
|
+
on: {
|
|
13674
|
+
"click": function click($event) {
|
|
13675
|
+
return _vm.removeItem(_vm.item.id, _vm.index);
|
|
13676
|
+
}
|
|
13109
13677
|
}
|
|
13110
|
-
}
|
|
13111
|
-
},
|
|
13678
|
+
}, [_c('b-icon-trash'), _vm._v(" Eliminar ")], 1)];
|
|
13679
|
+
}, {
|
|
13680
|
+
"item": _vm.item,
|
|
13681
|
+
"index": _vm.index,
|
|
13682
|
+
"showItem": _vm.showItem,
|
|
13683
|
+
"updateItem": _vm.updateItem,
|
|
13684
|
+
"removeItem": _vm.removeItem
|
|
13685
|
+
})];
|
|
13112
13686
|
}, {
|
|
13113
13687
|
"item": _vm.item,
|
|
13114
13688
|
"index": _vm.index,
|
|
@@ -13117,35 +13691,43 @@ var _sfc_render$c = function render() {
|
|
|
13117
13691
|
"removeItem": _vm.removeItem
|
|
13118
13692
|
})], 2) : _vm.column.type == 'actions' ? _c('b-button-group', {
|
|
13119
13693
|
staticClass: "actions-button-group"
|
|
13120
|
-
}, [_vm._t("
|
|
13121
|
-
return [
|
|
13122
|
-
|
|
13123
|
-
|
|
13124
|
-
|
|
13125
|
-
|
|
13126
|
-
|
|
13127
|
-
|
|
13694
|
+
}, [_vm._t("rowActions", function () {
|
|
13695
|
+
return [_vm._t("rowAction", function () {
|
|
13696
|
+
return [_c('b-button', {
|
|
13697
|
+
attrs: {
|
|
13698
|
+
"variant": "primary"
|
|
13699
|
+
},
|
|
13700
|
+
on: {
|
|
13701
|
+
"click": function click($event) {
|
|
13702
|
+
return _vm.showItem(_vm.item.id, _vm.index);
|
|
13703
|
+
}
|
|
13128
13704
|
}
|
|
13129
|
-
}
|
|
13130
|
-
|
|
13131
|
-
|
|
13132
|
-
|
|
13133
|
-
|
|
13134
|
-
|
|
13135
|
-
|
|
13136
|
-
|
|
13705
|
+
}, [_c('b-icon-eye')], 1), _c('b-button', {
|
|
13706
|
+
attrs: {
|
|
13707
|
+
"variant": "secondary"
|
|
13708
|
+
},
|
|
13709
|
+
on: {
|
|
13710
|
+
"click": function click($event) {
|
|
13711
|
+
return _vm.updateItem(_vm.item.id, _vm.index);
|
|
13712
|
+
}
|
|
13137
13713
|
}
|
|
13138
|
-
}
|
|
13139
|
-
|
|
13140
|
-
|
|
13141
|
-
|
|
13142
|
-
|
|
13143
|
-
|
|
13144
|
-
|
|
13145
|
-
|
|
13714
|
+
}, [_c('b-icon-pencil')], 1), _c('b-button', {
|
|
13715
|
+
attrs: {
|
|
13716
|
+
"variant": "danger"
|
|
13717
|
+
},
|
|
13718
|
+
on: {
|
|
13719
|
+
"click": function click($event) {
|
|
13720
|
+
return _vm.removeItem(_vm.item.id, _vm.index);
|
|
13721
|
+
}
|
|
13146
13722
|
}
|
|
13147
|
-
}
|
|
13148
|
-
},
|
|
13723
|
+
}, [_c('b-icon-trash')], 1)];
|
|
13724
|
+
}, {
|
|
13725
|
+
"item": _vm.item,
|
|
13726
|
+
"index": _vm.index,
|
|
13727
|
+
"showItem": _vm.showItem,
|
|
13728
|
+
"updateItem": _vm.updateItem,
|
|
13729
|
+
"removeItem": _vm.removeItem
|
|
13730
|
+
})];
|
|
13149
13731
|
}, {
|
|
13150
13732
|
"item": _vm.item,
|
|
13151
13733
|
"index": _vm.index,
|
|
@@ -13155,7 +13737,7 @@ var _sfc_render$c = function render() {
|
|
|
13155
13737
|
})], 2) : _vm._e()], 2);
|
|
13156
13738
|
};
|
|
13157
13739
|
var _sfc_staticRenderFns$c = [];
|
|
13158
|
-
var __component__$c = /*#__PURE__*/normalizeComponent(_sfc_main$c, _sfc_render$c, _sfc_staticRenderFns$c, false, null, "
|
|
13740
|
+
var __component__$c = /*#__PURE__*/normalizeComponent(_sfc_main$c, _sfc_render$c, _sfc_staticRenderFns$c, false, null, "e38a3192", null, null);
|
|
13159
13741
|
var TableCell = __component__$c.exports;var _sfc_main$b = {
|
|
13160
13742
|
name: 'TableRow',
|
|
13161
13743
|
components: {
|
|
@@ -13196,7 +13778,15 @@ var _sfc_render$b = function render() {
|
|
|
13196
13778
|
"item": _vm.item,
|
|
13197
13779
|
"index": _vm.index,
|
|
13198
13780
|
"columnIndex": indexc
|
|
13199
|
-
}
|
|
13781
|
+
},
|
|
13782
|
+
scopedSlots: _vm._u([_vm._l(_vm.$scopedSlots, function (slot, name) {
|
|
13783
|
+
return {
|
|
13784
|
+
key: name,
|
|
13785
|
+
fn: function fn(slotProps) {
|
|
13786
|
+
return [_vm._t(name, null, null, slotProps)];
|
|
13787
|
+
}
|
|
13788
|
+
};
|
|
13789
|
+
})], null, true)
|
|
13200
13790
|
});
|
|
13201
13791
|
});
|
|
13202
13792
|
}, {
|
|
@@ -13212,19 +13802,46 @@ var TableRow = __component__$b.exports;var _sfc_main$a = {
|
|
|
13212
13802
|
TableHeader: TableHeader,
|
|
13213
13803
|
TableRow: TableRow
|
|
13214
13804
|
},
|
|
13215
|
-
inject: ['displayMode', 'displayModes', 'tableContainerClass', 'tableClass', 'items', 'draggableGroup', 'orderable', 'draggableOptions', 'itemsList', 'grouped', 'loading', 'infiniteScroll', 'messageEmptyResults', 'onSort', 'onDraggableAdded', 'onDraggableChange'],
|
|
13805
|
+
inject: ['displayMode', 'displayModes', 'tableContainerClass', 'tableClass', 'items', 'draggableGroup', 'orderable', 'draggableOptions', 'itemsList', 'grouped', 'loading', 'firstLoad', 'infiniteScroll', 'messageEmptyResults', 'messageLoading', 'onSort', 'onDraggableAdded', 'onDraggableChange'],
|
|
13216
13806
|
data: function data() {
|
|
13217
13807
|
return {
|
|
13218
13808
|
drag: false
|
|
13219
13809
|
};
|
|
13810
|
+
},
|
|
13811
|
+
computed: {
|
|
13812
|
+
currentDisplayMode: function currentDisplayMode() {
|
|
13813
|
+
if (!this.displayMode) return 1;
|
|
13814
|
+
if (this.displayMode.value !== undefined) {
|
|
13815
|
+
return this.displayMode.value;
|
|
13816
|
+
}
|
|
13817
|
+
if (typeof this.displayMode === 'function') {
|
|
13818
|
+
return this.displayMode();
|
|
13819
|
+
}
|
|
13820
|
+
return this.displayMode;
|
|
13821
|
+
},
|
|
13822
|
+
loadingValue: function loadingValue() {
|
|
13823
|
+
return this.loading && this.loading.value !== undefined ? this.loading.value : this.loading;
|
|
13824
|
+
},
|
|
13825
|
+
firstLoadValue: function firstLoadValue() {
|
|
13826
|
+
return this.firstLoad && this.firstLoad.value !== undefined ? this.firstLoad.value : this.firstLoad;
|
|
13827
|
+
}
|
|
13220
13828
|
}
|
|
13221
13829
|
};
|
|
13222
13830
|
var _sfc_render$a = function render() {
|
|
13223
13831
|
var _vm = this,
|
|
13224
13832
|
_c = _vm._self._c;
|
|
13225
|
-
return _vm.
|
|
13833
|
+
return _vm.currentDisplayMode == _vm.displayModes.MODE_TABLE ? _c('div', {
|
|
13226
13834
|
class: ['table-responsive', _vm.tableContainerClass]
|
|
13227
|
-
}, [_c('
|
|
13835
|
+
}, [_vm.loadingValue || !_vm.firstLoadValue ? _c('div', {
|
|
13836
|
+
staticClass: "text-center p-5"
|
|
13837
|
+
}, [_c('b-spinner', {
|
|
13838
|
+
attrs: {
|
|
13839
|
+
"variant": "primary",
|
|
13840
|
+
"label": "Cargando..."
|
|
13841
|
+
}
|
|
13842
|
+
}), _c('p', {
|
|
13843
|
+
staticClass: "mt-2"
|
|
13844
|
+
}, [_vm._v(_vm._s(_vm.messageLoading))])], 1) : [_c('table', {
|
|
13228
13845
|
class: ['table table-hover table-striped w-100', _vm.tableClass]
|
|
13229
13846
|
}, [_c('TableHeader'), _c('draggable', {
|
|
13230
13847
|
attrs: {
|
|
@@ -13258,11 +13875,19 @@ var _sfc_render$a = function render() {
|
|
|
13258
13875
|
"item": item,
|
|
13259
13876
|
"index": index,
|
|
13260
13877
|
"grouped": _vm.grouped
|
|
13261
|
-
}
|
|
13878
|
+
},
|
|
13879
|
+
scopedSlots: _vm._u([_vm._l(_vm.$scopedSlots, function (slot, name) {
|
|
13880
|
+
return {
|
|
13881
|
+
key: name,
|
|
13882
|
+
fn: function fn(slotProps) {
|
|
13883
|
+
return [_vm._t(name, null, null, slotProps)];
|
|
13884
|
+
}
|
|
13885
|
+
};
|
|
13886
|
+
})], null, true)
|
|
13262
13887
|
});
|
|
13263
|
-
}), 1)], 1),
|
|
13888
|
+
}), 1)], 1), _vm.firstLoadValue && _vm.itemsList && _vm.itemsList.length == 0 && !_vm.infiniteScroll ? _c('p', {
|
|
13264
13889
|
staticClass: "p-3"
|
|
13265
|
-
}, [_vm._v(" " + _vm._s(_vm.messageEmptyResults) + " ")]) : _vm._e()]) : _vm._e();
|
|
13890
|
+
}, [_vm._v(" " + _vm._s(_vm.messageEmptyResults) + " ")]) : _vm._e()]], 2) : _vm._e();
|
|
13266
13891
|
};
|
|
13267
13892
|
var _sfc_staticRenderFns$a = [];
|
|
13268
13893
|
var __component__$a = /*#__PURE__*/normalizeComponent(_sfc_main$a, _sfc_render$a, _sfc_staticRenderFns$a, false, null, null, null, null);
|
|
@@ -13515,10 +14140,49 @@ if (typeof window !== 'undefined' && window.Vue) {
|
|
|
13515
14140
|
cardHideFooter: Boolean,
|
|
13516
14141
|
itemValue: Function,
|
|
13517
14142
|
getStateValue: Function,
|
|
14143
|
+
getStateOptions: Function,
|
|
14144
|
+
getStateBadgeVariant: Function,
|
|
13518
14145
|
getArrayValue: Function,
|
|
13519
14146
|
showItem: Function,
|
|
13520
14147
|
updateItem: Function,
|
|
13521
14148
|
removeItem: Function
|
|
14149
|
+
},
|
|
14150
|
+
methods: {
|
|
14151
|
+
getStateOptionsForColumn: function getStateOptionsForColumn(column, item) {
|
|
14152
|
+
if (column.type === 'state' && column.options) {
|
|
14153
|
+
return this.getStateOptions(this.itemValue(column, item), column.options);
|
|
14154
|
+
}
|
|
14155
|
+
return [];
|
|
14156
|
+
},
|
|
14157
|
+
formatNumber: function formatNumber(value, column) {
|
|
14158
|
+
if (value === null || value === undefined || value === '') {
|
|
14159
|
+
return '';
|
|
14160
|
+
}
|
|
14161
|
+
var numValue = parseFloat(value);
|
|
14162
|
+
if (isNaN(numValue)) {
|
|
14163
|
+
return value;
|
|
14164
|
+
}
|
|
14165
|
+
var thousandsSep = column.thousandsSeparator || '.';
|
|
14166
|
+
var decimalSep = column.decimalSeparator || ',';
|
|
14167
|
+
var decimals = column.decimals !== undefined ? column.decimals : numValue % 1 === 0 ? 0 : 2;
|
|
14168
|
+
|
|
14169
|
+
// Formatear número con separadores
|
|
14170
|
+
var parts = numValue.toFixed(decimals).split('.');
|
|
14171
|
+
var integerPart = parts[0].replace(/\B(?=(\d{3})+(?!\d))/g, thousandsSep);
|
|
14172
|
+
var decimalPart = parts[1] || '';
|
|
14173
|
+
if (decimals > 0 && decimalPart) {
|
|
14174
|
+
return "".concat(integerPart).concat(decimalSep).concat(decimalPart);
|
|
14175
|
+
}
|
|
14176
|
+
return integerPart;
|
|
14177
|
+
},
|
|
14178
|
+
formatMoney: function formatMoney(value, column) {
|
|
14179
|
+
var formatted = this.formatNumber(value, column);
|
|
14180
|
+
if (formatted === '') {
|
|
14181
|
+
return '';
|
|
14182
|
+
}
|
|
14183
|
+
var symbol = column.symbol || '$';
|
|
14184
|
+
return "".concat(symbol).concat(formatted);
|
|
14185
|
+
}
|
|
13522
14186
|
}
|
|
13523
14187
|
};
|
|
13524
14188
|
var _sfc_render$9 = function render() {
|
|
@@ -13537,35 +14201,43 @@ var _sfc_render$9 = function render() {
|
|
|
13537
14201
|
scopedSlots: _vm._u([{
|
|
13538
14202
|
key: "footer",
|
|
13539
14203
|
fn: function fn() {
|
|
13540
|
-
return [_c('b-button-group', [_vm._t("
|
|
13541
|
-
return [
|
|
13542
|
-
|
|
13543
|
-
|
|
13544
|
-
|
|
13545
|
-
|
|
13546
|
-
|
|
13547
|
-
|
|
14204
|
+
return [_c('b-button-group', [_vm._t("rowActions", function () {
|
|
14205
|
+
return [_vm._t("rowAction", function () {
|
|
14206
|
+
return [_c('b-button', {
|
|
14207
|
+
attrs: {
|
|
14208
|
+
"variant": "primary"
|
|
14209
|
+
},
|
|
14210
|
+
on: {
|
|
14211
|
+
"click": function click($event) {
|
|
14212
|
+
return _vm.showItem(_vm.item.id, _vm.index);
|
|
14213
|
+
}
|
|
13548
14214
|
}
|
|
13549
|
-
}
|
|
13550
|
-
|
|
13551
|
-
|
|
13552
|
-
|
|
13553
|
-
|
|
13554
|
-
|
|
13555
|
-
|
|
13556
|
-
|
|
14215
|
+
}, [_c('b-icon-eye')], 1), _c('b-button', {
|
|
14216
|
+
attrs: {
|
|
14217
|
+
"variant": "secondary"
|
|
14218
|
+
},
|
|
14219
|
+
on: {
|
|
14220
|
+
"click": function click($event) {
|
|
14221
|
+
return _vm.updateItem(_vm.item.id, _vm.index);
|
|
14222
|
+
}
|
|
13557
14223
|
}
|
|
13558
|
-
}
|
|
13559
|
-
|
|
13560
|
-
|
|
13561
|
-
|
|
13562
|
-
|
|
13563
|
-
|
|
13564
|
-
|
|
13565
|
-
|
|
14224
|
+
}, [_c('b-icon-pencil')], 1), _c('b-button', {
|
|
14225
|
+
attrs: {
|
|
14226
|
+
"variant": "danger"
|
|
14227
|
+
},
|
|
14228
|
+
on: {
|
|
14229
|
+
"click": function click($event) {
|
|
14230
|
+
return _vm.removeItem(_vm.item.id, _vm.index);
|
|
14231
|
+
}
|
|
13566
14232
|
}
|
|
13567
|
-
}
|
|
13568
|
-
},
|
|
14233
|
+
}, [_c('b-icon-trash')], 1)];
|
|
14234
|
+
}, {
|
|
14235
|
+
"item": _vm.item,
|
|
14236
|
+
"index": _vm.index,
|
|
14237
|
+
"showItem": _vm.showItem,
|
|
14238
|
+
"updateItem": _vm.updateItem,
|
|
14239
|
+
"removeItem": _vm.removeItem
|
|
14240
|
+
})];
|
|
13569
14241
|
}, {
|
|
13570
14242
|
"item": _vm.item,
|
|
13571
14243
|
"index": _vm.index,
|
|
@@ -13589,7 +14261,15 @@ var _sfc_render$9 = function render() {
|
|
|
13589
14261
|
attrs: {
|
|
13590
14262
|
"variant": "danger"
|
|
13591
14263
|
}
|
|
13592
|
-
}, [_c('b-icon-x-circle')], 1)], 1) : column.type === 'date' ? _c('span', [_vm._v(" " + _vm._s(_vm.itemValue(column, _vm.item)) + " ")]) : column.type === 'state' ? _c('span', [_vm.
|
|
14264
|
+
}, [_c('b-icon-x-circle')], 1)], 1) : column.type === 'date' ? _c('span', [_vm._v(" " + _vm._s(_vm.itemValue(column, _vm.item)) + " ")]) : column.type === 'state' ? _c('span', [_vm.getStateOptionsForColumn(column, _vm.item).length > 0 ? _vm._l(_vm.getStateOptionsForColumn(column, _vm.item), function (option, optIndex) {
|
|
14265
|
+
return _c('b-badge', {
|
|
14266
|
+
key: optIndex,
|
|
14267
|
+
staticClass: "mr-1",
|
|
14268
|
+
attrs: {
|
|
14269
|
+
"variant": _vm.getStateBadgeVariant(option)
|
|
14270
|
+
}
|
|
14271
|
+
}, [_vm._v(" " + _vm._s(option.text) + " ")]);
|
|
14272
|
+
}) : _c('span', [_vm._v(" " + _vm._s(_vm.itemValue(column, _vm.item)) + " ")])], 2) : column.type === 'array' ? _c('span', [_vm._v(" " + _vm._s(_vm.getArrayValue(_vm.itemValue(column, _vm.item), column.displayProp, column.options)) + " ")]) : column.type === 'money' || column.type === 'price' ? _c('span', [_vm._v(" " + _vm._s(_vm.formatMoney(_vm.itemValue(column, _vm.item), column)) + " ")]) : column.type === 'number' && (column.thousandsSeparator || column.decimalSeparator || column.decimals !== undefined) ? _c('span', [_vm._v(" " + _vm._s(_vm.formatNumber(_vm.itemValue(column, _vm.item), column)) + " ")]) : _c('span', [_vm._v(" " + _vm._s(_vm.itemValue(column, _vm.item)) + " ")])];
|
|
13593
14273
|
}, {
|
|
13594
14274
|
"item": _vm.item,
|
|
13595
14275
|
"index": _vm.index,
|
|
@@ -13611,17 +14291,44 @@ var _sfc_main$8 = {
|
|
|
13611
14291
|
draggable: draggable,
|
|
13612
14292
|
ItemCard: ItemCard
|
|
13613
14293
|
},
|
|
13614
|
-
inject: ['displayMode', 'displayModes', 'items', 'draggableGroup', 'orderable', 'draggableOptions', 'itemsList', 'colLg', 'colXl', 'colMd', 'colSm', 'colXs', 'columns', 'cardClass', 'cardHideFooter', 'itemValue', 'getStateValue', 'getArrayValue', 'showItem', 'updateItem', 'removeItem', 'loading', 'infiniteScroll', 'messageEmptyResults', 'onSort', 'onDraggableAdded', 'onDraggableChange'],
|
|
14294
|
+
inject: ['displayMode', 'displayModes', 'items', 'draggableGroup', 'orderable', 'draggableOptions', 'itemsList', 'colLg', 'colXl', 'colMd', 'colSm', 'colXs', 'columns', 'cardClass', 'cardHideFooter', 'itemValue', 'getStateValue', 'getStateOptions', 'getStateBadgeVariant', 'getArrayValue', 'showItem', 'updateItem', 'removeItem', 'loading', 'firstLoad', 'infiniteScroll', 'messageEmptyResults', 'messageLoading', 'onSort', 'onDraggableAdded', 'onDraggableChange'],
|
|
13615
14295
|
data: function data() {
|
|
13616
14296
|
return {
|
|
13617
14297
|
drag: false
|
|
13618
14298
|
};
|
|
14299
|
+
},
|
|
14300
|
+
computed: {
|
|
14301
|
+
currentDisplayMode: function currentDisplayMode() {
|
|
14302
|
+
if (!this.displayMode) return 1;
|
|
14303
|
+
if (this.displayMode.value !== undefined) {
|
|
14304
|
+
return this.displayMode.value;
|
|
14305
|
+
}
|
|
14306
|
+
if (typeof this.displayMode === 'function') {
|
|
14307
|
+
return this.displayMode();
|
|
14308
|
+
}
|
|
14309
|
+
return this.displayMode;
|
|
14310
|
+
},
|
|
14311
|
+
loadingValue: function loadingValue() {
|
|
14312
|
+
return this.loading && this.loading.value !== undefined ? this.loading.value : this.loading;
|
|
14313
|
+
},
|
|
14314
|
+
firstLoadValue: function firstLoadValue() {
|
|
14315
|
+
return this.firstLoad && this.firstLoad.value !== undefined ? this.firstLoad.value : this.firstLoad;
|
|
14316
|
+
}
|
|
13619
14317
|
}
|
|
13620
14318
|
};
|
|
13621
14319
|
var _sfc_render$8 = function render() {
|
|
13622
14320
|
var _vm = this,
|
|
13623
14321
|
_c = _vm._self._c;
|
|
13624
|
-
return _vm.
|
|
14322
|
+
return _vm.currentDisplayMode == _vm.displayModes.MODE_CARDS ? _c('div', [_vm.loadingValue || !_vm.firstLoadValue ? _c('div', {
|
|
14323
|
+
staticClass: "text-center p-5"
|
|
14324
|
+
}, [_c('b-spinner', {
|
|
14325
|
+
attrs: {
|
|
14326
|
+
"variant": "primary",
|
|
14327
|
+
"label": "Cargando..."
|
|
14328
|
+
}
|
|
14329
|
+
}), _c('p', {
|
|
14330
|
+
staticClass: "mt-2"
|
|
14331
|
+
}, [_vm._v(_vm._s(_vm.messageLoading))])], 1) : [_c('draggable', {
|
|
13625
14332
|
attrs: {
|
|
13626
14333
|
"group": _vm.draggableGroup,
|
|
13627
14334
|
"draggable": _vm.orderable ? '.item' : '.none',
|
|
@@ -13680,23 +14387,33 @@ var _sfc_render$8 = function render() {
|
|
|
13680
14387
|
"cardHideFooter": _vm.cardHideFooter,
|
|
13681
14388
|
"itemValue": _vm.itemValue,
|
|
13682
14389
|
"getStateValue": _vm.getStateValue,
|
|
14390
|
+
"getStateOptions": _vm.getStateOptions,
|
|
14391
|
+
"getStateBadgeVariant": _vm.getStateBadgeVariant,
|
|
13683
14392
|
"getArrayValue": _vm.getArrayValue,
|
|
13684
14393
|
"showItem": _vm.showItem,
|
|
13685
14394
|
"updateItem": _vm.updateItem,
|
|
13686
14395
|
"removeItem": _vm.removeItem
|
|
13687
|
-
}
|
|
14396
|
+
},
|
|
14397
|
+
scopedSlots: _vm._u([_vm._l(_vm.$scopedSlots, function (slot, name) {
|
|
14398
|
+
return {
|
|
14399
|
+
key: name,
|
|
14400
|
+
fn: function fn(slotProps) {
|
|
14401
|
+
return [_vm._t(name, null, null, slotProps)];
|
|
14402
|
+
}
|
|
14403
|
+
};
|
|
14404
|
+
})], null, true)
|
|
13688
14405
|
})];
|
|
13689
14406
|
}, {
|
|
13690
14407
|
"item": item
|
|
13691
14408
|
})], 2);
|
|
13692
|
-
}), 0)], 1),
|
|
14409
|
+
}), 0)], 1), _vm.firstLoadValue && _vm.itemsList && _vm.itemsList.length == 0 && !_vm.infiniteScroll ? _c('p', {
|
|
13693
14410
|
staticClass: "p-3"
|
|
13694
|
-
}, [_vm._v(" " + _vm._s(_vm.messageEmptyResults) + " ")]) : _vm._e()],
|
|
14411
|
+
}, [_vm._v(" " + _vm._s(_vm.messageEmptyResults) + " ")]) : _vm._e()]], 2) : _vm._e();
|
|
13695
14412
|
};
|
|
13696
14413
|
var _sfc_staticRenderFns$8 = [];
|
|
13697
14414
|
var __component__$8 = /*#__PURE__*/normalizeComponent(_sfc_main$8, _sfc_render$8, _sfc_staticRenderFns$8, false, null, null, null, null);
|
|
13698
|
-
var CrudCards = __component__$8.exports;var css$
|
|
13699
|
-
n(css$
|
|
14415
|
+
var CrudCards = __component__$8.exports;var css$5 = "\n.kanban-card[data-v-ad923ee1] {\r\n background: #ffffff;\r\n border-radius: 4px;\r\n padding: 0.5rem;\r\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);\r\n cursor: grab;\r\n transition: box-shadow 0.2s ease;\n}\n.kanban-card[data-v-ad923ee1]:hover {\r\n box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);\n}\n.kanban-card[data-v-ad923ee1]:active {\r\n cursor: grabbing;\n}\n.card-crud[data-v-ad923ee1] {\r\n border: 1px solid #e1e5e9;\n}\n.card-crud .card-title[data-v-ad923ee1] {\r\n font-size: 0.9rem;\r\n margin-bottom: 0.5rem;\n}\n.card-crud .card-text[data-v-ad923ee1] {\r\n font-size: 0.8rem;\r\n margin-bottom: 0.25rem;\n}\r\n";
|
|
14416
|
+
n(css$5, {});var _sfc_main$7 = {
|
|
13700
14417
|
name: 'KanbanCard',
|
|
13701
14418
|
props: {
|
|
13702
14419
|
item: Object,
|
|
@@ -13706,10 +14423,49 @@ n(css$4, {});var _sfc_main$7 = {
|
|
|
13706
14423
|
cardHideFooter: Boolean,
|
|
13707
14424
|
itemValue: Function,
|
|
13708
14425
|
getStateValue: Function,
|
|
14426
|
+
getStateOptions: Function,
|
|
14427
|
+
getStateBadgeVariant: Function,
|
|
13709
14428
|
getArrayValue: Function,
|
|
13710
14429
|
showItem: Function,
|
|
13711
14430
|
updateItem: Function,
|
|
13712
14431
|
removeItem: Function
|
|
14432
|
+
},
|
|
14433
|
+
methods: {
|
|
14434
|
+
getStateOptionsForColumn: function getStateOptionsForColumn(column, item) {
|
|
14435
|
+
if (column.type === 'state' && column.options) {
|
|
14436
|
+
return this.getStateOptions(this.itemValue(column, item), column.options);
|
|
14437
|
+
}
|
|
14438
|
+
return [];
|
|
14439
|
+
},
|
|
14440
|
+
formatNumber: function formatNumber(value, column) {
|
|
14441
|
+
if (value === null || value === undefined || value === '') {
|
|
14442
|
+
return '';
|
|
14443
|
+
}
|
|
14444
|
+
var numValue = parseFloat(value);
|
|
14445
|
+
if (isNaN(numValue)) {
|
|
14446
|
+
return value;
|
|
14447
|
+
}
|
|
14448
|
+
var thousandsSep = column.thousandsSeparator || '.';
|
|
14449
|
+
var decimalSep = column.decimalSeparator || ',';
|
|
14450
|
+
var decimals = column.decimals !== undefined ? column.decimals : numValue % 1 === 0 ? 0 : 2;
|
|
14451
|
+
|
|
14452
|
+
// Formatear número con separadores
|
|
14453
|
+
var parts = numValue.toFixed(decimals).split('.');
|
|
14454
|
+
var integerPart = parts[0].replace(/\B(?=(\d{3})+(?!\d))/g, thousandsSep);
|
|
14455
|
+
var decimalPart = parts[1] || '';
|
|
14456
|
+
if (decimals > 0 && decimalPart) {
|
|
14457
|
+
return "".concat(integerPart).concat(decimalSep).concat(decimalPart);
|
|
14458
|
+
}
|
|
14459
|
+
return integerPart;
|
|
14460
|
+
},
|
|
14461
|
+
formatMoney: function formatMoney(value, column) {
|
|
14462
|
+
var formatted = this.formatNumber(value, column);
|
|
14463
|
+
if (formatted === '') {
|
|
14464
|
+
return '';
|
|
14465
|
+
}
|
|
14466
|
+
var symbol = column.symbol || '$';
|
|
14467
|
+
return "".concat(symbol).concat(formatted);
|
|
14468
|
+
}
|
|
13713
14469
|
}
|
|
13714
14470
|
};
|
|
13715
14471
|
var _sfc_render$7 = function render() {
|
|
@@ -13732,35 +14488,43 @@ var _sfc_render$7 = function render() {
|
|
|
13732
14488
|
attrs: {
|
|
13733
14489
|
"size": "sm"
|
|
13734
14490
|
}
|
|
13735
|
-
}, [_vm._t("
|
|
13736
|
-
return [
|
|
13737
|
-
|
|
13738
|
-
|
|
13739
|
-
|
|
13740
|
-
|
|
13741
|
-
|
|
13742
|
-
|
|
14491
|
+
}, [_vm._t("rowActions", function () {
|
|
14492
|
+
return [_vm._t("rowAction", function () {
|
|
14493
|
+
return [_c('b-button', {
|
|
14494
|
+
attrs: {
|
|
14495
|
+
"variant": "primary"
|
|
14496
|
+
},
|
|
14497
|
+
on: {
|
|
14498
|
+
"click": function click($event) {
|
|
14499
|
+
return _vm.showItem(_vm.item.id, _vm.index);
|
|
14500
|
+
}
|
|
13743
14501
|
}
|
|
13744
|
-
}
|
|
13745
|
-
|
|
13746
|
-
|
|
13747
|
-
|
|
13748
|
-
|
|
13749
|
-
|
|
13750
|
-
|
|
13751
|
-
|
|
14502
|
+
}, [_c('b-icon-eye')], 1), _c('b-button', {
|
|
14503
|
+
attrs: {
|
|
14504
|
+
"variant": "secondary"
|
|
14505
|
+
},
|
|
14506
|
+
on: {
|
|
14507
|
+
"click": function click($event) {
|
|
14508
|
+
return _vm.updateItem(_vm.item.id, _vm.index);
|
|
14509
|
+
}
|
|
13752
14510
|
}
|
|
13753
|
-
}
|
|
13754
|
-
|
|
13755
|
-
|
|
13756
|
-
|
|
13757
|
-
|
|
13758
|
-
|
|
13759
|
-
|
|
13760
|
-
|
|
14511
|
+
}, [_c('b-icon-pencil')], 1), _c('b-button', {
|
|
14512
|
+
attrs: {
|
|
14513
|
+
"variant": "danger"
|
|
14514
|
+
},
|
|
14515
|
+
on: {
|
|
14516
|
+
"click": function click($event) {
|
|
14517
|
+
return _vm.removeItem(_vm.item.id, _vm.index);
|
|
14518
|
+
}
|
|
13761
14519
|
}
|
|
13762
|
-
}
|
|
13763
|
-
},
|
|
14520
|
+
}, [_c('b-icon-trash')], 1)];
|
|
14521
|
+
}, {
|
|
14522
|
+
"item": _vm.item,
|
|
14523
|
+
"index": _vm.index,
|
|
14524
|
+
"showItem": _vm.showItem,
|
|
14525
|
+
"updateItem": _vm.updateItem,
|
|
14526
|
+
"removeItem": _vm.removeItem
|
|
14527
|
+
})];
|
|
13764
14528
|
}, {
|
|
13765
14529
|
"item": _vm.item,
|
|
13766
14530
|
"index": _vm.index,
|
|
@@ -13788,7 +14552,15 @@ var _sfc_render$7 = function render() {
|
|
|
13788
14552
|
attrs: {
|
|
13789
14553
|
"variant": "danger"
|
|
13790
14554
|
}
|
|
13791
|
-
}, [_c('b-icon-x-circle')], 1)], 1) : column.type === 'date' ? _c('span', [_vm._v(" " + _vm._s(_vm.itemValue(column, _vm.item)) + " ")]) : column.type === 'state' ? _c('span', [_vm.
|
|
14555
|
+
}, [_c('b-icon-x-circle')], 1)], 1) : column.type === 'date' ? _c('span', [_vm._v(" " + _vm._s(_vm.itemValue(column, _vm.item)) + " ")]) : column.type === 'state' ? _c('span', [_vm.getStateOptionsForColumn(column, _vm.item).length > 0 ? _vm._l(_vm.getStateOptionsForColumn(column, _vm.item), function (option, optIndex) {
|
|
14556
|
+
return _c('b-badge', {
|
|
14557
|
+
key: optIndex,
|
|
14558
|
+
staticClass: "mr-1",
|
|
14559
|
+
attrs: {
|
|
14560
|
+
"variant": _vm.getStateBadgeVariant(option)
|
|
14561
|
+
}
|
|
14562
|
+
}, [_vm._v(" " + _vm._s(option.text) + " ")]);
|
|
14563
|
+
}) : _c('span', [_vm._v(" " + _vm._s(_vm.itemValue(column, _vm.item)) + " ")])], 2) : column.type === 'array' ? _c('span', [_vm._v(" " + _vm._s(_vm.getArrayValue(_vm.itemValue(column, _vm.item), column.displayProp, column.options)) + " ")]) : column.type === 'money' || column.type === 'price' ? _c('span', [_vm._v(" " + _vm._s(_vm.formatMoney(_vm.itemValue(column, _vm.item), column)) + " ")]) : column.type === 'number' && (column.thousandsSeparator || column.decimalSeparator || column.decimals !== undefined) ? _c('span', [_vm._v(" " + _vm._s(_vm.formatNumber(_vm.itemValue(column, _vm.item), column)) + " ")]) : _c('span', [_vm._v(" " + _vm._s(_vm.itemValue(column, _vm.item)) + " ")])];
|
|
13792
14564
|
}, {
|
|
13793
14565
|
"item": _vm.item,
|
|
13794
14566
|
"index": _vm.index,
|
|
@@ -13801,9 +14573,9 @@ var _sfc_render$7 = function render() {
|
|
|
13801
14573
|
})], 2)], 1);
|
|
13802
14574
|
};
|
|
13803
14575
|
var _sfc_staticRenderFns$7 = [];
|
|
13804
|
-
var __component__$7 = /*#__PURE__*/normalizeComponent(_sfc_main$7, _sfc_render$7, _sfc_staticRenderFns$7, false, null, "
|
|
13805
|
-
var KanbanCard = __component__$7.exports;var css$
|
|
13806
|
-
n(css$
|
|
14576
|
+
var __component__$7 = /*#__PURE__*/normalizeComponent(_sfc_main$7, _sfc_render$7, _sfc_staticRenderFns$7, false, null, "ad923ee1", null, null);
|
|
14577
|
+
var KanbanCard = __component__$7.exports;var css$4 = "\n.kanban-column[data-v-a56cf649] {\r\n background: #f4f5f7;\r\n border-radius: 8px;\r\n width: 300px;\r\n display: flex;\r\n flex-direction: column;\r\n box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);\n}\n.kanban-column-header[data-v-a56cf649] {\r\n font-weight: bold;\r\n padding: 0.5rem;\r\n background: #dfe1e6;\r\n border-radius: 8px 8px 0 0;\r\n text-align: center;\n}\n.kanban-column-body[data-v-a56cf649] {\r\n padding: 0.5rem;\r\n min-height: 100px;\r\n background: #ffffff;\r\n border-radius: 0 0 8px 8px;\r\n display: flex;\r\n flex-direction: column;\r\n gap: 0.5rem;\n}\r\n";
|
|
14578
|
+
n(css$4, {});var _sfc_main$6 = {
|
|
13807
14579
|
name: 'KanbanColumn',
|
|
13808
14580
|
components: {
|
|
13809
14581
|
draggable: draggable,
|
|
@@ -13816,6 +14588,8 @@ n(css$3, {});var _sfc_main$6 = {
|
|
|
13816
14588
|
columns: Array,
|
|
13817
14589
|
itemValue: Function,
|
|
13818
14590
|
getStateValue: Function,
|
|
14591
|
+
getStateOptions: Function,
|
|
14592
|
+
getStateBadgeVariant: Function,
|
|
13819
14593
|
getArrayValue: Function,
|
|
13820
14594
|
showItem: Function,
|
|
13821
14595
|
updateItem: Function,
|
|
@@ -13884,11 +14658,21 @@ var _sfc_render$6 = function render() {
|
|
|
13884
14658
|
"cardHideFooter": _vm.cardHideFooter,
|
|
13885
14659
|
"itemValue": _vm.itemValue,
|
|
13886
14660
|
"getStateValue": _vm.getStateValue,
|
|
14661
|
+
"getStateOptions": _vm.getStateOptions,
|
|
14662
|
+
"getStateBadgeVariant": _vm.getStateBadgeVariant,
|
|
13887
14663
|
"getArrayValue": _vm.getArrayValue,
|
|
13888
14664
|
"showItem": _vm.showItem,
|
|
13889
14665
|
"updateItem": _vm.updateItem,
|
|
13890
14666
|
"removeItem": _vm.removeItem
|
|
13891
|
-
}
|
|
14667
|
+
},
|
|
14668
|
+
scopedSlots: _vm._u([_vm._l(_vm.$scopedSlots, function (slot, name) {
|
|
14669
|
+
return {
|
|
14670
|
+
key: name,
|
|
14671
|
+
fn: function fn(slotProps) {
|
|
14672
|
+
return [_vm._t(name, null, null, slotProps)];
|
|
14673
|
+
}
|
|
14674
|
+
};
|
|
14675
|
+
})], null, true)
|
|
13892
14676
|
})];
|
|
13893
14677
|
}, {
|
|
13894
14678
|
"item": item
|
|
@@ -13896,14 +14680,14 @@ var _sfc_render$6 = function render() {
|
|
|
13896
14680
|
}), 0)], 1);
|
|
13897
14681
|
};
|
|
13898
14682
|
var _sfc_staticRenderFns$6 = [];
|
|
13899
|
-
var __component__$6 = /*#__PURE__*/normalizeComponent(_sfc_main$6, _sfc_render$6, _sfc_staticRenderFns$6, false, null, "
|
|
13900
|
-
var KanbanColumn = __component__$6.exports;var css$
|
|
13901
|
-
n(css$
|
|
14683
|
+
var __component__$6 = /*#__PURE__*/normalizeComponent(_sfc_main$6, _sfc_render$6, _sfc_staticRenderFns$6, false, null, "a56cf649", null, null);
|
|
14684
|
+
var KanbanColumn = __component__$6.exports;var css$3 = "\n.kanban-board[data-v-516ff294] {\r\n display: flex;\r\n gap: 1rem;\r\n overflow-x: auto;\r\n padding: 1rem;\n}\n.kanban-column[data-v-516ff294] {\r\n background: #f4f5f7;\r\n border-radius: 8px;\r\n width: 300px;\r\n display: flex;\r\n flex-direction: column;\r\n box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);\r\n min-width: 300px;\n}\r\n";
|
|
14685
|
+
n(css$3, {});var _sfc_main$5 = {
|
|
13902
14686
|
name: 'KanbanBoard',
|
|
13903
14687
|
components: {
|
|
13904
14688
|
KanbanColumn: KanbanColumn
|
|
13905
14689
|
},
|
|
13906
|
-
inject: ['items', 'groupedAttribute', 'columns', 'itemValue', 'getStateValue', 'getArrayValue', 'showItem', 'updateItem', 'removeItem', 'cardClass', 'cardHideFooter', 'onDraggableChange']
|
|
14690
|
+
inject: ['items', 'groupedAttribute', 'columns', 'itemValue', 'getStateValue', 'getStateOptions', 'getStateBadgeVariant', 'getArrayValue', 'showItem', 'updateItem', 'removeItem', 'cardClass', 'cardHideFooter', 'onDraggableChange']
|
|
13907
14691
|
};
|
|
13908
14692
|
var _sfc_render$5 = function render() {
|
|
13909
14693
|
var _vm = this,
|
|
@@ -13922,6 +14706,8 @@ var _sfc_render$5 = function render() {
|
|
|
13922
14706
|
"columns": _vm.columns,
|
|
13923
14707
|
"itemValue": _vm.itemValue,
|
|
13924
14708
|
"getStateValue": _vm.getStateValue,
|
|
14709
|
+
"getStateOptions": _vm.getStateOptions,
|
|
14710
|
+
"getStateBadgeVariant": _vm.getStateBadgeVariant,
|
|
13925
14711
|
"getArrayValue": _vm.getArrayValue,
|
|
13926
14712
|
"showItem": _vm.showItem,
|
|
13927
14713
|
"updateItem": _vm.updateItem,
|
|
@@ -13931,36 +14717,92 @@ var _sfc_render$5 = function render() {
|
|
|
13931
14717
|
},
|
|
13932
14718
|
on: {
|
|
13933
14719
|
"draggableChange": _vm.onDraggableChange
|
|
13934
|
-
}
|
|
14720
|
+
},
|
|
14721
|
+
scopedSlots: _vm._u([_vm._l(_vm.$scopedSlots, function (slot, name) {
|
|
14722
|
+
return {
|
|
14723
|
+
key: name,
|
|
14724
|
+
fn: function fn(slotProps) {
|
|
14725
|
+
return [_vm._t(name, null, null, slotProps)];
|
|
14726
|
+
}
|
|
14727
|
+
};
|
|
14728
|
+
})], null, true)
|
|
13935
14729
|
})], 1);
|
|
13936
14730
|
}), 0);
|
|
13937
14731
|
};
|
|
13938
14732
|
var _sfc_staticRenderFns$5 = [];
|
|
13939
|
-
var __component__$5 = /*#__PURE__*/normalizeComponent(_sfc_main$5, _sfc_render$5, _sfc_staticRenderFns$5, false, null, "
|
|
14733
|
+
var __component__$5 = /*#__PURE__*/normalizeComponent(_sfc_main$5, _sfc_render$5, _sfc_staticRenderFns$5, false, null, "516ff294", null, null);
|
|
13940
14734
|
var KanbanBoard = __component__$5.exports;var _sfc_main$4 = {
|
|
13941
14735
|
name: 'CrudKanban',
|
|
13942
14736
|
components: {
|
|
13943
14737
|
KanbanBoard: KanbanBoard
|
|
13944
14738
|
},
|
|
13945
|
-
inject: ['displayMode', 'displayModes']
|
|
14739
|
+
inject: ['displayMode', 'displayModes'],
|
|
14740
|
+
computed: {
|
|
14741
|
+
currentDisplayMode: function currentDisplayMode() {
|
|
14742
|
+
if (!this.displayMode) return 1;
|
|
14743
|
+
if (this.displayMode.value !== undefined) {
|
|
14744
|
+
return this.displayMode.value;
|
|
14745
|
+
}
|
|
14746
|
+
if (typeof this.displayMode === 'function') {
|
|
14747
|
+
return this.displayMode();
|
|
14748
|
+
}
|
|
14749
|
+
return this.displayMode;
|
|
14750
|
+
}
|
|
14751
|
+
}
|
|
13946
14752
|
};
|
|
13947
14753
|
var _sfc_render$4 = function render() {
|
|
13948
14754
|
var _vm = this,
|
|
13949
14755
|
_c = _vm._self._c;
|
|
13950
|
-
return _vm.
|
|
14756
|
+
return _vm.currentDisplayMode == _vm.displayModes.MODE_KANBAN ? _c('div', [_c('KanbanBoard', {
|
|
14757
|
+
scopedSlots: _vm._u([_vm._l(_vm.$scopedSlots, function (slot, name) {
|
|
14758
|
+
return {
|
|
14759
|
+
key: name,
|
|
14760
|
+
fn: function fn(slotProps) {
|
|
14761
|
+
return [_vm._t(name, null, null, slotProps)];
|
|
14762
|
+
}
|
|
14763
|
+
};
|
|
14764
|
+
})], null, true)
|
|
14765
|
+
})], 1) : _vm._e();
|
|
13951
14766
|
};
|
|
13952
14767
|
var _sfc_staticRenderFns$4 = [];
|
|
13953
14768
|
var __component__$4 = /*#__PURE__*/normalizeComponent(_sfc_main$4, _sfc_render$4, _sfc_staticRenderFns$4, false, null, null, null, null);
|
|
13954
14769
|
var CrudKanban = __component__$4.exports;var _sfc_main$3 = {
|
|
13955
14770
|
name: 'CrudCustom',
|
|
13956
|
-
inject: ['displayMode', 'displayModes', 'listContainerClass', 'listItemClass', 'loading', 'items', 'infiniteScroll', 'messageEmptyResults', 'itemsList']
|
|
14771
|
+
inject: ['displayMode', 'displayModes', 'listContainerClass', 'listItemClass', 'loading', 'firstLoad', 'items', 'infiniteScroll', 'messageEmptyResults', 'messageLoading', 'itemsList'],
|
|
14772
|
+
computed: {
|
|
14773
|
+
currentDisplayMode: function currentDisplayMode() {
|
|
14774
|
+
if (!this.displayMode) return 1;
|
|
14775
|
+
if (this.displayMode.value !== undefined) {
|
|
14776
|
+
return this.displayMode.value;
|
|
14777
|
+
}
|
|
14778
|
+
if (typeof this.displayMode === 'function') {
|
|
14779
|
+
return this.displayMode();
|
|
14780
|
+
}
|
|
14781
|
+
return this.displayMode;
|
|
14782
|
+
},
|
|
14783
|
+
loadingValue: function loadingValue() {
|
|
14784
|
+
return this.loading && this.loading.value !== undefined ? this.loading.value : this.loading;
|
|
14785
|
+
},
|
|
14786
|
+
firstLoadValue: function firstLoadValue() {
|
|
14787
|
+
return this.firstLoad && this.firstLoad.value !== undefined ? this.firstLoad.value : this.firstLoad;
|
|
14788
|
+
}
|
|
14789
|
+
}
|
|
13957
14790
|
};
|
|
13958
14791
|
var _sfc_render$3 = function render() {
|
|
13959
14792
|
var _vm = this,
|
|
13960
14793
|
_c = _vm._self._c;
|
|
13961
|
-
return _vm.
|
|
14794
|
+
return _vm.currentDisplayMode == _vm.displayModes.MODE_CUSTOM ? _c('div', [_c('div', {
|
|
13962
14795
|
class: _vm.listContainerClass
|
|
13963
|
-
}, [
|
|
14796
|
+
}, [_vm.loadingValue || !_vm.firstLoadValue ? _c('div', {
|
|
14797
|
+
staticClass: "text-center p-5"
|
|
14798
|
+
}, [_c('b-spinner', {
|
|
14799
|
+
attrs: {
|
|
14800
|
+
"variant": "primary",
|
|
14801
|
+
"label": "Cargando..."
|
|
14802
|
+
}
|
|
14803
|
+
}), _c('p', {
|
|
14804
|
+
staticClass: "mt-2"
|
|
14805
|
+
}, [_vm._v(_vm._s(_vm.messageLoading))])], 1) : [_vm.firstLoadValue && _vm.itemsList && _vm.itemsList.length == 0 && !_vm.infiniteScroll ? _c('p', {
|
|
13964
14806
|
staticClass: "p-3"
|
|
13965
14807
|
}, [_vm._v(" " + _vm._s(_vm.messageEmptyResults) + " ")]) : _vm._e(), _vm._l(_vm.itemsList, function (item, index) {
|
|
13966
14808
|
return _c('div', {
|
|
@@ -13969,13 +14811,35 @@ var _sfc_render$3 = function render() {
|
|
|
13969
14811
|
}, [_vm._t("card", null, {
|
|
13970
14812
|
"item": item
|
|
13971
14813
|
})], 2);
|
|
13972
|
-
})], 2)]) : _vm._e();
|
|
14814
|
+
})]], 2)]) : _vm._e();
|
|
13973
14815
|
};
|
|
13974
14816
|
var _sfc_staticRenderFns$3 = [];
|
|
13975
14817
|
var __component__$3 = /*#__PURE__*/normalizeComponent(_sfc_main$3, _sfc_render$3, _sfc_staticRenderFns$3, false, null, null, null, null);
|
|
13976
|
-
var CrudCustom = __component__$3.exports;var
|
|
14818
|
+
var CrudCustom = __component__$3.exports;var css$2 = "\n.export-format-options[data-v-051e3fd7] {\r\n display: flex;\r\n gap: 1rem;\r\n justify-content: center;\r\n flex-wrap: wrap;\n}\n.export-format-radio[data-v-051e3fd7] {\r\n flex: 1;\r\n min-width: 150px;\r\n padding: 1rem;\r\n border: 2px solid #dee2e6;\r\n border-radius: 0.5rem;\r\n cursor: pointer;\r\n transition: all 0.3s ease;\r\n text-align: center;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n background-color: #fff;\n}\n.export-format-radio[data-v-051e3fd7]:hover {\r\n border-color: #007bff;\r\n background-color: #f8f9fa;\r\n transform: translateY(-2px);\r\n box-shadow: 0 2px 8px rgba(0, 123, 255, 0.2);\n}\n.export-format-radio[data-v-051e3fd7] .custom-control-input:checked ~ .custom-control-label {\r\n color: #007bff;\r\n font-weight: 600;\n}\n.export-format-radio[data-v-051e3fd7] .custom-control-input:checked ~ .custom-control-label::before {\r\n border-color: #007bff;\r\n background-color: #007bff;\n}\n.export-format-radio[data-v-051e3fd7] .custom-control-label {\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n width: 100%;\r\n cursor: pointer;\r\n font-size: 1rem;\n}\n.export-format-radio[data-v-051e3fd7] .custom-control-label::before {\r\n margin-right: 0.5rem;\n}\n.export-format-radio[data-v-051e3fd7] svg {\r\n font-size: 1.5rem;\r\n color: #495057;\n}\n.export-format-radio[data-v-051e3fd7] .custom-control-input:checked ~ .custom-control-label svg {\r\n color: #007bff;\n}\r\n";
|
|
14819
|
+
n(css$2, {});var _sfc_main$2 = {
|
|
13977
14820
|
name: 'CrudModals',
|
|
13978
|
-
inject: ['modelName', 'title', 'loading', 'validate', 'item', 'messageSave', 'showImport', 'showExport', 'fileImport', 'selectedItems', 'exportFormat', 'saveItem', 'importItems', 'exportItems']
|
|
14821
|
+
inject: ['modelName', 'title', 'loading', 'validate', 'item', 'getItem', 'messageSave', 'showImport', 'showExport', 'fileImport', 'selectedItems', 'exportFormat', 'saveItem', 'importItems', 'exportItems'],
|
|
14822
|
+
computed: {
|
|
14823
|
+
// Computed property para asegurar reactividad del item inyectado
|
|
14824
|
+
reactiveItem: function reactiveItem() {
|
|
14825
|
+
// Si hay una función getItem, usarla para obtener el item actual
|
|
14826
|
+
if (this.getItem && typeof this.getItem === 'function') {
|
|
14827
|
+
return this.getItem();
|
|
14828
|
+
}
|
|
14829
|
+
// Si no, usar el item inyectado directamente
|
|
14830
|
+
return this.item;
|
|
14831
|
+
}
|
|
14832
|
+
},
|
|
14833
|
+
watch: {
|
|
14834
|
+
// Watch el item inyectado para forzar actualización
|
|
14835
|
+
item: {
|
|
14836
|
+
handler: function handler() {
|
|
14837
|
+
this.$forceUpdate();
|
|
14838
|
+
},
|
|
14839
|
+
deep: true,
|
|
14840
|
+
immediate: true
|
|
14841
|
+
}
|
|
14842
|
+
}
|
|
13979
14843
|
};
|
|
13980
14844
|
var _sfc_render$2 = function render() {
|
|
13981
14845
|
var _vm = this,
|
|
@@ -13997,7 +14861,7 @@ var _sfc_render$2 = function render() {
|
|
|
13997
14861
|
on: {
|
|
13998
14862
|
"submit": _vm.saveItem
|
|
13999
14863
|
}
|
|
14000
|
-
}, [_vm.
|
|
14864
|
+
}, [_vm.reactiveItem ? [_vm._t("form", function () {
|
|
14001
14865
|
return [_c('b-form-group', {
|
|
14002
14866
|
attrs: {
|
|
14003
14867
|
"label": "Nombre:",
|
|
@@ -14010,16 +14874,16 @@ var _sfc_render$2 = function render() {
|
|
|
14010
14874
|
"placeholder": "Nombre"
|
|
14011
14875
|
},
|
|
14012
14876
|
model: {
|
|
14013
|
-
value: _vm.
|
|
14877
|
+
value: _vm.reactiveItem.title,
|
|
14014
14878
|
callback: function callback($$v) {
|
|
14015
|
-
_vm.$set(_vm.
|
|
14879
|
+
_vm.$set(_vm.reactiveItem, "title", $$v);
|
|
14016
14880
|
},
|
|
14017
|
-
expression: "
|
|
14881
|
+
expression: "reactiveItem.title"
|
|
14018
14882
|
}
|
|
14019
14883
|
})], 1)];
|
|
14020
14884
|
}, {
|
|
14021
|
-
"item": _vm.
|
|
14022
|
-
}) : _vm._e(), _c('b-button', {
|
|
14885
|
+
"item": _vm.reactiveItem
|
|
14886
|
+
})] : _vm._e(), _c('b-button', {
|
|
14023
14887
|
attrs: {
|
|
14024
14888
|
"block": "",
|
|
14025
14889
|
"type": "submit",
|
|
@@ -14030,8 +14894,8 @@ var _sfc_render$2 = function render() {
|
|
|
14030
14894
|
attrs: {
|
|
14031
14895
|
"small": ""
|
|
14032
14896
|
}
|
|
14033
|
-
}) : _vm._e(), _vm._v(_vm._s(_vm.messageSave) + " ")], 1)], 2)] : _vm._e(), !_vm.validate ? [_vm.
|
|
14034
|
-
return _vm._l(_vm.
|
|
14897
|
+
}) : _vm._e(), _vm._v(_vm._s(_vm.messageSave) + " ")], 1)], 2)] : _vm._e(), !_vm.validate ? [_vm.reactiveItem ? [_vm._t("form", function () {
|
|
14898
|
+
return _vm._l(_vm.reactiveItem, function (value, key) {
|
|
14035
14899
|
return _c('b-form-group', {
|
|
14036
14900
|
key: key,
|
|
14037
14901
|
attrs: {
|
|
@@ -14043,17 +14907,17 @@ var _sfc_render$2 = function render() {
|
|
|
14043
14907
|
"required": ""
|
|
14044
14908
|
},
|
|
14045
14909
|
model: {
|
|
14046
|
-
value: _vm.
|
|
14910
|
+
value: _vm.reactiveItem[key],
|
|
14047
14911
|
callback: function callback($$v) {
|
|
14048
|
-
_vm.$set(_vm.
|
|
14912
|
+
_vm.$set(_vm.reactiveItem, key, $$v);
|
|
14049
14913
|
},
|
|
14050
|
-
expression: "
|
|
14914
|
+
expression: "reactiveItem[key]"
|
|
14051
14915
|
}
|
|
14052
14916
|
})], 1);
|
|
14053
14917
|
});
|
|
14054
14918
|
}, {
|
|
14055
|
-
"item": _vm.
|
|
14056
|
-
}) : _vm._e(), _c('b-button', {
|
|
14919
|
+
"item": _vm.reactiveItem
|
|
14920
|
+
})] : _vm._e(), _c('b-button', {
|
|
14057
14921
|
attrs: {
|
|
14058
14922
|
"block": "",
|
|
14059
14923
|
"type": "submit",
|
|
@@ -14077,8 +14941,8 @@ var _sfc_render$2 = function render() {
|
|
|
14077
14941
|
"title": _vm.title,
|
|
14078
14942
|
"no-close-on-backdrop": ""
|
|
14079
14943
|
}
|
|
14080
|
-
}, [_vm.
|
|
14081
|
-
return [_c('b-list-group', _vm._l(_vm.
|
|
14944
|
+
}, [_vm.reactiveItem ? [_vm._t("show", function () {
|
|
14945
|
+
return [_c('b-list-group', _vm._l(_vm.reactiveItem, function (value, key) {
|
|
14082
14946
|
return _c('b-list-group-item', {
|
|
14083
14947
|
key: key
|
|
14084
14948
|
}, [_c('b-row', {
|
|
@@ -14095,8 +14959,8 @@ var _sfc_render$2 = function render() {
|
|
|
14095
14959
|
}, [_vm._v(_vm._s(JSON.stringify(value)))])], 1)], 1);
|
|
14096
14960
|
}), 1)];
|
|
14097
14961
|
}, {
|
|
14098
|
-
"item": _vm.
|
|
14099
|
-
}) : _vm._e()], 2), _vm.showImport ? _c('b-modal', {
|
|
14962
|
+
"item": _vm.reactiveItem
|
|
14963
|
+
})] : _vm._e()], 2), _vm.showImport ? _c('b-modal', {
|
|
14100
14964
|
ref: "modal-import",
|
|
14101
14965
|
attrs: {
|
|
14102
14966
|
"title": "Importar",
|
|
@@ -14149,34 +15013,42 @@ var _sfc_render$2 = function render() {
|
|
|
14149
15013
|
"show": _vm.loading,
|
|
14150
15014
|
"rounded": "sm"
|
|
14151
15015
|
}
|
|
14152
|
-
}, [_vm.selectedItems.length ? _c('p', [_vm._v("Se exportará " + _vm._s(_vm.selectedItems.length) + " elementos.")]) : _c('p', [_vm._v("Se exportará la consulta actual.")]), _c('
|
|
14153
|
-
|
|
14154
|
-
|
|
14155
|
-
|
|
14156
|
-
value: _vm.exportFormat,
|
|
14157
|
-
expression: "exportFormat"
|
|
14158
|
-
}],
|
|
14159
|
-
staticClass: "form-control",
|
|
14160
|
-
on: {
|
|
14161
|
-
"change": function change($event) {
|
|
14162
|
-
var $$selectedVal = Array.prototype.filter.call($event.target.options, function (o) {
|
|
14163
|
-
return o.selected;
|
|
14164
|
-
}).map(function (o) {
|
|
14165
|
-
var val = "_value" in o ? o._value : o.value;
|
|
14166
|
-
return val;
|
|
14167
|
-
});
|
|
14168
|
-
_vm.exportFormat = $event.target.multiple ? $$selectedVal : $$selectedVal[0];
|
|
14169
|
-
}
|
|
15016
|
+
}, [_vm.selectedItems.length ? _c('p', [_vm._v("Se exportará " + _vm._s(_vm.selectedItems.length) + " elementos.")]) : _c('p', [_vm._v("Se exportará la consulta actual.")]), _c('b-form-group', {
|
|
15017
|
+
staticClass: "mt-3",
|
|
15018
|
+
attrs: {
|
|
15019
|
+
"label": "Seleccione el formato de exportación:"
|
|
14170
15020
|
}
|
|
14171
|
-
}, [_c('
|
|
15021
|
+
}, [_c('div', {
|
|
15022
|
+
staticClass: "export-format-options"
|
|
15023
|
+
}, [_c('b-form-radio', {
|
|
15024
|
+
staticClass: "export-format-radio",
|
|
14172
15025
|
attrs: {
|
|
14173
15026
|
"value": "JSON"
|
|
15027
|
+
},
|
|
15028
|
+
model: {
|
|
15029
|
+
value: _vm.exportFormat,
|
|
15030
|
+
callback: function callback($$v) {
|
|
15031
|
+
_vm.exportFormat = $$v;
|
|
15032
|
+
},
|
|
15033
|
+
expression: "exportFormat"
|
|
14174
15034
|
}
|
|
14175
|
-
}, [
|
|
15035
|
+
}, [_c('b-icon-file-text', {
|
|
15036
|
+
staticClass: "mr-2"
|
|
15037
|
+
}), _vm._v(" JSON ")], 1), _c('b-form-radio', {
|
|
15038
|
+
staticClass: "export-format-radio",
|
|
14176
15039
|
attrs: {
|
|
14177
15040
|
"value": "XLSX"
|
|
15041
|
+
},
|
|
15042
|
+
model: {
|
|
15043
|
+
value: _vm.exportFormat,
|
|
15044
|
+
callback: function callback($$v) {
|
|
15045
|
+
_vm.exportFormat = $$v;
|
|
15046
|
+
},
|
|
15047
|
+
expression: "exportFormat"
|
|
14178
15048
|
}
|
|
14179
|
-
}, [
|
|
15049
|
+
}, [_c('b-icon-table', {
|
|
15050
|
+
staticClass: "mr-2"
|
|
15051
|
+
}), _vm._v(" XLSX ")], 1)], 1)]), _c('div', {
|
|
14180
15052
|
staticClass: "text-center mt-3"
|
|
14181
15053
|
}, [_c('b-button', {
|
|
14182
15054
|
attrs: {
|
|
@@ -14188,13 +15060,13 @@ var _sfc_render$2 = function render() {
|
|
|
14188
15060
|
return _vm.exportItems();
|
|
14189
15061
|
}
|
|
14190
15062
|
}
|
|
14191
|
-
}, [_c('b-icon-cloud-upload'), _vm._v(" " + _vm._s(_vm.loading ? "Cargando..." : "Exportar") + " ")], 1)], 1)])];
|
|
15063
|
+
}, [_c('b-icon-cloud-upload'), _vm._v(" " + _vm._s(_vm.loading ? "Cargando..." : "Exportar") + " ")], 1)], 1)], 1)];
|
|
14192
15064
|
}, {
|
|
14193
15065
|
"item": _vm.item
|
|
14194
15066
|
}) : _vm._e()], 2) : _vm._e()], 1);
|
|
14195
15067
|
};
|
|
14196
15068
|
var _sfc_staticRenderFns$2 = [];
|
|
14197
|
-
var __component__$2 = /*#__PURE__*/normalizeComponent(_sfc_main$2, _sfc_render$2, _sfc_staticRenderFns$2, false, null,
|
|
15069
|
+
var __component__$2 = /*#__PURE__*/normalizeComponent(_sfc_main$2, _sfc_render$2, _sfc_staticRenderFns$2, false, null, "051e3fd7", null, null);
|
|
14198
15070
|
var CrudModals = __component__$2.exports;var vueInfiniteLoading = {exports: {}};/*!
|
|
14199
15071
|
* vue-infinite-loading v2.4.5
|
|
14200
15072
|
* (c) 2016-2020 PeachScript
|
|
@@ -14207,13 +15079,13 @@ vueInfiniteLoading.exports;
|
|
|
14207
15079
|
} (vueInfiniteLoading, vueInfiniteLoading.exports));
|
|
14208
15080
|
|
|
14209
15081
|
var vueInfiniteLoadingExports = vueInfiniteLoading.exports;
|
|
14210
|
-
var InfiniteLoading = /*@__PURE__*/getDefaultExportFromCjs(vueInfiniteLoadingExports);var css$1 = "\n.paginator-container[data-v-
|
|
15082
|
+
var InfiniteLoading = /*@__PURE__*/getDefaultExportFromCjs(vueInfiniteLoadingExports);var css$1 = "\n.paginator-container[data-v-73e31fd7] {\n display: grid;\n grid-template-columns: 1fr auto 1fr;\n align-items: center;\n width: 100%;\n margin-top: 1rem;\n gap: 1rem;\n}\n.paginator-data[data-v-73e31fd7] {\n display: flex;\n flex-wrap: nowrap;\n justify-content: flex-start;\n align-items: center;\n gap: 0.5rem;\n font-size: 0.875rem;\n grid-column: 1;\n}\n.paginator-badge[data-v-73e31fd7] {\n display: inline-flex;\n align-items: center;\n gap: 0.25rem;\n padding: 0.375rem 0.625rem;\n background-color: #f8f9fa;\n border: 1px solid #dee2e6;\n border-radius: 0.375rem;\n color: #495057;\n transition: all 0.2s ease;\n}\n.paginator-badge[data-v-73e31fd7]:hover {\n background-color: #e9ecef;\n border-color: #ced4da;\n}\n.paginator-label[data-v-73e31fd7] {\n font-weight: 500;\n color: #6c757d;\n}\n.paginator-value[data-v-73e31fd7] {\n font-weight: 600;\n color: #212529;\n}\n.paginator-dropdown[data-v-73e31fd7] {\n font-size: 0.875rem;\n}\n.paginator-dropdown[data-v-73e31fd7] .btn {\n padding: 0.375rem 0.625rem;\n font-size: 0.875rem;\n background-color: #f8f9fa;\n border: 1px solid #dee2e6;\n color: #495057;\n}\n.paginator-dropdown[data-v-73e31fd7] .btn:hover {\n background-color: #e9ecef;\n border-color: #ced4da;\n}\n.crud-paginator[data-v-73e31fd7] {\n display: flex;\n justify-content: center;\n align-items: center;\n grid-column: 2;\n}\n.paginator-badge-dropdown[data-v-73e31fd7] {\n z-index: 1;\n position: relative;\n}\n.paginator-badge-dropdown[data-v-73e31fd7] .btn {\n padding: 0.375rem 0.625rem;\n font-size: 0.875rem;\n background-color: #f8f9fa;\n border: 1px solid #dee2e6;\n color: #495057;\n display: inline-flex;\n align-items: center;\n gap: 0.25rem;\n}\n.paginator-badge-dropdown[data-v-73e31fd7] .btn:hover {\n background-color: #e9ecef;\n border-color: #ced4da;\n}\n";
|
|
14211
15083
|
n(css$1, {});var _sfc_main$1 = {
|
|
14212
15084
|
name: 'CrudPagination',
|
|
14213
15085
|
components: {
|
|
14214
15086
|
InfiniteLoading: InfiniteLoading
|
|
14215
15087
|
},
|
|
14216
|
-
inject: ['infiniteScroll', 'infiniteScrollKey', 'messageLoading', 'messageNoMore', 'messageEmptyResults', 'loading', 'items', 'pagination', 'selectedItems', 'showPaginator', 'infiniteHandler', 'onPaginationChange', 'onPerPageChange', 'clearSelection'],
|
|
15088
|
+
inject: ['infiniteScroll', 'infiniteScrollKey', 'messageLoading', 'messageNoMore', 'messageEmptyResults', 'loading', 'firstLoad', 'items', 'pagination', 'selectedItems', 'showPaginator', 'infiniteHandler', 'onPaginationChange', 'onPerPageChange', 'clearSelection'],
|
|
14217
15089
|
data: function data() {
|
|
14218
15090
|
return {
|
|
14219
15091
|
perPageOptions: [10, 20, 50, 100]
|
|
@@ -14223,6 +15095,12 @@ n(css$1, {});var _sfc_main$1 = {
|
|
|
14223
15095
|
selectedItemsCount: function selectedItemsCount() {
|
|
14224
15096
|
// Computed para forzar reactividad del contador
|
|
14225
15097
|
return this.selectedItems ? this.selectedItems.length : 0;
|
|
15098
|
+
},
|
|
15099
|
+
loadingValue: function loadingValue() {
|
|
15100
|
+
return this.loading && this.loading.value !== undefined ? this.loading.value : this.loading;
|
|
15101
|
+
},
|
|
15102
|
+
firstLoadValue: function firstLoadValue() {
|
|
15103
|
+
return this.firstLoad && this.firstLoad.value !== undefined ? this.firstLoad.value : this.firstLoad;
|
|
14226
15104
|
}
|
|
14227
15105
|
}
|
|
14228
15106
|
};
|
|
@@ -14250,14 +15128,14 @@ var _sfc_render$1 = function render() {
|
|
|
14250
15128
|
"slot": "no-more"
|
|
14251
15129
|
},
|
|
14252
15130
|
slot: "no-more"
|
|
14253
|
-
}, [!_vm.
|
|
15131
|
+
}, [!_vm.loadingValue ? _c('div', {
|
|
14254
15132
|
staticClass: "text-center"
|
|
14255
15133
|
}, [_vm._v(_vm._s(_vm.messageNoMore))]) : _vm._e()]), _c('div', {
|
|
14256
15134
|
attrs: {
|
|
14257
15135
|
"slot": "no-results"
|
|
14258
15136
|
},
|
|
14259
15137
|
slot: "no-results"
|
|
14260
|
-
}, [!_vm.
|
|
15138
|
+
}, [!_vm.loadingValue && _vm.firstLoadValue ? _c('div', {
|
|
14261
15139
|
staticClass: "text-center"
|
|
14262
15140
|
}, [_vm._v(_vm._s(_vm.items.length == 0 ? _vm.messageEmptyResults : _vm.messageNoMore))]) : _vm._e()])]) : _vm._e(), !_vm.infiniteScroll ? _c('div', {
|
|
14263
15141
|
staticClass: "paginator-container"
|
|
@@ -14323,7 +15201,7 @@ var _sfc_render$1 = function render() {
|
|
|
14323
15201
|
}) : _vm._e()], 1)]) : _vm._e()], 1);
|
|
14324
15202
|
};
|
|
14325
15203
|
var _sfc_staticRenderFns$1 = [];
|
|
14326
|
-
var __component__$1 = /*#__PURE__*/normalizeComponent(_sfc_main$1, _sfc_render$1, _sfc_staticRenderFns$1, false, null, "
|
|
15204
|
+
var __component__$1 = /*#__PURE__*/normalizeComponent(_sfc_main$1, _sfc_render$1, _sfc_staticRenderFns$1, false, null, "73e31fd7", null, null);
|
|
14327
15205
|
var CrudPagination = __component__$1.exports;var crudData = {
|
|
14328
15206
|
data: function data() {
|
|
14329
15207
|
return {
|
|
@@ -14351,6 +15229,20 @@ var CrudPagination = __component__$1.exports;var crudData = {
|
|
|
14351
15229
|
filterSidebarOpen: false,
|
|
14352
15230
|
internalFilters: [],
|
|
14353
15231
|
forceRecomputeCounter: 0,
|
|
15232
|
+
_displayMode: 1,
|
|
15233
|
+
// Propiedad local para displayMode (se inicializará desde la prop en created())
|
|
15234
|
+
displayModeReactive: Vue__default["default"].observable({
|
|
15235
|
+
value: 1
|
|
15236
|
+
}),
|
|
15237
|
+
// Objeto reactivo para provide/inject
|
|
15238
|
+
loadingReactive: Vue__default["default"].observable({
|
|
15239
|
+
value: false
|
|
15240
|
+
}),
|
|
15241
|
+
// Objeto reactivo para loading
|
|
15242
|
+
firstLoadReactive: Vue__default["default"].observable({
|
|
15243
|
+
value: false
|
|
15244
|
+
}),
|
|
15245
|
+
// Objeto reactivo para firstLoad
|
|
14354
15246
|
displayModes: {
|
|
14355
15247
|
MODE_TABLE: 1,
|
|
14356
15248
|
MODE_CARDS: 2,
|
|
@@ -14381,7 +15273,7 @@ var CrudPagination = __component__$1.exports;var crudData = {
|
|
|
14381
15273
|
if (this.groupedSplit) {
|
|
14382
15274
|
return true;
|
|
14383
15275
|
}
|
|
14384
|
-
return this.
|
|
15276
|
+
return this._displayMode == this.displayModes.MODE_KANBAN;
|
|
14385
15277
|
},
|
|
14386
15278
|
itemsList: function itemsList() {
|
|
14387
15279
|
var items = this.ajax ? this.items : this.items.slice(this.paginationIndexStart, this.paginationIndexEnd);
|
|
@@ -14423,7 +15315,15 @@ var CrudPagination = __component__$1.exports;var crudData = {
|
|
|
14423
15315
|
this.internalFilters.forEach(function (f) {
|
|
14424
15316
|
if (f.value) {
|
|
14425
15317
|
var colname = f.column.replace("_sort", "").replace("_from", "").replace("_to", "");
|
|
14426
|
-
|
|
15318
|
+
var op = f.op;
|
|
15319
|
+
|
|
15320
|
+
// Aplicar operadores automáticamente para filtros de rango
|
|
15321
|
+
if (f.column.endsWith("_from")) {
|
|
15322
|
+
op = ">=";
|
|
15323
|
+
} else if (f.column.endsWith("_to")) {
|
|
15324
|
+
op = "<=";
|
|
15325
|
+
}
|
|
15326
|
+
filter.push([colname, op, f.value]);
|
|
14427
15327
|
}
|
|
14428
15328
|
});
|
|
14429
15329
|
return filter;
|
|
@@ -14466,8 +15366,24 @@ var CrudPagination = __component__$1.exports;var crudData = {
|
|
|
14466
15366
|
this.fetchItems();
|
|
14467
15367
|
}
|
|
14468
15368
|
},
|
|
14469
|
-
|
|
15369
|
+
// Watcher para la prop displayMode (sincroniza cuando cambia desde el componente padre)
|
|
15370
|
+
displayMode: function displayMode(newVal) {
|
|
15371
|
+
// Usar $props para acceder a la prop y evitar conflictos con data properties
|
|
15372
|
+
var propValue = this.$props && this.$props.displayMode !== undefined ? this.$props.displayMode : newVal;
|
|
15373
|
+
if (propValue !== undefined && this._displayMode !== propValue) {
|
|
15374
|
+
this._displayMode = propValue;
|
|
15375
|
+
if (this.displayModeReactive) {
|
|
15376
|
+
this.displayModeReactive.value = propValue;
|
|
15377
|
+
}
|
|
15378
|
+
}
|
|
15379
|
+
},
|
|
15380
|
+
// Watcher para la propiedad local _displayMode (para forzar re-renderizado)
|
|
15381
|
+
_displayMode: function _displayMode(newVal) {
|
|
14470
15382
|
var _this2 = this;
|
|
15383
|
+
// Actualizar el objeto reactivo si existe
|
|
15384
|
+
if (this.displayModeReactive) {
|
|
15385
|
+
this.displayModeReactive.value = newVal;
|
|
15386
|
+
}
|
|
14471
15387
|
// Forzar re-renderizado cuando cambia el modo de visualización
|
|
14472
15388
|
this.$nextTick(function () {
|
|
14473
15389
|
_this2.forceRecomputeCounter++;
|
|
@@ -14533,8 +15449,30 @@ var CrudPagination = __component__$1.exports;var crudData = {
|
|
|
14533
15449
|
});
|
|
14534
15450
|
},
|
|
14535
15451
|
deep: true
|
|
15452
|
+
},
|
|
15453
|
+
loading: {
|
|
15454
|
+
handler: function handler(newVal) {
|
|
15455
|
+
this.loadingReactive.value = newVal;
|
|
15456
|
+
},
|
|
15457
|
+
immediate: true
|
|
15458
|
+
},
|
|
15459
|
+
firstLoad: {
|
|
15460
|
+
handler: function handler(newVal) {
|
|
15461
|
+
this.firstLoadReactive.value = newVal;
|
|
15462
|
+
},
|
|
15463
|
+
immediate: true
|
|
14536
15464
|
}
|
|
14537
15465
|
},
|
|
15466
|
+
created: function created() {
|
|
15467
|
+
// Inicializar _displayMode desde la prop displayMode en created() para que esté disponible en provide()
|
|
15468
|
+
if (this.$props && this.$props.displayMode !== undefined) {
|
|
15469
|
+
this._displayMode = this.$props.displayMode;
|
|
15470
|
+
this.displayModeReactive.value = this._displayMode;
|
|
15471
|
+
}
|
|
15472
|
+
// Inicializar valores reactivos
|
|
15473
|
+
this.loadingReactive.value = this.loading;
|
|
15474
|
+
this.firstLoadReactive.value = this.firstLoad;
|
|
15475
|
+
},
|
|
14538
15476
|
mounted: function mounted() {
|
|
14539
15477
|
var now = Math.floor(Date.now() / 1000);
|
|
14540
15478
|
this.crudUuid = '' + now;
|
|
@@ -19810,7 +20748,7 @@ axios.default = axios;var crudApi = {
|
|
|
19810
20748
|
dataKey: 'data',
|
|
19811
20749
|
params: {
|
|
19812
20750
|
page: page,
|
|
19813
|
-
limit: _this.pagination.
|
|
20751
|
+
limit: _this.pagination.per_page,
|
|
19814
20752
|
filters: JSON.stringify(_this.finalFilters)
|
|
19815
20753
|
}
|
|
19816
20754
|
});
|
|
@@ -19855,7 +20793,7 @@ axios.default = axios;var crudApi = {
|
|
|
19855
20793
|
return axios.get(this.apiUrl + "/" + this.modelName, {
|
|
19856
20794
|
params: {
|
|
19857
20795
|
page: page,
|
|
19858
|
-
limit: this.
|
|
20796
|
+
limit: this.pagination.per_page,
|
|
19859
20797
|
filters: JSON.stringify(this.finalFilters)
|
|
19860
20798
|
}
|
|
19861
20799
|
}).then(function (response) {
|
|
@@ -20322,12 +21260,10 @@ axios.default = axios;var crudApi = {
|
|
|
20322
21260
|
ids: ids
|
|
20323
21261
|
}
|
|
20324
21262
|
}).then(function (response) {
|
|
20325
|
-
_this9.items = _this9.items.filter(function (it) {
|
|
20326
|
-
return !ids.includes(it.id);
|
|
20327
|
-
});
|
|
20328
21263
|
_this9.toastSuccess("Elemento/s eliminado.");
|
|
20329
21264
|
_this9.$emit("itemDeleted", {});
|
|
20330
|
-
_this9.
|
|
21265
|
+
_this9.clearSelection();
|
|
21266
|
+
_this9.refresh();
|
|
20331
21267
|
}).catch(function (error) {
|
|
20332
21268
|
_this9.toastError(error);
|
|
20333
21269
|
_this9.loading = false;
|
|
@@ -20347,10 +21283,12 @@ axios.default = axios;var crudApi = {
|
|
|
20347
21283
|
return !ids.includes(it.id);
|
|
20348
21284
|
});
|
|
20349
21285
|
_this10.item = null;
|
|
21286
|
+
_this10.pagination.total = _this10.items.length;
|
|
20350
21287
|
_this10.toastSuccess("Elemento Eliminado");
|
|
20351
21288
|
_this10.$emit("itemDeleted", {});
|
|
21289
|
+
_this10.clearSelection();
|
|
20352
21290
|
_this10.loading = false;
|
|
20353
|
-
case
|
|
21291
|
+
case 8:
|
|
20354
21292
|
case "end":
|
|
20355
21293
|
return _context7.stop();
|
|
20356
21294
|
}
|
|
@@ -20360,7 +21298,7 @@ axios.default = axios;var crudApi = {
|
|
|
20360
21298
|
deleteItemBulkVuex: function deleteItemBulkVuex() {
|
|
20361
21299
|
var _this11 = this;
|
|
20362
21300
|
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8() {
|
|
20363
|
-
var ids, result;
|
|
21301
|
+
var ids, result, itemsResult;
|
|
20364
21302
|
return _regeneratorRuntime().wrap(function _callee8$(_context8) {
|
|
20365
21303
|
while (1) switch (_context8.prev = _context8.next) {
|
|
20366
21304
|
case 0:
|
|
@@ -20396,8 +21334,15 @@ axios.default = axios;var crudApi = {
|
|
|
20396
21334
|
_this11.loading = false;
|
|
20397
21335
|
return _context8.abrupt("return");
|
|
20398
21336
|
case 15:
|
|
21337
|
+
// Actualizar items desde el store Vuex
|
|
21338
|
+
itemsResult = _this11.model.query().withAll().get();
|
|
21339
|
+
if (itemsResult) {
|
|
21340
|
+
_this11.items = itemsResult;
|
|
21341
|
+
}
|
|
20399
21342
|
_this11.toastSuccess("Elemento eliminados.");
|
|
20400
|
-
|
|
21343
|
+
_this11.clearSelection();
|
|
21344
|
+
_this11.loading = false;
|
|
21345
|
+
case 20:
|
|
20401
21346
|
case "end":
|
|
20402
21347
|
return _context8.stop();
|
|
20403
21348
|
}
|
|
@@ -20541,15 +21486,15 @@ axios.default = axios;var crudApi = {
|
|
|
20541
21486
|
var _this = this;
|
|
20542
21487
|
this.columns.forEach(function (column) {
|
|
20543
21488
|
if (_this.isColumnHasFilter(column)) {
|
|
20544
|
-
if (column.type == "date") {
|
|
21489
|
+
if (column.type == "date" || column.type == "number" || column.type == "money") {
|
|
20545
21490
|
_this.internalFilters.push({
|
|
20546
21491
|
column: column.prop + "_from",
|
|
20547
|
-
op:
|
|
21492
|
+
op: ">=",
|
|
20548
21493
|
value: null
|
|
20549
21494
|
});
|
|
20550
21495
|
_this.internalFilters.push({
|
|
20551
21496
|
column: column.prop + "_to",
|
|
20552
|
-
op:
|
|
21497
|
+
op: "<=",
|
|
20553
21498
|
value: null
|
|
20554
21499
|
});
|
|
20555
21500
|
} else {
|
|
@@ -20568,6 +21513,46 @@ axios.default = axios;var crudApi = {
|
|
|
20568
21513
|
});
|
|
20569
21514
|
}
|
|
20570
21515
|
});
|
|
21516
|
+
|
|
21517
|
+
// Procesar filtros custom
|
|
21518
|
+
if (this.customFilters && Array.isArray(this.customFilters)) {
|
|
21519
|
+
this.customFilters.forEach(function (customFilter) {
|
|
21520
|
+
if (_this.isCustomFilterEnabled(customFilter)) {
|
|
21521
|
+
// Si el tipo es función (callback), no procesamos automáticamente
|
|
21522
|
+
// El callback se encargará del renderizado y gestión del filtro
|
|
21523
|
+
if (typeof customFilter.type === 'string') {
|
|
21524
|
+
if (customFilter.type == "date" || customFilter.type == "number" || customFilter.type == "money") {
|
|
21525
|
+
_this.internalFilters.push({
|
|
21526
|
+
column: customFilter.prop + "_from",
|
|
21527
|
+
op: ">=",
|
|
21528
|
+
value: null
|
|
21529
|
+
});
|
|
21530
|
+
_this.internalFilters.push({
|
|
21531
|
+
column: customFilter.prop + "_to",
|
|
21532
|
+
op: "<=",
|
|
21533
|
+
value: null
|
|
21534
|
+
});
|
|
21535
|
+
} else {
|
|
21536
|
+
_this.internalFilters.push({
|
|
21537
|
+
column: customFilter.prop,
|
|
21538
|
+
op: customFilter.filterOp ? customFilter.filterOp : "=",
|
|
21539
|
+
value: null
|
|
21540
|
+
});
|
|
21541
|
+
}
|
|
21542
|
+
} else if (typeof customFilter.type === 'function') {
|
|
21543
|
+
// Para callbacks, solo creamos el filtro interno si no existe
|
|
21544
|
+
// El callback se encargará del renderizado
|
|
21545
|
+
if (!_this.internalFilterByProp(customFilter.prop)) {
|
|
21546
|
+
_this.internalFilters.push({
|
|
21547
|
+
column: customFilter.prop,
|
|
21548
|
+
op: customFilter.filterOp ? customFilter.filterOp : "=",
|
|
21549
|
+
value: null
|
|
21550
|
+
});
|
|
21551
|
+
}
|
|
21552
|
+
}
|
|
21553
|
+
}
|
|
21554
|
+
});
|
|
21555
|
+
}
|
|
20571
21556
|
},
|
|
20572
21557
|
toggleSortFilter: function toggleSortFilter(column) {
|
|
20573
21558
|
var _this2 = this;
|
|
@@ -20587,6 +21572,11 @@ axios.default = axios;var crudApi = {
|
|
|
20587
21572
|
toggleFilters: function toggleFilters() {
|
|
20588
21573
|
this.filtersVisible = !this.filtersVisible;
|
|
20589
21574
|
this.filterSidebarOpen = this.filtersVisible;
|
|
21575
|
+
|
|
21576
|
+
// Si se está abriendo el sidebar y los filtros no están inicializados, inicializarlos
|
|
21577
|
+
if (this.filtersVisible && this.internalFilters.length === 0) {
|
|
21578
|
+
this.setupFilters();
|
|
21579
|
+
}
|
|
20590
21580
|
},
|
|
20591
21581
|
resetFilters: function resetFilters() {
|
|
20592
21582
|
var _this3 = this;
|
|
@@ -20603,6 +21593,9 @@ axios.default = axios;var crudApi = {
|
|
|
20603
21593
|
isColumnHasFilter: function isColumnHasFilter(column) {
|
|
20604
21594
|
return column && !column.hideFilter && column.type != "actions";
|
|
20605
21595
|
},
|
|
21596
|
+
isCustomFilterEnabled: function isCustomFilterEnabled(customFilter) {
|
|
21597
|
+
return customFilter && customFilter.prop && !customFilter.hideFilter && customFilter.type != "actions";
|
|
21598
|
+
},
|
|
20606
21599
|
setFilter: function setFilter(column, value) {
|
|
20607
21600
|
var _this4 = this;
|
|
20608
21601
|
var filter = this.filter.find(function (f) {
|
|
@@ -20632,17 +21625,42 @@ axios.default = axios;var crudApi = {
|
|
|
20632
21625
|
}
|
|
20633
21626
|
};var crudValidation = {
|
|
20634
21627
|
methods: {
|
|
21628
|
+
normalizeOptions: function normalizeOptions(options) {
|
|
21629
|
+
if (!Array.isArray(options)) {
|
|
21630
|
+
return options;
|
|
21631
|
+
}
|
|
21632
|
+
return options.map(function (option) {
|
|
21633
|
+
var normalized = _objectSpread2({}, option);
|
|
21634
|
+
|
|
21635
|
+
// Asegurar que siempre tenga id, value y text
|
|
21636
|
+
if (normalized.id === undefined && normalized.value !== undefined) {
|
|
21637
|
+
normalized.id = normalized.value;
|
|
21638
|
+
} else if (normalized.value === undefined && normalized.id !== undefined) {
|
|
21639
|
+
normalized.value = normalized.id;
|
|
21640
|
+
} else if (normalized.id === undefined && normalized.value === undefined) {
|
|
21641
|
+
// Si no tiene ni id ni value, usar text o label como valor por defecto
|
|
21642
|
+
normalized.id = normalized.text || normalized.label || "";
|
|
21643
|
+
normalized.value = normalized.id;
|
|
21644
|
+
}
|
|
21645
|
+
|
|
21646
|
+
// Asegurar que siempre tenga text
|
|
21647
|
+
if (normalized.text === undefined) {
|
|
21648
|
+
normalized.text = normalized.label !== undefined ? normalized.label : "";
|
|
21649
|
+
}
|
|
21650
|
+
return normalized;
|
|
21651
|
+
});
|
|
21652
|
+
},
|
|
20635
21653
|
loadOptions: function loadOptions() {
|
|
20636
21654
|
var _this = this;
|
|
20637
21655
|
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
20638
|
-
var i, column, options;
|
|
21656
|
+
var i, column, options, normalizedOptions;
|
|
20639
21657
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
20640
21658
|
while (1) switch (_context.prev = _context.next) {
|
|
20641
21659
|
case 0:
|
|
20642
21660
|
i = 0;
|
|
20643
21661
|
case 1:
|
|
20644
21662
|
if (!(i < _this.columns.length)) {
|
|
20645
|
-
_context.next =
|
|
21663
|
+
_context.next = 13;
|
|
20646
21664
|
break;
|
|
20647
21665
|
}
|
|
20648
21666
|
column = _this.columns[i];
|
|
@@ -20659,12 +21677,20 @@ axios.default = axios;var crudApi = {
|
|
|
20659
21677
|
}));
|
|
20660
21678
|
console.debug("Options promise", _this.columns);
|
|
20661
21679
|
case 9:
|
|
21680
|
+
// Normalizar opciones para columnas tipo state y array
|
|
21681
|
+
if ((column.type === 'state' || column.type === 'array') && Array.isArray(column.options)) {
|
|
21682
|
+
normalizedOptions = _this.normalizeOptions(column.options);
|
|
21683
|
+
_this.$set(_this.columns, i, _objectSpread2(_objectSpread2({}, column), {}, {
|
|
21684
|
+
options: normalizedOptions
|
|
21685
|
+
}));
|
|
21686
|
+
}
|
|
21687
|
+
case 10:
|
|
20662
21688
|
i++;
|
|
20663
21689
|
_context.next = 1;
|
|
20664
21690
|
break;
|
|
20665
|
-
case 12:
|
|
20666
|
-
_this.optionsLoaded = true;
|
|
20667
21691
|
case 13:
|
|
21692
|
+
_this.optionsLoaded = true;
|
|
21693
|
+
case 14:
|
|
20668
21694
|
case "end":
|
|
20669
21695
|
return _context.stop();
|
|
20670
21696
|
}
|
|
@@ -20693,22 +21719,70 @@ axios.default = axios;var crudApi = {
|
|
|
20693
21719
|
});
|
|
20694
21720
|
return values.join(",");
|
|
20695
21721
|
},
|
|
20696
|
-
|
|
20697
|
-
if (!options) {
|
|
20698
|
-
|
|
20699
|
-
|
|
21722
|
+
getStateOptions: function getStateOptions(value, options) {
|
|
21723
|
+
if (!options || !Array.isArray(options) || options.length === 0) {
|
|
21724
|
+
return [];
|
|
21725
|
+
}
|
|
21726
|
+
|
|
21727
|
+
// Asegurar que las opciones estén normalizadas (por si loadOptions no se ha ejecutado aún)
|
|
21728
|
+
var normalizedOptions = this.normalizeOptions(options);
|
|
21729
|
+
|
|
21730
|
+
// Si el valor es null o undefined, no hay coincidencias
|
|
21731
|
+
if (value === null || value === undefined) {
|
|
21732
|
+
return [];
|
|
20700
21733
|
}
|
|
20701
|
-
|
|
21734
|
+
|
|
21735
|
+
// Normalizar el valor para comparación (convertir a string)
|
|
21736
|
+
var normalizedValue = String(value).trim();
|
|
21737
|
+
return normalizedOptions.filter(function (option) {
|
|
21738
|
+
// Después de normalizar, las opciones siempre tienen id, value y text
|
|
21739
|
+
// Comparar tanto con id como con value para asegurar compatibilidad
|
|
21740
|
+
var optionId = option.id !== undefined && option.id !== null ? String(option.id).trim() : null;
|
|
21741
|
+
var optionValue = option.value !== undefined && option.value !== null ? String(option.value).trim() : null;
|
|
20702
21742
|
if (Array.isArray(value)) {
|
|
20703
|
-
|
|
21743
|
+
// Para arrays, verificar si alguno de los valores coincide
|
|
21744
|
+
return value.some(function (val) {
|
|
21745
|
+
if (val === null || val === undefined) return false;
|
|
21746
|
+
var normalizedVal = String(val).trim();
|
|
21747
|
+
return optionId && normalizedVal === optionId || optionValue && normalizedVal === optionValue;
|
|
21748
|
+
});
|
|
20704
21749
|
} else {
|
|
20705
|
-
|
|
21750
|
+
// Comparación estricta para valores únicos - comparar con ambos id y value
|
|
21751
|
+
return optionId && optionId === normalizedValue || optionValue && optionValue === normalizedValue;
|
|
20706
21752
|
}
|
|
20707
21753
|
});
|
|
20708
|
-
|
|
20709
|
-
|
|
20710
|
-
|
|
20711
|
-
|
|
21754
|
+
},
|
|
21755
|
+
getStateValue: function getStateValue(value, options) {
|
|
21756
|
+
if (!options) {
|
|
21757
|
+
console.debug("State Column Not hast options returning value", value, options);
|
|
21758
|
+
return value;
|
|
21759
|
+
}
|
|
21760
|
+
var ops = this.getStateOptions(value, options);
|
|
21761
|
+
return ops.map(function (option) {
|
|
21762
|
+
// Usar text directamente (ya normalizado)
|
|
21763
|
+
return option.text !== undefined ? option.text : "";
|
|
21764
|
+
}).join(", ");
|
|
21765
|
+
},
|
|
21766
|
+
getStateBadgeVariant: function getStateBadgeVariant(option) {
|
|
21767
|
+
// Si la opción tiene una propiedad variant, usarla
|
|
21768
|
+
if (option.variant) {
|
|
21769
|
+
return option.variant;
|
|
21770
|
+
}
|
|
21771
|
+
// Si no, intentar inferir del id/value común
|
|
21772
|
+
var idValue = String(option.id || option.value || '').toLowerCase();
|
|
21773
|
+
if (idValue.includes('active') || idValue.includes('activo')) {
|
|
21774
|
+
return 'success';
|
|
21775
|
+
} else if (idValue.includes('inactive') || idValue.includes('inactivo')) {
|
|
21776
|
+
return 'secondary';
|
|
21777
|
+
} else if (idValue.includes('pending') || idValue.includes('pendiente')) {
|
|
21778
|
+
return 'warning';
|
|
21779
|
+
} else if (idValue.includes('done') || idValue.includes('completado')) {
|
|
21780
|
+
return 'success';
|
|
21781
|
+
} else if (idValue.includes('error') || idValue.includes('error')) {
|
|
21782
|
+
return 'danger';
|
|
21783
|
+
}
|
|
21784
|
+
// Variante por defecto
|
|
21785
|
+
return 'primary';
|
|
20712
21786
|
}
|
|
20713
21787
|
}
|
|
20714
21788
|
};var crudHelpers = {
|
|
@@ -20870,46 +21944,146 @@ axios.default = axios;var crudApi = {
|
|
|
20870
21944
|
this.$emit("selectItems", this.selectedItems);
|
|
20871
21945
|
},
|
|
20872
21946
|
showItem: function showItem(id) {
|
|
21947
|
+
var _this5 = this;
|
|
20873
21948
|
var itemIndex = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
21949
|
+
var item;
|
|
20874
21950
|
if (itemIndex == null) {
|
|
20875
|
-
|
|
21951
|
+
item = this.items.find(function (it) {
|
|
20876
21952
|
return it.id == id;
|
|
20877
21953
|
});
|
|
20878
|
-
this.item = item;
|
|
20879
21954
|
} else {
|
|
20880
|
-
|
|
21955
|
+
item = this.items[itemIndex];
|
|
21956
|
+
}
|
|
21957
|
+
if (!item) {
|
|
21958
|
+
console.warn('Item not found for showItem');
|
|
21959
|
+
return;
|
|
21960
|
+
}
|
|
21961
|
+
|
|
21962
|
+
// Hacer copia profunda del objeto para asegurar reactividad
|
|
21963
|
+
var itemCopy = JSON.parse(JSON.stringify(item));
|
|
21964
|
+
if (this.useVuexORM && !this.vuexLocalforage) {
|
|
21965
|
+
var modelInstance = new this.model(itemCopy);
|
|
21966
|
+
// Usar $set para cada propiedad para asegurar reactividad
|
|
21967
|
+
Object.keys(modelInstance).forEach(function (key) {
|
|
21968
|
+
_this5.$set(_this5.item, key, modelInstance[key]);
|
|
21969
|
+
});
|
|
21970
|
+
// Eliminar propiedades que ya no existen
|
|
21971
|
+
Object.keys(this.item).forEach(function (key) {
|
|
21972
|
+
if (!(key in modelInstance)) {
|
|
21973
|
+
_this5.$delete(_this5.item, key);
|
|
21974
|
+
}
|
|
21975
|
+
});
|
|
21976
|
+
} else {
|
|
21977
|
+
// Usar $set para cada propiedad para asegurar reactividad
|
|
21978
|
+
Object.keys(itemCopy).forEach(function (key) {
|
|
21979
|
+
_this5.$set(_this5.item, key, itemCopy[key]);
|
|
21980
|
+
});
|
|
21981
|
+
// Eliminar propiedades que ya no existen
|
|
21982
|
+
Object.keys(this.item).forEach(function (key) {
|
|
21983
|
+
if (!(key in itemCopy)) {
|
|
21984
|
+
_this5.$delete(_this5.item, key);
|
|
21985
|
+
}
|
|
21986
|
+
});
|
|
20881
21987
|
}
|
|
21988
|
+
|
|
21989
|
+
// Forzar actualización para asegurar que los cambios se reflejen
|
|
21990
|
+
this.$forceUpdate();
|
|
20882
21991
|
this.onSelect();
|
|
20883
|
-
this.$
|
|
21992
|
+
this.$nextTick(function () {
|
|
21993
|
+
_this5.$forceUpdate();
|
|
21994
|
+
_this5.$bvModal.show("modal-show-item-" + _this5.modelName);
|
|
21995
|
+
});
|
|
20884
21996
|
},
|
|
20885
21997
|
createItem: function createItem() {
|
|
20886
|
-
|
|
20887
|
-
|
|
20888
|
-
|
|
20889
|
-
|
|
20890
|
-
|
|
20891
|
-
|
|
21998
|
+
var _this6 = this;
|
|
21999
|
+
// Hacer copia profunda del objeto para asegurar reactividad
|
|
22000
|
+
var itemCopy = JSON.parse(JSON.stringify(this.itemDefault));
|
|
22001
|
+
if (this.useVuexORM && !this.vuexLocalforage) {
|
|
22002
|
+
var modelInstance = new this.model(itemCopy);
|
|
22003
|
+
// Usar $set para cada propiedad para asegurar reactividad
|
|
22004
|
+
Object.keys(modelInstance).forEach(function (key) {
|
|
22005
|
+
_this6.$set(_this6.item, key, modelInstance[key]);
|
|
22006
|
+
});
|
|
22007
|
+
// Eliminar propiedades que ya no existen
|
|
22008
|
+
Object.keys(this.item).forEach(function (key) {
|
|
22009
|
+
if (!(key in modelInstance)) {
|
|
22010
|
+
_this6.$delete(_this6.item, key);
|
|
22011
|
+
}
|
|
22012
|
+
});
|
|
20892
22013
|
} else {
|
|
20893
|
-
|
|
22014
|
+
// Usar $set para cada propiedad para asegurar reactividad
|
|
22015
|
+
Object.keys(itemCopy).forEach(function (key) {
|
|
22016
|
+
_this6.$set(_this6.item, key, itemCopy[key]);
|
|
22017
|
+
});
|
|
22018
|
+
// Eliminar propiedades que ya no existen
|
|
22019
|
+
Object.keys(this.item).forEach(function (key) {
|
|
22020
|
+
if (!(key in itemCopy)) {
|
|
22021
|
+
_this6.$delete(_this6.item, key);
|
|
22022
|
+
}
|
|
22023
|
+
});
|
|
20894
22024
|
}
|
|
22025
|
+
|
|
22026
|
+
// Forzar actualización para asegurar que los cambios se reflejen
|
|
22027
|
+
this.$forceUpdate();
|
|
20895
22028
|
this.onSelect();
|
|
20896
|
-
this.$
|
|
22029
|
+
this.$nextTick(function () {
|
|
22030
|
+
_this6.$forceUpdate();
|
|
22031
|
+
_this6.$bvModal.show("modal-form-item-" + _this6.modelName);
|
|
22032
|
+
});
|
|
20897
22033
|
},
|
|
20898
22034
|
updateItem: function updateItem(id) {
|
|
22035
|
+
var _this7 = this;
|
|
20899
22036
|
var itemIndex = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
22037
|
+
var item;
|
|
20900
22038
|
if (itemIndex == null) {
|
|
20901
|
-
|
|
22039
|
+
item = this.items.find(function (it) {
|
|
20902
22040
|
return it.id == id;
|
|
20903
22041
|
});
|
|
20904
|
-
this.item = item;
|
|
20905
22042
|
} else {
|
|
20906
|
-
|
|
22043
|
+
item = this.items[itemIndex];
|
|
22044
|
+
}
|
|
22045
|
+
if (!item) {
|
|
22046
|
+
console.warn('Item not found for updateItem');
|
|
22047
|
+
return;
|
|
22048
|
+
}
|
|
22049
|
+
|
|
22050
|
+
// Hacer copia profunda del objeto para asegurar reactividad
|
|
22051
|
+
var itemCopy = JSON.parse(JSON.stringify(item));
|
|
22052
|
+
if (this.useVuexORM && !this.vuexLocalforage) {
|
|
22053
|
+
var modelInstance = new this.model(itemCopy);
|
|
22054
|
+
// Usar $set para cada propiedad para asegurar reactividad
|
|
22055
|
+
Object.keys(modelInstance).forEach(function (key) {
|
|
22056
|
+
_this7.$set(_this7.item, key, modelInstance[key]);
|
|
22057
|
+
});
|
|
22058
|
+
// Eliminar propiedades que ya no existen
|
|
22059
|
+
Object.keys(this.item).forEach(function (key) {
|
|
22060
|
+
if (!(key in modelInstance)) {
|
|
22061
|
+
_this7.$delete(_this7.item, key);
|
|
22062
|
+
}
|
|
22063
|
+
});
|
|
22064
|
+
} else {
|
|
22065
|
+
// Usar $set para cada propiedad para asegurar reactividad
|
|
22066
|
+
Object.keys(itemCopy).forEach(function (key) {
|
|
22067
|
+
_this7.$set(_this7.item, key, itemCopy[key]);
|
|
22068
|
+
});
|
|
22069
|
+
// Eliminar propiedades que ya no existen
|
|
22070
|
+
Object.keys(this.item).forEach(function (key) {
|
|
22071
|
+
if (!(key in itemCopy)) {
|
|
22072
|
+
_this7.$delete(_this7.item, key);
|
|
22073
|
+
}
|
|
22074
|
+
});
|
|
20907
22075
|
}
|
|
22076
|
+
|
|
22077
|
+
// Forzar actualización para asegurar que los cambios se reflejen
|
|
22078
|
+
this.$forceUpdate();
|
|
20908
22079
|
this.onSelect();
|
|
20909
|
-
this.$
|
|
22080
|
+
this.$nextTick(function () {
|
|
22081
|
+
_this7.$forceUpdate();
|
|
22082
|
+
_this7.$bvModal.show("modal-form-item-" + _this7.modelName);
|
|
22083
|
+
});
|
|
20910
22084
|
},
|
|
20911
22085
|
removeItem: function removeItem(id, index) {
|
|
20912
|
-
var
|
|
22086
|
+
var _this8 = this;
|
|
20913
22087
|
this.$bvModal.msgBoxConfirm(this.messageRemoveConfirm, {
|
|
20914
22088
|
size: "sm",
|
|
20915
22089
|
buttonSize: "sm",
|
|
@@ -20919,15 +22093,15 @@ axios.default = axios;var crudApi = {
|
|
|
20919
22093
|
centered: true
|
|
20920
22094
|
}).then(function (value) {
|
|
20921
22095
|
if (value) {
|
|
20922
|
-
|
|
22096
|
+
_this8.deleteItem(id, index);
|
|
20923
22097
|
}
|
|
20924
22098
|
}).catch(function (error) {
|
|
20925
|
-
|
|
20926
|
-
|
|
22099
|
+
_this8.toastError(error);
|
|
22100
|
+
_this8.loading = false;
|
|
20927
22101
|
});
|
|
20928
22102
|
},
|
|
20929
22103
|
confirmBulkDelete: function confirmBulkDelete() {
|
|
20930
|
-
var
|
|
22104
|
+
var _this9 = this;
|
|
20931
22105
|
this.$bvModal.msgBoxConfirm(this.messageRemoveBulkConfirm, {
|
|
20932
22106
|
size: "sm",
|
|
20933
22107
|
buttonSize: "sm",
|
|
@@ -20937,21 +22111,40 @@ axios.default = axios;var crudApi = {
|
|
|
20937
22111
|
centered: true
|
|
20938
22112
|
}).then(function (value) {
|
|
20939
22113
|
if (value) {
|
|
20940
|
-
|
|
22114
|
+
_this9.deleteItemBulk();
|
|
20941
22115
|
}
|
|
20942
22116
|
}).catch(function (error) {
|
|
20943
|
-
|
|
20944
|
-
|
|
22117
|
+
_this9.toastError(error);
|
|
22118
|
+
_this9.loading = false;
|
|
20945
22119
|
});
|
|
20946
22120
|
},
|
|
20947
22121
|
toggleDisplayMode: function toggleDisplayMode() {
|
|
20948
|
-
|
|
22122
|
+
// Mutar la propiedad local _displayMode y el objeto reactivo
|
|
22123
|
+
if (this._displayMode == this.displayModes.MODE_TABLE) {
|
|
22124
|
+
this._displayMode = this.displayModes.MODE_CARDS;
|
|
22125
|
+
if (this.displayModeReactive) {
|
|
22126
|
+
this.displayModeReactive.value = this.displayModes.MODE_CARDS;
|
|
22127
|
+
}
|
|
22128
|
+
} else if (this._displayMode == this.displayModes.MODE_CARDS) {
|
|
22129
|
+
this._displayMode = this.displayModes.MODE_TABLE;
|
|
22130
|
+
if (this.displayModeReactive) {
|
|
22131
|
+
this.displayModeReactive.value = this.displayModes.MODE_TABLE;
|
|
22132
|
+
}
|
|
22133
|
+
}
|
|
20949
22134
|
},
|
|
20950
22135
|
showExportModal: function showExportModal() {
|
|
20951
|
-
|
|
22136
|
+
// Asegurar que loading esté en false al abrir el modal
|
|
22137
|
+
this.loading = false;
|
|
22138
|
+
if (this.$refs.crudModals && this.$refs.crudModals.$refs["modal-export"]) {
|
|
22139
|
+
this.$refs.crudModals.$refs["modal-export"].show();
|
|
22140
|
+
}
|
|
20952
22141
|
},
|
|
20953
22142
|
showImportModal: function showImportModal() {
|
|
20954
|
-
|
|
22143
|
+
// Asegurar que loading esté en false al abrir el modal
|
|
22144
|
+
this.loading = false;
|
|
22145
|
+
if (this.$refs.crudModals && this.$refs.crudModals.$refs["modal-import"]) {
|
|
22146
|
+
this.$refs.crudModals.$refs["modal-import"].show();
|
|
22147
|
+
}
|
|
20955
22148
|
},
|
|
20956
22149
|
onDraggableAdded: function onDraggableAdded(event) {
|
|
20957
22150
|
this.$emit("draggableAdded", event);
|
|
@@ -21049,7 +22242,7 @@ axios.default = axios;var crudApi = {
|
|
|
21049
22242
|
link.click();
|
|
21050
22243
|
}
|
|
21051
22244
|
}
|
|
21052
|
-
};var css = "tr td[data-v-
|
|
22245
|
+
};var css = "tr td[data-v-3751aeba]:last-child,\ntr td[data-v-3751aeba]:first-child {\n width: 1%;\n white-space: nowrap; }\n\ntbody tr.selected[data-v-3751aeba] {\n background-color: #e3f2fd !important; }\n tbody tr.selected[data-v-3751aeba] td[data-v-3751aeba] {\n background-color: transparent !important; }\n tbody tr.selected[data-v-3751aeba][data-v-3751aeba]:hover {\n background-color: #bbdefb !important; }\n tbody tr.selected[data-v-3751aeba][data-v-3751aeba]:hover td[data-v-3751aeba] {\n background-color: transparent !important; }\n\n.table-striped tbody tr.selected[data-v-3751aeba]:nth-of-type(odd) {\n background-color: #e3f2fd !important; }\n .table-striped tbody tr.selected[data-v-3751aeba]:nth-of-type(odd) td[data-v-3751aeba] {\n background-color: transparent !important; }\n\n.table-striped tbody tr.selected[data-v-3751aeba]:nth-of-type(even) {\n background-color: #e3f2fd !important; }\n .table-striped tbody tr.selected[data-v-3751aeba]:nth-of-type(even) td[data-v-3751aeba] {\n background-color: transparent !important; }\n\n.crud-pagination[data-v-3751aeba] {\n display: flex;\n align-items: center;\n width: 100%;\n justify-content: center;\n margin-top: 1rem; }\n\n.crud-header[data-v-3751aeba] {\n display: flex;\n justify-content: space-between;\n max-height: 3rem; }\n .crud-header[data-v-3751aeba] .crud-title[data-v-3751aeba] {\n margin: 0; }\n .crud-header[data-v-3751aeba] .crud-search[data-v-3751aeba] {\n max-width: 15rem; }\n .crud-header[data-v-3751aeba] .crud-search[data-v-3751aeba] .btn[data-v-3751aeba] {\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n border-top-right-radius: 0.375rem;\n border-bottom-right-radius: 0.375rem; }\n .crud-header[data-v-3751aeba] .crud-search[data-v-3751aeba] .btn[data-v-3751aeba].open[data-v-3751aeba] {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0; }\n .crud-header[data-v-3751aeba] .table-options[data-v-3751aeba] {\n margin-bottom: 1rem;\n display: flex;\n align-items: center;\n justify-content: flex-end; }\n\n.custom-control[data-v-3751aeba] {\n position: relative; }\n\n@media (min-width: 992px) {\n .table[data-v-3751aeba] {\n table-layout: auto; }\n .table[data-v-3751aeba] tbody[data-v-3751aeba] td[data-v-3751aeba] {\n overflow: scroll;\n -ms-overflow-style: none;\n /* IE and Edge */\n scrollbar-width: none;\n /* Firefox */ }\n .table[data-v-3751aeba] tbody[data-v-3751aeba] td[data-v-3751aeba]::-webkit-scrollbar {\n display: none; } }\n\n.kanban-board[data-v-3751aeba] {\n display: flex;\n gap: 1rem;\n overflow-x: auto;\n padding: 1rem; }\n\n.kanban-column[data-v-3751aeba] {\n background: #f4f5f7;\n border-radius: 8px;\n width: 300px;\n display: flex;\n flex-direction: column;\n box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); }\n\n.kanban-column-header[data-v-3751aeba] {\n font-weight: bold;\n padding: 0.5rem;\n background: #dfe1e6;\n border-radius: 8px 8px 0 0;\n text-align: center; }\n\n.kanban-column-body[data-v-3751aeba] {\n padding: 0.5rem;\n min-height: 100px;\n background: #ffffff;\n border-radius: 0 0 8px 8px;\n display: flex;\n flex-direction: column;\n gap: 0.5rem; }\n\n.kanban-card[data-v-3751aeba] {\n background: #ffffff;\n border-radius: 4px;\n padding: 1rem;\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);\n cursor: grab; }\n";
|
|
21053
22246
|
n(css, {});var _sfc_main = {
|
|
21054
22247
|
name: "VueLaravelCrud",
|
|
21055
22248
|
components: {
|
|
@@ -21063,6 +22256,7 @@ n(css, {});var _sfc_main = {
|
|
|
21063
22256
|
},
|
|
21064
22257
|
mixins: [crudData, crudApi, crudFilters, crudValidation, crudHelpers],
|
|
21065
22258
|
provide: function provide() {
|
|
22259
|
+
var _this = this;
|
|
21066
22260
|
return {
|
|
21067
22261
|
// Props
|
|
21068
22262
|
modelName: this.modelName,
|
|
@@ -21075,6 +22269,7 @@ n(css, {});var _sfc_main = {
|
|
|
21075
22269
|
vuexLocalforage: this.vuexLocalforage,
|
|
21076
22270
|
columns: this.columns,
|
|
21077
22271
|
filter: this.filter,
|
|
22272
|
+
customFilters: this.customFilters,
|
|
21078
22273
|
enableFilters: this.enableFilters,
|
|
21079
22274
|
infiniteScroll: this.infiniteScroll,
|
|
21080
22275
|
sortable: this.sortable,
|
|
@@ -21095,7 +22290,7 @@ n(css, {});var _sfc_main = {
|
|
|
21095
22290
|
showHeader: this.showHeader,
|
|
21096
22291
|
showTitle: this.showTitle,
|
|
21097
22292
|
limit: this.limit,
|
|
21098
|
-
displayMode: this.
|
|
22293
|
+
displayMode: this.displayModeReactive,
|
|
21099
22294
|
displayModeToggler: this.displayModeToggler,
|
|
21100
22295
|
colXs: this.colXs,
|
|
21101
22296
|
colSm: this.colSm,
|
|
@@ -21141,8 +22336,12 @@ n(css, {});var _sfc_main = {
|
|
|
21141
22336
|
// Data from mixins
|
|
21142
22337
|
crudUuid: this.crudUuid,
|
|
21143
22338
|
moment: this.moment,
|
|
21144
|
-
loading: this.
|
|
21145
|
-
firstLoad: this.
|
|
22339
|
+
loading: this.loadingReactive,
|
|
22340
|
+
firstLoad: this.firstLoadReactive,
|
|
22341
|
+
// Proporcionar item como función getter para reactividad
|
|
22342
|
+
getItem: function getItem() {
|
|
22343
|
+
return _this.item;
|
|
22344
|
+
},
|
|
21146
22345
|
item: this.item,
|
|
21147
22346
|
items: this.items,
|
|
21148
22347
|
selectedItems: this.selectedItems,
|
|
@@ -21207,12 +22406,15 @@ n(css, {});var _sfc_main = {
|
|
|
21207
22406
|
toggleFilters: this.toggleFilters,
|
|
21208
22407
|
resetFilters: this.resetFilters,
|
|
21209
22408
|
isColumnHasFilter: this.isColumnHasFilter,
|
|
22409
|
+
isCustomFilterEnabled: this.isCustomFilterEnabled,
|
|
21210
22410
|
setFilter: this.setFilter,
|
|
21211
22411
|
onChangeFilter: this.onChangeFilter,
|
|
21212
22412
|
togglePrincipalSort: this.togglePrincipalSort,
|
|
21213
22413
|
loadOptions: this.loadOptions,
|
|
21214
22414
|
getArrayValue: this.getArrayValue,
|
|
21215
22415
|
getStateValue: this.getStateValue,
|
|
22416
|
+
getStateOptions: this.getStateOptions,
|
|
22417
|
+
getStateBadgeVariant: this.getStateBadgeVariant,
|
|
21216
22418
|
onRowHover: this.onRowHover,
|
|
21217
22419
|
onRowClick: this.onRowClick,
|
|
21218
22420
|
onSort: this.onSort,
|
|
@@ -21288,6 +22490,12 @@ n(css, {});var _sfc_main = {
|
|
|
21288
22490
|
return [];
|
|
21289
22491
|
}
|
|
21290
22492
|
},
|
|
22493
|
+
customFilters: {
|
|
22494
|
+
type: Array,
|
|
22495
|
+
default: function _default() {
|
|
22496
|
+
return [];
|
|
22497
|
+
}
|
|
22498
|
+
},
|
|
21291
22499
|
enableFilters: {
|
|
21292
22500
|
type: Boolean,
|
|
21293
22501
|
default: false
|
|
@@ -21547,12 +22755,40 @@ var _sfc_render = function render() {
|
|
|
21547
22755
|
_c = _vm._self._c;
|
|
21548
22756
|
return _c('div', {
|
|
21549
22757
|
staticClass: "crud"
|
|
21550
|
-
}, [_c('CrudHeader'), _c('CrudTable'
|
|
22758
|
+
}, [_c('CrudHeader'), _c('CrudTable', {
|
|
22759
|
+
scopedSlots: _vm._u([_vm._l(_vm.$scopedSlots, function (slot, name) {
|
|
22760
|
+
return {
|
|
22761
|
+
key: name,
|
|
22762
|
+
fn: function fn(slotProps) {
|
|
22763
|
+
return [_vm._t(name, null, null, slotProps)];
|
|
22764
|
+
}
|
|
22765
|
+
};
|
|
22766
|
+
})], null, true)
|
|
22767
|
+
}), _c('CrudCards', {
|
|
22768
|
+
scopedSlots: _vm._u([_vm._l(_vm.$scopedSlots, function (slot, name) {
|
|
22769
|
+
return {
|
|
22770
|
+
key: name,
|
|
22771
|
+
fn: function fn(slotProps) {
|
|
22772
|
+
return [_vm._t(name, null, null, slotProps)];
|
|
22773
|
+
}
|
|
22774
|
+
};
|
|
22775
|
+
})], null, true)
|
|
22776
|
+
}), _c('CrudKanban', {
|
|
22777
|
+
scopedSlots: _vm._u([_vm._l(_vm.$scopedSlots, function (slot, name) {
|
|
22778
|
+
return {
|
|
22779
|
+
key: name,
|
|
22780
|
+
fn: function fn(slotProps) {
|
|
22781
|
+
return [_vm._t(name, null, null, slotProps)];
|
|
22782
|
+
}
|
|
22783
|
+
};
|
|
22784
|
+
})], null, true)
|
|
22785
|
+
}), _c('CrudCustom'), _c('b-overlay', {
|
|
21551
22786
|
attrs: {
|
|
21552
22787
|
"show": _vm.loading,
|
|
21553
22788
|
"rounded": "sm"
|
|
21554
22789
|
}
|
|
21555
22790
|
}), _c('CrudPagination'), _c('CrudModals', {
|
|
22791
|
+
ref: "crudModals",
|
|
21556
22792
|
scopedSlots: _vm._u([_vm._l(_vm.$scopedSlots, function (slot, name) {
|
|
21557
22793
|
return {
|
|
21558
22794
|
key: name,
|
|
@@ -21564,7 +22800,7 @@ var _sfc_render = function render() {
|
|
|
21564
22800
|
})], 1);
|
|
21565
22801
|
};
|
|
21566
22802
|
var _sfc_staticRenderFns = [];
|
|
21567
|
-
var __component__ = /*#__PURE__*/normalizeComponent(_sfc_main, _sfc_render, _sfc_staticRenderFns, false, null, "
|
|
22803
|
+
var __component__ = /*#__PURE__*/normalizeComponent(_sfc_main, _sfc_render, _sfc_staticRenderFns, false, null, "3751aeba", null, null);
|
|
21568
22804
|
var component$1 = __component__.exports;// Import vue component
|
|
21569
22805
|
|
|
21570
22806
|
// Default export is installable instance of component.
|