@iankibetsh/shframework 0.1.4 → 0.1.9
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/README.md +12 -0
- package/dist/dist/library.mjs.css +0 -143
- package/dist/library.js +82 -74
- package/dist/library.mjs +83 -75
- package/package.json +3 -2
package/README.md
ADDED
|
@@ -30,146 +30,3 @@
|
|
|
30
30
|
font-weight: 300;
|
|
31
31
|
opacity: 0.5;
|
|
32
32
|
}
|
|
33
|
-
|
|
34
|
-
.single-mobile-req{
|
|
35
|
-
border: 1px solid #eeeeee;
|
|
36
|
-
border-radius: 0.25rem;
|
|
37
|
-
margin: 0.125rem 0;
|
|
38
|
-
box-shadow: 0 2px 8px #00000011;
|
|
39
|
-
background-color: white !important;
|
|
40
|
-
margin-bottom: 1.5rem;
|
|
41
|
-
}
|
|
42
|
-
.hauzisha-search-bar{
|
|
43
|
-
max-width: 25rem;
|
|
44
|
-
}
|
|
45
|
-
.submitted_count{
|
|
46
|
-
position: relative;
|
|
47
|
-
font-size: 1rem !important;
|
|
48
|
-
text-decoration: none;
|
|
49
|
-
background-color: #1e8449;
|
|
50
|
-
padding: 0.5rem 0.75rem;
|
|
51
|
-
font-weight: bold;
|
|
52
|
-
line-height: 1rem;
|
|
53
|
-
display: inline-block;
|
|
54
|
-
color: white;
|
|
55
|
-
text-align: center !important;
|
|
56
|
-
margin: 0.125rem;
|
|
57
|
-
border-radius: 0.25rem;
|
|
58
|
-
}
|
|
59
|
-
/*.submitted_count:before{*/
|
|
60
|
-
/* content: "";*/
|
|
61
|
-
/* position: absolute;*/
|
|
62
|
-
/* inset: -8px;*/
|
|
63
|
-
/* background-color: #1e8449;*/
|
|
64
|
-
/* z-index: -1;*/
|
|
65
|
-
/* border-radius: 50%;*/
|
|
66
|
-
/*}*/
|
|
67
|
-
table.table{
|
|
68
|
-
color: unset !important;
|
|
69
|
-
border-radius: 0.25rem !important;
|
|
70
|
-
text-decoration: none !important;
|
|
71
|
-
transition: 0.5s all ease;
|
|
72
|
-
box-shadow: 0 3px 5px #0002;
|
|
73
|
-
width: 100%;
|
|
74
|
-
font-size: 0.9rem !important;
|
|
75
|
-
}
|
|
76
|
-
thead,tbody{
|
|
77
|
-
border-radius: inherit;
|
|
78
|
-
}
|
|
79
|
-
thead th{
|
|
80
|
-
background-color: var(--s-primary);
|
|
81
|
-
}
|
|
82
|
-
thead th:first-child{
|
|
83
|
-
background-color: var(--s-primary);
|
|
84
|
-
border-radius: 0.25rem 0 0 0 !important;
|
|
85
|
-
}
|
|
86
|
-
thead th:last-child{
|
|
87
|
-
background-color: var(--s-primary);
|
|
88
|
-
border-radius: 0 0.25rem 0 0 !important;
|
|
89
|
-
}
|
|
90
|
-
thead *{
|
|
91
|
-
color: white !important;
|
|
92
|
-
text-decoration: none !important;
|
|
93
|
-
font-weight: 400;
|
|
94
|
-
}
|
|
95
|
-
tr,td,th{
|
|
96
|
-
border-bottom: none !important;
|
|
97
|
-
}
|
|
98
|
-
td:first-child,th:first-child{
|
|
99
|
-
border-left: 1px solid #00000006 !important;
|
|
100
|
-
}
|
|
101
|
-
tr:nth-child(even){
|
|
102
|
-
background-color: #2540a211;
|
|
103
|
-
}
|
|
104
|
-
tr:last-child{
|
|
105
|
-
border-bottom: none !important;
|
|
106
|
-
}
|
|
107
|
-
td:nth-child(even){
|
|
108
|
-
border-left: 1px solid #2540a244;
|
|
109
|
-
border-right: 1px solid #2540a244;
|
|
110
|
-
}
|
|
111
|
-
td:not(:last-child),th:not(:last-child),td:not(:first-child),th:not(:first-child){
|
|
112
|
-
max-width: 25rem !important;
|
|
113
|
-
}
|
|
114
|
-
th:nth-child(even){
|
|
115
|
-
border-left: 1px solid #fff4;
|
|
116
|
-
border-right: 1px solid #fff4;
|
|
117
|
-
}
|
|
118
|
-
th:last-child,td:last-child{
|
|
119
|
-
border-right: 1px solid #00000006 !important;
|
|
120
|
-
}
|
|
121
|
-
.has-response {
|
|
122
|
-
background-color: rgb(252 243 207);
|
|
123
|
-
/*color: green;*/
|
|
124
|
-
}
|
|
125
|
-
.action_icon{
|
|
126
|
-
background-position: center;
|
|
127
|
-
background-size: cover;
|
|
128
|
-
height: 30px;
|
|
129
|
-
width: 30px;
|
|
130
|
-
}
|
|
131
|
-
.action_icon:hover {
|
|
132
|
-
border: 1px solid blue;
|
|
133
|
-
}
|
|
134
|
-
.sh-search-bar{
|
|
135
|
-
position: relative;
|
|
136
|
-
height: 3rem;
|
|
137
|
-
padding: 0;
|
|
138
|
-
display: flex;
|
|
139
|
-
align-items: center;
|
|
140
|
-
}
|
|
141
|
-
.sh-search-bar .sh-search-input{
|
|
142
|
-
padding: 0.5rem 1rem 0.5rem 2.5rem;
|
|
143
|
-
box-shadow: none;
|
|
144
|
-
outline: none;
|
|
145
|
-
border: 1px solid #ced0d4;
|
|
146
|
-
border-radius: 1.5rem;
|
|
147
|
-
max-width: 25rem;
|
|
148
|
-
margin-bottom: 0;
|
|
149
|
-
}
|
|
150
|
-
.sh-search-bar .sh-search-icon{
|
|
151
|
-
position: absolute;
|
|
152
|
-
left: 1rem;
|
|
153
|
-
top: 50%;
|
|
154
|
-
transform: translateY(-50%);
|
|
155
|
-
color: grey;
|
|
156
|
-
font-size: 1rem;
|
|
157
|
-
pointer-events: none;
|
|
158
|
-
padding: 0;
|
|
159
|
-
}
|
|
160
|
-
.sh-search-bar .sh-search-icon i{
|
|
161
|
-
padding: 0;
|
|
162
|
-
margin-bottom: 0;
|
|
163
|
-
}
|
|
164
|
-
.sh-search-bar .sh-search-input:focus{
|
|
165
|
-
border: 1px solid #076dfb;
|
|
166
|
-
}
|
|
167
|
-
.sh-search-bar .sh-search-input:focus + .sh-search-icon{
|
|
168
|
-
color: #076dfb;
|
|
169
|
-
}
|
|
170
|
-
.sh-search-bar .sh-search-input::placeholder{
|
|
171
|
-
font-size: 1.1rem;
|
|
172
|
-
font-weight: 300;
|
|
173
|
-
opacity: 0.8;
|
|
174
|
-
text-transform: capitalize;
|
|
175
|
-
}
|
package/dist/library.js
CHANGED
|
@@ -2155,7 +2155,7 @@ script$5.__file = "src/views/ShForm.vue";
|
|
|
2155
2155
|
|
|
2156
2156
|
var script$4 = {
|
|
2157
2157
|
name: 'ShCanvas',
|
|
2158
|
-
props: ['
|
|
2158
|
+
props: ['canvasTitle', 'canvasId', 'position'],
|
|
2159
2159
|
components: {
|
|
2160
2160
|
},
|
|
2161
2161
|
data () {
|
|
@@ -2183,11 +2183,11 @@ function render$4(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2183
2183
|
class: vue.normalizeClass(["offcanvas", $data.side]),
|
|
2184
2184
|
"data-bs-scroll": "true",
|
|
2185
2185
|
tabindex: "-1",
|
|
2186
|
-
id: $props.
|
|
2186
|
+
id: $props.canvasId,
|
|
2187
2187
|
"aria-labelledby": "offcanvasScrollingLabel"
|
|
2188
2188
|
}, [
|
|
2189
2189
|
vue.createElementVNode("div", _hoisted_2$4, [
|
|
2190
|
-
vue.createElementVNode("h5", _hoisted_3$4, vue.toDisplayString($props.
|
|
2190
|
+
vue.createElementVNode("h5", _hoisted_3$4, vue.toDisplayString($props.canvasTitle), 1 /* TEXT */),
|
|
2191
2191
|
vue.createElementVNode("button", {
|
|
2192
2192
|
type: "button",
|
|
2193
2193
|
ref: "closecanvas",
|
|
@@ -2208,9 +2208,8 @@ script$4.__file = "src/views/ShCanvas.vue";
|
|
|
2208
2208
|
|
|
2209
2209
|
var script$3 = {
|
|
2210
2210
|
name: 'ShModal',
|
|
2211
|
-
props: ['
|
|
2211
|
+
props: ['modalTitle', 'modalId', 'modalSize'],
|
|
2212
2212
|
components: {
|
|
2213
|
-
|
|
2214
2213
|
}
|
|
2215
2214
|
};
|
|
2216
2215
|
|
|
@@ -2230,16 +2229,16 @@ function render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2230
2229
|
return (vue.openBlock(), vue.createElementBlock("div", {
|
|
2231
2230
|
class: "modal fade",
|
|
2232
2231
|
tabindex: "-1",
|
|
2233
|
-
id: $props.
|
|
2232
|
+
id: $props.modalId,
|
|
2234
2233
|
"data-focus": "false",
|
|
2235
2234
|
"aria-hidden": "true"
|
|
2236
2235
|
}, [
|
|
2237
2236
|
vue.createElementVNode("div", {
|
|
2238
|
-
class: vue.normalizeClass(["modal-dialog", `modal-${$props.
|
|
2237
|
+
class: vue.normalizeClass(["modal-dialog", `modal-${$props.modalSize}`])
|
|
2239
2238
|
}, [
|
|
2240
2239
|
vue.createElementVNode("div", _hoisted_2$3, [
|
|
2241
2240
|
vue.createElementVNode("div", _hoisted_3$3, [
|
|
2242
|
-
vue.createElementVNode("h3", _hoisted_4$2, vue.toDisplayString($props.
|
|
2241
|
+
vue.createElementVNode("h3", _hoisted_4$2, vue.toDisplayString($props.modalTitle), 1 /* TEXT */),
|
|
2243
2242
|
_hoisted_5$2
|
|
2244
2243
|
]),
|
|
2245
2244
|
vue.createElementVNode("div", _hoisted_6$1, [
|
|
@@ -2622,7 +2621,7 @@ var helpers = {
|
|
|
2622
2621
|
|
|
2623
2622
|
var script$1 = {
|
|
2624
2623
|
name: 'sh-table',
|
|
2625
|
-
props: ['
|
|
2624
|
+
props: ['endPoint', 'headers', 'pageCount', 'actions', 'hideCount', 'hideLoadMore', 'links', 'reload', 'hideSearch', 'sharedData', 'searchPlaceholder', 'event', 'displayMore', 'displayMoreBtnClass', 'moreDetailsColumns', 'moreDetailsFields', 'hasDownload', 'downloadFields'],
|
|
2626
2625
|
inject: ['channel', 'global'],
|
|
2627
2626
|
data () {
|
|
2628
2627
|
return {
|
|
@@ -2746,7 +2745,7 @@ var script$1 = {
|
|
|
2746
2745
|
titles: headers,
|
|
2747
2746
|
export: 1
|
|
2748
2747
|
};
|
|
2749
|
-
apis.doPost(this.
|
|
2748
|
+
apis.doPost(this.endPoint, data).then(res => {
|
|
2750
2749
|
this.downloading = false;
|
|
2751
2750
|
if (res.data.file) {
|
|
2752
2751
|
const url = this.appUrl + 'external-download?file=' + res.data.file + '&name=' + res.data.name;
|
|
@@ -2776,7 +2775,7 @@ var script$1 = {
|
|
|
2776
2775
|
if (this.pagination_data) {
|
|
2777
2776
|
this.pagination_data.loading = 1;
|
|
2778
2777
|
}
|
|
2779
|
-
apis.doGet(this.
|
|
2778
|
+
apis.doGet(this.endPoint, data).then(req => {
|
|
2780
2779
|
this.loading = 'done';
|
|
2781
2780
|
const response = req.data.data;
|
|
2782
2781
|
this.pagination_data = {
|
|
@@ -2804,7 +2803,7 @@ var script$1 = {
|
|
|
2804
2803
|
this.records = response.data;
|
|
2805
2804
|
}
|
|
2806
2805
|
}).catch(reason => {
|
|
2807
|
-
const error = (typeof reason.response === 'undefined') ? 'Error getting data from backend' : `${reason.response.status}:${reason.response.statusText} (${this.
|
|
2806
|
+
const error = (typeof reason.response === 'undefined') ? 'Error getting data from backend' : `${reason.response.status}:${reason.response.statusText} (${this.endPoint})`;
|
|
2808
2807
|
this.loading_error = error;
|
|
2809
2808
|
this.loading = 'error';
|
|
2810
2809
|
});
|
|
@@ -2834,22 +2833,20 @@ var script$1 = {
|
|
|
2834
2833
|
}
|
|
2835
2834
|
};
|
|
2836
2835
|
|
|
2837
|
-
const _withScopeId = n => (vue.pushScopeId("data-v-a10546a2"),n=n(),vue.popScopeId(),n);
|
|
2838
2836
|
const _hoisted_1$1 = { class: "auto-table mt-2" };
|
|
2839
2837
|
const _hoisted_2$1 = {
|
|
2840
2838
|
key: 0,
|
|
2841
2839
|
class: "col-md-4 mb-2"
|
|
2842
2840
|
};
|
|
2843
2841
|
const _hoisted_3$1 = ["disabled"];
|
|
2844
|
-
const _hoisted_4 = /*#__PURE__*/
|
|
2842
|
+
const _hoisted_4 = /*#__PURE__*/vue.createElementVNode("i", { class: "bi-download" }, null, -1 /* HOISTED */);
|
|
2845
2843
|
const _hoisted_5 = /*#__PURE__*/vue.createTextVNode(" Export ");
|
|
2846
|
-
const _hoisted_6 = {
|
|
2847
|
-
|
|
2848
|
-
|
|
2849
|
-
|
|
2850
|
-
|
|
2851
|
-
};
|
|
2852
|
-
const _hoisted_7 = /*#__PURE__*/vue.createTextVNode(" Exporting ... ");
|
|
2844
|
+
const _hoisted_6 = /*#__PURE__*/vue.createElementVNode("span", {
|
|
2845
|
+
class: "spinner-border spinner-border-sm",
|
|
2846
|
+
role: "status",
|
|
2847
|
+
"aria-hidden": "true"
|
|
2848
|
+
}, null, -1 /* HOISTED */);
|
|
2849
|
+
const _hoisted_7 = /*#__PURE__*/vue.createElementVNode("span", { class: "visually-hidden" }, "Loading...", -1 /* HOISTED */);
|
|
2853
2850
|
const _hoisted_8 = {
|
|
2854
2851
|
key: 1,
|
|
2855
2852
|
class: "row"
|
|
@@ -2857,9 +2854,9 @@ const _hoisted_8 = {
|
|
|
2857
2854
|
const _hoisted_9 = { class: "col-12 mb-3" };
|
|
2858
2855
|
const _hoisted_10 = { class: "sh-search-bar" };
|
|
2859
2856
|
const _hoisted_11 = ["placeholder"];
|
|
2860
|
-
const _hoisted_12 = /*#__PURE__*/
|
|
2857
|
+
const _hoisted_12 = /*#__PURE__*/vue.createElementVNode("span", { class: "sh-search-icon" }, [
|
|
2861
2858
|
/*#__PURE__*/vue.createElementVNode("i", { class: "bi bi-search mb-0" })
|
|
2862
|
-
], -1 /* HOISTED */)
|
|
2859
|
+
], -1 /* HOISTED */);
|
|
2863
2860
|
const _hoisted_13 = {
|
|
2864
2861
|
key: 2,
|
|
2865
2862
|
class: "table"
|
|
@@ -2876,7 +2873,14 @@ const _hoisted_18 = {
|
|
|
2876
2873
|
class: "text-center"
|
|
2877
2874
|
};
|
|
2878
2875
|
const _hoisted_19 = ["colspan"];
|
|
2879
|
-
const _hoisted_20 = /*#__PURE__*/
|
|
2876
|
+
const _hoisted_20 = /*#__PURE__*/vue.createElementVNode("div", { class: "text-center" }, [
|
|
2877
|
+
/*#__PURE__*/vue.createElementVNode("div", {
|
|
2878
|
+
class: "spinner-border",
|
|
2879
|
+
role: "status"
|
|
2880
|
+
}, [
|
|
2881
|
+
/*#__PURE__*/vue.createElementVNode("span", { class: "visually-hidden" }, "Loading...")
|
|
2882
|
+
])
|
|
2883
|
+
], -1 /* HOISTED */);
|
|
2880
2884
|
const _hoisted_21 = [
|
|
2881
2885
|
_hoisted_20
|
|
2882
2886
|
];
|
|
@@ -2890,7 +2894,7 @@ const _hoisted_24 = {
|
|
|
2890
2894
|
class: "text-center alert alert-info no_records"
|
|
2891
2895
|
};
|
|
2892
2896
|
const _hoisted_25 = ["colspan"];
|
|
2893
|
-
const _hoisted_26 = /*#__PURE__*/
|
|
2897
|
+
const _hoisted_26 = /*#__PURE__*/vue.createElementVNode("i", { class: "bi-info-circle" }, null, -1 /* HOISTED */);
|
|
2894
2898
|
const _hoisted_27 = /*#__PURE__*/vue.createTextVNode(" No records found ");
|
|
2895
2899
|
const _hoisted_28 = [
|
|
2896
2900
|
_hoisted_26,
|
|
@@ -2916,42 +2920,46 @@ const _hoisted_39 = {
|
|
|
2916
2920
|
key: 0,
|
|
2917
2921
|
class: "text-center"
|
|
2918
2922
|
};
|
|
2919
|
-
const _hoisted_40 = /*#__PURE__*/
|
|
2920
|
-
/*#__PURE__*/vue.createElementVNode("
|
|
2921
|
-
|
|
2923
|
+
const _hoisted_40 = /*#__PURE__*/vue.createElementVNode("div", { class: "text-center" }, [
|
|
2924
|
+
/*#__PURE__*/vue.createElementVNode("div", {
|
|
2925
|
+
class: "spinner-border",
|
|
2926
|
+
role: "status"
|
|
2927
|
+
}, [
|
|
2928
|
+
/*#__PURE__*/vue.createElementVNode("span", { class: "visually-hidden" }, "Loading...")
|
|
2929
|
+
])
|
|
2930
|
+
], -1 /* HOISTED */);
|
|
2922
2931
|
const _hoisted_41 = [
|
|
2923
2932
|
_hoisted_40
|
|
2924
2933
|
];
|
|
2925
2934
|
const _hoisted_42 = { key: 1 };
|
|
2926
|
-
const _hoisted_43 = {
|
|
2927
|
-
const _hoisted_44 = {
|
|
2935
|
+
const _hoisted_43 = {
|
|
2928
2936
|
key: 2,
|
|
2929
2937
|
class: "mobile-list-items"
|
|
2930
2938
|
};
|
|
2931
|
-
const
|
|
2932
|
-
const
|
|
2939
|
+
const _hoisted_44 = ["onClick"];
|
|
2940
|
+
const _hoisted_45 = {
|
|
2933
2941
|
key: 0,
|
|
2934
2942
|
class: "mb-1 font-weight-bold text-capitalize profile-form-title"
|
|
2935
2943
|
};
|
|
2936
|
-
const
|
|
2944
|
+
const _hoisted_46 = {
|
|
2937
2945
|
key: 1,
|
|
2938
2946
|
class: "mb-1 font-weight-bold text-capitalize profile-form-title"
|
|
2939
2947
|
};
|
|
2940
|
-
const
|
|
2948
|
+
const _hoisted_47 = {
|
|
2941
2949
|
key: 2,
|
|
2942
2950
|
class: "mb-1 font-weight-bold text-capitalize profile-form-title"
|
|
2943
2951
|
};
|
|
2944
|
-
const
|
|
2945
|
-
const
|
|
2952
|
+
const _hoisted_48 = { key: 1 };
|
|
2953
|
+
const _hoisted_49 = {
|
|
2946
2954
|
key: 2,
|
|
2947
2955
|
class: "text-primary fw-bold"
|
|
2948
2956
|
};
|
|
2957
|
+
const _hoisted_50 = ["innerHTML"];
|
|
2949
2958
|
const _hoisted_51 = ["innerHTML"];
|
|
2950
2959
|
const _hoisted_52 = ["innerHTML"];
|
|
2951
|
-
const _hoisted_53 =
|
|
2952
|
-
const _hoisted_54 =
|
|
2953
|
-
const _hoisted_55 =
|
|
2954
|
-
const _hoisted_56 = ["title", "onClick"];
|
|
2960
|
+
const _hoisted_53 = /*#__PURE__*/vue.createElementVNode("hr", { class: "my-2" }, null, -1 /* HOISTED */);
|
|
2961
|
+
const _hoisted_54 = { key: 0 };
|
|
2962
|
+
const _hoisted_55 = ["title", "onClick"];
|
|
2955
2963
|
|
|
2956
2964
|
function render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
2957
2965
|
const _component_router_link = vue.resolveComponent("router-link");
|
|
@@ -2971,9 +2979,7 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2971
2979
|
_hoisted_5
|
|
2972
2980
|
], 64 /* STABLE_FRAGMENT */))
|
|
2973
2981
|
: (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
|
|
2974
|
-
|
|
2975
|
-
? (vue.openBlock(), vue.createElementBlock("img", _hoisted_6))
|
|
2976
|
-
: vue.createCommentVNode("v-if", true),
|
|
2982
|
+
_hoisted_6,
|
|
2977
2983
|
_hoisted_7
|
|
2978
2984
|
], 64 /* STABLE_FRAGMENT */))
|
|
2979
2985
|
], 8 /* PROPS */, _hoisted_3$1)
|
|
@@ -3137,15 +3143,15 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3137
3143
|
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_39, _hoisted_41))
|
|
3138
3144
|
: ($data.loading === 'error')
|
|
3139
3145
|
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_42, [
|
|
3140
|
-
vue.createElementVNode("span",
|
|
3146
|
+
vue.createElementVNode("span", null, vue.toDisplayString($data.loading_error), 1 /* TEXT */)
|
|
3141
3147
|
]))
|
|
3142
3148
|
: ($data.loading === 'done')
|
|
3143
|
-
? (vue.openBlock(), vue.createElementBlock("div",
|
|
3149
|
+
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_43, [
|
|
3144
3150
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList($data.records, (record, index) => {
|
|
3145
3151
|
return (vue.openBlock(), vue.createElementBlock(vue.Fragment, {
|
|
3146
3152
|
key: record.id
|
|
3147
3153
|
}, [
|
|
3148
|
-
vue.createElementVNode("h3", null, vue.toDisplayString(
|
|
3154
|
+
vue.createElementVNode("h3", null, vue.toDisplayString(_ctx.mobile_view), 1 /* TEXT */),
|
|
3149
3155
|
vue.createElementVNode("div", {
|
|
3150
3156
|
class: "single-mobile-req bg-light p-3",
|
|
3151
3157
|
onClick: $event => ($options.rowSelected(record))
|
|
@@ -3155,10 +3161,10 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3155
3161
|
key: key[0]
|
|
3156
3162
|
}, [
|
|
3157
3163
|
(typeof key === 'string' )
|
|
3158
|
-
? (vue.openBlock(), vue.createElementBlock("p",
|
|
3164
|
+
? (vue.openBlock(), vue.createElementBlock("p", _hoisted_45, vue.toDisplayString(key.replace(/_/g, ' ')), 1 /* TEXT */))
|
|
3159
3165
|
: (typeof key === 'function')
|
|
3160
|
-
? (vue.openBlock(), vue.createElementBlock("p",
|
|
3161
|
-
: (vue.openBlock(), vue.createElementBlock("p",
|
|
3166
|
+
? (vue.openBlock(), vue.createElementBlock("p", _hoisted_46, vue.toDisplayString(key(null).replace(/_/g, ' ')), 1 /* TEXT */))
|
|
3167
|
+
: (vue.openBlock(), vue.createElementBlock("p", _hoisted_47, vue.toDisplayString(key[1].replace(/_/g, ' ')), 1 /* TEXT */)),
|
|
3162
3168
|
vue.createElementVNode("span", null, [
|
|
3163
3169
|
(typeof key === 'string' && $props.links && $props.links[key])
|
|
3164
3170
|
? (vue.openBlock(), vue.createBlock(_component_router_link, {
|
|
@@ -3168,29 +3174,29 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3168
3174
|
innerHTML: record[key]
|
|
3169
3175
|
}, null, 8 /* PROPS */, ["to", "class", "innerHTML"]))
|
|
3170
3176
|
: ($options.getFieldType(key) === 'numeric')
|
|
3171
|
-
? (vue.openBlock(), vue.createElementBlock("span",
|
|
3177
|
+
? (vue.openBlock(), vue.createElementBlock("span", _hoisted_48, vue.toDisplayString(Intl.NumberFormat().format(record[key])), 1 /* TEXT */))
|
|
3172
3178
|
: ($options.getFieldType(key) === 'money')
|
|
3173
|
-
? (vue.openBlock(), vue.createElementBlock("span",
|
|
3179
|
+
? (vue.openBlock(), vue.createElementBlock("span", _hoisted_49, "KES " + vue.toDisplayString(Intl.NumberFormat().format(record[key])), 1 /* TEXT */))
|
|
3174
3180
|
: (typeof key === 'string')
|
|
3175
3181
|
? (vue.openBlock(), vue.createElementBlock("span", {
|
|
3176
3182
|
key: 3,
|
|
3177
3183
|
innerHTML: record[key]
|
|
3178
|
-
}, null, 8 /* PROPS */,
|
|
3184
|
+
}, null, 8 /* PROPS */, _hoisted_50))
|
|
3179
3185
|
: (typeof key === 'function')
|
|
3180
3186
|
? (vue.openBlock(), vue.createElementBlock("span", {
|
|
3181
3187
|
key: 4,
|
|
3182
3188
|
innerHTML: key(record, index )
|
|
3183
|
-
}, null, 8 /* PROPS */,
|
|
3189
|
+
}, null, 8 /* PROPS */, _hoisted_51))
|
|
3184
3190
|
: (vue.openBlock(), vue.createElementBlock("span", {
|
|
3185
3191
|
key: 5,
|
|
3186
3192
|
innerHTML: record[key[0]]
|
|
3187
|
-
}, null, 8 /* PROPS */,
|
|
3193
|
+
}, null, 8 /* PROPS */, _hoisted_52))
|
|
3188
3194
|
]),
|
|
3189
|
-
|
|
3195
|
+
_hoisted_53
|
|
3190
3196
|
], 64 /* STABLE_FRAGMENT */))
|
|
3191
3197
|
}), 128 /* KEYED_FRAGMENT */)),
|
|
3192
3198
|
($props.actions)
|
|
3193
|
-
? (vue.openBlock(), vue.createElementBlock("div",
|
|
3199
|
+
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_54, [
|
|
3194
3200
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList($props.actions.actions, (act) => {
|
|
3195
3201
|
return (vue.openBlock(), vue.createElementBlock(vue.Fragment, {
|
|
3196
3202
|
key: act.path
|
|
@@ -3205,7 +3211,7 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3205
3211
|
title: act.title,
|
|
3206
3212
|
class: vue.normalizeClass(act.class ? act.class:'btn btn-default'),
|
|
3207
3213
|
onClick: $event => ($options.doEmitAction(act.emits,record))
|
|
3208
|
-
}, vue.toDisplayString(act.label), 11 /* TEXT, CLASS, PROPS */,
|
|
3214
|
+
}, vue.toDisplayString(act.label), 11 /* TEXT, CLASS, PROPS */, _hoisted_55))
|
|
3209
3215
|
: vue.createCommentVNode("v-if", true),
|
|
3210
3216
|
(!act.emits)
|
|
3211
3217
|
? (vue.openBlock(), vue.createBlock(_component_router_link, {
|
|
@@ -3228,7 +3234,7 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3228
3234
|
}), 128 /* KEYED_FRAGMENT */))
|
|
3229
3235
|
]))
|
|
3230
3236
|
: vue.createCommentVNode("v-if", true)
|
|
3231
|
-
], 8 /* PROPS */,
|
|
3237
|
+
], 8 /* PROPS */, _hoisted_44)
|
|
3232
3238
|
], 64 /* STABLE_FRAGMENT */))
|
|
3233
3239
|
}), 128 /* KEYED_FRAGMENT */))
|
|
3234
3240
|
]))
|
|
@@ -3249,13 +3255,11 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3249
3255
|
}
|
|
3250
3256
|
|
|
3251
3257
|
script$1.render = render$1;
|
|
3252
|
-
script$1.__scopeId = "data-v-a10546a2";
|
|
3253
3258
|
script$1.__file = "src/views/ShTable.vue";
|
|
3254
3259
|
|
|
3255
3260
|
var script = {
|
|
3256
3261
|
name: 'ShTabs',
|
|
3257
|
-
props: ['tabs', '
|
|
3258
|
-
inject: ['global'],
|
|
3262
|
+
props: ['tabs', 'baseUrl', 'sharedData', 'tabCounts'],
|
|
3259
3263
|
data () {
|
|
3260
3264
|
return {
|
|
3261
3265
|
currentTab: ''
|
|
@@ -3264,18 +3268,17 @@ var script = {
|
|
|
3264
3268
|
watch: {
|
|
3265
3269
|
refreshStatus: function (state) {
|
|
3266
3270
|
if (state === 0) {
|
|
3267
|
-
if (this.
|
|
3268
|
-
this.setTabCounts(this.
|
|
3271
|
+
if (this.tabCounts) {
|
|
3272
|
+
this.setTabCounts(this.tabCounts);
|
|
3269
3273
|
}
|
|
3270
3274
|
}
|
|
3271
3275
|
},
|
|
3272
|
-
|
|
3276
|
+
tabCounts: function () {
|
|
3273
3277
|
this.resetTabCounts();
|
|
3274
3278
|
}
|
|
3275
3279
|
},
|
|
3276
3280
|
computed: {
|
|
3277
3281
|
refreshStatus () {
|
|
3278
|
-
return this.global.state.refetch
|
|
3279
3282
|
}
|
|
3280
3283
|
},
|
|
3281
3284
|
mounted () {
|
|
@@ -3298,8 +3301,8 @@ var script = {
|
|
|
3298
3301
|
} else {
|
|
3299
3302
|
this.currentTab = arr[arr.length - 1];
|
|
3300
3303
|
}
|
|
3301
|
-
if (this.
|
|
3302
|
-
this.setTabCounts(this.
|
|
3304
|
+
if (this.tabCounts) {
|
|
3305
|
+
this.setTabCounts(this.tabCounts);
|
|
3303
3306
|
}
|
|
3304
3307
|
},
|
|
3305
3308
|
tabExistsInUrl: function () {
|
|
@@ -3348,7 +3351,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3348
3351
|
vue.createVNode(_component_router_link, {
|
|
3349
3352
|
"active-class": 'active',
|
|
3350
3353
|
class: "nav-link text-capitalize",
|
|
3351
|
-
to: $props.
|
|
3354
|
+
to: $props.baseUrl+'/tab/'+tab,
|
|
3352
3355
|
role: "tab",
|
|
3353
3356
|
id: 'sh_tab_' + tab
|
|
3354
3357
|
}, {
|
|
@@ -3363,9 +3366,9 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3363
3366
|
vue.createElementVNode("div", _hoisted_3, [
|
|
3364
3367
|
vue.createVNode(_component_router_view, {
|
|
3365
3368
|
current_tab: $data.currentTab,
|
|
3366
|
-
|
|
3367
|
-
|
|
3368
|
-
}, null, 8 /* PROPS */, ["current_tab", "
|
|
3369
|
+
sharedData: $props.sharedData,
|
|
3370
|
+
tabCounts: $props.tabCounts
|
|
3371
|
+
}, null, 8 /* PROPS */, ["current_tab", "sharedData", "tabCounts"])
|
|
3369
3372
|
])
|
|
3370
3373
|
]))
|
|
3371
3374
|
}
|
|
@@ -3434,9 +3437,14 @@ const useUserStore = pinia.defineStore('user-store', {
|
|
|
3434
3437
|
this.user = null;
|
|
3435
3438
|
},
|
|
3436
3439
|
logOut () {
|
|
3437
|
-
|
|
3438
|
-
|
|
3439
|
-
|
|
3440
|
+
this.signOut();
|
|
3441
|
+
},
|
|
3442
|
+
getUser () {
|
|
3443
|
+
this.setUser();
|
|
3444
|
+
},
|
|
3445
|
+
setAccessToken (accessToken) {
|
|
3446
|
+
shstorage.setItem('access_token', accessToken);
|
|
3447
|
+
this.setUser();
|
|
3440
3448
|
}
|
|
3441
3449
|
},
|
|
3442
3450
|
getters: {
|
package/dist/library.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import Axios from 'axios';
|
|
2
2
|
import NProgress from 'nprogress';
|
|
3
|
-
import { openBlock, createElementBlock, createElementVNode, createTextVNode, toDisplayString, createCommentVNode, withDirectives, Fragment, renderList, vModelSelect, vModelText, resolveComponent, normalizeClass, createBlock, renderSlot, createStaticVNode, withCtx,
|
|
3
|
+
import { openBlock, createElementBlock, createElementVNode, createTextVNode, toDisplayString, createCommentVNode, withDirectives, Fragment, renderList, vModelSelect, vModelText, resolveComponent, normalizeClass, createBlock, renderSlot, createStaticVNode, withCtx, createVNode } from 'vue';
|
|
4
4
|
import moment from 'moment';
|
|
5
5
|
import Swal from 'sweetalert2';
|
|
6
6
|
import { defineStore } from 'pinia';
|
|
@@ -2144,7 +2144,7 @@ script$5.__file = "src/views/ShForm.vue";
|
|
|
2144
2144
|
|
|
2145
2145
|
var script$4 = {
|
|
2146
2146
|
name: 'ShCanvas',
|
|
2147
|
-
props: ['
|
|
2147
|
+
props: ['canvasTitle', 'canvasId', 'position'],
|
|
2148
2148
|
components: {
|
|
2149
2149
|
},
|
|
2150
2150
|
data () {
|
|
@@ -2172,11 +2172,11 @@ function render$4(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2172
2172
|
class: normalizeClass(["offcanvas", $data.side]),
|
|
2173
2173
|
"data-bs-scroll": "true",
|
|
2174
2174
|
tabindex: "-1",
|
|
2175
|
-
id: $props.
|
|
2175
|
+
id: $props.canvasId,
|
|
2176
2176
|
"aria-labelledby": "offcanvasScrollingLabel"
|
|
2177
2177
|
}, [
|
|
2178
2178
|
createElementVNode("div", _hoisted_2$4, [
|
|
2179
|
-
createElementVNode("h5", _hoisted_3$4, toDisplayString($props.
|
|
2179
|
+
createElementVNode("h5", _hoisted_3$4, toDisplayString($props.canvasTitle), 1 /* TEXT */),
|
|
2180
2180
|
createElementVNode("button", {
|
|
2181
2181
|
type: "button",
|
|
2182
2182
|
ref: "closecanvas",
|
|
@@ -2197,9 +2197,8 @@ script$4.__file = "src/views/ShCanvas.vue";
|
|
|
2197
2197
|
|
|
2198
2198
|
var script$3 = {
|
|
2199
2199
|
name: 'ShModal',
|
|
2200
|
-
props: ['
|
|
2200
|
+
props: ['modalTitle', 'modalId', 'modalSize'],
|
|
2201
2201
|
components: {
|
|
2202
|
-
|
|
2203
2202
|
}
|
|
2204
2203
|
};
|
|
2205
2204
|
|
|
@@ -2219,16 +2218,16 @@ function render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2219
2218
|
return (openBlock(), createElementBlock("div", {
|
|
2220
2219
|
class: "modal fade",
|
|
2221
2220
|
tabindex: "-1",
|
|
2222
|
-
id: $props.
|
|
2221
|
+
id: $props.modalId,
|
|
2223
2222
|
"data-focus": "false",
|
|
2224
2223
|
"aria-hidden": "true"
|
|
2225
2224
|
}, [
|
|
2226
2225
|
createElementVNode("div", {
|
|
2227
|
-
class: normalizeClass(["modal-dialog", `modal-${$props.
|
|
2226
|
+
class: normalizeClass(["modal-dialog", `modal-${$props.modalSize}`])
|
|
2228
2227
|
}, [
|
|
2229
2228
|
createElementVNode("div", _hoisted_2$3, [
|
|
2230
2229
|
createElementVNode("div", _hoisted_3$3, [
|
|
2231
|
-
createElementVNode("h3", _hoisted_4$2, toDisplayString($props.
|
|
2230
|
+
createElementVNode("h3", _hoisted_4$2, toDisplayString($props.modalTitle), 1 /* TEXT */),
|
|
2232
2231
|
_hoisted_5$2
|
|
2233
2232
|
]),
|
|
2234
2233
|
createElementVNode("div", _hoisted_6$1, [
|
|
@@ -2611,7 +2610,7 @@ var helpers = {
|
|
|
2611
2610
|
|
|
2612
2611
|
var script$1 = {
|
|
2613
2612
|
name: 'sh-table',
|
|
2614
|
-
props: ['
|
|
2613
|
+
props: ['endPoint', 'headers', 'pageCount', 'actions', 'hideCount', 'hideLoadMore', 'links', 'reload', 'hideSearch', 'sharedData', 'searchPlaceholder', 'event', 'displayMore', 'displayMoreBtnClass', 'moreDetailsColumns', 'moreDetailsFields', 'hasDownload', 'downloadFields'],
|
|
2615
2614
|
inject: ['channel', 'global'],
|
|
2616
2615
|
data () {
|
|
2617
2616
|
return {
|
|
@@ -2735,7 +2734,7 @@ var script$1 = {
|
|
|
2735
2734
|
titles: headers,
|
|
2736
2735
|
export: 1
|
|
2737
2736
|
};
|
|
2738
|
-
apis.doPost(this.
|
|
2737
|
+
apis.doPost(this.endPoint, data).then(res => {
|
|
2739
2738
|
this.downloading = false;
|
|
2740
2739
|
if (res.data.file) {
|
|
2741
2740
|
const url = this.appUrl + 'external-download?file=' + res.data.file + '&name=' + res.data.name;
|
|
@@ -2765,7 +2764,7 @@ var script$1 = {
|
|
|
2765
2764
|
if (this.pagination_data) {
|
|
2766
2765
|
this.pagination_data.loading = 1;
|
|
2767
2766
|
}
|
|
2768
|
-
apis.doGet(this.
|
|
2767
|
+
apis.doGet(this.endPoint, data).then(req => {
|
|
2769
2768
|
this.loading = 'done';
|
|
2770
2769
|
const response = req.data.data;
|
|
2771
2770
|
this.pagination_data = {
|
|
@@ -2793,7 +2792,7 @@ var script$1 = {
|
|
|
2793
2792
|
this.records = response.data;
|
|
2794
2793
|
}
|
|
2795
2794
|
}).catch(reason => {
|
|
2796
|
-
const error = (typeof reason.response === 'undefined') ? 'Error getting data from backend' : `${reason.response.status}:${reason.response.statusText} (${this.
|
|
2795
|
+
const error = (typeof reason.response === 'undefined') ? 'Error getting data from backend' : `${reason.response.status}:${reason.response.statusText} (${this.endPoint})`;
|
|
2797
2796
|
this.loading_error = error;
|
|
2798
2797
|
this.loading = 'error';
|
|
2799
2798
|
});
|
|
@@ -2823,22 +2822,20 @@ var script$1 = {
|
|
|
2823
2822
|
}
|
|
2824
2823
|
};
|
|
2825
2824
|
|
|
2826
|
-
const _withScopeId = n => (pushScopeId("data-v-a10546a2"),n=n(),popScopeId(),n);
|
|
2827
2825
|
const _hoisted_1$1 = { class: "auto-table mt-2" };
|
|
2828
2826
|
const _hoisted_2$1 = {
|
|
2829
2827
|
key: 0,
|
|
2830
2828
|
class: "col-md-4 mb-2"
|
|
2831
2829
|
};
|
|
2832
2830
|
const _hoisted_3$1 = ["disabled"];
|
|
2833
|
-
const _hoisted_4 = /*#__PURE__*/
|
|
2831
|
+
const _hoisted_4 = /*#__PURE__*/createElementVNode("i", { class: "bi-download" }, null, -1 /* HOISTED */);
|
|
2834
2832
|
const _hoisted_5 = /*#__PURE__*/createTextVNode(" Export ");
|
|
2835
|
-
const _hoisted_6 = {
|
|
2836
|
-
|
|
2837
|
-
|
|
2838
|
-
|
|
2839
|
-
|
|
2840
|
-
};
|
|
2841
|
-
const _hoisted_7 = /*#__PURE__*/createTextVNode(" Exporting ... ");
|
|
2833
|
+
const _hoisted_6 = /*#__PURE__*/createElementVNode("span", {
|
|
2834
|
+
class: "spinner-border spinner-border-sm",
|
|
2835
|
+
role: "status",
|
|
2836
|
+
"aria-hidden": "true"
|
|
2837
|
+
}, null, -1 /* HOISTED */);
|
|
2838
|
+
const _hoisted_7 = /*#__PURE__*/createElementVNode("span", { class: "visually-hidden" }, "Loading...", -1 /* HOISTED */);
|
|
2842
2839
|
const _hoisted_8 = {
|
|
2843
2840
|
key: 1,
|
|
2844
2841
|
class: "row"
|
|
@@ -2846,9 +2843,9 @@ const _hoisted_8 = {
|
|
|
2846
2843
|
const _hoisted_9 = { class: "col-12 mb-3" };
|
|
2847
2844
|
const _hoisted_10 = { class: "sh-search-bar" };
|
|
2848
2845
|
const _hoisted_11 = ["placeholder"];
|
|
2849
|
-
const _hoisted_12 = /*#__PURE__*/
|
|
2846
|
+
const _hoisted_12 = /*#__PURE__*/createElementVNode("span", { class: "sh-search-icon" }, [
|
|
2850
2847
|
/*#__PURE__*/createElementVNode("i", { class: "bi bi-search mb-0" })
|
|
2851
|
-
], -1 /* HOISTED */)
|
|
2848
|
+
], -1 /* HOISTED */);
|
|
2852
2849
|
const _hoisted_13 = {
|
|
2853
2850
|
key: 2,
|
|
2854
2851
|
class: "table"
|
|
@@ -2865,7 +2862,14 @@ const _hoisted_18 = {
|
|
|
2865
2862
|
class: "text-center"
|
|
2866
2863
|
};
|
|
2867
2864
|
const _hoisted_19 = ["colspan"];
|
|
2868
|
-
const _hoisted_20 = /*#__PURE__*/
|
|
2865
|
+
const _hoisted_20 = /*#__PURE__*/createElementVNode("div", { class: "text-center" }, [
|
|
2866
|
+
/*#__PURE__*/createElementVNode("div", {
|
|
2867
|
+
class: "spinner-border",
|
|
2868
|
+
role: "status"
|
|
2869
|
+
}, [
|
|
2870
|
+
/*#__PURE__*/createElementVNode("span", { class: "visually-hidden" }, "Loading...")
|
|
2871
|
+
])
|
|
2872
|
+
], -1 /* HOISTED */);
|
|
2869
2873
|
const _hoisted_21 = [
|
|
2870
2874
|
_hoisted_20
|
|
2871
2875
|
];
|
|
@@ -2879,7 +2883,7 @@ const _hoisted_24 = {
|
|
|
2879
2883
|
class: "text-center alert alert-info no_records"
|
|
2880
2884
|
};
|
|
2881
2885
|
const _hoisted_25 = ["colspan"];
|
|
2882
|
-
const _hoisted_26 = /*#__PURE__*/
|
|
2886
|
+
const _hoisted_26 = /*#__PURE__*/createElementVNode("i", { class: "bi-info-circle" }, null, -1 /* HOISTED */);
|
|
2883
2887
|
const _hoisted_27 = /*#__PURE__*/createTextVNode(" No records found ");
|
|
2884
2888
|
const _hoisted_28 = [
|
|
2885
2889
|
_hoisted_26,
|
|
@@ -2905,42 +2909,46 @@ const _hoisted_39 = {
|
|
|
2905
2909
|
key: 0,
|
|
2906
2910
|
class: "text-center"
|
|
2907
2911
|
};
|
|
2908
|
-
const _hoisted_40 = /*#__PURE__*/
|
|
2909
|
-
/*#__PURE__*/createElementVNode("
|
|
2910
|
-
|
|
2912
|
+
const _hoisted_40 = /*#__PURE__*/createElementVNode("div", { class: "text-center" }, [
|
|
2913
|
+
/*#__PURE__*/createElementVNode("div", {
|
|
2914
|
+
class: "spinner-border",
|
|
2915
|
+
role: "status"
|
|
2916
|
+
}, [
|
|
2917
|
+
/*#__PURE__*/createElementVNode("span", { class: "visually-hidden" }, "Loading...")
|
|
2918
|
+
])
|
|
2919
|
+
], -1 /* HOISTED */);
|
|
2911
2920
|
const _hoisted_41 = [
|
|
2912
2921
|
_hoisted_40
|
|
2913
2922
|
];
|
|
2914
2923
|
const _hoisted_42 = { key: 1 };
|
|
2915
|
-
const _hoisted_43 = {
|
|
2916
|
-
const _hoisted_44 = {
|
|
2924
|
+
const _hoisted_43 = {
|
|
2917
2925
|
key: 2,
|
|
2918
2926
|
class: "mobile-list-items"
|
|
2919
2927
|
};
|
|
2920
|
-
const
|
|
2921
|
-
const
|
|
2928
|
+
const _hoisted_44 = ["onClick"];
|
|
2929
|
+
const _hoisted_45 = {
|
|
2922
2930
|
key: 0,
|
|
2923
2931
|
class: "mb-1 font-weight-bold text-capitalize profile-form-title"
|
|
2924
2932
|
};
|
|
2925
|
-
const
|
|
2933
|
+
const _hoisted_46 = {
|
|
2926
2934
|
key: 1,
|
|
2927
2935
|
class: "mb-1 font-weight-bold text-capitalize profile-form-title"
|
|
2928
2936
|
};
|
|
2929
|
-
const
|
|
2937
|
+
const _hoisted_47 = {
|
|
2930
2938
|
key: 2,
|
|
2931
2939
|
class: "mb-1 font-weight-bold text-capitalize profile-form-title"
|
|
2932
2940
|
};
|
|
2933
|
-
const
|
|
2934
|
-
const
|
|
2941
|
+
const _hoisted_48 = { key: 1 };
|
|
2942
|
+
const _hoisted_49 = {
|
|
2935
2943
|
key: 2,
|
|
2936
2944
|
class: "text-primary fw-bold"
|
|
2937
2945
|
};
|
|
2946
|
+
const _hoisted_50 = ["innerHTML"];
|
|
2938
2947
|
const _hoisted_51 = ["innerHTML"];
|
|
2939
2948
|
const _hoisted_52 = ["innerHTML"];
|
|
2940
|
-
const _hoisted_53 =
|
|
2941
|
-
const _hoisted_54 =
|
|
2942
|
-
const _hoisted_55 =
|
|
2943
|
-
const _hoisted_56 = ["title", "onClick"];
|
|
2949
|
+
const _hoisted_53 = /*#__PURE__*/createElementVNode("hr", { class: "my-2" }, null, -1 /* HOISTED */);
|
|
2950
|
+
const _hoisted_54 = { key: 0 };
|
|
2951
|
+
const _hoisted_55 = ["title", "onClick"];
|
|
2944
2952
|
|
|
2945
2953
|
function render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
2946
2954
|
const _component_router_link = resolveComponent("router-link");
|
|
@@ -2960,9 +2968,7 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2960
2968
|
_hoisted_5
|
|
2961
2969
|
], 64 /* STABLE_FRAGMENT */))
|
|
2962
2970
|
: (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
2963
|
-
|
|
2964
|
-
? (openBlock(), createElementBlock("img", _hoisted_6))
|
|
2965
|
-
: createCommentVNode("v-if", true),
|
|
2971
|
+
_hoisted_6,
|
|
2966
2972
|
_hoisted_7
|
|
2967
2973
|
], 64 /* STABLE_FRAGMENT */))
|
|
2968
2974
|
], 8 /* PROPS */, _hoisted_3$1)
|
|
@@ -3126,15 +3132,15 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3126
3132
|
? (openBlock(), createElementBlock("div", _hoisted_39, _hoisted_41))
|
|
3127
3133
|
: ($data.loading === 'error')
|
|
3128
3134
|
? (openBlock(), createElementBlock("div", _hoisted_42, [
|
|
3129
|
-
createElementVNode("span",
|
|
3135
|
+
createElementVNode("span", null, toDisplayString($data.loading_error), 1 /* TEXT */)
|
|
3130
3136
|
]))
|
|
3131
3137
|
: ($data.loading === 'done')
|
|
3132
|
-
? (openBlock(), createElementBlock("div",
|
|
3138
|
+
? (openBlock(), createElementBlock("div", _hoisted_43, [
|
|
3133
3139
|
(openBlock(true), createElementBlock(Fragment, null, renderList($data.records, (record, index) => {
|
|
3134
3140
|
return (openBlock(), createElementBlock(Fragment, {
|
|
3135
3141
|
key: record.id
|
|
3136
3142
|
}, [
|
|
3137
|
-
createElementVNode("h3", null, toDisplayString(
|
|
3143
|
+
createElementVNode("h3", null, toDisplayString(_ctx.mobile_view), 1 /* TEXT */),
|
|
3138
3144
|
createElementVNode("div", {
|
|
3139
3145
|
class: "single-mobile-req bg-light p-3",
|
|
3140
3146
|
onClick: $event => ($options.rowSelected(record))
|
|
@@ -3144,10 +3150,10 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3144
3150
|
key: key[0]
|
|
3145
3151
|
}, [
|
|
3146
3152
|
(typeof key === 'string' )
|
|
3147
|
-
? (openBlock(), createElementBlock("p",
|
|
3153
|
+
? (openBlock(), createElementBlock("p", _hoisted_45, toDisplayString(key.replace(/_/g, ' ')), 1 /* TEXT */))
|
|
3148
3154
|
: (typeof key === 'function')
|
|
3149
|
-
? (openBlock(), createElementBlock("p",
|
|
3150
|
-
: (openBlock(), createElementBlock("p",
|
|
3155
|
+
? (openBlock(), createElementBlock("p", _hoisted_46, toDisplayString(key(null).replace(/_/g, ' ')), 1 /* TEXT */))
|
|
3156
|
+
: (openBlock(), createElementBlock("p", _hoisted_47, toDisplayString(key[1].replace(/_/g, ' ')), 1 /* TEXT */)),
|
|
3151
3157
|
createElementVNode("span", null, [
|
|
3152
3158
|
(typeof key === 'string' && $props.links && $props.links[key])
|
|
3153
3159
|
? (openBlock(), createBlock(_component_router_link, {
|
|
@@ -3157,29 +3163,29 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3157
3163
|
innerHTML: record[key]
|
|
3158
3164
|
}, null, 8 /* PROPS */, ["to", "class", "innerHTML"]))
|
|
3159
3165
|
: ($options.getFieldType(key) === 'numeric')
|
|
3160
|
-
? (openBlock(), createElementBlock("span",
|
|
3166
|
+
? (openBlock(), createElementBlock("span", _hoisted_48, toDisplayString(Intl.NumberFormat().format(record[key])), 1 /* TEXT */))
|
|
3161
3167
|
: ($options.getFieldType(key) === 'money')
|
|
3162
|
-
? (openBlock(), createElementBlock("span",
|
|
3168
|
+
? (openBlock(), createElementBlock("span", _hoisted_49, "KES " + toDisplayString(Intl.NumberFormat().format(record[key])), 1 /* TEXT */))
|
|
3163
3169
|
: (typeof key === 'string')
|
|
3164
3170
|
? (openBlock(), createElementBlock("span", {
|
|
3165
3171
|
key: 3,
|
|
3166
3172
|
innerHTML: record[key]
|
|
3167
|
-
}, null, 8 /* PROPS */,
|
|
3173
|
+
}, null, 8 /* PROPS */, _hoisted_50))
|
|
3168
3174
|
: (typeof key === 'function')
|
|
3169
3175
|
? (openBlock(), createElementBlock("span", {
|
|
3170
3176
|
key: 4,
|
|
3171
3177
|
innerHTML: key(record, index )
|
|
3172
|
-
}, null, 8 /* PROPS */,
|
|
3178
|
+
}, null, 8 /* PROPS */, _hoisted_51))
|
|
3173
3179
|
: (openBlock(), createElementBlock("span", {
|
|
3174
3180
|
key: 5,
|
|
3175
3181
|
innerHTML: record[key[0]]
|
|
3176
|
-
}, null, 8 /* PROPS */,
|
|
3182
|
+
}, null, 8 /* PROPS */, _hoisted_52))
|
|
3177
3183
|
]),
|
|
3178
|
-
|
|
3184
|
+
_hoisted_53
|
|
3179
3185
|
], 64 /* STABLE_FRAGMENT */))
|
|
3180
3186
|
}), 128 /* KEYED_FRAGMENT */)),
|
|
3181
3187
|
($props.actions)
|
|
3182
|
-
? (openBlock(), createElementBlock("div",
|
|
3188
|
+
? (openBlock(), createElementBlock("div", _hoisted_54, [
|
|
3183
3189
|
(openBlock(true), createElementBlock(Fragment, null, renderList($props.actions.actions, (act) => {
|
|
3184
3190
|
return (openBlock(), createElementBlock(Fragment, {
|
|
3185
3191
|
key: act.path
|
|
@@ -3194,7 +3200,7 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3194
3200
|
title: act.title,
|
|
3195
3201
|
class: normalizeClass(act.class ? act.class:'btn btn-default'),
|
|
3196
3202
|
onClick: $event => ($options.doEmitAction(act.emits,record))
|
|
3197
|
-
}, toDisplayString(act.label), 11 /* TEXT, CLASS, PROPS */,
|
|
3203
|
+
}, toDisplayString(act.label), 11 /* TEXT, CLASS, PROPS */, _hoisted_55))
|
|
3198
3204
|
: createCommentVNode("v-if", true),
|
|
3199
3205
|
(!act.emits)
|
|
3200
3206
|
? (openBlock(), createBlock(_component_router_link, {
|
|
@@ -3217,7 +3223,7 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3217
3223
|
}), 128 /* KEYED_FRAGMENT */))
|
|
3218
3224
|
]))
|
|
3219
3225
|
: createCommentVNode("v-if", true)
|
|
3220
|
-
], 8 /* PROPS */,
|
|
3226
|
+
], 8 /* PROPS */, _hoisted_44)
|
|
3221
3227
|
], 64 /* STABLE_FRAGMENT */))
|
|
3222
3228
|
}), 128 /* KEYED_FRAGMENT */))
|
|
3223
3229
|
]))
|
|
@@ -3238,13 +3244,11 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3238
3244
|
}
|
|
3239
3245
|
|
|
3240
3246
|
script$1.render = render$1;
|
|
3241
|
-
script$1.__scopeId = "data-v-a10546a2";
|
|
3242
3247
|
script$1.__file = "src/views/ShTable.vue";
|
|
3243
3248
|
|
|
3244
3249
|
var script = {
|
|
3245
3250
|
name: 'ShTabs',
|
|
3246
|
-
props: ['tabs', '
|
|
3247
|
-
inject: ['global'],
|
|
3251
|
+
props: ['tabs', 'baseUrl', 'sharedData', 'tabCounts'],
|
|
3248
3252
|
data () {
|
|
3249
3253
|
return {
|
|
3250
3254
|
currentTab: ''
|
|
@@ -3253,18 +3257,17 @@ var script = {
|
|
|
3253
3257
|
watch: {
|
|
3254
3258
|
refreshStatus: function (state) {
|
|
3255
3259
|
if (state === 0) {
|
|
3256
|
-
if (this.
|
|
3257
|
-
this.setTabCounts(this.
|
|
3260
|
+
if (this.tabCounts) {
|
|
3261
|
+
this.setTabCounts(this.tabCounts);
|
|
3258
3262
|
}
|
|
3259
3263
|
}
|
|
3260
3264
|
},
|
|
3261
|
-
|
|
3265
|
+
tabCounts: function () {
|
|
3262
3266
|
this.resetTabCounts();
|
|
3263
3267
|
}
|
|
3264
3268
|
},
|
|
3265
3269
|
computed: {
|
|
3266
3270
|
refreshStatus () {
|
|
3267
|
-
return this.global.state.refetch
|
|
3268
3271
|
}
|
|
3269
3272
|
},
|
|
3270
3273
|
mounted () {
|
|
@@ -3287,8 +3290,8 @@ var script = {
|
|
|
3287
3290
|
} else {
|
|
3288
3291
|
this.currentTab = arr[arr.length - 1];
|
|
3289
3292
|
}
|
|
3290
|
-
if (this.
|
|
3291
|
-
this.setTabCounts(this.
|
|
3293
|
+
if (this.tabCounts) {
|
|
3294
|
+
this.setTabCounts(this.tabCounts);
|
|
3292
3295
|
}
|
|
3293
3296
|
},
|
|
3294
3297
|
tabExistsInUrl: function () {
|
|
@@ -3337,7 +3340,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3337
3340
|
createVNode(_component_router_link, {
|
|
3338
3341
|
"active-class": 'active',
|
|
3339
3342
|
class: "nav-link text-capitalize",
|
|
3340
|
-
to: $props.
|
|
3343
|
+
to: $props.baseUrl+'/tab/'+tab,
|
|
3341
3344
|
role: "tab",
|
|
3342
3345
|
id: 'sh_tab_' + tab
|
|
3343
3346
|
}, {
|
|
@@ -3352,9 +3355,9 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3352
3355
|
createElementVNode("div", _hoisted_3, [
|
|
3353
3356
|
createVNode(_component_router_view, {
|
|
3354
3357
|
current_tab: $data.currentTab,
|
|
3355
|
-
|
|
3356
|
-
|
|
3357
|
-
}, null, 8 /* PROPS */, ["current_tab", "
|
|
3358
|
+
sharedData: $props.sharedData,
|
|
3359
|
+
tabCounts: $props.tabCounts
|
|
3360
|
+
}, null, 8 /* PROPS */, ["current_tab", "sharedData", "tabCounts"])
|
|
3358
3361
|
])
|
|
3359
3362
|
]))
|
|
3360
3363
|
}
|
|
@@ -3423,9 +3426,14 @@ const useUserStore = defineStore('user-store', {
|
|
|
3423
3426
|
this.user = null;
|
|
3424
3427
|
},
|
|
3425
3428
|
logOut () {
|
|
3426
|
-
|
|
3427
|
-
|
|
3428
|
-
|
|
3429
|
+
this.signOut();
|
|
3430
|
+
},
|
|
3431
|
+
getUser () {
|
|
3432
|
+
this.setUser();
|
|
3433
|
+
},
|
|
3434
|
+
setAccessToken (accessToken) {
|
|
3435
|
+
shstorage.setItem('access_token', accessToken);
|
|
3436
|
+
this.setUser();
|
|
3429
3437
|
}
|
|
3430
3438
|
},
|
|
3431
3439
|
getters: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@iankibetsh/shframework",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.9",
|
|
4
4
|
"description": "Vue library for handling laravel backend",
|
|
5
5
|
"main": "dist/library.js",
|
|
6
6
|
"module": "dist/library.mjs",
|
|
@@ -21,7 +21,8 @@
|
|
|
21
21
|
"moment": "^2.29.3",
|
|
22
22
|
"nprogress": "^0.2.0",
|
|
23
23
|
"pinia": "^2.0.13",
|
|
24
|
-
"sweetalert2": "^11.4.14"
|
|
24
|
+
"sweetalert2": "^11.4.14",
|
|
25
|
+
"vue": "^3.2.37"
|
|
25
26
|
},
|
|
26
27
|
"devDependencies": {
|
|
27
28
|
"rollup": "^2.75.7",
|