@iankibetsh/shframework 4.8.1 → 4.8.3
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 +32 -32
- package/dist/library.js +630 -584
- package/dist/library.mjs +620 -574
- package/package.json +1 -1
package/dist/library.mjs
CHANGED
|
@@ -1994,7 +1994,7 @@ const countries = [
|
|
|
1994
1994
|
}
|
|
1995
1995
|
];
|
|
1996
1996
|
|
|
1997
|
-
var script$
|
|
1997
|
+
var script$A = {
|
|
1998
1998
|
name: 'PhoneInput',
|
|
1999
1999
|
props: ['modelValue', 'country_code','disabled'],
|
|
2000
2000
|
data () {
|
|
@@ -2064,23 +2064,23 @@ var script$y = {
|
|
|
2064
2064
|
}
|
|
2065
2065
|
};
|
|
2066
2066
|
|
|
2067
|
-
const _hoisted_1$
|
|
2067
|
+
const _hoisted_1$s = {
|
|
2068
2068
|
class: "sh-phone mb-3",
|
|
2069
2069
|
style: {"display":"flex"}
|
|
2070
2070
|
};
|
|
2071
|
-
const _hoisted_2$
|
|
2071
|
+
const _hoisted_2$i = {
|
|
2072
2072
|
key: 0,
|
|
2073
2073
|
style: {"display":"contents"}
|
|
2074
2074
|
};
|
|
2075
|
-
const _hoisted_3$
|
|
2076
|
-
const _hoisted_4$
|
|
2077
|
-
const _hoisted_5$
|
|
2075
|
+
const _hoisted_3$g = ["src"];
|
|
2076
|
+
const _hoisted_4$g = ["value"];
|
|
2077
|
+
const _hoisted_5$d = ["disabled"];
|
|
2078
2078
|
|
|
2079
2079
|
function render$4(_ctx, _cache, $props, $setup, $data, $options) {
|
|
2080
|
-
return (openBlock(), createElementBlock("div", _hoisted_1$
|
|
2080
|
+
return (openBlock(), createElementBlock("div", _hoisted_1$s, [
|
|
2081
2081
|
($data.selectedCountry)
|
|
2082
|
-
? (openBlock(), createElementBlock("div", _hoisted_2$
|
|
2083
|
-
createElementVNode("img", { src: $data.flag }, null, 8 /* PROPS */, _hoisted_3$
|
|
2082
|
+
? (openBlock(), createElementBlock("div", _hoisted_2$i, [
|
|
2083
|
+
createElementVNode("img", { src: $data.flag }, null, 8 /* PROPS */, _hoisted_3$g),
|
|
2084
2084
|
createTextVNode(" " + toDisplayString($data.selectedCountry.dialCode), 1 /* TEXT */)
|
|
2085
2085
|
]))
|
|
2086
2086
|
: createCommentVNode("v-if", true),
|
|
@@ -2093,7 +2093,7 @@ function render$4(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2093
2093
|
return (openBlock(), createElementBlock("option", {
|
|
2094
2094
|
value: country,
|
|
2095
2095
|
key: country.dialCode
|
|
2096
|
-
}, toDisplayString(country.name + '(' + country.dialCode + ')'), 9 /* TEXT, PROPS */, _hoisted_4$
|
|
2096
|
+
}, toDisplayString(country.name + '(' + country.dialCode + ')'), 9 /* TEXT, PROPS */, _hoisted_4$g))
|
|
2097
2097
|
}), 128 /* KEYED_FRAGMENT */))
|
|
2098
2098
|
], 544 /* NEED_HYDRATION, NEED_PATCH */), [
|
|
2099
2099
|
[vModelSelect, $data.selectedCountry]
|
|
@@ -2106,23 +2106,23 @@ function render$4(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2106
2106
|
onInput: _cache[2] || (_cache[2] = (...args) => ($options.updateValue && $options.updateValue(...args))),
|
|
2107
2107
|
placeholder: "712345678",
|
|
2108
2108
|
"onUpdate:modelValue": _cache[3] || (_cache[3] = $event => (($data.input) = $event))
|
|
2109
|
-
}, null, 40 /* PROPS, NEED_HYDRATION */, _hoisted_5$
|
|
2109
|
+
}, null, 40 /* PROPS, NEED_HYDRATION */, _hoisted_5$d), [
|
|
2110
2110
|
[vModelText, $data.input]
|
|
2111
2111
|
])
|
|
2112
2112
|
]))
|
|
2113
2113
|
}
|
|
2114
2114
|
|
|
2115
|
-
script$
|
|
2116
|
-
script$
|
|
2115
|
+
script$A.render = render$4;
|
|
2116
|
+
script$A.__file = "src/lib/components/form-components/PhoneInput.vue";
|
|
2117
2117
|
|
|
2118
|
-
const _hoisted_1$
|
|
2118
|
+
const _hoisted_1$r = {
|
|
2119
2119
|
key: 0,
|
|
2120
2120
|
class: "dropdown sh-suggest"
|
|
2121
2121
|
};
|
|
2122
|
-
const _hoisted_2$
|
|
2123
|
-
const _hoisted_3$
|
|
2124
|
-
const _hoisted_4$
|
|
2125
|
-
const _hoisted_5$
|
|
2122
|
+
const _hoisted_2$h = ["id"];
|
|
2123
|
+
const _hoisted_3$f = { class: "sh-suggestions-holder" };
|
|
2124
|
+
const _hoisted_4$f = { class: "badge bg-secondary m-1 sh-selected-item" };
|
|
2125
|
+
const _hoisted_5$c = ["onClick"];
|
|
2126
2126
|
const _hoisted_6$a = ["id"];
|
|
2127
2127
|
const _hoisted_7$9 = ["id", "aria-labelledby"];
|
|
2128
2128
|
const _hoisted_8$8 = ["onClick"];
|
|
@@ -2136,7 +2136,7 @@ const _hoisted_10$8 = {
|
|
|
2136
2136
|
};
|
|
2137
2137
|
|
|
2138
2138
|
|
|
2139
|
-
var script$
|
|
2139
|
+
var script$z = {
|
|
2140
2140
|
__name: 'ShSuggest',
|
|
2141
2141
|
props: ['data','allowMultiple','url','modelValue','optionTemplate'],
|
|
2142
2142
|
emits: ['update:modelValue'],
|
|
@@ -2272,23 +2272,23 @@ watch(()=>props.modelValue, (newValue)=>{
|
|
|
2272
2272
|
|
|
2273
2273
|
return (_ctx, _cache) => {
|
|
2274
2274
|
return (unref(id))
|
|
2275
|
-
? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
2275
|
+
? (openBlock(), createElementBlock("div", _hoisted_1$r, [
|
|
2276
2276
|
createElementVNode("div", {
|
|
2277
2277
|
id: unref(id),
|
|
2278
2278
|
"data-bs-toggle": "dropdown",
|
|
2279
2279
|
class: "p-0 d-flex sh-suggest-control dropdown-toggle",
|
|
2280
2280
|
"aria-expanded": "false"
|
|
2281
2281
|
}, [
|
|
2282
|
-
createElementVNode("div", _hoisted_3$
|
|
2282
|
+
createElementVNode("div", _hoisted_3$f, [
|
|
2283
2283
|
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(selectedSuggestions), (sgt) => {
|
|
2284
|
-
return (openBlock(), createElementBlock("h5", _hoisted_4$
|
|
2284
|
+
return (openBlock(), createElementBlock("h5", _hoisted_4$f, [
|
|
2285
2285
|
createTextVNode(toDisplayString(sgt.name) + " ", 1 /* TEXT */),
|
|
2286
2286
|
createElementVNode("button", {
|
|
2287
2287
|
onClick: $event => (removeSuggestion(sgt.id)),
|
|
2288
2288
|
type: "button",
|
|
2289
2289
|
class: "btn-close border-start border-1 ms-1",
|
|
2290
2290
|
"aria-label": "Close"
|
|
2291
|
-
}, null, 8 /* PROPS */, _hoisted_5$
|
|
2291
|
+
}, null, 8 /* PROPS */, _hoisted_5$c)
|
|
2292
2292
|
]))
|
|
2293
2293
|
}), 256 /* UNKEYED_FRAGMENT */))
|
|
2294
2294
|
]),
|
|
@@ -2299,7 +2299,7 @@ return (_ctx, _cache) => {
|
|
|
2299
2299
|
onChange: filterData,
|
|
2300
2300
|
class: "flex-fill h-100 sh-suggestion-input"
|
|
2301
2301
|
}, null, 40 /* PROPS, NEED_HYDRATION */, _hoisted_6$a)
|
|
2302
|
-
], 8 /* PROPS */, _hoisted_2$
|
|
2302
|
+
], 8 /* PROPS */, _hoisted_2$h),
|
|
2303
2303
|
createElementVNode("ul", {
|
|
2304
2304
|
class: "dropdown-menu w-100",
|
|
2305
2305
|
id: 'dropwdown_section' + unref(id),
|
|
@@ -2341,15 +2341,15 @@ return (_ctx, _cache) => {
|
|
|
2341
2341
|
|
|
2342
2342
|
};
|
|
2343
2343
|
|
|
2344
|
-
script$
|
|
2345
|
-
script$
|
|
2344
|
+
script$z.__scopeId = "data-v-71cc9569";
|
|
2345
|
+
script$z.__file = "src/lib/components/form-components/ShSuggest.vue";
|
|
2346
2346
|
|
|
2347
|
-
var script$
|
|
2347
|
+
var script$y = {
|
|
2348
2348
|
name: 'ShForm',
|
|
2349
2349
|
components: {
|
|
2350
|
-
PhoneInput: script$
|
|
2351
|
-
ShSuggest: script$
|
|
2352
|
-
ShPhone: script$
|
|
2350
|
+
PhoneInput: script$A,
|
|
2351
|
+
ShSuggest: script$z,
|
|
2352
|
+
ShPhone: script$A
|
|
2353
2353
|
},
|
|
2354
2354
|
props: [
|
|
2355
2355
|
'action',
|
|
@@ -2698,18 +2698,18 @@ var script$w = {
|
|
|
2698
2698
|
}
|
|
2699
2699
|
};
|
|
2700
2700
|
|
|
2701
|
-
const _hoisted_1$
|
|
2702
|
-
const _hoisted_2$
|
|
2701
|
+
const _hoisted_1$q = /*#__PURE__*/createElementVNode("h5", { class: "d-none" }, null, -1 /* HOISTED */);
|
|
2702
|
+
const _hoisted_2$g = {
|
|
2703
2703
|
ref: "ShAutoForm",
|
|
2704
2704
|
class: "sh-form"
|
|
2705
2705
|
};
|
|
2706
|
-
const _hoisted_3$
|
|
2706
|
+
const _hoisted_3$e = {
|
|
2707
2707
|
key: 0,
|
|
2708
2708
|
class: "alert alert-danger alert-dismissible fade show sh-form-submission-error",
|
|
2709
2709
|
role: "alert"
|
|
2710
2710
|
};
|
|
2711
|
-
const _hoisted_4$
|
|
2712
|
-
const _hoisted_5$
|
|
2711
|
+
const _hoisted_4$e = /*#__PURE__*/createElementVNode("i", { class: "bi-exclamation-triangle-fill me-1" }, null, -1 /* HOISTED */);
|
|
2712
|
+
const _hoisted_5$b = { key: 0 };
|
|
2713
2713
|
const _hoisted_6$9 = { key: 1 };
|
|
2714
2714
|
const _hoisted_7$8 = { class: "row" };
|
|
2715
2715
|
const _hoisted_8$7 = { class: "fg-label control-label text-capitalize control-bel col-md-12 request-form-label mb-2" };
|
|
@@ -2765,15 +2765,15 @@ function render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2765
2765
|
const _component_ShSuggest = resolveComponent("ShSuggest");
|
|
2766
2766
|
|
|
2767
2767
|
return (openBlock(), createElementBlock(Fragment, null, [
|
|
2768
|
-
_hoisted_1$
|
|
2769
|
-
createElementVNode("form", _hoisted_2$
|
|
2768
|
+
_hoisted_1$q,
|
|
2769
|
+
createElementVNode("form", _hoisted_2$g, [
|
|
2770
2770
|
createCommentVNode(" <div v-if=\"form_status == 1\" class=\"alert alert-info\">Processing...</div>"),
|
|
2771
2771
|
createCommentVNode(" <div v-if=\"form_status == 2\" class=\"alert alert-success\">Success</div>"),
|
|
2772
2772
|
(_ctx.form_status == 3)
|
|
2773
|
-
? (openBlock(), createElementBlock("div", _hoisted_3$
|
|
2774
|
-
_hoisted_4$
|
|
2773
|
+
? (openBlock(), createElementBlock("div", _hoisted_3$e, [
|
|
2774
|
+
_hoisted_4$e,
|
|
2775
2775
|
(_ctx.errorText)
|
|
2776
|
-
? (openBlock(), createElementBlock("span", _hoisted_5$
|
|
2776
|
+
? (openBlock(), createElementBlock("span", _hoisted_5$b, toDisplayString(_ctx.errorText), 1 /* TEXT */))
|
|
2777
2777
|
: (openBlock(), createElementBlock("span", _hoisted_6$9, "Unexpected Error Occurred")),
|
|
2778
2778
|
createCommentVNode(" <button @click=\"hideError\" type=\"button\" class=\"btn-close\" aria-label=\"Close\"></button>")
|
|
2779
2779
|
]))
|
|
@@ -3004,10 +3004,10 @@ function render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3004
3004
|
], 64 /* STABLE_FRAGMENT */))
|
|
3005
3005
|
}
|
|
3006
3006
|
|
|
3007
|
-
script$
|
|
3008
|
-
script$
|
|
3007
|
+
script$y.render = render$3;
|
|
3008
|
+
script$y.__file = "src/lib/components/ShForm.vue";
|
|
3009
3009
|
|
|
3010
|
-
var script$
|
|
3010
|
+
var script$x = {
|
|
3011
3011
|
__name: 'EmailInput',
|
|
3012
3012
|
props: ['modelValue','label'],
|
|
3013
3013
|
emits: ['update:modelValue','clearValidationErrors'],
|
|
@@ -3045,12 +3045,12 @@ return (_ctx, _cache) => {
|
|
|
3045
3045
|
|
|
3046
3046
|
};
|
|
3047
3047
|
|
|
3048
|
-
script$
|
|
3048
|
+
script$x.__file = "src/lib/components/form-components/EmailInput.vue";
|
|
3049
3049
|
|
|
3050
|
-
const _hoisted_1$
|
|
3050
|
+
const _hoisted_1$p = ["min", "max"];
|
|
3051
3051
|
|
|
3052
3052
|
|
|
3053
|
-
var script$
|
|
3053
|
+
var script$w = {
|
|
3054
3054
|
__name: 'NumberInput',
|
|
3055
3055
|
props: ['modelValue','label','min','max'],
|
|
3056
3056
|
emits: ['update:modelValue','clearValidationErrors'],
|
|
@@ -3082,7 +3082,7 @@ return (_ctx, _cache) => {
|
|
|
3082
3082
|
onChange: modelValueUpdated,
|
|
3083
3083
|
onKeydown: modelValueUpdated,
|
|
3084
3084
|
onUpdated: modelValueUpdated
|
|
3085
|
-
}, null, 40 /* PROPS, NEED_HYDRATION */, _hoisted_1$
|
|
3085
|
+
}, null, 40 /* PROPS, NEED_HYDRATION */, _hoisted_1$p)), [
|
|
3086
3086
|
[vModelText, inputModel.value]
|
|
3087
3087
|
])
|
|
3088
3088
|
}
|
|
@@ -3090,9 +3090,9 @@ return (_ctx, _cache) => {
|
|
|
3090
3090
|
|
|
3091
3091
|
};
|
|
3092
3092
|
|
|
3093
|
-
script$
|
|
3093
|
+
script$w.__file = "src/lib/components/form-components/NumberInput.vue";
|
|
3094
3094
|
|
|
3095
|
-
var script$
|
|
3095
|
+
var script$v = {
|
|
3096
3096
|
__name: 'TextInput',
|
|
3097
3097
|
props: ['modelValue','label','isInvalid'],
|
|
3098
3098
|
emits: ['update:modelValue','clearValidationErrors'],
|
|
@@ -3132,9 +3132,9 @@ return (_ctx, _cache) => {
|
|
|
3132
3132
|
|
|
3133
3133
|
};
|
|
3134
3134
|
|
|
3135
|
-
script$
|
|
3135
|
+
script$v.__file = "src/lib/components/form-components/TextInput.vue";
|
|
3136
3136
|
|
|
3137
|
-
var script$
|
|
3137
|
+
var script$u = {
|
|
3138
3138
|
__name: 'TextAreaInput',
|
|
3139
3139
|
props: ['modelValue','label'],
|
|
3140
3140
|
emits: ['update:modelValue','clearValidationErrors'],
|
|
@@ -3172,12 +3172,12 @@ return (_ctx, _cache) => {
|
|
|
3172
3172
|
|
|
3173
3173
|
};
|
|
3174
3174
|
|
|
3175
|
-
script$
|
|
3175
|
+
script$u.__file = "src/lib/components/form-components/TextAreaInput.vue";
|
|
3176
3176
|
|
|
3177
|
-
const _hoisted_1$
|
|
3177
|
+
const _hoisted_1$o = ["value"];
|
|
3178
3178
|
|
|
3179
3179
|
|
|
3180
|
-
var script$
|
|
3180
|
+
var script$t = {
|
|
3181
3181
|
__name: 'SelectInput',
|
|
3182
3182
|
props: ['modelValue','label','url','required','options','dataUrl','data'],
|
|
3183
3183
|
emits: ['update:modelValue','clearValidationErrors'],
|
|
@@ -3232,7 +3232,7 @@ return (_ctx, _cache) => {
|
|
|
3232
3232
|
return (openBlock(), createElementBlock("option", {
|
|
3233
3233
|
key: option.id,
|
|
3234
3234
|
value: option.id
|
|
3235
|
-
}, toDisplayString(option.name), 9 /* TEXT, PROPS */, _hoisted_1$
|
|
3235
|
+
}, toDisplayString(option.name), 9 /* TEXT, PROPS */, _hoisted_1$o))
|
|
3236
3236
|
}), 128 /* KEYED_FRAGMENT */))
|
|
3237
3237
|
], 544 /* NEED_HYDRATION, NEED_PATCH */)), [
|
|
3238
3238
|
[vModelSelect, inputModel.value]
|
|
@@ -3242,9 +3242,9 @@ return (_ctx, _cache) => {
|
|
|
3242
3242
|
|
|
3243
3243
|
};
|
|
3244
3244
|
|
|
3245
|
-
script$
|
|
3245
|
+
script$t.__file = "src/lib/components/form-components/SelectInput.vue";
|
|
3246
3246
|
|
|
3247
|
-
var script$
|
|
3247
|
+
var script$s = {
|
|
3248
3248
|
__name: 'PasswordInput',
|
|
3249
3249
|
props: ['modelValue','label'],
|
|
3250
3250
|
emits: ['update:modelValue','clearValidationErrors'],
|
|
@@ -3278,9 +3278,9 @@ return (_ctx, _cache) => {
|
|
|
3278
3278
|
|
|
3279
3279
|
};
|
|
3280
3280
|
|
|
3281
|
-
script$
|
|
3281
|
+
script$s.__file = "src/lib/components/form-components/PasswordInput.vue";
|
|
3282
3282
|
|
|
3283
|
-
var script$
|
|
3283
|
+
var script$r = {
|
|
3284
3284
|
__name: 'DateInput',
|
|
3285
3285
|
props: ['modelValue','label','isInvalid'],
|
|
3286
3286
|
emits: ['update:modelValue','clearValidationErrors'],
|
|
@@ -3320,16 +3320,16 @@ return (_ctx, _cache) => {
|
|
|
3320
3320
|
|
|
3321
3321
|
};
|
|
3322
3322
|
|
|
3323
|
-
script$
|
|
3323
|
+
script$r.__file = "src/lib/components/form-components/DateInput.vue";
|
|
3324
3324
|
|
|
3325
|
-
const _hoisted_1$
|
|
3326
|
-
const _hoisted_2$
|
|
3327
|
-
const _hoisted_3$
|
|
3328
|
-
const _hoisted_4$
|
|
3325
|
+
const _hoisted_1$n = /*#__PURE__*/createElementVNode("div", null, null, -1 /* HOISTED */);
|
|
3326
|
+
const _hoisted_2$f = ["onUpdate:modelValue"];
|
|
3327
|
+
const _hoisted_3$d = ["innerHTML"];
|
|
3328
|
+
const _hoisted_4$d = {
|
|
3329
3329
|
key: 0,
|
|
3330
3330
|
class: "text-danger sh-required"
|
|
3331
3331
|
};
|
|
3332
|
-
const _hoisted_5$
|
|
3332
|
+
const _hoisted_5$a = ["innerHTML"];
|
|
3333
3333
|
const _hoisted_6$8 = {
|
|
3334
3334
|
key: 2,
|
|
3335
3335
|
class: "form-notch"
|
|
@@ -3353,7 +3353,7 @@ const _hoisted_13$3 = {
|
|
|
3353
3353
|
const _hoisted_14$3 = { key: 1 };
|
|
3354
3354
|
|
|
3355
3355
|
|
|
3356
|
-
var script$
|
|
3356
|
+
var script$q = {
|
|
3357
3357
|
__name: 'ShAutoForm',
|
|
3358
3358
|
props: [
|
|
3359
3359
|
'action', 'successCallback', 'retainDataAfterSubmission',
|
|
@@ -3388,13 +3388,13 @@ const getFieldComponent = (fieldObj) => {
|
|
|
3388
3388
|
const defaultPhones = ['phone'];
|
|
3389
3389
|
const defaultEmails = ['email'];
|
|
3390
3390
|
const formComponents = inject('formComponents');
|
|
3391
|
-
const TextComponent = formComponents.text ?? script$
|
|
3392
|
-
const TextAreaComponent = formComponents.textArea ?? script$
|
|
3393
|
-
const EmailComponent = formComponents.email ?? script$
|
|
3394
|
-
const PhoneComponent = formComponents.phone ?? script$
|
|
3395
|
-
const NumberComponent = formComponents.number ?? script$
|
|
3396
|
-
const SelectComponent = formComponents.select ?? script$
|
|
3397
|
-
const PasswordComponent = formComponents.password ?? script$
|
|
3391
|
+
const TextComponent = formComponents.text ?? script$v;
|
|
3392
|
+
const TextAreaComponent = formComponents.textArea ?? script$u;
|
|
3393
|
+
const EmailComponent = formComponents.email ?? script$x;
|
|
3394
|
+
const PhoneComponent = formComponents.phone ?? script$A;
|
|
3395
|
+
const NumberComponent = formComponents.number ?? script$w;
|
|
3396
|
+
const SelectComponent = formComponents.select ?? script$t;
|
|
3397
|
+
const PasswordComponent = formComponents.password ?? script$s;
|
|
3398
3398
|
if (props.customComponents && props.customComponents[field]) {
|
|
3399
3399
|
return props.customComponents[field]
|
|
3400
3400
|
}
|
|
@@ -3412,28 +3412,28 @@ const getFieldComponent = (fieldObj) => {
|
|
|
3412
3412
|
|
|
3413
3413
|
if (fieldObj.type) {
|
|
3414
3414
|
if (fieldObj.type === 'suggest' || fieldObj.type === 'suggests') {
|
|
3415
|
-
return script$
|
|
3415
|
+
return script$z
|
|
3416
3416
|
}
|
|
3417
3417
|
return fieldObj.type === 'number' ? NumberComponent : fieldObj.type === 'textarea' ? TextAreaComponent : fieldObj.type === 'email' ? EmailComponent : fieldObj.type === 'phone' ? PhoneComponent : fieldObj.type === 'password' ? PasswordComponent : fieldObj.type === 'select' ? SelectComponent : TextComponent
|
|
3418
3418
|
} else if (passwords.includes(field)) {
|
|
3419
3419
|
return PasswordComponent
|
|
3420
3420
|
} else if ((props.textAreas && props.textAreas.includes(field)) || defaultTextareas.includes(field)) {
|
|
3421
|
-
return formComponents.textArea ?? script$
|
|
3421
|
+
return formComponents.textArea ?? script$u
|
|
3422
3422
|
} else if ((props.emails && props.emails.includes(field)) || defaultEmails.includes(field)) {
|
|
3423
|
-
return formComponents.email ?? script$
|
|
3423
|
+
return formComponents.email ?? script$x
|
|
3424
3424
|
} else if ((props.phones && props.phones.includes(field)) || defaultPhones.includes(field)) {
|
|
3425
|
-
return formComponents.phone ?? script$
|
|
3425
|
+
return formComponents.phone ?? script$A
|
|
3426
3426
|
} else if ((props.numbers && props.numbers.includes(field)) || defaultNumbers.includes(field)) {
|
|
3427
|
-
return formComponents.number ?? script$
|
|
3427
|
+
return formComponents.number ?? script$w
|
|
3428
3428
|
}
|
|
3429
3429
|
// else
|
|
3430
3430
|
// if((props.selects && props.selects.includes(field)) || defaultSelects.includes(field)){
|
|
3431
3431
|
// return formComponents.select ?? SelectInput
|
|
3432
3432
|
// } else
|
|
3433
3433
|
if((props.dates && props.dates.includes(field)) || defaultDates.includes(field)){
|
|
3434
|
-
return formComponents.date ?? script$
|
|
3434
|
+
return formComponents.date ?? script$r
|
|
3435
3435
|
}
|
|
3436
|
-
return formComponents.text ?? script$
|
|
3436
|
+
return formComponents.text ?? script$v
|
|
3437
3437
|
};
|
|
3438
3438
|
const shFormElementClasses = ref(null);
|
|
3439
3439
|
shFormElementClasses.value = inject('shFormElementClasses');
|
|
@@ -3583,7 +3583,7 @@ onMounted((ev) => {
|
|
|
3583
3583
|
|
|
3584
3584
|
return (_ctx, _cache) => {
|
|
3585
3585
|
return (openBlock(), createElementBlock(Fragment, null, [
|
|
3586
|
-
_hoisted_1$
|
|
3586
|
+
_hoisted_1$n,
|
|
3587
3587
|
createElementVNode("form", {
|
|
3588
3588
|
class: normalizeClass([__props.formClass, "sh-auto-form"]),
|
|
3589
3589
|
ref_key: "shAutoForm",
|
|
@@ -3600,7 +3600,7 @@ return (_ctx, _cache) => {
|
|
|
3600
3600
|
key: 0,
|
|
3601
3601
|
type: "hidden",
|
|
3602
3602
|
"onUpdate:modelValue": $event => ((formFields.value[index].value) = $event)
|
|
3603
|
-
}, null, 8 /* PROPS */, _hoisted_2$
|
|
3603
|
+
}, null, 8 /* PROPS */, _hoisted_2$f)), [
|
|
3604
3604
|
[vModelText, formFields.value[index].value]
|
|
3605
3605
|
])
|
|
3606
3606
|
: (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
@@ -3612,13 +3612,13 @@ return (_ctx, _cache) => {
|
|
|
3612
3612
|
createElementVNode("span", {
|
|
3613
3613
|
innerHTML: field.label,
|
|
3614
3614
|
class: "sh-label"
|
|
3615
|
-
}, null, 8 /* PROPS */, _hoisted_3$
|
|
3615
|
+
}, null, 8 /* PROPS */, _hoisted_3$d),
|
|
3616
3616
|
(field.required)
|
|
3617
|
-
? (openBlock(), createElementBlock("span", _hoisted_4$
|
|
3617
|
+
? (openBlock(), createElementBlock("span", _hoisted_4$d, "*"))
|
|
3618
3618
|
: createCommentVNode("v-if", true)
|
|
3619
3619
|
], 2 /* CLASS */))
|
|
3620
3620
|
: createCommentVNode("v-if", true),
|
|
3621
|
-
(openBlock(), createBlock(resolveDynamicComponent(getFieldComponent(field)), mergeProps(getComponentProps(field), {
|
|
3621
|
+
(openBlock(), createBlock(resolveDynamicComponent(getFieldComponent(field)), mergeProps({ ref_for: true }, getComponentProps(field), {
|
|
3622
3622
|
isInvalid: typeof validationErrors.value[field.field] !== 'undefined',
|
|
3623
3623
|
onClick: $event => (fieldChanged(field.field)),
|
|
3624
3624
|
"onUpdate:modelValue": [$event => (fieldChanged(field.field)), $event => ((formFields.value[index].value) = $event)],
|
|
@@ -3630,7 +3630,7 @@ return (_ctx, _cache) => {
|
|
|
3630
3630
|
key: 1,
|
|
3631
3631
|
class: normalizeClass(getElementClass('formLabel')),
|
|
3632
3632
|
innerHTML: field.label
|
|
3633
|
-
}, null, 10 /* CLASS, PROPS */, _hoisted_5$
|
|
3633
|
+
}, null, 10 /* CLASS, PROPS */, _hoisted_5$a))
|
|
3634
3634
|
: createCommentVNode("v-if", true),
|
|
3635
3635
|
(unref(isFloating))
|
|
3636
3636
|
? (openBlock(), createElementBlock("div", _hoisted_6$8, [..._hoisted_10$6]))
|
|
@@ -3677,13 +3677,13 @@ return (_ctx, _cache) => {
|
|
|
3677
3677
|
|
|
3678
3678
|
};
|
|
3679
3679
|
|
|
3680
|
-
script$
|
|
3680
|
+
script$q.__file = "src/lib/components/ShAutoForm.vue";
|
|
3681
3681
|
|
|
3682
|
-
const _hoisted_1$
|
|
3683
|
-
const _hoisted_2$
|
|
3684
|
-
const _hoisted_3$
|
|
3685
|
-
const _hoisted_4$
|
|
3686
|
-
const _hoisted_5$
|
|
3682
|
+
const _hoisted_1$m = ["id", "data-bs-backdrop"];
|
|
3683
|
+
const _hoisted_2$e = { class: "modal-content" };
|
|
3684
|
+
const _hoisted_3$c = { class: "modal-header" };
|
|
3685
|
+
const _hoisted_4$c = { class: "modal-title flex-fill" };
|
|
3686
|
+
const _hoisted_5$9 = /*#__PURE__*/createElementVNode("button", {
|
|
3687
3687
|
class: "btn btn-danger btn-sm",
|
|
3688
3688
|
"data-bs-dismiss": "modal",
|
|
3689
3689
|
"data-dismiss": "modal"
|
|
@@ -3692,7 +3692,7 @@ const _hoisted_6$7 = { class: "modal-body" };
|
|
|
3692
3692
|
const _hoisted_7$6 = { class: "section" };
|
|
3693
3693
|
|
|
3694
3694
|
|
|
3695
|
-
var script$
|
|
3695
|
+
var script$p = {
|
|
3696
3696
|
__name: 'ShModal',
|
|
3697
3697
|
props: {
|
|
3698
3698
|
modalId: {
|
|
@@ -3750,10 +3750,10 @@ return (_ctx, _cache) => {
|
|
|
3750
3750
|
createElementVNode("div", {
|
|
3751
3751
|
class: normalizeClass(["modal-dialog", modalClasses.value])
|
|
3752
3752
|
}, [
|
|
3753
|
-
createElementVNode("div", _hoisted_2$
|
|
3754
|
-
createElementVNode("div", _hoisted_3$
|
|
3755
|
-
createElementVNode("h3", _hoisted_4$
|
|
3756
|
-
_hoisted_5$
|
|
3753
|
+
createElementVNode("div", _hoisted_2$e, [
|
|
3754
|
+
createElementVNode("div", _hoisted_3$c, [
|
|
3755
|
+
createElementVNode("h3", _hoisted_4$c, toDisplayString(__props.modalTitle), 1 /* TEXT */),
|
|
3756
|
+
_hoisted_5$9
|
|
3757
3757
|
]),
|
|
3758
3758
|
createElementVNode("div", _hoisted_6$7, [
|
|
3759
3759
|
createElementVNode("div", _hoisted_7$6, [
|
|
@@ -3762,20 +3762,20 @@ return (_ctx, _cache) => {
|
|
|
3762
3762
|
])
|
|
3763
3763
|
])
|
|
3764
3764
|
], 2 /* CLASS */)
|
|
3765
|
-
], 8 /* PROPS */, _hoisted_1$
|
|
3765
|
+
], 8 /* PROPS */, _hoisted_1$m))
|
|
3766
3766
|
}
|
|
3767
3767
|
}
|
|
3768
3768
|
|
|
3769
3769
|
};
|
|
3770
3770
|
|
|
3771
|
-
script$
|
|
3771
|
+
script$p.__file = "src/lib/components/ShModal.vue";
|
|
3772
3772
|
|
|
3773
|
-
const _hoisted_1$
|
|
3774
|
-
const _hoisted_2$
|
|
3775
|
-
const _hoisted_3$
|
|
3776
|
-
const _hoisted_4$
|
|
3773
|
+
const _hoisted_1$l = /*#__PURE__*/createElementVNode("h5", { class: "d-none" }, "To prevent default class", -1 /* HOISTED */);
|
|
3774
|
+
const _hoisted_2$d = { class: "dropdown" };
|
|
3775
|
+
const _hoisted_3$b = ["id"];
|
|
3776
|
+
const _hoisted_4$b = ["aria-labelledby"];
|
|
3777
3777
|
|
|
3778
|
-
var script$
|
|
3778
|
+
var script$o = {
|
|
3779
3779
|
__name: 'ShDropDownForm',
|
|
3780
3780
|
props: ['action',
|
|
3781
3781
|
'classes',
|
|
@@ -3823,8 +3823,8 @@ const formError = (res)=>{
|
|
|
3823
3823
|
|
|
3824
3824
|
return (_ctx, _cache) => {
|
|
3825
3825
|
return (openBlock(), createElementBlock(Fragment, null, [
|
|
3826
|
-
_hoisted_1$
|
|
3827
|
-
createElementVNode("div", _hoisted_2$
|
|
3826
|
+
_hoisted_1$l,
|
|
3827
|
+
createElementVNode("div", _hoisted_2$d, [
|
|
3828
3828
|
createElementVNode("a", {
|
|
3829
3829
|
class: normalizeClass(unref(btnClass)),
|
|
3830
3830
|
href: "#",
|
|
@@ -3835,19 +3835,19 @@ return (_ctx, _cache) => {
|
|
|
3835
3835
|
"aria-expanded": "false"
|
|
3836
3836
|
}, [
|
|
3837
3837
|
renderSlot(_ctx.$slots, "default")
|
|
3838
|
-
], 10 /* CLASS, PROPS */, _hoisted_3$
|
|
3838
|
+
], 10 /* CLASS, PROPS */, _hoisted_3$b),
|
|
3839
3839
|
createElementVNode("div", {
|
|
3840
3840
|
class: "dropdown-menu px-2 py-1",
|
|
3841
3841
|
"aria-labelledby": _ctx.dropdownId
|
|
3842
3842
|
}, [
|
|
3843
|
-
(openBlock(), createBlock(script$
|
|
3843
|
+
(openBlock(), createBlock(script$q, mergeProps({
|
|
3844
3844
|
onSuccess: success,
|
|
3845
3845
|
onFieldChanged: fieldChanged,
|
|
3846
3846
|
onFormSubmitted: formSubmitted,
|
|
3847
3847
|
onFormError: formError,
|
|
3848
3848
|
key: JSON.stringify(__props.currentData ?? {})
|
|
3849
3849
|
}, props), null, 16 /* FULL_PROPS */))
|
|
3850
|
-
], 8 /* PROPS */, _hoisted_4$
|
|
3850
|
+
], 8 /* PROPS */, _hoisted_4$b)
|
|
3851
3851
|
])
|
|
3852
3852
|
], 64 /* STABLE_FRAGMENT */))
|
|
3853
3853
|
}
|
|
@@ -3855,11 +3855,11 @@ return (_ctx, _cache) => {
|
|
|
3855
3855
|
|
|
3856
3856
|
};
|
|
3857
3857
|
|
|
3858
|
-
script$
|
|
3858
|
+
script$o.__file = "src/lib/components/ShDropDownForm.vue";
|
|
3859
3859
|
|
|
3860
|
-
const _hoisted_1$
|
|
3860
|
+
const _hoisted_1$k = ["href"];
|
|
3861
3861
|
|
|
3862
|
-
var script$
|
|
3862
|
+
var script$n = {
|
|
3863
3863
|
__name: 'ShModalForm',
|
|
3864
3864
|
props: ['action',
|
|
3865
3865
|
'classes',
|
|
@@ -3919,14 +3919,14 @@ return (_ctx, _cache) => {
|
|
|
3919
3919
|
onClick: emitClick
|
|
3920
3920
|
}, [
|
|
3921
3921
|
renderSlot(_ctx.$slots, "default")
|
|
3922
|
-
], 10 /* CLASS, PROPS */, _hoisted_1$
|
|
3923
|
-
createVNode(script$
|
|
3922
|
+
], 10 /* CLASS, PROPS */, _hoisted_1$k),
|
|
3923
|
+
createVNode(script$p, {
|
|
3924
3924
|
"modal-size": __props.modalSize,
|
|
3925
3925
|
"modal-id": unref(realModalId),
|
|
3926
3926
|
"modal-title": __props.modalTitle
|
|
3927
3927
|
}, {
|
|
3928
3928
|
default: withCtx(() => [
|
|
3929
|
-
(openBlock(), createBlock(script$
|
|
3929
|
+
(openBlock(), createBlock(script$q, mergeProps({
|
|
3930
3930
|
onSuccess: success,
|
|
3931
3931
|
onFieldChanged: fieldChanged,
|
|
3932
3932
|
onFormSubmitted: formSubmitted,
|
|
@@ -3942,11 +3942,11 @@ return (_ctx, _cache) => {
|
|
|
3942
3942
|
|
|
3943
3943
|
};
|
|
3944
3944
|
|
|
3945
|
-
script$
|
|
3945
|
+
script$n.__file = "src/lib/components/ShModalForm.vue";
|
|
3946
3946
|
|
|
3947
|
-
const _hoisted_1$
|
|
3947
|
+
const _hoisted_1$j = ["href"];
|
|
3948
3948
|
|
|
3949
|
-
var script$
|
|
3949
|
+
var script$m = {
|
|
3950
3950
|
__name: 'ShModalFormAuto',
|
|
3951
3951
|
props: ['action',
|
|
3952
3952
|
'classes',
|
|
@@ -3985,14 +3985,14 @@ return (_ctx, _cache) => {
|
|
|
3985
3985
|
"data-bs-toggle": "modal"
|
|
3986
3986
|
}, [
|
|
3987
3987
|
renderSlot(_ctx.$slots, "default")
|
|
3988
|
-
], 10 /* CLASS, PROPS */, _hoisted_1$
|
|
3989
|
-
createVNode(script$
|
|
3988
|
+
], 10 /* CLASS, PROPS */, _hoisted_1$j),
|
|
3989
|
+
createVNode(script$p, {
|
|
3990
3990
|
"modal-id": modalId,
|
|
3991
3991
|
"modal-title": __props.modalTitle,
|
|
3992
3992
|
"modal-size": __props.modalSize
|
|
3993
3993
|
}, {
|
|
3994
3994
|
default: withCtx(() => [
|
|
3995
|
-
createVNode(script$
|
|
3995
|
+
createVNode(script$q, mergeProps({ onSuccess: success }, props), null, 16 /* FULL_PROPS */)
|
|
3996
3996
|
]),
|
|
3997
3997
|
_: 1 /* STABLE */
|
|
3998
3998
|
}, 8 /* PROPS */, ["modal-title", "modal-size"])
|
|
@@ -4002,17 +4002,17 @@ return (_ctx, _cache) => {
|
|
|
4002
4002
|
|
|
4003
4003
|
};
|
|
4004
4004
|
|
|
4005
|
-
script$
|
|
4005
|
+
script$m.__file = "src/lib/components/ShModalFormAuto.vue";
|
|
4006
4006
|
|
|
4007
|
-
const _hoisted_1$
|
|
4008
|
-
const _hoisted_2$
|
|
4009
|
-
const _hoisted_3$
|
|
4007
|
+
const _hoisted_1$i = ["data-bs-scroll", "id"];
|
|
4008
|
+
const _hoisted_2$c = { class: "offcanvas-header" };
|
|
4009
|
+
const _hoisted_3$a = {
|
|
4010
4010
|
class: "offcanvas-title",
|
|
4011
4011
|
id: "offcanvasScrollingLabel"
|
|
4012
4012
|
};
|
|
4013
|
-
const _hoisted_4$
|
|
4013
|
+
const _hoisted_4$a = { class: "offcanvas-body" };
|
|
4014
4014
|
|
|
4015
|
-
var script$
|
|
4015
|
+
var script$l = {
|
|
4016
4016
|
__name: 'ShCanvas',
|
|
4017
4017
|
props: {
|
|
4018
4018
|
canvasId: {
|
|
@@ -4058,8 +4058,8 @@ return (_ctx, _cache) => {
|
|
|
4058
4058
|
id: __props.canvasId,
|
|
4059
4059
|
"aria-labelledby": "offcanvasScrollingLabel"
|
|
4060
4060
|
}, [
|
|
4061
|
-
createElementVNode("div", _hoisted_2$
|
|
4062
|
-
createElementVNode("h5", _hoisted_3$
|
|
4061
|
+
createElementVNode("div", _hoisted_2$c, [
|
|
4062
|
+
createElementVNode("h5", _hoisted_3$a, toDisplayString(__props.canvasTitle), 1 /* TEXT */),
|
|
4063
4063
|
createElementVNode("button", {
|
|
4064
4064
|
type: "button",
|
|
4065
4065
|
ref: "closecanvas",
|
|
@@ -4069,32 +4069,32 @@ return (_ctx, _cache) => {
|
|
|
4069
4069
|
"aria-label": "Close"
|
|
4070
4070
|
}, null, 512 /* NEED_PATCH */)
|
|
4071
4071
|
]),
|
|
4072
|
-
createElementVNode("div", _hoisted_4$
|
|
4072
|
+
createElementVNode("div", _hoisted_4$a, [
|
|
4073
4073
|
renderSlot(_ctx.$slots, "default")
|
|
4074
4074
|
])
|
|
4075
|
-
], 10 /* CLASS, PROPS */, _hoisted_1$
|
|
4075
|
+
], 10 /* CLASS, PROPS */, _hoisted_1$i))
|
|
4076
4076
|
}
|
|
4077
4077
|
}
|
|
4078
4078
|
|
|
4079
4079
|
};
|
|
4080
4080
|
|
|
4081
|
-
script$
|
|
4081
|
+
script$l.__file = "src/lib/components/ShCanvas.vue";
|
|
4082
4082
|
|
|
4083
|
-
const _hoisted_1$
|
|
4083
|
+
const _hoisted_1$h = { class: "callout callout-info" };
|
|
4084
4084
|
|
|
4085
4085
|
function render$2(_ctx, _cache) {
|
|
4086
|
-
return (openBlock(), createElementBlock("div", _hoisted_1$
|
|
4086
|
+
return (openBlock(), createElementBlock("div", _hoisted_1$h, [
|
|
4087
4087
|
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
4088
4088
|
createTextVNode(" No records found ")
|
|
4089
4089
|
])
|
|
4090
4090
|
]))
|
|
4091
4091
|
}
|
|
4092
4092
|
|
|
4093
|
-
const script$
|
|
4093
|
+
const script$k = {};
|
|
4094
4094
|
|
|
4095
|
-
script$
|
|
4096
|
-
script$
|
|
4097
|
-
script$
|
|
4095
|
+
script$k.render = render$2;
|
|
4096
|
+
script$k.__scopeId = "data-v-55cf77fb";
|
|
4097
|
+
script$k.__file = "src/lib/components/others/NoRecords.vue";
|
|
4098
4098
|
|
|
4099
4099
|
const useUserStore = defineStore('user-store', {
|
|
4100
4100
|
state: () => ({
|
|
@@ -4193,7 +4193,410 @@ const useUserStore = defineStore('user-store', {
|
|
|
4193
4193
|
}
|
|
4194
4194
|
});
|
|
4195
4195
|
|
|
4196
|
+
const _hoisted_1$g = /*#__PURE__*/createElementVNode("span", {
|
|
4197
|
+
class: "spinner-border spinner-border-sm me-1",
|
|
4198
|
+
role: "status",
|
|
4199
|
+
"aria-hidden": "true"
|
|
4200
|
+
}, null, -1 /* HOISTED */);
|
|
4201
|
+
|
|
4202
|
+
|
|
4203
|
+
var script$j = {
|
|
4204
|
+
__name: 'ShConfirmAction',
|
|
4205
|
+
props: {
|
|
4206
|
+
data: Object,
|
|
4207
|
+
title: String,
|
|
4208
|
+
message: String,
|
|
4209
|
+
url: {
|
|
4210
|
+
type: String,
|
|
4211
|
+
required: true
|
|
4212
|
+
},
|
|
4213
|
+
loadingMessage: {
|
|
4214
|
+
type: String,
|
|
4215
|
+
default: 'Processing...'
|
|
4216
|
+
},
|
|
4217
|
+
successMessage: {
|
|
4218
|
+
type: String,
|
|
4219
|
+
default: 'Action Successful'
|
|
4220
|
+
},
|
|
4221
|
+
failMessage: {
|
|
4222
|
+
type: String,
|
|
4223
|
+
default: 'Action failed'
|
|
4224
|
+
}
|
|
4225
|
+
},
|
|
4226
|
+
emits: ['actionSuccessful', 'actionFailed','success','failed','canceled','actionCanceled'],
|
|
4227
|
+
setup(__props, { emit: __emit }) {
|
|
4228
|
+
|
|
4229
|
+
const props = __props;
|
|
4230
|
+
|
|
4231
|
+
const processing = ref(false);
|
|
4232
|
+
const emit = __emit;
|
|
4233
|
+
const actionSuccessful = (res)=>{
|
|
4234
|
+
processing.value = false;
|
|
4235
|
+
res.actionType = 'silentAction';
|
|
4236
|
+
emit('actionSuccessful',res);
|
|
4237
|
+
emit('success',res);
|
|
4238
|
+
shRepo.showToast(res.message ?? props.successMessage);
|
|
4239
|
+
};
|
|
4240
|
+
|
|
4241
|
+
const actionFailed = reason =>{
|
|
4242
|
+
console.log(reason);
|
|
4243
|
+
processing.value = false;
|
|
4244
|
+
reason.actionType = 'silentAction';
|
|
4245
|
+
emit('actionFailed', reason);
|
|
4246
|
+
emit('failed', reason);
|
|
4247
|
+
shRepo.showToast(reason.value.error.message ?? props.failMessage,'error');
|
|
4248
|
+
};
|
|
4249
|
+
function runAction () {
|
|
4250
|
+
processing.value = true;
|
|
4251
|
+
shRepo.runPlainRequest(props.url, props.message, props.title, props.data).then(res => {
|
|
4252
|
+
if(res.isConfirmed){
|
|
4253
|
+
const value = res.value;
|
|
4254
|
+
if(value.success){
|
|
4255
|
+
actionSuccessful(res.value.response);
|
|
4256
|
+
} else {
|
|
4257
|
+
actionFailed(res);
|
|
4258
|
+
}
|
|
4259
|
+
} else {
|
|
4260
|
+
emit('actionCanceled');
|
|
4261
|
+
emit('canceled');
|
|
4262
|
+
processing.value = false;
|
|
4263
|
+
}
|
|
4264
|
+
}).catch(ex => {
|
|
4265
|
+
actionFailed(ex);
|
|
4266
|
+
});
|
|
4267
|
+
}
|
|
4268
|
+
|
|
4269
|
+
return (_ctx, _cache) => {
|
|
4270
|
+
return (openBlock(), createElementBlock("a", {
|
|
4271
|
+
class: normalizeClass(processing.value ? 'disabled':''),
|
|
4272
|
+
onClick: runAction
|
|
4273
|
+
}, [
|
|
4274
|
+
(processing.value)
|
|
4275
|
+
? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
4276
|
+
_hoisted_1$g,
|
|
4277
|
+
createElementVNode("span", null, toDisplayString(__props.loadingMessage), 1 /* TEXT */)
|
|
4278
|
+
], 64 /* STABLE_FRAGMENT */))
|
|
4279
|
+
: createCommentVNode("v-if", true),
|
|
4280
|
+
(!processing.value)
|
|
4281
|
+
? renderSlot(_ctx.$slots, "default", { key: 1 })
|
|
4282
|
+
: createCommentVNode("v-if", true)
|
|
4283
|
+
], 2 /* CLASS */))
|
|
4284
|
+
}
|
|
4285
|
+
}
|
|
4286
|
+
|
|
4287
|
+
};
|
|
4288
|
+
|
|
4289
|
+
script$j.__file = "src/lib/components/ShConfirmAction.vue";
|
|
4290
|
+
|
|
4291
|
+
const _hoisted_1$f = /*#__PURE__*/createElementVNode("span", {
|
|
4292
|
+
class: "spinner-border spinner-border-sm me-1",
|
|
4293
|
+
role: "status",
|
|
4294
|
+
"aria-hidden": "true"
|
|
4295
|
+
}, null, -1 /* HOISTED */);
|
|
4296
|
+
|
|
4297
|
+
var script$i = {
|
|
4298
|
+
__name: 'ShSilentAction',
|
|
4299
|
+
props: {
|
|
4300
|
+
data: Object,
|
|
4301
|
+
loadingMessage: {
|
|
4302
|
+
type: String,
|
|
4303
|
+
default: 'Processing'
|
|
4304
|
+
},
|
|
4305
|
+
successMessage: {
|
|
4306
|
+
type: String,
|
|
4307
|
+
default: 'Action Successful'
|
|
4308
|
+
},
|
|
4309
|
+
failMessage: {
|
|
4310
|
+
type: String,
|
|
4311
|
+
default: 'Action failed'
|
|
4312
|
+
},
|
|
4313
|
+
method: {
|
|
4314
|
+
type: String,
|
|
4315
|
+
default: 'POST'
|
|
4316
|
+
},
|
|
4317
|
+
url: {
|
|
4318
|
+
type: String,
|
|
4319
|
+
required: true
|
|
4320
|
+
},
|
|
4321
|
+
disableSuccessMessage: {
|
|
4322
|
+
type: Boolean
|
|
4323
|
+
}
|
|
4324
|
+
},
|
|
4325
|
+
emits: ['actionSuccessful','actionFailed','success'],
|
|
4326
|
+
setup(__props, { emit: __emit }) {
|
|
4327
|
+
|
|
4328
|
+
const props = __props;
|
|
4329
|
+
const processing = ref(false);
|
|
4330
|
+
const emit = __emit;
|
|
4331
|
+
const actionSuccessful = (res)=>{
|
|
4332
|
+
processing.value = false;
|
|
4333
|
+
res.actionType = 'silentAction';
|
|
4334
|
+
console.log(res.data,props.successMessage);
|
|
4335
|
+
emit('actionSuccessful',res);
|
|
4336
|
+
emit('success',res);
|
|
4337
|
+
if(!props.disableSuccessMessage) {
|
|
4338
|
+
shRepo.showToast(res.data.message ?? props.successMessage);
|
|
4339
|
+
}
|
|
4340
|
+
};
|
|
4341
|
+
|
|
4342
|
+
const actionFailed = reason =>{
|
|
4343
|
+
processing.value = false;
|
|
4344
|
+
console.log(reason);
|
|
4345
|
+
shRepo.showToast('Failed');
|
|
4346
|
+
reason.actionType = 'silentAction';
|
|
4347
|
+
emit('actionFailed', reason);
|
|
4348
|
+
shRepo.showToast(reason.message ?? props.failMessage,'error');
|
|
4349
|
+
};
|
|
4350
|
+
function runAction(){
|
|
4351
|
+
processing.value = true;
|
|
4352
|
+
if(props.method === 'POST'){
|
|
4353
|
+
shApis.doPost(props.url,props.data).then(res=>{
|
|
4354
|
+
actionSuccessful(res);
|
|
4355
|
+
}).catch(reason=>{
|
|
4356
|
+
actionFailed(reason);
|
|
4357
|
+
});
|
|
4358
|
+
}
|
|
4359
|
+
if(props.method === 'GET'){
|
|
4360
|
+
shApis.doGet(props.url,props.data).then(res=>{
|
|
4361
|
+
actionSuccessful(res);
|
|
4362
|
+
}).catch(reason=>{
|
|
4363
|
+
actionFailed(reason);
|
|
4364
|
+
});
|
|
4365
|
+
}
|
|
4366
|
+
}
|
|
4367
|
+
|
|
4368
|
+
return (_ctx, _cache) => {
|
|
4369
|
+
return (openBlock(), createElementBlock("a", {
|
|
4370
|
+
class: normalizeClass(processing.value ? 'disabled':''),
|
|
4371
|
+
onClick: runAction
|
|
4372
|
+
}, [
|
|
4373
|
+
(processing.value)
|
|
4374
|
+
? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
4375
|
+
_hoisted_1$f,
|
|
4376
|
+
createElementVNode("span", null, toDisplayString(__props.loadingMessage), 1 /* TEXT */)
|
|
4377
|
+
], 64 /* STABLE_FRAGMENT */))
|
|
4378
|
+
: createCommentVNode("v-if", true),
|
|
4379
|
+
(!processing.value)
|
|
4380
|
+
? renderSlot(_ctx.$slots, "default", { key: 1 })
|
|
4381
|
+
: createCommentVNode("v-if", true)
|
|
4382
|
+
], 2 /* CLASS */))
|
|
4383
|
+
}
|
|
4384
|
+
}
|
|
4385
|
+
|
|
4386
|
+
};
|
|
4387
|
+
|
|
4388
|
+
script$i.__file = "src/lib/components/ShSilentAction.vue";
|
|
4389
|
+
|
|
4390
|
+
const _hoisted_1$e = ["href"];
|
|
4391
|
+
const _hoisted_2$b = ["title"];
|
|
4392
|
+
|
|
4393
|
+
|
|
4196
4394
|
var script$h = {
|
|
4395
|
+
__name: 'SingleAction',
|
|
4396
|
+
props: ['action','record'],
|
|
4397
|
+
emits: ['actionSuccessful','actionFailed','actionCanceled'],
|
|
4398
|
+
setup(__props, { emit: __emit }) {
|
|
4399
|
+
|
|
4400
|
+
const props = __props;
|
|
4401
|
+
|
|
4402
|
+
const doEmitAction = __emit;
|
|
4403
|
+
|
|
4404
|
+
const url = ref(props.action.path || props.action.url || props.action.link);
|
|
4405
|
+
|
|
4406
|
+
onMounted(()=>{
|
|
4407
|
+
if(!url.value) {
|
|
4408
|
+
url.value = '';
|
|
4409
|
+
}
|
|
4410
|
+
// replace params in url with record key e.g {id} replaced with record.id
|
|
4411
|
+
url.value = url.value.replace(/{(\w+)}/g, (match, key) => {
|
|
4412
|
+
return props.record[key]
|
|
4413
|
+
});
|
|
4414
|
+
|
|
4415
|
+
// replace params e.g :id replaced with record.id
|
|
4416
|
+
url.value = url.value.replace(/:(\w+)/g, (match, key) => {
|
|
4417
|
+
return props.record[key]
|
|
4418
|
+
});
|
|
4419
|
+
});
|
|
4420
|
+
|
|
4421
|
+
const {user} = storeToRefs(useUserStore());
|
|
4422
|
+
|
|
4423
|
+
return (_ctx, _cache) => {
|
|
4424
|
+
const _component_router_link = resolveComponent("router-link");
|
|
4425
|
+
|
|
4426
|
+
return (!__props.action.permission || unref(user).isAllowedTo(__props.action.permission))
|
|
4427
|
+
? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
4428
|
+
(!__props.action.validator || __props.action.validator(__props.record))
|
|
4429
|
+
? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
4430
|
+
(['confirmAction','confirmaction','confirm-action','confirm'].includes(__props.action.type))
|
|
4431
|
+
? (openBlock(), createBlock(script$j, {
|
|
4432
|
+
key: 0,
|
|
4433
|
+
onActionSuccessful: _cache[0] || (_cache[0] = $event => (doEmitAction('actionSuccessful',__props.record))),
|
|
4434
|
+
onActionFailed: _cache[1] || (_cache[1] = $event => (doEmitAction('actionFailed',__props.record))),
|
|
4435
|
+
onActionCanceled: _cache[2] || (_cache[2] = $event => (doEmitAction('actionCanceled',__props.record))),
|
|
4436
|
+
"loading-message": __props.action.label,
|
|
4437
|
+
class: normalizeClass(__props.action.class),
|
|
4438
|
+
url: url.value
|
|
4439
|
+
}, {
|
|
4440
|
+
default: withCtx(() => [
|
|
4441
|
+
(__props.action.icon)
|
|
4442
|
+
? (openBlock(), createElementBlock("span", {
|
|
4443
|
+
key: 0,
|
|
4444
|
+
class: normalizeClass(__props.action.icon)
|
|
4445
|
+
}, null, 2 /* CLASS */))
|
|
4446
|
+
: createCommentVNode("v-if", true),
|
|
4447
|
+
createTextVNode(" " + toDisplayString(__props.action.label), 1 /* TEXT */)
|
|
4448
|
+
]),
|
|
4449
|
+
_: 1 /* STABLE */
|
|
4450
|
+
}, 8 /* PROPS */, ["loading-message", "class", "url"]))
|
|
4451
|
+
: (['silentAction','silentaction','silent-action','silent'].includes(__props.action.type))
|
|
4452
|
+
? (openBlock(), createBlock(script$i, {
|
|
4453
|
+
key: 1,
|
|
4454
|
+
onActionSuccessful: _cache[3] || (_cache[3] = $event => (doEmitAction('actionSuccessful',__props.record))),
|
|
4455
|
+
onActionFailed: _cache[4] || (_cache[4] = $event => (doEmitAction('actionFailed',__props.record))),
|
|
4456
|
+
onActionCanceled: _cache[5] || (_cache[5] = $event => (doEmitAction('actionCanceled',__props.record))),
|
|
4457
|
+
"loading-message": __props.action.label,
|
|
4458
|
+
class: normalizeClass(__props.action.class),
|
|
4459
|
+
url: url.value
|
|
4460
|
+
}, {
|
|
4461
|
+
default: withCtx(() => [
|
|
4462
|
+
(__props.action.icon)
|
|
4463
|
+
? (openBlock(), createElementBlock("span", {
|
|
4464
|
+
key: 0,
|
|
4465
|
+
class: normalizeClass(__props.action.icon)
|
|
4466
|
+
}, null, 2 /* CLASS */))
|
|
4467
|
+
: createCommentVNode("v-if", true),
|
|
4468
|
+
createTextVNode(" " + toDisplayString(__props.action.label), 1 /* TEXT */)
|
|
4469
|
+
]),
|
|
4470
|
+
_: 1 /* STABLE */
|
|
4471
|
+
}, 8 /* PROPS */, ["loading-message", "class", "url"]))
|
|
4472
|
+
: (__props.action.canvasId || __props.action.type === 'offcanvas')
|
|
4473
|
+
? (openBlock(), createElementBlock("a", {
|
|
4474
|
+
key: 2,
|
|
4475
|
+
href: '#' + __props.action.canvasId,
|
|
4476
|
+
"data-bs-toggle": "offcanvas",
|
|
4477
|
+
class: normalizeClass(__props.action.class)
|
|
4478
|
+
}, [
|
|
4479
|
+
(__props.action.icon)
|
|
4480
|
+
? (openBlock(), createElementBlock("span", {
|
|
4481
|
+
key: 0,
|
|
4482
|
+
class: normalizeClass(__props.action.icon)
|
|
4483
|
+
}, null, 2 /* CLASS */))
|
|
4484
|
+
: createCommentVNode("v-if", true),
|
|
4485
|
+
createTextVNode(" " + toDisplayString(__props.action.label), 1 /* TEXT */)
|
|
4486
|
+
], 10 /* CLASS, PROPS */, _hoisted_1$e))
|
|
4487
|
+
: (__props.action.emits)
|
|
4488
|
+
? (openBlock(), createElementBlock("button", {
|
|
4489
|
+
key: 3,
|
|
4490
|
+
title: __props.action.title,
|
|
4491
|
+
class: normalizeClass(__props.action.class ? __props.action.class:'btn btn-default'),
|
|
4492
|
+
onClick: _cache[6] || (_cache[6] = $event => (doEmitAction(__props.action.emits,__props.record)))
|
|
4493
|
+
}, [
|
|
4494
|
+
(__props.action.icon)
|
|
4495
|
+
? (openBlock(), createElementBlock("span", {
|
|
4496
|
+
key: 0,
|
|
4497
|
+
class: normalizeClass(__props.action.icon)
|
|
4498
|
+
}, null, 2 /* CLASS */))
|
|
4499
|
+
: createCommentVNode("v-if", true),
|
|
4500
|
+
createTextVNode(" " + toDisplayString(__props.action.label), 1 /* TEXT */)
|
|
4501
|
+
], 10 /* CLASS, PROPS */, _hoisted_2$b))
|
|
4502
|
+
: (!__props.action.emits)
|
|
4503
|
+
? (openBlock(), createBlock(_component_router_link, {
|
|
4504
|
+
key: 4,
|
|
4505
|
+
title: __props.action.title,
|
|
4506
|
+
to: url.value,
|
|
4507
|
+
class: normalizeClass(__props.action.class)
|
|
4508
|
+
}, {
|
|
4509
|
+
default: withCtx(() => [
|
|
4510
|
+
(__props.action.icon)
|
|
4511
|
+
? (openBlock(), createElementBlock("span", {
|
|
4512
|
+
key: 0,
|
|
4513
|
+
class: normalizeClass(__props.action.icon)
|
|
4514
|
+
}, null, 2 /* CLASS */))
|
|
4515
|
+
: createCommentVNode("v-if", true),
|
|
4516
|
+
createTextVNode(" " + toDisplayString(__props.action.label), 1 /* TEXT */)
|
|
4517
|
+
]),
|
|
4518
|
+
_: 1 /* STABLE */
|
|
4519
|
+
}, 8 /* PROPS */, ["title", "to", "class"]))
|
|
4520
|
+
: createCommentVNode("v-if", true)
|
|
4521
|
+
], 64 /* STABLE_FRAGMENT */))
|
|
4522
|
+
: createCommentVNode("v-if", true)
|
|
4523
|
+
], 64 /* STABLE_FRAGMENT */))
|
|
4524
|
+
: createCommentVNode("v-if", true)
|
|
4525
|
+
}
|
|
4526
|
+
}
|
|
4527
|
+
|
|
4528
|
+
};
|
|
4529
|
+
|
|
4530
|
+
script$h.__file = "src/lib/components/table/SingleAction.vue";
|
|
4531
|
+
|
|
4532
|
+
const _hoisted_1$d = {
|
|
4533
|
+
key: 0,
|
|
4534
|
+
class: "dropdown"
|
|
4535
|
+
};
|
|
4536
|
+
const _hoisted_2$a = {
|
|
4537
|
+
class: "sh-table-dropdown",
|
|
4538
|
+
type: "button",
|
|
4539
|
+
"data-bs-toggle": "dropdown",
|
|
4540
|
+
"aria-expanded": "false"
|
|
4541
|
+
};
|
|
4542
|
+
const _hoisted_3$9 = {
|
|
4543
|
+
key: 0,
|
|
4544
|
+
class: "bi bi-three-dots"
|
|
4545
|
+
};
|
|
4546
|
+
const _hoisted_4$9 = {
|
|
4547
|
+
key: 1,
|
|
4548
|
+
class: "bi bi-three-dots-vertical"
|
|
4549
|
+
};
|
|
4550
|
+
const _hoisted_5$8 = { class: "dropdown-menu" };
|
|
4551
|
+
|
|
4552
|
+
|
|
4553
|
+
var script$g = {
|
|
4554
|
+
__name: 'TableActions',
|
|
4555
|
+
props: ['actions','record'],
|
|
4556
|
+
setup(__props) {
|
|
4557
|
+
|
|
4558
|
+
const props = __props;
|
|
4559
|
+
|
|
4560
|
+
const actionItems = props.actions.actions;
|
|
4561
|
+
const type = props.actions.type; // dropdown, button
|
|
4562
|
+
|
|
4563
|
+
return (_ctx, _cache) => {
|
|
4564
|
+
return (unref(type).includes('dropdown'))
|
|
4565
|
+
? (openBlock(), createElementBlock("div", _hoisted_1$d, [
|
|
4566
|
+
createElementVNode("strong", _hoisted_2$a, [
|
|
4567
|
+
(unref(type) === 'dropdown-horizontal')
|
|
4568
|
+
? (openBlock(), createElementBlock("i", _hoisted_3$9))
|
|
4569
|
+
: (openBlock(), createElementBlock("i", _hoisted_4$9))
|
|
4570
|
+
]),
|
|
4571
|
+
createElementVNode("ul", _hoisted_5$8, [
|
|
4572
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(actionItems), (act) => {
|
|
4573
|
+
return (openBlock(), createElementBlock("li", {
|
|
4574
|
+
key: act.label
|
|
4575
|
+
}, [
|
|
4576
|
+
createVNode(script$h, {
|
|
4577
|
+
class: normalizeClass(act.class),
|
|
4578
|
+
action: act,
|
|
4579
|
+
record: __props.record
|
|
4580
|
+
}, null, 8 /* PROPS */, ["class", "action", "record"])
|
|
4581
|
+
]))
|
|
4582
|
+
}), 128 /* KEYED_FRAGMENT */))
|
|
4583
|
+
])
|
|
4584
|
+
]))
|
|
4585
|
+
: (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(unref(actionItems), (act) => {
|
|
4586
|
+
return (openBlock(), createBlock(script$h, {
|
|
4587
|
+
key: act.label,
|
|
4588
|
+
action: act,
|
|
4589
|
+
record: __props.record
|
|
4590
|
+
}, null, 8 /* PROPS */, ["action", "record"]))
|
|
4591
|
+
}), 128 /* KEYED_FRAGMENT */))
|
|
4592
|
+
}
|
|
4593
|
+
}
|
|
4594
|
+
|
|
4595
|
+
};
|
|
4596
|
+
|
|
4597
|
+
script$g.__file = "src/lib/components/table/TableActions.vue";
|
|
4598
|
+
|
|
4599
|
+
var script$f = {
|
|
4197
4600
|
name: 'Pagination',
|
|
4198
4601
|
props: ['pagination_data', 'loadMore', 'hideCount', 'hideLoadMore', 'paginationStyle','perPage'],
|
|
4199
4602
|
data () {
|
|
@@ -4272,7 +4675,7 @@ var script$h = {
|
|
|
4272
4675
|
}
|
|
4273
4676
|
};
|
|
4274
4677
|
|
|
4275
|
-
const _hoisted_1$
|
|
4678
|
+
const _hoisted_1$c = { key: 0 };
|
|
4276
4679
|
const _hoisted_2$9 = { class: "record_count_body mb-3" };
|
|
4277
4680
|
const _hoisted_3$8 = /*#__PURE__*/createElementVNode("span", { class: "per_page_show" }, "Showing", -1 /* HOISTED */);
|
|
4278
4681
|
const _hoisted_4$8 = ["value"];
|
|
@@ -4319,7 +4722,7 @@ const _hoisted_18$2 = {
|
|
|
4319
4722
|
|
|
4320
4723
|
function render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
4321
4724
|
return ($props.paginationStyle !== 'loadMore')
|
|
4322
|
-
? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
4725
|
+
? (openBlock(), createElementBlock("div", _hoisted_1$c, [
|
|
4323
4726
|
createElementVNode("div", _hoisted_2$9, [
|
|
4324
4727
|
_hoisted_3$8,
|
|
4325
4728
|
createTextVNode(" "),
|
|
@@ -4398,202 +4801,8 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
4398
4801
|
]))
|
|
4399
4802
|
}
|
|
4400
4803
|
|
|
4401
|
-
script$
|
|
4402
|
-
script$
|
|
4403
|
-
|
|
4404
|
-
const _hoisted_1$d = /*#__PURE__*/createElementVNode("span", {
|
|
4405
|
-
class: "spinner-border spinner-border-sm me-1",
|
|
4406
|
-
role: "status",
|
|
4407
|
-
"aria-hidden": "true"
|
|
4408
|
-
}, null, -1 /* HOISTED */);
|
|
4409
|
-
|
|
4410
|
-
|
|
4411
|
-
var script$g = {
|
|
4412
|
-
__name: 'ShConfirmAction',
|
|
4413
|
-
props: {
|
|
4414
|
-
data: Object,
|
|
4415
|
-
title: String,
|
|
4416
|
-
message: String,
|
|
4417
|
-
url: {
|
|
4418
|
-
type: String,
|
|
4419
|
-
required: true
|
|
4420
|
-
},
|
|
4421
|
-
loadingMessage: {
|
|
4422
|
-
type: String,
|
|
4423
|
-
default: 'Processing...'
|
|
4424
|
-
},
|
|
4425
|
-
successMessage: {
|
|
4426
|
-
type: String,
|
|
4427
|
-
default: 'Action Successful'
|
|
4428
|
-
},
|
|
4429
|
-
failMessage: {
|
|
4430
|
-
type: String,
|
|
4431
|
-
default: 'Action failed'
|
|
4432
|
-
}
|
|
4433
|
-
},
|
|
4434
|
-
emits: ['actionSuccessful', 'actionFailed','success','failed','canceled','actionCanceled'],
|
|
4435
|
-
setup(__props, { emit: __emit }) {
|
|
4436
|
-
|
|
4437
|
-
const props = __props;
|
|
4438
|
-
|
|
4439
|
-
const processing = ref(false);
|
|
4440
|
-
const emit = __emit;
|
|
4441
|
-
const actionSuccessful = (res)=>{
|
|
4442
|
-
processing.value = false;
|
|
4443
|
-
res.actionType = 'silentAction';
|
|
4444
|
-
emit('actionSuccessful',res);
|
|
4445
|
-
emit('success',res);
|
|
4446
|
-
shRepo.showToast(res.message ?? props.successMessage);
|
|
4447
|
-
};
|
|
4448
|
-
|
|
4449
|
-
const actionFailed = reason =>{
|
|
4450
|
-
console.log(reason);
|
|
4451
|
-
processing.value = false;
|
|
4452
|
-
reason.actionType = 'silentAction';
|
|
4453
|
-
emit('actionFailed', reason);
|
|
4454
|
-
emit('failed', reason);
|
|
4455
|
-
shRepo.showToast(reason.value.error.message ?? props.failMessage,'error');
|
|
4456
|
-
};
|
|
4457
|
-
function runAction () {
|
|
4458
|
-
processing.value = true;
|
|
4459
|
-
shRepo.runPlainRequest(props.url, props.message, props.title, props.data).then(res => {
|
|
4460
|
-
if(res.isConfirmed){
|
|
4461
|
-
const value = res.value;
|
|
4462
|
-
if(value.success){
|
|
4463
|
-
actionSuccessful(res.value.response);
|
|
4464
|
-
} else {
|
|
4465
|
-
actionFailed(res);
|
|
4466
|
-
}
|
|
4467
|
-
} else {
|
|
4468
|
-
emit('actionCanceled');
|
|
4469
|
-
emit('canceled');
|
|
4470
|
-
processing.value = false;
|
|
4471
|
-
}
|
|
4472
|
-
}).catch(ex => {
|
|
4473
|
-
actionFailed(ex);
|
|
4474
|
-
});
|
|
4475
|
-
}
|
|
4476
|
-
|
|
4477
|
-
return (_ctx, _cache) => {
|
|
4478
|
-
return (openBlock(), createElementBlock("a", {
|
|
4479
|
-
class: normalizeClass(processing.value ? 'disabled':''),
|
|
4480
|
-
onClick: runAction
|
|
4481
|
-
}, [
|
|
4482
|
-
(processing.value)
|
|
4483
|
-
? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
4484
|
-
_hoisted_1$d,
|
|
4485
|
-
createElementVNode("span", null, toDisplayString(__props.loadingMessage), 1 /* TEXT */)
|
|
4486
|
-
], 64 /* STABLE_FRAGMENT */))
|
|
4487
|
-
: createCommentVNode("v-if", true),
|
|
4488
|
-
(!processing.value)
|
|
4489
|
-
? renderSlot(_ctx.$slots, "default", { key: 1 })
|
|
4490
|
-
: createCommentVNode("v-if", true)
|
|
4491
|
-
], 2 /* CLASS */))
|
|
4492
|
-
}
|
|
4493
|
-
}
|
|
4494
|
-
|
|
4495
|
-
};
|
|
4496
|
-
|
|
4497
|
-
script$g.__file = "src/lib/components/ShConfirmAction.vue";
|
|
4498
|
-
|
|
4499
|
-
const _hoisted_1$c = /*#__PURE__*/createElementVNode("span", {
|
|
4500
|
-
class: "spinner-border spinner-border-sm me-1",
|
|
4501
|
-
role: "status",
|
|
4502
|
-
"aria-hidden": "true"
|
|
4503
|
-
}, null, -1 /* HOISTED */);
|
|
4504
|
-
|
|
4505
|
-
var script$f = {
|
|
4506
|
-
__name: 'ShSilentAction',
|
|
4507
|
-
props: {
|
|
4508
|
-
data: Object,
|
|
4509
|
-
loadingMessage: {
|
|
4510
|
-
type: String,
|
|
4511
|
-
default: 'Processing'
|
|
4512
|
-
},
|
|
4513
|
-
successMessage: {
|
|
4514
|
-
type: String,
|
|
4515
|
-
default: 'Action Successful'
|
|
4516
|
-
},
|
|
4517
|
-
failMessage: {
|
|
4518
|
-
type: String,
|
|
4519
|
-
default: 'Action failed'
|
|
4520
|
-
},
|
|
4521
|
-
method: {
|
|
4522
|
-
type: String,
|
|
4523
|
-
default: 'POST'
|
|
4524
|
-
},
|
|
4525
|
-
url: {
|
|
4526
|
-
type: String,
|
|
4527
|
-
required: true
|
|
4528
|
-
},
|
|
4529
|
-
disableSuccessMessage: {
|
|
4530
|
-
type: Boolean
|
|
4531
|
-
}
|
|
4532
|
-
},
|
|
4533
|
-
emits: ['actionSuccessful','actionFailed','success'],
|
|
4534
|
-
setup(__props, { emit: __emit }) {
|
|
4535
|
-
|
|
4536
|
-
const props = __props;
|
|
4537
|
-
const processing = ref(false);
|
|
4538
|
-
const emit = __emit;
|
|
4539
|
-
const actionSuccessful = (res)=>{
|
|
4540
|
-
processing.value = false;
|
|
4541
|
-
res.actionType = 'silentAction';
|
|
4542
|
-
console.log(res.data,props.successMessage);
|
|
4543
|
-
emit('actionSuccessful',res);
|
|
4544
|
-
emit('success',res);
|
|
4545
|
-
if(!props.disableSuccessMessage) {
|
|
4546
|
-
shRepo.showToast(res.data.message ?? props.successMessage);
|
|
4547
|
-
}
|
|
4548
|
-
};
|
|
4549
|
-
|
|
4550
|
-
const actionFailed = reason =>{
|
|
4551
|
-
processing.value = false;
|
|
4552
|
-
console.log(reason);
|
|
4553
|
-
shRepo.showToast('Failed');
|
|
4554
|
-
reason.actionType = 'silentAction';
|
|
4555
|
-
emit('actionFailed', reason);
|
|
4556
|
-
shRepo.showToast(reason.message ?? props.failMessage,'error');
|
|
4557
|
-
};
|
|
4558
|
-
function runAction(){
|
|
4559
|
-
processing.value = true;
|
|
4560
|
-
if(props.method === 'POST'){
|
|
4561
|
-
shApis.doPost(props.url,props.data).then(res=>{
|
|
4562
|
-
actionSuccessful(res);
|
|
4563
|
-
}).catch(reason=>{
|
|
4564
|
-
actionFailed(reason);
|
|
4565
|
-
});
|
|
4566
|
-
}
|
|
4567
|
-
if(props.method === 'GET'){
|
|
4568
|
-
shApis.doGet(props.url,props.data).then(res=>{
|
|
4569
|
-
actionSuccessful(res);
|
|
4570
|
-
}).catch(reason=>{
|
|
4571
|
-
actionFailed(reason);
|
|
4572
|
-
});
|
|
4573
|
-
}
|
|
4574
|
-
}
|
|
4575
|
-
|
|
4576
|
-
return (_ctx, _cache) => {
|
|
4577
|
-
return (openBlock(), createElementBlock("a", {
|
|
4578
|
-
class: normalizeClass(processing.value ? 'disabled':''),
|
|
4579
|
-
onClick: runAction
|
|
4580
|
-
}, [
|
|
4581
|
-
(processing.value)
|
|
4582
|
-
? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
4583
|
-
_hoisted_1$c,
|
|
4584
|
-
createElementVNode("span", null, toDisplayString(__props.loadingMessage), 1 /* TEXT */)
|
|
4585
|
-
], 64 /* STABLE_FRAGMENT */))
|
|
4586
|
-
: createCommentVNode("v-if", true),
|
|
4587
|
-
(!processing.value)
|
|
4588
|
-
? renderSlot(_ctx.$slots, "default", { key: 1 })
|
|
4589
|
-
: createCommentVNode("v-if", true)
|
|
4590
|
-
], 2 /* CLASS */))
|
|
4591
|
-
}
|
|
4592
|
-
}
|
|
4593
|
-
|
|
4594
|
-
};
|
|
4595
|
-
|
|
4596
|
-
script$f.__file = "src/lib/components/ShSilentAction.vue";
|
|
4804
|
+
script$f.render = render$1;
|
|
4805
|
+
script$f.__file = "src/lib/components/list_templates/Pagination.vue";
|
|
4597
4806
|
|
|
4598
4807
|
const _hoisted_1$b = { class: "sh-range" };
|
|
4599
4808
|
const _hoisted_2$8 = { class: "dropdown" };
|
|
@@ -4902,14 +5111,12 @@ const _hoisted_46 = {
|
|
|
4902
5111
|
key: 0,
|
|
4903
5112
|
style: {"white-space":"nowrap"}
|
|
4904
5113
|
};
|
|
4905
|
-
const _hoisted_47 =
|
|
4906
|
-
const _hoisted_48 =
|
|
4907
|
-
const _hoisted_49 = { key: 5 };
|
|
4908
|
-
const _hoisted_50 = {
|
|
5114
|
+
const _hoisted_47 = { key: 5 };
|
|
5115
|
+
const _hoisted_48 = {
|
|
4909
5116
|
key: 0,
|
|
4910
5117
|
class: "text-center"
|
|
4911
5118
|
};
|
|
4912
|
-
const
|
|
5119
|
+
const _hoisted_49 = /*#__PURE__*/createElementVNode("div", { class: "text-center" }, [
|
|
4913
5120
|
/*#__PURE__*/createElementVNode("div", {
|
|
4914
5121
|
class: "spinner-border",
|
|
4915
5122
|
role: "status"
|
|
@@ -4917,45 +5124,43 @@ const _hoisted_51 = /*#__PURE__*/createElementVNode("div", { class: "text-center
|
|
|
4917
5124
|
/*#__PURE__*/createElementVNode("span", { class: "visually-hidden" }, "Loading...")
|
|
4918
5125
|
])
|
|
4919
5126
|
], -1 /* HOISTED */);
|
|
4920
|
-
const
|
|
4921
|
-
|
|
5127
|
+
const _hoisted_50 = [
|
|
5128
|
+
_hoisted_49
|
|
4922
5129
|
];
|
|
4923
|
-
const
|
|
4924
|
-
const
|
|
5130
|
+
const _hoisted_51 = { key: 1 };
|
|
5131
|
+
const _hoisted_52 = {
|
|
4925
5132
|
key: 2,
|
|
4926
5133
|
class: "mobile-list-items"
|
|
4927
5134
|
};
|
|
4928
|
-
const
|
|
4929
|
-
const
|
|
5135
|
+
const _hoisted_53 = ["onClick"];
|
|
5136
|
+
const _hoisted_54 = {
|
|
4930
5137
|
key: 0,
|
|
4931
5138
|
class: "mb-1 font-weight-bold text-capitalize profile-form-title"
|
|
4932
5139
|
};
|
|
4933
|
-
const
|
|
5140
|
+
const _hoisted_55 = {
|
|
4934
5141
|
key: 1,
|
|
4935
5142
|
class: "mb-1 font-weight-bold text-capitalize profile-form-title"
|
|
4936
5143
|
};
|
|
4937
|
-
const
|
|
5144
|
+
const _hoisted_56 = {
|
|
4938
5145
|
key: 2,
|
|
4939
5146
|
class: "mb-1 font-weight-bold text-capitalize profile-form-title"
|
|
4940
5147
|
};
|
|
4941
|
-
const
|
|
5148
|
+
const _hoisted_57 = {
|
|
4942
5149
|
key: 3,
|
|
4943
5150
|
class: "mb-1 font-weight-bold text-capitalize profile-form-title"
|
|
4944
5151
|
};
|
|
4945
|
-
const
|
|
4946
|
-
const
|
|
5152
|
+
const _hoisted_58 = { key: 1 };
|
|
5153
|
+
const _hoisted_59 = {
|
|
4947
5154
|
key: 2,
|
|
4948
5155
|
class: "text-primary fw-bold"
|
|
4949
5156
|
};
|
|
4950
|
-
const
|
|
5157
|
+
const _hoisted_60 = { key: 3 };
|
|
5158
|
+
const _hoisted_61 = ["innerHTML"];
|
|
5159
|
+
const _hoisted_62 = ["innerHTML"];
|
|
4951
5160
|
const _hoisted_63 = ["innerHTML"];
|
|
4952
5161
|
const _hoisted_64 = ["innerHTML"];
|
|
4953
|
-
const _hoisted_65 =
|
|
4954
|
-
const _hoisted_66 =
|
|
4955
|
-
const _hoisted_67 = /*#__PURE__*/createElementVNode("hr", { class: "my-2" }, null, -1 /* HOISTED */);
|
|
4956
|
-
const _hoisted_68 = { key: 0 };
|
|
4957
|
-
const _hoisted_69 = ["href"];
|
|
4958
|
-
const _hoisted_70 = ["title", "onClick"];
|
|
5162
|
+
const _hoisted_65 = /*#__PURE__*/createElementVNode("hr", { class: "my-2" }, null, -1 /* HOISTED */);
|
|
5163
|
+
const _hoisted_66 = { key: 0 };
|
|
4959
5164
|
|
|
4960
5165
|
const __default__ = {
|
|
4961
5166
|
name: 'sh-table',
|
|
@@ -5249,10 +5454,10 @@ const __default__ = {
|
|
|
5249
5454
|
},
|
|
5250
5455
|
components: {
|
|
5251
5456
|
ShRange: script$e,
|
|
5252
|
-
ShSilentAction: script$
|
|
5253
|
-
ShConfirmAction: script$
|
|
5254
|
-
ShCanvas: script$
|
|
5255
|
-
pagination: script$
|
|
5457
|
+
ShSilentAction: script$i,
|
|
5458
|
+
ShConfirmAction: script$j,
|
|
5459
|
+
ShCanvas: script$l,
|
|
5460
|
+
pagination: script$f
|
|
5256
5461
|
},
|
|
5257
5462
|
computed: {
|
|
5258
5463
|
windowWidth: function (){
|
|
@@ -5274,9 +5479,9 @@ const __default__ = {
|
|
|
5274
5479
|
var script$d = /*#__PURE__*/Object.assign(__default__, {
|
|
5275
5480
|
setup(__props) {
|
|
5276
5481
|
|
|
5277
|
-
const noRecordsComponent = inject('noRecordsComponent', script$
|
|
5482
|
+
const noRecordsComponent = inject('noRecordsComponent', script$k);
|
|
5278
5483
|
|
|
5279
|
-
|
|
5484
|
+
storeToRefs(useUserStore());
|
|
5280
5485
|
|
|
5281
5486
|
|
|
5282
5487
|
return (_ctx, _cache) => {
|
|
@@ -5500,111 +5705,10 @@ return (_ctx, _cache) => {
|
|
|
5500
5705
|
}), 128 /* KEYED_FRAGMENT */)),
|
|
5501
5706
|
(__props.actions)
|
|
5502
5707
|
? (openBlock(), createElementBlock("td", _hoisted_46, [
|
|
5503
|
-
(
|
|
5504
|
-
|
|
5505
|
-
|
|
5506
|
-
|
|
5507
|
-
(!act.permission || unref(user).isAllowedTo(act.permission))
|
|
5508
|
-
? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
5509
|
-
(!act.validator || act.validator(record))
|
|
5510
|
-
? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
5511
|
-
(['confirmAction','confirmaction','confirm-action','confirm'].includes(act.type))
|
|
5512
|
-
? (openBlock(), createBlock(script$g, {
|
|
5513
|
-
key: 0,
|
|
5514
|
-
onActionSuccessful: $event => (_ctx.doEmitAction('actionSuccessful',record)),
|
|
5515
|
-
onActionFailed: $event => (_ctx.doEmitAction('actionFailed',record)),
|
|
5516
|
-
onActionCanceled: $event => (_ctx.doEmitAction('actionCanceled',record)),
|
|
5517
|
-
"loading-message": act.label,
|
|
5518
|
-
class: normalizeClass(act.class),
|
|
5519
|
-
url: _ctx.replaceActionUrl(act.url,record)
|
|
5520
|
-
}, {
|
|
5521
|
-
default: withCtx(() => [
|
|
5522
|
-
(act.icon)
|
|
5523
|
-
? (openBlock(), createElementBlock("span", {
|
|
5524
|
-
key: 0,
|
|
5525
|
-
class: normalizeClass(act.icon)
|
|
5526
|
-
}, null, 2 /* CLASS */))
|
|
5527
|
-
: createCommentVNode("v-if", true),
|
|
5528
|
-
createTextVNode(" " + toDisplayString(act.label), 1 /* TEXT */)
|
|
5529
|
-
]),
|
|
5530
|
-
_: 2 /* DYNAMIC */
|
|
5531
|
-
}, 1032 /* PROPS, DYNAMIC_SLOTS */, ["onActionSuccessful", "onActionFailed", "onActionCanceled", "loading-message", "class", "url"]))
|
|
5532
|
-
: (['silentAction','silentaction','silent-action','silent'].includes(act.type))
|
|
5533
|
-
? (openBlock(), createBlock(script$f, {
|
|
5534
|
-
key: 1,
|
|
5535
|
-
onActionSuccessful: $event => (_ctx.doEmitAction('actionSuccessful',record)),
|
|
5536
|
-
onActionFailed: $event => (_ctx.doEmitAction('actionFailed',record)),
|
|
5537
|
-
onActionCanceled: $event => (_ctx.doEmitAction('actionCanceled',record)),
|
|
5538
|
-
"loading-message": act.label,
|
|
5539
|
-
class: normalizeClass(act.class),
|
|
5540
|
-
url: _ctx.replaceActionUrl(act.url,record)
|
|
5541
|
-
}, {
|
|
5542
|
-
default: withCtx(() => [
|
|
5543
|
-
(act.icon)
|
|
5544
|
-
? (openBlock(), createElementBlock("span", {
|
|
5545
|
-
key: 0,
|
|
5546
|
-
class: normalizeClass(act.icon)
|
|
5547
|
-
}, null, 2 /* CLASS */))
|
|
5548
|
-
: createCommentVNode("v-if", true),
|
|
5549
|
-
createTextVNode(" " + toDisplayString(act.label), 1 /* TEXT */)
|
|
5550
|
-
]),
|
|
5551
|
-
_: 2 /* DYNAMIC */
|
|
5552
|
-
}, 1032 /* PROPS, DYNAMIC_SLOTS */, ["onActionSuccessful", "onActionFailed", "onActionCanceled", "loading-message", "class", "url"]))
|
|
5553
|
-
: (act.canvasId || act.type === 'offcanvas')
|
|
5554
|
-
? (openBlock(), createElementBlock("a", {
|
|
5555
|
-
key: 2,
|
|
5556
|
-
href: '#' + act.canvasId,
|
|
5557
|
-
"data-bs-toggle": "offcanvas",
|
|
5558
|
-
class: normalizeClass(act.class)
|
|
5559
|
-
}, [
|
|
5560
|
-
(act.icon)
|
|
5561
|
-
? (openBlock(), createElementBlock("span", {
|
|
5562
|
-
key: 0,
|
|
5563
|
-
class: normalizeClass(act.icon)
|
|
5564
|
-
}, null, 2 /* CLASS */))
|
|
5565
|
-
: createCommentVNode("v-if", true),
|
|
5566
|
-
createTextVNode(" " + toDisplayString(act.label), 1 /* TEXT */)
|
|
5567
|
-
], 10 /* CLASS, PROPS */, _hoisted_47))
|
|
5568
|
-
: (act.emits)
|
|
5569
|
-
? (openBlock(), createElementBlock("button", {
|
|
5570
|
-
key: 3,
|
|
5571
|
-
title: act.title,
|
|
5572
|
-
class: normalizeClass(act.class ? act.class:'btn btn-default'),
|
|
5573
|
-
onClick: $event => (_ctx.doEmitAction(act.emits,record))
|
|
5574
|
-
}, [
|
|
5575
|
-
(act.icon)
|
|
5576
|
-
? (openBlock(), createElementBlock("span", {
|
|
5577
|
-
key: 0,
|
|
5578
|
-
class: normalizeClass(act.icon)
|
|
5579
|
-
}, null, 2 /* CLASS */))
|
|
5580
|
-
: createCommentVNode("v-if", true),
|
|
5581
|
-
createTextVNode(" " + toDisplayString(act.label), 1 /* TEXT */)
|
|
5582
|
-
], 10 /* CLASS, PROPS */, _hoisted_48))
|
|
5583
|
-
: (!act.emits)
|
|
5584
|
-
? (openBlock(), createBlock(_component_router_link, {
|
|
5585
|
-
key: 4,
|
|
5586
|
-
title: act.title,
|
|
5587
|
-
to: _ctx.replaceActionUrl(act.path,record),
|
|
5588
|
-
class: normalizeClass(act.class)
|
|
5589
|
-
}, {
|
|
5590
|
-
default: withCtx(() => [
|
|
5591
|
-
(act.icon)
|
|
5592
|
-
? (openBlock(), createElementBlock("span", {
|
|
5593
|
-
key: 0,
|
|
5594
|
-
class: normalizeClass(act.icon)
|
|
5595
|
-
}, null, 2 /* CLASS */))
|
|
5596
|
-
: createCommentVNode("v-if", true),
|
|
5597
|
-
createTextVNode(" " + toDisplayString(act.label), 1 /* TEXT */)
|
|
5598
|
-
]),
|
|
5599
|
-
_: 2 /* DYNAMIC */
|
|
5600
|
-
}, 1032 /* PROPS, DYNAMIC_SLOTS */, ["title", "to", "class"]))
|
|
5601
|
-
: createCommentVNode("v-if", true)
|
|
5602
|
-
], 64 /* STABLE_FRAGMENT */))
|
|
5603
|
-
: createCommentVNode("v-if", true)
|
|
5604
|
-
], 64 /* STABLE_FRAGMENT */))
|
|
5605
|
-
: createCommentVNode("v-if", true)
|
|
5606
|
-
], 64 /* STABLE_FRAGMENT */))
|
|
5607
|
-
}), 128 /* KEYED_FRAGMENT */))
|
|
5708
|
+
createVNode(script$g, {
|
|
5709
|
+
actions: __props.actions,
|
|
5710
|
+
record: record
|
|
5711
|
+
}, null, 8 /* PROPS */, ["actions", "record"])
|
|
5608
5712
|
]))
|
|
5609
5713
|
: createCommentVNode("v-if", true)
|
|
5610
5714
|
], 10 /* CLASS, PROPS */, _hoisted_38))
|
|
@@ -5612,15 +5716,15 @@ return (_ctx, _cache) => {
|
|
|
5612
5716
|
: createCommentVNode("v-if", true)
|
|
5613
5717
|
])
|
|
5614
5718
|
], 2 /* CLASS */))
|
|
5615
|
-
: (openBlock(), createElementBlock("div",
|
|
5719
|
+
: (openBlock(), createElementBlock("div", _hoisted_47, [
|
|
5616
5720
|
(_ctx.loading === 'loading')
|
|
5617
|
-
? (openBlock(), createElementBlock("div",
|
|
5721
|
+
? (openBlock(), createElementBlock("div", _hoisted_48, [..._hoisted_50]))
|
|
5618
5722
|
: (_ctx.loading === 'error')
|
|
5619
|
-
? (openBlock(), createElementBlock("div",
|
|
5723
|
+
? (openBlock(), createElementBlock("div", _hoisted_51, [
|
|
5620
5724
|
createElementVNode("span", null, toDisplayString(_ctx.loading_error), 1 /* TEXT */)
|
|
5621
5725
|
]))
|
|
5622
5726
|
: (_ctx.loading === 'done')
|
|
5623
|
-
? (openBlock(), createElementBlock("div",
|
|
5727
|
+
? (openBlock(), createElementBlock("div", _hoisted_52, [
|
|
5624
5728
|
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.records, (record, index) => {
|
|
5625
5729
|
return (openBlock(), createElementBlock("div", {
|
|
5626
5730
|
key: record.id,
|
|
@@ -5632,12 +5736,12 @@ return (_ctx, _cache) => {
|
|
|
5632
5736
|
key: key[0]
|
|
5633
5737
|
}, [
|
|
5634
5738
|
(typeof key === 'string' )
|
|
5635
|
-
? (openBlock(), createElementBlock("p",
|
|
5739
|
+
? (openBlock(), createElementBlock("p", _hoisted_54, toDisplayString(key.replace(/_/g, ' ')), 1 /* TEXT */))
|
|
5636
5740
|
: (typeof key === 'function')
|
|
5637
|
-
? (openBlock(), createElementBlock("p",
|
|
5741
|
+
? (openBlock(), createElementBlock("p", _hoisted_55, toDisplayString(key(null).replace(/_/g, ' ')), 1 /* TEXT */))
|
|
5638
5742
|
: (typeof key === 'object')
|
|
5639
|
-
? (openBlock(), createElementBlock("p",
|
|
5640
|
-
: (openBlock(), createElementBlock("p",
|
|
5743
|
+
? (openBlock(), createElementBlock("p", _hoisted_56, toDisplayString(key.label ?? key.key.replace(/_/g, ' ')), 1 /* TEXT */))
|
|
5744
|
+
: (openBlock(), createElementBlock("p", _hoisted_57, toDisplayString(key[1].replace(/_/g, ' ')), 1 /* TEXT */)),
|
|
5641
5745
|
createElementVNode("span", null, [
|
|
5642
5746
|
(typeof key === 'string' && __props.links && __props.links[key])
|
|
5643
5747
|
? (openBlock(), createBlock(_component_router_link, {
|
|
@@ -5647,16 +5751,16 @@ return (_ctx, _cache) => {
|
|
|
5647
5751
|
innerHTML: record[key]
|
|
5648
5752
|
}, null, 8 /* PROPS */, ["to", "class", "innerHTML"]))
|
|
5649
5753
|
: (_ctx.getFieldType(key) === 'numeric')
|
|
5650
|
-
? (openBlock(), createElementBlock("span",
|
|
5754
|
+
? (openBlock(), createElementBlock("span", _hoisted_58, toDisplayString(Intl.NumberFormat().format(record[key])), 1 /* TEXT */))
|
|
5651
5755
|
: (_ctx.getFieldType(key) === 'money')
|
|
5652
|
-
? (openBlock(), createElementBlock("span",
|
|
5756
|
+
? (openBlock(), createElementBlock("span", _hoisted_59, "KES " + toDisplayString(Intl.NumberFormat().format(record[key])), 1 /* TEXT */))
|
|
5653
5757
|
: (_ctx.getFieldType(key) === 'date')
|
|
5654
|
-
? (openBlock(), createElementBlock("span",
|
|
5758
|
+
? (openBlock(), createElementBlock("span", _hoisted_60, toDisplayString(_ctx.formatDate(record[key])), 1 /* TEXT */))
|
|
5655
5759
|
: (typeof key === 'string')
|
|
5656
5760
|
? (openBlock(), createElementBlock("span", {
|
|
5657
5761
|
key: 4,
|
|
5658
5762
|
innerHTML: record[key]
|
|
5659
|
-
}, null, 8 /* PROPS */,
|
|
5763
|
+
}, null, 8 /* PROPS */, _hoisted_61))
|
|
5660
5764
|
: (typeof key === 'object' && key.component)
|
|
5661
5765
|
? (openBlock(), createBlock(resolveDynamicComponent(key.component), {
|
|
5662
5766
|
key: 5,
|
|
@@ -5666,94 +5770,35 @@ return (_ctx, _cache) => {
|
|
|
5666
5770
|
? (openBlock(), createElementBlock("span", {
|
|
5667
5771
|
key: 6,
|
|
5668
5772
|
innerHTML: record[key.key ?? key.field]
|
|
5669
|
-
}, null, 8 /* PROPS */,
|
|
5773
|
+
}, null, 8 /* PROPS */, _hoisted_62))
|
|
5670
5774
|
: (typeof key === 'function')
|
|
5671
5775
|
? (openBlock(), createElementBlock("span", {
|
|
5672
5776
|
key: 7,
|
|
5673
5777
|
innerHTML: key(record, index )
|
|
5674
|
-
}, null, 8 /* PROPS */,
|
|
5778
|
+
}, null, 8 /* PROPS */, _hoisted_63))
|
|
5675
5779
|
: (openBlock(), createElementBlock("span", {
|
|
5676
5780
|
key: 8,
|
|
5677
5781
|
innerHTML: record[key[0]]
|
|
5678
|
-
}, null, 8 /* PROPS */,
|
|
5782
|
+
}, null, 8 /* PROPS */, _hoisted_64))
|
|
5679
5783
|
]),
|
|
5680
|
-
|
|
5784
|
+
_hoisted_65
|
|
5681
5785
|
], 64 /* STABLE_FRAGMENT */))
|
|
5682
5786
|
}), 128 /* KEYED_FRAGMENT */)),
|
|
5683
5787
|
(__props.actions)
|
|
5684
|
-
? (openBlock(), createElementBlock("div",
|
|
5685
|
-
(
|
|
5686
|
-
|
|
5687
|
-
|
|
5688
|
-
|
|
5689
|
-
(!act.permission || unref(user).isAllowedTo(act.permission))
|
|
5690
|
-
? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
5691
|
-
(!act.validator || act.validator(record))
|
|
5692
|
-
? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
5693
|
-
(act.canvasId)
|
|
5694
|
-
? (openBlock(), createElementBlock("a", {
|
|
5695
|
-
key: 0,
|
|
5696
|
-
href: '#' + act.canvasId,
|
|
5697
|
-
"data-bs-toggle": "offcanvas",
|
|
5698
|
-
class: normalizeClass(act.class)
|
|
5699
|
-
}, [
|
|
5700
|
-
(act.icon)
|
|
5701
|
-
? (openBlock(), createElementBlock("span", {
|
|
5702
|
-
key: 0,
|
|
5703
|
-
class: normalizeClass(act.icon)
|
|
5704
|
-
}, null, 2 /* CLASS */))
|
|
5705
|
-
: createCommentVNode("v-if", true),
|
|
5706
|
-
createTextVNode(" " + toDisplayString(act.label), 1 /* TEXT */)
|
|
5707
|
-
], 10 /* CLASS, PROPS */, _hoisted_69))
|
|
5708
|
-
: (act.emits)
|
|
5709
|
-
? (openBlock(), createElementBlock("button", {
|
|
5710
|
-
key: 1,
|
|
5711
|
-
title: act.title,
|
|
5712
|
-
class: normalizeClass(act.class ? act.class:'btn btn-default'),
|
|
5713
|
-
onClick: $event => (_ctx.doEmitAction(act.emits,record))
|
|
5714
|
-
}, [
|
|
5715
|
-
(act.icon)
|
|
5716
|
-
? (openBlock(), createElementBlock("span", {
|
|
5717
|
-
key: 0,
|
|
5718
|
-
class: normalizeClass(act.icon)
|
|
5719
|
-
}, null, 2 /* CLASS */))
|
|
5720
|
-
: createCommentVNode("v-if", true),
|
|
5721
|
-
createTextVNode(" " + toDisplayString(act.label), 1 /* TEXT */)
|
|
5722
|
-
], 10 /* CLASS, PROPS */, _hoisted_70))
|
|
5723
|
-
: (!act.emits)
|
|
5724
|
-
? (openBlock(), createBlock(_component_router_link, {
|
|
5725
|
-
key: 2,
|
|
5726
|
-
title: act.title,
|
|
5727
|
-
to: _ctx.replaceActionUrl(act.path,record),
|
|
5728
|
-
class: normalizeClass(act.class)
|
|
5729
|
-
}, {
|
|
5730
|
-
default: withCtx(() => [
|
|
5731
|
-
(act.icon)
|
|
5732
|
-
? (openBlock(), createElementBlock("span", {
|
|
5733
|
-
key: 0,
|
|
5734
|
-
class: normalizeClass(act.icon)
|
|
5735
|
-
}, null, 2 /* CLASS */))
|
|
5736
|
-
: createCommentVNode("v-if", true),
|
|
5737
|
-
createTextVNode(" " + toDisplayString(act.label), 1 /* TEXT */)
|
|
5738
|
-
]),
|
|
5739
|
-
_: 2 /* DYNAMIC */
|
|
5740
|
-
}, 1032 /* PROPS, DYNAMIC_SLOTS */, ["title", "to", "class"]))
|
|
5741
|
-
: createCommentVNode("v-if", true)
|
|
5742
|
-
], 64 /* STABLE_FRAGMENT */))
|
|
5743
|
-
: createCommentVNode("v-if", true)
|
|
5744
|
-
], 64 /* STABLE_FRAGMENT */))
|
|
5745
|
-
: createCommentVNode("v-if", true)
|
|
5746
|
-
], 64 /* STABLE_FRAGMENT */))
|
|
5747
|
-
}), 128 /* KEYED_FRAGMENT */))
|
|
5788
|
+
? (openBlock(), createElementBlock("div", _hoisted_66, [
|
|
5789
|
+
createVNode(script$g, {
|
|
5790
|
+
actions: __props.actions,
|
|
5791
|
+
record: record
|
|
5792
|
+
}, null, 8 /* PROPS */, ["actions", "record"])
|
|
5748
5793
|
]))
|
|
5749
5794
|
: createCommentVNode("v-if", true)
|
|
5750
|
-
], 8 /* PROPS */,
|
|
5795
|
+
], 8 /* PROPS */, _hoisted_53))
|
|
5751
5796
|
}), 128 /* KEYED_FRAGMENT */))
|
|
5752
5797
|
]))
|
|
5753
5798
|
: createCommentVNode("v-if", true)
|
|
5754
5799
|
])),
|
|
5755
5800
|
(_ctx.pagination_data)
|
|
5756
|
-
? (openBlock(), createBlock(script$
|
|
5801
|
+
? (openBlock(), createBlock(script$f, {
|
|
5757
5802
|
key: 6,
|
|
5758
5803
|
onLoadMoreRecords: _ctx.loadMoreRecords,
|
|
5759
5804
|
"hide-load-more": __props.hideLoadMore,
|
|
@@ -5770,7 +5815,7 @@ return (_ctx, _cache) => {
|
|
|
5770
5815
|
key: action.label
|
|
5771
5816
|
}, [
|
|
5772
5817
|
(action.canvasId)
|
|
5773
|
-
? (openBlock(), createBlock(script$
|
|
5818
|
+
? (openBlock(), createBlock(script$l, {
|
|
5774
5819
|
key: 0,
|
|
5775
5820
|
onOffcanvasClosed: _ctx.canvasClosed,
|
|
5776
5821
|
position: action.canvasPosition,
|
|
@@ -5782,7 +5827,8 @@ return (_ctx, _cache) => {
|
|
|
5782
5827
|
(_ctx.selectedRecord)
|
|
5783
5828
|
? (openBlock(), createBlock(resolveDynamicComponent(action.canvasComponent), mergeProps({
|
|
5784
5829
|
key: 0,
|
|
5785
|
-
onRecordUpdated: _ctx.reloadData
|
|
5830
|
+
onRecordUpdated: _ctx.reloadData,
|
|
5831
|
+
ref_for: true
|
|
5786
5832
|
}, _ctx.cleanCanvasProps(action), { record: _ctx.selectedRecord }), null, 16 /* FULL_PROPS */, ["onRecordUpdated", "record"]))
|
|
5787
5833
|
: createCommentVNode("v-if", true)
|
|
5788
5834
|
]),
|
|
@@ -6270,7 +6316,7 @@ return (_ctx, _cache) => {
|
|
|
6270
6316
|
(permissionsChanged.value)
|
|
6271
6317
|
? (openBlock(), createElementBlock("div", _hoisted_16, [
|
|
6272
6318
|
createElementVNode("div", _hoisted_17, [
|
|
6273
|
-
createVNode(script$
|
|
6319
|
+
createVNode(script$i, {
|
|
6274
6320
|
onSuccess: permissionsUpdated,
|
|
6275
6321
|
url: `sh-departments/department/permissions/${unref(departmentId)}/${selectedModule.value}`,
|
|
6276
6322
|
data: {permissions: selectedPermissions.value},
|
|
@@ -6414,7 +6460,7 @@ return (_ctx, _cache) => {
|
|
|
6414
6460
|
class: "d-none"
|
|
6415
6461
|
}, "Open Modal", 8 /* PROPS */, _hoisted_1$5),
|
|
6416
6462
|
(popUp.value === 'modal')
|
|
6417
|
-
? (openBlock(), createBlock(script$
|
|
6463
|
+
? (openBlock(), createBlock(script$p, {
|
|
6418
6464
|
key: 0,
|
|
6419
6465
|
"modal-title": title.value,
|
|
6420
6466
|
"modal-id": unref(modalId),
|
|
@@ -6429,7 +6475,7 @@ return (_ctx, _cache) => {
|
|
|
6429
6475
|
}, 8 /* PROPS */, ["modal-title", "modal-id", "modal-size"]))
|
|
6430
6476
|
: createCommentVNode("v-if", true),
|
|
6431
6477
|
(['offcanvas','canvas','offCanvas'].includes(popUp.value))
|
|
6432
|
-
? (openBlock(), createBlock(script$
|
|
6478
|
+
? (openBlock(), createBlock(script$l, {
|
|
6433
6479
|
key: 1,
|
|
6434
6480
|
"canvas-id": unref(canvasId),
|
|
6435
6481
|
"canvas-title": title.value,
|
|
@@ -6460,7 +6506,7 @@ const fields = route.query.fields.split(',');
|
|
|
6460
6506
|
const action = route.query.action;
|
|
6461
6507
|
|
|
6462
6508
|
return (_ctx, _cache) => {
|
|
6463
|
-
return (openBlock(), createBlock(script$
|
|
6509
|
+
return (openBlock(), createBlock(script$q, {
|
|
6464
6510
|
fields: unref(fields),
|
|
6465
6511
|
action: unref(action)
|
|
6466
6512
|
}, null, 8 /* PROPS */, ["fields", "action"]))
|
|
@@ -6563,7 +6609,7 @@ const goBack = () => {
|
|
|
6563
6609
|
return (_ctx, _cache) => {
|
|
6564
6610
|
return (openBlock(), createElementBlock(Fragment, null, [
|
|
6565
6611
|
(popUp.value === 'modal')
|
|
6566
|
-
? (openBlock(), createBlock(script$
|
|
6612
|
+
? (openBlock(), createBlock(script$p, {
|
|
6567
6613
|
key: 0,
|
|
6568
6614
|
"modal-title": title.value,
|
|
6569
6615
|
"data-bs-backdrop": "static",
|
|
@@ -6578,7 +6624,7 @@ return (_ctx, _cache) => {
|
|
|
6578
6624
|
}, 8 /* PROPS */, ["modal-title", "modal-id", "modal-size"]))
|
|
6579
6625
|
: createCommentVNode("v-if", true),
|
|
6580
6626
|
(['offcanvas','canvas','offCanvas'].includes(popUp.value))
|
|
6581
|
-
? (openBlock(), createBlock(script$
|
|
6627
|
+
? (openBlock(), createBlock(script$l, {
|
|
6582
6628
|
"canvas-title": title.value,
|
|
6583
6629
|
key: size.value + position.value,
|
|
6584
6630
|
"canvas-id": unref(canvasId),
|
|
@@ -6685,7 +6731,7 @@ return (_ctx, _cache) => {
|
|
|
6685
6731
|
]),
|
|
6686
6732
|
createElementVNode("div", _hoisted_6$2, [
|
|
6687
6733
|
(unref(user))
|
|
6688
|
-
? (openBlock(), createBlock(script$
|
|
6734
|
+
? (openBlock(), createBlock(script$n, {
|
|
6689
6735
|
key: 0,
|
|
6690
6736
|
"current-data": unref(user),
|
|
6691
6737
|
"modal-title": "Edit Details",
|
|
@@ -6702,7 +6748,7 @@ return (_ctx, _cache) => {
|
|
|
6702
6748
|
}, 8 /* PROPS */, ["current-data"]))
|
|
6703
6749
|
: createCommentVNode("v-if", true),
|
|
6704
6750
|
(unref(user))
|
|
6705
|
-
? (openBlock(), createBlock(script$
|
|
6751
|
+
? (openBlock(), createBlock(script$n, {
|
|
6706
6752
|
key: 1,
|
|
6707
6753
|
"modal-title": "Update Password",
|
|
6708
6754
|
class: "btn btn-info ms-2 my-2",
|
|
@@ -6739,7 +6785,7 @@ return (_ctx, _cache) => {
|
|
|
6739
6785
|
createElementVNode("div", _hoisted_9$1, [
|
|
6740
6786
|
createVNode(script$4, null, {
|
|
6741
6787
|
default: withCtx(() => [
|
|
6742
|
-
createVNode(script$
|
|
6788
|
+
createVNode(script$n, {
|
|
6743
6789
|
"modal-title": "Edit Profile Image",
|
|
6744
6790
|
class: "btn btn-info btn-sm float-end my-2",
|
|
6745
6791
|
action: 'auth/profile-picture',
|
|
@@ -6841,12 +6887,12 @@ return (_ctx, _cache) => {
|
|
|
6841
6887
|
]
|
|
6842
6888
|
}
|
|
6843
6889
|
}, null, 8 /* PROPS */, ["reload", "actions"]),
|
|
6844
|
-
createVNode(script$
|
|
6890
|
+
createVNode(script$p, {
|
|
6845
6891
|
"modal-id": "sh_department_modal",
|
|
6846
6892
|
"modal-title": "Department Form"
|
|
6847
6893
|
}, {
|
|
6848
6894
|
default: withCtx(() => [
|
|
6849
|
-
createVNode(script$
|
|
6895
|
+
createVNode(script$y, {
|
|
6850
6896
|
"success-callback": "departmentAdded",
|
|
6851
6897
|
"current-data": department.value,
|
|
6852
6898
|
onDepartmentAdded: departmentAdded,
|
|
@@ -7001,12 +7047,12 @@ return (_ctx, _cache) => {
|
|
|
7001
7047
|
headers: ['id',showModule,'created_at'],
|
|
7002
7048
|
"end-point": 'admin/departments/department/list-modules/' + id.value
|
|
7003
7049
|
}, null, 8 /* PROPS */, ["actions", "reload", "headers", "end-point"]),
|
|
7004
|
-
createVNode(script$
|
|
7050
|
+
createVNode(script$p, {
|
|
7005
7051
|
"modal-id": "addModule",
|
|
7006
7052
|
"modal-title": "Add Module Department"
|
|
7007
7053
|
}, {
|
|
7008
7054
|
default: withCtx(() => [
|
|
7009
|
-
createVNode(script$
|
|
7055
|
+
createVNode(script$y, {
|
|
7010
7056
|
"reload-select-items": unref(reload),
|
|
7011
7057
|
"success-callback": moduleAdded,
|
|
7012
7058
|
"fill-selects": {
|
|
@@ -7028,7 +7074,7 @@ return (_ctx, _cache) => {
|
|
|
7028
7074
|
ref: permissionCanvasBtn,
|
|
7029
7075
|
"data-bs-toggle": "offcanvas"
|
|
7030
7076
|
}, null, 512 /* NEED_PATCH */),
|
|
7031
|
-
createVNode(script$
|
|
7077
|
+
createVNode(script$l, {
|
|
7032
7078
|
"canvas-id": "permissionsCanvas",
|
|
7033
7079
|
position: "end enlarged",
|
|
7034
7080
|
"canvas-title": "Module Permissions"
|
|
@@ -7164,7 +7210,7 @@ return (_ctx, _cache) => {
|
|
|
7164
7210
|
: (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
7165
7211
|
(section.value === 'forgot')
|
|
7166
7212
|
? (openBlock(), createElementBlock("div", _hoisted_2, [
|
|
7167
|
-
createVNode(script$
|
|
7213
|
+
createVNode(script$y, {
|
|
7168
7214
|
class: "sh-login-form",
|
|
7169
7215
|
fields: ['email'],
|
|
7170
7216
|
"action-label": "Send Reset Link",
|
|
@@ -7187,7 +7233,7 @@ return (_ctx, _cache) => {
|
|
|
7187
7233
|
(unref(loginTitle))
|
|
7188
7234
|
? (openBlock(), createElementBlock("h3", _hoisted_6, toDisplayString(unref(loginTitle)), 1 /* TEXT */))
|
|
7189
7235
|
: createCommentVNode("v-if", true),
|
|
7190
|
-
createVNode(script$
|
|
7236
|
+
createVNode(script$y, {
|
|
7191
7237
|
class: "sh-login-form",
|
|
7192
7238
|
fields: ['email','password'],
|
|
7193
7239
|
"action-label": "Login",
|
|
@@ -7215,7 +7261,7 @@ return (_ctx, _cache) => {
|
|
|
7215
7261
|
(unref(registerSubTitle))
|
|
7216
7262
|
? (openBlock(), createElementBlock("span", _hoisted_11, toDisplayString(unref(registerSubTitle)), 1 /* TEXT */))
|
|
7217
7263
|
: createCommentVNode("v-if", true),
|
|
7218
|
-
createVNode(script$
|
|
7264
|
+
createVNode(script$y, {
|
|
7219
7265
|
class: "sh-login-form",
|
|
7220
7266
|
fields: unref(registrationFields),
|
|
7221
7267
|
"action-label": "Sign Up",
|
|
@@ -7311,11 +7357,11 @@ const ShFrontend = {
|
|
|
7311
7357
|
const registerSubTitle = options.registerSubTitle ?? `It's quick and easy`;
|
|
7312
7358
|
const loginTitle = options.loginTitle ?? `Login to your account`;
|
|
7313
7359
|
const logoutApiEndpoint = options.logoutApiEndpoint ?? `auth/logout`;
|
|
7314
|
-
options.formTextInput ?? script$
|
|
7360
|
+
options.formTextInput ?? script$v;
|
|
7315
7361
|
const loginUrl = options.loginUrl ?? `/login`;
|
|
7316
7362
|
const redirectLogin = options.redirectLogin ?? `/`;
|
|
7317
7363
|
const redirectRegister = options.redirectRegister ?? `/`;
|
|
7318
|
-
const noRecordsComponent = options.noRecordsComponent ?? script$
|
|
7364
|
+
const noRecordsComponent = options.noRecordsComponent ?? script$k;
|
|
7319
7365
|
const registrationFields = options.registrationFields ?? ['name','email','phone','password','password_confirmation'];
|
|
7320
7366
|
const AuthComponent = options.authComponent ?? script;
|
|
7321
7367
|
app.provide('loginEndpoint',loginEndpoint);
|
|
@@ -7437,4 +7483,4 @@ const useShFetch = (url, path, cacheKey) => {
|
|
|
7437
7483
|
}
|
|
7438
7484
|
};
|
|
7439
7485
|
|
|
7440
|
-
export { countries as Countries, script$8 as ManagePermissions, script$
|
|
7486
|
+
export { countries as Countries, script$8 as ManagePermissions, script$q as ShAutoForm, script$l as ShCanvas, script$9 as ShCanvasBtn, script$4 as ShCardLayout, script$j as ShConfirmAction, script$o as ShDropDownForm, script$b as ShDynamicTabs, script$y as ShForm, ShFrontend, script$p as ShModal, script$a as ShModalBtn, script$n as ShModalForm, script$m as ShModalFormAuto, script$A as ShPhone, script$5 as ShQueryPopups, script$e as ShRange, script$7 as ShRoutePopups, script$i as ShSilentAction, script$z as ShSuggest, script$d as ShTable, script$c as ShTabs, shApis, shGql, shRepo, shStorage, useAppStore, useShFetch, useUserStore };
|