@iankibetsh/shframework 4.5.1 → 4.5.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/library.mjs CHANGED
@@ -3,7 +3,7 @@ import moment from 'moment';
3
3
  import Swal from 'sweetalert2';
4
4
  import { Modal, Offcanvas } from 'bootstrap';
5
5
  import NProgress from 'nprogress';
6
- import { openBlock, createElementBlock, createElementVNode, createTextVNode, toDisplayString, createCommentVNode, withDirectives, Fragment, renderList, vModelSelect, vModelText, ref, onMounted, watch, unref, createBlock, resolveDynamicComponent, normalizeClass, resolveComponent, inject, mergeProps, normalizeStyle, renderSlot, createVNode, normalizeProps, guardReactiveProps, withCtx, vModelCheckbox, shallowRef, pushScopeId, popScopeId, markRaw, computed, isRef } from 'vue';
6
+ import { openBlock, createElementBlock, createElementVNode, createTextVNode, toDisplayString, createCommentVNode, withDirectives, Fragment, renderList, vModelSelect, vModelText, ref, onMounted, watch, unref, createBlock, resolveDynamicComponent, normalizeClass, resolveComponent, inject, mergeProps, normalizeStyle, renderSlot, createVNode, normalizeProps, guardReactiveProps, computed, withCtx, vModelCheckbox, shallowRef, pushScopeId, popScopeId, markRaw, isRef } from 'vue';
7
7
  import _ from 'lodash';
8
8
  import { defineStore, storeToRefs } from 'pinia';
9
9
  import { useRoute, useRouter } from 'vue-router';
@@ -146,7 +146,6 @@ const signOutUser = () => {
146
146
 
147
147
 
148
148
  function getShConfig(key = null, def = ''){
149
-
150
149
  const config = ShStorage.getItem('ShConfig') ?? {};
151
150
  if (key) {
152
151
  return config[key] ?? def
@@ -423,6 +422,53 @@ function doPost (endPoint, data, extraConfig) {
423
422
  config
424
423
  )
425
424
  }
425
+ function doDelete (endPoint, data, extraConfig) {
426
+ updateSession();
427
+ const config = {
428
+ headers: {
429
+ Authorization: 'Bearer ' + ShStorage.getItem('access_token')
430
+ }
431
+ };
432
+ if (extraConfig) {
433
+ Object.assign(config, extraConfig);
434
+ }
435
+ return axios.delete(endPoint,
436
+ data,
437
+ config
438
+ )
439
+ }
440
+ function doPut (endPoint, data, extraConfig) {
441
+ updateSession();
442
+ const config = {
443
+ headers: {
444
+ Authorization: 'Bearer ' + ShStorage.getItem('access_token')
445
+ }
446
+ };
447
+ if (extraConfig) {
448
+ Object.assign(config, extraConfig);
449
+ }
450
+ return axios.put(endPoint,
451
+ data,
452
+ config
453
+ )
454
+
455
+ }
456
+ function doPatch (endPoint, data, extraConfig) {
457
+ updateSession();
458
+ const config = {
459
+ headers: {
460
+ Authorization: 'Bearer ' + ShStorage.getItem('access_token')
461
+ }
462
+ };
463
+ if (extraConfig) {
464
+ Object.assign(config, extraConfig);
465
+ }
466
+ return axios.patch(endPoint,
467
+ data,
468
+ config
469
+ )
470
+
471
+ }
426
472
  function graphQlQuery(query) {
427
473
  const data = {
428
474
  query
@@ -440,6 +486,9 @@ var shApis = {
440
486
  doGet,
441
487
  doPost,
442
488
  graphQlQuery,
489
+ doDelete,
490
+ doPut,
491
+ doPatch,
443
492
  graphQlMutate
444
493
  };
445
494
 
@@ -1916,7 +1965,7 @@ const countries = [
1916
1965
  }
1917
1966
  ];
1918
1967
 
1919
- var script$w = {
1968
+ var script$y = {
1920
1969
  name: 'PhoneInput',
1921
1970
  props: ['modelValue', 'country_code','disabled'],
1922
1971
  data () {
@@ -1986,20 +2035,23 @@ var script$w = {
1986
2035
  }
1987
2036
  };
1988
2037
 
1989
- const _hoisted_1$o = { class: "sh-phone mb-3" };
1990
- const _hoisted_2$e = {
2038
+ const _hoisted_1$q = {
2039
+ class: "sh-phone mb-3",
2040
+ style: {"display":"flex"}
2041
+ };
2042
+ const _hoisted_2$g = {
1991
2043
  key: 0,
1992
2044
  style: {"display":"contents"}
1993
2045
  };
1994
- const _hoisted_3$d = ["src"];
1995
- const _hoisted_4$d = ["value"];
1996
- const _hoisted_5$b = ["disabled"];
2046
+ const _hoisted_3$e = ["src"];
2047
+ const _hoisted_4$e = ["value"];
2048
+ const _hoisted_5$c = ["disabled"];
1997
2049
 
1998
- function render$3(_ctx, _cache, $props, $setup, $data, $options) {
1999
- return (openBlock(), createElementBlock("div", _hoisted_1$o, [
2050
+ function render$4(_ctx, _cache, $props, $setup, $data, $options) {
2051
+ return (openBlock(), createElementBlock("div", _hoisted_1$q, [
2000
2052
  ($data.selectedCountry)
2001
- ? (openBlock(), createElementBlock("div", _hoisted_2$e, [
2002
- createElementVNode("img", { src: $data.flag }, null, 8 /* PROPS */, _hoisted_3$d),
2053
+ ? (openBlock(), createElementBlock("div", _hoisted_2$g, [
2054
+ createElementVNode("img", { src: $data.flag }, null, 8 /* PROPS */, _hoisted_3$e),
2003
2055
  createTextVNode(" " + toDisplayString($data.selectedCountry.dialCode), 1 /* TEXT */)
2004
2056
  ]))
2005
2057
  : createCommentVNode("v-if", true),
@@ -2012,7 +2064,7 @@ function render$3(_ctx, _cache, $props, $setup, $data, $options) {
2012
2064
  return (openBlock(), createElementBlock("option", {
2013
2065
  value: country,
2014
2066
  key: country.dialCode
2015
- }, toDisplayString(country.name + '(' + country.dialCode + ')'), 9 /* TEXT, PROPS */, _hoisted_4$d))
2067
+ }, toDisplayString(country.name + '(' + country.dialCode + ')'), 9 /* TEXT, PROPS */, _hoisted_4$e))
2016
2068
  }), 128 /* KEYED_FRAGMENT */))
2017
2069
  ], 544 /* NEED_HYDRATION, NEED_PATCH */), [
2018
2070
  [vModelSelect, $data.selectedCountry]
@@ -2025,37 +2077,37 @@ function render$3(_ctx, _cache, $props, $setup, $data, $options) {
2025
2077
  onInput: _cache[2] || (_cache[2] = (...args) => ($options.updateValue && $options.updateValue(...args))),
2026
2078
  placeholder: "712345678",
2027
2079
  "onUpdate:modelValue": _cache[3] || (_cache[3] = $event => (($data.input) = $event))
2028
- }, null, 40 /* PROPS, NEED_HYDRATION */, _hoisted_5$b), [
2080
+ }, null, 40 /* PROPS, NEED_HYDRATION */, _hoisted_5$c), [
2029
2081
  [vModelText, $data.input]
2030
2082
  ])
2031
2083
  ]))
2032
2084
  }
2033
2085
 
2034
- script$w.render = render$3;
2035
- script$w.__file = "src/lib/components/form-components/PhoneInput.vue";
2086
+ script$y.render = render$4;
2087
+ script$y.__file = "src/lib/components/form-components/PhoneInput.vue";
2036
2088
 
2037
- const _hoisted_1$n = {
2089
+ const _hoisted_1$p = {
2038
2090
  key: 0,
2039
2091
  class: "dropdown sh-suggest"
2040
2092
  };
2041
- const _hoisted_2$d = ["id"];
2042
- const _hoisted_3$c = { class: "sh-suggestions-holder" };
2043
- const _hoisted_4$c = { class: "badge bg-secondary m-1 sh-selected-item" };
2044
- const _hoisted_5$a = ["onClick"];
2045
- const _hoisted_6$9 = ["id"];
2046
- const _hoisted_7$8 = ["id", "aria-labelledby"];
2047
- const _hoisted_8$7 = ["onClick"];
2048
- const _hoisted_9$7 = {
2093
+ const _hoisted_2$f = ["id"];
2094
+ const _hoisted_3$d = { class: "sh-suggestions-holder" };
2095
+ const _hoisted_4$d = { class: "badge bg-secondary m-1 sh-selected-item" };
2096
+ const _hoisted_5$b = ["onClick"];
2097
+ const _hoisted_6$a = ["id"];
2098
+ const _hoisted_7$9 = ["id", "aria-labelledby"];
2099
+ const _hoisted_8$8 = ["onClick"];
2100
+ const _hoisted_9$8 = {
2049
2101
  key: 1,
2050
2102
  class: "dropdown-item sh-suggest-no-results"
2051
2103
  };
2052
- const _hoisted_10$7 = {
2104
+ const _hoisted_10$8 = {
2053
2105
  key: 2,
2054
2106
  class: "dropdown-item sh-suggest-no-input"
2055
2107
  };
2056
2108
 
2057
2109
 
2058
- var script$v = {
2110
+ var script$x = {
2059
2111
  __name: 'ShSuggest',
2060
2112
  props: ['data','allowMultiple','url','modelValue','optionTemplate'],
2061
2113
  emits: ['update:modelValue'],
@@ -2191,23 +2243,23 @@ watch(()=>props.modelValue, (newValue)=>{
2191
2243
 
2192
2244
  return (_ctx, _cache) => {
2193
2245
  return (unref(id))
2194
- ? (openBlock(), createElementBlock("div", _hoisted_1$n, [
2246
+ ? (openBlock(), createElementBlock("div", _hoisted_1$p, [
2195
2247
  createElementVNode("div", {
2196
2248
  id: unref(id),
2197
2249
  "data-bs-toggle": "dropdown",
2198
2250
  class: "p-0 d-flex sh-suggest-control dropdown-toggle",
2199
2251
  "aria-expanded": "false"
2200
2252
  }, [
2201
- createElementVNode("div", _hoisted_3$c, [
2253
+ createElementVNode("div", _hoisted_3$d, [
2202
2254
  (openBlock(true), createElementBlock(Fragment, null, renderList(unref(selectedSuggestions), (sgt) => {
2203
- return (openBlock(), createElementBlock("h5", _hoisted_4$c, [
2255
+ return (openBlock(), createElementBlock("h5", _hoisted_4$d, [
2204
2256
  createTextVNode(toDisplayString(sgt.name) + " ", 1 /* TEXT */),
2205
2257
  createElementVNode("button", {
2206
2258
  onClick: $event => (removeSuggestion(sgt.id)),
2207
2259
  type: "button",
2208
2260
  class: "btn-close border-start border-1 ms-1",
2209
2261
  "aria-label": "Close"
2210
- }, null, 8 /* PROPS */, _hoisted_5$a)
2262
+ }, null, 8 /* PROPS */, _hoisted_5$b)
2211
2263
  ]))
2212
2264
  }), 256 /* UNKEYED_FRAGMENT */))
2213
2265
  ]),
@@ -2217,8 +2269,8 @@ return (_ctx, _cache) => {
2217
2269
  onInput: filterData,
2218
2270
  onChange: filterData,
2219
2271
  class: "flex-fill h-100 sh-suggestion-input"
2220
- }, null, 40 /* PROPS, NEED_HYDRATION */, _hoisted_6$9)
2221
- ], 8 /* PROPS */, _hoisted_2$d),
2272
+ }, null, 40 /* PROPS, NEED_HYDRATION */, _hoisted_6$a)
2273
+ ], 8 /* PROPS */, _hoisted_2$f),
2222
2274
  createElementVNode("ul", {
2223
2275
  class: "dropdown-menu w-100",
2224
2276
  id: 'dropwdown_section' + unref(id),
@@ -2245,14 +2297,14 @@ return (_ctx, _cache) => {
2245
2297
  class: normalizeClass(["dropdown-item", unref(selectedSuggestions).includes(suggestion) ? 'active':'']),
2246
2298
  href: "#"
2247
2299
  }, toDisplayString(suggestion.name ?? suggestion.text), 3 /* TEXT, CLASS */))
2248
- ], 8 /* PROPS */, _hoisted_8$7))
2300
+ ], 8 /* PROPS */, _hoisted_8$8))
2249
2301
  : createCommentVNode("v-if", true)
2250
2302
  ], 64 /* STABLE_FRAGMENT */))
2251
2303
  }), 128 /* KEYED_FRAGMENT */))
2252
2304
  : (unref(searchText))
2253
- ? (openBlock(), createElementBlock("li", _hoisted_9$7, " No results found "))
2254
- : (openBlock(), createElementBlock("li", _hoisted_10$7, " Type to search... "))
2255
- ], 8 /* PROPS */, _hoisted_7$8)
2305
+ ? (openBlock(), createElementBlock("li", _hoisted_9$8, " No results found "))
2306
+ : (openBlock(), createElementBlock("li", _hoisted_10$8, " Type to search... "))
2307
+ ], 8 /* PROPS */, _hoisted_7$9)
2256
2308
  ]))
2257
2309
  : createCommentVNode("v-if", true)
2258
2310
  }
@@ -2260,19 +2312,23 @@ return (_ctx, _cache) => {
2260
2312
 
2261
2313
  };
2262
2314
 
2263
- script$v.__scopeId = "data-v-71cc9569";
2264
- script$v.__file = "src/lib/components/form-components/ShSuggest.vue";
2315
+ script$x.__scopeId = "data-v-71cc9569";
2316
+ script$x.__file = "src/lib/components/form-components/ShSuggest.vue";
2265
2317
 
2266
- var script$u = {
2318
+ var script$w = {
2267
2319
  name: 'ShForm',
2268
2320
  components: {
2269
- PhoneInput: script$w,
2270
- ShSuggest: script$v,
2271
- ShPhone: script$w
2321
+ PhoneInput: script$y,
2322
+ ShSuggest: script$x,
2323
+ ShPhone: script$y
2272
2324
  },
2273
2325
  props: [
2274
2326
  'action',
2275
2327
  'classes',
2328
+ 'checkBoxes',
2329
+ 'radioBoxes',
2330
+ 'passwords',
2331
+ 'method',
2276
2332
  'hasTerms',
2277
2333
  'country_code',
2278
2334
  'submitBtnClass',
@@ -2300,6 +2356,8 @@ var script$u = {
2300
2356
  form_files: {},
2301
2357
  exiting_fields: [],
2302
2358
  selectData: {},
2359
+ checkboxData: {},
2360
+ radioboxData: {},
2303
2361
  users: [],
2304
2362
  allPlaceHolders: {},
2305
2363
  user: null,
@@ -2351,6 +2409,12 @@ var script$u = {
2351
2409
  if(this.files && this.files.includes(field)){
2352
2410
  return 'file'
2353
2411
  }
2412
+ if(this.phones && this.phones.includes(field)){
2413
+ return 'phone'
2414
+ }
2415
+ if (this.passwords && this.passwords.includes(field)) {
2416
+ return 'password'
2417
+ }
2354
2418
  if(this.fillSelects && this.fillSelects[field]){
2355
2419
  return 'select';
2356
2420
  }
@@ -2472,7 +2536,8 @@ var script$u = {
2472
2536
  Object.keys(this.form_files).forEach(key => {
2473
2537
  data.append(key, this.form_files[key].value);
2474
2538
  });
2475
- shApis.doPost(this.action, data).then(res => {
2539
+ const method = this.method =='put' ? shApis.doPut: (this.method == 'delete' ? shApis.doDelete: shApis.doPost);
2540
+ method(this.action, data).then(res => {
2476
2541
  // console.log(res)
2477
2542
  this.form_status = 2;
2478
2543
  Object.keys(this.form_elements).forEach(key => {
@@ -2554,7 +2619,6 @@ var script$u = {
2554
2619
  }
2555
2620
  },
2556
2621
  mounted: async function () {
2557
- const selectData = {};
2558
2622
  if (this.fillSelects) {
2559
2623
  Object.keys(this.fillSelects).forEach(key => {
2560
2624
  if(this.fillSelects[key].suggest || this.fillSelects[key].suggests) {
@@ -2572,7 +2636,20 @@ var script$u = {
2572
2636
  });
2573
2637
  }
2574
2638
  });
2575
- console.log(selectData);
2639
+ }
2640
+ const checkboxData = {};
2641
+ if (this.checkBoxes) {
2642
+ Object.keys(this.checkBoxes).forEach(key => {
2643
+ checkboxData[key] = this.checkBoxes[key];
2644
+ });
2645
+ this.checkboxData = checkboxData;
2646
+ }
2647
+ const radioboxData = {};
2648
+ if (this.radioBoxes) {
2649
+ Object.keys(this.radioBoxes).forEach(key => {
2650
+ radioboxData[key] = this.radioBoxes[key];
2651
+ });
2652
+ this.radioboxData = radioboxData;
2576
2653
  }
2577
2654
  },
2578
2655
  created: function () {
@@ -2592,25 +2669,25 @@ var script$u = {
2592
2669
  }
2593
2670
  };
2594
2671
 
2595
- const _hoisted_1$m = /*#__PURE__*/createElementVNode("h5", { class: "d-none" }, null, -1 /* HOISTED */);
2596
- const _hoisted_2$c = {
2672
+ const _hoisted_1$o = /*#__PURE__*/createElementVNode("h5", { class: "d-none" }, null, -1 /* HOISTED */);
2673
+ const _hoisted_2$e = {
2597
2674
  ref: "ShAutoForm",
2598
2675
  class: "sh-form"
2599
2676
  };
2600
- const _hoisted_3$b = {
2677
+ const _hoisted_3$c = {
2601
2678
  key: 0,
2602
2679
  class: "alert alert-danger alert-dismissible fade show sh-form-submission-error",
2603
2680
  role: "alert"
2604
2681
  };
2605
- const _hoisted_4$b = /*#__PURE__*/createElementVNode("i", { class: "bi-exclamation-triangle-fill me-1" }, null, -1 /* HOISTED */);
2606
- const _hoisted_5$9 = { key: 0 };
2607
- const _hoisted_6$8 = { key: 1 };
2608
- const _hoisted_7$7 = { class: "row" };
2609
- const _hoisted_8$6 = { class: "fg-label control-label text-capitalize control-bel col-md-12 request-form-label mb-2" };
2610
- const _hoisted_9$6 = { class: "col-md-12" };
2611
- const _hoisted_10$6 = ["data-cy", "placeholder", "name", "onFocus", "onChange"];
2612
- const _hoisted_11$6 = ["data-cy", "placeholder", "name", "onFocus", "onUpdate:modelValue"];
2613
- const _hoisted_12$4 = ["data-cy", "placeholder", "name", "onFocus", "onUpdate:modelValue"];
2682
+ const _hoisted_4$c = /*#__PURE__*/createElementVNode("i", { class: "bi-exclamation-triangle-fill me-1" }, null, -1 /* HOISTED */);
2683
+ const _hoisted_5$a = { key: 0 };
2684
+ const _hoisted_6$9 = { key: 1 };
2685
+ const _hoisted_7$8 = { class: "row" };
2686
+ const _hoisted_8$7 = { class: "fg-label control-label text-capitalize control-bel col-md-12 request-form-label mb-2" };
2687
+ const _hoisted_9$7 = { class: "col-md-12" };
2688
+ const _hoisted_10$7 = ["data-cy", "placeholder", "name", "onFocus", "onChange"];
2689
+ const _hoisted_11$7 = ["data-cy", "placeholder", "name", "onFocus", "onUpdate:modelValue"];
2690
+ const _hoisted_12$6 = ["data-cy", "placeholder", "name", "onFocus", "onUpdate:modelValue"];
2614
2691
  const _hoisted_13$4 = ["data-cy", "placeholder", "name", "onFocus", "onUpdate:modelValue"];
2615
2692
  const _hoisted_14$4 = ["data-cy", "name", "onFocus", "onUpdate:modelValue"];
2616
2693
  const _hoisted_15$3 = ["disabled", "placeholder", "name", "onFocus", "onUpdate:modelValue"];
@@ -2621,12 +2698,18 @@ const _hoisted_19$1 = {
2621
2698
  key: 11,
2622
2699
  class: "invalid-feedback"
2623
2700
  };
2624
- const _hoisted_20$1 = {
2701
+ const _hoisted_20$1 = { class: "form-check me-1" };
2702
+ const _hoisted_21$1 = ["value", "disabled", "checked"];
2703
+ const _hoisted_22$1 = { class: "form-check-label" };
2704
+ const _hoisted_23$1 = { class: "form-check me-1" };
2705
+ const _hoisted_24$1 = ["name", "value"];
2706
+ const _hoisted_25$1 = { class: "form-check-label" };
2707
+ const _hoisted_26$1 = {
2625
2708
  key: 1,
2626
2709
  class: "row"
2627
2710
  };
2628
- const _hoisted_21$1 = /*#__PURE__*/createElementVNode("h5", null, "Confirm and Submit", -1 /* HOISTED */);
2629
- const _hoisted_22$1 = /*#__PURE__*/createElementVNode("p", null, [
2711
+ const _hoisted_27$1 = /*#__PURE__*/createElementVNode("h5", null, "Confirm and Submit", -1 /* HOISTED */);
2712
+ const _hoisted_28$1 = /*#__PURE__*/createElementVNode("p", null, [
2630
2713
  /*#__PURE__*/createTextVNode("By clicking submit, you agree to our "),
2631
2714
  /*#__PURE__*/createElementVNode("a", {
2632
2715
  target: "_blank",
@@ -2638,31 +2721,31 @@ const _hoisted_22$1 = /*#__PURE__*/createElementVNode("p", null, [
2638
2721
  href: "https://hauzisha.co.ke/privacy-policy"
2639
2722
  }, "privacy policy")
2640
2723
  ], -1 /* HOISTED */);
2641
- const _hoisted_23$1 = [
2642
- _hoisted_21$1,
2643
- _hoisted_22$1
2724
+ const _hoisted_29$1 = [
2725
+ _hoisted_27$1,
2726
+ _hoisted_28$1
2644
2727
  ];
2645
- const _hoisted_24$1 = /*#__PURE__*/createElementVNode("span", {
2728
+ const _hoisted_30$1 = /*#__PURE__*/createElementVNode("span", {
2646
2729
  class: "spinner-border spinner-border-sm",
2647
2730
  role: "status",
2648
2731
  "aria-hidden": "true"
2649
2732
  }, null, -1 /* HOISTED */);
2650
2733
 
2651
- function render$2(_ctx, _cache, $props, $setup, $data, $options) {
2734
+ function render$3(_ctx, _cache, $props, $setup, $data, $options) {
2652
2735
  const _component_phone_input = resolveComponent("phone-input");
2653
2736
  const _component_ShSuggest = resolveComponent("ShSuggest");
2654
2737
 
2655
2738
  return (openBlock(), createElementBlock(Fragment, null, [
2656
- _hoisted_1$m,
2657
- createElementVNode("form", _hoisted_2$c, [
2739
+ _hoisted_1$o,
2740
+ createElementVNode("form", _hoisted_2$e, [
2658
2741
  createCommentVNode(" <div v-if=\"form_status == 1\" class=\"alert alert-info\">Processing...</div>"),
2659
2742
  createCommentVNode(" <div v-if=\"form_status == 2\" class=\"alert alert-success\">Success</div>"),
2660
2743
  (_ctx.form_status == 3)
2661
- ? (openBlock(), createElementBlock("div", _hoisted_3$b, [
2662
- _hoisted_4$b,
2744
+ ? (openBlock(), createElementBlock("div", _hoisted_3$c, [
2745
+ _hoisted_4$c,
2663
2746
  (_ctx.errorText)
2664
- ? (openBlock(), createElementBlock("span", _hoisted_5$9, toDisplayString(_ctx.errorText), 1 /* TEXT */))
2665
- : (openBlock(), createElementBlock("span", _hoisted_6$8, "Unexpected Error Occurred")),
2747
+ ? (openBlock(), createElementBlock("span", _hoisted_5$a, toDisplayString(_ctx.errorText), 1 /* TEXT */))
2748
+ : (openBlock(), createElementBlock("span", _hoisted_6$9, "Unexpected Error Occurred")),
2666
2749
  createCommentVNode(" <button @click=\"hideError\" type=\"button\" class=\"btn-close\" aria-label=\"Close\"></button>")
2667
2750
  ]))
2668
2751
  : createCommentVNode("v-if", true),
@@ -2672,14 +2755,14 @@ function render$2(_ctx, _cache, $props, $setup, $data, $options) {
2672
2755
  }, null, 512 /* NEED_PATCH */), [
2673
2756
  [vModelText, _ctx.form_elements['id']]
2674
2757
  ]),
2675
- createElementVNode("div", _hoisted_7$7, [
2758
+ createElementVNode("div", _hoisted_7$8, [
2676
2759
  (openBlock(true), createElementBlock(Fragment, null, renderList($props.fields, (field) => {
2677
2760
  return (openBlock(), createElementBlock("div", {
2678
2761
  class: normalizeClass(["form-group", 'col-md-' + $options.getColumns()]),
2679
2762
  key: field
2680
2763
  }, [
2681
- createElementVNode("label", _hoisted_8$6, toDisplayString($options.getLabel(field)), 1 /* TEXT */),
2682
- createElementVNode("div", _hoisted_9$6, [
2764
+ createElementVNode("label", _hoisted_8$7, toDisplayString($options.getLabel(field)), 1 /* TEXT */),
2765
+ createElementVNode("div", _hoisted_9$7, [
2683
2766
  ($options.getFieldType(field) === 'component')
2684
2767
  ? (openBlock(), createBlock(resolveDynamicComponent($props.customComponent[field]), {
2685
2768
  key: 0,
@@ -2704,7 +2787,7 @@ function render$2(_ctx, _cache, $props, $setup, $data, $options) {
2704
2787
  ref: 'file_'+field,
2705
2788
  onChange: $event => ($options.handleFileUpload(field)),
2706
2789
  type: "file"
2707
- }, null, 42 /* CLASS, PROPS, NEED_HYDRATION */, _hoisted_10$6))
2790
+ }, null, 42 /* CLASS, PROPS, NEED_HYDRATION */, _hoisted_10$7))
2708
2791
  : createCommentVNode("v-if", true),
2709
2792
  ($options.getFieldType(field) === 'numeric')
2710
2793
  ? withDirectives((openBlock(), createElementBlock("input", {
@@ -2716,7 +2799,7 @@ function render$2(_ctx, _cache, $props, $setup, $data, $options) {
2716
2799
  class: normalizeClass([_ctx.form_errors[field] == null ? ' field_' + field:'is-invalid ' + field, "form-control"]),
2717
2800
  "onUpdate:modelValue": $event => ((_ctx.form_elements[field]) = $event),
2718
2801
  type: "number"
2719
- }, null, 42 /* CLASS, PROPS, NEED_HYDRATION */, _hoisted_11$6)), [
2802
+ }, null, 42 /* CLASS, PROPS, NEED_HYDRATION */, _hoisted_11$7)), [
2720
2803
  [vModelText, _ctx.form_elements[field]]
2721
2804
  ])
2722
2805
  : createCommentVNode("v-if", true),
@@ -2730,7 +2813,7 @@ function render$2(_ctx, _cache, $props, $setup, $data, $options) {
2730
2813
  class: normalizeClass([_ctx.form_errors[field] == null ? ' field_' + field:'is-invalid ' + field, "form-control"]),
2731
2814
  "onUpdate:modelValue": $event => ((_ctx.form_elements[field]) = $event),
2732
2815
  type: "password"
2733
- }, null, 42 /* CLASS, PROPS, NEED_HYDRATION */, _hoisted_12$4)), [
2816
+ }, null, 42 /* CLASS, PROPS, NEED_HYDRATION */, _hoisted_12$6)), [
2734
2817
  [vModelText, _ctx.form_elements[field]]
2735
2818
  ])
2736
2819
  : createCommentVNode("v-if", true),
@@ -2822,9 +2905,9 @@ function render$2(_ctx, _cache, $props, $setup, $data, $options) {
2822
2905
  }, [
2823
2906
  (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.selectData[field], (item) => {
2824
2907
  return (openBlock(), createElementBlock("option", {
2825
- key: item.id,
2826
- value: item.id
2827
- }, toDisplayString(item.name), 9 /* TEXT, PROPS */, _hoisted_18$3))
2908
+ key: $props.fillSelects[field].value ? item[$props.fillSelects[field].value]:item.id,
2909
+ value: $props.fillSelects[field].value ? item[$props.fillSelects[field].value]:item.id
2910
+ }, toDisplayString($props.fillSelects[field].column ? item[$props.fillSelects[field].column]:item.name), 9 /* TEXT, PROPS */, _hoisted_18$3))
2828
2911
  }), 128 /* KEYED_FRAGMENT */))
2829
2912
  ], 42 /* CLASS, PROPS, NEED_HYDRATION */, _hoisted_17$3)), [
2830
2913
  [vModelSelect, _ctx.form_elements[field]]
@@ -2832,13 +2915,44 @@ function render$2(_ctx, _cache, $props, $setup, $data, $options) {
2832
2915
  : createCommentVNode("v-if", true),
2833
2916
  (_ctx.form_errors[field] != null )
2834
2917
  ? (openBlock(), createElementBlock("div", _hoisted_19$1, toDisplayString(_ctx.form_errors[field][0]), 1 /* TEXT */))
2835
- : createCommentVNode("v-if", true)
2918
+ : createCommentVNode("v-if", true),
2919
+ createElementVNode("div", {
2920
+ class: normalizeClass($props.checkBoxes?.display ? ($props.checkBoxes.display =='row' ? 'd-flex': '' ) : '' )
2921
+ }, [
2922
+ (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.checkboxData[field], (item) => {
2923
+ return (openBlock(), createElementBlock("div", _hoisted_20$1, [
2924
+ createElementVNode("input", {
2925
+ class: "form-check-input",
2926
+ type: "checkbox",
2927
+ value: item.id,
2928
+ disabled: item.disabled,
2929
+ checked: item.checked
2930
+ }, null, 8 /* PROPS */, _hoisted_21$1),
2931
+ createElementVNode("label", _hoisted_22$1, toDisplayString(item.label), 1 /* TEXT */)
2932
+ ]))
2933
+ }), 256 /* UNKEYED_FRAGMENT */))
2934
+ ], 2 /* CLASS */),
2935
+ createElementVNode("div", {
2936
+ class: normalizeClass($props.radioBoxes?.display ? ($props.radioBoxes.display =='row' ? 'd-flex': '' ) : '' )
2937
+ }, [
2938
+ (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.radioboxData[field], (item) => {
2939
+ return (openBlock(), createElementBlock("div", _hoisted_23$1, [
2940
+ createElementVNode("input", {
2941
+ class: "form-check-input",
2942
+ type: "radio",
2943
+ name: field,
2944
+ value: item.value
2945
+ }, null, 8 /* PROPS */, _hoisted_24$1),
2946
+ createElementVNode("label", _hoisted_25$1, toDisplayString(item.label), 1 /* TEXT */)
2947
+ ]))
2948
+ }), 256 /* UNKEYED_FRAGMENT */))
2949
+ ], 2 /* CLASS */)
2836
2950
  ])
2837
2951
  ], 2 /* CLASS */))
2838
2952
  }), 128 /* KEYED_FRAGMENT */))
2839
2953
  ]),
2840
2954
  ($props.hasTerms)
2841
- ? (openBlock(), createElementBlock("div", _hoisted_20$1, [..._hoisted_23$1]))
2955
+ ? (openBlock(), createElementBlock("div", _hoisted_26$1, [..._hoisted_29$1]))
2842
2956
  : createCommentVNode("v-if", true),
2843
2957
  (_ctx.form_status == 1)
2844
2958
  ? (openBlock(), createElementBlock("button", {
@@ -2847,7 +2961,7 @@ function render$2(_ctx, _cache, $props, $setup, $data, $options) {
2847
2961
  type: "button",
2848
2962
  disabled: ""
2849
2963
  }, [
2850
- _hoisted_24$1,
2964
+ _hoisted_30$1,
2851
2965
  createTextVNode(" Processing... ")
2852
2966
  ], 2 /* CLASS */))
2853
2967
  : (openBlock(), createElementBlock("button", {
@@ -2861,10 +2975,10 @@ function render$2(_ctx, _cache, $props, $setup, $data, $options) {
2861
2975
  ], 64 /* STABLE_FRAGMENT */))
2862
2976
  }
2863
2977
 
2864
- script$u.render = render$2;
2865
- script$u.__file = "src/lib/components/ShForm.vue";
2978
+ script$w.render = render$3;
2979
+ script$w.__file = "src/lib/components/ShForm.vue";
2866
2980
 
2867
- var script$t = {
2981
+ var script$v = {
2868
2982
  __name: 'EmailInput',
2869
2983
  props: ['modelValue','label'],
2870
2984
  emits: ['update:modelValue','clearValidationErrors'],
@@ -2902,12 +3016,12 @@ return (_ctx, _cache) => {
2902
3016
 
2903
3017
  };
2904
3018
 
2905
- script$t.__file = "src/lib/components/form-components/EmailInput.vue";
3019
+ script$v.__file = "src/lib/components/form-components/EmailInput.vue";
2906
3020
 
2907
- const _hoisted_1$l = ["min", "max"];
3021
+ const _hoisted_1$n = ["min", "max"];
2908
3022
 
2909
3023
 
2910
- var script$s = {
3024
+ var script$u = {
2911
3025
  __name: 'NumberInput',
2912
3026
  props: ['modelValue','label','min','max'],
2913
3027
  emits: ['update:modelValue','clearValidationErrors'],
@@ -2939,7 +3053,7 @@ return (_ctx, _cache) => {
2939
3053
  onChange: modelValueUpdated,
2940
3054
  onKeydown: modelValueUpdated,
2941
3055
  onUpdated: modelValueUpdated
2942
- }, null, 40 /* PROPS, NEED_HYDRATION */, _hoisted_1$l)), [
3056
+ }, null, 40 /* PROPS, NEED_HYDRATION */, _hoisted_1$n)), [
2943
3057
  [vModelText, inputModel.value]
2944
3058
  ])
2945
3059
  }
@@ -2947,9 +3061,9 @@ return (_ctx, _cache) => {
2947
3061
 
2948
3062
  };
2949
3063
 
2950
- script$s.__file = "src/lib/components/form-components/NumberInput.vue";
3064
+ script$u.__file = "src/lib/components/form-components/NumberInput.vue";
2951
3065
 
2952
- var script$r = {
3066
+ var script$t = {
2953
3067
  __name: 'TextInput',
2954
3068
  props: ['modelValue','label','isInvalid'],
2955
3069
  emits: ['update:modelValue','clearValidationErrors'],
@@ -2989,9 +3103,9 @@ return (_ctx, _cache) => {
2989
3103
 
2990
3104
  };
2991
3105
 
2992
- script$r.__file = "src/lib/components/form-components/TextInput.vue";
3106
+ script$t.__file = "src/lib/components/form-components/TextInput.vue";
2993
3107
 
2994
- var script$q = {
3108
+ var script$s = {
2995
3109
  __name: 'TextAreaInput',
2996
3110
  props: ['modelValue','label'],
2997
3111
  emits: ['update:modelValue','clearValidationErrors'],
@@ -3029,12 +3143,12 @@ return (_ctx, _cache) => {
3029
3143
 
3030
3144
  };
3031
3145
 
3032
- script$q.__file = "src/lib/components/form-components/TextAreaInput.vue";
3146
+ script$s.__file = "src/lib/components/form-components/TextAreaInput.vue";
3033
3147
 
3034
- const _hoisted_1$k = ["value"];
3148
+ const _hoisted_1$m = ["value"];
3035
3149
 
3036
3150
 
3037
- var script$p = {
3151
+ var script$r = {
3038
3152
  __name: 'SelectInput',
3039
3153
  props: ['modelValue','label','url','required','options','dataUrl','data'],
3040
3154
  emits: ['update:modelValue','clearValidationErrors'],
@@ -3089,7 +3203,7 @@ return (_ctx, _cache) => {
3089
3203
  return (openBlock(), createElementBlock("option", {
3090
3204
  key: option.id,
3091
3205
  value: option.id
3092
- }, toDisplayString(option.name), 9 /* TEXT, PROPS */, _hoisted_1$k))
3206
+ }, toDisplayString(option.name), 9 /* TEXT, PROPS */, _hoisted_1$m))
3093
3207
  }), 128 /* KEYED_FRAGMENT */))
3094
3208
  ], 544 /* NEED_HYDRATION, NEED_PATCH */)), [
3095
3209
  [vModelSelect, inputModel.value]
@@ -3099,9 +3213,9 @@ return (_ctx, _cache) => {
3099
3213
 
3100
3214
  };
3101
3215
 
3102
- script$p.__file = "src/lib/components/form-components/SelectInput.vue";
3216
+ script$r.__file = "src/lib/components/form-components/SelectInput.vue";
3103
3217
 
3104
- var script$o = {
3218
+ var script$q = {
3105
3219
  __name: 'PasswordInput',
3106
3220
  props: ['modelValue','label'],
3107
3221
  emits: ['update:modelValue','clearValidationErrors'],
@@ -3135,9 +3249,9 @@ return (_ctx, _cache) => {
3135
3249
 
3136
3250
  };
3137
3251
 
3138
- script$o.__file = "src/lib/components/form-components/PasswordInput.vue";
3252
+ script$q.__file = "src/lib/components/form-components/PasswordInput.vue";
3139
3253
 
3140
- var script$n = {
3254
+ var script$p = {
3141
3255
  __name: 'DateInput',
3142
3256
  props: ['modelValue','label','isInvalid'],
3143
3257
  emits: ['update:modelValue','clearValidationErrors'],
@@ -3177,30 +3291,30 @@ return (_ctx, _cache) => {
3177
3291
 
3178
3292
  };
3179
3293
 
3180
- script$n.__file = "src/lib/components/form-components/DateInput.vue";
3294
+ script$p.__file = "src/lib/components/form-components/DateInput.vue";
3181
3295
 
3182
- const _hoisted_1$j = /*#__PURE__*/createElementVNode("div", null, null, -1 /* HOISTED */);
3183
- const _hoisted_2$b = ["onUpdate:modelValue"];
3184
- const _hoisted_3$a = ["innerHTML"];
3185
- const _hoisted_4$a = {
3296
+ const _hoisted_1$l = /*#__PURE__*/createElementVNode("div", null, null, -1 /* HOISTED */);
3297
+ const _hoisted_2$d = ["onUpdate:modelValue"];
3298
+ const _hoisted_3$b = ["innerHTML"];
3299
+ const _hoisted_4$b = {
3186
3300
  key: 0,
3187
3301
  class: "text-danger sh-required"
3188
3302
  };
3189
- const _hoisted_5$8 = ["innerHTML"];
3190
- const _hoisted_6$7 = {
3303
+ const _hoisted_5$9 = ["innerHTML"];
3304
+ const _hoisted_6$8 = {
3191
3305
  key: 2,
3192
3306
  class: "form-notch"
3193
3307
  };
3194
- const _hoisted_7$6 = /*#__PURE__*/createElementVNode("div", { class: "form-notch-leading" }, null, -1 /* HOISTED */);
3195
- const _hoisted_8$5 = /*#__PURE__*/createElementVNode("div", { class: "form-notch-middle" }, null, -1 /* HOISTED */);
3196
- const _hoisted_9$5 = /*#__PURE__*/createElementVNode("div", { class: "form-notch-trailing" }, null, -1 /* HOISTED */);
3197
- const _hoisted_10$5 = [
3198
- _hoisted_7$6,
3199
- _hoisted_8$5,
3200
- _hoisted_9$5
3308
+ const _hoisted_7$7 = /*#__PURE__*/createElementVNode("div", { class: "form-notch-leading" }, null, -1 /* HOISTED */);
3309
+ const _hoisted_8$6 = /*#__PURE__*/createElementVNode("div", { class: "form-notch-middle" }, null, -1 /* HOISTED */);
3310
+ const _hoisted_9$6 = /*#__PURE__*/createElementVNode("div", { class: "form-notch-trailing" }, null, -1 /* HOISTED */);
3311
+ const _hoisted_10$6 = [
3312
+ _hoisted_7$7,
3313
+ _hoisted_8$6,
3314
+ _hoisted_9$6
3201
3315
  ];
3202
- const _hoisted_11$5 = ["innerHTML"];
3203
- const _hoisted_12$3 = ["disabled"];
3316
+ const _hoisted_11$6 = ["innerHTML"];
3317
+ const _hoisted_12$5 = ["disabled"];
3204
3318
  const _hoisted_13$3 = {
3205
3319
  key: 0,
3206
3320
  class: "spinner-border spinner-border-sm",
@@ -3210,7 +3324,7 @@ const _hoisted_13$3 = {
3210
3324
  const _hoisted_14$3 = { key: 1 };
3211
3325
 
3212
3326
 
3213
- var script$m = {
3327
+ var script$o = {
3214
3328
  __name: 'ShAutoForm',
3215
3329
  props: [
3216
3330
  'action', 'successCallback', 'retainDataAfterSubmission',
@@ -3223,6 +3337,7 @@ var script$m = {
3223
3337
  'textAreas',
3224
3338
  'currentData',
3225
3339
  'emails',
3340
+ 'method',
3226
3341
  'phones', 'numbers', 'selects', 'dates', 'gqlMutation',
3227
3342
  'required'
3228
3343
  ],
@@ -3244,13 +3359,13 @@ const getFieldComponent = (fieldObj) => {
3244
3359
  const defaultPhones = ['phone'];
3245
3360
  const defaultEmails = ['email'];
3246
3361
  const formComponents = inject('formComponents');
3247
- const TextComponent = formComponents.text ?? script$r;
3248
- const TextAreaComponent = formComponents.textArea ?? script$q;
3249
- const EmailComponent = formComponents.email ?? script$t;
3250
- const PhoneComponent = formComponents.phone ?? script$w;
3251
- const NumberComponent = formComponents.number ?? script$s;
3252
- const SelectComponent = formComponents.select ?? script$p;
3253
- const PasswordComponent = formComponents.password ?? script$o;
3362
+ const TextComponent = formComponents.text ?? script$t;
3363
+ const TextAreaComponent = formComponents.textArea ?? script$s;
3364
+ const EmailComponent = formComponents.email ?? script$v;
3365
+ const PhoneComponent = formComponents.phone ?? script$y;
3366
+ const NumberComponent = formComponents.number ?? script$u;
3367
+ const SelectComponent = formComponents.select ?? script$r;
3368
+ const PasswordComponent = formComponents.password ?? script$q;
3254
3369
  if (props.customComponents && props.customComponents[field]) {
3255
3370
  return props.customComponents[field]
3256
3371
  }
@@ -3268,28 +3383,28 @@ const getFieldComponent = (fieldObj) => {
3268
3383
 
3269
3384
  if (fieldObj.type) {
3270
3385
  if (fieldObj.type === 'suggest' || fieldObj.type === 'suggests') {
3271
- return script$v
3386
+ return script$x
3272
3387
  }
3273
3388
  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
3274
3389
  } else if (passwords.includes(field)) {
3275
3390
  return PasswordComponent
3276
3391
  } else if ((props.textAreas && props.textAreas.includes(field)) || defaultTextareas.includes(field)) {
3277
- return formComponents.textArea ?? script$q
3392
+ return formComponents.textArea ?? script$s
3278
3393
  } else if ((props.emails && props.emails.includes(field)) || defaultEmails.includes(field)) {
3279
- return formComponents.email ?? script$t
3394
+ return formComponents.email ?? script$v
3280
3395
  } else if ((props.phones && props.phones.includes(field)) || defaultPhones.includes(field)) {
3281
- return formComponents.phone ?? script$w
3396
+ return formComponents.phone ?? script$y
3282
3397
  } else if ((props.numbers && props.numbers.includes(field)) || defaultNumbers.includes(field)) {
3283
- return formComponents.number ?? script$s
3398
+ return formComponents.number ?? script$u
3284
3399
  }
3285
3400
  // else
3286
3401
  // if((props.selects && props.selects.includes(field)) || defaultSelects.includes(field)){
3287
3402
  // return formComponents.select ?? SelectInput
3288
3403
  // } else
3289
3404
  if((props.dates && props.dates.includes(field)) || defaultDates.includes(field)){
3290
- return formComponents.date ?? script$n
3405
+ return formComponents.date ?? script$p
3291
3406
  }
3292
- return formComponents.text ?? script$r
3407
+ return formComponents.text ?? script$t
3293
3408
  };
3294
3409
  const shFormElementClasses = ref(null);
3295
3410
  shFormElementClasses.value = inject('shFormElementClasses');
@@ -3342,14 +3457,15 @@ const submitForm = e => {
3342
3457
  });
3343
3458
  args += `)`;
3344
3459
  args = args.replace(',)', ')');
3345
- if (args == '()') {
3460
+ if (args === '()') {
3346
3461
  args = '';
3347
3462
  }
3348
3463
  emit('preSubmit', data);
3349
3464
  const mutation = `{\n${props.gqlMutation} ${args} {\n${selectFields.join(`\n`)}\n}\n}`;
3350
3465
  shApis.graphQlMutate(mutation).then(res => handleSuccessRequest(res)).catch(reason => handlefailedRequest(reason));
3351
3466
  } else {
3352
- shApis.doPost(props.action, data).then(res => handleSuccessRequest(res)).catch(reason => handlefailedRequest(reason));
3467
+ const method = props.method ==='put' ? shApis.doPut: ( props.method === 'delete' ? shApis.doDelete: shApis.doPost);
3468
+ method(props.action, data).then(res => handleSuccessRequest(res)).catch(reason => handlefailedRequest(reason));
3353
3469
  }
3354
3470
  return false
3355
3471
  };
@@ -3438,7 +3554,7 @@ onMounted((ev) => {
3438
3554
 
3439
3555
  return (_ctx, _cache) => {
3440
3556
  return (openBlock(), createElementBlock(Fragment, null, [
3441
- _hoisted_1$j,
3557
+ _hoisted_1$l,
3442
3558
  createElementVNode("form", {
3443
3559
  class: normalizeClass([__props.formClass, "sh-auto-form"]),
3444
3560
  ref_key: "shAutoForm",
@@ -3455,7 +3571,7 @@ return (_ctx, _cache) => {
3455
3571
  key: 0,
3456
3572
  type: "hidden",
3457
3573
  "onUpdate:modelValue": $event => ((formFields.value[index].value) = $event)
3458
- }, null, 8 /* PROPS */, _hoisted_2$b)), [
3574
+ }, null, 8 /* PROPS */, _hoisted_2$d)), [
3459
3575
  [vModelText, formFields.value[index].value]
3460
3576
  ])
3461
3577
  : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
@@ -3467,9 +3583,9 @@ return (_ctx, _cache) => {
3467
3583
  createElementVNode("span", {
3468
3584
  innerHTML: field.label,
3469
3585
  class: "sh-label"
3470
- }, null, 8 /* PROPS */, _hoisted_3$a),
3586
+ }, null, 8 /* PROPS */, _hoisted_3$b),
3471
3587
  (field.required)
3472
- ? (openBlock(), createElementBlock("span", _hoisted_4$a, "*"))
3588
+ ? (openBlock(), createElementBlock("span", _hoisted_4$b, "*"))
3473
3589
  : createCommentVNode("v-if", true)
3474
3590
  ], 2 /* CLASS */))
3475
3591
  : createCommentVNode("v-if", true),
@@ -3485,17 +3601,17 @@ return (_ctx, _cache) => {
3485
3601
  key: 1,
3486
3602
  class: normalizeClass(getElementClass('formLabel')),
3487
3603
  innerHTML: field.label
3488
- }, null, 10 /* CLASS, PROPS */, _hoisted_5$8))
3604
+ }, null, 10 /* CLASS, PROPS */, _hoisted_5$9))
3489
3605
  : createCommentVNode("v-if", true),
3490
3606
  (unref(isFloating))
3491
- ? (openBlock(), createElementBlock("div", _hoisted_6$7, [..._hoisted_10$5]))
3607
+ ? (openBlock(), createElementBlock("div", _hoisted_6$8, [..._hoisted_10$6]))
3492
3608
  : createCommentVNode("v-if", true),
3493
3609
  (field.helper)
3494
3610
  ? (openBlock(), createElementBlock("div", {
3495
3611
  key: 3,
3496
3612
  class: normalizeClass(getElementClass('helperText')),
3497
3613
  innerHTML: field.helper
3498
- }, null, 10 /* CLASS, PROPS */, _hoisted_11$5))
3614
+ }, null, 10 /* CLASS, PROPS */, _hoisted_11$6))
3499
3615
  : createCommentVNode("v-if", true),
3500
3616
  (validationErrors.value[field.field])
3501
3617
  ? (openBlock(), createElementBlock("div", {
@@ -3522,7 +3638,7 @@ return (_ctx, _cache) => {
3522
3638
  (!loading.value)
3523
3639
  ? (openBlock(), createElementBlock("span", _hoisted_14$3, "Submit"))
3524
3640
  : createCommentVNode("v-if", true)
3525
- ], 14 /* CLASS, STYLE, PROPS */, _hoisted_12$3)
3641
+ ], 14 /* CLASS, STYLE, PROPS */, _hoisted_12$5)
3526
3642
  ], 2 /* CLASS */),
3527
3643
  renderSlot(_ctx.$slots, "default")
3528
3644
  ], 34 /* CLASS, NEED_HYDRATION */)
@@ -3532,12 +3648,12 @@ return (_ctx, _cache) => {
3532
3648
 
3533
3649
  };
3534
3650
 
3535
- script$m.__file = "src/lib/components/ShAutoForm.vue";
3651
+ script$o.__file = "src/lib/components/ShAutoForm.vue";
3536
3652
 
3537
- const _hoisted_1$i = /*#__PURE__*/createElementVNode("h5", { class: "d-none" }, "To prevent default class", -1 /* HOISTED */);
3538
- const _hoisted_2$a = { class: "dropdown" };
3653
+ const _hoisted_1$k = /*#__PURE__*/createElementVNode("h5", { class: "d-none" }, "To prevent default class", -1 /* HOISTED */);
3654
+ const _hoisted_2$c = { class: "dropdown" };
3539
3655
 
3540
- var script$l = {
3656
+ var script$n = {
3541
3657
  __name: 'ShDropDownForm',
3542
3658
  props: ['action',
3543
3659
  'classes',
@@ -3565,8 +3681,8 @@ const dropdownId = 'rand' + (Math.random() + 1).toString(36).substring(2);
3565
3681
 
3566
3682
  return (_ctx, _cache) => {
3567
3683
  return (openBlock(), createElementBlock(Fragment, null, [
3568
- _hoisted_1$i,
3569
- createElementVNode("div", _hoisted_2$a, [
3684
+ _hoisted_1$k,
3685
+ createElementVNode("div", _hoisted_2$c, [
3570
3686
  createElementVNode("a", {
3571
3687
  class: normalizeClass(unref(btnClass)),
3572
3688
  href: "#",
@@ -3582,7 +3698,7 @@ return (_ctx, _cache) => {
3582
3698
  class: "dropdown-menu px-2 py-1",
3583
3699
  "aria-labelledby": dropdownId
3584
3700
  }, [
3585
- createVNode(script$u, normalizeProps(guardReactiveProps(props)), null, 16 /* FULL_PROPS */)
3701
+ createVNode(script$w, normalizeProps(guardReactiveProps(props)), null, 16 /* FULL_PROPS */)
3586
3702
  ])
3587
3703
  ])
3588
3704
  ], 64 /* STABLE_FRAGMENT */))
@@ -3591,22 +3707,22 @@ return (_ctx, _cache) => {
3591
3707
 
3592
3708
  };
3593
3709
 
3594
- script$l.__file = "src/lib/components/ShDropDownForm.vue";
3710
+ script$n.__file = "src/lib/components/ShDropDownForm.vue";
3595
3711
 
3596
- const _hoisted_1$h = ["id"];
3597
- const _hoisted_2$9 = { class: "modal-content sh-modal-content" };
3598
- const _hoisted_3$9 = { class: "modal-header" };
3599
- const _hoisted_4$9 = { class: "modal-title flex-fill" };
3600
- const _hoisted_5$7 = /*#__PURE__*/createElementVNode("button", {
3712
+ const _hoisted_1$j = ["id", "data-bs-backdrop"];
3713
+ const _hoisted_2$b = { class: "modal-content" };
3714
+ const _hoisted_3$a = { class: "modal-header" };
3715
+ const _hoisted_4$a = { class: "modal-title flex-fill" };
3716
+ const _hoisted_5$8 = /*#__PURE__*/createElementVNode("button", {
3601
3717
  class: "btn btn-danger btn-sm",
3602
3718
  "data-bs-dismiss": "modal",
3603
3719
  "data-dismiss": "modal"
3604
3720
  }, "×", -1 /* HOISTED */);
3605
- const _hoisted_6$6 = { class: "modal-body" };
3606
- const _hoisted_7$5 = { class: "section" };
3721
+ const _hoisted_6$7 = { class: "modal-body" };
3722
+ const _hoisted_7$6 = { class: "section" };
3607
3723
 
3608
3724
 
3609
- var script$k = {
3725
+ var script$m = {
3610
3726
  __name: 'ShModal',
3611
3727
  props: {
3612
3728
  modalId: {
@@ -3619,13 +3735,17 @@ var script$k = {
3619
3735
  modalSize: {
3620
3736
  type: String
3621
3737
  },
3622
- Static: {
3738
+ static: {
3623
3739
  type: Boolean,
3624
3740
  default: false
3625
3741
  },
3626
3742
  bsKeyboard: {
3627
3743
  type: Boolean,
3628
3744
  default: true
3745
+ },
3746
+ centered: {
3747
+ type: Boolean,
3748
+ default: true
3629
3749
  }
3630
3750
  },
3631
3751
  emits: ['modalClosed'],
@@ -3639,42 +3759,54 @@ onMounted(() => {
3639
3759
  event.target.id == props.modalId && emit('modalClosed');
3640
3760
  });
3641
3761
  });
3762
+ const modalClasses = computed(() => {
3763
+ let classes = 'modal-dialog';
3764
+ if (props.modalSize) {
3765
+ classes += ' modal-' + props.modalSize;
3766
+ }
3767
+ if (props.centered) {
3768
+ classes += ' modal-dialog-centered';
3769
+ }
3770
+ return classes
3771
+ });
3642
3772
 
3643
3773
  return (_ctx, _cache) => {
3644
3774
  return (openBlock(), createElementBlock("div", {
3645
- class: "modal sh-modal fade",
3775
+ class: "modal fade",
3646
3776
  id: __props.modalId,
3647
- "aria-hidden": "true"
3777
+ "aria-hidden": "true",
3778
+ "data-bs-backdrop": __props.static? 'static': 'none'
3648
3779
  }, [
3649
3780
  createElementVNode("div", {
3650
- class: normalizeClass(["modal-dialog sh-modal-dialog", `modal-${__props.modalSize}`])
3781
+ class: normalizeClass(["modal-dialog", modalClasses.value])
3651
3782
  }, [
3652
- createElementVNode("div", _hoisted_2$9, [
3653
- createElementVNode("div", _hoisted_3$9, [
3654
- createElementVNode("h3", _hoisted_4$9, toDisplayString(__props.modalTitle), 1 /* TEXT */),
3655
- _hoisted_5$7
3783
+ createElementVNode("div", _hoisted_2$b, [
3784
+ createElementVNode("div", _hoisted_3$a, [
3785
+ createElementVNode("h3", _hoisted_4$a, toDisplayString(__props.modalTitle), 1 /* TEXT */),
3786
+ _hoisted_5$8
3656
3787
  ]),
3657
- createElementVNode("div", _hoisted_6$6, [
3658
- createElementVNode("div", _hoisted_7$5, [
3788
+ createElementVNode("div", _hoisted_6$7, [
3789
+ createElementVNode("div", _hoisted_7$6, [
3659
3790
  renderSlot(_ctx.$slots, "default")
3660
3791
  ])
3661
3792
  ])
3662
3793
  ])
3663
3794
  ], 2 /* CLASS */)
3664
- ], 8 /* PROPS */, _hoisted_1$h))
3795
+ ], 8 /* PROPS */, _hoisted_1$j))
3665
3796
  }
3666
3797
  }
3667
3798
 
3668
3799
  };
3669
3800
 
3670
- script$k.__file = "src/lib/components/ShModal.vue";
3801
+ script$m.__file = "src/lib/components/ShModal.vue";
3671
3802
 
3672
- const _hoisted_1$g = ["href"];
3803
+ const _hoisted_1$i = ["href"];
3673
3804
 
3674
- var script$j = {
3805
+ var script$l = {
3675
3806
  __name: 'ShModalForm',
3676
3807
  props: ['action',
3677
3808
  'classes',
3809
+ 'method',
3678
3810
  'hasTerms',
3679
3811
  'country_code',
3680
3812
  'submitBtnClass',
@@ -3724,13 +3856,13 @@ return (_ctx, _cache) => {
3724
3856
  "data-bs-toggle": "modal"
3725
3857
  }, [
3726
3858
  renderSlot(_ctx.$slots, "default")
3727
- ], 10 /* CLASS, PROPS */, _hoisted_1$g),
3728
- createVNode(script$k, {
3859
+ ], 10 /* CLASS, PROPS */, _hoisted_1$i),
3860
+ createVNode(script$m, {
3729
3861
  "modal-id": unref(realModalId),
3730
3862
  "modal-title": __props.modalTitle
3731
3863
  }, {
3732
3864
  default: withCtx(() => [
3733
- (openBlock(), createBlock(script$m, mergeProps({
3865
+ (openBlock(), createBlock(script$o, mergeProps({
3734
3866
  onSuccess: success,
3735
3867
  onFieldChanged: fieldChanged,
3736
3868
  onFormSubmitted: formSubmitted,
@@ -3746,11 +3878,11 @@ return (_ctx, _cache) => {
3746
3878
 
3747
3879
  };
3748
3880
 
3749
- script$j.__file = "src/lib/components/ShModalForm.vue";
3881
+ script$l.__file = "src/lib/components/ShModalForm.vue";
3750
3882
 
3751
- const _hoisted_1$f = ["href"];
3883
+ const _hoisted_1$h = ["href"];
3752
3884
 
3753
- var script$i = {
3885
+ var script$k = {
3754
3886
  __name: 'ShModalFormAuto',
3755
3887
  props: ['action',
3756
3888
  'classes',
@@ -3788,13 +3920,13 @@ return (_ctx, _cache) => {
3788
3920
  "data-bs-toggle": "modal"
3789
3921
  }, [
3790
3922
  renderSlot(_ctx.$slots, "default")
3791
- ], 10 /* CLASS, PROPS */, _hoisted_1$f),
3792
- createVNode(script$k, {
3923
+ ], 10 /* CLASS, PROPS */, _hoisted_1$h),
3924
+ createVNode(script$m, {
3793
3925
  "modal-id": modalId,
3794
3926
  "modal-title": __props.modalTitle
3795
3927
  }, {
3796
3928
  default: withCtx(() => [
3797
- createVNode(script$m, mergeProps({ onSuccess: success }, props), null, 16 /* FULL_PROPS */)
3929
+ createVNode(script$o, mergeProps({ onSuccess: success }, props), null, 16 /* FULL_PROPS */)
3798
3930
  ]),
3799
3931
  _: 1 /* STABLE */
3800
3932
  }, 8 /* PROPS */, ["modal-title"])
@@ -3804,17 +3936,17 @@ return (_ctx, _cache) => {
3804
3936
 
3805
3937
  };
3806
3938
 
3807
- script$i.__file = "src/lib/components/ShModalFormAuto.vue";
3939
+ script$k.__file = "src/lib/components/ShModalFormAuto.vue";
3808
3940
 
3809
- const _hoisted_1$e = ["id"];
3810
- const _hoisted_2$8 = { class: "offcanvas-header" };
3811
- const _hoisted_3$8 = {
3941
+ const _hoisted_1$g = ["data-bs-scroll", "id"];
3942
+ const _hoisted_2$a = { class: "offcanvas-header" };
3943
+ const _hoisted_3$9 = {
3812
3944
  class: "offcanvas-title",
3813
3945
  id: "offcanvasScrollingLabel"
3814
3946
  };
3815
- const _hoisted_4$8 = { class: "offcanvas-body" };
3947
+ const _hoisted_4$9 = { class: "offcanvas-body" };
3816
3948
 
3817
- var script$h = {
3949
+ var script$j = {
3818
3950
  __name: 'ShCanvas',
3819
3951
  props: {
3820
3952
  canvasId: {
@@ -3832,6 +3964,9 @@ var script$h = {
3832
3964
  },
3833
3965
  side: {
3834
3966
  type: String
3967
+ },
3968
+ scrollable: {
3969
+ type: Boolean
3835
3970
  }
3836
3971
  },
3837
3972
  emits: ['canvasClosed'],
@@ -3852,13 +3987,13 @@ onMounted(()=>{
3852
3987
  return (_ctx, _cache) => {
3853
3988
  return (openBlock(), createElementBlock("div", {
3854
3989
  class: normalizeClass(["offcanvas", canvasSide.value +' '+ __props.canvasSize + '']),
3855
- "data-bs-scroll": "true",
3990
+ "data-bs-scroll": __props.scrollable,
3856
3991
  tabindex: "-1",
3857
3992
  id: __props.canvasId,
3858
3993
  "aria-labelledby": "offcanvasScrollingLabel"
3859
3994
  }, [
3860
- createElementVNode("div", _hoisted_2$8, [
3861
- createElementVNode("h5", _hoisted_3$8, toDisplayString(__props.canvasTitle), 1 /* TEXT */),
3995
+ createElementVNode("div", _hoisted_2$a, [
3996
+ createElementVNode("h5", _hoisted_3$9, toDisplayString(__props.canvasTitle), 1 /* TEXT */),
3862
3997
  createElementVNode("button", {
3863
3998
  type: "button",
3864
3999
  ref: "closecanvas",
@@ -3868,32 +4003,32 @@ return (_ctx, _cache) => {
3868
4003
  "aria-label": "Close"
3869
4004
  }, null, 512 /* NEED_PATCH */)
3870
4005
  ]),
3871
- createElementVNode("div", _hoisted_4$8, [
4006
+ createElementVNode("div", _hoisted_4$9, [
3872
4007
  renderSlot(_ctx.$slots, "default")
3873
4008
  ])
3874
- ], 10 /* CLASS, PROPS */, _hoisted_1$e))
4009
+ ], 10 /* CLASS, PROPS */, _hoisted_1$g))
3875
4010
  }
3876
4011
  }
3877
4012
 
3878
4013
  };
3879
4014
 
3880
- script$h.__file = "src/lib/components/ShCanvas.vue";
4015
+ script$j.__file = "src/lib/components/ShCanvas.vue";
3881
4016
 
3882
- const _hoisted_1$d = { class: "callout callout-info" };
4017
+ const _hoisted_1$f = { class: "callout callout-info" };
3883
4018
 
3884
- function render$1(_ctx, _cache) {
3885
- return (openBlock(), createElementBlock("div", _hoisted_1$d, [
4019
+ function render$2(_ctx, _cache) {
4020
+ return (openBlock(), createElementBlock("div", _hoisted_1$f, [
3886
4021
  renderSlot(_ctx.$slots, "default", {}, () => [
3887
4022
  createTextVNode(" No records found ")
3888
4023
  ])
3889
4024
  ]))
3890
4025
  }
3891
4026
 
3892
- const script$g = {};
4027
+ const script$i = {};
3893
4028
 
3894
- script$g.render = render$1;
3895
- script$g.__scopeId = "data-v-55cf77fb";
3896
- script$g.__file = "src/lib/components/others/NoRecords.vue";
4029
+ script$i.render = render$2;
4030
+ script$i.__scopeId = "data-v-55cf77fb";
4031
+ script$i.__file = "src/lib/components/others/NoRecords.vue";
3897
4032
 
3898
4033
  const useUserStore = defineStore('user-store', {
3899
4034
  state: () => ({
@@ -3920,7 +4055,7 @@ const useUserStore = defineStore('user-store', {
3920
4055
  } else {
3921
4056
  permissions = this.permissions;
3922
4057
  }
3923
- return !!permissions[slug]
4058
+ return permissions.includes(slug)
3924
4059
  }
3925
4060
  return false
3926
4061
  };
@@ -3946,7 +4081,7 @@ const useUserStore = defineStore('user-store', {
3946
4081
  } else {
3947
4082
  permissions = this.permissions;
3948
4083
  }
3949
- return !!permissions[slug]
4084
+ return permissions.includes(slug)
3950
4085
  }
3951
4086
  return false
3952
4087
  };
@@ -3991,7 +4126,7 @@ const useUserStore = defineStore('user-store', {
3991
4126
  }
3992
4127
  });
3993
4128
 
3994
- var script$f = {
4129
+ var script$h = {
3995
4130
  name: 'Pagination',
3996
4131
  props: ['pagination_data', 'loadMore', 'hideCount', 'hideLoadMore', 'paginationStyle','perPage'],
3997
4132
  data () {
@@ -4070,27 +4205,27 @@ var script$f = {
4070
4205
  }
4071
4206
  };
4072
4207
 
4073
- const _hoisted_1$c = { key: 0 };
4074
- const _hoisted_2$7 = { class: "record_count_body mb-3" };
4075
- const _hoisted_3$7 = /*#__PURE__*/createElementVNode("span", { class: "per_page_show" }, "Showing", -1 /* HOISTED */);
4076
- const _hoisted_4$7 = ["value"];
4077
- const _hoisted_5$6 = { class: "record_counts" };
4078
- const _hoisted_6$5 = {
4208
+ const _hoisted_1$e = { key: 0 };
4209
+ const _hoisted_2$9 = { class: "record_count_body mb-3" };
4210
+ const _hoisted_3$8 = /*#__PURE__*/createElementVNode("span", { class: "per_page_show" }, "Showing", -1 /* HOISTED */);
4211
+ const _hoisted_4$8 = ["value"];
4212
+ const _hoisted_5$7 = { class: "record_counts" };
4213
+ const _hoisted_6$6 = {
4079
4214
  key: 0,
4080
4215
  "aria-label": "Page navigation"
4081
4216
  };
4082
- const _hoisted_7$4 = { class: "pagination" };
4083
- const _hoisted_8$4 = {
4217
+ const _hoisted_7$5 = { class: "pagination" };
4218
+ const _hoisted_8$5 = {
4084
4219
  key: 0,
4085
4220
  class: "page-link"
4086
4221
  };
4087
- const _hoisted_9$4 = {
4222
+ const _hoisted_9$5 = {
4088
4223
  key: 1,
4089
4224
  class: "page-link"
4090
4225
  };
4091
- const _hoisted_10$4 = ["onClick"];
4092
- const _hoisted_11$4 = { key: 1 };
4093
- const _hoisted_12$2 = {
4226
+ const _hoisted_10$5 = ["onClick"];
4227
+ const _hoisted_11$5 = { key: 1 };
4228
+ const _hoisted_12$4 = {
4094
4229
  key: 0,
4095
4230
  class: "text-center"
4096
4231
  };
@@ -4115,11 +4250,11 @@ const _hoisted_18$2 = {
4115
4250
  class: "spinner-border"
4116
4251
  };
4117
4252
 
4118
- function render(_ctx, _cache, $props, $setup, $data, $options) {
4253
+ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
4119
4254
  return ($props.paginationStyle !== 'loadMore')
4120
- ? (openBlock(), createElementBlock("div", _hoisted_1$c, [
4121
- createElementVNode("div", _hoisted_2$7, [
4122
- _hoisted_3$7,
4255
+ ? (openBlock(), createElementBlock("div", _hoisted_1$e, [
4256
+ createElementVNode("div", _hoisted_2$9, [
4257
+ _hoisted_3$8,
4123
4258
  createTextVNode("  "),
4124
4259
  withDirectives(createElementVNode("select", {
4125
4260
  class: "select_per_page",
@@ -4127,16 +4262,16 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
4127
4262
  "onUpdate:modelValue": _cache[1] || (_cache[1] = $event => (($data.per_page) = $event))
4128
4263
  }, [
4129
4264
  (openBlock(true), createElementBlock(Fragment, null, renderList($data.pageOptions, (option) => {
4130
- return (openBlock(), createElementBlock("option", { value: option }, toDisplayString(option), 9 /* TEXT, PROPS */, _hoisted_4$7))
4265
+ return (openBlock(), createElementBlock("option", { value: option }, toDisplayString(option), 9 /* TEXT, PROPS */, _hoisted_4$8))
4131
4266
  }), 256 /* UNKEYED_FRAGMENT */))
4132
4267
  ], 544 /* NEED_HYDRATION, NEED_PATCH */), [
4133
4268
  [vModelSelect, $data.per_page]
4134
4269
  ]),
4135
- createElementVNode("span", _hoisted_5$6, " of " + toDisplayString($props.pagination_data.record_count) + " items", 1 /* TEXT */)
4270
+ createElementVNode("span", _hoisted_5$7, " of " + toDisplayString($props.pagination_data.record_count) + " items", 1 /* TEXT */)
4136
4271
  ]),
4137
4272
  ($props.pagination_data != null)
4138
- ? (openBlock(), createElementBlock("nav", _hoisted_6$5, [
4139
- createElementVNode("ul", _hoisted_7$4, [
4273
+ ? (openBlock(), createElementBlock("nav", _hoisted_6$6, [
4274
+ createElementVNode("ul", _hoisted_7$5, [
4140
4275
  createElementVNode("li", {
4141
4276
  class: normalizeClass([$options.getActivePage === 1 ? 'disabled' : '' , "page-item"])
4142
4277
  }, [
@@ -4151,14 +4286,14 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
4151
4286
  key: page
4152
4287
  }, [
4153
4288
  ($options.getActivePage === page)
4154
- ? (openBlock(), createElementBlock("a", _hoisted_8$4, toDisplayString(page), 1 /* TEXT */))
4289
+ ? (openBlock(), createElementBlock("a", _hoisted_8$5, toDisplayString(page), 1 /* TEXT */))
4155
4290
  : (['..','...'].includes(page))
4156
- ? (openBlock(), createElementBlock("a", _hoisted_9$4, toDisplayString(page), 1 /* TEXT */))
4291
+ ? (openBlock(), createElementBlock("a", _hoisted_9$5, toDisplayString(page), 1 /* TEXT */))
4157
4292
  : (openBlock(), createElementBlock("a", {
4158
4293
  key: 2,
4159
4294
  onClick: $event => ($options.changeTableKey('page',page)),
4160
4295
  class: "page-link"
4161
- }, toDisplayString(page), 9 /* TEXT, PROPS */, _hoisted_10$4))
4296
+ }, toDisplayString(page), 9 /* TEXT, PROPS */, _hoisted_10$5))
4162
4297
  ], 2 /* CLASS */))
4163
4298
  }), 128 /* KEYED_FRAGMENT */)),
4164
4299
  createElementVNode("li", {
@@ -4173,9 +4308,9 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
4173
4308
  ]))
4174
4309
  : createCommentVNode("v-if", true)
4175
4310
  ]))
4176
- : (openBlock(), createElementBlock("div", _hoisted_11$4, [
4311
+ : (openBlock(), createElementBlock("div", _hoisted_11$5, [
4177
4312
  (this.pagination_data.loading === 1 && $props.loadMore && $props.hideLoadMore)
4178
- ? (openBlock(), createElementBlock("div", _hoisted_12$2, [..._hoisted_14$2]))
4313
+ ? (openBlock(), createElementBlock("div", _hoisted_12$4, [..._hoisted_14$2]))
4179
4314
  : createCommentVNode("v-if", true),
4180
4315
  (!$props.hideCount)
4181
4316
  ? (openBlock(), createElementBlock("div", _hoisted_15$2, [
@@ -4196,17 +4331,17 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
4196
4331
  ]))
4197
4332
  }
4198
4333
 
4199
- script$f.render = render;
4200
- script$f.__file = "src/lib/components/list_templates/Pagination.vue";
4334
+ script$h.render = render$1;
4335
+ script$h.__file = "src/lib/components/list_templates/Pagination.vue";
4201
4336
 
4202
- const _hoisted_1$b = /*#__PURE__*/createElementVNode("span", {
4337
+ const _hoisted_1$d = /*#__PURE__*/createElementVNode("span", {
4203
4338
  class: "spinner-border spinner-border-sm me-1",
4204
4339
  role: "status",
4205
4340
  "aria-hidden": "true"
4206
4341
  }, null, -1 /* HOISTED */);
4207
4342
 
4208
4343
 
4209
- var script$e = {
4344
+ var script$g = {
4210
4345
  __name: 'ShConfirmAction',
4211
4346
  props: {
4212
4347
  data: Object,
@@ -4218,7 +4353,7 @@ var script$e = {
4218
4353
  },
4219
4354
  loadingMessage: {
4220
4355
  type: String,
4221
- default: 'Processing'
4356
+ default: 'Processing...'
4222
4357
  },
4223
4358
  successMessage: {
4224
4359
  type: String,
@@ -4277,7 +4412,7 @@ return (_ctx, _cache) => {
4277
4412
  }, [
4278
4413
  (processing.value)
4279
4414
  ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
4280
- _hoisted_1$b,
4415
+ _hoisted_1$d,
4281
4416
  createElementVNode("span", null, toDisplayString(__props.loadingMessage), 1 /* TEXT */)
4282
4417
  ], 64 /* STABLE_FRAGMENT */))
4283
4418
  : createCommentVNode("v-if", true),
@@ -4290,15 +4425,15 @@ return (_ctx, _cache) => {
4290
4425
 
4291
4426
  };
4292
4427
 
4293
- script$e.__file = "src/lib/components/ShConfirmAction.vue";
4428
+ script$g.__file = "src/lib/components/ShConfirmAction.vue";
4294
4429
 
4295
- const _hoisted_1$a = /*#__PURE__*/createElementVNode("span", {
4430
+ const _hoisted_1$c = /*#__PURE__*/createElementVNode("span", {
4296
4431
  class: "spinner-border spinner-border-sm me-1",
4297
4432
  role: "status",
4298
4433
  "aria-hidden": "true"
4299
4434
  }, null, -1 /* HOISTED */);
4300
4435
 
4301
- var script$d = {
4436
+ var script$f = {
4302
4437
  __name: 'ShSilentAction',
4303
4438
  props: {
4304
4439
  data: Object,
@@ -4376,7 +4511,7 @@ return (_ctx, _cache) => {
4376
4511
  }, [
4377
4512
  (processing.value)
4378
4513
  ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
4379
- _hoisted_1$a,
4514
+ _hoisted_1$c,
4380
4515
  createElementVNode("span", null, toDisplayString(__props.loadingMessage), 1 /* TEXT */)
4381
4516
  ], 64 /* STABLE_FRAGMENT */))
4382
4517
  : createCommentVNode("v-if", true),
@@ -4389,11 +4524,11 @@ return (_ctx, _cache) => {
4389
4524
 
4390
4525
  };
4391
4526
 
4392
- script$d.__file = "src/lib/components/ShSilentAction.vue";
4527
+ script$f.__file = "src/lib/components/ShSilentAction.vue";
4393
4528
 
4394
- const _hoisted_1$9 = { class: "sh-range" };
4395
- const _hoisted_2$6 = { class: "dropdown" };
4396
- const _hoisted_3$6 = {
4529
+ const _hoisted_1$b = { class: "sh-range" };
4530
+ const _hoisted_2$8 = { class: "dropdown" };
4531
+ const _hoisted_3$7 = {
4397
4532
  class: "form-control dropdown-toggle",
4398
4533
  href: "#",
4399
4534
  role: "button",
@@ -4401,21 +4536,21 @@ const _hoisted_3$6 = {
4401
4536
  "data-bs-toggle": "dropdown",
4402
4537
  "aria-expanded": "false"
4403
4538
  };
4404
- const _hoisted_4$6 = /*#__PURE__*/createElementVNode("i", { class: "bi-calendar text-dark" }, null, -1 /* HOISTED */);
4405
- const _hoisted_5$5 = ["innerHTML"];
4406
- const _hoisted_6$4 = {
4539
+ const _hoisted_4$7 = /*#__PURE__*/createElementVNode("i", { class: "bi-calendar text-dark" }, null, -1 /* HOISTED */);
4540
+ const _hoisted_5$6 = ["innerHTML"];
4541
+ const _hoisted_6$5 = {
4407
4542
  class: "dropdown-menu sh-range-dropdown",
4408
4543
  "aria-labelledby": "dropdownMenuLink"
4409
4544
  };
4410
- const _hoisted_7$3 = { class: "sh-range-preset" };
4411
- const _hoisted_8$3 = ["onClick"];
4412
- const _hoisted_9$3 = { class: "border-top" };
4413
- const _hoisted_10$3 = { class: "dropdown-item d-flex flex-column" };
4414
- const _hoisted_11$3 = /*#__PURE__*/createElementVNode("span", null, "Custom", -1 /* HOISTED */);
4545
+ const _hoisted_7$4 = { class: "sh-range-preset" };
4546
+ const _hoisted_8$4 = ["onClick"];
4547
+ const _hoisted_9$4 = { class: "border-top" };
4548
+ const _hoisted_10$4 = { class: "dropdown-item d-flex flex-column" };
4549
+ const _hoisted_11$4 = /*#__PURE__*/createElementVNode("span", null, "Custom", -1 /* HOISTED */);
4415
4550
 
4416
4551
 
4417
4552
 
4418
- var script$c = {
4553
+ var script$e = {
4419
4554
  __name: 'ShRange',
4420
4555
  props: {
4421
4556
  start: {
@@ -4524,15 +4659,15 @@ onMounted(() => {
4524
4659
  });
4525
4660
 
4526
4661
  return (_ctx, _cache) => {
4527
- return (openBlock(), createElementBlock("div", _hoisted_1$9, [
4528
- createElementVNode("div", _hoisted_2$6, [
4529
- createElementVNode("div", _hoisted_3$6, [
4530
- _hoisted_4$6,
4662
+ return (openBlock(), createElementBlock("div", _hoisted_1$b, [
4663
+ createElementVNode("div", _hoisted_2$8, [
4664
+ createElementVNode("div", _hoisted_3$7, [
4665
+ _hoisted_4$7,
4531
4666
  createTextVNode(),
4532
- createElementVNode("span", { innerHTML: rangeLabel.value }, null, 8 /* PROPS */, _hoisted_5$5)
4667
+ createElementVNode("span", { innerHTML: rangeLabel.value }, null, 8 /* PROPS */, _hoisted_5$6)
4533
4668
  ]),
4534
- createElementVNode("div", _hoisted_6$4, [
4535
- createElementVNode("ul", _hoisted_7$3, [
4669
+ createElementVNode("div", _hoisted_6$5, [
4670
+ createElementVNode("ul", _hoisted_7$4, [
4536
4671
  (openBlock(true), createElementBlock(Fragment, null, renderList(dates.value, (date) => {
4537
4672
  return (openBlock(), createElementBlock("li", {
4538
4673
  key: date.label,
@@ -4542,13 +4677,13 @@ return (_ctx, _cache) => {
4542
4677
  class: normalizeClass(["dropdown-item", date.value === selectedDate.value ? 'active' : '']),
4543
4678
  href: "#"
4544
4679
  }, toDisplayString(date.label), 3 /* TEXT, CLASS */)
4545
- ], 8 /* PROPS */, _hoisted_8$3))
4680
+ ], 8 /* PROPS */, _hoisted_8$4))
4546
4681
  }), 128 /* KEYED_FRAGMENT */))
4547
4682
  ]),
4548
4683
  createElementVNode("ul", null, [
4549
- createElementVNode("li", _hoisted_9$3, [
4550
- createElementVNode("div", _hoisted_10$3, [
4551
- _hoisted_11$3,
4684
+ createElementVNode("li", _hoisted_9$4, [
4685
+ createElementVNode("div", _hoisted_10$4, [
4686
+ _hoisted_11$4,
4552
4687
  createElementVNode("div", null, [
4553
4688
  withDirectives(createElementVNode("input", {
4554
4689
  "onUpdate:modelValue": _cache[0] || (_cache[0] = $event => ((customFrom).value = $event)),
@@ -4581,33 +4716,33 @@ return (_ctx, _cache) => {
4581
4716
 
4582
4717
  };
4583
4718
 
4584
- script$c.__file = "src/lib/components/ShRange.vue";
4719
+ script$e.__file = "src/lib/components/ShRange.vue";
4585
4720
 
4586
- const _hoisted_1$8 = { class: "auto-table mt-2" };
4587
- const _hoisted_2$5 = {
4721
+ const _hoisted_1$a = { class: "auto-table mt-2" };
4722
+ const _hoisted_2$7 = {
4588
4723
  key: 0,
4589
4724
  class: "col-md-4 mb-2"
4590
4725
  };
4591
- const _hoisted_3$5 = ["disabled"];
4592
- const _hoisted_4$5 = /*#__PURE__*/createElementVNode("i", { class: "bi-download" }, null, -1 /* HOISTED */);
4593
- const _hoisted_5$4 = /*#__PURE__*/createElementVNode("span", {
4726
+ const _hoisted_3$6 = ["disabled"];
4727
+ const _hoisted_4$6 = /*#__PURE__*/createElementVNode("i", { class: "bi-download" }, null, -1 /* HOISTED */);
4728
+ const _hoisted_5$5 = /*#__PURE__*/createElementVNode("span", {
4594
4729
  class: "spinner-border spinner-border-sm",
4595
4730
  role: "status",
4596
4731
  "aria-hidden": "true"
4597
4732
  }, null, -1 /* HOISTED */);
4598
- const _hoisted_6$3 = /*#__PURE__*/createElementVNode("span", { class: "visually-hidden" }, "Loading...", -1 /* HOISTED */);
4599
- const _hoisted_7$2 = {
4733
+ const _hoisted_6$4 = /*#__PURE__*/createElementVNode("span", { class: "visually-hidden" }, "Loading...", -1 /* HOISTED */);
4734
+ const _hoisted_7$3 = {
4600
4735
  key: 1,
4601
4736
  class: "row"
4602
4737
  };
4603
- const _hoisted_8$2 = { class: "col-12 mb-3 d-flex justify-content-between flex-column flex-md-row flex-lg-row" };
4604
- const _hoisted_9$2 = ["placeholder"];
4605
- const _hoisted_10$2 = {
4738
+ const _hoisted_8$3 = { class: "col-12 mb-3 d-flex justify-content-between flex-column flex-md-row flex-lg-row" };
4739
+ const _hoisted_9$3 = ["placeholder"];
4740
+ const _hoisted_10$3 = {
4606
4741
  key: 0,
4607
4742
  class: "input-group-text exact_checkbox"
4608
4743
  };
4609
- const _hoisted_11$2 = /*#__PURE__*/createElementVNode("span", { class: "ms-1" }, "Exact", -1 /* HOISTED */);
4610
- const _hoisted_12$1 = {
4744
+ const _hoisted_11$3 = /*#__PURE__*/createElementVNode("span", { class: "ms-1" }, "Exact", -1 /* HOISTED */);
4745
+ const _hoisted_12$3 = {
4611
4746
  key: 0,
4612
4747
  class: "sh-range-selector"
4613
4748
  };
@@ -5037,11 +5172,11 @@ const __default__ = {
5037
5172
  }
5038
5173
  },
5039
5174
  components: {
5040
- ShRange: script$c,
5041
- ShSilentAction: script$d,
5042
- ShConfirmAction: script$e,
5043
- ShCanvas: script$h,
5044
- pagination: script$f
5175
+ ShRange: script$e,
5176
+ ShSilentAction: script$f,
5177
+ ShConfirmAction: script$g,
5178
+ ShCanvas: script$j,
5179
+ pagination: script$h
5045
5180
  },
5046
5181
  computed: {
5047
5182
  windowWidth: function (){
@@ -5060,19 +5195,19 @@ const __default__ = {
5060
5195
  };
5061
5196
 
5062
5197
 
5063
- var script$b = /*#__PURE__*/Object.assign(__default__, {
5198
+ var script$d = /*#__PURE__*/Object.assign(__default__, {
5064
5199
  setup(__props) {
5065
5200
 
5066
- const noRecordsComponent = inject('noRecordsComponent', script$g);
5201
+ const noRecordsComponent = inject('noRecordsComponent', script$i);
5067
5202
 
5068
5203
  const {user} = storeToRefs(useUserStore());
5069
5204
 
5070
5205
  return (_ctx, _cache) => {
5071
5206
  const _component_router_link = resolveComponent("router-link");
5072
5207
 
5073
- return (openBlock(), createElementBlock("div", _hoisted_1$8, [
5208
+ return (openBlock(), createElementBlock("div", _hoisted_1$a, [
5074
5209
  (__props.hasDownload)
5075
- ? (openBlock(), createElementBlock("div", _hoisted_2$5, [
5210
+ ? (openBlock(), createElementBlock("div", _hoisted_2$7, [
5076
5211
  createElementVNode("button", {
5077
5212
  disabled: _ctx.downloading,
5078
5213
  class: "btn btn-warning btn-sm",
@@ -5080,19 +5215,19 @@ return (_ctx, _cache) => {
5080
5215
  }, [
5081
5216
  (!_ctx.downloading)
5082
5217
  ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
5083
- _hoisted_4$5,
5218
+ _hoisted_4$6,
5084
5219
  createTextVNode(" Export ")
5085
5220
  ], 64 /* STABLE_FRAGMENT */))
5086
5221
  : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
5087
- _hoisted_5$4,
5088
- _hoisted_6$3
5222
+ _hoisted_5$5,
5223
+ _hoisted_6$4
5089
5224
  ], 64 /* STABLE_FRAGMENT */))
5090
- ], 8 /* PROPS */, _hoisted_3$5)
5225
+ ], 8 /* PROPS */, _hoisted_3$6)
5091
5226
  ]))
5092
5227
  : createCommentVNode("v-if", true),
5093
5228
  (!__props.hideSearch)
5094
- ? (openBlock(), createElementBlock("div", _hoisted_7$2, [
5095
- createElementVNode("div", _hoisted_8$2, [
5229
+ ? (openBlock(), createElementBlock("div", _hoisted_7$3, [
5230
+ createElementVNode("div", _hoisted_8$3, [
5096
5231
  createElementVNode("div", {
5097
5232
  class: normalizeClass(["sh-search-bar input-group", __props.hasRange ? 'me-2':''])
5098
5233
  }, [
@@ -5104,11 +5239,11 @@ return (_ctx, _cache) => {
5104
5239
  "onUpdate:modelValue": _cache[4] || (_cache[4] = $event => ((_ctx.filter_value) = $event)),
5105
5240
  placeholder: __props.searchPlaceholder ? __props.searchPlaceholder : 'Search',
5106
5241
  class: "form-control sh-search-input"
5107
- }, null, 40 /* PROPS, NEED_HYDRATION */, _hoisted_9$2), [
5242
+ }, null, 40 /* PROPS, NEED_HYDRATION */, _hoisted_9$3), [
5108
5243
  [vModelText, _ctx.filter_value]
5109
5244
  ]),
5110
5245
  (_ctx.filter_value.length > 1)
5111
- ? (openBlock(), createElementBlock("span", _hoisted_10$2, [
5246
+ ? (openBlock(), createElementBlock("span", _hoisted_10$3, [
5112
5247
  withDirectives(createElementVNode("input", {
5113
5248
  onChange: _cache[5] || (_cache[5] = (...args) => (_ctx.reloadData && _ctx.reloadData(...args))),
5114
5249
  value: true,
@@ -5117,13 +5252,13 @@ return (_ctx, _cache) => {
5117
5252
  }, null, 544 /* NEED_HYDRATION, NEED_PATCH */), [
5118
5253
  [vModelCheckbox, _ctx.exactMatch]
5119
5254
  ]),
5120
- _hoisted_11$2
5255
+ _hoisted_11$3
5121
5256
  ]))
5122
5257
  : createCommentVNode("v-if", true)
5123
5258
  ], 2 /* CLASS */),
5124
5259
  (__props.hasRange)
5125
- ? (openBlock(), createElementBlock("div", _hoisted_12$1, [
5126
- createVNode(script$c, { onRangeSelected: _ctx.rangeChanged }, null, 8 /* PROPS */, ["onRangeSelected"])
5260
+ ? (openBlock(), createElementBlock("div", _hoisted_12$3, [
5261
+ createVNode(script$e, { onRangeSelected: _ctx.rangeChanged }, null, 8 /* PROPS */, ["onRangeSelected"])
5127
5262
  ]))
5128
5263
  : createCommentVNode("v-if", true)
5129
5264
  ])
@@ -5278,7 +5413,7 @@ return (_ctx, _cache) => {
5278
5413
  (!act.validator || act.validator(record))
5279
5414
  ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
5280
5415
  (['confirmAction','confirmaction','confirm-action','confirm'].includes(act.type))
5281
- ? (openBlock(), createBlock(script$e, {
5416
+ ? (openBlock(), createBlock(script$g, {
5282
5417
  key: 0,
5283
5418
  onActionSuccessful: $event => (_ctx.doEmitAction('actionSuccessful',record)),
5284
5419
  onActionFailed: $event => (_ctx.doEmitAction('actionFailed',record)),
@@ -5299,7 +5434,7 @@ return (_ctx, _cache) => {
5299
5434
  _: 2 /* DYNAMIC */
5300
5435
  }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["onActionSuccessful", "onActionFailed", "onActionCanceled", "loading-message", "class", "url"]))
5301
5436
  : (['silentAction','silentaction','silent-action','silent'].includes(act.type))
5302
- ? (openBlock(), createBlock(script$d, {
5437
+ ? (openBlock(), createBlock(script$f, {
5303
5438
  key: 1,
5304
5439
  onActionSuccessful: $event => (_ctx.doEmitAction('actionSuccessful',record)),
5305
5440
  onActionFailed: $event => (_ctx.doEmitAction('actionFailed',record)),
@@ -5510,7 +5645,7 @@ return (_ctx, _cache) => {
5510
5645
  : createCommentVNode("v-if", true)
5511
5646
  ])),
5512
5647
  (_ctx.pagination_data)
5513
- ? (openBlock(), createBlock(script$f, {
5648
+ ? (openBlock(), createBlock(script$h, {
5514
5649
  key: 6,
5515
5650
  onLoadMoreRecords: _ctx.loadMoreRecords,
5516
5651
  "hide-load-more": __props.hideLoadMore,
@@ -5527,7 +5662,7 @@ return (_ctx, _cache) => {
5527
5662
  key: action.label
5528
5663
  }, [
5529
5664
  (action.canvasId)
5530
- ? (openBlock(), createBlock(script$h, {
5665
+ ? (openBlock(), createBlock(script$j, {
5531
5666
  key: 0,
5532
5667
  onOffcanvasClosed: _ctx.canvasClosed,
5533
5668
  position: action.canvasPosition,
@@ -5555,9 +5690,9 @@ return (_ctx, _cache) => {
5555
5690
 
5556
5691
  });
5557
5692
 
5558
- script$b.__file = "src/lib/components/ShTable.vue";
5693
+ script$d.__file = "src/lib/components/ShTable.vue";
5559
5694
 
5560
- var script$a = {
5695
+ var script$c = {
5561
5696
  __name: 'ShTabs',
5562
5697
  props: {
5563
5698
  tabs: {
@@ -5571,6 +5706,9 @@ var script$a = {
5571
5706
  sharedData: {
5572
5707
  type: Object
5573
5708
  },
5709
+ activeTab: {
5710
+ type: String
5711
+ },
5574
5712
  tabCounts: {
5575
5713
  type: Object
5576
5714
  },
@@ -5655,6 +5793,11 @@ const setCounts = (res) => {
5655
5793
  }
5656
5794
  });
5657
5795
  };
5796
+ const activetab = (tab) => {
5797
+ if (props.activeTab) {
5798
+ return props.activeTab === tab ? 'active' : 'active'
5799
+ }
5800
+ };
5658
5801
 
5659
5802
  return (_ctx, _cache) => {
5660
5803
  const _component_router_link = resolveComponent("router-link");
@@ -5671,7 +5814,7 @@ return (_ctx, _cache) => {
5671
5814
  }, [
5672
5815
  createVNode(_component_router_link, {
5673
5816
  onClick: $event => (setTab(tab)),
5674
- "active-class": 'active',
5817
+ "active-class": activetab(tab),
5675
5818
  class: normalizeClass(["nav-link text-capitalize", 'sh_tab_' + tab]),
5676
5819
  to: __props.baseUrl+'/tab/'+tab,
5677
5820
  role: "tab"
@@ -5680,7 +5823,7 @@ return (_ctx, _cache) => {
5680
5823
  createTextVNode(toDisplayString(tab.replace(/_/g, ' ')), 1 /* TEXT */)
5681
5824
  ]),
5682
5825
  _: 2 /* DYNAMIC */
5683
- }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["onClick", "to", "class"])
5826
+ }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["onClick", "active-class", "to", "class"])
5684
5827
  ]))
5685
5828
  }), 128 /* KEYED_FRAGMENT */))
5686
5829
  ], 2 /* CLASS */),
@@ -5700,20 +5843,20 @@ return (_ctx, _cache) => {
5700
5843
 
5701
5844
  };
5702
5845
 
5703
- script$a.__file = "src/lib/components/ShTabs.vue";
5846
+ script$c.__file = "src/lib/components/ShTabs.vue";
5704
5847
 
5705
- const _hoisted_1$7 = {
5848
+ const _hoisted_1$9 = {
5706
5849
  class: "nav-item",
5707
5850
  role: "presentation"
5708
5851
  };
5709
- const _hoisted_2$4 = ["onClick"];
5710
- const _hoisted_3$4 = /*#__PURE__*/createElementVNode("i", { class: "d-none" }, null, -1 /* HOISTED */);
5711
- const _hoisted_4$4 = { class: "sh_tab_count" };
5712
- const _hoisted_5$3 = { class: "tab-content" };
5852
+ const _hoisted_2$6 = ["onClick"];
5853
+ const _hoisted_3$5 = /*#__PURE__*/createElementVNode("i", { class: "d-none" }, null, -1 /* HOISTED */);
5854
+ const _hoisted_4$5 = { class: "sh_tab_count" };
5855
+ const _hoisted_5$4 = { class: "tab-content" };
5713
5856
 
5714
- var script$9 = {
5857
+ var script$b = {
5715
5858
  __name: 'ShDynamicTabs',
5716
- props: ['tabs','data','classes'],
5859
+ props: ['tabs','data','classes','currentTab'],
5717
5860
  setup(__props) {
5718
5861
 
5719
5862
  const props = __props;
@@ -5724,7 +5867,11 @@ ref(null);
5724
5867
  onMounted(()=>{
5725
5868
  generatedId.value = 'tab' + Math.random().toString(36).slice(2);
5726
5869
  if(tabs.length > 0) {
5727
- currentTab.value = tabs[0];
5870
+ if (props.currentTab) {
5871
+ currentTab.value = tabs.find(tab=>tab.label === props.currentTab);
5872
+ } else {
5873
+ currentTab.value = tabs[0];
5874
+ }
5728
5875
  }
5729
5876
  });
5730
5877
 
@@ -5739,7 +5886,7 @@ return (_ctx, _cache) => {
5739
5886
  role: "tablist"
5740
5887
  }, [
5741
5888
  (openBlock(true), createElementBlock(Fragment, null, renderList(unref(tabs), (tab) => {
5742
- return (openBlock(), createElementBlock("li", _hoisted_1$7, [
5889
+ return (openBlock(), createElementBlock("li", _hoisted_1$9, [
5743
5890
  createElementVNode("button", {
5744
5891
  onClick: $event => (setTab(tab)),
5745
5892
  class: normalizeClass(["nav-link", unref(currentTab) === tab ? 'active':''])
@@ -5747,15 +5894,15 @@ return (_ctx, _cache) => {
5747
5894
  createTextVNode(toDisplayString(tab.label) + " ", 1 /* TEXT */),
5748
5895
  (tab.count || tab.tabCount)
5749
5896
  ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
5750
- _hoisted_3$4,
5751
- createElementVNode("sup", _hoisted_4$4, toDisplayString(tab.count ?? tab.tabCount), 1 /* TEXT */)
5897
+ _hoisted_3$5,
5898
+ createElementVNode("sup", _hoisted_4$5, toDisplayString(tab.count ?? tab.tabCount), 1 /* TEXT */)
5752
5899
  ], 64 /* STABLE_FRAGMENT */))
5753
5900
  : createCommentVNode("v-if", true)
5754
- ], 10 /* CLASS, PROPS */, _hoisted_2$4)
5901
+ ], 10 /* CLASS, PROPS */, _hoisted_2$6)
5755
5902
  ]))
5756
5903
  }), 256 /* UNKEYED_FRAGMENT */))
5757
5904
  ], 2 /* CLASS */),
5758
- createElementVNode("div", _hoisted_5$3, [
5905
+ createElementVNode("div", _hoisted_5$4, [
5759
5906
  (unref(currentTab))
5760
5907
  ? (openBlock(), createBlock(resolveDynamicComponent(unref(currentTab).component), normalizeProps(mergeProps({ key: 0 }, unref(currentTab))), null, 16 /* FULL_PROPS */))
5761
5908
  : createCommentVNode("v-if", true)
@@ -5766,12 +5913,12 @@ return (_ctx, _cache) => {
5766
5913
 
5767
5914
  };
5768
5915
 
5769
- script$9.__file = "src/lib/components/ShDynamicTabs.vue";
5916
+ script$b.__file = "src/lib/components/ShDynamicTabs.vue";
5770
5917
 
5771
- const _hoisted_1$6 = ["href"];
5918
+ const _hoisted_1$8 = ["href"];
5772
5919
 
5773
5920
 
5774
- var script$8 = {
5921
+ var script$a = {
5775
5922
  __name: 'ShModalBtn',
5776
5923
  props: {
5777
5924
  modalId: {
@@ -5786,18 +5933,18 @@ return (_ctx, _cache) => {
5786
5933
  "data-bs-toggle": "modal"
5787
5934
  }, [
5788
5935
  renderSlot(_ctx.$slots, "default")
5789
- ], 8 /* PROPS */, _hoisted_1$6))
5936
+ ], 8 /* PROPS */, _hoisted_1$8))
5790
5937
  }
5791
5938
  }
5792
5939
 
5793
5940
  };
5794
5941
 
5795
- script$8.__file = "src/lib/components/ShModalBtn.vue";
5942
+ script$a.__file = "src/lib/components/ShModalBtn.vue";
5796
5943
 
5797
- const _hoisted_1$5 = ["href"];
5944
+ const _hoisted_1$7 = ["href"];
5798
5945
 
5799
5946
 
5800
- var script$7 = {
5947
+ var script$9 = {
5801
5948
  __name: 'ShCanvasBtn',
5802
5949
  props: {
5803
5950
  canvasId: {
@@ -5813,44 +5960,44 @@ return (_ctx, _cache) => {
5813
5960
  "data-bs-toggle": "offcanvas"
5814
5961
  }, [
5815
5962
  renderSlot(_ctx.$slots, "default")
5816
- ], 8 /* PROPS */, _hoisted_1$5))
5963
+ ], 8 /* PROPS */, _hoisted_1$7))
5817
5964
  }
5818
5965
  }
5819
5966
 
5820
5967
  };
5821
5968
 
5822
- script$7.__file = "src/lib/components/ShCanvasBtn.vue";
5969
+ script$9.__file = "src/lib/components/ShCanvasBtn.vue";
5823
5970
 
5824
5971
  const _withScopeId$1 = n => (pushScopeId("data-v-0d4fa0ac"),n=n(),popScopeId(),n);
5825
- const _hoisted_1$4 = { class: "row permissions-main d-flex" };
5826
- const _hoisted_2$3 = {
5972
+ const _hoisted_1$6 = { class: "row permissions-main d-flex" };
5973
+ const _hoisted_2$5 = {
5827
5974
  id: "permissions-nav",
5828
5975
  class: "col-md-3 d-flex align-items-center py-4"
5829
5976
  };
5830
- const _hoisted_3$3 = {
5977
+ const _hoisted_3$4 = {
5831
5978
  key: 0,
5832
5979
  class: "mx-auto"
5833
5980
  };
5834
- const _hoisted_4$3 = /*#__PURE__*/ _withScopeId$1(() => /*#__PURE__*/createElementVNode("span", { class: "spinner-grow mx-auto" }, null, -1 /* HOISTED */));
5835
- const _hoisted_5$2 = [
5836
- _hoisted_4$3
5981
+ const _hoisted_4$4 = /*#__PURE__*/ _withScopeId$1(() => /*#__PURE__*/createElementVNode("span", { class: "spinner-grow mx-auto" }, null, -1 /* HOISTED */));
5982
+ const _hoisted_5$3 = [
5983
+ _hoisted_4$4
5837
5984
  ];
5838
- const _hoisted_6$2 = {
5985
+ const _hoisted_6$3 = {
5839
5986
  key: 1,
5840
5987
  class: "d-flex flex-column w-100 px-2"
5841
5988
  };
5842
- const _hoisted_7$1 = ["checked", "onClick", "disabled"];
5843
- const _hoisted_8$1 = ["onClick"];
5844
- const _hoisted_9$1 = {
5989
+ const _hoisted_7$2 = ["checked", "onClick", "disabled"];
5990
+ const _hoisted_8$2 = ["onClick"];
5991
+ const _hoisted_9$2 = {
5845
5992
  id: "permissions-content",
5846
5993
  class: "col-md-9 py-4 px-4"
5847
5994
  };
5848
- const _hoisted_10$1 = { class: "p-2 rounded-2 bg-white h-100" };
5849
- const _hoisted_11$1 = {
5995
+ const _hoisted_10$2 = { class: "p-2 rounded-2 bg-white h-100" };
5996
+ const _hoisted_11$2 = {
5850
5997
  key: 0,
5851
5998
  class: "alert alert-info"
5852
5999
  };
5853
- const _hoisted_12 = { key: 1 };
6000
+ const _hoisted_12$2 = { key: 1 };
5854
6001
  const _hoisted_13 = { class: "row row-cols-3" };
5855
6002
  const _hoisted_14 = { class: "col" };
5856
6003
  const _hoisted_15 = ["value"];
@@ -5862,7 +6009,7 @@ const _hoisted_17 = { class: "col-md-3" };
5862
6009
  const _hoisted_18 = /*#__PURE__*/ _withScopeId$1(() => /*#__PURE__*/createElementVNode("i", { class: "bi-check" }, null, -1 /* HOISTED */));
5863
6010
 
5864
6011
 
5865
- var script$6 = {
6012
+ var script$8 = {
5866
6013
  __name: 'ManagePermissions',
5867
6014
  emits: ['success'],
5868
6015
  setup(__props, { emit: __emit }) {
@@ -5966,11 +6113,11 @@ const getPermissionStyle = permission => {
5966
6113
  };
5967
6114
 
5968
6115
  return (_ctx, _cache) => {
5969
- return (openBlock(), createElementBlock("div", _hoisted_1$4, [
5970
- createElementVNode("div", _hoisted_2$3, [
6116
+ return (openBlock(), createElementBlock("div", _hoisted_1$6, [
6117
+ createElementVNode("div", _hoisted_2$5, [
5971
6118
  (loadingModules.value)
5972
- ? (openBlock(), createElementBlock("div", _hoisted_3$3, [..._hoisted_5$2]))
5973
- : (openBlock(), createElementBlock("ul", _hoisted_6$2, [
6119
+ ? (openBlock(), createElementBlock("div", _hoisted_3$4, [..._hoisted_5$3]))
6120
+ : (openBlock(), createElementBlock("ul", _hoisted_6$3, [
5974
6121
  (openBlock(true), createElementBlock(Fragment, null, renderList(modules.value, (module) => {
5975
6122
  return (openBlock(), createElementBlock("li", {
5976
6123
  class: normalizeClass(selectedModule.value === module && 'active'),
@@ -5981,20 +6128,20 @@ return (_ctx, _cache) => {
5981
6128
  onClick: $event => (checkAllPermissions(module)),
5982
6129
  disabled: selectedModule.value !== module,
5983
6130
  type: "checkbox"
5984
- }, null, 8 /* PROPS */, _hoisted_7$1),
6131
+ }, null, 8 /* PROPS */, _hoisted_7$2),
5985
6132
  createElementVNode("label", {
5986
6133
  class: "text-capitalize",
5987
6134
  onClick: $event => (setModule(module))
5988
- }, toDisplayString(module.replaceAll('_',' ')), 9 /* TEXT, PROPS */, _hoisted_8$1)
6135
+ }, toDisplayString(module.replaceAll('_',' ')), 9 /* TEXT, PROPS */, _hoisted_8$2)
5989
6136
  ], 2 /* CLASS */))
5990
6137
  }), 128 /* KEYED_FRAGMENT */))
5991
6138
  ]))
5992
6139
  ]),
5993
- createElementVNode("div", _hoisted_9$1, [
5994
- createElementVNode("div", _hoisted_10$1, [
6140
+ createElementVNode("div", _hoisted_9$2, [
6141
+ createElementVNode("div", _hoisted_10$2, [
5995
6142
  (loading.value)
5996
- ? (openBlock(), createElementBlock("div", _hoisted_11$1, " loading ... "))
5997
- : (openBlock(), createElementBlock("div", _hoisted_12, [
6143
+ ? (openBlock(), createElementBlock("div", _hoisted_11$2, " loading ... "))
6144
+ : (openBlock(), createElementBlock("div", _hoisted_12$2, [
5998
6145
  createElementVNode("div", _hoisted_13, [
5999
6146
  (openBlock(true), createElementBlock(Fragment, null, renderList(modulePermissions.value, (permissions) => {
6000
6147
  return (openBlock(), createElementBlock("div", _hoisted_14, [
@@ -6020,7 +6167,7 @@ return (_ctx, _cache) => {
6020
6167
  (permissionsChanged.value)
6021
6168
  ? (openBlock(), createElementBlock("div", _hoisted_16, [
6022
6169
  createElementVNode("div", _hoisted_17, [
6023
- createVNode(script$d, {
6170
+ createVNode(script$f, {
6024
6171
  onSuccess: permissionsUpdated,
6025
6172
  url: `sh-departments/department/permissions/${unref(departmentId)}/${selectedModule.value}`,
6026
6173
  data: {permissions: selectedPermissions.value},
@@ -6044,8 +6191,8 @@ return (_ctx, _cache) => {
6044
6191
 
6045
6192
  };
6046
6193
 
6047
- script$6.__scopeId = "data-v-0d4fa0ac";
6048
- script$6.__file = "src/lib/components/core/Departments/department/ManagePermissions.vue";
6194
+ script$8.__scopeId = "data-v-0d4fa0ac";
6195
+ script$8.__file = "src/lib/components/core/Departments/department/ManagePermissions.vue";
6049
6196
 
6050
6197
  const useAppStore = defineStore('sh-app',{
6051
6198
  state: ()=>{
@@ -6070,9 +6217,9 @@ const useAppStore = defineStore('sh-app',{
6070
6217
  }
6071
6218
  });
6072
6219
 
6073
- const _hoisted_1$3 = ["href"];
6220
+ const _hoisted_1$5 = ["href"];
6074
6221
 
6075
- var script$5 = {
6222
+ var script$7 = {
6076
6223
  __name: 'ShRoutePopups',
6077
6224
  setup(__props) {
6078
6225
 
@@ -6154,9 +6301,9 @@ return (_ctx, _cache) => {
6154
6301
  href: '#' + unref(canvasId),
6155
6302
  shallowRef: "canvasButton",
6156
6303
  class: "d-none"
6157
- }, "Open Modal", 8 /* PROPS */, _hoisted_1$3),
6304
+ }, "Open Modal", 8 /* PROPS */, _hoisted_1$5),
6158
6305
  (popUp.value === 'modal')
6159
- ? (openBlock(), createBlock(script$k, {
6306
+ ? (openBlock(), createBlock(script$m, {
6160
6307
  key: 0,
6161
6308
  "modal-title": title.value,
6162
6309
  "modal-id": unref(modalId),
@@ -6171,7 +6318,7 @@ return (_ctx, _cache) => {
6171
6318
  }, 8 /* PROPS */, ["modal-title", "modal-id", "modal-size"]))
6172
6319
  : createCommentVNode("v-if", true),
6173
6320
  (['offcanvas','canvas','offCanvas'].includes(popUp.value))
6174
- ? (openBlock(), createBlock(script$h, {
6321
+ ? (openBlock(), createBlock(script$j, {
6175
6322
  key: 1,
6176
6323
  "canvas-id": unref(canvasId),
6177
6324
  "canvas-title": title.value,
@@ -6190,9 +6337,9 @@ return (_ctx, _cache) => {
6190
6337
 
6191
6338
  };
6192
6339
 
6193
- script$5.__file = "src/lib/components/popups/ShRoutePopups.vue";
6340
+ script$7.__file = "src/lib/components/popups/ShRoutePopups.vue";
6194
6341
 
6195
- var script$4 = {
6342
+ var script$6 = {
6196
6343
  __name: 'ShQueryForm',
6197
6344
  setup(__props) {
6198
6345
 
@@ -6202,7 +6349,7 @@ const fields = route.query.fields.split(',');
6202
6349
  const action = route.query.action;
6203
6350
 
6204
6351
  return (_ctx, _cache) => {
6205
- return (openBlock(), createBlock(script$m, {
6352
+ return (openBlock(), createBlock(script$o, {
6206
6353
  fields: unref(fields),
6207
6354
  action: unref(action)
6208
6355
  }, null, 8 /* PROPS */, ["fields", "action"]))
@@ -6211,9 +6358,9 @@ return (_ctx, _cache) => {
6211
6358
 
6212
6359
  };
6213
6360
 
6214
- script$4.__file = "src/lib/components/ShQueryForm.vue";
6361
+ script$6.__file = "src/lib/components/ShQueryForm.vue";
6215
6362
 
6216
- var script$3 = {
6363
+ var script$5 = {
6217
6364
  __name: 'ShQueryPopups',
6218
6365
  setup(__props) {
6219
6366
 
@@ -6238,7 +6385,7 @@ watch(() => route.query.popup, pop => {
6238
6385
  title.value = route.query.title;
6239
6386
  let queryComponent = route.query.comp ?? route.query.component;
6240
6387
  if(queryComponent && ['shqueryform','queryform'].includes(queryComponent.toLowerCase())) {
6241
- queryComponent = script$4;
6388
+ queryComponent = script$6;
6242
6389
  }
6243
6390
  popupComponent.value = queryComponent;
6244
6391
  if (popUp.value) {
@@ -6305,7 +6452,7 @@ const goBack = () => {
6305
6452
  return (_ctx, _cache) => {
6306
6453
  return (openBlock(), createElementBlock(Fragment, null, [
6307
6454
  (popUp.value === 'modal')
6308
- ? (openBlock(), createBlock(script$k, {
6455
+ ? (openBlock(), createBlock(script$m, {
6309
6456
  key: 0,
6310
6457
  "modal-title": title.value,
6311
6458
  "data-bs-backdrop": "static",
@@ -6320,7 +6467,7 @@ return (_ctx, _cache) => {
6320
6467
  }, 8 /* PROPS */, ["modal-title", "modal-id", "modal-size"]))
6321
6468
  : createCommentVNode("v-if", true),
6322
6469
  (['offcanvas','canvas','offCanvas'].includes(popUp.value))
6323
- ? (openBlock(), createBlock(script$h, {
6470
+ ? (openBlock(), createBlock(script$j, {
6324
6471
  "canvas-title": title.value,
6325
6472
  key: size.value + position.value,
6326
6473
  "canvas-id": unref(canvasId),
@@ -6339,7 +6486,188 @@ return (_ctx, _cache) => {
6339
6486
 
6340
6487
  };
6341
6488
 
6342
- script$3.__file = "src/lib/components/popups/ShQueryPopups.vue";
6489
+ script$5.__file = "src/lib/components/popups/ShQueryPopups.vue";
6490
+
6491
+ const _hoisted_1$4 = { class: "card mt-2" };
6492
+ const _hoisted_2$4 = { class: "card-body" };
6493
+
6494
+ function render(_ctx, _cache) {
6495
+ return (openBlock(), createElementBlock("div", _hoisted_1$4, [
6496
+ createElementVNode("div", _hoisted_2$4, [
6497
+ renderSlot(_ctx.$slots, "default")
6498
+ ])
6499
+ ]))
6500
+ }
6501
+
6502
+ const script$4 = {};
6503
+
6504
+
6505
+ script$4.render = render;
6506
+ script$4.__file = "src/lib/components/ShCardLayout.vue";
6507
+
6508
+ const _hoisted_1$3 = { class: "container" };
6509
+ const _hoisted_2$3 = { class: "row" };
6510
+ const _hoisted_3$3 = {
6511
+ key: 0,
6512
+ class: "col-md-6"
6513
+ };
6514
+ const _hoisted_4$3 = /*#__PURE__*/createElementVNode("h5", { class: "card-title" }, "Details", -1 /* HOISTED */);
6515
+ const _hoisted_5$2 = { class: "table" };
6516
+ const _hoisted_6$2 = { class: "card-footer" };
6517
+ const _hoisted_7$1 = /*#__PURE__*/createElementVNode("i", { class: "bi-pen" }, null, -1 /* HOISTED */);
6518
+ const _hoisted_8$1 = /*#__PURE__*/createElementVNode("i", { class: "bi-key" }, null, -1 /* HOISTED */);
6519
+ const _hoisted_9$1 = { class: "col-md-6" };
6520
+ const _hoisted_10$1 = /*#__PURE__*/createElementVNode("i", { class: "bi-pen" }, null, -1 /* HOISTED */);
6521
+ const _hoisted_11$1 = /*#__PURE__*/createElementVNode("h5", { class: "card-title" }, "Profile Picture", -1 /* HOISTED */);
6522
+ const _hoisted_12$1 = ["src"];
6523
+
6524
+ var script$3 = {
6525
+ __name: 'ShUserProfile',
6526
+ setup(__props) {
6527
+
6528
+ const userStore = useUserStore();
6529
+ const { user } = storeToRefs(userStore);
6530
+
6531
+ const detailsUpdated= (res) => {
6532
+ shRepo.showToast('Your ' + res +' updated successfully', 'success');
6533
+ };
6534
+ const showProfilePicture = (photo) => {
6535
+ return import.meta.env.VITE_APP_HOME_URL + photo
6536
+ };
6537
+ const UserdetailsColumns = [
6538
+ {
6539
+ name: 'name',
6540
+ label: 'Name'
6541
+ },
6542
+ {
6543
+ name: 'email',
6544
+ label: 'Email'
6545
+ },
6546
+ {
6547
+ name: 'phone',
6548
+ label: 'Phone'
6549
+ }
6550
+ ];
6551
+
6552
+
6553
+ return (_ctx, _cache) => {
6554
+ return (openBlock(), createBlock(script$4, null, {
6555
+ default: withCtx(() => [
6556
+ createElementVNode("div", _hoisted_1$3, [
6557
+ createElementVNode("div", _hoisted_2$3, [
6558
+ (unref(user))
6559
+ ? (openBlock(), createElementBlock("div", _hoisted_3$3, [
6560
+ createVNode(script$4, null, {
6561
+ default: withCtx(() => [
6562
+ _hoisted_4$3,
6563
+ createElementVNode("table", _hoisted_5$2, [
6564
+ createElementVNode("tbody", null, [
6565
+ (openBlock(), createElementBlock(Fragment, null, renderList(UserdetailsColumns, (column) => {
6566
+ return createElementVNode("tr", {
6567
+ key: column.name
6568
+ }, [
6569
+ createElementVNode("td", null, toDisplayString(column.label), 1 /* TEXT */),
6570
+ createElementVNode("td", null, toDisplayString(unref(user)[column.name]), 1 /* TEXT */)
6571
+ ])
6572
+ }), 64 /* STABLE_FRAGMENT */))
6573
+ ])
6574
+ ]),
6575
+ createElementVNode("div", _hoisted_6$2, [
6576
+ (unref(user))
6577
+ ? (openBlock(), createBlock(script$l, {
6578
+ key: 0,
6579
+ "current-data": unref(user),
6580
+ "modal-title": "Edit Details",
6581
+ class: "btn btn-primary my-2",
6582
+ action: "auth/user",
6583
+ onSuccess: _cache[0] || (_cache[0] = $event => (detailsUpdated('details'))),
6584
+ fields: ['name','email','phone']
6585
+ }, {
6586
+ default: withCtx(() => [
6587
+ _hoisted_7$1,
6588
+ createTextVNode(" Edit Details")
6589
+ ]),
6590
+ _: 1 /* STABLE */
6591
+ }, 8 /* PROPS */, ["current-data"]))
6592
+ : createCommentVNode("v-if", true),
6593
+ (unref(user))
6594
+ ? (openBlock(), createBlock(script$l, {
6595
+ key: 1,
6596
+ "modal-title": "Update Password",
6597
+ class: "btn btn-info ms-2 my-2",
6598
+ action: "auth/reset",
6599
+ onSuccess: _cache[1] || (_cache[1] = $event => (detailsUpdated('password'))),
6600
+ fields: [
6601
+ {
6602
+ field:'old_password',
6603
+ type: 'password',
6604
+ },
6605
+ {
6606
+ field:'new_password',
6607
+ type: 'password',
6608
+ },
6609
+ {
6610
+ field:'new_password_confirmation',
6611
+ type: 'password',
6612
+ }
6613
+ ]
6614
+ }, {
6615
+ default: withCtx(() => [
6616
+ _hoisted_8$1,
6617
+ createTextVNode(" Change Password")
6618
+ ]),
6619
+ _: 1 /* STABLE */
6620
+ }))
6621
+ : createCommentVNode("v-if", true)
6622
+ ])
6623
+ ]),
6624
+ _: 1 /* STABLE */
6625
+ })
6626
+ ]))
6627
+ : createCommentVNode("v-if", true),
6628
+ createElementVNode("div", _hoisted_9$1, [
6629
+ createVNode(script$4, null, {
6630
+ default: withCtx(() => [
6631
+ createVNode(script$l, {
6632
+ "modal-title": "Edit Profile Image",
6633
+ class: "btn btn-info btn-sm float-end my-2",
6634
+ action: 'auth/profile-picture',
6635
+ onSuccess: _cache[2] || (_cache[2] = $event => (detailsUpdated('profile picture'))),
6636
+ files: [],
6637
+ fields: [{
6638
+ field:'profile_picture',
6639
+ type: 'file',
6640
+ }]
6641
+ }, {
6642
+ default: withCtx(() => [
6643
+ _hoisted_10$1
6644
+ ]),
6645
+ _: 1 /* STABLE */
6646
+ }),
6647
+ createElementVNode("div", null, [
6648
+ _hoisted_11$1,
6649
+ createElementVNode("img", {
6650
+ src: showProfilePicture(unref(user)?.profile_picture),
6651
+ class: "img-fluid",
6652
+ alt: "profie-picture",
6653
+ style: {"width":"100%","height":"330px"}
6654
+ }, null, 8 /* PROPS */, _hoisted_12$1)
6655
+ ])
6656
+ ]),
6657
+ _: 1 /* STABLE */
6658
+ })
6659
+ ])
6660
+ ])
6661
+ ])
6662
+ ]),
6663
+ _: 1 /* STABLE */
6664
+ }))
6665
+ }
6666
+ }
6667
+
6668
+ };
6669
+
6670
+ script$3.__file = "src/lib/components/core/auth/ShUserProfile.vue";
6343
6671
 
6344
6672
  const _hoisted_1$2 = /*#__PURE__*/createElementVNode("h5", null, "Departments", -1 /* HOISTED */);
6345
6673
  const _hoisted_2$2 = { class: "card sh-departments-card shadow" };
@@ -6382,7 +6710,7 @@ return (_ctx, _cache) => {
6382
6710
  _hoisted_4$2,
6383
6711
  createTextVNode(" ADD DEPARTMENT")
6384
6712
  ], 512 /* NEED_PATCH */),
6385
- createVNode(script$b, {
6713
+ createVNode(script$d, {
6386
6714
  reload: unref(reload),
6387
6715
  headers: ['id','name','description', 'created_at'],
6388
6716
  "end-point": "sh-departments/list",
@@ -6402,12 +6730,12 @@ return (_ctx, _cache) => {
6402
6730
  ]
6403
6731
  }
6404
6732
  }, null, 8 /* PROPS */, ["reload", "actions"]),
6405
- createVNode(script$k, {
6733
+ createVNode(script$m, {
6406
6734
  "modal-id": "sh_department_modal",
6407
6735
  "modal-title": "Department Form"
6408
6736
  }, {
6409
6737
  default: withCtx(() => [
6410
- createVNode(script$u, {
6738
+ createVNode(script$w, {
6411
6739
  "success-callback": "departmentAdded",
6412
6740
  "current-data": department.value,
6413
6741
  onDepartmentAdded: departmentAdded,
@@ -6542,7 +6870,7 @@ return (_ctx, _cache) => {
6542
6870
  createElementVNode("div", _hoisted_2$1, [
6543
6871
  _hoisted_3$1,
6544
6872
  createElementVNode("h5", null, "Department #" + toDisplayString(unref(department).id) + " - " + toDisplayString(unref(department).name) + " Allowed Modules", 1 /* TEXT */),
6545
- createVNode(script$b, {
6873
+ createVNode(script$d, {
6546
6874
  actions: {
6547
6875
  label: 'Actions',
6548
6876
  actions: [
@@ -6562,12 +6890,12 @@ return (_ctx, _cache) => {
6562
6890
  headers: ['id',showModule,'created_at'],
6563
6891
  "end-point": 'admin/departments/department/list-modules/' + id.value
6564
6892
  }, null, 8 /* PROPS */, ["actions", "reload", "headers", "end-point"]),
6565
- createVNode(script$k, {
6893
+ createVNode(script$m, {
6566
6894
  "modal-id": "addModule",
6567
6895
  "modal-title": "Add Module Department"
6568
6896
  }, {
6569
6897
  default: withCtx(() => [
6570
- createVNode(script$u, {
6898
+ createVNode(script$w, {
6571
6899
  "reload-select-items": unref(reload),
6572
6900
  "success-callback": moduleAdded,
6573
6901
  "fill-selects": {
@@ -6589,7 +6917,7 @@ return (_ctx, _cache) => {
6589
6917
  ref: permissionCanvasBtn,
6590
6918
  "data-bs-toggle": "offcanvas"
6591
6919
  }, null, 512 /* NEED_PATCH */),
6592
- createVNode(script$h, {
6920
+ createVNode(script$j, {
6593
6921
  "canvas-id": "permissionsCanvas",
6594
6922
  position: "end enlarged",
6595
6923
  "canvas-title": "Module Permissions"
@@ -6655,21 +6983,25 @@ const _hoisted_5 = {
6655
6983
  key: 1,
6656
6984
  class: "sh-login-section"
6657
6985
  };
6658
- const _hoisted_6 = { class: "sh-auth-footer" };
6659
- const _hoisted_7 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/createElementVNode("strong", { class: "bi-dot" }, null, -1 /* HOISTED */));
6660
- const _hoisted_8 = {
6986
+ const _hoisted_6 = {
6987
+ key: 0,
6988
+ class: "sh-login-title"
6989
+ };
6990
+ const _hoisted_7 = { class: "sh-auth-footer" };
6991
+ const _hoisted_8 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/createElementVNode("strong", { class: "bi-dot" }, null, -1 /* HOISTED */));
6992
+ const _hoisted_9 = {
6661
6993
  key: 2,
6662
6994
  class: "sh-register-section"
6663
6995
  };
6664
- const _hoisted_9 = {
6996
+ const _hoisted_10 = {
6665
6997
  key: 0,
6666
6998
  class: "sh-register-title"
6667
6999
  };
6668
- const _hoisted_10 = {
7000
+ const _hoisted_11 = {
6669
7001
  key: 1,
6670
7002
  class: "sh-register-link"
6671
7003
  };
6672
- const _hoisted_11 = { class: "sh-auth-footer" };
7004
+ const _hoisted_12 = { class: "sh-auth-footer" };
6673
7005
 
6674
7006
  var script = {
6675
7007
  __name: 'ShAuth',
@@ -6685,6 +7017,7 @@ const forgotEndpoint = inject('forgotEndpoint');
6685
7017
  const loginEndpoint = inject('loginEndpoint');
6686
7018
  const registrationFields = inject('registrationFields');
6687
7019
  const registerTitle = inject('registerTitle');
7020
+ const loginTitle = inject('loginTitle');
6688
7021
  const registerSubTitle = inject('registerSubTitle');
6689
7022
  inject('redirectRegister');
6690
7023
  const redirectLogin = inject('redirectLogin');
@@ -6720,7 +7053,7 @@ return (_ctx, _cache) => {
6720
7053
  : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
6721
7054
  (section.value === 'forgot')
6722
7055
  ? (openBlock(), createElementBlock("div", _hoisted_2, [
6723
- createVNode(script$u, {
7056
+ createVNode(script$w, {
6724
7057
  class: "sh-login-form",
6725
7058
  fields: ['email'],
6726
7059
  "action-label": "Send Reset Link",
@@ -6740,19 +7073,22 @@ return (_ctx, _cache) => {
6740
7073
  : createCommentVNode("v-if", true),
6741
7074
  (section.value === 'login')
6742
7075
  ? (openBlock(), createElementBlock("div", _hoisted_5, [
6743
- createVNode(script$u, {
7076
+ (unref(loginTitle))
7077
+ ? (openBlock(), createElementBlock("h3", _hoisted_6, toDisplayString(unref(loginTitle)), 1 /* TEXT */))
7078
+ : createCommentVNode("v-if", true),
7079
+ createVNode(script$w, {
6744
7080
  class: "sh-login-form",
6745
7081
  fields: ['email','password'],
6746
7082
  "action-label": "Login",
6747
7083
  action: unref(loginEndpoint),
6748
7084
  "success-callback": loginSuccessful
6749
7085
  }, null, 8 /* PROPS */, ["action"]),
6750
- createElementVNode("div", _hoisted_6, [
7086
+ createElementVNode("div", _hoisted_7, [
6751
7087
  createElementVNode("strong", {
6752
7088
  class: "sh-forgot-link text-primary",
6753
7089
  onClick: _cache[1] || (_cache[1] = $event => (goToSection('forgot')))
6754
7090
  }, "Forgotten password?"),
6755
- _hoisted_7,
7091
+ _hoisted_8,
6756
7092
  createElementVNode("strong", {
6757
7093
  onClick: _cache[2] || (_cache[2] = $event => (goToSection('register'))),
6758
7094
  class: "sh-register-link text-primary"
@@ -6761,21 +7097,21 @@ return (_ctx, _cache) => {
6761
7097
  ]))
6762
7098
  : createCommentVNode("v-if", true),
6763
7099
  (section.value === 'register')
6764
- ? (openBlock(), createElementBlock("div", _hoisted_8, [
7100
+ ? (openBlock(), createElementBlock("div", _hoisted_9, [
6765
7101
  (unref(registerTitle))
6766
- ? (openBlock(), createElementBlock("h3", _hoisted_9, toDisplayString(unref(registerTitle)), 1 /* TEXT */))
7102
+ ? (openBlock(), createElementBlock("h3", _hoisted_10, toDisplayString(unref(registerTitle)), 1 /* TEXT */))
6767
7103
  : createCommentVNode("v-if", true),
6768
7104
  (unref(registerSubTitle))
6769
- ? (openBlock(), createElementBlock("span", _hoisted_10, toDisplayString(unref(registerSubTitle)), 1 /* TEXT */))
7105
+ ? (openBlock(), createElementBlock("span", _hoisted_11, toDisplayString(unref(registerSubTitle)), 1 /* TEXT */))
6770
7106
  : createCommentVNode("v-if", true),
6771
- createVNode(script$u, {
7107
+ createVNode(script$w, {
6772
7108
  class: "sh-login-form",
6773
7109
  fields: unref(registrationFields),
6774
7110
  "action-label": "Sign Up",
6775
7111
  action: unref(registerEndpoint),
6776
7112
  "success-callback": loginSuccessful
6777
7113
  }, null, 8 /* PROPS */, ["fields", "action"]),
6778
- createElementVNode("div", _hoisted_11, [
7114
+ createElementVNode("div", _hoisted_12, [
6779
7115
  createElementVNode("strong", {
6780
7116
  onClick: _cache[3] || (_cache[3] = $event => (goToSection('login'))),
6781
7117
  class: "sh-register-link text-primary"
@@ -6816,11 +7152,11 @@ const ShFrontend = {
6816
7152
  const registerTitle = options.registerTitle ?? 'Create a new account';
6817
7153
  const registerSubTitle = options.registerSubTitle ?? `It's quick and easy`;
6818
7154
  const logoutApiEndpoint = options.logoutApiEndpoint ?? `auth/logout`;
6819
- options.formTextInput ?? script$r;
7155
+ options.formTextInput ?? script$t;
6820
7156
  const loginUrl = options.loginUrl ?? `/login`;
6821
7157
  const redirectLogin = options.redirectLogin ?? `/`;
6822
7158
  const redirectRegister = options.redirectRegister ?? `/`;
6823
- const noRecordsComponent = options.noRecordsComponent ?? script$g;
7159
+ const noRecordsComponent = options.noRecordsComponent ?? script$i;
6824
7160
  const registrationFields = options.registrationFields ?? ['name','email','phone','password','password_confirmation'];
6825
7161
  const AuthComponent = options.authComponent ?? script;
6826
7162
  app.provide('loginEndpoint',loginEndpoint);
@@ -6852,7 +7188,11 @@ const ShFrontend = {
6852
7188
  });
6853
7189
  options.router.addRoute({
6854
7190
  path: '/sh-departments/manage-permissions/:id',
6855
- component: script$6
7191
+ component: script$8
7192
+ });
7193
+ options.router.addRoute({
7194
+ path: '/sh-user-profile',
7195
+ component: script$3
6856
7196
  });
6857
7197
  }
6858
7198
  //filter unwanted config items from options to be put in local storage
@@ -6877,4 +7217,4 @@ var shGql = {
6877
7217
  mutate
6878
7218
  };
6879
7219
 
6880
- export { countries as Countries, script$6 as ManagePermissions, script$m as ShAutoForm, script$h as ShCanvas, script$7 as ShCanvasBtn, script$e as ShConfirmAction, script$l as ShDropDownForm, script$9 as ShDynamicTabs, script$u as ShForm, ShFrontend, script$k as ShModal, script$8 as ShModalBtn, script$j as ShModalForm, script$i as ShModalFormAuto, script$w as ShPhone, script$3 as ShQueryPopups, script$c as ShRange, script$5 as ShRoutePopups, script$d as ShSilentAction, script$v as ShSuggest, script$b as ShTable, script$a as ShTabs, shApis, shGql, shRepo, ShStorage as shStorage, useAppStore, useUserStore };
7220
+ export { countries as Countries, script$8 as ManagePermissions, script$o as ShAutoForm, script$j as ShCanvas, script$9 as ShCanvasBtn, script$4 as ShCardLayout, script$g as ShConfirmAction, script$n as ShDropDownForm, script$b as ShDynamicTabs, script$w as ShForm, ShFrontend, script$m as ShModal, script$a as ShModalBtn, script$l as ShModalForm, script$k as ShModalFormAuto, script$y as ShPhone, script$5 as ShQueryPopups, script$e as ShRange, script$7 as ShRoutePopups, script$f as ShSilentAction, script$x as ShSuggest, script$d as ShTable, script$c as ShTabs, shApis, shGql, shRepo, ShStorage as shStorage, useAppStore, useUserStore };