@iankibetsh/shframework 1.2.5 → 1.2.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/dist/library.mjs.css +42 -42
- package/dist/library.js +462 -397
- package/dist/library.mjs +452 -387
- package/package.json +3 -2
package/dist/library.js
CHANGED
|
@@ -169,7 +169,8 @@ const Toast = Swal__default["default"].mixin({
|
|
|
169
169
|
}
|
|
170
170
|
});
|
|
171
171
|
function getShConfig(key = null,def = '') {
|
|
172
|
-
|
|
172
|
+
|
|
173
|
+
const config = ShStorage.getItem('ShConfig') ?? {};
|
|
173
174
|
if(key) {
|
|
174
175
|
return config[key] ?? def
|
|
175
176
|
}
|
|
@@ -369,6 +370,7 @@ if (process.env.NODE_ENV === 'production') {
|
|
|
369
370
|
const axios = Axios__default["default"].create({
|
|
370
371
|
baseURL: apiUrl
|
|
371
372
|
});
|
|
373
|
+
window.shAxionInstance = axios;
|
|
372
374
|
function doGet (endPoint, data) {
|
|
373
375
|
updateSession();
|
|
374
376
|
return axios.get(endPoint, {
|
|
@@ -1870,7 +1872,7 @@ const countries = [
|
|
|
1870
1872
|
}
|
|
1871
1873
|
];
|
|
1872
1874
|
|
|
1873
|
-
var script$
|
|
1875
|
+
var script$h = {
|
|
1874
1876
|
name: 'ShPhone',
|
|
1875
1877
|
props: ['modelValue', 'country_code'],
|
|
1876
1878
|
data () {
|
|
@@ -1975,10 +1977,10 @@ function render$7(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1975
1977
|
]))
|
|
1976
1978
|
}
|
|
1977
1979
|
|
|
1978
|
-
script$
|
|
1979
|
-
script$
|
|
1980
|
+
script$h.render = render$7;
|
|
1981
|
+
script$h.__file = "src/lib/components/form-components/ShPhone.vue";
|
|
1980
1982
|
|
|
1981
|
-
var script$
|
|
1983
|
+
var script$g = {
|
|
1982
1984
|
name: 'ShEditor',
|
|
1983
1985
|
props: ['modelValue'],
|
|
1984
1986
|
components: {
|
|
@@ -2052,8 +2054,8 @@ function render$6(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2052
2054
|
], 64 /* STABLE_FRAGMENT */))
|
|
2053
2055
|
}
|
|
2054
2056
|
|
|
2055
|
-
script$
|
|
2056
|
-
script$
|
|
2057
|
+
script$g.render = render$6;
|
|
2058
|
+
script$g.__file = "src/lib/components/form-components/ShEditor.vue";
|
|
2057
2059
|
|
|
2058
2060
|
const _hoisted_1$d = {
|
|
2059
2061
|
key: 0,
|
|
@@ -2062,8 +2064,8 @@ const _hoisted_1$d = {
|
|
|
2062
2064
|
const _hoisted_2$a = ["id"];
|
|
2063
2065
|
const _hoisted_3$9 = { class: "badge bg-secondary m-1 sh-selected-item" };
|
|
2064
2066
|
const _hoisted_4$9 = ["onClick"];
|
|
2065
|
-
const _hoisted_5$
|
|
2066
|
-
const _hoisted_6$
|
|
2067
|
+
const _hoisted_5$7 = ["id"];
|
|
2068
|
+
const _hoisted_6$6 = ["id", "aria-labelledby"];
|
|
2067
2069
|
const _hoisted_7$4 = { key: 0 };
|
|
2068
2070
|
const _hoisted_8$3 = ["onClick"];
|
|
2069
2071
|
const _hoisted_9$4 = {
|
|
@@ -2076,7 +2078,7 @@ const _hoisted_10$3 = {
|
|
|
2076
2078
|
};
|
|
2077
2079
|
|
|
2078
2080
|
|
|
2079
|
-
var script$
|
|
2081
|
+
var script$f = {
|
|
2080
2082
|
__name: 'ShSuggest',
|
|
2081
2083
|
props: ['fillSelects','modelValue'],
|
|
2082
2084
|
emits: ['update:modelValue'],
|
|
@@ -2183,7 +2185,7 @@ return (_ctx, _cache) => {
|
|
|
2183
2185
|
onClick: filterData,
|
|
2184
2186
|
onInput: filterData,
|
|
2185
2187
|
class: "flex-fill h-100 sh-suggestion-input"
|
|
2186
|
-
}, null, 40 /* PROPS, HYDRATE_EVENTS */, _hoisted_5$
|
|
2188
|
+
}, null, 40 /* PROPS, HYDRATE_EVENTS */, _hoisted_5$7)
|
|
2187
2189
|
], 8 /* PROPS */, _hoisted_2$a),
|
|
2188
2190
|
vue.createElementVNode("ul", {
|
|
2189
2191
|
class: "dropdown-menu w-100",
|
|
@@ -2209,7 +2211,7 @@ return (_ctx, _cache) => {
|
|
|
2209
2211
|
: (vue.unref(searchText))
|
|
2210
2212
|
? (vue.openBlock(), vue.createElementBlock("li", _hoisted_9$4, " No results found "))
|
|
2211
2213
|
: (vue.openBlock(), vue.createElementBlock("li", _hoisted_10$3, " Type to search... "))
|
|
2212
|
-
], 8 /* PROPS */, _hoisted_6$
|
|
2214
|
+
], 8 /* PROPS */, _hoisted_6$6)
|
|
2213
2215
|
]))
|
|
2214
2216
|
: vue.createCommentVNode("v-if", true)
|
|
2215
2217
|
}
|
|
@@ -2217,15 +2219,15 @@ return (_ctx, _cache) => {
|
|
|
2217
2219
|
|
|
2218
2220
|
};
|
|
2219
2221
|
|
|
2220
|
-
script$
|
|
2221
|
-
script$
|
|
2222
|
+
script$f.__scopeId = "data-v-71cc9569";
|
|
2223
|
+
script$f.__file = "src/lib/components/form-components/ShSuggest.vue";
|
|
2222
2224
|
|
|
2223
|
-
var script$
|
|
2225
|
+
var script$e = {
|
|
2224
2226
|
name: 'ShForm',
|
|
2225
2227
|
components: {
|
|
2226
|
-
ShSuggest: script$
|
|
2227
|
-
ShEditor: script$
|
|
2228
|
-
ShPhone: script$
|
|
2228
|
+
ShSuggest: script$f,
|
|
2229
|
+
ShEditor: script$g,
|
|
2230
|
+
ShPhone: script$h
|
|
2229
2231
|
},
|
|
2230
2232
|
props: [
|
|
2231
2233
|
'action',
|
|
@@ -2554,8 +2556,8 @@ const _hoisted_3$8 = {
|
|
|
2554
2556
|
role: "alert"
|
|
2555
2557
|
};
|
|
2556
2558
|
const _hoisted_4$8 = /*#__PURE__*/vue.createElementVNode("i", { class: "bi-exclamation-triangle-fill me-1" }, null, -1 /* HOISTED */);
|
|
2557
|
-
const _hoisted_5$
|
|
2558
|
-
const _hoisted_6$
|
|
2559
|
+
const _hoisted_5$6 = { key: 0 };
|
|
2560
|
+
const _hoisted_6$5 = { key: 1 };
|
|
2559
2561
|
const _hoisted_7$3 = { class: "row" };
|
|
2560
2562
|
const _hoisted_8$2 = { class: "fg-label control-label text-capitalize control-bel col-md-12 request-form-label mb-2" };
|
|
2561
2563
|
const _hoisted_9$3 = { class: "col-md-12" };
|
|
@@ -2613,8 +2615,8 @@ function render$5(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2613
2615
|
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$8, [
|
|
2614
2616
|
_hoisted_4$8,
|
|
2615
2617
|
(_ctx.errorText)
|
|
2616
|
-
? (vue.openBlock(), vue.createElementBlock("span", _hoisted_5$
|
|
2617
|
-
: (vue.openBlock(), vue.createElementBlock("span", _hoisted_6$
|
|
2618
|
+
? (vue.openBlock(), vue.createElementBlock("span", _hoisted_5$6, vue.toDisplayString(_ctx.errorText), 1 /* TEXT */))
|
|
2619
|
+
: (vue.openBlock(), vue.createElementBlock("span", _hoisted_6$5, "Unexpected Error Occurred")),
|
|
2618
2620
|
vue.createCommentVNode(" <button @click=\"hideError\" type=\"button\" class=\"btn-close\" aria-label=\"Close\"></button>")
|
|
2619
2621
|
]))
|
|
2620
2622
|
: vue.createCommentVNode("v-if", true),
|
|
@@ -2822,13 +2824,13 @@ function render$5(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2822
2824
|
], 64 /* STABLE_FRAGMENT */))
|
|
2823
2825
|
}
|
|
2824
2826
|
|
|
2825
|
-
script$
|
|
2826
|
-
script$
|
|
2827
|
+
script$e.render = render$5;
|
|
2828
|
+
script$e.__file = "src/lib/components/ShForm.vue";
|
|
2827
2829
|
|
|
2828
2830
|
const _hoisted_1$b = /*#__PURE__*/vue.createElementVNode("h5", { class: "d-none" }, "To prevent default class", -1 /* HOISTED */);
|
|
2829
2831
|
const _hoisted_2$8 = { class: "dropdown" };
|
|
2830
2832
|
|
|
2831
|
-
var script$
|
|
2833
|
+
var script$d = {
|
|
2832
2834
|
__name: 'ShDropDownForm',
|
|
2833
2835
|
props: ['action',
|
|
2834
2836
|
'classes',
|
|
@@ -2875,7 +2877,7 @@ return (_ctx, _cache) => {
|
|
|
2875
2877
|
class: "dropdown-menu px-2 py-1",
|
|
2876
2878
|
"aria-labelledby": dropdownId
|
|
2877
2879
|
}, [
|
|
2878
|
-
vue.createVNode(script$
|
|
2880
|
+
vue.createVNode(script$e, vue.normalizeProps(vue.guardReactiveProps(props)), null, 16 /* FULL_PROPS */)
|
|
2879
2881
|
])
|
|
2880
2882
|
])
|
|
2881
2883
|
], 64 /* STABLE_FRAGMENT */))
|
|
@@ -2884,9 +2886,9 @@ return (_ctx, _cache) => {
|
|
|
2884
2886
|
|
|
2885
2887
|
};
|
|
2886
2888
|
|
|
2887
|
-
script$
|
|
2889
|
+
script$d.__file = "src/lib/components/ShDropDownForm.vue";
|
|
2888
2890
|
|
|
2889
|
-
var script$
|
|
2891
|
+
var script$c = {
|
|
2890
2892
|
name: 'ShModal',
|
|
2891
2893
|
props: ['modalTitle', 'modalId', 'modalSize'],
|
|
2892
2894
|
components: {
|
|
@@ -2897,12 +2899,12 @@ const _hoisted_1$a = ["id"];
|
|
|
2897
2899
|
const _hoisted_2$7 = { class: "modal-content" };
|
|
2898
2900
|
const _hoisted_3$7 = { class: "modal-header" };
|
|
2899
2901
|
const _hoisted_4$7 = { class: "modal-title" };
|
|
2900
|
-
const _hoisted_5$
|
|
2902
|
+
const _hoisted_5$5 = /*#__PURE__*/vue.createElementVNode("button", {
|
|
2901
2903
|
class: "btn btn-danger btn-sm",
|
|
2902
2904
|
"data-bs-dismiss": "modal",
|
|
2903
2905
|
"data-dismiss": "modal"
|
|
2904
2906
|
}, "×", -1 /* HOISTED */);
|
|
2905
|
-
const _hoisted_6$
|
|
2907
|
+
const _hoisted_6$4 = { class: "modal-body" };
|
|
2906
2908
|
const _hoisted_7$2 = { class: "section" };
|
|
2907
2909
|
|
|
2908
2910
|
function render$4(_ctx, _cache, $props, $setup, $data, $options) {
|
|
@@ -2917,9 +2919,9 @@ function render$4(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2917
2919
|
vue.createElementVNode("div", _hoisted_2$7, [
|
|
2918
2920
|
vue.createElementVNode("div", _hoisted_3$7, [
|
|
2919
2921
|
vue.createElementVNode("h3", _hoisted_4$7, vue.toDisplayString($props.modalTitle), 1 /* TEXT */),
|
|
2920
|
-
_hoisted_5$
|
|
2922
|
+
_hoisted_5$5
|
|
2921
2923
|
]),
|
|
2922
|
-
vue.createElementVNode("div", _hoisted_6$
|
|
2924
|
+
vue.createElementVNode("div", _hoisted_6$4, [
|
|
2923
2925
|
vue.createElementVNode("div", _hoisted_7$2, [
|
|
2924
2926
|
vue.renderSlot(_ctx.$slots, "default")
|
|
2925
2927
|
])
|
|
@@ -2929,12 +2931,12 @@ function render$4(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2929
2931
|
], 8 /* PROPS */, _hoisted_1$a))
|
|
2930
2932
|
}
|
|
2931
2933
|
|
|
2932
|
-
script$
|
|
2933
|
-
script$
|
|
2934
|
+
script$c.render = render$4;
|
|
2935
|
+
script$c.__file = "src/lib/components/ShModal.vue";
|
|
2934
2936
|
|
|
2935
2937
|
const _hoisted_1$9 = ["href"];
|
|
2936
2938
|
|
|
2937
|
-
var script$
|
|
2939
|
+
var script$b = {
|
|
2938
2940
|
__name: 'ShModalForm',
|
|
2939
2941
|
props: ['action',
|
|
2940
2942
|
'classes',
|
|
@@ -2974,12 +2976,12 @@ return (_ctx, _cache) => {
|
|
|
2974
2976
|
}, [
|
|
2975
2977
|
vue.renderSlot(_ctx.$slots, "default")
|
|
2976
2978
|
], 10 /* CLASS, PROPS */, _hoisted_1$9),
|
|
2977
|
-
vue.createVNode(script$
|
|
2979
|
+
vue.createVNode(script$c, {
|
|
2978
2980
|
"modal-id": modalId,
|
|
2979
2981
|
"modal-title": __props.modalTitle
|
|
2980
2982
|
}, {
|
|
2981
2983
|
default: vue.withCtx(() => [
|
|
2982
|
-
vue.createVNode(script$
|
|
2984
|
+
vue.createVNode(script$e, vue.mergeProps({ onSuccess: success }, props), null, 16 /* FULL_PROPS */)
|
|
2983
2985
|
]),
|
|
2984
2986
|
_: 1 /* STABLE */
|
|
2985
2987
|
}, 8 /* PROPS */, ["modal-title"])
|
|
@@ -2989,9 +2991,9 @@ return (_ctx, _cache) => {
|
|
|
2989
2991
|
|
|
2990
2992
|
};
|
|
2991
2993
|
|
|
2992
|
-
script$
|
|
2994
|
+
script$b.__file = "src/lib/components/ShModalForm.vue";
|
|
2993
2995
|
|
|
2994
|
-
var script$
|
|
2996
|
+
var script$a = {
|
|
2995
2997
|
name: 'ShCanvas',
|
|
2996
2998
|
props: ['canvasTitle', 'canvasId', 'position','canvasSize'],
|
|
2997
2999
|
components: {
|
|
@@ -3041,10 +3043,10 @@ function render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3041
3043
|
], 10 /* CLASS, PROPS */, _hoisted_1$8))
|
|
3042
3044
|
}
|
|
3043
3045
|
|
|
3044
|
-
script$
|
|
3045
|
-
script$
|
|
3046
|
+
script$a.render = render$3;
|
|
3047
|
+
script$a.__file = "src/lib/components/ShCanvas.vue";
|
|
3046
3048
|
|
|
3047
|
-
var script$
|
|
3049
|
+
var script$9 = {
|
|
3048
3050
|
name: 'Pagination',
|
|
3049
3051
|
props: ['pagination_data', 'loadMore', 'hideCount', 'hideLoadMore'],
|
|
3050
3052
|
data () {
|
|
@@ -3233,8 +3235,8 @@ function render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3233
3235
|
]))
|
|
3234
3236
|
}
|
|
3235
3237
|
|
|
3236
|
-
script$
|
|
3237
|
-
script$
|
|
3238
|
+
script$9.render = render$2;
|
|
3239
|
+
script$9.__file = "src/lib/components/list_templates/Pagination.vue";
|
|
3238
3240
|
|
|
3239
3241
|
const _hoisted_1$6 = /*#__PURE__*/vue.createElementVNode("span", {
|
|
3240
3242
|
class: "spinner-border spinner-border-sm me-1",
|
|
@@ -3243,7 +3245,7 @@ const _hoisted_1$6 = /*#__PURE__*/vue.createElementVNode("span", {
|
|
|
3243
3245
|
}, null, -1 /* HOISTED */);
|
|
3244
3246
|
|
|
3245
3247
|
|
|
3246
|
-
var script$
|
|
3248
|
+
var script$8 = {
|
|
3247
3249
|
__name: 'ShConfirmAction',
|
|
3248
3250
|
props: {
|
|
3249
3251
|
data: Object,
|
|
@@ -3329,7 +3331,7 @@ return (_ctx, _cache) => {
|
|
|
3329
3331
|
|
|
3330
3332
|
};
|
|
3331
3333
|
|
|
3332
|
-
script$
|
|
3334
|
+
script$8.__file = "src/lib/components/ShConfirmAction.vue";
|
|
3333
3335
|
|
|
3334
3336
|
const _hoisted_1$5 = /*#__PURE__*/vue.createElementVNode("span", {
|
|
3335
3337
|
class: "spinner-border spinner-border-sm me-1",
|
|
@@ -3337,7 +3339,7 @@ const _hoisted_1$5 = /*#__PURE__*/vue.createElementVNode("span", {
|
|
|
3337
3339
|
"aria-hidden": "true"
|
|
3338
3340
|
}, null, -1 /* HOISTED */);
|
|
3339
3341
|
|
|
3340
|
-
var script$
|
|
3342
|
+
var script$7 = {
|
|
3341
3343
|
__name: 'ShSilentAction',
|
|
3342
3344
|
props: {
|
|
3343
3345
|
data: Object,
|
|
@@ -3425,9 +3427,9 @@ return (_ctx, _cache) => {
|
|
|
3425
3427
|
|
|
3426
3428
|
};
|
|
3427
3429
|
|
|
3428
|
-
script$
|
|
3430
|
+
script$7.__file = "src/lib/components/ShSilentAction.vue";
|
|
3429
3431
|
|
|
3430
|
-
var script$
|
|
3432
|
+
var script$6 = {
|
|
3431
3433
|
name: 'sh-table',
|
|
3432
3434
|
props: ['endPoint', 'headers', 'pageCount', 'actions', 'hideCount', 'hideLoadMore', 'links', 'reload', 'hideSearch', 'sharedData', 'searchPlaceholder', 'event', 'displayMore', 'displayMoreBtnClass', 'moreDetailsColumns', 'moreDetailsFields', 'hasDownload', 'downloadFields', 'tableHover', 'hideIds'],
|
|
3433
3435
|
inject: ['channel'],
|
|
@@ -3659,10 +3661,10 @@ var script$5 = {
|
|
|
3659
3661
|
this.reloadData();
|
|
3660
3662
|
},
|
|
3661
3663
|
components: {
|
|
3662
|
-
ShSilentAction: script$
|
|
3663
|
-
ShConfirmAction: script$
|
|
3664
|
-
ShCanvas: script$
|
|
3665
|
-
pagination: script$
|
|
3664
|
+
ShSilentAction: script$7,
|
|
3665
|
+
ShConfirmAction: script$8,
|
|
3666
|
+
ShCanvas: script$a,
|
|
3667
|
+
pagination: script$9
|
|
3666
3668
|
},
|
|
3667
3669
|
computed: {
|
|
3668
3670
|
windowWidth: function () {
|
|
@@ -3687,12 +3689,12 @@ const _hoisted_2$4 = {
|
|
|
3687
3689
|
};
|
|
3688
3690
|
const _hoisted_3$4 = ["disabled"];
|
|
3689
3691
|
const _hoisted_4$4 = /*#__PURE__*/vue.createElementVNode("i", { class: "bi-download" }, null, -1 /* HOISTED */);
|
|
3690
|
-
const _hoisted_5$
|
|
3692
|
+
const _hoisted_5$4 = /*#__PURE__*/vue.createElementVNode("span", {
|
|
3691
3693
|
class: "spinner-border spinner-border-sm",
|
|
3692
3694
|
role: "status",
|
|
3693
3695
|
"aria-hidden": "true"
|
|
3694
3696
|
}, null, -1 /* HOISTED */);
|
|
3695
|
-
const _hoisted_6$
|
|
3697
|
+
const _hoisted_6$3 = /*#__PURE__*/vue.createElementVNode("span", { class: "visually-hidden" }, "Loading...", -1 /* HOISTED */);
|
|
3696
3698
|
const _hoisted_7$1 = {
|
|
3697
3699
|
key: 1,
|
|
3698
3700
|
class: "row"
|
|
@@ -3856,8 +3858,8 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3856
3858
|
vue.createTextVNode(" Export ")
|
|
3857
3859
|
], 64 /* STABLE_FRAGMENT */))
|
|
3858
3860
|
: (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
|
|
3859
|
-
_hoisted_5$
|
|
3860
|
-
_hoisted_6$
|
|
3861
|
+
_hoisted_5$4,
|
|
3862
|
+
_hoisted_6$3
|
|
3861
3863
|
], 64 /* STABLE_FRAGMENT */))
|
|
3862
3864
|
], 8 /* PROPS */, _hoisted_3$4)
|
|
3863
3865
|
]))
|
|
@@ -3897,122 +3899,289 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3897
3899
|
}), 128 /* KEYED_FRAGMENT */))
|
|
3898
3900
|
: vue.createCommentVNode("v-if", true)
|
|
3899
3901
|
], 64 /* STABLE_FRAGMENT */))
|
|
3900
|
-
:
|
|
3901
|
-
|
|
3902
|
-
|
|
3903
|
-
|
|
3904
|
-
|
|
3905
|
-
|
|
3906
|
-
|
|
3907
|
-
|
|
3908
|
-
|
|
3909
|
-
|
|
3910
|
-
|
|
3911
|
-
|
|
3912
|
-
|
|
3913
|
-
|
|
3914
|
-
|
|
3915
|
-
|
|
3916
|
-
|
|
3917
|
-
|
|
3918
|
-
|
|
3919
|
-
|
|
3920
|
-
|
|
3921
|
-
|
|
3922
|
-
|
|
3923
|
-
|
|
3924
|
-
|
|
3925
|
-
|
|
3926
|
-
|
|
3927
|
-
|
|
3928
|
-
(typeof title === 'string')
|
|
3929
|
-
? (vue.openBlock(), vue.createElementBlock("a", {
|
|
3930
|
-
key: 0,
|
|
3931
|
-
class: "text-capitalize",
|
|
3932
|
-
onClick: $event => ($options.changeKey('order_by',title))
|
|
3933
|
-
}, vue.toDisplayString(title.replace(/_/g, ' ')), 9 /* TEXT, PROPS */, _hoisted_22))
|
|
3934
|
-
: (typeof title === 'function')
|
|
3902
|
+
: ($options.hasRecordsSlot)
|
|
3903
|
+
? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 3 }, [
|
|
3904
|
+
($data.loading === 'loading')
|
|
3905
|
+
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_16, _hoisted_18))
|
|
3906
|
+
: ($data.loading === 'error')
|
|
3907
|
+
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_19, [
|
|
3908
|
+
vue.createElementVNode("span", _hoisted_20, vue.toDisplayString($data.loading_error), 1 /* TEXT */)
|
|
3909
|
+
]))
|
|
3910
|
+
: vue.createCommentVNode("v-if", true),
|
|
3911
|
+
($data.loading === 'done')
|
|
3912
|
+
? vue.renderSlot(_ctx.$slots, "records", {
|
|
3913
|
+
key: 2,
|
|
3914
|
+
records: $data.records
|
|
3915
|
+
})
|
|
3916
|
+
: vue.createCommentVNode("v-if", true)
|
|
3917
|
+
], 64 /* STABLE_FRAGMENT */))
|
|
3918
|
+
: ($options.windowWidth > 700)
|
|
3919
|
+
? (vue.openBlock(), vue.createElementBlock("table", {
|
|
3920
|
+
key: 4,
|
|
3921
|
+
class: vue.normalizeClass(["table sh-table", $props.tableHover ? 'table-hover':''])
|
|
3922
|
+
}, [
|
|
3923
|
+
vue.createElementVNode("thead", _hoisted_21, [
|
|
3924
|
+
vue.createElementVNode("tr", null, [
|
|
3925
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList($props.headers, (title) => {
|
|
3926
|
+
return (vue.openBlock(), vue.createElementBlock("th", {
|
|
3927
|
+
key: title[0]
|
|
3928
|
+
}, [
|
|
3929
|
+
(typeof title === 'string')
|
|
3935
3930
|
? (vue.openBlock(), vue.createElementBlock("a", {
|
|
3936
|
-
key:
|
|
3931
|
+
key: 0,
|
|
3937
3932
|
class: "text-capitalize",
|
|
3938
3933
|
onClick: $event => ($options.changeKey('order_by',title))
|
|
3939
|
-
}, vue.toDisplayString(title
|
|
3940
|
-
: (
|
|
3941
|
-
|
|
3942
|
-
|
|
3943
|
-
|
|
3944
|
-
|
|
3945
|
-
|
|
3946
|
-
|
|
3947
|
-
|
|
3948
|
-
|
|
3949
|
-
|
|
3950
|
-
|
|
3951
|
-
|
|
3952
|
-
|
|
3953
|
-
|
|
3954
|
-
|
|
3955
|
-
vue.
|
|
3956
|
-
|
|
3957
|
-
|
|
3958
|
-
|
|
3959
|
-
|
|
3960
|
-
? (vue.openBlock(), vue.createElementBlock("tr",
|
|
3934
|
+
}, vue.toDisplayString(title.replace(/_/g, ' ')), 9 /* TEXT, PROPS */, _hoisted_22))
|
|
3935
|
+
: (typeof title === 'function')
|
|
3936
|
+
? (vue.openBlock(), vue.createElementBlock("a", {
|
|
3937
|
+
key: 1,
|
|
3938
|
+
class: "text-capitalize",
|
|
3939
|
+
onClick: $event => ($options.changeKey('order_by',title))
|
|
3940
|
+
}, vue.toDisplayString(title(null).replace(/_/g, ' ')), 9 /* TEXT, PROPS */, _hoisted_23))
|
|
3941
|
+
: (vue.openBlock(), vue.createElementBlock("a", {
|
|
3942
|
+
key: 2,
|
|
3943
|
+
class: "text-capitalize",
|
|
3944
|
+
onClick: $event => ($options.changeKey('order_by',title[0]))
|
|
3945
|
+
}, vue.toDisplayString(title[1].replace(/_/g, ' ')), 9 /* TEXT, PROPS */, _hoisted_24))
|
|
3946
|
+
]))
|
|
3947
|
+
}), 128 /* KEYED_FRAGMENT */)),
|
|
3948
|
+
($props.actions)
|
|
3949
|
+
? (vue.openBlock(), vue.createElementBlock("th", _hoisted_25, vue.toDisplayString($props.actions.label), 1 /* TEXT */))
|
|
3950
|
+
: vue.createCommentVNode("v-if", true)
|
|
3951
|
+
])
|
|
3952
|
+
]),
|
|
3953
|
+
vue.createElementVNode("tbody", _hoisted_26, [
|
|
3954
|
+
($data.loading === 'loading')
|
|
3955
|
+
? (vue.openBlock(), vue.createElementBlock("tr", _hoisted_27, [
|
|
3961
3956
|
vue.createElementVNode("td", {
|
|
3962
3957
|
colspan: $props.headers.length
|
|
3963
|
-
},
|
|
3958
|
+
}, _hoisted_30, 8 /* PROPS */, _hoisted_28)
|
|
3964
3959
|
]))
|
|
3965
|
-
: ($data.
|
|
3966
|
-
? (vue.openBlock(), vue.createElementBlock("tr",
|
|
3960
|
+
: ($data.loading === 'error')
|
|
3961
|
+
? (vue.openBlock(), vue.createElementBlock("tr", _hoisted_31, [
|
|
3967
3962
|
vue.createElementVNode("td", {
|
|
3968
|
-
colspan: $props.
|
|
3969
|
-
},
|
|
3970
|
-
_hoisted_35,
|
|
3971
|
-
vue.createTextVNode(" No records found ")
|
|
3972
|
-
], 8 /* PROPS */, _hoisted_34)
|
|
3963
|
+
colspan: $props.headers.length
|
|
3964
|
+
}, vue.toDisplayString($data.loading_error), 9 /* TEXT, PROPS */, _hoisted_32)
|
|
3973
3965
|
]))
|
|
3974
|
-
: ($data.
|
|
3975
|
-
? (vue.openBlock(
|
|
3976
|
-
|
|
3966
|
+
: ($data.records.length === 0)
|
|
3967
|
+
? (vue.openBlock(), vue.createElementBlock("tr", _hoisted_33, [
|
|
3968
|
+
vue.createElementVNode("td", {
|
|
3969
|
+
colspan: $props.actions ? $props.headers.length + 1 : $props.headers.length
|
|
3970
|
+
}, [
|
|
3971
|
+
_hoisted_35,
|
|
3972
|
+
vue.createTextVNode(" No records found ")
|
|
3973
|
+
], 8 /* PROPS */, _hoisted_34)
|
|
3974
|
+
]))
|
|
3975
|
+
: ($data.loading === 'done')
|
|
3976
|
+
? (vue.openBlock(true), vue.createElementBlock(vue.Fragment, { key: 3 }, vue.renderList($data.records, (record, index) => {
|
|
3977
|
+
return (vue.openBlock(), vue.createElementBlock("tr", {
|
|
3978
|
+
key: record.id,
|
|
3979
|
+
class: vue.normalizeClass(record.class),
|
|
3980
|
+
onClick: $event => ($options.rowSelected(record))
|
|
3981
|
+
}, [
|
|
3982
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList($props.headers, (key) => {
|
|
3983
|
+
return (vue.openBlock(), vue.createElementBlock("td", {
|
|
3984
|
+
key: key[0]
|
|
3985
|
+
}, [
|
|
3986
|
+
(typeof key === 'string' && $props.links && $props.links[key])
|
|
3987
|
+
? (vue.openBlock(), vue.createBlock(_component_router_link, {
|
|
3988
|
+
key: 0,
|
|
3989
|
+
to: $options.replaceLinkUrl($props.links[key],record),
|
|
3990
|
+
class: vue.normalizeClass($options.getLinkClass($props.links[key])),
|
|
3991
|
+
innerHTML: record[key]
|
|
3992
|
+
}, null, 8 /* PROPS */, ["to", "class", "innerHTML"]))
|
|
3993
|
+
: ($options.getFieldType(key) === 'numeric')
|
|
3994
|
+
? (vue.openBlock(), vue.createElementBlock("span", _hoisted_37, vue.toDisplayString(Intl.NumberFormat().format(record[key])), 1 /* TEXT */))
|
|
3995
|
+
: ($options.getFieldType(key) === 'money')
|
|
3996
|
+
? (vue.openBlock(), vue.createElementBlock("span", _hoisted_38, vue.toDisplayString(Intl.NumberFormat().format(record[key])), 1 /* TEXT */))
|
|
3997
|
+
: ($options.getFieldType(key) === 'date')
|
|
3998
|
+
? (vue.openBlock(), vue.createElementBlock("span", _hoisted_39, vue.toDisplayString($options.formatDate(record[key])), 1 /* TEXT */))
|
|
3999
|
+
: (typeof key === 'string')
|
|
4000
|
+
? (vue.openBlock(), vue.createElementBlock("span", {
|
|
4001
|
+
key: 4,
|
|
4002
|
+
innerHTML: record[key]
|
|
4003
|
+
}, null, 8 /* PROPS */, _hoisted_40))
|
|
4004
|
+
: (typeof key === 'function')
|
|
4005
|
+
? (vue.openBlock(), vue.createElementBlock("span", {
|
|
4006
|
+
key: 5,
|
|
4007
|
+
innerHTML: key(record, index)
|
|
4008
|
+
}, null, 8 /* PROPS */, _hoisted_41))
|
|
4009
|
+
: (vue.openBlock(), vue.createElementBlock("span", {
|
|
4010
|
+
key: 6,
|
|
4011
|
+
innerHTML: record[key[0]]
|
|
4012
|
+
}, null, 8 /* PROPS */, _hoisted_42))
|
|
4013
|
+
]))
|
|
4014
|
+
}), 128 /* KEYED_FRAGMENT */)),
|
|
4015
|
+
($props.actions)
|
|
4016
|
+
? (vue.openBlock(), vue.createElementBlock("td", _hoisted_43, [
|
|
4017
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList($props.actions.actions, (act) => {
|
|
4018
|
+
return (vue.openBlock(), vue.createElementBlock(vue.Fragment, {
|
|
4019
|
+
key: act.path
|
|
4020
|
+
}, [
|
|
4021
|
+
(!act.permission || $options.user.isAllowedTo(act.permission))
|
|
4022
|
+
? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
|
|
4023
|
+
(!act.validator || act.validator(record))
|
|
4024
|
+
? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
|
|
4025
|
+
(act.type === 'confirmAction')
|
|
4026
|
+
? (vue.openBlock(), vue.createBlock(_component_sh_confirm_action, {
|
|
4027
|
+
key: 0,
|
|
4028
|
+
onActionSuccessful: $event => ($options.doEmitAction('actionSuccessful',record)),
|
|
4029
|
+
onActionFailed: $event => ($options.doEmitAction('actionFailed',record)),
|
|
4030
|
+
onActionCanceled: $event => ($options.doEmitAction('actionCanceled',record)),
|
|
4031
|
+
"loading-message": act.label,
|
|
4032
|
+
class: vue.normalizeClass(act.class),
|
|
4033
|
+
url: $options.replaceActionUrl(act.url,record)
|
|
4034
|
+
}, {
|
|
4035
|
+
default: vue.withCtx(() => [
|
|
4036
|
+
(act.icon)
|
|
4037
|
+
? (vue.openBlock(), vue.createElementBlock("span", {
|
|
4038
|
+
key: 0,
|
|
4039
|
+
class: vue.normalizeClass(act.icon)
|
|
4040
|
+
}, null, 2 /* CLASS */))
|
|
4041
|
+
: vue.createCommentVNode("v-if", true),
|
|
4042
|
+
vue.createTextVNode(" " + vue.toDisplayString(act.label), 1 /* TEXT */)
|
|
4043
|
+
]),
|
|
4044
|
+
_: 2 /* DYNAMIC */
|
|
4045
|
+
}, 1032 /* PROPS, DYNAMIC_SLOTS */, ["onActionSuccessful", "onActionFailed", "onActionCanceled", "loading-message", "class", "url"]))
|
|
4046
|
+
: (act.type === 'silentAction')
|
|
4047
|
+
? (vue.openBlock(), vue.createBlock(_component_sh_silent_action, {
|
|
4048
|
+
key: 1,
|
|
4049
|
+
onActionSuccessful: $event => ($options.doEmitAction('actionSuccessful',record)),
|
|
4050
|
+
onActionFailed: $event => ($options.doEmitAction('actionFailed',record)),
|
|
4051
|
+
onActionCanceled: $event => ($options.doEmitAction('actionCanceled',record)),
|
|
4052
|
+
"loading-message": act.label,
|
|
4053
|
+
class: vue.normalizeClass(act.class),
|
|
4054
|
+
url: $options.replaceActionUrl(act.url,record)
|
|
4055
|
+
}, {
|
|
4056
|
+
default: vue.withCtx(() => [
|
|
4057
|
+
(act.icon)
|
|
4058
|
+
? (vue.openBlock(), vue.createElementBlock("span", {
|
|
4059
|
+
key: 0,
|
|
4060
|
+
class: vue.normalizeClass(act.icon)
|
|
4061
|
+
}, null, 2 /* CLASS */))
|
|
4062
|
+
: vue.createCommentVNode("v-if", true),
|
|
4063
|
+
vue.createTextVNode(" " + vue.toDisplayString(act.label), 1 /* TEXT */)
|
|
4064
|
+
]),
|
|
4065
|
+
_: 2 /* DYNAMIC */
|
|
4066
|
+
}, 1032 /* PROPS, DYNAMIC_SLOTS */, ["onActionSuccessful", "onActionFailed", "onActionCanceled", "loading-message", "class", "url"]))
|
|
4067
|
+
: (act.canvasId || act.type === 'offcanvas')
|
|
4068
|
+
? (vue.openBlock(), vue.createElementBlock("a", {
|
|
4069
|
+
key: 2,
|
|
4070
|
+
href: '#' + act.canvasId,
|
|
4071
|
+
"data-bs-toggle": "offcanvas",
|
|
4072
|
+
class: vue.normalizeClass(act.class)
|
|
4073
|
+
}, [
|
|
4074
|
+
(act.icon)
|
|
4075
|
+
? (vue.openBlock(), vue.createElementBlock("span", {
|
|
4076
|
+
key: 0,
|
|
4077
|
+
class: vue.normalizeClass(act.icon)
|
|
4078
|
+
}, null, 2 /* CLASS */))
|
|
4079
|
+
: vue.createCommentVNode("v-if", true),
|
|
4080
|
+
vue.createTextVNode(" " + vue.toDisplayString(act.label), 1 /* TEXT */)
|
|
4081
|
+
], 10 /* CLASS, PROPS */, _hoisted_44))
|
|
4082
|
+
: (act.emits)
|
|
4083
|
+
? (vue.openBlock(), vue.createElementBlock("button", {
|
|
4084
|
+
key: 3,
|
|
4085
|
+
title: act.title,
|
|
4086
|
+
class: vue.normalizeClass(act.class ? act.class:'btn btn-default'),
|
|
4087
|
+
onClick: $event => ($options.doEmitAction(act.emits,record))
|
|
4088
|
+
}, [
|
|
4089
|
+
(act.icon)
|
|
4090
|
+
? (vue.openBlock(), vue.createElementBlock("span", {
|
|
4091
|
+
key: 0,
|
|
4092
|
+
class: vue.normalizeClass(act.icon)
|
|
4093
|
+
}, null, 2 /* CLASS */))
|
|
4094
|
+
: vue.createCommentVNode("v-if", true),
|
|
4095
|
+
vue.createTextVNode(" " + vue.toDisplayString(act.label), 1 /* TEXT */)
|
|
4096
|
+
], 10 /* CLASS, PROPS */, _hoisted_45))
|
|
4097
|
+
: (!act.emits)
|
|
4098
|
+
? (vue.openBlock(), vue.createBlock(_component_router_link, {
|
|
4099
|
+
key: 4,
|
|
4100
|
+
title: act.title,
|
|
4101
|
+
to: $options.replaceActionUrl(act.path,record),
|
|
4102
|
+
class: vue.normalizeClass(act.class)
|
|
4103
|
+
}, {
|
|
4104
|
+
default: vue.withCtx(() => [
|
|
4105
|
+
(act.icon)
|
|
4106
|
+
? (vue.openBlock(), vue.createElementBlock("span", {
|
|
4107
|
+
key: 0,
|
|
4108
|
+
class: vue.normalizeClass(act.icon)
|
|
4109
|
+
}, null, 2 /* CLASS */))
|
|
4110
|
+
: vue.createCommentVNode("v-if", true),
|
|
4111
|
+
vue.createTextVNode(" " + vue.toDisplayString(act.label), 1 /* TEXT */)
|
|
4112
|
+
]),
|
|
4113
|
+
_: 2 /* DYNAMIC */
|
|
4114
|
+
}, 1032 /* PROPS, DYNAMIC_SLOTS */, ["title", "to", "class"]))
|
|
4115
|
+
: vue.createCommentVNode("v-if", true)
|
|
4116
|
+
], 64 /* STABLE_FRAGMENT */))
|
|
4117
|
+
: vue.createCommentVNode("v-if", true)
|
|
4118
|
+
], 64 /* STABLE_FRAGMENT */))
|
|
4119
|
+
: vue.createCommentVNode("v-if", true)
|
|
4120
|
+
], 64 /* STABLE_FRAGMENT */))
|
|
4121
|
+
}), 128 /* KEYED_FRAGMENT */))
|
|
4122
|
+
]))
|
|
4123
|
+
: vue.createCommentVNode("v-if", true)
|
|
4124
|
+
], 10 /* CLASS, PROPS */, _hoisted_36))
|
|
4125
|
+
}), 128 /* KEYED_FRAGMENT */))
|
|
4126
|
+
: vue.createCommentVNode("v-if", true)
|
|
4127
|
+
])
|
|
4128
|
+
], 2 /* CLASS */))
|
|
4129
|
+
: (vue.openBlock(), vue.createElementBlock("div", _hoisted_46, [
|
|
4130
|
+
($data.loading === 'loading')
|
|
4131
|
+
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_47, _hoisted_49))
|
|
4132
|
+
: ($data.loading === 'error')
|
|
4133
|
+
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_50, [
|
|
4134
|
+
vue.createElementVNode("span", null, vue.toDisplayString($data.loading_error), 1 /* TEXT */)
|
|
4135
|
+
]))
|
|
4136
|
+
: ($data.loading === 'done')
|
|
4137
|
+
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_51, [
|
|
4138
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList($data.records, (record, index) => {
|
|
4139
|
+
return (vue.openBlock(), vue.createElementBlock("div", {
|
|
3977
4140
|
key: record.id,
|
|
3978
|
-
class:
|
|
4141
|
+
class: "single-mobile-req bg-light p-3",
|
|
3979
4142
|
onClick: $event => ($options.rowSelected(record))
|
|
3980
4143
|
}, [
|
|
3981
4144
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList($props.headers, (key) => {
|
|
3982
|
-
return (vue.openBlock(), vue.createElementBlock(
|
|
4145
|
+
return (vue.openBlock(), vue.createElementBlock(vue.Fragment, {
|
|
3983
4146
|
key: key[0]
|
|
3984
4147
|
}, [
|
|
3985
|
-
(typeof key === 'string'
|
|
3986
|
-
? (vue.openBlock(), vue.
|
|
3987
|
-
|
|
3988
|
-
|
|
3989
|
-
|
|
3990
|
-
|
|
3991
|
-
|
|
3992
|
-
|
|
3993
|
-
|
|
3994
|
-
|
|
3995
|
-
|
|
3996
|
-
|
|
3997
|
-
|
|
3998
|
-
|
|
4148
|
+
(typeof key === 'string' )
|
|
4149
|
+
? (vue.openBlock(), vue.createElementBlock("p", _hoisted_53, vue.toDisplayString(key.replace(/_/g, ' ')), 1 /* TEXT */))
|
|
4150
|
+
: (typeof key === 'function')
|
|
4151
|
+
? (vue.openBlock(), vue.createElementBlock("p", _hoisted_54, vue.toDisplayString(key(null).replace(/_/g, ' ')), 1 /* TEXT */))
|
|
4152
|
+
: (vue.openBlock(), vue.createElementBlock("p", _hoisted_55, vue.toDisplayString(key[1].replace(/_/g, ' ')), 1 /* TEXT */)),
|
|
4153
|
+
vue.createElementVNode("span", null, [
|
|
4154
|
+
(typeof key === 'string' && $props.links && $props.links[key])
|
|
4155
|
+
? (vue.openBlock(), vue.createBlock(_component_router_link, {
|
|
4156
|
+
key: 0,
|
|
4157
|
+
to: $options.replaceLinkUrl($props.links[key],record),
|
|
4158
|
+
class: vue.normalizeClass($options.getLinkClass($props.links[key])),
|
|
4159
|
+
innerHTML: record[key]
|
|
4160
|
+
}, null, 8 /* PROPS */, ["to", "class", "innerHTML"]))
|
|
4161
|
+
: ($options.getFieldType(key) === 'numeric')
|
|
4162
|
+
? (vue.openBlock(), vue.createElementBlock("span", _hoisted_56, vue.toDisplayString(Intl.NumberFormat().format(record[key])), 1 /* TEXT */))
|
|
4163
|
+
: ($options.getFieldType(key) === 'money')
|
|
4164
|
+
? (vue.openBlock(), vue.createElementBlock("span", _hoisted_57, "KES " + vue.toDisplayString(Intl.NumberFormat().format(record[key])), 1 /* TEXT */))
|
|
4165
|
+
: (typeof key === 'string')
|
|
3999
4166
|
? (vue.openBlock(), vue.createElementBlock("span", {
|
|
4000
|
-
key:
|
|
4167
|
+
key: 3,
|
|
4001
4168
|
innerHTML: record[key]
|
|
4002
|
-
}, null, 8 /* PROPS */,
|
|
4169
|
+
}, null, 8 /* PROPS */, _hoisted_58))
|
|
4003
4170
|
: (typeof key === 'function')
|
|
4004
4171
|
? (vue.openBlock(), vue.createElementBlock("span", {
|
|
4005
|
-
key:
|
|
4006
|
-
innerHTML: key(record, index)
|
|
4007
|
-
}, null, 8 /* PROPS */,
|
|
4172
|
+
key: 4,
|
|
4173
|
+
innerHTML: key(record, index )
|
|
4174
|
+
}, null, 8 /* PROPS */, _hoisted_59))
|
|
4008
4175
|
: (vue.openBlock(), vue.createElementBlock("span", {
|
|
4009
|
-
key:
|
|
4176
|
+
key: 5,
|
|
4010
4177
|
innerHTML: record[key[0]]
|
|
4011
|
-
}, null, 8 /* PROPS */,
|
|
4012
|
-
|
|
4178
|
+
}, null, 8 /* PROPS */, _hoisted_60))
|
|
4179
|
+
]),
|
|
4180
|
+
_hoisted_61
|
|
4181
|
+
], 64 /* STABLE_FRAGMENT */))
|
|
4013
4182
|
}), 128 /* KEYED_FRAGMENT */)),
|
|
4014
4183
|
($props.actions)
|
|
4015
|
-
? (vue.openBlock(), vue.createElementBlock("
|
|
4184
|
+
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_62, [
|
|
4016
4185
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList($props.actions.actions, (act) => {
|
|
4017
4186
|
return (vue.openBlock(), vue.createElementBlock(vue.Fragment, {
|
|
4018
4187
|
key: act.path
|
|
@@ -4021,17 +4190,28 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
4021
4190
|
? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
|
|
4022
4191
|
(!act.validator || act.validator(record))
|
|
4023
4192
|
? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
|
|
4024
|
-
(act.
|
|
4025
|
-
? (vue.openBlock(), vue.
|
|
4193
|
+
(act.canvasId)
|
|
4194
|
+
? (vue.openBlock(), vue.createElementBlock("a", {
|
|
4026
4195
|
key: 0,
|
|
4027
|
-
|
|
4028
|
-
|
|
4029
|
-
|
|
4030
|
-
|
|
4031
|
-
|
|
4032
|
-
|
|
4033
|
-
|
|
4034
|
-
|
|
4196
|
+
href: '#' + act.canvasId,
|
|
4197
|
+
"data-bs-toggle": "offcanvas",
|
|
4198
|
+
class: vue.normalizeClass(act.class)
|
|
4199
|
+
}, [
|
|
4200
|
+
(act.icon)
|
|
4201
|
+
? (vue.openBlock(), vue.createElementBlock("span", {
|
|
4202
|
+
key: 0,
|
|
4203
|
+
class: vue.normalizeClass(act.icon)
|
|
4204
|
+
}, null, 2 /* CLASS */))
|
|
4205
|
+
: vue.createCommentVNode("v-if", true),
|
|
4206
|
+
vue.createTextVNode(" " + vue.toDisplayString(act.label), 1 /* TEXT */)
|
|
4207
|
+
], 10 /* CLASS, PROPS */, _hoisted_63))
|
|
4208
|
+
: (act.emits)
|
|
4209
|
+
? (vue.openBlock(), vue.createElementBlock("button", {
|
|
4210
|
+
key: 1,
|
|
4211
|
+
title: act.title,
|
|
4212
|
+
class: vue.normalizeClass(act.class ? act.class:'btn btn-default'),
|
|
4213
|
+
onClick: $event => ($options.doEmitAction(act.emits,record))
|
|
4214
|
+
}, [
|
|
4035
4215
|
(act.icon)
|
|
4036
4216
|
? (vue.openBlock(), vue.createElementBlock("span", {
|
|
4037
4217
|
key: 0,
|
|
@@ -4039,52 +4219,15 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
4039
4219
|
}, null, 2 /* CLASS */))
|
|
4040
4220
|
: vue.createCommentVNode("v-if", true),
|
|
4041
4221
|
vue.createTextVNode(" " + vue.toDisplayString(act.label), 1 /* TEXT */)
|
|
4042
|
-
])
|
|
4043
|
-
|
|
4044
|
-
|
|
4045
|
-
: (act.type === 'silentAction')
|
|
4046
|
-
? (vue.openBlock(), vue.createBlock(_component_sh_silent_action, {
|
|
4047
|
-
key: 1,
|
|
4048
|
-
onActionSuccessful: $event => ($options.doEmitAction('actionSuccessful',record)),
|
|
4049
|
-
onActionFailed: $event => ($options.doEmitAction('actionFailed',record)),
|
|
4050
|
-
onActionCanceled: $event => ($options.doEmitAction('actionCanceled',record)),
|
|
4051
|
-
"loading-message": act.label,
|
|
4052
|
-
class: vue.normalizeClass(act.class),
|
|
4053
|
-
url: $options.replaceActionUrl(act.url,record)
|
|
4054
|
-
}, {
|
|
4055
|
-
default: vue.withCtx(() => [
|
|
4056
|
-
(act.icon)
|
|
4057
|
-
? (vue.openBlock(), vue.createElementBlock("span", {
|
|
4058
|
-
key: 0,
|
|
4059
|
-
class: vue.normalizeClass(act.icon)
|
|
4060
|
-
}, null, 2 /* CLASS */))
|
|
4061
|
-
: vue.createCommentVNode("v-if", true),
|
|
4062
|
-
vue.createTextVNode(" " + vue.toDisplayString(act.label), 1 /* TEXT */)
|
|
4063
|
-
]),
|
|
4064
|
-
_: 2 /* DYNAMIC */
|
|
4065
|
-
}, 1032 /* PROPS, DYNAMIC_SLOTS */, ["onActionSuccessful", "onActionFailed", "onActionCanceled", "loading-message", "class", "url"]))
|
|
4066
|
-
: (act.canvasId || act.type === 'offcanvas')
|
|
4067
|
-
? (vue.openBlock(), vue.createElementBlock("a", {
|
|
4222
|
+
], 10 /* CLASS, PROPS */, _hoisted_64))
|
|
4223
|
+
: (!act.emits)
|
|
4224
|
+
? (vue.openBlock(), vue.createBlock(_component_router_link, {
|
|
4068
4225
|
key: 2,
|
|
4069
|
-
|
|
4070
|
-
|
|
4226
|
+
title: act.title,
|
|
4227
|
+
to: $options.replaceActionUrl(act.path,record),
|
|
4071
4228
|
class: vue.normalizeClass(act.class)
|
|
4072
|
-
},
|
|
4073
|
-
(
|
|
4074
|
-
? (vue.openBlock(), vue.createElementBlock("span", {
|
|
4075
|
-
key: 0,
|
|
4076
|
-
class: vue.normalizeClass(act.icon)
|
|
4077
|
-
}, null, 2 /* CLASS */))
|
|
4078
|
-
: vue.createCommentVNode("v-if", true),
|
|
4079
|
-
vue.createTextVNode(" " + vue.toDisplayString(act.label), 1 /* TEXT */)
|
|
4080
|
-
], 10 /* CLASS, PROPS */, _hoisted_44))
|
|
4081
|
-
: (act.emits)
|
|
4082
|
-
? (vue.openBlock(), vue.createElementBlock("button", {
|
|
4083
|
-
key: 3,
|
|
4084
|
-
title: act.title,
|
|
4085
|
-
class: vue.normalizeClass(act.class ? act.class:'btn btn-default'),
|
|
4086
|
-
onClick: $event => ($options.doEmitAction(act.emits,record))
|
|
4087
|
-
}, [
|
|
4229
|
+
}, {
|
|
4230
|
+
default: vue.withCtx(() => [
|
|
4088
4231
|
(act.icon)
|
|
4089
4232
|
? (vue.openBlock(), vue.createElementBlock("span", {
|
|
4090
4233
|
key: 0,
|
|
@@ -4092,26 +4235,10 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
4092
4235
|
}, null, 2 /* CLASS */))
|
|
4093
4236
|
: vue.createCommentVNode("v-if", true),
|
|
4094
4237
|
vue.createTextVNode(" " + vue.toDisplayString(act.label), 1 /* TEXT */)
|
|
4095
|
-
],
|
|
4096
|
-
|
|
4097
|
-
|
|
4098
|
-
|
|
4099
|
-
title: act.title,
|
|
4100
|
-
to: $options.replaceActionUrl(act.path,record),
|
|
4101
|
-
class: vue.normalizeClass(act.class)
|
|
4102
|
-
}, {
|
|
4103
|
-
default: vue.withCtx(() => [
|
|
4104
|
-
(act.icon)
|
|
4105
|
-
? (vue.openBlock(), vue.createElementBlock("span", {
|
|
4106
|
-
key: 0,
|
|
4107
|
-
class: vue.normalizeClass(act.icon)
|
|
4108
|
-
}, null, 2 /* CLASS */))
|
|
4109
|
-
: vue.createCommentVNode("v-if", true),
|
|
4110
|
-
vue.createTextVNode(" " + vue.toDisplayString(act.label), 1 /* TEXT */)
|
|
4111
|
-
]),
|
|
4112
|
-
_: 2 /* DYNAMIC */
|
|
4113
|
-
}, 1032 /* PROPS, DYNAMIC_SLOTS */, ["title", "to", "class"]))
|
|
4114
|
-
: vue.createCommentVNode("v-if", true)
|
|
4238
|
+
]),
|
|
4239
|
+
_: 2 /* DYNAMIC */
|
|
4240
|
+
}, 1032 /* PROPS, DYNAMIC_SLOTS */, ["title", "to", "class"]))
|
|
4241
|
+
: vue.createCommentVNode("v-if", true)
|
|
4115
4242
|
], 64 /* STABLE_FRAGMENT */))
|
|
4116
4243
|
: vue.createCommentVNode("v-if", true)
|
|
4117
4244
|
], 64 /* STABLE_FRAGMENT */))
|
|
@@ -4120,137 +4247,11 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
4120
4247
|
}), 128 /* KEYED_FRAGMENT */))
|
|
4121
4248
|
]))
|
|
4122
4249
|
: vue.createCommentVNode("v-if", true)
|
|
4123
|
-
],
|
|
4250
|
+
], 8 /* PROPS */, _hoisted_52))
|
|
4124
4251
|
}), 128 /* KEYED_FRAGMENT */))
|
|
4125
|
-
|
|
4126
|
-
|
|
4127
|
-
|
|
4128
|
-
: (vue.openBlock(), vue.createElementBlock("div", _hoisted_46, [
|
|
4129
|
-
($data.loading === 'loading')
|
|
4130
|
-
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_47, _hoisted_49))
|
|
4131
|
-
: ($data.loading === 'error')
|
|
4132
|
-
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_50, [
|
|
4133
|
-
vue.createElementVNode("span", null, vue.toDisplayString($data.loading_error), 1 /* TEXT */)
|
|
4134
|
-
]))
|
|
4135
|
-
: ($data.loading === 'done')
|
|
4136
|
-
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_51, [
|
|
4137
|
-
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList($data.records, (record, index) => {
|
|
4138
|
-
return (vue.openBlock(), vue.createElementBlock("div", {
|
|
4139
|
-
key: record.id,
|
|
4140
|
-
class: "single-mobile-req bg-light p-3",
|
|
4141
|
-
onClick: $event => ($options.rowSelected(record))
|
|
4142
|
-
}, [
|
|
4143
|
-
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList($props.headers, (key) => {
|
|
4144
|
-
return (vue.openBlock(), vue.createElementBlock(vue.Fragment, {
|
|
4145
|
-
key: key[0]
|
|
4146
|
-
}, [
|
|
4147
|
-
(typeof key === 'string' )
|
|
4148
|
-
? (vue.openBlock(), vue.createElementBlock("p", _hoisted_53, vue.toDisplayString(key.replace(/_/g, ' ')), 1 /* TEXT */))
|
|
4149
|
-
: (typeof key === 'function')
|
|
4150
|
-
? (vue.openBlock(), vue.createElementBlock("p", _hoisted_54, vue.toDisplayString(key(null).replace(/_/g, ' ')), 1 /* TEXT */))
|
|
4151
|
-
: (vue.openBlock(), vue.createElementBlock("p", _hoisted_55, vue.toDisplayString(key[1].replace(/_/g, ' ')), 1 /* TEXT */)),
|
|
4152
|
-
vue.createElementVNode("span", null, [
|
|
4153
|
-
(typeof key === 'string' && $props.links && $props.links[key])
|
|
4154
|
-
? (vue.openBlock(), vue.createBlock(_component_router_link, {
|
|
4155
|
-
key: 0,
|
|
4156
|
-
to: $options.replaceLinkUrl($props.links[key],record),
|
|
4157
|
-
class: vue.normalizeClass($options.getLinkClass($props.links[key])),
|
|
4158
|
-
innerHTML: record[key]
|
|
4159
|
-
}, null, 8 /* PROPS */, ["to", "class", "innerHTML"]))
|
|
4160
|
-
: ($options.getFieldType(key) === 'numeric')
|
|
4161
|
-
? (vue.openBlock(), vue.createElementBlock("span", _hoisted_56, vue.toDisplayString(Intl.NumberFormat().format(record[key])), 1 /* TEXT */))
|
|
4162
|
-
: ($options.getFieldType(key) === 'money')
|
|
4163
|
-
? (vue.openBlock(), vue.createElementBlock("span", _hoisted_57, "KES " + vue.toDisplayString(Intl.NumberFormat().format(record[key])), 1 /* TEXT */))
|
|
4164
|
-
: (typeof key === 'string')
|
|
4165
|
-
? (vue.openBlock(), vue.createElementBlock("span", {
|
|
4166
|
-
key: 3,
|
|
4167
|
-
innerHTML: record[key]
|
|
4168
|
-
}, null, 8 /* PROPS */, _hoisted_58))
|
|
4169
|
-
: (typeof key === 'function')
|
|
4170
|
-
? (vue.openBlock(), vue.createElementBlock("span", {
|
|
4171
|
-
key: 4,
|
|
4172
|
-
innerHTML: key(record, index )
|
|
4173
|
-
}, null, 8 /* PROPS */, _hoisted_59))
|
|
4174
|
-
: (vue.openBlock(), vue.createElementBlock("span", {
|
|
4175
|
-
key: 5,
|
|
4176
|
-
innerHTML: record[key[0]]
|
|
4177
|
-
}, null, 8 /* PROPS */, _hoisted_60))
|
|
4178
|
-
]),
|
|
4179
|
-
_hoisted_61
|
|
4180
|
-
], 64 /* STABLE_FRAGMENT */))
|
|
4181
|
-
}), 128 /* KEYED_FRAGMENT */)),
|
|
4182
|
-
($props.actions)
|
|
4183
|
-
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_62, [
|
|
4184
|
-
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList($props.actions.actions, (act) => {
|
|
4185
|
-
return (vue.openBlock(), vue.createElementBlock(vue.Fragment, {
|
|
4186
|
-
key: act.path
|
|
4187
|
-
}, [
|
|
4188
|
-
(!act.permission || $options.user.isAllowedTo(act.permission))
|
|
4189
|
-
? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
|
|
4190
|
-
(!act.validator || act.validator(record))
|
|
4191
|
-
? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
|
|
4192
|
-
(act.canvasId)
|
|
4193
|
-
? (vue.openBlock(), vue.createElementBlock("a", {
|
|
4194
|
-
key: 0,
|
|
4195
|
-
href: '#' + act.canvasId,
|
|
4196
|
-
"data-bs-toggle": "offcanvas",
|
|
4197
|
-
class: vue.normalizeClass(act.class)
|
|
4198
|
-
}, [
|
|
4199
|
-
(act.icon)
|
|
4200
|
-
? (vue.openBlock(), vue.createElementBlock("span", {
|
|
4201
|
-
key: 0,
|
|
4202
|
-
class: vue.normalizeClass(act.icon)
|
|
4203
|
-
}, null, 2 /* CLASS */))
|
|
4204
|
-
: vue.createCommentVNode("v-if", true),
|
|
4205
|
-
vue.createTextVNode(" " + vue.toDisplayString(act.label), 1 /* TEXT */)
|
|
4206
|
-
], 10 /* CLASS, PROPS */, _hoisted_63))
|
|
4207
|
-
: (act.emits)
|
|
4208
|
-
? (vue.openBlock(), vue.createElementBlock("button", {
|
|
4209
|
-
key: 1,
|
|
4210
|
-
title: act.title,
|
|
4211
|
-
class: vue.normalizeClass(act.class ? act.class:'btn btn-default'),
|
|
4212
|
-
onClick: $event => ($options.doEmitAction(act.emits,record))
|
|
4213
|
-
}, [
|
|
4214
|
-
(act.icon)
|
|
4215
|
-
? (vue.openBlock(), vue.createElementBlock("span", {
|
|
4216
|
-
key: 0,
|
|
4217
|
-
class: vue.normalizeClass(act.icon)
|
|
4218
|
-
}, null, 2 /* CLASS */))
|
|
4219
|
-
: vue.createCommentVNode("v-if", true),
|
|
4220
|
-
vue.createTextVNode(" " + vue.toDisplayString(act.label), 1 /* TEXT */)
|
|
4221
|
-
], 10 /* CLASS, PROPS */, _hoisted_64))
|
|
4222
|
-
: (!act.emits)
|
|
4223
|
-
? (vue.openBlock(), vue.createBlock(_component_router_link, {
|
|
4224
|
-
key: 2,
|
|
4225
|
-
title: act.title,
|
|
4226
|
-
to: $options.replaceActionUrl(act.path,record),
|
|
4227
|
-
class: vue.normalizeClass(act.class)
|
|
4228
|
-
}, {
|
|
4229
|
-
default: vue.withCtx(() => [
|
|
4230
|
-
(act.icon)
|
|
4231
|
-
? (vue.openBlock(), vue.createElementBlock("span", {
|
|
4232
|
-
key: 0,
|
|
4233
|
-
class: vue.normalizeClass(act.icon)
|
|
4234
|
-
}, null, 2 /* CLASS */))
|
|
4235
|
-
: vue.createCommentVNode("v-if", true),
|
|
4236
|
-
vue.createTextVNode(" " + vue.toDisplayString(act.label), 1 /* TEXT */)
|
|
4237
|
-
]),
|
|
4238
|
-
_: 2 /* DYNAMIC */
|
|
4239
|
-
}, 1032 /* PROPS, DYNAMIC_SLOTS */, ["title", "to", "class"]))
|
|
4240
|
-
: vue.createCommentVNode("v-if", true)
|
|
4241
|
-
], 64 /* STABLE_FRAGMENT */))
|
|
4242
|
-
: vue.createCommentVNode("v-if", true)
|
|
4243
|
-
], 64 /* STABLE_FRAGMENT */))
|
|
4244
|
-
: vue.createCommentVNode("v-if", true)
|
|
4245
|
-
], 64 /* STABLE_FRAGMENT */))
|
|
4246
|
-
}), 128 /* KEYED_FRAGMENT */))
|
|
4247
|
-
]))
|
|
4248
|
-
: vue.createCommentVNode("v-if", true)
|
|
4249
|
-
], 8 /* PROPS */, _hoisted_52))
|
|
4250
|
-
}), 128 /* KEYED_FRAGMENT */))
|
|
4251
|
-
]))
|
|
4252
|
-
: vue.createCommentVNode("v-if", true)
|
|
4253
|
-
])),
|
|
4252
|
+
]))
|
|
4253
|
+
: vue.createCommentVNode("v-if", true)
|
|
4254
|
+
])),
|
|
4254
4255
|
($data.pagination_data)
|
|
4255
4256
|
? (vue.openBlock(), vue.createBlock(_component_pagination, {
|
|
4256
4257
|
key: 6,
|
|
@@ -4293,10 +4294,10 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
4293
4294
|
]))
|
|
4294
4295
|
}
|
|
4295
4296
|
|
|
4296
|
-
script$
|
|
4297
|
-
script$
|
|
4297
|
+
script$6.render = render$1;
|
|
4298
|
+
script$6.__file = "src/lib/components/ShTable.vue";
|
|
4298
4299
|
|
|
4299
|
-
var script$
|
|
4300
|
+
var script$5 = {
|
|
4300
4301
|
name: 'ShTabs',
|
|
4301
4302
|
props: ['tabs', 'baseUrl', 'sharedData', 'tabCounts', 'responsive','classOne','classTwo','classes'],
|
|
4302
4303
|
data () {
|
|
@@ -4417,8 +4418,8 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
4417
4418
|
], 64 /* STABLE_FRAGMENT */))
|
|
4418
4419
|
}
|
|
4419
4420
|
|
|
4420
|
-
script$
|
|
4421
|
-
script$
|
|
4421
|
+
script$5.render = render;
|
|
4422
|
+
script$5.__file = "src/lib/components/ShTabs.vue";
|
|
4422
4423
|
|
|
4423
4424
|
const _hoisted_1$3 = {
|
|
4424
4425
|
class: "nav nav-tabs",
|
|
@@ -4429,9 +4430,11 @@ const _hoisted_2$3 = {
|
|
|
4429
4430
|
role: "presentation"
|
|
4430
4431
|
};
|
|
4431
4432
|
const _hoisted_3$3 = ["onClick"];
|
|
4432
|
-
const _hoisted_4$3 = { class: "
|
|
4433
|
+
const _hoisted_4$3 = /*#__PURE__*/vue.createElementVNode("i", { class: "d-none" }, null, -1 /* HOISTED */);
|
|
4434
|
+
const _hoisted_5$3 = { class: "sh_tab_count" };
|
|
4435
|
+
const _hoisted_6$2 = { class: "tab-content" };
|
|
4433
4436
|
|
|
4434
|
-
var script$
|
|
4437
|
+
var script$4 = {
|
|
4435
4438
|
__name: 'ShDynamicTabs',
|
|
4436
4439
|
props: ['tabs','data'],
|
|
4437
4440
|
setup(__props) {
|
|
@@ -4462,11 +4465,19 @@ return (_ctx, _cache) => {
|
|
|
4462
4465
|
vue.createElementVNode("button", {
|
|
4463
4466
|
onClick: $event => (setTab(tab)),
|
|
4464
4467
|
class: vue.normalizeClass(["nav-link", vue.unref(currentTab) === tab ? 'active':''])
|
|
4465
|
-
},
|
|
4468
|
+
}, [
|
|
4469
|
+
vue.createTextVNode(vue.toDisplayString(tab.label) + " ", 1 /* TEXT */),
|
|
4470
|
+
(tab.count || tab.tabCount)
|
|
4471
|
+
? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
|
|
4472
|
+
_hoisted_4$3,
|
|
4473
|
+
vue.createElementVNode("sup", _hoisted_5$3, vue.toDisplayString(tab.count ?? tab.tabCount), 1 /* TEXT */)
|
|
4474
|
+
], 64 /* STABLE_FRAGMENT */))
|
|
4475
|
+
: vue.createCommentVNode("v-if", true)
|
|
4476
|
+
], 10 /* CLASS, PROPS */, _hoisted_3$3)
|
|
4466
4477
|
]))
|
|
4467
4478
|
}), 256 /* UNKEYED_FRAGMENT */))
|
|
4468
4479
|
]),
|
|
4469
|
-
vue.createElementVNode("div",
|
|
4480
|
+
vue.createElementVNode("div", _hoisted_6$2, [
|
|
4470
4481
|
(vue.unref(currentTab))
|
|
4471
4482
|
? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(vue.unref(currentTab).component), vue.normalizeProps(vue.mergeProps({ key: 0 }, vue.unref(currentTab))), null, 16 /* FULL_PROPS */))
|
|
4472
4483
|
: vue.createCommentVNode("v-if", true)
|
|
@@ -4477,7 +4488,7 @@ return (_ctx, _cache) => {
|
|
|
4477
4488
|
|
|
4478
4489
|
};
|
|
4479
4490
|
|
|
4480
|
-
script$
|
|
4491
|
+
script$4.__file = "src/lib/components/ShDynamicTabs.vue";
|
|
4481
4492
|
|
|
4482
4493
|
const useUserStore = pinia.defineStore('user-store', {
|
|
4483
4494
|
state: () => ({
|
|
@@ -4587,7 +4598,7 @@ const _hoisted_4$2 = {
|
|
|
4587
4598
|
const _hoisted_5$2 = /*#__PURE__*/vue.createElementVNode("i", { class: "fa fa-plus" }, null, -1 /* HOISTED */);
|
|
4588
4599
|
|
|
4589
4600
|
|
|
4590
|
-
var script$
|
|
4601
|
+
var script$3 = {
|
|
4591
4602
|
__name: 'Departments',
|
|
4592
4603
|
setup(__props) {
|
|
4593
4604
|
|
|
@@ -4617,7 +4628,7 @@ return (_ctx, _cache) => {
|
|
|
4617
4628
|
_hoisted_5$2,
|
|
4618
4629
|
vue.createTextVNode(" ADD DEPARTMENT")
|
|
4619
4630
|
], 512 /* NEED_PATCH */),
|
|
4620
|
-
vue.createVNode(script$
|
|
4631
|
+
vue.createVNode(script$6, {
|
|
4621
4632
|
headers: ['id','name','description', 'created_at'],
|
|
4622
4633
|
"end-point": "admin/departments/list",
|
|
4623
4634
|
actions: {
|
|
@@ -4631,12 +4642,12 @@ return (_ctx, _cache) => {
|
|
|
4631
4642
|
]
|
|
4632
4643
|
}
|
|
4633
4644
|
}),
|
|
4634
|
-
vue.createVNode(script$
|
|
4645
|
+
vue.createVNode(script$c, {
|
|
4635
4646
|
"modal-id": "sh-department_modal",
|
|
4636
4647
|
"modal-title": "Department Form"
|
|
4637
4648
|
}, {
|
|
4638
4649
|
default: vue.withCtx(() => [
|
|
4639
|
-
vue.createVNode(script$
|
|
4650
|
+
vue.createVNode(script$e, {
|
|
4640
4651
|
"success-callback": "departmentAdded",
|
|
4641
4652
|
onDepartmentAdded: departmentAdded,
|
|
4642
4653
|
action: "admin/departments/store",
|
|
@@ -4653,7 +4664,7 @@ return (_ctx, _cache) => {
|
|
|
4653
4664
|
|
|
4654
4665
|
};
|
|
4655
4666
|
|
|
4656
|
-
script$
|
|
4667
|
+
script$3.__file = "src/lib/components/core/Departments/Departments.vue";
|
|
4657
4668
|
|
|
4658
4669
|
const _hoisted_1$1 = {
|
|
4659
4670
|
key: 0,
|
|
@@ -4672,7 +4683,7 @@ const _hoisted_4$1 = { class: "text-primary text-capitalize" };
|
|
|
4672
4683
|
const _hoisted_5$1 = ["value"];
|
|
4673
4684
|
const _hoisted_6$1 = /*#__PURE__*/vue.createElementVNode("i", { class: "fa fa-save" }, null, -1 /* HOISTED */);
|
|
4674
4685
|
|
|
4675
|
-
var script$
|
|
4686
|
+
var script$2 = {
|
|
4676
4687
|
__name: 'Department',
|
|
4677
4688
|
setup(__props) {
|
|
4678
4689
|
|
|
@@ -4770,7 +4781,7 @@ return (_ctx, _cache) => {
|
|
|
4770
4781
|
vue.createElementVNode("div", _hoisted_2$1, [
|
|
4771
4782
|
_hoisted_3$1,
|
|
4772
4783
|
vue.createElementVNode("h5", null, "Department #" + vue.toDisplayString(vue.unref(department).id) + " - " + vue.toDisplayString(vue.unref(department).name) + " Allowed Modules", 1 /* TEXT */),
|
|
4773
|
-
vue.createVNode(script$
|
|
4784
|
+
vue.createVNode(script$6, {
|
|
4774
4785
|
actions: {
|
|
4775
4786
|
label: 'Actions',
|
|
4776
4787
|
actions: [
|
|
@@ -4790,12 +4801,12 @@ return (_ctx, _cache) => {
|
|
|
4790
4801
|
headers: ['id',showModule,'created_at'],
|
|
4791
4802
|
"end-point": 'admin/departments/department/list-modules/' + id.value
|
|
4792
4803
|
}, null, 8 /* PROPS */, ["actions", "reload", "headers", "end-point"]),
|
|
4793
|
-
vue.createVNode(script$
|
|
4804
|
+
vue.createVNode(script$c, {
|
|
4794
4805
|
"modal-id": "addModule",
|
|
4795
4806
|
"modal-title": "Add Module Department"
|
|
4796
4807
|
}, {
|
|
4797
4808
|
default: vue.withCtx(() => [
|
|
4798
|
-
vue.createVNode(script$
|
|
4809
|
+
vue.createVNode(script$e, {
|
|
4799
4810
|
"reload-select-items": vue.unref(reload),
|
|
4800
4811
|
"success-callback": moduleAdded,
|
|
4801
4812
|
"fill-selects": {
|
|
@@ -4817,7 +4828,7 @@ return (_ctx, _cache) => {
|
|
|
4817
4828
|
ref: permissionCanvasBtn,
|
|
4818
4829
|
"data-bs-toggle": "offcanvas"
|
|
4819
4830
|
}, null, 512 /* NEED_PATCH */),
|
|
4820
|
-
vue.createVNode(script$
|
|
4831
|
+
vue.createVNode(script$a, {
|
|
4821
4832
|
"canvas-id": "permissionsCanvas",
|
|
4822
4833
|
position: "end enlarged",
|
|
4823
4834
|
"canvas-title": "Module Permissions"
|
|
@@ -4865,7 +4876,7 @@ return (_ctx, _cache) => {
|
|
|
4865
4876
|
|
|
4866
4877
|
};
|
|
4867
4878
|
|
|
4868
|
-
script$
|
|
4879
|
+
script$2.__file = "src/lib/components/core/Departments/department/Department.vue";
|
|
4869
4880
|
|
|
4870
4881
|
const _withScopeId = n => (vue.pushScopeId("data-v-2911509a"),n=n(),vue.popScopeId(),n);
|
|
4871
4882
|
const _hoisted_1 = {
|
|
@@ -4893,7 +4904,7 @@ const _hoisted_8 = {
|
|
|
4893
4904
|
};
|
|
4894
4905
|
const _hoisted_9 = { class: "sh-auth-footer" };
|
|
4895
4906
|
|
|
4896
|
-
var script = {
|
|
4907
|
+
var script$1 = {
|
|
4897
4908
|
__name: 'ShAuth',
|
|
4898
4909
|
setup(__props) {
|
|
4899
4910
|
|
|
@@ -4920,7 +4931,7 @@ vue.watch(user,(newUser) => {
|
|
|
4920
4931
|
function loginSuccessful(res){
|
|
4921
4932
|
userStore.setAccessToken(res.token);
|
|
4922
4933
|
userStore.setUser();
|
|
4923
|
-
|
|
4934
|
+
window.location.href = redirectLogin;
|
|
4924
4935
|
}
|
|
4925
4936
|
|
|
4926
4937
|
return (_ctx, _cache) => {
|
|
@@ -4932,7 +4943,7 @@ return (_ctx, _cache) => {
|
|
|
4932
4943
|
: (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
|
|
4933
4944
|
(section.value === 'login')
|
|
4934
4945
|
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2, [
|
|
4935
|
-
vue.createVNode(script$
|
|
4946
|
+
vue.createVNode(script$e, {
|
|
4936
4947
|
class: "sh-login-form",
|
|
4937
4948
|
fields: ['email','password'],
|
|
4938
4949
|
"action-label": "Login",
|
|
@@ -4957,7 +4968,7 @@ return (_ctx, _cache) => {
|
|
|
4957
4968
|
(vue.unref(registerSubTitle))
|
|
4958
4969
|
? (vue.openBlock(), vue.createElementBlock("span", _hoisted_8, vue.toDisplayString(vue.unref(registerSubTitle)), 1 /* TEXT */))
|
|
4959
4970
|
: vue.createCommentVNode("v-if", true),
|
|
4960
|
-
vue.createVNode(script$
|
|
4971
|
+
vue.createVNode(script$e, {
|
|
4961
4972
|
class: "sh-login-form",
|
|
4962
4973
|
fields: vue.unref(registrationFields),
|
|
4963
4974
|
"action-label": "Sign Up",
|
|
@@ -4978,27 +4989,73 @@ return (_ctx, _cache) => {
|
|
|
4978
4989
|
|
|
4979
4990
|
};
|
|
4980
4991
|
|
|
4981
|
-
script.__scopeId = "data-v-2911509a";
|
|
4982
|
-
script.__file = "src/lib/components/core/auth/ShAuth.vue";
|
|
4992
|
+
script$1.__scopeId = "data-v-2911509a";
|
|
4993
|
+
script$1.__file = "src/lib/components/core/auth/ShAuth.vue";
|
|
4994
|
+
|
|
4995
|
+
var script = {
|
|
4996
|
+
__name: 'TextInput',
|
|
4997
|
+
props: ['modelValue'],
|
|
4998
|
+
emits: ['update:modelValue'],
|
|
4999
|
+
setup(__props, { emit }) {
|
|
5000
|
+
|
|
5001
|
+
const props = __props;
|
|
5002
|
+
|
|
5003
|
+
|
|
5004
|
+
|
|
5005
|
+
|
|
5006
|
+
const inputModel = vue.ref(null);
|
|
5007
|
+
|
|
5008
|
+
const modelValueUpdated = (e) => {
|
|
5009
|
+
emit('update:modelValue',inputModel);
|
|
5010
|
+
};
|
|
5011
|
+
vue.onMounted(()=>{
|
|
5012
|
+
inputModel.value = props.modelValue;
|
|
5013
|
+
});
|
|
5014
|
+
|
|
5015
|
+
|
|
5016
|
+
return (_ctx, _cache) => {
|
|
5017
|
+
return vue.withDirectives((vue.openBlock(), vue.createElementBlock("input", {
|
|
5018
|
+
type: "text",
|
|
5019
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = $event => ((inputModel).value = $event)),
|
|
5020
|
+
onChange: modelValueUpdated,
|
|
5021
|
+
onKeydown: _cache[1] || (_cache[1] = (...args) => (__props.modelValue && __props.modelValue(...args))),
|
|
5022
|
+
onUpdated: modelValueUpdated
|
|
5023
|
+
}, null, 544 /* HYDRATE_EVENTS, NEED_PATCH */)), [
|
|
5024
|
+
[vue.vModelText, inputModel.value]
|
|
5025
|
+
])
|
|
5026
|
+
}
|
|
5027
|
+
}
|
|
5028
|
+
|
|
5029
|
+
};
|
|
5030
|
+
|
|
5031
|
+
script.__file = "src/lib/components/form-components/TextInput.vue";
|
|
4983
5032
|
|
|
4984
5033
|
const ShFrontend = {
|
|
4985
5034
|
install: (app, options) => {
|
|
4986
|
-
ShStorage.setItem('ShConfig',options);
|
|
4987
5035
|
if(options.sessionTimeout){
|
|
4988
5036
|
app.provide('sessionTimeout',options.sessionTimeout);
|
|
4989
5037
|
ShStorage.setItem('sessionTimeout',options.sessionTimeout);
|
|
4990
5038
|
}
|
|
5039
|
+
const shFormElements = options.shFormElementClasses ?? {};
|
|
5040
|
+
|
|
5041
|
+
const defaultFormElementClasses = {
|
|
5042
|
+
formGroup: shFormElements.formGroup ?? 'mb-2',
|
|
5043
|
+
formLabel: shFormElements.formLabel ?? 'form-label',
|
|
5044
|
+
helperText: shFormElements.helperText ?? 'form-text',
|
|
5045
|
+
actionBtn: shFormElements.actionBtn ?? 'btn btn-primary'
|
|
5046
|
+
};
|
|
4991
5047
|
const swalPosition = options.swalPosition ?? 'top-end';
|
|
4992
5048
|
const loginEndpoint = options.loginEndpoint ?? 'auth/login';
|
|
4993
5049
|
const registerEndpoint = options.registerEndpoint ?? 'auth/register';
|
|
4994
5050
|
const registerTitle = options.registerTitle ?? 'Create a new account';
|
|
4995
5051
|
const registerSubTitle = options.registerSubTitle ?? `It's quick and easy`;
|
|
4996
5052
|
const logoutApiEndpoint = options.logoutApiEndpoint ?? `auth/logout`;
|
|
5053
|
+
const formTextInput = options.formTextInput ?? script;
|
|
4997
5054
|
const loginUrl = options.loginUrl ?? `/login`;
|
|
4998
5055
|
const redirectLogin = options.redirectLogin ?? `/`;
|
|
4999
5056
|
const redirectRegister = options.redirectRegister ?? `/`;
|
|
5000
5057
|
const registrationFields = options.registrationFields ?? ['name','email','phone','password','password_confirmation'];
|
|
5001
|
-
const AuthComponent = options.authComponent ?? script;
|
|
5058
|
+
const AuthComponent = options.authComponent ?? script$1;
|
|
5002
5059
|
app.provide('loginEndpoint',loginEndpoint);
|
|
5003
5060
|
app.provide('registerEndpoint', registerEndpoint);
|
|
5004
5061
|
app.provide('registrationFields', registrationFields);
|
|
@@ -5007,7 +5064,9 @@ const ShFrontend = {
|
|
|
5007
5064
|
app.provide('redirectLogin', redirectLogin);
|
|
5008
5065
|
app.provide('redirectRegister', redirectRegister);
|
|
5009
5066
|
app.provide('logoutApiEndpoint', logoutApiEndpoint);
|
|
5067
|
+
app.provide('formTextInput', formTextInput);
|
|
5010
5068
|
app.provide('loginUrl', loginUrl);
|
|
5069
|
+
app.provide('shFormElementClasses',defaultFormElementClasses);
|
|
5011
5070
|
window.swalPosition = swalPosition;
|
|
5012
5071
|
if(options.router) {
|
|
5013
5072
|
options.router.addRoute({
|
|
@@ -5016,28 +5075,34 @@ const ShFrontend = {
|
|
|
5016
5075
|
});
|
|
5017
5076
|
options.router.addRoute({
|
|
5018
5077
|
path: '/sh-departments',
|
|
5019
|
-
component: script$
|
|
5078
|
+
component: script$3
|
|
5020
5079
|
});
|
|
5021
5080
|
options.router.addRoute({
|
|
5022
5081
|
path: '/sh-departments/permissions/:id',
|
|
5023
|
-
component: script$
|
|
5082
|
+
component: script$2
|
|
5024
5083
|
});
|
|
5025
5084
|
}
|
|
5085
|
+
//filter unwanted config items from options to be put in local storage
|
|
5086
|
+
const removeKeys = ['formTextInput','router','shFormElementClasses'];
|
|
5087
|
+
const allowKeys = [];
|
|
5088
|
+
Object.keys(options).map(key=> ((typeof options[key] !== 'string' && !allowKeys.includes(key)) || removeKeys.includes(key)) && delete options[key]);
|
|
5089
|
+
|
|
5090
|
+
ShStorage.setItem('ShConfig',options);
|
|
5026
5091
|
}
|
|
5027
5092
|
};
|
|
5028
5093
|
|
|
5029
|
-
exports.ShCanvas = script$
|
|
5030
|
-
exports.ShConfirmAction = script$
|
|
5031
|
-
exports.ShDropDownForm = script$
|
|
5032
|
-
exports.ShDynamicTabs = script$
|
|
5033
|
-
exports.ShForm = script$
|
|
5094
|
+
exports.ShCanvas = script$a;
|
|
5095
|
+
exports.ShConfirmAction = script$8;
|
|
5096
|
+
exports.ShDropDownForm = script$d;
|
|
5097
|
+
exports.ShDynamicTabs = script$4;
|
|
5098
|
+
exports.ShForm = script$e;
|
|
5034
5099
|
exports.ShFrontend = ShFrontend;
|
|
5035
|
-
exports.ShModal = script$
|
|
5036
|
-
exports.ShModalForm = script$
|
|
5037
|
-
exports.ShPhone = script$
|
|
5038
|
-
exports.ShSilentAction = script$
|
|
5039
|
-
exports.ShTable = script$
|
|
5040
|
-
exports.ShTabs = script$
|
|
5100
|
+
exports.ShModal = script$c;
|
|
5101
|
+
exports.ShModalForm = script$b;
|
|
5102
|
+
exports.ShPhone = script$h;
|
|
5103
|
+
exports.ShSilentAction = script$7;
|
|
5104
|
+
exports.ShTable = script$6;
|
|
5105
|
+
exports.ShTabs = script$5;
|
|
5041
5106
|
exports.shApis = shApis;
|
|
5042
5107
|
exports.shRepo = shRepo;
|
|
5043
5108
|
exports.shStorage = ShStorage;
|