@iankibetsh/shframework 1.4.5 → 1.4.6

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.
@@ -1,36 +1,4 @@
1
1
 
2
- .sh-phone{
3
- display: flex;
4
- width: 100%;
5
- align-items: center;
6
- padding: 0 0.25rem;
7
- }
8
- .phone-country{
9
- width: 2rem;
10
- border: none;
11
- align-self: center;
12
- outline: none !important;
13
- padding: 0.4rem;
14
- border-right: 1px solid #0003;
15
- }
16
- .phone-number{
17
- width: calc(100% - 2.2rem);
18
- border: none;
19
- align-self: center;
20
- outline: none;
21
- margin-bottom: 0;
22
- padding: 0.4rem;
23
- }
24
- .sh-phone img{
25
- padding: 0.125rem;
26
- width: 2rem;
27
- height: 2rem;
28
- }
29
- .phone-number::placeholder{
30
- font-weight: 300;
31
- opacity: 0.5;
32
- }
33
-
34
2
  .colored-toast.swal2-icon-success {
35
3
  background-color: #a5dc86 !important;
36
4
  }
@@ -63,19 +31,68 @@
63
31
  color: white;
64
32
  }
65
33
 
66
- .sh-selected-item{
67
- line-height: unset!important;
34
+ .sh-phone{
35
+ display: flex;
36
+ width: 100%;
37
+ align-items: center;
38
+ padding: 0 0.25rem;
68
39
  }
69
- .sh-suggestion-input{
70
- padding: 0.375rem 0.75rem;
40
+ .phone-country{
41
+ width: 2rem;
42
+ border: none;
43
+ align-self: center;
44
+ outline: none !important;
45
+ padding: 0.4rem;
46
+ border-right: 1px solid #0003;
71
47
  }
72
- .sh-suggest{
73
- margin-bottom: 1rem;
48
+ .phone-number{
49
+ width: calc(100% - 2.2rem);
50
+ border: none;
51
+ align-self: center;
52
+ outline: none;
53
+ margin-bottom: 0;
54
+ padding: 0.4rem;
74
55
  }
75
- .sh-suggest-control::after{
76
- margin-top: auto;
77
- margin-bottom: auto;
78
- margin-right: 0.255em;
56
+ .sh-phone img{
57
+ padding: 0.125rem;
58
+ width: 2rem;
59
+ height: 2rem;
60
+ }
61
+ .phone-number::placeholder{
62
+ font-weight: 300;
63
+ opacity: 0.5;
64
+ }
65
+
66
+ .permissions-main {
67
+ background: #edeff2;
68
+ }
69
+ .permissions-main div#permissions-nav {
70
+ padding: 0;
71
+ }
72
+ .permissions-main div#permissions-nav ul {
73
+ padding-left: 0;
74
+ max-height: 400px;
75
+ overflow-y: auto;
76
+ }
77
+ .permissions-main div#permissions-nav ul li.active {
78
+ border-right: none !important;
79
+ position: relative;
80
+ top: 0;
81
+ left: 0;
82
+ background: white;
83
+ border-radius: 10px 0 0 10px;
84
+ }
85
+ .permissions-main div#permissions-nav ul li {
86
+ list-style: none;
87
+ padding-inline-start: 10px;
88
+ display: flex;
89
+ gap: 5px;
90
+ }
91
+ .permissions-main div#permissions-nav ul li label {
92
+ padding: 8px 0;
93
+ cursor: pointer;
94
+ height: 100%;
95
+ flex-grow: 1;
79
96
  }
80
97
 
81
98
  :root {
@@ -99,6 +116,21 @@
99
116
  }
100
117
  }
101
118
 
119
+ .sh-selected-item{
120
+ line-height: unset!important;
121
+ }
122
+ .sh-suggestion-input{
123
+ padding: 0.375rem 0.75rem;
124
+ }
125
+ .sh-suggest{
126
+ margin-bottom: 1rem;
127
+ }
128
+ .sh-suggest-control::after{
129
+ margin-top: auto;
130
+ margin-bottom: auto;
131
+ margin-right: 0.255em;
132
+ }
133
+
102
134
  .sh-forgot-link, .sh-register-link{
103
135
  cursor: pointer;
104
136
  }
package/dist/library.js CHANGED
@@ -9,8 +9,8 @@ var NProgress = require('nprogress');
9
9
  var vue = require('vue');
10
10
  var Editor = require('@tinymce/tinymce-vue');
11
11
  var _ = require('lodash');
12
- var pinia = require('pinia');
13
12
  var vueRouter = require('vue-router');
13
+ var pinia = require('pinia');
14
14
 
15
15
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
16
16
 
@@ -2555,10 +2555,10 @@ const _hoisted_7$5 = { class: "row" };
2555
2555
  const _hoisted_8$3 = { class: "fg-label control-label text-capitalize control-bel col-md-12 request-form-label mb-2" };
2556
2556
  const _hoisted_9$4 = { class: "col-md-12" };
2557
2557
  const _hoisted_10$3 = ["data-cy", "placeholder", "name", "onFocus", "onChange"];
2558
- const _hoisted_11$2 = ["data-cy", "placeholder", "name", "onFocus", "onUpdate:modelValue"];
2559
- const _hoisted_12$2 = ["data-cy", "placeholder", "name", "onFocus", "onUpdate:modelValue"];
2560
- const _hoisted_13$2 = ["data-cy", "placeholder", "name", "onFocus", "onUpdate:modelValue"];
2561
- const _hoisted_14$2 = ["data-cy", "name", "onFocus", "onUpdate:modelValue"];
2558
+ const _hoisted_11$3 = ["data-cy", "placeholder", "name", "onFocus", "onUpdate:modelValue"];
2559
+ const _hoisted_12$3 = ["data-cy", "placeholder", "name", "onFocus", "onUpdate:modelValue"];
2560
+ const _hoisted_13$3 = ["data-cy", "placeholder", "name", "onFocus", "onUpdate:modelValue"];
2561
+ const _hoisted_14$3 = ["data-cy", "name", "onFocus", "onUpdate:modelValue"];
2562
2562
  const _hoisted_15$2 = ["disabled", "placeholder", "name", "onFocus", "onUpdate:modelValue"];
2563
2563
  const _hoisted_16$2 = ["name", "onFocus", "onUpdate:modelValue"];
2564
2564
  const _hoisted_17$2 = ["name", "onFocus", "onUpdate:modelValue"];
@@ -2663,7 +2663,7 @@ function render$5(_ctx, _cache, $props, $setup, $data, $options) {
2663
2663
  class: vue.normalizeClass([_ctx.form_errors[field] == null ? ' field_' + field:'is-invalid ' + field, "form-control"]),
2664
2664
  "onUpdate:modelValue": $event => ((_ctx.form_elements[field]) = $event),
2665
2665
  type: "number"
2666
- }, null, 42 /* CLASS, PROPS, HYDRATE_EVENTS */, _hoisted_11$2)), [
2666
+ }, null, 42 /* CLASS, PROPS, HYDRATE_EVENTS */, _hoisted_11$3)), [
2667
2667
  [vue.vModelText, _ctx.form_elements[field]]
2668
2668
  ])
2669
2669
  : vue.createCommentVNode("v-if", true),
@@ -2677,7 +2677,7 @@ function render$5(_ctx, _cache, $props, $setup, $data, $options) {
2677
2677
  class: vue.normalizeClass([_ctx.form_errors[field] == null ? ' field_' + field:'is-invalid ' + field, "form-control"]),
2678
2678
  "onUpdate:modelValue": $event => ((_ctx.form_elements[field]) = $event),
2679
2679
  type: "password"
2680
- }, null, 42 /* CLASS, PROPS, HYDRATE_EVENTS */, _hoisted_12$2)), [
2680
+ }, null, 42 /* CLASS, PROPS, HYDRATE_EVENTS */, _hoisted_12$3)), [
2681
2681
  [vue.vModelText, _ctx.form_elements[field]]
2682
2682
  ])
2683
2683
  : vue.createCommentVNode("v-if", true),
@@ -2692,7 +2692,7 @@ function render$5(_ctx, _cache, $props, $setup, $data, $options) {
2692
2692
  "onUpdate:modelValue": $event => ((_ctx.form_elements[field]) = $event),
2693
2693
  type: "email",
2694
2694
  required: ""
2695
- }, null, 42 /* CLASS, PROPS, HYDRATE_EVENTS */, _hoisted_13$2)), [
2695
+ }, null, 42 /* CLASS, PROPS, HYDRATE_EVENTS */, _hoisted_13$3)), [
2696
2696
  [vue.vModelText, _ctx.form_elements[field]]
2697
2697
  ])
2698
2698
  : vue.createCommentVNode("v-if", true),
@@ -2705,7 +2705,7 @@ function render$5(_ctx, _cache, $props, $setup, $data, $options) {
2705
2705
  onFocus: $event => ($options.removeErrors(field)),
2706
2706
  class: vue.normalizeClass([_ctx.form_errors[field] == null ? ' field_' + field:'is-invalid ' + field, "form-control active"]),
2707
2707
  "onUpdate:modelValue": $event => ((_ctx.form_elements[field]) = $event)
2708
- }, null, 42 /* CLASS, PROPS, HYDRATE_EVENTS */, _hoisted_14$2)), [
2708
+ }, null, 42 /* CLASS, PROPS, HYDRATE_EVENTS */, _hoisted_14$3)), [
2709
2709
  [vue.vModelText, _ctx.form_elements[field]]
2710
2710
  ])
2711
2711
  : vue.createCommentVNode("v-if", true),
@@ -3616,16 +3616,16 @@ const _hoisted_9$3 = [
3616
3616
  _hoisted_4$6
3617
3617
  ];
3618
3618
  const _hoisted_10$2 = { class: "record_counts" };
3619
- const _hoisted_11$1 = {
3619
+ const _hoisted_11$2 = {
3620
3620
  key: 0,
3621
3621
  "aria-label": "Page navigation"
3622
3622
  };
3623
- const _hoisted_12$1 = { class: "pagination" };
3624
- const _hoisted_13$1 = {
3623
+ const _hoisted_12$2 = { class: "pagination" };
3624
+ const _hoisted_13$2 = {
3625
3625
  key: 0,
3626
3626
  class: "page-link"
3627
3627
  };
3628
- const _hoisted_14$1 = {
3628
+ const _hoisted_14$2 = {
3629
3629
  key: 1,
3630
3630
  class: "page-link"
3631
3631
  };
@@ -3668,8 +3668,8 @@ function render$2(_ctx, _cache, $props, $setup, $data, $options) {
3668
3668
  vue.createElementVNode("span", _hoisted_10$2, " of " + vue.toDisplayString($props.pagination_data.record_count) + " items", 1 /* TEXT */)
3669
3669
  ]),
3670
3670
  ($props.pagination_data != null)
3671
- ? (vue.openBlock(), vue.createElementBlock("nav", _hoisted_11$1, [
3672
- vue.createElementVNode("ul", _hoisted_12$1, [
3671
+ ? (vue.openBlock(), vue.createElementBlock("nav", _hoisted_11$2, [
3672
+ vue.createElementVNode("ul", _hoisted_12$2, [
3673
3673
  vue.createElementVNode("li", {
3674
3674
  class: vue.normalizeClass([$options.getActivePage === 1 ? 'disabled' : '' , "page-item"])
3675
3675
  }, [
@@ -3684,9 +3684,9 @@ function render$2(_ctx, _cache, $props, $setup, $data, $options) {
3684
3684
  key: page
3685
3685
  }, [
3686
3686
  ($options.getActivePage === page)
3687
- ? (vue.openBlock(), vue.createElementBlock("a", _hoisted_13$1, vue.toDisplayString(page), 1 /* TEXT */))
3687
+ ? (vue.openBlock(), vue.createElementBlock("a", _hoisted_13$2, vue.toDisplayString(page), 1 /* TEXT */))
3688
3688
  : (['..','...'].includes(page))
3689
- ? (vue.openBlock(), vue.createElementBlock("a", _hoisted_14$1, vue.toDisplayString(page), 1 /* TEXT */))
3689
+ ? (vue.openBlock(), vue.createElementBlock("a", _hoisted_14$2, vue.toDisplayString(page), 1 /* TEXT */))
3690
3690
  : (vue.openBlock(), vue.createElementBlock("a", {
3691
3691
  key: 2,
3692
3692
  onClick: $event => ($options.changeTableKey('page',page)),
@@ -4193,20 +4193,20 @@ const _hoisted_7$2 = {
4193
4193
  const _hoisted_8$2 = { class: "col-12 mb-3" };
4194
4194
  const _hoisted_9$2 = { class: "sh-search-bar" };
4195
4195
  const _hoisted_10$1 = ["placeholder"];
4196
- const _hoisted_11 = {
4196
+ const _hoisted_11$1 = {
4197
4197
  key: 0,
4198
4198
  class: "text-center"
4199
4199
  };
4200
- const _hoisted_12 = /*#__PURE__*/vue.createElementVNode("div", {
4200
+ const _hoisted_12$1 = /*#__PURE__*/vue.createElementVNode("div", {
4201
4201
  class: "spinner-border",
4202
4202
  role: "status"
4203
4203
  }, [
4204
4204
  /*#__PURE__*/vue.createElementVNode("span", { class: "visually-hidden" }, "Loading...")
4205
4205
  ], -1 /* HOISTED */);
4206
- const _hoisted_13 = [
4207
- _hoisted_12
4206
+ const _hoisted_13$1 = [
4207
+ _hoisted_12$1
4208
4208
  ];
4209
- const _hoisted_14 = {
4209
+ const _hoisted_14$1 = {
4210
4210
  key: 1,
4211
4211
  class: "alert alert-danger"
4212
4212
  };
@@ -4376,9 +4376,9 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
4376
4376
  ($options.hasDefaultSlot)
4377
4377
  ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 2 }, [
4378
4378
  ($data.loading === 'loading')
4379
- ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_11, _hoisted_13))
4379
+ ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_11$1, _hoisted_13$1))
4380
4380
  : ($data.loading === 'error')
4381
- ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_14, [
4381
+ ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_14$1, [
4382
4382
  vue.createElementVNode("span", _hoisted_15, vue.toDisplayString($data.loading_error), 1 /* TEXT */)
4383
4383
  ]))
4384
4384
  : vue.createCommentVNode("v-if", true),
@@ -4984,6 +4984,192 @@ return (_ctx, _cache) => {
4984
4984
 
4985
4985
  script$4.__file = "src/lib/components/ShDynamicTabs.vue";
4986
4986
 
4987
+ const _withScopeId$1 = n => (vue.pushScopeId("data-v-0d4fa0ac"),n=n(),vue.popScopeId(),n);
4988
+ const _hoisted_1$3 = { class: "row permissions-main d-flex" };
4989
+ const _hoisted_2$3 = {
4990
+ id: "permissions-nav",
4991
+ class: "col-md-2 d-flex align-items-center py-4"
4992
+ };
4993
+ const _hoisted_3$3 = ["disabled", "checked"];
4994
+ const _hoisted_4$3 = ["onClick"];
4995
+ const _hoisted_5$3 = {
4996
+ id: "permissions-content",
4997
+ class: "col-md-10 py-4 pe-4 ps-0"
4998
+ };
4999
+ const _hoisted_6$2 = { class: "p-2 rounded-2 bg-white h-100" };
5000
+ const _hoisted_7$1 = {
5001
+ key: 0,
5002
+ class: "alert alert-info"
5003
+ };
5004
+ const _hoisted_8$1 = { key: 1 };
5005
+ const _hoisted_9$1 = { class: "row row-cols-4" };
5006
+ const _hoisted_10 = { class: "col py-3" };
5007
+ const _hoisted_11 = ["value"];
5008
+ const _hoisted_12 = {
5009
+ key: 0,
5010
+ class: "w-100 row"
5011
+ };
5012
+ const _hoisted_13 = { class: "col-md-3" };
5013
+ const _hoisted_14 = /*#__PURE__*/ _withScopeId$1(() => /*#__PURE__*/vue.createElementVNode("i", { class: "bi-check" }, null, -1 /* HOISTED */));
5014
+
5015
+ var script$3 = {
5016
+ __name: 'ManagePermissions',
5017
+ setup(__props) {
5018
+
5019
+ const route = vueRouter.useRoute();
5020
+ const modules = vue.ref([]);
5021
+ const selectedModule = vue.ref('tasks');
5022
+ const modulePermissions = vue.ref(null);
5023
+
5024
+ const selectedPermissions = vue.ref([]);
5025
+ const permissionsChanged = vue.ref(false);
5026
+ const departmentId = route.params.id;
5027
+ const setModule = module=>{
5028
+ (selectedModule.value !== module) && (selectedModule.value = module) && getModulePermissions();
5029
+ };
5030
+ vue.onMounted(() => {
5031
+ getDepartmentModules();
5032
+ });
5033
+ const getDepartmentModules = ()=>{
5034
+ shApis.doGet(`admin/departments/department/list-all-modules/admin`).then(res=>{
5035
+ modules.value = res.data.modules;
5036
+ selectedModule.value = res.data.modules[0];
5037
+ getModulePermissions();
5038
+ });
5039
+ };
5040
+ const loading = vue.ref(false);
5041
+ const getModulePermissions = () => {
5042
+ loading.value = true;
5043
+ modulePermissions.value = null;
5044
+ shApis.doGet(`admin/departments/department/get-module-permissions/${selectedModule.value}?department_id=${departmentId}`).then(res=>{
5045
+ loading.value = false;
5046
+ modulePermissions.value = reformatModulePermissions(res.data.permissions);
5047
+ selectedPermissions.value = res.data.selectedPermissions ?? [];
5048
+ permissionsChanged.value = false;
5049
+ });
5050
+ };
5051
+ function reformatModulePermissions(mPs){
5052
+ let mpModules = {};
5053
+ mPs.map(mp=>{
5054
+ const arr = mp.split('.');
5055
+ const key = arr[0];
5056
+ if(typeof mpModules[key] == 'undefined'){
5057
+ mpModules[key]=[];
5058
+ }
5059
+ mpModules[key].push(mp);
5060
+ });
5061
+ return mpModules
5062
+ }
5063
+ const setPermissionsChanged = ()=>{
5064
+ permissionsChanged.value = true;
5065
+ return true
5066
+ };
5067
+ const checkAllPermissions = ()=>{
5068
+ if(selectedPermissions.value.length > 0) {
5069
+ selectedPermissions.value = [];
5070
+ } else {
5071
+ console.log(modulePermissions.value);
5072
+ const all = modulePermissions.value;
5073
+ Object.keys(all).map(key=>{
5074
+ all[key].map(permission=>{
5075
+ selectedPermissions.value.push(permission);
5076
+ });
5077
+ });
5078
+ }
5079
+ permissionsChanged.value = true;
5080
+ };
5081
+ const getLabel = permission => {
5082
+ const arr = permission.split('.');
5083
+ return arr[arr.length - 1].replaceAll('_',' ')
5084
+ };
5085
+ const getPermissionStyle = permission => {
5086
+ return {
5087
+ paddingLeft: `${(permission.split('.').length-1) * 20}px`
5088
+ }
5089
+ };
5090
+
5091
+ return (_ctx, _cache) => {
5092
+ return (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$3, [
5093
+ vue.createElementVNode("div", _hoisted_2$3, [
5094
+ (vue.openBlock(), vue.createElementBlock("ul", {
5095
+ class: "d-flex flex-column w-100 ps-2",
5096
+ key: selectedModule.value ? selectedModule.value:0
5097
+ }, [
5098
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(modules.value, (module) => {
5099
+ return (vue.openBlock(), vue.createElementBlock("li", {
5100
+ class: vue.normalizeClass(selectedModule.value === module && 'active'),
5101
+ key: selectedModule.value
5102
+ }, [
5103
+ vue.createElementVNode("input", {
5104
+ onClick: _cache[0] || (_cache[0] = $event => (checkAllPermissions())),
5105
+ disabled: selectedModule.value !== module,
5106
+ checked: selectedPermissions.value.length > 0 && selectedModule.value === module,
5107
+ type: "checkbox"
5108
+ }, null, 8 /* PROPS */, _hoisted_3$3),
5109
+ vue.createElementVNode("label", {
5110
+ class: "text-capitalize",
5111
+ onClick: $event => (setModule(module))
5112
+ }, vue.toDisplayString(module.replaceAll('_',' ')), 9 /* TEXT, PROPS */, _hoisted_4$3)
5113
+ ], 2 /* CLASS */))
5114
+ }), 128 /* KEYED_FRAGMENT */))
5115
+ ]))
5116
+ ]),
5117
+ vue.createElementVNode("div", _hoisted_5$3, [
5118
+ vue.createElementVNode("div", _hoisted_6$2, [
5119
+ (loading.value)
5120
+ ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_7$1, " loading ... "))
5121
+ : (vue.openBlock(), vue.createElementBlock("div", _hoisted_8$1, [
5122
+ vue.createElementVNode("div", _hoisted_9$1, [
5123
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(modulePermissions.value, (permissions) => {
5124
+ return (vue.openBlock(), vue.createElementBlock("div", _hoisted_10, [
5125
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(permissions, (permission) => {
5126
+ return (vue.openBlock(), vue.createElementBlock("label", {
5127
+ onClick: setPermissionsChanged,
5128
+ class: "text-capitalize list-group-item pb-1 text-capitalize",
5129
+ style: vue.normalizeStyle(getPermissionStyle(permission))
5130
+ }, [
5131
+ vue.withDirectives(vue.createElementVNode("input", {
5132
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = $event => ((selectedPermissions).value = $event)),
5133
+ value: permission,
5134
+ type: "checkbox"
5135
+ }, null, 8 /* PROPS */, _hoisted_11), [
5136
+ [vue.vModelCheckbox, selectedPermissions.value]
5137
+ ]),
5138
+ vue.createTextVNode(" " + vue.toDisplayString(getLabel(permission)), 1 /* TEXT */)
5139
+ ], 4 /* STYLE */))
5140
+ }), 256 /* UNKEYED_FRAGMENT */))
5141
+ ]))
5142
+ }), 256 /* UNKEYED_FRAGMENT */))
5143
+ ]),
5144
+ (permissionsChanged.value)
5145
+ ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_12, [
5146
+ vue.createElementVNode("div", _hoisted_13, [
5147
+ vue.createVNode(script$8, {
5148
+ url: `admin/departments/department/permissions/${vue.unref(departmentId)}/${selectedModule.value}`,
5149
+ data: {permissions: selectedPermissions.value},
5150
+ class: "btn btn-primary d-block"
5151
+ }, {
5152
+ default: vue.withCtx(() => [
5153
+ _hoisted_14,
5154
+ vue.createTextVNode(" Save")
5155
+ ]),
5156
+ _: 1 /* STABLE */
5157
+ }, 8 /* PROPS */, ["url", "data"])
5158
+ ])
5159
+ ]))
5160
+ : vue.createCommentVNode("v-if", true)
5161
+ ]))
5162
+ ])
5163
+ ])
5164
+ ]))
5165
+ }
5166
+ }
5167
+
5168
+ };
5169
+
5170
+ script$3.__scopeId = "data-v-0d4fa0ac";
5171
+ script$3.__file = "src/lib/components/core/Departments/department/ManagePermissions.vue";
5172
+
4987
5173
  const useUserStore = pinia.defineStore('user-store', {
4988
5174
  state: () => ({
4989
5175
  user: null,
@@ -5080,19 +5266,19 @@ const useUserStore = pinia.defineStore('user-store', {
5080
5266
  }
5081
5267
  });
5082
5268
 
5083
- const _hoisted_1$3 = /*#__PURE__*/vue.createElementVNode("h5", null, "Departments", -1 /* HOISTED */);
5084
- const _hoisted_2$3 = { class: "card sh-departments-card shadow" };
5085
- const _hoisted_3$3 = { class: "card-body" };
5086
- const _hoisted_4$3 = {
5269
+ const _hoisted_1$2 = /*#__PURE__*/vue.createElementVNode("h5", null, "Departments", -1 /* HOISTED */);
5270
+ const _hoisted_2$2 = { class: "card sh-departments-card shadow" };
5271
+ const _hoisted_3$2 = { class: "card-body" };
5272
+ const _hoisted_4$2 = {
5087
5273
  "data-bs-toggle": "modal",
5088
5274
  ref: "addDeptBtn",
5089
5275
  href: "#sh-department_modal",
5090
5276
  class: "btn btn-info btn-sm"
5091
5277
  };
5092
- const _hoisted_5$3 = /*#__PURE__*/vue.createElementVNode("i", { class: "fa fa-plus" }, null, -1 /* HOISTED */);
5278
+ const _hoisted_5$2 = /*#__PURE__*/vue.createElementVNode("i", { class: "fa fa-plus" }, null, -1 /* HOISTED */);
5093
5279
 
5094
5280
 
5095
- var script$3 = {
5281
+ var script$2 = {
5096
5282
  __name: 'Departments',
5097
5283
  setup(__props) {
5098
5284
 
@@ -5115,11 +5301,11 @@ function departmentAdded (response) {
5115
5301
 
5116
5302
  return (_ctx, _cache) => {
5117
5303
  return (vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
5118
- _hoisted_1$3,
5119
- vue.createElementVNode("div", _hoisted_2$3, [
5120
- vue.createElementVNode("div", _hoisted_3$3, [
5121
- vue.createElementVNode("a", _hoisted_4$3, [
5122
- _hoisted_5$3,
5304
+ _hoisted_1$2,
5305
+ vue.createElementVNode("div", _hoisted_2$2, [
5306
+ vue.createElementVNode("div", _hoisted_3$2, [
5307
+ vue.createElementVNode("a", _hoisted_4$2, [
5308
+ _hoisted_5$2,
5123
5309
  vue.createTextVNode(" ADD DEPARTMENT")
5124
5310
  ], 512 /* NEED_PATCH */),
5125
5311
  vue.createVNode(script$6, {
@@ -5158,14 +5344,14 @@ return (_ctx, _cache) => {
5158
5344
 
5159
5345
  };
5160
5346
 
5161
- script$3.__file = "src/lib/components/core/Departments/Departments.vue";
5347
+ script$2.__file = "src/lib/components/core/Departments/Departments.vue";
5162
5348
 
5163
- const _hoisted_1$2 = {
5349
+ const _hoisted_1$1 = {
5164
5350
  key: 0,
5165
5351
  class: "card sh-department-view shadow"
5166
5352
  };
5167
- const _hoisted_2$2 = { class: "card-body" };
5168
- const _hoisted_3$2 = /*#__PURE__*/vue.createElementVNode("a", {
5353
+ const _hoisted_2$1 = { class: "card-body" };
5354
+ const _hoisted_3$1 = /*#__PURE__*/vue.createElementVNode("a", {
5169
5355
  href: "#addModule",
5170
5356
  class: "btn btn-info btn-sm",
5171
5357
  "data-bs-toggle": "modal"
@@ -5173,11 +5359,11 @@ const _hoisted_3$2 = /*#__PURE__*/vue.createElementVNode("a", {
5173
5359
  /*#__PURE__*/vue.createElementVNode("i", { class: "bi-plus" }),
5174
5360
  /*#__PURE__*/vue.createTextVNode(" ADD Module")
5175
5361
  ], -1 /* HOISTED */);
5176
- const _hoisted_4$2 = { class: "text-primary text-capitalize" };
5177
- const _hoisted_5$2 = ["value"];
5178
- const _hoisted_6$2 = /*#__PURE__*/vue.createElementVNode("i", { class: "fa fa-save" }, null, -1 /* HOISTED */);
5362
+ const _hoisted_4$1 = { class: "text-primary text-capitalize" };
5363
+ const _hoisted_5$1 = ["value"];
5364
+ const _hoisted_6$1 = /*#__PURE__*/vue.createElementVNode("i", { class: "fa fa-save" }, null, -1 /* HOISTED */);
5179
5365
 
5180
- var script$2 = {
5366
+ var script$1 = {
5181
5367
  __name: 'Department',
5182
5368
  setup(__props) {
5183
5369
 
@@ -5271,9 +5457,9 @@ function submitPermissions() {
5271
5457
 
5272
5458
  return (_ctx, _cache) => {
5273
5459
  return (vue.unref(department))
5274
- ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$2, [
5275
- vue.createElementVNode("div", _hoisted_2$2, [
5276
- _hoisted_3$2,
5460
+ ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$1, [
5461
+ vue.createElementVNode("div", _hoisted_2$1, [
5462
+ _hoisted_3$1,
5277
5463
  vue.createElementVNode("h5", null, "Department #" + vue.toDisplayString(vue.unref(department).id) + " - " + vue.toDisplayString(vue.unref(department).name) + " Allowed Modules", 1 /* TEXT */),
5278
5464
  vue.createVNode(script$6, {
5279
5465
  actions: {
@@ -5330,7 +5516,7 @@ return (_ctx, _cache) => {
5330
5516
  default: vue.withCtx(() => [
5331
5517
  (vue.unref(getModule))
5332
5518
  ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
5333
- vue.createElementVNode("h5", _hoisted_4$2, "Permissions for " + vue.toDisplayString(vue.unref(getModule).module), 1 /* TEXT */),
5519
+ vue.createElementVNode("h5", _hoisted_4$1, "Permissions for " + vue.toDisplayString(vue.unref(getModule).module), 1 /* TEXT */),
5334
5520
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(modulePermissions), (permission) => {
5335
5521
  return (vue.openBlock(), vue.createElementBlock("div", {
5336
5522
  key: permission,
@@ -5343,7 +5529,7 @@ return (_ctx, _cache) => {
5343
5529
  type: "checkbox",
5344
5530
  "onUpdate:modelValue": _cache[0] || (_cache[0] = $event => (vue.isRef(selectedPermissions) ? (selectedPermissions).value = $event : selectedPermissions = $event)),
5345
5531
  value: permission
5346
- }, null, 8 /* PROPS */, _hoisted_5$2), [
5532
+ }, null, 8 /* PROPS */, _hoisted_5$1), [
5347
5533
  [vue.vModelCheckbox, vue.unref(selectedPermissions)]
5348
5534
  ]),
5349
5535
  vue.createTextVNode(" " + vue.toDisplayString(getPermissionLabel(permission)), 1 /* TEXT */)
@@ -5354,7 +5540,7 @@ return (_ctx, _cache) => {
5354
5540
  onClick: submitPermissions,
5355
5541
  class: "btn btn-info"
5356
5542
  }, [
5357
- _hoisted_6$2,
5543
+ _hoisted_6$1,
5358
5544
  vue.createTextVNode(" Submit")
5359
5545
  ])
5360
5546
  ], 64 /* STABLE_FRAGMENT */))
@@ -5370,123 +5556,7 @@ return (_ctx, _cache) => {
5370
5556
 
5371
5557
  };
5372
5558
 
5373
- script$2.__file = "src/lib/components/core/Departments/department/Department.vue";
5374
-
5375
- const _hoisted_1$1 = { class: "row permissions-main d-flex" };
5376
- const _hoisted_2$1 = {
5377
- id: "permissions-nav",
5378
- class: "col-md-2 shadow d-flex align-items-center"
5379
- };
5380
- const _hoisted_3$1 = /*#__PURE__*/vue.createElementVNode("input", { type: "checkbox" }, null, -1 /* HOISTED */);
5381
- const _hoisted_4$1 = ["onClick"];
5382
- const _hoisted_5$1 = {
5383
- id: "permissions-content",
5384
- class: "col-md-10"
5385
- };
5386
- const _hoisted_6$1 = {
5387
- key: 0,
5388
- class: "alert alert-info"
5389
- };
5390
- const _hoisted_7$1 = {
5391
- key: 1,
5392
- class: "d-flex justify-content-evenly"
5393
- };
5394
- const _hoisted_8$1 = { class: "col-md-3 list-group" };
5395
- const _hoisted_9$1 = { class: "p-2 text-capitalize list-group-item pb-0 text-capitalize" };
5396
- const _hoisted_10 = /*#__PURE__*/vue.createElementVNode("input", { type: "checkbox" }, null, -1 /* HOISTED */);
5397
-
5398
- var script$1 = {
5399
- __name: 'ManagePermissions',
5400
- setup(__props) {
5401
-
5402
- const route = vueRouter.useRoute();
5403
- const tabs = vue.ref(null);
5404
- vue.ref(0);
5405
- const modules = vue.ref([]);
5406
- const selectedModule = vue.ref('tasks');
5407
- const modulePermissions = vue.ref(null);
5408
- const setModule = module=>{
5409
- selectedModule.value = module;
5410
- getModulePermissions();
5411
- };
5412
- vue.onMounted(() => {
5413
- console.log(tabs.value.querySelectorAll('li'));
5414
- getDepartmentModules();
5415
- });
5416
- const getDepartmentModules = ()=>{
5417
- shApis.doGet(`admin/departments/department/list-modules/${route.params.id}?all=1`).then(res=>{
5418
- modules.value = res.data.data;
5419
- selectedModule.value = res.data.data[0];
5420
- getModulePermissions();
5421
- });
5422
- };
5423
- const loading = vue.ref(false);
5424
- const getModulePermissions = () => {
5425
- loading.value = true;
5426
- modulePermissions.value = null;
5427
- shApis.doGet(`admin/departments/department/get-module-permissions/${selectedModule.value.module}`).then(res=>{
5428
- loading.value = false;
5429
- modulePermissions.value = reformatModulePermissions(res.data.permissions);
5430
- });
5431
- };
5432
- function reformatModulePermissions(mPs){
5433
- let mpModules = {};
5434
- mPs.map(mp=>{
5435
- const arr = mp.split('.');
5436
- const key = arr[0];
5437
- if(typeof mpModules[key] == 'undefined'){
5438
- mpModules[key]=[];
5439
- }
5440
- mpModules[key].push(mp);
5441
- });
5442
- return mpModules
5443
- }
5444
-
5445
- return (_ctx, _cache) => {
5446
- return (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$1, [
5447
- vue.createElementVNode("div", _hoisted_2$1, [
5448
- vue.createElementVNode("ul", {
5449
- ref_key: "tabs",
5450
- ref: tabs,
5451
- class: "d-flex flex-column w-100"
5452
- }, [
5453
- (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(modules.value, (module) => {
5454
- return (vue.openBlock(), vue.createElementBlock("li", {
5455
- class: vue.normalizeClass(selectedModule.value.id === module.id && 'active'),
5456
- key: module.id
5457
- }, [
5458
- _hoisted_3$1,
5459
- vue.createElementVNode("label", {
5460
- class: "text-capitalize",
5461
- onClick: $event => (setModule(module))
5462
- }, vue.toDisplayString(module.module.replaceAll('_',' ')), 9 /* TEXT, PROPS */, _hoisted_4$1)
5463
- ], 2 /* CLASS */))
5464
- }), 128 /* KEYED_FRAGMENT */))
5465
- ], 512 /* NEED_PATCH */)
5466
- ]),
5467
- vue.createElementVNode("div", _hoisted_5$1, [
5468
- (loading.value)
5469
- ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_6$1, " loading ... "))
5470
- : (vue.openBlock(), vue.createElementBlock("div", _hoisted_7$1, [
5471
- (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(modulePermissions.value, (permissions) => {
5472
- return (vue.openBlock(), vue.createElementBlock("div", _hoisted_8$1, [
5473
- (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(permissions, (permission) => {
5474
- return (vue.openBlock(), vue.createElementBlock("label", _hoisted_9$1, [
5475
- _hoisted_10,
5476
- vue.createTextVNode(" " + vue.toDisplayString(permission), 1 /* TEXT */)
5477
- ]))
5478
- }), 256 /* UNKEYED_FRAGMENT */))
5479
- ]))
5480
- }), 256 /* UNKEYED_FRAGMENT */))
5481
- ]))
5482
- ])
5483
- ]))
5484
- }
5485
- }
5486
-
5487
- };
5488
-
5489
- script$1.__file = "src/lib/components/core/Departments/department/ManagePermissions.vue";
5559
+ script$1.__file = "src/lib/components/core/Departments/department/Department.vue";
5490
5560
 
5491
5561
  const _withScopeId = n => (vue.pushScopeId("data-v-2911509a"),n=n(),vue.popScopeId(),n);
5492
5562
  const _hoisted_1 = {
@@ -5650,15 +5720,15 @@ const ShFrontend = {
5650
5720
  });
5651
5721
  options.router.addRoute({
5652
5722
  path: '/sh-departments',
5653
- component: script$3
5723
+ component: script$2
5654
5724
  });
5655
5725
  options.router.addRoute({
5656
5726
  path: '/sh-departments/permissions/:id',
5657
- component: script$2
5727
+ component: script$1
5658
5728
  });
5659
5729
  options.router.addRoute({
5660
5730
  path: '/sh-departments/manage-permissions/:id',
5661
- component: script$1
5731
+ component: script$3
5662
5732
  });
5663
5733
  }
5664
5734
  //filter unwanted config items from options to be put in local storage
@@ -5671,6 +5741,7 @@ const ShFrontend = {
5671
5741
  };
5672
5742
 
5673
5743
  exports.Countries = countries;
5744
+ exports.ManagePermissions = script$3;
5674
5745
  exports.ShAutoForm = script$e;
5675
5746
  exports.ShCanvas = script$a;
5676
5747
  exports.ShConfirmAction = script$8;
package/dist/library.mjs CHANGED
@@ -2,11 +2,11 @@ import Axios from 'axios';
2
2
  import moment from 'moment';
3
3
  import Swal from 'sweetalert2';
4
4
  import NProgress from 'nprogress';
5
- import { openBlock, createElementBlock, createElementVNode, createTextVNode, toDisplayString, createCommentVNode, withDirectives, Fragment, renderList, vModelSelect, vModelText, resolveComponent, withModifiers, createVNode, ref, onMounted, unref, normalizeClass, createBlock, resolveDynamicComponent, inject, mergeProps, normalizeStyle, renderSlot, normalizeProps, guardReactiveProps, withCtx, createStaticVNode, shallowRef, computed, isRef, vModelCheckbox, watch, pushScopeId, popScopeId } from 'vue';
5
+ import { openBlock, createElementBlock, createElementVNode, createTextVNode, toDisplayString, createCommentVNode, withDirectives, Fragment, renderList, vModelSelect, vModelText, resolveComponent, withModifiers, createVNode, ref, onMounted, unref, normalizeClass, createBlock, resolveDynamicComponent, inject, mergeProps, normalizeStyle, renderSlot, normalizeProps, guardReactiveProps, withCtx, createStaticVNode, shallowRef, vModelCheckbox, pushScopeId, popScopeId, computed, isRef, watch } from 'vue';
6
6
  import Editor from '@tinymce/tinymce-vue';
7
7
  import _ from 'lodash';
8
- import { defineStore, storeToRefs } from 'pinia';
9
8
  import { useRoute, useRouter } from 'vue-router';
9
+ import { defineStore, storeToRefs } from 'pinia';
10
10
 
11
11
  function setItem (key, value) {
12
12
  let toStore = value;
@@ -2542,10 +2542,10 @@ const _hoisted_7$5 = { class: "row" };
2542
2542
  const _hoisted_8$3 = { class: "fg-label control-label text-capitalize control-bel col-md-12 request-form-label mb-2" };
2543
2543
  const _hoisted_9$4 = { class: "col-md-12" };
2544
2544
  const _hoisted_10$3 = ["data-cy", "placeholder", "name", "onFocus", "onChange"];
2545
- const _hoisted_11$2 = ["data-cy", "placeholder", "name", "onFocus", "onUpdate:modelValue"];
2546
- const _hoisted_12$2 = ["data-cy", "placeholder", "name", "onFocus", "onUpdate:modelValue"];
2547
- const _hoisted_13$2 = ["data-cy", "placeholder", "name", "onFocus", "onUpdate:modelValue"];
2548
- const _hoisted_14$2 = ["data-cy", "name", "onFocus", "onUpdate:modelValue"];
2545
+ const _hoisted_11$3 = ["data-cy", "placeholder", "name", "onFocus", "onUpdate:modelValue"];
2546
+ const _hoisted_12$3 = ["data-cy", "placeholder", "name", "onFocus", "onUpdate:modelValue"];
2547
+ const _hoisted_13$3 = ["data-cy", "placeholder", "name", "onFocus", "onUpdate:modelValue"];
2548
+ const _hoisted_14$3 = ["data-cy", "name", "onFocus", "onUpdate:modelValue"];
2549
2549
  const _hoisted_15$2 = ["disabled", "placeholder", "name", "onFocus", "onUpdate:modelValue"];
2550
2550
  const _hoisted_16$2 = ["name", "onFocus", "onUpdate:modelValue"];
2551
2551
  const _hoisted_17$2 = ["name", "onFocus", "onUpdate:modelValue"];
@@ -2650,7 +2650,7 @@ function render$5(_ctx, _cache, $props, $setup, $data, $options) {
2650
2650
  class: normalizeClass([_ctx.form_errors[field] == null ? ' field_' + field:'is-invalid ' + field, "form-control"]),
2651
2651
  "onUpdate:modelValue": $event => ((_ctx.form_elements[field]) = $event),
2652
2652
  type: "number"
2653
- }, null, 42 /* CLASS, PROPS, HYDRATE_EVENTS */, _hoisted_11$2)), [
2653
+ }, null, 42 /* CLASS, PROPS, HYDRATE_EVENTS */, _hoisted_11$3)), [
2654
2654
  [vModelText, _ctx.form_elements[field]]
2655
2655
  ])
2656
2656
  : createCommentVNode("v-if", true),
@@ -2664,7 +2664,7 @@ function render$5(_ctx, _cache, $props, $setup, $data, $options) {
2664
2664
  class: normalizeClass([_ctx.form_errors[field] == null ? ' field_' + field:'is-invalid ' + field, "form-control"]),
2665
2665
  "onUpdate:modelValue": $event => ((_ctx.form_elements[field]) = $event),
2666
2666
  type: "password"
2667
- }, null, 42 /* CLASS, PROPS, HYDRATE_EVENTS */, _hoisted_12$2)), [
2667
+ }, null, 42 /* CLASS, PROPS, HYDRATE_EVENTS */, _hoisted_12$3)), [
2668
2668
  [vModelText, _ctx.form_elements[field]]
2669
2669
  ])
2670
2670
  : createCommentVNode("v-if", true),
@@ -2679,7 +2679,7 @@ function render$5(_ctx, _cache, $props, $setup, $data, $options) {
2679
2679
  "onUpdate:modelValue": $event => ((_ctx.form_elements[field]) = $event),
2680
2680
  type: "email",
2681
2681
  required: ""
2682
- }, null, 42 /* CLASS, PROPS, HYDRATE_EVENTS */, _hoisted_13$2)), [
2682
+ }, null, 42 /* CLASS, PROPS, HYDRATE_EVENTS */, _hoisted_13$3)), [
2683
2683
  [vModelText, _ctx.form_elements[field]]
2684
2684
  ])
2685
2685
  : createCommentVNode("v-if", true),
@@ -2692,7 +2692,7 @@ function render$5(_ctx, _cache, $props, $setup, $data, $options) {
2692
2692
  onFocus: $event => ($options.removeErrors(field)),
2693
2693
  class: normalizeClass([_ctx.form_errors[field] == null ? ' field_' + field:'is-invalid ' + field, "form-control active"]),
2694
2694
  "onUpdate:modelValue": $event => ((_ctx.form_elements[field]) = $event)
2695
- }, null, 42 /* CLASS, PROPS, HYDRATE_EVENTS */, _hoisted_14$2)), [
2695
+ }, null, 42 /* CLASS, PROPS, HYDRATE_EVENTS */, _hoisted_14$3)), [
2696
2696
  [vModelText, _ctx.form_elements[field]]
2697
2697
  ])
2698
2698
  : createCommentVNode("v-if", true),
@@ -3603,16 +3603,16 @@ const _hoisted_9$3 = [
3603
3603
  _hoisted_4$6
3604
3604
  ];
3605
3605
  const _hoisted_10$2 = { class: "record_counts" };
3606
- const _hoisted_11$1 = {
3606
+ const _hoisted_11$2 = {
3607
3607
  key: 0,
3608
3608
  "aria-label": "Page navigation"
3609
3609
  };
3610
- const _hoisted_12$1 = { class: "pagination" };
3611
- const _hoisted_13$1 = {
3610
+ const _hoisted_12$2 = { class: "pagination" };
3611
+ const _hoisted_13$2 = {
3612
3612
  key: 0,
3613
3613
  class: "page-link"
3614
3614
  };
3615
- const _hoisted_14$1 = {
3615
+ const _hoisted_14$2 = {
3616
3616
  key: 1,
3617
3617
  class: "page-link"
3618
3618
  };
@@ -3655,8 +3655,8 @@ function render$2(_ctx, _cache, $props, $setup, $data, $options) {
3655
3655
  createElementVNode("span", _hoisted_10$2, " of " + toDisplayString($props.pagination_data.record_count) + " items", 1 /* TEXT */)
3656
3656
  ]),
3657
3657
  ($props.pagination_data != null)
3658
- ? (openBlock(), createElementBlock("nav", _hoisted_11$1, [
3659
- createElementVNode("ul", _hoisted_12$1, [
3658
+ ? (openBlock(), createElementBlock("nav", _hoisted_11$2, [
3659
+ createElementVNode("ul", _hoisted_12$2, [
3660
3660
  createElementVNode("li", {
3661
3661
  class: normalizeClass([$options.getActivePage === 1 ? 'disabled' : '' , "page-item"])
3662
3662
  }, [
@@ -3671,9 +3671,9 @@ function render$2(_ctx, _cache, $props, $setup, $data, $options) {
3671
3671
  key: page
3672
3672
  }, [
3673
3673
  ($options.getActivePage === page)
3674
- ? (openBlock(), createElementBlock("a", _hoisted_13$1, toDisplayString(page), 1 /* TEXT */))
3674
+ ? (openBlock(), createElementBlock("a", _hoisted_13$2, toDisplayString(page), 1 /* TEXT */))
3675
3675
  : (['..','...'].includes(page))
3676
- ? (openBlock(), createElementBlock("a", _hoisted_14$1, toDisplayString(page), 1 /* TEXT */))
3676
+ ? (openBlock(), createElementBlock("a", _hoisted_14$2, toDisplayString(page), 1 /* TEXT */))
3677
3677
  : (openBlock(), createElementBlock("a", {
3678
3678
  key: 2,
3679
3679
  onClick: $event => ($options.changeTableKey('page',page)),
@@ -4180,20 +4180,20 @@ const _hoisted_7$2 = {
4180
4180
  const _hoisted_8$2 = { class: "col-12 mb-3" };
4181
4181
  const _hoisted_9$2 = { class: "sh-search-bar" };
4182
4182
  const _hoisted_10$1 = ["placeholder"];
4183
- const _hoisted_11 = {
4183
+ const _hoisted_11$1 = {
4184
4184
  key: 0,
4185
4185
  class: "text-center"
4186
4186
  };
4187
- const _hoisted_12 = /*#__PURE__*/createElementVNode("div", {
4187
+ const _hoisted_12$1 = /*#__PURE__*/createElementVNode("div", {
4188
4188
  class: "spinner-border",
4189
4189
  role: "status"
4190
4190
  }, [
4191
4191
  /*#__PURE__*/createElementVNode("span", { class: "visually-hidden" }, "Loading...")
4192
4192
  ], -1 /* HOISTED */);
4193
- const _hoisted_13 = [
4194
- _hoisted_12
4193
+ const _hoisted_13$1 = [
4194
+ _hoisted_12$1
4195
4195
  ];
4196
- const _hoisted_14 = {
4196
+ const _hoisted_14$1 = {
4197
4197
  key: 1,
4198
4198
  class: "alert alert-danger"
4199
4199
  };
@@ -4363,9 +4363,9 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
4363
4363
  ($options.hasDefaultSlot)
4364
4364
  ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
4365
4365
  ($data.loading === 'loading')
4366
- ? (openBlock(), createElementBlock("div", _hoisted_11, _hoisted_13))
4366
+ ? (openBlock(), createElementBlock("div", _hoisted_11$1, _hoisted_13$1))
4367
4367
  : ($data.loading === 'error')
4368
- ? (openBlock(), createElementBlock("div", _hoisted_14, [
4368
+ ? (openBlock(), createElementBlock("div", _hoisted_14$1, [
4369
4369
  createElementVNode("span", _hoisted_15, toDisplayString($data.loading_error), 1 /* TEXT */)
4370
4370
  ]))
4371
4371
  : createCommentVNode("v-if", true),
@@ -4971,6 +4971,192 @@ return (_ctx, _cache) => {
4971
4971
 
4972
4972
  script$4.__file = "src/lib/components/ShDynamicTabs.vue";
4973
4973
 
4974
+ const _withScopeId$1 = n => (pushScopeId("data-v-0d4fa0ac"),n=n(),popScopeId(),n);
4975
+ const _hoisted_1$3 = { class: "row permissions-main d-flex" };
4976
+ const _hoisted_2$3 = {
4977
+ id: "permissions-nav",
4978
+ class: "col-md-2 d-flex align-items-center py-4"
4979
+ };
4980
+ const _hoisted_3$3 = ["disabled", "checked"];
4981
+ const _hoisted_4$3 = ["onClick"];
4982
+ const _hoisted_5$3 = {
4983
+ id: "permissions-content",
4984
+ class: "col-md-10 py-4 pe-4 ps-0"
4985
+ };
4986
+ const _hoisted_6$2 = { class: "p-2 rounded-2 bg-white h-100" };
4987
+ const _hoisted_7$1 = {
4988
+ key: 0,
4989
+ class: "alert alert-info"
4990
+ };
4991
+ const _hoisted_8$1 = { key: 1 };
4992
+ const _hoisted_9$1 = { class: "row row-cols-4" };
4993
+ const _hoisted_10 = { class: "col py-3" };
4994
+ const _hoisted_11 = ["value"];
4995
+ const _hoisted_12 = {
4996
+ key: 0,
4997
+ class: "w-100 row"
4998
+ };
4999
+ const _hoisted_13 = { class: "col-md-3" };
5000
+ const _hoisted_14 = /*#__PURE__*/ _withScopeId$1(() => /*#__PURE__*/createElementVNode("i", { class: "bi-check" }, null, -1 /* HOISTED */));
5001
+
5002
+ var script$3 = {
5003
+ __name: 'ManagePermissions',
5004
+ setup(__props) {
5005
+
5006
+ const route = useRoute();
5007
+ const modules = ref([]);
5008
+ const selectedModule = ref('tasks');
5009
+ const modulePermissions = ref(null);
5010
+
5011
+ const selectedPermissions = ref([]);
5012
+ const permissionsChanged = ref(false);
5013
+ const departmentId = route.params.id;
5014
+ const setModule = module=>{
5015
+ (selectedModule.value !== module) && (selectedModule.value = module) && getModulePermissions();
5016
+ };
5017
+ onMounted(() => {
5018
+ getDepartmentModules();
5019
+ });
5020
+ const getDepartmentModules = ()=>{
5021
+ shApis.doGet(`admin/departments/department/list-all-modules/admin`).then(res=>{
5022
+ modules.value = res.data.modules;
5023
+ selectedModule.value = res.data.modules[0];
5024
+ getModulePermissions();
5025
+ });
5026
+ };
5027
+ const loading = ref(false);
5028
+ const getModulePermissions = () => {
5029
+ loading.value = true;
5030
+ modulePermissions.value = null;
5031
+ shApis.doGet(`admin/departments/department/get-module-permissions/${selectedModule.value}?department_id=${departmentId}`).then(res=>{
5032
+ loading.value = false;
5033
+ modulePermissions.value = reformatModulePermissions(res.data.permissions);
5034
+ selectedPermissions.value = res.data.selectedPermissions ?? [];
5035
+ permissionsChanged.value = false;
5036
+ });
5037
+ };
5038
+ function reformatModulePermissions(mPs){
5039
+ let mpModules = {};
5040
+ mPs.map(mp=>{
5041
+ const arr = mp.split('.');
5042
+ const key = arr[0];
5043
+ if(typeof mpModules[key] == 'undefined'){
5044
+ mpModules[key]=[];
5045
+ }
5046
+ mpModules[key].push(mp);
5047
+ });
5048
+ return mpModules
5049
+ }
5050
+ const setPermissionsChanged = ()=>{
5051
+ permissionsChanged.value = true;
5052
+ return true
5053
+ };
5054
+ const checkAllPermissions = ()=>{
5055
+ if(selectedPermissions.value.length > 0) {
5056
+ selectedPermissions.value = [];
5057
+ } else {
5058
+ console.log(modulePermissions.value);
5059
+ const all = modulePermissions.value;
5060
+ Object.keys(all).map(key=>{
5061
+ all[key].map(permission=>{
5062
+ selectedPermissions.value.push(permission);
5063
+ });
5064
+ });
5065
+ }
5066
+ permissionsChanged.value = true;
5067
+ };
5068
+ const getLabel = permission => {
5069
+ const arr = permission.split('.');
5070
+ return arr[arr.length - 1].replaceAll('_',' ')
5071
+ };
5072
+ const getPermissionStyle = permission => {
5073
+ return {
5074
+ paddingLeft: `${(permission.split('.').length-1) * 20}px`
5075
+ }
5076
+ };
5077
+
5078
+ return (_ctx, _cache) => {
5079
+ return (openBlock(), createElementBlock("div", _hoisted_1$3, [
5080
+ createElementVNode("div", _hoisted_2$3, [
5081
+ (openBlock(), createElementBlock("ul", {
5082
+ class: "d-flex flex-column w-100 ps-2",
5083
+ key: selectedModule.value ? selectedModule.value:0
5084
+ }, [
5085
+ (openBlock(true), createElementBlock(Fragment, null, renderList(modules.value, (module) => {
5086
+ return (openBlock(), createElementBlock("li", {
5087
+ class: normalizeClass(selectedModule.value === module && 'active'),
5088
+ key: selectedModule.value
5089
+ }, [
5090
+ createElementVNode("input", {
5091
+ onClick: _cache[0] || (_cache[0] = $event => (checkAllPermissions())),
5092
+ disabled: selectedModule.value !== module,
5093
+ checked: selectedPermissions.value.length > 0 && selectedModule.value === module,
5094
+ type: "checkbox"
5095
+ }, null, 8 /* PROPS */, _hoisted_3$3),
5096
+ createElementVNode("label", {
5097
+ class: "text-capitalize",
5098
+ onClick: $event => (setModule(module))
5099
+ }, toDisplayString(module.replaceAll('_',' ')), 9 /* TEXT, PROPS */, _hoisted_4$3)
5100
+ ], 2 /* CLASS */))
5101
+ }), 128 /* KEYED_FRAGMENT */))
5102
+ ]))
5103
+ ]),
5104
+ createElementVNode("div", _hoisted_5$3, [
5105
+ createElementVNode("div", _hoisted_6$2, [
5106
+ (loading.value)
5107
+ ? (openBlock(), createElementBlock("div", _hoisted_7$1, " loading ... "))
5108
+ : (openBlock(), createElementBlock("div", _hoisted_8$1, [
5109
+ createElementVNode("div", _hoisted_9$1, [
5110
+ (openBlock(true), createElementBlock(Fragment, null, renderList(modulePermissions.value, (permissions) => {
5111
+ return (openBlock(), createElementBlock("div", _hoisted_10, [
5112
+ (openBlock(true), createElementBlock(Fragment, null, renderList(permissions, (permission) => {
5113
+ return (openBlock(), createElementBlock("label", {
5114
+ onClick: setPermissionsChanged,
5115
+ class: "text-capitalize list-group-item pb-1 text-capitalize",
5116
+ style: normalizeStyle(getPermissionStyle(permission))
5117
+ }, [
5118
+ withDirectives(createElementVNode("input", {
5119
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = $event => ((selectedPermissions).value = $event)),
5120
+ value: permission,
5121
+ type: "checkbox"
5122
+ }, null, 8 /* PROPS */, _hoisted_11), [
5123
+ [vModelCheckbox, selectedPermissions.value]
5124
+ ]),
5125
+ createTextVNode(" " + toDisplayString(getLabel(permission)), 1 /* TEXT */)
5126
+ ], 4 /* STYLE */))
5127
+ }), 256 /* UNKEYED_FRAGMENT */))
5128
+ ]))
5129
+ }), 256 /* UNKEYED_FRAGMENT */))
5130
+ ]),
5131
+ (permissionsChanged.value)
5132
+ ? (openBlock(), createElementBlock("div", _hoisted_12, [
5133
+ createElementVNode("div", _hoisted_13, [
5134
+ createVNode(script$8, {
5135
+ url: `admin/departments/department/permissions/${unref(departmentId)}/${selectedModule.value}`,
5136
+ data: {permissions: selectedPermissions.value},
5137
+ class: "btn btn-primary d-block"
5138
+ }, {
5139
+ default: withCtx(() => [
5140
+ _hoisted_14,
5141
+ createTextVNode(" Save")
5142
+ ]),
5143
+ _: 1 /* STABLE */
5144
+ }, 8 /* PROPS */, ["url", "data"])
5145
+ ])
5146
+ ]))
5147
+ : createCommentVNode("v-if", true)
5148
+ ]))
5149
+ ])
5150
+ ])
5151
+ ]))
5152
+ }
5153
+ }
5154
+
5155
+ };
5156
+
5157
+ script$3.__scopeId = "data-v-0d4fa0ac";
5158
+ script$3.__file = "src/lib/components/core/Departments/department/ManagePermissions.vue";
5159
+
4974
5160
  const useUserStore = defineStore('user-store', {
4975
5161
  state: () => ({
4976
5162
  user: null,
@@ -5067,19 +5253,19 @@ const useUserStore = defineStore('user-store', {
5067
5253
  }
5068
5254
  });
5069
5255
 
5070
- const _hoisted_1$3 = /*#__PURE__*/createElementVNode("h5", null, "Departments", -1 /* HOISTED */);
5071
- const _hoisted_2$3 = { class: "card sh-departments-card shadow" };
5072
- const _hoisted_3$3 = { class: "card-body" };
5073
- const _hoisted_4$3 = {
5256
+ const _hoisted_1$2 = /*#__PURE__*/createElementVNode("h5", null, "Departments", -1 /* HOISTED */);
5257
+ const _hoisted_2$2 = { class: "card sh-departments-card shadow" };
5258
+ const _hoisted_3$2 = { class: "card-body" };
5259
+ const _hoisted_4$2 = {
5074
5260
  "data-bs-toggle": "modal",
5075
5261
  ref: "addDeptBtn",
5076
5262
  href: "#sh-department_modal",
5077
5263
  class: "btn btn-info btn-sm"
5078
5264
  };
5079
- const _hoisted_5$3 = /*#__PURE__*/createElementVNode("i", { class: "fa fa-plus" }, null, -1 /* HOISTED */);
5265
+ const _hoisted_5$2 = /*#__PURE__*/createElementVNode("i", { class: "fa fa-plus" }, null, -1 /* HOISTED */);
5080
5266
 
5081
5267
 
5082
- var script$3 = {
5268
+ var script$2 = {
5083
5269
  __name: 'Departments',
5084
5270
  setup(__props) {
5085
5271
 
@@ -5102,11 +5288,11 @@ function departmentAdded (response) {
5102
5288
 
5103
5289
  return (_ctx, _cache) => {
5104
5290
  return (openBlock(), createElementBlock(Fragment, null, [
5105
- _hoisted_1$3,
5106
- createElementVNode("div", _hoisted_2$3, [
5107
- createElementVNode("div", _hoisted_3$3, [
5108
- createElementVNode("a", _hoisted_4$3, [
5109
- _hoisted_5$3,
5291
+ _hoisted_1$2,
5292
+ createElementVNode("div", _hoisted_2$2, [
5293
+ createElementVNode("div", _hoisted_3$2, [
5294
+ createElementVNode("a", _hoisted_4$2, [
5295
+ _hoisted_5$2,
5110
5296
  createTextVNode(" ADD DEPARTMENT")
5111
5297
  ], 512 /* NEED_PATCH */),
5112
5298
  createVNode(script$6, {
@@ -5145,14 +5331,14 @@ return (_ctx, _cache) => {
5145
5331
 
5146
5332
  };
5147
5333
 
5148
- script$3.__file = "src/lib/components/core/Departments/Departments.vue";
5334
+ script$2.__file = "src/lib/components/core/Departments/Departments.vue";
5149
5335
 
5150
- const _hoisted_1$2 = {
5336
+ const _hoisted_1$1 = {
5151
5337
  key: 0,
5152
5338
  class: "card sh-department-view shadow"
5153
5339
  };
5154
- const _hoisted_2$2 = { class: "card-body" };
5155
- const _hoisted_3$2 = /*#__PURE__*/createElementVNode("a", {
5340
+ const _hoisted_2$1 = { class: "card-body" };
5341
+ const _hoisted_3$1 = /*#__PURE__*/createElementVNode("a", {
5156
5342
  href: "#addModule",
5157
5343
  class: "btn btn-info btn-sm",
5158
5344
  "data-bs-toggle": "modal"
@@ -5160,11 +5346,11 @@ const _hoisted_3$2 = /*#__PURE__*/createElementVNode("a", {
5160
5346
  /*#__PURE__*/createElementVNode("i", { class: "bi-plus" }),
5161
5347
  /*#__PURE__*/createTextVNode(" ADD Module")
5162
5348
  ], -1 /* HOISTED */);
5163
- const _hoisted_4$2 = { class: "text-primary text-capitalize" };
5164
- const _hoisted_5$2 = ["value"];
5165
- const _hoisted_6$2 = /*#__PURE__*/createElementVNode("i", { class: "fa fa-save" }, null, -1 /* HOISTED */);
5349
+ const _hoisted_4$1 = { class: "text-primary text-capitalize" };
5350
+ const _hoisted_5$1 = ["value"];
5351
+ const _hoisted_6$1 = /*#__PURE__*/createElementVNode("i", { class: "fa fa-save" }, null, -1 /* HOISTED */);
5166
5352
 
5167
- var script$2 = {
5353
+ var script$1 = {
5168
5354
  __name: 'Department',
5169
5355
  setup(__props) {
5170
5356
 
@@ -5258,9 +5444,9 @@ function submitPermissions() {
5258
5444
 
5259
5445
  return (_ctx, _cache) => {
5260
5446
  return (unref(department))
5261
- ? (openBlock(), createElementBlock("div", _hoisted_1$2, [
5262
- createElementVNode("div", _hoisted_2$2, [
5263
- _hoisted_3$2,
5447
+ ? (openBlock(), createElementBlock("div", _hoisted_1$1, [
5448
+ createElementVNode("div", _hoisted_2$1, [
5449
+ _hoisted_3$1,
5264
5450
  createElementVNode("h5", null, "Department #" + toDisplayString(unref(department).id) + " - " + toDisplayString(unref(department).name) + " Allowed Modules", 1 /* TEXT */),
5265
5451
  createVNode(script$6, {
5266
5452
  actions: {
@@ -5317,7 +5503,7 @@ return (_ctx, _cache) => {
5317
5503
  default: withCtx(() => [
5318
5504
  (unref(getModule))
5319
5505
  ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
5320
- createElementVNode("h5", _hoisted_4$2, "Permissions for " + toDisplayString(unref(getModule).module), 1 /* TEXT */),
5506
+ createElementVNode("h5", _hoisted_4$1, "Permissions for " + toDisplayString(unref(getModule).module), 1 /* TEXT */),
5321
5507
  (openBlock(true), createElementBlock(Fragment, null, renderList(unref(modulePermissions), (permission) => {
5322
5508
  return (openBlock(), createElementBlock("div", {
5323
5509
  key: permission,
@@ -5330,7 +5516,7 @@ return (_ctx, _cache) => {
5330
5516
  type: "checkbox",
5331
5517
  "onUpdate:modelValue": _cache[0] || (_cache[0] = $event => (isRef(selectedPermissions) ? (selectedPermissions).value = $event : selectedPermissions = $event)),
5332
5518
  value: permission
5333
- }, null, 8 /* PROPS */, _hoisted_5$2), [
5519
+ }, null, 8 /* PROPS */, _hoisted_5$1), [
5334
5520
  [vModelCheckbox, unref(selectedPermissions)]
5335
5521
  ]),
5336
5522
  createTextVNode(" " + toDisplayString(getPermissionLabel(permission)), 1 /* TEXT */)
@@ -5341,7 +5527,7 @@ return (_ctx, _cache) => {
5341
5527
  onClick: submitPermissions,
5342
5528
  class: "btn btn-info"
5343
5529
  }, [
5344
- _hoisted_6$2,
5530
+ _hoisted_6$1,
5345
5531
  createTextVNode(" Submit")
5346
5532
  ])
5347
5533
  ], 64 /* STABLE_FRAGMENT */))
@@ -5357,123 +5543,7 @@ return (_ctx, _cache) => {
5357
5543
 
5358
5544
  };
5359
5545
 
5360
- script$2.__file = "src/lib/components/core/Departments/department/Department.vue";
5361
-
5362
- const _hoisted_1$1 = { class: "row permissions-main d-flex" };
5363
- const _hoisted_2$1 = {
5364
- id: "permissions-nav",
5365
- class: "col-md-2 shadow d-flex align-items-center"
5366
- };
5367
- const _hoisted_3$1 = /*#__PURE__*/createElementVNode("input", { type: "checkbox" }, null, -1 /* HOISTED */);
5368
- const _hoisted_4$1 = ["onClick"];
5369
- const _hoisted_5$1 = {
5370
- id: "permissions-content",
5371
- class: "col-md-10"
5372
- };
5373
- const _hoisted_6$1 = {
5374
- key: 0,
5375
- class: "alert alert-info"
5376
- };
5377
- const _hoisted_7$1 = {
5378
- key: 1,
5379
- class: "d-flex justify-content-evenly"
5380
- };
5381
- const _hoisted_8$1 = { class: "col-md-3 list-group" };
5382
- const _hoisted_9$1 = { class: "p-2 text-capitalize list-group-item pb-0 text-capitalize" };
5383
- const _hoisted_10 = /*#__PURE__*/createElementVNode("input", { type: "checkbox" }, null, -1 /* HOISTED */);
5384
-
5385
- var script$1 = {
5386
- __name: 'ManagePermissions',
5387
- setup(__props) {
5388
-
5389
- const route = useRoute();
5390
- const tabs = ref(null);
5391
- ref(0);
5392
- const modules = ref([]);
5393
- const selectedModule = ref('tasks');
5394
- const modulePermissions = ref(null);
5395
- const setModule = module=>{
5396
- selectedModule.value = module;
5397
- getModulePermissions();
5398
- };
5399
- onMounted(() => {
5400
- console.log(tabs.value.querySelectorAll('li'));
5401
- getDepartmentModules();
5402
- });
5403
- const getDepartmentModules = ()=>{
5404
- shApis.doGet(`admin/departments/department/list-modules/${route.params.id}?all=1`).then(res=>{
5405
- modules.value = res.data.data;
5406
- selectedModule.value = res.data.data[0];
5407
- getModulePermissions();
5408
- });
5409
- };
5410
- const loading = ref(false);
5411
- const getModulePermissions = () => {
5412
- loading.value = true;
5413
- modulePermissions.value = null;
5414
- shApis.doGet(`admin/departments/department/get-module-permissions/${selectedModule.value.module}`).then(res=>{
5415
- loading.value = false;
5416
- modulePermissions.value = reformatModulePermissions(res.data.permissions);
5417
- });
5418
- };
5419
- function reformatModulePermissions(mPs){
5420
- let mpModules = {};
5421
- mPs.map(mp=>{
5422
- const arr = mp.split('.');
5423
- const key = arr[0];
5424
- if(typeof mpModules[key] == 'undefined'){
5425
- mpModules[key]=[];
5426
- }
5427
- mpModules[key].push(mp);
5428
- });
5429
- return mpModules
5430
- }
5431
-
5432
- return (_ctx, _cache) => {
5433
- return (openBlock(), createElementBlock("div", _hoisted_1$1, [
5434
- createElementVNode("div", _hoisted_2$1, [
5435
- createElementVNode("ul", {
5436
- ref_key: "tabs",
5437
- ref: tabs,
5438
- class: "d-flex flex-column w-100"
5439
- }, [
5440
- (openBlock(true), createElementBlock(Fragment, null, renderList(modules.value, (module) => {
5441
- return (openBlock(), createElementBlock("li", {
5442
- class: normalizeClass(selectedModule.value.id === module.id && 'active'),
5443
- key: module.id
5444
- }, [
5445
- _hoisted_3$1,
5446
- createElementVNode("label", {
5447
- class: "text-capitalize",
5448
- onClick: $event => (setModule(module))
5449
- }, toDisplayString(module.module.replaceAll('_',' ')), 9 /* TEXT, PROPS */, _hoisted_4$1)
5450
- ], 2 /* CLASS */))
5451
- }), 128 /* KEYED_FRAGMENT */))
5452
- ], 512 /* NEED_PATCH */)
5453
- ]),
5454
- createElementVNode("div", _hoisted_5$1, [
5455
- (loading.value)
5456
- ? (openBlock(), createElementBlock("div", _hoisted_6$1, " loading ... "))
5457
- : (openBlock(), createElementBlock("div", _hoisted_7$1, [
5458
- (openBlock(true), createElementBlock(Fragment, null, renderList(modulePermissions.value, (permissions) => {
5459
- return (openBlock(), createElementBlock("div", _hoisted_8$1, [
5460
- (openBlock(true), createElementBlock(Fragment, null, renderList(permissions, (permission) => {
5461
- return (openBlock(), createElementBlock("label", _hoisted_9$1, [
5462
- _hoisted_10,
5463
- createTextVNode(" " + toDisplayString(permission), 1 /* TEXT */)
5464
- ]))
5465
- }), 256 /* UNKEYED_FRAGMENT */))
5466
- ]))
5467
- }), 256 /* UNKEYED_FRAGMENT */))
5468
- ]))
5469
- ])
5470
- ]))
5471
- }
5472
- }
5473
-
5474
- };
5475
-
5476
- script$1.__file = "src/lib/components/core/Departments/department/ManagePermissions.vue";
5546
+ script$1.__file = "src/lib/components/core/Departments/department/Department.vue";
5477
5547
 
5478
5548
  const _withScopeId = n => (pushScopeId("data-v-2911509a"),n=n(),popScopeId(),n);
5479
5549
  const _hoisted_1 = {
@@ -5637,15 +5707,15 @@ const ShFrontend = {
5637
5707
  });
5638
5708
  options.router.addRoute({
5639
5709
  path: '/sh-departments',
5640
- component: script$3
5710
+ component: script$2
5641
5711
  });
5642
5712
  options.router.addRoute({
5643
5713
  path: '/sh-departments/permissions/:id',
5644
- component: script$2
5714
+ component: script$1
5645
5715
  });
5646
5716
  options.router.addRoute({
5647
5717
  path: '/sh-departments/manage-permissions/:id',
5648
- component: script$1
5718
+ component: script$3
5649
5719
  });
5650
5720
  }
5651
5721
  //filter unwanted config items from options to be put in local storage
@@ -5657,4 +5727,4 @@ const ShFrontend = {
5657
5727
  }
5658
5728
  };
5659
5729
 
5660
- export { countries as Countries, script$e as ShAutoForm, script$a as ShCanvas, script$8 as ShConfirmAction, script$d as ShDropDownForm, script$4 as ShDynamicTabs, script$l as ShForm, ShFrontend, script$c as ShModal, script$b as ShModalForm, script$o as ShPhone, script$7 as ShSilentAction, script$6 as ShTable, script$5 as ShTabs, shApis, shRepo, ShStorage as shStorage, useUserStore };
5730
+ export { countries as Countries, script$3 as ManagePermissions, script$e as ShAutoForm, script$a as ShCanvas, script$8 as ShConfirmAction, script$d as ShDropDownForm, script$4 as ShDynamicTabs, script$l as ShForm, ShFrontend, script$c as ShModal, script$b as ShModalForm, script$o as ShPhone, script$7 as ShSilentAction, script$6 as ShTable, script$5 as ShTabs, shApis, shRepo, ShStorage as shStorage, useUserStore };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iankibetsh/shframework",
3
- "version": "1.4.5",
3
+ "version": "1.4.6",
4
4
  "description": "Vue library for handling laravel backend",
5
5
  "main": "dist/library.js",
6
6
  "module": "dist/library.mjs",