@iankibetsh/shframework 1.4.3 → 1.4.4
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/library.js +410 -287
- package/dist/library.mjs +399 -276
- package/package.json +1 -1
package/dist/library.mjs
CHANGED
|
@@ -1861,7 +1861,7 @@ const countries = [
|
|
|
1861
1861
|
}
|
|
1862
1862
|
];
|
|
1863
1863
|
|
|
1864
|
-
var script$
|
|
1864
|
+
var script$o = {
|
|
1865
1865
|
name: 'PhoneInput',
|
|
1866
1866
|
props: ['modelValue', 'country_code'],
|
|
1867
1867
|
data () {
|
|
@@ -1923,19 +1923,19 @@ var script$n = {
|
|
|
1923
1923
|
}
|
|
1924
1924
|
};
|
|
1925
1925
|
|
|
1926
|
-
const _hoisted_1$
|
|
1927
|
-
const _hoisted_2$
|
|
1926
|
+
const _hoisted_1$j = { class: "sh-phone mb-3" };
|
|
1927
|
+
const _hoisted_2$d = {
|
|
1928
1928
|
key: 0,
|
|
1929
1929
|
style: {"display":"contents"}
|
|
1930
1930
|
};
|
|
1931
|
-
const _hoisted_3$
|
|
1932
|
-
const _hoisted_4$
|
|
1931
|
+
const _hoisted_3$c = ["src"];
|
|
1932
|
+
const _hoisted_4$c = ["value"];
|
|
1933
1933
|
|
|
1934
1934
|
function render$7(_ctx, _cache, $props, $setup, $data, $options) {
|
|
1935
|
-
return (openBlock(), createElementBlock("div", _hoisted_1$
|
|
1935
|
+
return (openBlock(), createElementBlock("div", _hoisted_1$j, [
|
|
1936
1936
|
($data.selectedCountry)
|
|
1937
|
-
? (openBlock(), createElementBlock("div", _hoisted_2$
|
|
1938
|
-
createElementVNode("img", { src: $data.flag }, null, 8 /* PROPS */, _hoisted_3$
|
|
1937
|
+
? (openBlock(), createElementBlock("div", _hoisted_2$d, [
|
|
1938
|
+
createElementVNode("img", { src: $data.flag }, null, 8 /* PROPS */, _hoisted_3$c),
|
|
1939
1939
|
createTextVNode(" " + toDisplayString($data.selectedCountry.dialCode), 1 /* TEXT */)
|
|
1940
1940
|
]))
|
|
1941
1941
|
: createCommentVNode("v-if", true),
|
|
@@ -1948,7 +1948,7 @@ function render$7(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1948
1948
|
return (openBlock(), createElementBlock("option", {
|
|
1949
1949
|
value: country,
|
|
1950
1950
|
key: country.dialCode
|
|
1951
|
-
}, toDisplayString(country.name + '(' + country.dialCode + ')'), 9 /* TEXT, PROPS */, _hoisted_4$
|
|
1951
|
+
}, toDisplayString(country.name + '(' + country.dialCode + ')'), 9 /* TEXT, PROPS */, _hoisted_4$c))
|
|
1952
1952
|
}), 128 /* KEYED_FRAGMENT */))
|
|
1953
1953
|
], 544 /* HYDRATE_EVENTS, NEED_PATCH */), [
|
|
1954
1954
|
[vModelSelect, $data.selectedCountry]
|
|
@@ -1966,10 +1966,10 @@ function render$7(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1966
1966
|
]))
|
|
1967
1967
|
}
|
|
1968
1968
|
|
|
1969
|
-
script$
|
|
1970
|
-
script$
|
|
1969
|
+
script$o.render = render$7;
|
|
1970
|
+
script$o.__file = "src/lib/components/form-components/PhoneInput.vue";
|
|
1971
1971
|
|
|
1972
|
-
var script$
|
|
1972
|
+
var script$n = {
|
|
1973
1973
|
name: 'ShEditor',
|
|
1974
1974
|
props: ['modelValue'],
|
|
1975
1975
|
components: {
|
|
@@ -2008,7 +2008,7 @@ var script$m = {
|
|
|
2008
2008
|
}
|
|
2009
2009
|
};
|
|
2010
2010
|
|
|
2011
|
-
const _hoisted_1$
|
|
2011
|
+
const _hoisted_1$i = /*#__PURE__*/createElementVNode("textarea", {
|
|
2012
2012
|
id: "tiny",
|
|
2013
2013
|
style: {"display":"none"},
|
|
2014
2014
|
"data-cy": "tinymce_editor"
|
|
@@ -2018,7 +2018,7 @@ function render$6(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2018
2018
|
const _component_editor = resolveComponent("editor");
|
|
2019
2019
|
|
|
2020
2020
|
return (openBlock(), createElementBlock(Fragment, null, [
|
|
2021
|
-
_hoisted_1$
|
|
2021
|
+
_hoisted_1$i,
|
|
2022
2022
|
createElementVNode("div", {
|
|
2023
2023
|
onFocusin: _cache[1] || (_cache[1] = withModifiers(() => {}, ["stop"])),
|
|
2024
2024
|
class: "sh-editor w-100"
|
|
@@ -2043,31 +2043,31 @@ function render$6(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2043
2043
|
], 64 /* STABLE_FRAGMENT */))
|
|
2044
2044
|
}
|
|
2045
2045
|
|
|
2046
|
-
script$
|
|
2047
|
-
script$
|
|
2046
|
+
script$n.render = render$6;
|
|
2047
|
+
script$n.__file = "src/lib/components/form-components/ShEditor.vue";
|
|
2048
2048
|
|
|
2049
|
-
const _hoisted_1$
|
|
2049
|
+
const _hoisted_1$h = {
|
|
2050
2050
|
key: 0,
|
|
2051
2051
|
class: "dropdown sh-suggest"
|
|
2052
2052
|
};
|
|
2053
|
-
const _hoisted_2$
|
|
2054
|
-
const _hoisted_3$
|
|
2055
|
-
const _hoisted_4$
|
|
2056
|
-
const _hoisted_5$
|
|
2057
|
-
const _hoisted_6$
|
|
2058
|
-
const _hoisted_7$
|
|
2059
|
-
const _hoisted_8$
|
|
2060
|
-
const _hoisted_9$
|
|
2053
|
+
const _hoisted_2$c = ["id"];
|
|
2054
|
+
const _hoisted_3$b = { class: "badge bg-secondary m-1 sh-selected-item" };
|
|
2055
|
+
const _hoisted_4$b = ["onClick"];
|
|
2056
|
+
const _hoisted_5$9 = ["id"];
|
|
2057
|
+
const _hoisted_6$8 = ["id", "aria-labelledby"];
|
|
2058
|
+
const _hoisted_7$6 = { key: 0 };
|
|
2059
|
+
const _hoisted_8$4 = ["onClick"];
|
|
2060
|
+
const _hoisted_9$5 = {
|
|
2061
2061
|
key: 1,
|
|
2062
2062
|
class: "dropdown-item sh-suggest-no-results"
|
|
2063
2063
|
};
|
|
2064
|
-
const _hoisted_10$
|
|
2064
|
+
const _hoisted_10$4 = {
|
|
2065
2065
|
key: 2,
|
|
2066
2066
|
class: "dropdown-item sh-suggest-no-input"
|
|
2067
2067
|
};
|
|
2068
2068
|
|
|
2069
2069
|
|
|
2070
|
-
var script$
|
|
2070
|
+
var script$m = {
|
|
2071
2071
|
__name: 'ShSuggest',
|
|
2072
2072
|
props: ['fillSelects','modelValue'],
|
|
2073
2073
|
emits: ['update:modelValue'],
|
|
@@ -2148,7 +2148,7 @@ function filterData(e){
|
|
|
2148
2148
|
|
|
2149
2149
|
return (_ctx, _cache) => {
|
|
2150
2150
|
return (unref(id))
|
|
2151
|
-
? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
2151
|
+
? (openBlock(), createElementBlock("div", _hoisted_1$h, [
|
|
2152
2152
|
createElementVNode("div", {
|
|
2153
2153
|
id: unref(id),
|
|
2154
2154
|
"data-bs-toggle": "dropdown",
|
|
@@ -2157,14 +2157,14 @@ return (_ctx, _cache) => {
|
|
|
2157
2157
|
}, [
|
|
2158
2158
|
createElementVNode("div", null, [
|
|
2159
2159
|
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(selectedSuggestions), (sgt) => {
|
|
2160
|
-
return (openBlock(), createElementBlock("h5", _hoisted_3$
|
|
2160
|
+
return (openBlock(), createElementBlock("h5", _hoisted_3$b, [
|
|
2161
2161
|
createTextVNode(toDisplayString(sgt.name) + " ", 1 /* TEXT */),
|
|
2162
2162
|
createElementVNode("button", {
|
|
2163
2163
|
onClick: $event => (removeSuggestion(sgt.id)),
|
|
2164
2164
|
type: "button",
|
|
2165
2165
|
class: "btn-close border-start border-1 ms-1",
|
|
2166
2166
|
"aria-label": "Close"
|
|
2167
|
-
}, null, 8 /* PROPS */, _hoisted_4$
|
|
2167
|
+
}, null, 8 /* PROPS */, _hoisted_4$b)
|
|
2168
2168
|
]))
|
|
2169
2169
|
}), 256 /* UNKEYED_FRAGMENT */))
|
|
2170
2170
|
]),
|
|
@@ -2174,8 +2174,8 @@ return (_ctx, _cache) => {
|
|
|
2174
2174
|
onClick: filterData,
|
|
2175
2175
|
onInput: filterData,
|
|
2176
2176
|
class: "flex-fill h-100 sh-suggestion-input"
|
|
2177
|
-
}, null, 40 /* PROPS, HYDRATE_EVENTS */, _hoisted_5$
|
|
2178
|
-
], 8 /* PROPS */, _hoisted_2$
|
|
2177
|
+
}, null, 40 /* PROPS, HYDRATE_EVENTS */, _hoisted_5$9)
|
|
2178
|
+
], 8 /* PROPS */, _hoisted_2$c),
|
|
2179
2179
|
createElementVNode("ul", {
|
|
2180
2180
|
class: "dropdown-menu w-100",
|
|
2181
2181
|
id: 'dropwdown_section' + unref(id),
|
|
@@ -2187,20 +2187,20 @@ return (_ctx, _cache) => {
|
|
|
2187
2187
|
key: suggestion.id
|
|
2188
2188
|
}, [
|
|
2189
2189
|
(suggestion.name)
|
|
2190
|
-
? (openBlock(), createElementBlock("li", _hoisted_7$
|
|
2190
|
+
? (openBlock(), createElementBlock("li", _hoisted_7$6, [
|
|
2191
2191
|
createElementVNode("a", {
|
|
2192
2192
|
onClick: $event => (addSuggestion(suggestion)),
|
|
2193
2193
|
class: normalizeClass(["dropdown-item", unref(selectedSuggestions).includes(suggestion) ? 'active':'']),
|
|
2194
2194
|
href: "#"
|
|
2195
|
-
}, toDisplayString(suggestion.name ?? suggestion.text), 11 /* TEXT, CLASS, PROPS */, _hoisted_8$
|
|
2195
|
+
}, toDisplayString(suggestion.name ?? suggestion.text), 11 /* TEXT, CLASS, PROPS */, _hoisted_8$4)
|
|
2196
2196
|
]))
|
|
2197
2197
|
: createCommentVNode("v-if", true)
|
|
2198
2198
|
], 64 /* STABLE_FRAGMENT */))
|
|
2199
2199
|
}), 128 /* KEYED_FRAGMENT */))
|
|
2200
2200
|
: (unref(searchText))
|
|
2201
|
-
? (openBlock(), createElementBlock("li", _hoisted_9$
|
|
2202
|
-
: (openBlock(), createElementBlock("li", _hoisted_10$
|
|
2203
|
-
], 8 /* PROPS */, _hoisted_6$
|
|
2201
|
+
? (openBlock(), createElementBlock("li", _hoisted_9$5, " No results found "))
|
|
2202
|
+
: (openBlock(), createElementBlock("li", _hoisted_10$4, " Type to search... "))
|
|
2203
|
+
], 8 /* PROPS */, _hoisted_6$8)
|
|
2204
2204
|
]))
|
|
2205
2205
|
: createCommentVNode("v-if", true)
|
|
2206
2206
|
}
|
|
@@ -2208,16 +2208,16 @@ return (_ctx, _cache) => {
|
|
|
2208
2208
|
|
|
2209
2209
|
};
|
|
2210
2210
|
|
|
2211
|
-
script$
|
|
2212
|
-
script$
|
|
2211
|
+
script$m.__scopeId = "data-v-71cc9569";
|
|
2212
|
+
script$m.__file = "src/lib/components/form-components/ShSuggest.vue";
|
|
2213
2213
|
|
|
2214
|
-
var script$
|
|
2214
|
+
var script$l = {
|
|
2215
2215
|
name: 'ShForm',
|
|
2216
2216
|
components: {
|
|
2217
|
-
PhoneInput: script$
|
|
2218
|
-
ShSuggest: script$
|
|
2219
|
-
ShEditor: script$
|
|
2220
|
-
ShPhone: script$
|
|
2217
|
+
PhoneInput: script$o,
|
|
2218
|
+
ShSuggest: script$m,
|
|
2219
|
+
ShEditor: script$n,
|
|
2220
|
+
ShPhone: script$o
|
|
2221
2221
|
},
|
|
2222
2222
|
props: [
|
|
2223
2223
|
'action',
|
|
@@ -2535,23 +2535,23 @@ var script$k = {
|
|
|
2535
2535
|
}
|
|
2536
2536
|
};
|
|
2537
2537
|
|
|
2538
|
-
const _hoisted_1$
|
|
2539
|
-
const _hoisted_2$
|
|
2538
|
+
const _hoisted_1$g = /*#__PURE__*/createElementVNode("h5", { class: "d-none" }, null, -1 /* HOISTED */);
|
|
2539
|
+
const _hoisted_2$b = {
|
|
2540
2540
|
ref: "ShAutoForm",
|
|
2541
2541
|
class: "sh-form"
|
|
2542
2542
|
};
|
|
2543
|
-
const _hoisted_3$
|
|
2543
|
+
const _hoisted_3$a = {
|
|
2544
2544
|
key: 0,
|
|
2545
2545
|
class: "alert alert-danger alert-dismissible fade show sh-form-submission-error",
|
|
2546
2546
|
role: "alert"
|
|
2547
2547
|
};
|
|
2548
|
-
const _hoisted_4$
|
|
2549
|
-
const _hoisted_5$
|
|
2550
|
-
const _hoisted_6$
|
|
2551
|
-
const _hoisted_7$
|
|
2552
|
-
const _hoisted_8$
|
|
2553
|
-
const _hoisted_9$
|
|
2554
|
-
const _hoisted_10$
|
|
2548
|
+
const _hoisted_4$a = /*#__PURE__*/createElementVNode("i", { class: "bi-exclamation-triangle-fill me-1" }, null, -1 /* HOISTED */);
|
|
2549
|
+
const _hoisted_5$8 = { key: 0 };
|
|
2550
|
+
const _hoisted_6$7 = { key: 1 };
|
|
2551
|
+
const _hoisted_7$5 = { class: "row" };
|
|
2552
|
+
const _hoisted_8$3 = { class: "fg-label control-label text-capitalize control-bel col-md-12 request-form-label mb-2" };
|
|
2553
|
+
const _hoisted_9$4 = { class: "col-md-12" };
|
|
2554
|
+
const _hoisted_10$3 = ["data-cy", "placeholder", "name", "onFocus", "onChange"];
|
|
2555
2555
|
const _hoisted_11$2 = ["data-cy", "placeholder", "name", "onFocus", "onUpdate:modelValue"];
|
|
2556
2556
|
const _hoisted_12$2 = ["data-cy", "placeholder", "name", "onFocus", "onUpdate:modelValue"];
|
|
2557
2557
|
const _hoisted_13$2 = ["data-cy", "placeholder", "name", "onFocus", "onUpdate:modelValue"];
|
|
@@ -2597,16 +2597,16 @@ function render$5(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2597
2597
|
const _component_ShEditor = resolveComponent("ShEditor");
|
|
2598
2598
|
|
|
2599
2599
|
return (openBlock(), createElementBlock(Fragment, null, [
|
|
2600
|
-
_hoisted_1$
|
|
2601
|
-
createElementVNode("form", _hoisted_2$
|
|
2600
|
+
_hoisted_1$g,
|
|
2601
|
+
createElementVNode("form", _hoisted_2$b, [
|
|
2602
2602
|
createCommentVNode(" <div v-if=\"form_status == 1\" class=\"alert alert-info\">Processing...</div>"),
|
|
2603
2603
|
createCommentVNode(" <div v-if=\"form_status == 2\" class=\"alert alert-success\">Success</div>"),
|
|
2604
2604
|
(_ctx.form_status == 3)
|
|
2605
|
-
? (openBlock(), createElementBlock("div", _hoisted_3$
|
|
2606
|
-
_hoisted_4$
|
|
2605
|
+
? (openBlock(), createElementBlock("div", _hoisted_3$a, [
|
|
2606
|
+
_hoisted_4$a,
|
|
2607
2607
|
(_ctx.errorText)
|
|
2608
|
-
? (openBlock(), createElementBlock("span", _hoisted_5$
|
|
2609
|
-
: (openBlock(), createElementBlock("span", _hoisted_6$
|
|
2608
|
+
? (openBlock(), createElementBlock("span", _hoisted_5$8, toDisplayString(_ctx.errorText), 1 /* TEXT */))
|
|
2609
|
+
: (openBlock(), createElementBlock("span", _hoisted_6$7, "Unexpected Error Occurred")),
|
|
2610
2610
|
createCommentVNode(" <button @click=\"hideError\" type=\"button\" class=\"btn-close\" aria-label=\"Close\"></button>")
|
|
2611
2611
|
]))
|
|
2612
2612
|
: createCommentVNode("v-if", true),
|
|
@@ -2616,14 +2616,14 @@ function render$5(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2616
2616
|
}, null, 512 /* NEED_PATCH */), [
|
|
2617
2617
|
[vModelText, _ctx.form_elements['id']]
|
|
2618
2618
|
]),
|
|
2619
|
-
createElementVNode("div", _hoisted_7$
|
|
2619
|
+
createElementVNode("div", _hoisted_7$5, [
|
|
2620
2620
|
(openBlock(true), createElementBlock(Fragment, null, renderList($props.fields, (field) => {
|
|
2621
2621
|
return (openBlock(), createElementBlock("div", {
|
|
2622
2622
|
class: normalizeClass(["form-group", 'col-md-' + $options.getColumns()]),
|
|
2623
2623
|
key: field
|
|
2624
2624
|
}, [
|
|
2625
|
-
createElementVNode("label", _hoisted_8$
|
|
2626
|
-
createElementVNode("div", _hoisted_9$
|
|
2625
|
+
createElementVNode("label", _hoisted_8$3, toDisplayString($options.getLabel(field)), 1 /* TEXT */),
|
|
2626
|
+
createElementVNode("div", _hoisted_9$4, [
|
|
2627
2627
|
($options.getFieldType(field) === 'component')
|
|
2628
2628
|
? (openBlock(), createBlock(resolveDynamicComponent($props.customComponent[field]), {
|
|
2629
2629
|
key: 0,
|
|
@@ -2648,7 +2648,7 @@ function render$5(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2648
2648
|
ref: 'file_'+field,
|
|
2649
2649
|
onChange: $event => ($options.handleFileUpload(field)),
|
|
2650
2650
|
type: "file"
|
|
2651
|
-
}, null, 42 /* CLASS, PROPS, HYDRATE_EVENTS */, _hoisted_10$
|
|
2651
|
+
}, null, 42 /* CLASS, PROPS, HYDRATE_EVENTS */, _hoisted_10$3))
|
|
2652
2652
|
: createCommentVNode("v-if", true),
|
|
2653
2653
|
($options.getFieldType(field) === 'numeric')
|
|
2654
2654
|
? withDirectives((openBlock(), createElementBlock("input", {
|
|
@@ -2814,10 +2814,10 @@ function render$5(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2814
2814
|
], 64 /* STABLE_FRAGMENT */))
|
|
2815
2815
|
}
|
|
2816
2816
|
|
|
2817
|
-
script$
|
|
2818
|
-
script$
|
|
2817
|
+
script$l.render = render$5;
|
|
2818
|
+
script$l.__file = "src/lib/components/ShForm.vue";
|
|
2819
2819
|
|
|
2820
|
-
var script$
|
|
2820
|
+
var script$k = {
|
|
2821
2821
|
__name: 'EmailInput',
|
|
2822
2822
|
props: ['modelValue','label'],
|
|
2823
2823
|
emits: ['update:modelValue','clearValidationErrors'],
|
|
@@ -2853,12 +2853,12 @@ return (_ctx, _cache) => {
|
|
|
2853
2853
|
|
|
2854
2854
|
};
|
|
2855
2855
|
|
|
2856
|
-
script$
|
|
2856
|
+
script$k.__file = "src/lib/components/form-components/EmailInput.vue";
|
|
2857
2857
|
|
|
2858
|
-
const _hoisted_1$
|
|
2858
|
+
const _hoisted_1$f = ["min", "max"];
|
|
2859
2859
|
|
|
2860
2860
|
|
|
2861
|
-
var script$
|
|
2861
|
+
var script$j = {
|
|
2862
2862
|
__name: 'NumberInput',
|
|
2863
2863
|
props: ['modelValue','label','min','max'],
|
|
2864
2864
|
emits: ['update:modelValue','clearValidationErrors'],
|
|
@@ -2888,7 +2888,7 @@ return (_ctx, _cache) => {
|
|
|
2888
2888
|
onChange: modelValueUpdated,
|
|
2889
2889
|
onKeydown: modelValueUpdated,
|
|
2890
2890
|
onUpdated: modelValueUpdated
|
|
2891
|
-
}, null, 40 /* PROPS, HYDRATE_EVENTS */, _hoisted_1$
|
|
2891
|
+
}, null, 40 /* PROPS, HYDRATE_EVENTS */, _hoisted_1$f)), [
|
|
2892
2892
|
[vModelText, inputModel.value]
|
|
2893
2893
|
])
|
|
2894
2894
|
}
|
|
@@ -2896,9 +2896,9 @@ return (_ctx, _cache) => {
|
|
|
2896
2896
|
|
|
2897
2897
|
};
|
|
2898
2898
|
|
|
2899
|
-
script$
|
|
2899
|
+
script$j.__file = "src/lib/components/form-components/NumberInput.vue";
|
|
2900
2900
|
|
|
2901
|
-
var script$
|
|
2901
|
+
var script$i = {
|
|
2902
2902
|
__name: 'TextInput',
|
|
2903
2903
|
props: ['modelValue','label'],
|
|
2904
2904
|
emits: ['update:modelValue','clearValidationErrors'],
|
|
@@ -2934,9 +2934,9 @@ return (_ctx, _cache) => {
|
|
|
2934
2934
|
|
|
2935
2935
|
};
|
|
2936
2936
|
|
|
2937
|
-
script$
|
|
2937
|
+
script$i.__file = "src/lib/components/form-components/TextInput.vue";
|
|
2938
2938
|
|
|
2939
|
-
var script$
|
|
2939
|
+
var script$h = {
|
|
2940
2940
|
__name: 'TextAreaInput',
|
|
2941
2941
|
props: ['modelValue','label'],
|
|
2942
2942
|
emits: ['update:modelValue','clearValidationErrors'],
|
|
@@ -2972,12 +2972,12 @@ return (_ctx, _cache) => {
|
|
|
2972
2972
|
|
|
2973
2973
|
};
|
|
2974
2974
|
|
|
2975
|
-
script$
|
|
2975
|
+
script$h.__file = "src/lib/components/form-components/TextAreaInput.vue";
|
|
2976
2976
|
|
|
2977
|
-
const _hoisted_1$
|
|
2977
|
+
const _hoisted_1$e = ["value"];
|
|
2978
2978
|
|
|
2979
2979
|
|
|
2980
|
-
var script$
|
|
2980
|
+
var script$g = {
|
|
2981
2981
|
__name: 'SelectInput',
|
|
2982
2982
|
props: ['modelValue','label','data','dataUrl'],
|
|
2983
2983
|
emits: ['update:modelValue','clearValidationErrors'],
|
|
@@ -3028,7 +3028,7 @@ return (_ctx, _cache) => {
|
|
|
3028
3028
|
return (openBlock(), createElementBlock("option", {
|
|
3029
3029
|
key: option.id,
|
|
3030
3030
|
value: option.id
|
|
3031
|
-
}, toDisplayString(option.name), 9 /* TEXT, PROPS */, _hoisted_1$
|
|
3031
|
+
}, toDisplayString(option.name), 9 /* TEXT, PROPS */, _hoisted_1$e))
|
|
3032
3032
|
}), 128 /* KEYED_FRAGMENT */))
|
|
3033
3033
|
], 544 /* HYDRATE_EVENTS, NEED_PATCH */)), [
|
|
3034
3034
|
[vModelSelect, inputModel.value]
|
|
@@ -3038,9 +3038,9 @@ return (_ctx, _cache) => {
|
|
|
3038
3038
|
|
|
3039
3039
|
};
|
|
3040
3040
|
|
|
3041
|
-
script$
|
|
3041
|
+
script$g.__file = "src/lib/components/form-components/SelectInput.vue";
|
|
3042
3042
|
|
|
3043
|
-
var script$
|
|
3043
|
+
var script$f = {
|
|
3044
3044
|
__name: 'PasswordInput',
|
|
3045
3045
|
props: ['modelValue','label'],
|
|
3046
3046
|
emits: ['update:modelValue','clearValidationErrors'],
|
|
@@ -3076,23 +3076,23 @@ return (_ctx, _cache) => {
|
|
|
3076
3076
|
|
|
3077
3077
|
};
|
|
3078
3078
|
|
|
3079
|
-
script$
|
|
3079
|
+
script$f.__file = "src/lib/components/form-components/PasswordInput.vue";
|
|
3080
3080
|
|
|
3081
|
-
const _hoisted_1$
|
|
3082
|
-
const _hoisted_2$
|
|
3083
|
-
const _hoisted_3$
|
|
3084
|
-
const _hoisted_4$
|
|
3085
|
-
const _hoisted_5$
|
|
3086
|
-
const _hoisted_6$
|
|
3081
|
+
const _hoisted_1$d = /*#__PURE__*/createElementVNode("div", null, null, -1 /* HOISTED */);
|
|
3082
|
+
const _hoisted_2$a = ["innerHTML"];
|
|
3083
|
+
const _hoisted_3$9 = ["innerHTML"];
|
|
3084
|
+
const _hoisted_4$9 = ["innerHTML"];
|
|
3085
|
+
const _hoisted_5$7 = ["disabled"];
|
|
3086
|
+
const _hoisted_6$6 = {
|
|
3087
3087
|
key: 0,
|
|
3088
3088
|
class: "spinner-border spinner-border-sm",
|
|
3089
3089
|
role: "status",
|
|
3090
3090
|
"aria-hidden": "true"
|
|
3091
3091
|
};
|
|
3092
|
-
const _hoisted_7$
|
|
3092
|
+
const _hoisted_7$4 = { key: 1 };
|
|
3093
3093
|
|
|
3094
3094
|
|
|
3095
|
-
var script$
|
|
3095
|
+
var script$e = {
|
|
3096
3096
|
__name: 'ShAutoForm',
|
|
3097
3097
|
props: [
|
|
3098
3098
|
'action','successCallback','retainDataAfterSubmission',
|
|
@@ -3120,13 +3120,13 @@ const getFieldComponent = (fieldObj)=>{
|
|
|
3120
3120
|
const defaultPhones = ['phone'];
|
|
3121
3121
|
const defaultEmails = ['email'];
|
|
3122
3122
|
const formComponents = inject('formComponents');
|
|
3123
|
-
const TextComponent = formComponents.text ?? script$
|
|
3124
|
-
const TextAreaComponent = formComponents.textArea ?? script$
|
|
3125
|
-
const EmailComponent = formComponents.email ?? script$
|
|
3126
|
-
const PhoneComponent = formComponents.phone ?? script$
|
|
3127
|
-
const NumberComponent = formComponents.number ?? script$
|
|
3128
|
-
const SelectComponent = formComponents.select ?? script$
|
|
3129
|
-
const PasswordComponent = formComponents.password ?? script$
|
|
3123
|
+
const TextComponent = formComponents.text ?? script$i;
|
|
3124
|
+
const TextAreaComponent = formComponents.textArea ?? script$h;
|
|
3125
|
+
const EmailComponent = formComponents.email ?? script$k;
|
|
3126
|
+
const PhoneComponent = formComponents.phone ?? script$o;
|
|
3127
|
+
const NumberComponent = formComponents.number ?? script$j;
|
|
3128
|
+
const SelectComponent = formComponents.select ?? script$g;
|
|
3129
|
+
const PasswordComponent = formComponents.password ?? script$f;
|
|
3130
3130
|
if(props.customComponents && props.customComponents[field]) {
|
|
3131
3131
|
return props.customComponents[field]
|
|
3132
3132
|
}
|
|
@@ -3138,16 +3138,16 @@ const getFieldComponent = (fieldObj)=>{
|
|
|
3138
3138
|
}
|
|
3139
3139
|
else
|
|
3140
3140
|
if((props.textAreas && props.textAreas.includes(field)) || defaultTextareas.includes(field)){
|
|
3141
|
-
return formComponents.textArea ?? script$
|
|
3141
|
+
return formComponents.textArea ?? script$h
|
|
3142
3142
|
} else
|
|
3143
3143
|
if((props.emails && props.emails.includes(field)) || defaultEmails.includes(field)){
|
|
3144
|
-
return formComponents.email ?? script$
|
|
3144
|
+
return formComponents.email ?? script$k
|
|
3145
3145
|
} else
|
|
3146
3146
|
if((props.phones && props.phones.includes(field)) || defaultPhones.includes(field)){
|
|
3147
|
-
return formComponents.phone ?? script$
|
|
3147
|
+
return formComponents.phone ?? script$o
|
|
3148
3148
|
} else
|
|
3149
3149
|
if((props.numbers && props.numbers.includes(field)) || defaultNumbers.includes(field)){
|
|
3150
|
-
return formComponents.number ?? script$
|
|
3150
|
+
return formComponents.number ?? script$j
|
|
3151
3151
|
}
|
|
3152
3152
|
// else
|
|
3153
3153
|
// if((props.selects && props.selects.includes(field)) || defaultSelects.includes(field)){
|
|
@@ -3156,7 +3156,7 @@ const getFieldComponent = (fieldObj)=>{
|
|
|
3156
3156
|
// if((props.dates && props.dates.includes(field)) || defaultDates.includes(field)){
|
|
3157
3157
|
// return formComponents.date ?? DateInput
|
|
3158
3158
|
// }
|
|
3159
|
-
return formComponents.text ?? script$
|
|
3159
|
+
return formComponents.text ?? script$i
|
|
3160
3160
|
};
|
|
3161
3161
|
const shFormElementClasses = ref(null);
|
|
3162
3162
|
shFormElementClasses.value = inject('shFormElementClasses');
|
|
@@ -3240,7 +3240,7 @@ onMounted((ev)=>{
|
|
|
3240
3240
|
|
|
3241
3241
|
return (_ctx, _cache) => {
|
|
3242
3242
|
return (openBlock(), createElementBlock(Fragment, null, [
|
|
3243
|
-
_hoisted_1$
|
|
3243
|
+
_hoisted_1$d,
|
|
3244
3244
|
createElementVNode("form", {
|
|
3245
3245
|
ref_key: "shAutoForm",
|
|
3246
3246
|
ref: shAutoForm,
|
|
@@ -3257,7 +3257,7 @@ return (_ctx, _cache) => {
|
|
|
3257
3257
|
key: 0,
|
|
3258
3258
|
class: normalizeClass(getElementClass('formLabel')),
|
|
3259
3259
|
innerHTML: field.label
|
|
3260
|
-
}, null, 10 /* CLASS, PROPS */, _hoisted_2$
|
|
3260
|
+
}, null, 10 /* CLASS, PROPS */, _hoisted_2$a))
|
|
3261
3261
|
: createCommentVNode("v-if", true),
|
|
3262
3262
|
(openBlock(), createBlock(resolveDynamicComponent(getFieldComponent(field)), mergeProps(getComponentProps(field), {
|
|
3263
3263
|
onClick: $event => (removeValidationError(field.field)),
|
|
@@ -3271,14 +3271,14 @@ return (_ctx, _cache) => {
|
|
|
3271
3271
|
key: 1,
|
|
3272
3272
|
class: normalizeClass(getElementClass('formLabel')),
|
|
3273
3273
|
innerHTML: field.label
|
|
3274
|
-
}, null, 10 /* CLASS, PROPS */, _hoisted_3$
|
|
3274
|
+
}, null, 10 /* CLASS, PROPS */, _hoisted_3$9))
|
|
3275
3275
|
: createCommentVNode("v-if", true),
|
|
3276
3276
|
(field.helper)
|
|
3277
3277
|
? (openBlock(), createElementBlock("div", {
|
|
3278
3278
|
key: 2,
|
|
3279
3279
|
class: normalizeClass(getElementClass('helperText')),
|
|
3280
3280
|
innerHTML: field.helper
|
|
3281
|
-
}, null, 10 /* CLASS, PROPS */, _hoisted_4$
|
|
3281
|
+
}, null, 10 /* CLASS, PROPS */, _hoisted_4$9))
|
|
3282
3282
|
: createCommentVNode("v-if", true),
|
|
3283
3283
|
(validationErrors.value[field.field])
|
|
3284
3284
|
? (openBlock(), createElementBlock("div", {
|
|
@@ -3299,12 +3299,12 @@ return (_ctx, _cache) => {
|
|
|
3299
3299
|
class: normalizeClass(getElementClass('actionBtn'))
|
|
3300
3300
|
}, [
|
|
3301
3301
|
(loading.value)
|
|
3302
|
-
? (openBlock(), createElementBlock("span", _hoisted_6$
|
|
3302
|
+
? (openBlock(), createElementBlock("span", _hoisted_6$6))
|
|
3303
3303
|
: createCommentVNode("v-if", true),
|
|
3304
3304
|
(!loading.value)
|
|
3305
|
-
? (openBlock(), createElementBlock("span", _hoisted_7$
|
|
3305
|
+
? (openBlock(), createElementBlock("span", _hoisted_7$4, "Submit"))
|
|
3306
3306
|
: createCommentVNode("v-if", true)
|
|
3307
|
-
], 14 /* CLASS, STYLE, PROPS */, _hoisted_5$
|
|
3307
|
+
], 14 /* CLASS, STYLE, PROPS */, _hoisted_5$7)
|
|
3308
3308
|
], 2 /* CLASS */)
|
|
3309
3309
|
], 544 /* HYDRATE_EVENTS, NEED_PATCH */)
|
|
3310
3310
|
], 64 /* STABLE_FRAGMENT */))
|
|
@@ -3313,12 +3313,12 @@ return (_ctx, _cache) => {
|
|
|
3313
3313
|
|
|
3314
3314
|
};
|
|
3315
3315
|
|
|
3316
|
-
script$
|
|
3316
|
+
script$e.__file = "src/lib/components/ShAutoForm.vue";
|
|
3317
3317
|
|
|
3318
|
-
const _hoisted_1$
|
|
3319
|
-
const _hoisted_2$
|
|
3318
|
+
const _hoisted_1$c = /*#__PURE__*/createElementVNode("h5", { class: "d-none" }, "To prevent default class", -1 /* HOISTED */);
|
|
3319
|
+
const _hoisted_2$9 = { class: "dropdown" };
|
|
3320
3320
|
|
|
3321
|
-
var script$
|
|
3321
|
+
var script$d = {
|
|
3322
3322
|
__name: 'ShDropDownForm',
|
|
3323
3323
|
props: ['action',
|
|
3324
3324
|
'classes',
|
|
@@ -3348,8 +3348,8 @@ const dropdownId = 'rand' + (Math.random() + 1).toString(36).substring(2);
|
|
|
3348
3348
|
|
|
3349
3349
|
return (_ctx, _cache) => {
|
|
3350
3350
|
return (openBlock(), createElementBlock(Fragment, null, [
|
|
3351
|
-
_hoisted_1$
|
|
3352
|
-
createElementVNode("div", _hoisted_2$
|
|
3351
|
+
_hoisted_1$c,
|
|
3352
|
+
createElementVNode("div", _hoisted_2$9, [
|
|
3353
3353
|
createElementVNode("a", {
|
|
3354
3354
|
class: normalizeClass(unref(btnClass)),
|
|
3355
3355
|
href: "#",
|
|
@@ -3365,7 +3365,7 @@ return (_ctx, _cache) => {
|
|
|
3365
3365
|
class: "dropdown-menu px-2 py-1",
|
|
3366
3366
|
"aria-labelledby": dropdownId
|
|
3367
3367
|
}, [
|
|
3368
|
-
createVNode(script$
|
|
3368
|
+
createVNode(script$l, normalizeProps(guardReactiveProps(props)), null, 16 /* FULL_PROPS */)
|
|
3369
3369
|
])
|
|
3370
3370
|
])
|
|
3371
3371
|
], 64 /* STABLE_FRAGMENT */))
|
|
@@ -3374,26 +3374,26 @@ return (_ctx, _cache) => {
|
|
|
3374
3374
|
|
|
3375
3375
|
};
|
|
3376
3376
|
|
|
3377
|
-
script$
|
|
3377
|
+
script$d.__file = "src/lib/components/ShDropDownForm.vue";
|
|
3378
3378
|
|
|
3379
|
-
var script$
|
|
3379
|
+
var script$c = {
|
|
3380
3380
|
name: 'ShModal',
|
|
3381
3381
|
props: ['modalTitle', 'modalId', 'modalSize'],
|
|
3382
3382
|
components: {
|
|
3383
3383
|
}
|
|
3384
3384
|
};
|
|
3385
3385
|
|
|
3386
|
-
const _hoisted_1$
|
|
3387
|
-
const _hoisted_2$
|
|
3388
|
-
const _hoisted_3$
|
|
3389
|
-
const _hoisted_4$
|
|
3390
|
-
const _hoisted_5$
|
|
3386
|
+
const _hoisted_1$b = ["id"];
|
|
3387
|
+
const _hoisted_2$8 = { class: "modal-content" };
|
|
3388
|
+
const _hoisted_3$8 = { class: "modal-header" };
|
|
3389
|
+
const _hoisted_4$8 = { class: "modal-title" };
|
|
3390
|
+
const _hoisted_5$6 = /*#__PURE__*/createElementVNode("button", {
|
|
3391
3391
|
class: "btn btn-danger btn-sm",
|
|
3392
3392
|
"data-bs-dismiss": "modal",
|
|
3393
3393
|
"data-dismiss": "modal"
|
|
3394
3394
|
}, "×", -1 /* HOISTED */);
|
|
3395
|
-
const _hoisted_6$
|
|
3396
|
-
const _hoisted_7$
|
|
3395
|
+
const _hoisted_6$5 = { class: "modal-body" };
|
|
3396
|
+
const _hoisted_7$3 = { class: "section" };
|
|
3397
3397
|
|
|
3398
3398
|
function render$4(_ctx, _cache, $props, $setup, $data, $options) {
|
|
3399
3399
|
return (openBlock(), createElementBlock("div", {
|
|
@@ -3404,27 +3404,27 @@ function render$4(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3404
3404
|
createElementVNode("div", {
|
|
3405
3405
|
class: normalizeClass(["modal-dialog", `modal-${$props.modalSize}`])
|
|
3406
3406
|
}, [
|
|
3407
|
-
createElementVNode("div", _hoisted_2$
|
|
3408
|
-
createElementVNode("div", _hoisted_3$
|
|
3409
|
-
createElementVNode("h3", _hoisted_4$
|
|
3410
|
-
_hoisted_5$
|
|
3407
|
+
createElementVNode("div", _hoisted_2$8, [
|
|
3408
|
+
createElementVNode("div", _hoisted_3$8, [
|
|
3409
|
+
createElementVNode("h3", _hoisted_4$8, toDisplayString($props.modalTitle), 1 /* TEXT */),
|
|
3410
|
+
_hoisted_5$6
|
|
3411
3411
|
]),
|
|
3412
|
-
createElementVNode("div", _hoisted_6$
|
|
3413
|
-
createElementVNode("div", _hoisted_7$
|
|
3412
|
+
createElementVNode("div", _hoisted_6$5, [
|
|
3413
|
+
createElementVNode("div", _hoisted_7$3, [
|
|
3414
3414
|
renderSlot(_ctx.$slots, "default")
|
|
3415
3415
|
])
|
|
3416
3416
|
])
|
|
3417
3417
|
])
|
|
3418
3418
|
], 2 /* CLASS */)
|
|
3419
|
-
], 8 /* PROPS */, _hoisted_1$
|
|
3419
|
+
], 8 /* PROPS */, _hoisted_1$b))
|
|
3420
3420
|
}
|
|
3421
3421
|
|
|
3422
|
-
script$
|
|
3423
|
-
script$
|
|
3422
|
+
script$c.render = render$4;
|
|
3423
|
+
script$c.__file = "src/lib/components/ShModal.vue";
|
|
3424
3424
|
|
|
3425
|
-
const _hoisted_1$
|
|
3425
|
+
const _hoisted_1$a = ["href"];
|
|
3426
3426
|
|
|
3427
|
-
var script$
|
|
3427
|
+
var script$b = {
|
|
3428
3428
|
__name: 'ShModalForm',
|
|
3429
3429
|
props: ['action',
|
|
3430
3430
|
'classes',
|
|
@@ -3463,13 +3463,13 @@ return (_ctx, _cache) => {
|
|
|
3463
3463
|
"data-bs-toggle": "modal"
|
|
3464
3464
|
}, [
|
|
3465
3465
|
renderSlot(_ctx.$slots, "default")
|
|
3466
|
-
], 10 /* CLASS, PROPS */, _hoisted_1$
|
|
3467
|
-
createVNode(script$
|
|
3466
|
+
], 10 /* CLASS, PROPS */, _hoisted_1$a),
|
|
3467
|
+
createVNode(script$c, {
|
|
3468
3468
|
"modal-id": modalId,
|
|
3469
3469
|
"modal-title": __props.modalTitle
|
|
3470
3470
|
}, {
|
|
3471
3471
|
default: withCtx(() => [
|
|
3472
|
-
createVNode(script$
|
|
3472
|
+
createVNode(script$l, mergeProps({ onSuccess: success }, props), null, 16 /* FULL_PROPS */)
|
|
3473
3473
|
]),
|
|
3474
3474
|
_: 1 /* STABLE */
|
|
3475
3475
|
}, 8 /* PROPS */, ["modal-title"])
|
|
@@ -3479,9 +3479,9 @@ return (_ctx, _cache) => {
|
|
|
3479
3479
|
|
|
3480
3480
|
};
|
|
3481
3481
|
|
|
3482
|
-
script$
|
|
3482
|
+
script$b.__file = "src/lib/components/ShModalForm.vue";
|
|
3483
3483
|
|
|
3484
|
-
var script$
|
|
3484
|
+
var script$a = {
|
|
3485
3485
|
name: 'ShCanvas',
|
|
3486
3486
|
props: ['canvasTitle', 'canvasId', 'position','canvasSize'],
|
|
3487
3487
|
components: {
|
|
@@ -3498,13 +3498,13 @@ var script$9 = {
|
|
|
3498
3498
|
}
|
|
3499
3499
|
};
|
|
3500
3500
|
|
|
3501
|
-
const _hoisted_1$
|
|
3502
|
-
const _hoisted_2$
|
|
3503
|
-
const _hoisted_3$
|
|
3501
|
+
const _hoisted_1$9 = ["id"];
|
|
3502
|
+
const _hoisted_2$7 = { class: "offcanvas-header" };
|
|
3503
|
+
const _hoisted_3$7 = {
|
|
3504
3504
|
class: "offcanvas-title",
|
|
3505
3505
|
id: "offcanvasScrollingLabel"
|
|
3506
3506
|
};
|
|
3507
|
-
const _hoisted_4$
|
|
3507
|
+
const _hoisted_4$7 = { class: "offcanvas-body" };
|
|
3508
3508
|
|
|
3509
3509
|
function render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
3510
3510
|
return (openBlock(), createElementBlock("div", {
|
|
@@ -3514,8 +3514,8 @@ function render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3514
3514
|
id: $props.canvasId,
|
|
3515
3515
|
"aria-labelledby": "offcanvasScrollingLabel"
|
|
3516
3516
|
}, [
|
|
3517
|
-
createElementVNode("div", _hoisted_2$
|
|
3518
|
-
createElementVNode("h5", _hoisted_3$
|
|
3517
|
+
createElementVNode("div", _hoisted_2$7, [
|
|
3518
|
+
createElementVNode("h5", _hoisted_3$7, toDisplayString($props.canvasTitle), 1 /* TEXT */),
|
|
3519
3519
|
createElementVNode("button", {
|
|
3520
3520
|
type: "button",
|
|
3521
3521
|
ref: "closecanvas",
|
|
@@ -3525,16 +3525,16 @@ function render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3525
3525
|
"aria-label": "Close"
|
|
3526
3526
|
}, null, 512 /* NEED_PATCH */)
|
|
3527
3527
|
]),
|
|
3528
|
-
createElementVNode("div", _hoisted_4$
|
|
3528
|
+
createElementVNode("div", _hoisted_4$7, [
|
|
3529
3529
|
renderSlot(_ctx.$slots, "default")
|
|
3530
3530
|
])
|
|
3531
|
-
], 10 /* CLASS, PROPS */, _hoisted_1$
|
|
3531
|
+
], 10 /* CLASS, PROPS */, _hoisted_1$9))
|
|
3532
3532
|
}
|
|
3533
3533
|
|
|
3534
|
-
script$
|
|
3535
|
-
script$
|
|
3534
|
+
script$a.render = render$3;
|
|
3535
|
+
script$a.__file = "src/lib/components/ShCanvas.vue";
|
|
3536
3536
|
|
|
3537
|
-
var script$
|
|
3537
|
+
var script$9 = {
|
|
3538
3538
|
name: 'Pagination',
|
|
3539
3539
|
props: ['pagination_data', 'loadMore', 'hideCount', 'hideLoadMore'],
|
|
3540
3540
|
data () {
|
|
@@ -3605,14 +3605,14 @@ var script$8 = {
|
|
|
3605
3605
|
}
|
|
3606
3606
|
};
|
|
3607
3607
|
|
|
3608
|
-
const _hoisted_1$
|
|
3609
|
-
const _hoisted_2$
|
|
3610
|
-
const _hoisted_3$
|
|
3611
|
-
const _hoisted_4$
|
|
3612
|
-
const _hoisted_9$
|
|
3613
|
-
_hoisted_4$
|
|
3608
|
+
const _hoisted_1$8 = { key: 0 };
|
|
3609
|
+
const _hoisted_2$6 = { class: "record_count_body mb-3" };
|
|
3610
|
+
const _hoisted_3$6 = /*#__PURE__*/createElementVNode("span", { class: "per_page_show" }, "Showing", -1 /* HOISTED */);
|
|
3611
|
+
const _hoisted_4$6 = /*#__PURE__*/createStaticVNode("<option value=\"10\">10</option><option value=\"25\">25</option><option value=\"50\">50</option><option value=\"100\">100</option><option value=\"200\">200</option>", 5);
|
|
3612
|
+
const _hoisted_9$3 = [
|
|
3613
|
+
_hoisted_4$6
|
|
3614
3614
|
];
|
|
3615
|
-
const _hoisted_10$
|
|
3615
|
+
const _hoisted_10$2 = { class: "record_counts" };
|
|
3616
3616
|
const _hoisted_11$1 = {
|
|
3617
3617
|
key: 0,
|
|
3618
3618
|
"aria-label": "Page navigation"
|
|
@@ -3651,18 +3651,18 @@ const _hoisted_22$1 = {
|
|
|
3651
3651
|
|
|
3652
3652
|
function render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
3653
3653
|
return (!$props.loadMore)
|
|
3654
|
-
? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
3655
|
-
createElementVNode("div", _hoisted_2$
|
|
3656
|
-
_hoisted_3$
|
|
3654
|
+
? (openBlock(), createElementBlock("div", _hoisted_1$8, [
|
|
3655
|
+
createElementVNode("div", _hoisted_2$6, [
|
|
3656
|
+
_hoisted_3$6,
|
|
3657
3657
|
createTextVNode(" "),
|
|
3658
3658
|
withDirectives(createElementVNode("select", {
|
|
3659
3659
|
class: "select_per_page",
|
|
3660
3660
|
onChange: _cache[0] || (_cache[0] = (...args) => ($options.changePerPage && $options.changePerPage(...args))),
|
|
3661
3661
|
"onUpdate:modelValue": _cache[1] || (_cache[1] = $event => (($data.per_page) = $event))
|
|
3662
|
-
}, _hoisted_9$
|
|
3662
|
+
}, _hoisted_9$3, 544 /* HYDRATE_EVENTS, NEED_PATCH */), [
|
|
3663
3663
|
[vModelSelect, $data.per_page]
|
|
3664
3664
|
]),
|
|
3665
|
-
createElementVNode("span", _hoisted_10$
|
|
3665
|
+
createElementVNode("span", _hoisted_10$2, " of " + toDisplayString($props.pagination_data.record_count) + " items", 1 /* TEXT */)
|
|
3666
3666
|
]),
|
|
3667
3667
|
($props.pagination_data != null)
|
|
3668
3668
|
? (openBlock(), createElementBlock("nav", _hoisted_11$1, [
|
|
@@ -3723,17 +3723,17 @@ function render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3723
3723
|
]))
|
|
3724
3724
|
}
|
|
3725
3725
|
|
|
3726
|
-
script$
|
|
3727
|
-
script$
|
|
3726
|
+
script$9.render = render$2;
|
|
3727
|
+
script$9.__file = "src/lib/components/list_templates/Pagination.vue";
|
|
3728
3728
|
|
|
3729
|
-
const _hoisted_1$
|
|
3729
|
+
const _hoisted_1$7 = /*#__PURE__*/createElementVNode("span", {
|
|
3730
3730
|
class: "spinner-border spinner-border-sm me-1",
|
|
3731
3731
|
role: "status",
|
|
3732
3732
|
"aria-hidden": "true"
|
|
3733
3733
|
}, null, -1 /* HOISTED */);
|
|
3734
3734
|
|
|
3735
3735
|
|
|
3736
|
-
var script$
|
|
3736
|
+
var script$8 = {
|
|
3737
3737
|
__name: 'ShConfirmAction',
|
|
3738
3738
|
props: {
|
|
3739
3739
|
data: Object,
|
|
@@ -3806,7 +3806,7 @@ return (_ctx, _cache) => {
|
|
|
3806
3806
|
}, [
|
|
3807
3807
|
(processing.value)
|
|
3808
3808
|
? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
3809
|
-
_hoisted_1$
|
|
3809
|
+
_hoisted_1$7,
|
|
3810
3810
|
createElementVNode("span", null, toDisplayString(__props.loadingMessage), 1 /* TEXT */)
|
|
3811
3811
|
], 64 /* STABLE_FRAGMENT */))
|
|
3812
3812
|
: createCommentVNode("v-if", true),
|
|
@@ -3819,15 +3819,15 @@ return (_ctx, _cache) => {
|
|
|
3819
3819
|
|
|
3820
3820
|
};
|
|
3821
3821
|
|
|
3822
|
-
script$
|
|
3822
|
+
script$8.__file = "src/lib/components/ShConfirmAction.vue";
|
|
3823
3823
|
|
|
3824
|
-
const _hoisted_1$
|
|
3824
|
+
const _hoisted_1$6 = /*#__PURE__*/createElementVNode("span", {
|
|
3825
3825
|
class: "spinner-border spinner-border-sm me-1",
|
|
3826
3826
|
role: "status",
|
|
3827
3827
|
"aria-hidden": "true"
|
|
3828
3828
|
}, null, -1 /* HOISTED */);
|
|
3829
3829
|
|
|
3830
|
-
var script$
|
|
3830
|
+
var script$7 = {
|
|
3831
3831
|
__name: 'ShSilentAction',
|
|
3832
3832
|
props: {
|
|
3833
3833
|
data: Object,
|
|
@@ -3902,7 +3902,7 @@ return (_ctx, _cache) => {
|
|
|
3902
3902
|
}, [
|
|
3903
3903
|
(processing.value)
|
|
3904
3904
|
? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
3905
|
-
_hoisted_1$
|
|
3905
|
+
_hoisted_1$6,
|
|
3906
3906
|
createElementVNode("span", null, toDisplayString(__props.loadingMessage), 1 /* TEXT */)
|
|
3907
3907
|
], 64 /* STABLE_FRAGMENT */))
|
|
3908
3908
|
: createCommentVNode("v-if", true),
|
|
@@ -3915,9 +3915,9 @@ return (_ctx, _cache) => {
|
|
|
3915
3915
|
|
|
3916
3916
|
};
|
|
3917
3917
|
|
|
3918
|
-
script$
|
|
3918
|
+
script$7.__file = "src/lib/components/ShSilentAction.vue";
|
|
3919
3919
|
|
|
3920
|
-
var script$
|
|
3920
|
+
var script$6 = {
|
|
3921
3921
|
name: 'sh-table',
|
|
3922
3922
|
props: ['endPoint', 'headers', 'pageCount', 'actions', 'hideCount', 'hideLoadMore', 'links', 'reload', 'hideSearch', 'sharedData', 'searchPlaceholder', 'event', 'displayMore', 'displayMoreBtnClass', 'moreDetailsColumns', 'moreDetailsFields', 'hasDownload', 'downloadFields', 'tableHover', 'hideIds'],
|
|
3923
3923
|
inject: ['channel'],
|
|
@@ -4149,10 +4149,10 @@ var script$5 = {
|
|
|
4149
4149
|
this.reloadData();
|
|
4150
4150
|
},
|
|
4151
4151
|
components: {
|
|
4152
|
-
ShSilentAction: script$
|
|
4153
|
-
ShConfirmAction: script$
|
|
4154
|
-
ShCanvas: script$
|
|
4155
|
-
pagination: script$
|
|
4152
|
+
ShSilentAction: script$7,
|
|
4153
|
+
ShConfirmAction: script$8,
|
|
4154
|
+
ShCanvas: script$a,
|
|
4155
|
+
pagination: script$9
|
|
4156
4156
|
},
|
|
4157
4157
|
computed: {
|
|
4158
4158
|
windowWidth: function () {
|
|
@@ -4170,26 +4170,26 @@ var script$5 = {
|
|
|
4170
4170
|
}
|
|
4171
4171
|
};
|
|
4172
4172
|
|
|
4173
|
-
const _hoisted_1$
|
|
4174
|
-
const _hoisted_2$
|
|
4173
|
+
const _hoisted_1$5 = { class: "auto-table mt-2" };
|
|
4174
|
+
const _hoisted_2$5 = {
|
|
4175
4175
|
key: 0,
|
|
4176
4176
|
class: "col-md-4 mb-2"
|
|
4177
4177
|
};
|
|
4178
|
-
const _hoisted_3$
|
|
4179
|
-
const _hoisted_4$
|
|
4180
|
-
const _hoisted_5$
|
|
4178
|
+
const _hoisted_3$5 = ["disabled"];
|
|
4179
|
+
const _hoisted_4$5 = /*#__PURE__*/createElementVNode("i", { class: "bi-download" }, null, -1 /* HOISTED */);
|
|
4180
|
+
const _hoisted_5$5 = /*#__PURE__*/createElementVNode("span", {
|
|
4181
4181
|
class: "spinner-border spinner-border-sm",
|
|
4182
4182
|
role: "status",
|
|
4183
4183
|
"aria-hidden": "true"
|
|
4184
4184
|
}, null, -1 /* HOISTED */);
|
|
4185
|
-
const _hoisted_6$
|
|
4186
|
-
const _hoisted_7$
|
|
4185
|
+
const _hoisted_6$4 = /*#__PURE__*/createElementVNode("span", { class: "visually-hidden" }, "Loading...", -1 /* HOISTED */);
|
|
4186
|
+
const _hoisted_7$2 = {
|
|
4187
4187
|
key: 1,
|
|
4188
4188
|
class: "row"
|
|
4189
4189
|
};
|
|
4190
|
-
const _hoisted_8$
|
|
4191
|
-
const _hoisted_9$
|
|
4192
|
-
const _hoisted_10 = ["placeholder"];
|
|
4190
|
+
const _hoisted_8$2 = { class: "col-12 mb-3" };
|
|
4191
|
+
const _hoisted_9$2 = { class: "sh-search-bar" };
|
|
4192
|
+
const _hoisted_10$1 = ["placeholder"];
|
|
4193
4193
|
const _hoisted_11 = {
|
|
4194
4194
|
key: 0,
|
|
4195
4195
|
class: "text-center"
|
|
@@ -4317,13 +4317,14 @@ const _hoisted_57 = {
|
|
|
4317
4317
|
key: 2,
|
|
4318
4318
|
class: "text-primary fw-bold"
|
|
4319
4319
|
};
|
|
4320
|
-
const _hoisted_58 =
|
|
4320
|
+
const _hoisted_58 = { key: 3 };
|
|
4321
4321
|
const _hoisted_59 = ["innerHTML"];
|
|
4322
4322
|
const _hoisted_60 = ["innerHTML"];
|
|
4323
|
-
const _hoisted_61 =
|
|
4324
|
-
const _hoisted_62 = {
|
|
4325
|
-
const _hoisted_63 =
|
|
4326
|
-
const _hoisted_64 = ["
|
|
4323
|
+
const _hoisted_61 = ["innerHTML"];
|
|
4324
|
+
const _hoisted_62 = /*#__PURE__*/createElementVNode("hr", { class: "my-2" }, null, -1 /* HOISTED */);
|
|
4325
|
+
const _hoisted_63 = { key: 0 };
|
|
4326
|
+
const _hoisted_64 = ["href"];
|
|
4327
|
+
const _hoisted_65 = ["title", "onClick"];
|
|
4327
4328
|
|
|
4328
4329
|
function render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
4329
4330
|
const _component_router_link = resolveComponent("router-link");
|
|
@@ -4332,9 +4333,9 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
4332
4333
|
const _component_pagination = resolveComponent("pagination");
|
|
4333
4334
|
const _component_sh_canvas = resolveComponent("sh-canvas");
|
|
4334
4335
|
|
|
4335
|
-
return (openBlock(), createElementBlock("div", _hoisted_1$
|
|
4336
|
+
return (openBlock(), createElementBlock("div", _hoisted_1$5, [
|
|
4336
4337
|
($props.hasDownload)
|
|
4337
|
-
? (openBlock(), createElementBlock("div", _hoisted_2$
|
|
4338
|
+
? (openBlock(), createElementBlock("div", _hoisted_2$5, [
|
|
4338
4339
|
createElementVNode("button", {
|
|
4339
4340
|
disabled: $data.downloading,
|
|
4340
4341
|
class: "btn btn-warning btn-sm",
|
|
@@ -4342,27 +4343,27 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
4342
4343
|
}, [
|
|
4343
4344
|
(!$data.downloading)
|
|
4344
4345
|
? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
4345
|
-
_hoisted_4$
|
|
4346
|
+
_hoisted_4$5,
|
|
4346
4347
|
createTextVNode(" Export ")
|
|
4347
4348
|
], 64 /* STABLE_FRAGMENT */))
|
|
4348
4349
|
: (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
4349
|
-
_hoisted_5$
|
|
4350
|
-
_hoisted_6$
|
|
4350
|
+
_hoisted_5$5,
|
|
4351
|
+
_hoisted_6$4
|
|
4351
4352
|
], 64 /* STABLE_FRAGMENT */))
|
|
4352
|
-
], 8 /* PROPS */, _hoisted_3$
|
|
4353
|
+
], 8 /* PROPS */, _hoisted_3$5)
|
|
4353
4354
|
]))
|
|
4354
4355
|
: createCommentVNode("v-if", true),
|
|
4355
4356
|
(!$props.hideSearch)
|
|
4356
|
-
? (openBlock(), createElementBlock("div", _hoisted_7$
|
|
4357
|
-
createElementVNode("div", _hoisted_8$
|
|
4358
|
-
createElementVNode("div", _hoisted_9$
|
|
4357
|
+
? (openBlock(), createElementBlock("div", _hoisted_7$2, [
|
|
4358
|
+
createElementVNode("div", _hoisted_8$2, [
|
|
4359
|
+
createElementVNode("div", _hoisted_9$2, [
|
|
4359
4360
|
withDirectives(createElementVNode("input", {
|
|
4360
4361
|
type: "search",
|
|
4361
4362
|
onChange: _cache[1] || (_cache[1] = $event => ($options.reloadData(1))),
|
|
4362
4363
|
"onUpdate:modelValue": _cache[2] || (_cache[2] = $event => (($data.filter_value) = $event)),
|
|
4363
4364
|
placeholder: $props.searchPlaceholder ? $props.searchPlaceholder : 'Search',
|
|
4364
4365
|
class: "form-control sh-search-input"
|
|
4365
|
-
}, null, 40 /* PROPS, HYDRATE_EVENTS */, _hoisted_10), [
|
|
4366
|
+
}, null, 40 /* PROPS, HYDRATE_EVENTS */, _hoisted_10$1), [
|
|
4366
4367
|
[vModelText, $data.filter_value]
|
|
4367
4368
|
])
|
|
4368
4369
|
])
|
|
@@ -4650,26 +4651,28 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
4650
4651
|
? (openBlock(), createElementBlock("span", _hoisted_56, toDisplayString(Intl.NumberFormat().format(record[key])), 1 /* TEXT */))
|
|
4651
4652
|
: ($options.getFieldType(key) === 'money')
|
|
4652
4653
|
? (openBlock(), createElementBlock("span", _hoisted_57, "KES " + toDisplayString(Intl.NumberFormat().format(record[key])), 1 /* TEXT */))
|
|
4653
|
-
: (
|
|
4654
|
-
? (openBlock(), createElementBlock("span",
|
|
4655
|
-
|
|
4656
|
-
innerHTML: record[key]
|
|
4657
|
-
}, null, 8 /* PROPS */, _hoisted_58))
|
|
4658
|
-
: (typeof key === 'function')
|
|
4654
|
+
: ($options.getFieldType(key) === 'date')
|
|
4655
|
+
? (openBlock(), createElementBlock("span", _hoisted_58, toDisplayString($options.formatDate(record[key])), 1 /* TEXT */))
|
|
4656
|
+
: (typeof key === 'string')
|
|
4659
4657
|
? (openBlock(), createElementBlock("span", {
|
|
4660
4658
|
key: 4,
|
|
4661
|
-
innerHTML: key
|
|
4659
|
+
innerHTML: record[key]
|
|
4662
4660
|
}, null, 8 /* PROPS */, _hoisted_59))
|
|
4663
|
-
: (
|
|
4664
|
-
|
|
4665
|
-
|
|
4666
|
-
|
|
4661
|
+
: (typeof key === 'function')
|
|
4662
|
+
? (openBlock(), createElementBlock("span", {
|
|
4663
|
+
key: 5,
|
|
4664
|
+
innerHTML: key(record, index )
|
|
4665
|
+
}, null, 8 /* PROPS */, _hoisted_60))
|
|
4666
|
+
: (openBlock(), createElementBlock("span", {
|
|
4667
|
+
key: 6,
|
|
4668
|
+
innerHTML: record[key[0]]
|
|
4669
|
+
}, null, 8 /* PROPS */, _hoisted_61))
|
|
4667
4670
|
]),
|
|
4668
|
-
|
|
4671
|
+
_hoisted_62
|
|
4669
4672
|
], 64 /* STABLE_FRAGMENT */))
|
|
4670
4673
|
}), 128 /* KEYED_FRAGMENT */)),
|
|
4671
4674
|
($props.actions)
|
|
4672
|
-
? (openBlock(), createElementBlock("div",
|
|
4675
|
+
? (openBlock(), createElementBlock("div", _hoisted_63, [
|
|
4673
4676
|
(openBlock(true), createElementBlock(Fragment, null, renderList($props.actions.actions, (act) => {
|
|
4674
4677
|
return (openBlock(), createElementBlock(Fragment, {
|
|
4675
4678
|
key: act.path
|
|
@@ -4692,7 +4695,7 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
4692
4695
|
}, null, 2 /* CLASS */))
|
|
4693
4696
|
: createCommentVNode("v-if", true),
|
|
4694
4697
|
createTextVNode(" " + toDisplayString(act.label), 1 /* TEXT */)
|
|
4695
|
-
], 10 /* CLASS, PROPS */,
|
|
4698
|
+
], 10 /* CLASS, PROPS */, _hoisted_64))
|
|
4696
4699
|
: (act.emits)
|
|
4697
4700
|
? (openBlock(), createElementBlock("button", {
|
|
4698
4701
|
key: 1,
|
|
@@ -4707,7 +4710,7 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
4707
4710
|
}, null, 2 /* CLASS */))
|
|
4708
4711
|
: createCommentVNode("v-if", true),
|
|
4709
4712
|
createTextVNode(" " + toDisplayString(act.label), 1 /* TEXT */)
|
|
4710
|
-
], 10 /* CLASS, PROPS */,
|
|
4713
|
+
], 10 /* CLASS, PROPS */, _hoisted_65))
|
|
4711
4714
|
: (!act.emits)
|
|
4712
4715
|
? (openBlock(), createBlock(_component_router_link, {
|
|
4713
4716
|
key: 2,
|
|
@@ -4782,10 +4785,10 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
4782
4785
|
]))
|
|
4783
4786
|
}
|
|
4784
4787
|
|
|
4785
|
-
script$
|
|
4786
|
-
script$
|
|
4788
|
+
script$6.render = render$1;
|
|
4789
|
+
script$6.__file = "src/lib/components/ShTable.vue";
|
|
4787
4790
|
|
|
4788
|
-
var script$
|
|
4791
|
+
var script$5 = {
|
|
4789
4792
|
name: 'ShTabs',
|
|
4790
4793
|
props: ['tabs', 'baseUrl', 'sharedData', 'tabCounts', 'responsive','classOne','classTwo','classes'],
|
|
4791
4794
|
data () {
|
|
@@ -4906,23 +4909,23 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
4906
4909
|
], 64 /* STABLE_FRAGMENT */))
|
|
4907
4910
|
}
|
|
4908
4911
|
|
|
4909
|
-
script$
|
|
4910
|
-
script$
|
|
4912
|
+
script$5.render = render;
|
|
4913
|
+
script$5.__file = "src/lib/components/ShTabs.vue";
|
|
4911
4914
|
|
|
4912
|
-
const _hoisted_1$
|
|
4915
|
+
const _hoisted_1$4 = {
|
|
4913
4916
|
class: "nav nav-tabs",
|
|
4914
4917
|
role: "tablist"
|
|
4915
4918
|
};
|
|
4916
|
-
const _hoisted_2$
|
|
4919
|
+
const _hoisted_2$4 = {
|
|
4917
4920
|
class: "nav-item",
|
|
4918
4921
|
role: "presentation"
|
|
4919
4922
|
};
|
|
4920
|
-
const _hoisted_3$
|
|
4921
|
-
const _hoisted_4$
|
|
4922
|
-
const _hoisted_5$
|
|
4923
|
-
const _hoisted_6$
|
|
4923
|
+
const _hoisted_3$4 = ["onClick"];
|
|
4924
|
+
const _hoisted_4$4 = /*#__PURE__*/createElementVNode("i", { class: "d-none" }, null, -1 /* HOISTED */);
|
|
4925
|
+
const _hoisted_5$4 = { class: "sh_tab_count" };
|
|
4926
|
+
const _hoisted_6$3 = { class: "tab-content" };
|
|
4924
4927
|
|
|
4925
|
-
var script$
|
|
4928
|
+
var script$4 = {
|
|
4926
4929
|
__name: 'ShDynamicTabs',
|
|
4927
4930
|
props: ['tabs','data'],
|
|
4928
4931
|
setup(__props) {
|
|
@@ -4947,9 +4950,9 @@ function setTab(tab){
|
|
|
4947
4950
|
|
|
4948
4951
|
return (_ctx, _cache) => {
|
|
4949
4952
|
return (openBlock(), createElementBlock(Fragment, null, [
|
|
4950
|
-
createElementVNode("ul", _hoisted_1$
|
|
4953
|
+
createElementVNode("ul", _hoisted_1$4, [
|
|
4951
4954
|
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(tabs), (tab) => {
|
|
4952
|
-
return (openBlock(), createElementBlock("li", _hoisted_2$
|
|
4955
|
+
return (openBlock(), createElementBlock("li", _hoisted_2$4, [
|
|
4953
4956
|
createElementVNode("button", {
|
|
4954
4957
|
onClick: $event => (setTab(tab)),
|
|
4955
4958
|
class: normalizeClass(["nav-link", unref(currentTab) === tab ? 'active':''])
|
|
@@ -4957,15 +4960,15 @@ return (_ctx, _cache) => {
|
|
|
4957
4960
|
createTextVNode(toDisplayString(tab.label) + " ", 1 /* TEXT */),
|
|
4958
4961
|
(tab.count || tab.tabCount)
|
|
4959
4962
|
? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
4960
|
-
_hoisted_4$
|
|
4961
|
-
createElementVNode("sup", _hoisted_5$
|
|
4963
|
+
_hoisted_4$4,
|
|
4964
|
+
createElementVNode("sup", _hoisted_5$4, toDisplayString(tab.count ?? tab.tabCount), 1 /* TEXT */)
|
|
4962
4965
|
], 64 /* STABLE_FRAGMENT */))
|
|
4963
4966
|
: createCommentVNode("v-if", true)
|
|
4964
|
-
], 10 /* CLASS, PROPS */, _hoisted_3$
|
|
4967
|
+
], 10 /* CLASS, PROPS */, _hoisted_3$4)
|
|
4965
4968
|
]))
|
|
4966
4969
|
}), 256 /* UNKEYED_FRAGMENT */))
|
|
4967
4970
|
]),
|
|
4968
|
-
createElementVNode("div", _hoisted_6$
|
|
4971
|
+
createElementVNode("div", _hoisted_6$3, [
|
|
4969
4972
|
(unref(currentTab))
|
|
4970
4973
|
? (openBlock(), createBlock(resolveDynamicComponent(unref(currentTab).component), normalizeProps(mergeProps({ key: 0 }, unref(currentTab))), null, 16 /* FULL_PROPS */))
|
|
4971
4974
|
: createCommentVNode("v-if", true)
|
|
@@ -4976,7 +4979,7 @@ return (_ctx, _cache) => {
|
|
|
4976
4979
|
|
|
4977
4980
|
};
|
|
4978
4981
|
|
|
4979
|
-
script$
|
|
4982
|
+
script$4.__file = "src/lib/components/ShDynamicTabs.vue";
|
|
4980
4983
|
|
|
4981
4984
|
const useUserStore = defineStore('user-store', {
|
|
4982
4985
|
state: () => ({
|
|
@@ -5074,19 +5077,19 @@ const useUserStore = defineStore('user-store', {
|
|
|
5074
5077
|
}
|
|
5075
5078
|
});
|
|
5076
5079
|
|
|
5077
|
-
const _hoisted_1$
|
|
5078
|
-
const _hoisted_2$
|
|
5079
|
-
const _hoisted_3$
|
|
5080
|
-
const _hoisted_4$
|
|
5080
|
+
const _hoisted_1$3 = /*#__PURE__*/createElementVNode("h5", null, "Departments", -1 /* HOISTED */);
|
|
5081
|
+
const _hoisted_2$3 = { class: "card sh-departments-card shadow" };
|
|
5082
|
+
const _hoisted_3$3 = { class: "card-body" };
|
|
5083
|
+
const _hoisted_4$3 = {
|
|
5081
5084
|
"data-bs-toggle": "modal",
|
|
5082
5085
|
ref: "addDeptBtn",
|
|
5083
5086
|
href: "#sh-department_modal",
|
|
5084
5087
|
class: "btn btn-info btn-sm"
|
|
5085
5088
|
};
|
|
5086
|
-
const _hoisted_5$
|
|
5089
|
+
const _hoisted_5$3 = /*#__PURE__*/createElementVNode("i", { class: "fa fa-plus" }, null, -1 /* HOISTED */);
|
|
5087
5090
|
|
|
5088
5091
|
|
|
5089
|
-
var script$
|
|
5092
|
+
var script$3 = {
|
|
5090
5093
|
__name: 'Departments',
|
|
5091
5094
|
setup(__props) {
|
|
5092
5095
|
|
|
@@ -5109,14 +5112,14 @@ function departmentAdded (response) {
|
|
|
5109
5112
|
|
|
5110
5113
|
return (_ctx, _cache) => {
|
|
5111
5114
|
return (openBlock(), createElementBlock(Fragment, null, [
|
|
5112
|
-
_hoisted_1$
|
|
5113
|
-
createElementVNode("div", _hoisted_2$
|
|
5114
|
-
createElementVNode("div", _hoisted_3$
|
|
5115
|
-
createElementVNode("a", _hoisted_4$
|
|
5116
|
-
_hoisted_5$
|
|
5115
|
+
_hoisted_1$3,
|
|
5116
|
+
createElementVNode("div", _hoisted_2$3, [
|
|
5117
|
+
createElementVNode("div", _hoisted_3$3, [
|
|
5118
|
+
createElementVNode("a", _hoisted_4$3, [
|
|
5119
|
+
_hoisted_5$3,
|
|
5117
5120
|
createTextVNode(" ADD DEPARTMENT")
|
|
5118
5121
|
], 512 /* NEED_PATCH */),
|
|
5119
|
-
createVNode(script$
|
|
5122
|
+
createVNode(script$6, {
|
|
5120
5123
|
headers: ['id','name','description', 'created_at'],
|
|
5121
5124
|
"end-point": "admin/departments/list",
|
|
5122
5125
|
actions: {
|
|
@@ -5130,12 +5133,12 @@ return (_ctx, _cache) => {
|
|
|
5130
5133
|
]
|
|
5131
5134
|
}
|
|
5132
5135
|
}),
|
|
5133
|
-
createVNode(script$
|
|
5136
|
+
createVNode(script$c, {
|
|
5134
5137
|
"modal-id": "sh-department_modal",
|
|
5135
5138
|
"modal-title": "Department Form"
|
|
5136
5139
|
}, {
|
|
5137
5140
|
default: withCtx(() => [
|
|
5138
|
-
createVNode(script$
|
|
5141
|
+
createVNode(script$l, {
|
|
5139
5142
|
"success-callback": "departmentAdded",
|
|
5140
5143
|
onDepartmentAdded: departmentAdded,
|
|
5141
5144
|
action: "admin/departments/store",
|
|
@@ -5152,14 +5155,14 @@ return (_ctx, _cache) => {
|
|
|
5152
5155
|
|
|
5153
5156
|
};
|
|
5154
5157
|
|
|
5155
|
-
script$
|
|
5158
|
+
script$3.__file = "src/lib/components/core/Departments/Departments.vue";
|
|
5156
5159
|
|
|
5157
|
-
const _hoisted_1$
|
|
5160
|
+
const _hoisted_1$2 = {
|
|
5158
5161
|
key: 0,
|
|
5159
5162
|
class: "card sh-department-view shadow"
|
|
5160
5163
|
};
|
|
5161
|
-
const _hoisted_2$
|
|
5162
|
-
const _hoisted_3$
|
|
5164
|
+
const _hoisted_2$2 = { class: "card-body" };
|
|
5165
|
+
const _hoisted_3$2 = /*#__PURE__*/createElementVNode("a", {
|
|
5163
5166
|
href: "#addModule",
|
|
5164
5167
|
class: "btn btn-info btn-sm",
|
|
5165
5168
|
"data-bs-toggle": "modal"
|
|
@@ -5167,11 +5170,11 @@ const _hoisted_3$1 = /*#__PURE__*/createElementVNode("a", {
|
|
|
5167
5170
|
/*#__PURE__*/createElementVNode("i", { class: "bi-plus" }),
|
|
5168
5171
|
/*#__PURE__*/createTextVNode(" ADD Module")
|
|
5169
5172
|
], -1 /* HOISTED */);
|
|
5170
|
-
const _hoisted_4$
|
|
5171
|
-
const _hoisted_5$
|
|
5172
|
-
const _hoisted_6$
|
|
5173
|
+
const _hoisted_4$2 = { class: "text-primary text-capitalize" };
|
|
5174
|
+
const _hoisted_5$2 = ["value"];
|
|
5175
|
+
const _hoisted_6$2 = /*#__PURE__*/createElementVNode("i", { class: "fa fa-save" }, null, -1 /* HOISTED */);
|
|
5173
5176
|
|
|
5174
|
-
var script$
|
|
5177
|
+
var script$2 = {
|
|
5175
5178
|
__name: 'Department',
|
|
5176
5179
|
setup(__props) {
|
|
5177
5180
|
|
|
@@ -5265,11 +5268,11 @@ function submitPermissions() {
|
|
|
5265
5268
|
|
|
5266
5269
|
return (_ctx, _cache) => {
|
|
5267
5270
|
return (unref(department))
|
|
5268
|
-
? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
5269
|
-
createElementVNode("div", _hoisted_2$
|
|
5270
|
-
_hoisted_3$
|
|
5271
|
+
? (openBlock(), createElementBlock("div", _hoisted_1$2, [
|
|
5272
|
+
createElementVNode("div", _hoisted_2$2, [
|
|
5273
|
+
_hoisted_3$2,
|
|
5271
5274
|
createElementVNode("h5", null, "Department #" + toDisplayString(unref(department).id) + " - " + toDisplayString(unref(department).name) + " Allowed Modules", 1 /* TEXT */),
|
|
5272
|
-
createVNode(script$
|
|
5275
|
+
createVNode(script$6, {
|
|
5273
5276
|
actions: {
|
|
5274
5277
|
label: 'Actions',
|
|
5275
5278
|
actions: [
|
|
@@ -5289,12 +5292,12 @@ return (_ctx, _cache) => {
|
|
|
5289
5292
|
headers: ['id',showModule,'created_at'],
|
|
5290
5293
|
"end-point": 'admin/departments/department/list-modules/' + id.value
|
|
5291
5294
|
}, null, 8 /* PROPS */, ["actions", "reload", "headers", "end-point"]),
|
|
5292
|
-
createVNode(script$
|
|
5295
|
+
createVNode(script$c, {
|
|
5293
5296
|
"modal-id": "addModule",
|
|
5294
5297
|
"modal-title": "Add Module Department"
|
|
5295
5298
|
}, {
|
|
5296
5299
|
default: withCtx(() => [
|
|
5297
|
-
createVNode(script$
|
|
5300
|
+
createVNode(script$l, {
|
|
5298
5301
|
"reload-select-items": unref(reload),
|
|
5299
5302
|
"success-callback": moduleAdded,
|
|
5300
5303
|
"fill-selects": {
|
|
@@ -5316,7 +5319,7 @@ return (_ctx, _cache) => {
|
|
|
5316
5319
|
ref: permissionCanvasBtn,
|
|
5317
5320
|
"data-bs-toggle": "offcanvas"
|
|
5318
5321
|
}, null, 512 /* NEED_PATCH */),
|
|
5319
|
-
createVNode(script$
|
|
5322
|
+
createVNode(script$a, {
|
|
5320
5323
|
"canvas-id": "permissionsCanvas",
|
|
5321
5324
|
position: "end enlarged",
|
|
5322
5325
|
"canvas-title": "Module Permissions"
|
|
@@ -5324,7 +5327,7 @@ return (_ctx, _cache) => {
|
|
|
5324
5327
|
default: withCtx(() => [
|
|
5325
5328
|
(unref(getModule))
|
|
5326
5329
|
? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
5327
|
-
createElementVNode("h5", _hoisted_4$
|
|
5330
|
+
createElementVNode("h5", _hoisted_4$2, "Permissions for " + toDisplayString(unref(getModule).module), 1 /* TEXT */),
|
|
5328
5331
|
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(modulePermissions), (permission) => {
|
|
5329
5332
|
return (openBlock(), createElementBlock("div", {
|
|
5330
5333
|
key: permission,
|
|
@@ -5337,7 +5340,7 @@ return (_ctx, _cache) => {
|
|
|
5337
5340
|
type: "checkbox",
|
|
5338
5341
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = $event => (isRef(selectedPermissions) ? (selectedPermissions).value = $event : selectedPermissions = $event)),
|
|
5339
5342
|
value: permission
|
|
5340
|
-
}, null, 8 /* PROPS */, _hoisted_5$
|
|
5343
|
+
}, null, 8 /* PROPS */, _hoisted_5$2), [
|
|
5341
5344
|
[vModelCheckbox, unref(selectedPermissions)]
|
|
5342
5345
|
]),
|
|
5343
5346
|
createTextVNode(" " + toDisplayString(getPermissionLabel(permission)), 1 /* TEXT */)
|
|
@@ -5348,7 +5351,7 @@ return (_ctx, _cache) => {
|
|
|
5348
5351
|
onClick: submitPermissions,
|
|
5349
5352
|
class: "btn btn-info"
|
|
5350
5353
|
}, [
|
|
5351
|
-
_hoisted_6$
|
|
5354
|
+
_hoisted_6$2,
|
|
5352
5355
|
createTextVNode(" Submit")
|
|
5353
5356
|
])
|
|
5354
5357
|
], 64 /* STABLE_FRAGMENT */))
|
|
@@ -5364,7 +5367,123 @@ return (_ctx, _cache) => {
|
|
|
5364
5367
|
|
|
5365
5368
|
};
|
|
5366
5369
|
|
|
5367
|
-
script$
|
|
5370
|
+
script$2.__file = "src/lib/components/core/Departments/department/Department.vue";
|
|
5371
|
+
|
|
5372
|
+
const _hoisted_1$1 = { class: "row permissions-main d-flex" };
|
|
5373
|
+
const _hoisted_2$1 = {
|
|
5374
|
+
id: "permissions-nav",
|
|
5375
|
+
class: "col-md-2 shadow d-flex align-items-center"
|
|
5376
|
+
};
|
|
5377
|
+
const _hoisted_3$1 = /*#__PURE__*/createElementVNode("input", { type: "checkbox" }, null, -1 /* HOISTED */);
|
|
5378
|
+
const _hoisted_4$1 = ["onClick"];
|
|
5379
|
+
const _hoisted_5$1 = {
|
|
5380
|
+
id: "permissions-content",
|
|
5381
|
+
class: "col-md-10"
|
|
5382
|
+
};
|
|
5383
|
+
const _hoisted_6$1 = {
|
|
5384
|
+
key: 0,
|
|
5385
|
+
class: "alert alert-info"
|
|
5386
|
+
};
|
|
5387
|
+
const _hoisted_7$1 = {
|
|
5388
|
+
key: 1,
|
|
5389
|
+
class: "d-flex justify-content-evenly"
|
|
5390
|
+
};
|
|
5391
|
+
const _hoisted_8$1 = { class: "col-md-3 list-group" };
|
|
5392
|
+
const _hoisted_9$1 = { class: "p-2 text-capitalize list-group-item pb-0 text-capitalize" };
|
|
5393
|
+
const _hoisted_10 = /*#__PURE__*/createElementVNode("input", { type: "checkbox" }, null, -1 /* HOISTED */);
|
|
5394
|
+
|
|
5395
|
+
var script$1 = {
|
|
5396
|
+
__name: 'ManagePermissions',
|
|
5397
|
+
setup(__props) {
|
|
5398
|
+
|
|
5399
|
+
const route = useRoute();
|
|
5400
|
+
const tabs = ref(null);
|
|
5401
|
+
ref(0);
|
|
5402
|
+
const modules = ref([]);
|
|
5403
|
+
const selectedModule = ref('tasks');
|
|
5404
|
+
const modulePermissions = ref(null);
|
|
5405
|
+
const setModule = module=>{
|
|
5406
|
+
selectedModule.value = module;
|
|
5407
|
+
getModulePermissions();
|
|
5408
|
+
};
|
|
5409
|
+
onMounted(() => {
|
|
5410
|
+
console.log(tabs.value.querySelectorAll('li'));
|
|
5411
|
+
getDepartmentModules();
|
|
5412
|
+
});
|
|
5413
|
+
const getDepartmentModules = ()=>{
|
|
5414
|
+
shApis.doGet(`admin/departments/department/list-modules/${route.params.id}?all=1`).then(res=>{
|
|
5415
|
+
modules.value = res.data.data;
|
|
5416
|
+
selectedModule.value = res.data.data[0];
|
|
5417
|
+
getModulePermissions();
|
|
5418
|
+
});
|
|
5419
|
+
};
|
|
5420
|
+
const loading = ref(false);
|
|
5421
|
+
const getModulePermissions = () => {
|
|
5422
|
+
loading.value = true;
|
|
5423
|
+
modulePermissions.value = null;
|
|
5424
|
+
shApis.doGet(`admin/departments/department/get-module-permissions/${selectedModule.value.module}`).then(res=>{
|
|
5425
|
+
loading.value = false;
|
|
5426
|
+
modulePermissions.value = reformatModulePermissions(res.data.permissions);
|
|
5427
|
+
});
|
|
5428
|
+
};
|
|
5429
|
+
function reformatModulePermissions(mPs){
|
|
5430
|
+
let mpModules = {};
|
|
5431
|
+
mPs.map(mp=>{
|
|
5432
|
+
const arr = mp.split('.');
|
|
5433
|
+
const key = arr[0];
|
|
5434
|
+
if(typeof mpModules[key] == 'undefined'){
|
|
5435
|
+
mpModules[key]=[];
|
|
5436
|
+
}
|
|
5437
|
+
mpModules[key].push(mp);
|
|
5438
|
+
});
|
|
5439
|
+
return mpModules
|
|
5440
|
+
}
|
|
5441
|
+
|
|
5442
|
+
return (_ctx, _cache) => {
|
|
5443
|
+
return (openBlock(), createElementBlock("div", _hoisted_1$1, [
|
|
5444
|
+
createElementVNode("div", _hoisted_2$1, [
|
|
5445
|
+
createElementVNode("ul", {
|
|
5446
|
+
ref_key: "tabs",
|
|
5447
|
+
ref: tabs,
|
|
5448
|
+
class: "d-flex flex-column w-100"
|
|
5449
|
+
}, [
|
|
5450
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(modules.value, (module) => {
|
|
5451
|
+
return (openBlock(), createElementBlock("li", {
|
|
5452
|
+
class: normalizeClass(selectedModule.value.id === module.id && 'active'),
|
|
5453
|
+
key: module.id
|
|
5454
|
+
}, [
|
|
5455
|
+
_hoisted_3$1,
|
|
5456
|
+
createElementVNode("label", {
|
|
5457
|
+
class: "text-capitalize",
|
|
5458
|
+
onClick: $event => (setModule(module))
|
|
5459
|
+
}, toDisplayString(module.module.replaceAll('_',' ')), 9 /* TEXT, PROPS */, _hoisted_4$1)
|
|
5460
|
+
], 2 /* CLASS */))
|
|
5461
|
+
}), 128 /* KEYED_FRAGMENT */))
|
|
5462
|
+
], 512 /* NEED_PATCH */)
|
|
5463
|
+
]),
|
|
5464
|
+
createElementVNode("div", _hoisted_5$1, [
|
|
5465
|
+
(loading.value)
|
|
5466
|
+
? (openBlock(), createElementBlock("div", _hoisted_6$1, " loading ... "))
|
|
5467
|
+
: (openBlock(), createElementBlock("div", _hoisted_7$1, [
|
|
5468
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(modulePermissions.value, (permissions) => {
|
|
5469
|
+
return (openBlock(), createElementBlock("div", _hoisted_8$1, [
|
|
5470
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(permissions, (permission) => {
|
|
5471
|
+
return (openBlock(), createElementBlock("label", _hoisted_9$1, [
|
|
5472
|
+
_hoisted_10,
|
|
5473
|
+
createTextVNode(" " + toDisplayString(permission), 1 /* TEXT */)
|
|
5474
|
+
]))
|
|
5475
|
+
}), 256 /* UNKEYED_FRAGMENT */))
|
|
5476
|
+
]))
|
|
5477
|
+
}), 256 /* UNKEYED_FRAGMENT */))
|
|
5478
|
+
]))
|
|
5479
|
+
])
|
|
5480
|
+
]))
|
|
5481
|
+
}
|
|
5482
|
+
}
|
|
5483
|
+
|
|
5484
|
+
};
|
|
5485
|
+
|
|
5486
|
+
script$1.__file = "src/lib/components/core/Departments/department/ManagePermissions.vue";
|
|
5368
5487
|
|
|
5369
5488
|
const _withScopeId = n => (pushScopeId("data-v-2911509a"),n=n(),popScopeId(),n);
|
|
5370
5489
|
const _hoisted_1 = {
|
|
@@ -5431,7 +5550,7 @@ return (_ctx, _cache) => {
|
|
|
5431
5550
|
: (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
5432
5551
|
(section.value === 'login')
|
|
5433
5552
|
? (openBlock(), createElementBlock("div", _hoisted_2, [
|
|
5434
|
-
createVNode(script$
|
|
5553
|
+
createVNode(script$l, {
|
|
5435
5554
|
class: "sh-login-form",
|
|
5436
5555
|
fields: ['email','password'],
|
|
5437
5556
|
"action-label": "Login",
|
|
@@ -5456,7 +5575,7 @@ return (_ctx, _cache) => {
|
|
|
5456
5575
|
(unref(registerSubTitle))
|
|
5457
5576
|
? (openBlock(), createElementBlock("span", _hoisted_8, toDisplayString(unref(registerSubTitle)), 1 /* TEXT */))
|
|
5458
5577
|
: createCommentVNode("v-if", true),
|
|
5459
|
-
createVNode(script$
|
|
5578
|
+
createVNode(script$l, {
|
|
5460
5579
|
class: "sh-login-form",
|
|
5461
5580
|
fields: unref(registrationFields),
|
|
5462
5581
|
"action-label": "Sign Up",
|
|
@@ -5503,7 +5622,7 @@ const ShFrontend = {
|
|
|
5503
5622
|
const registerTitle = options.registerTitle ?? 'Create a new account';
|
|
5504
5623
|
const registerSubTitle = options.registerSubTitle ?? `It's quick and easy`;
|
|
5505
5624
|
const logoutApiEndpoint = options.logoutApiEndpoint ?? `auth/logout`;
|
|
5506
|
-
options.formTextInput ?? script$
|
|
5625
|
+
options.formTextInput ?? script$i;
|
|
5507
5626
|
const loginUrl = options.loginUrl ?? `/login`;
|
|
5508
5627
|
const redirectLogin = options.redirectLogin ?? `/`;
|
|
5509
5628
|
const redirectRegister = options.redirectRegister ?? `/`;
|
|
@@ -5528,10 +5647,14 @@ const ShFrontend = {
|
|
|
5528
5647
|
});
|
|
5529
5648
|
options.router.addRoute({
|
|
5530
5649
|
path: '/sh-departments',
|
|
5531
|
-
component: script$
|
|
5650
|
+
component: script$3
|
|
5532
5651
|
});
|
|
5533
5652
|
options.router.addRoute({
|
|
5534
5653
|
path: '/sh-departments/permissions/:id',
|
|
5654
|
+
component: script$2
|
|
5655
|
+
});
|
|
5656
|
+
options.router.addRoute({
|
|
5657
|
+
path: '/sh-departments/manage-permissions/:id',
|
|
5535
5658
|
component: script$1
|
|
5536
5659
|
});
|
|
5537
5660
|
}
|
|
@@ -5544,4 +5667,4 @@ const ShFrontend = {
|
|
|
5544
5667
|
}
|
|
5545
5668
|
};
|
|
5546
5669
|
|
|
5547
|
-
export { countries as Countries, script$
|
|
5670
|
+
export { countries as Countries, script$e as ShAutoForm, script$a as ShCanvas, script$8 as ShConfirmAction, script$d as ShDropDownForm, script$4 as ShDynamicTabs, script$l as ShForm, ShFrontend, script$c as ShModal, script$b as ShModalForm, script$o as ShPhone, script$7 as ShSilentAction, script$6 as ShTable, script$5 as ShTabs, shApis, shRepo, ShStorage as shStorage, useUserStore };
|