@iankibetsh/shframework 4.7.5 → 4.7.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/dist/library.js +131 -98
- package/dist/library.mjs +132 -99
- package/package.json +1 -1
package/dist/library.js
CHANGED
|
@@ -239,7 +239,7 @@ async function runPlainRequest(url, message, title, data){
|
|
|
239
239
|
allowOutsideClick: () => !Swal__default["default"].isLoading()
|
|
240
240
|
})
|
|
241
241
|
}
|
|
242
|
-
async function confirmAction(
|
|
242
|
+
async function confirmAction(title,message){
|
|
243
243
|
if (typeof title === 'undefined') {
|
|
244
244
|
title = null;
|
|
245
245
|
}
|
|
@@ -252,9 +252,6 @@ async function confirmAction(callback,title,message){
|
|
|
252
252
|
confirmButtonText: 'Yes, Proceed!',
|
|
253
253
|
reverseButtons: true,
|
|
254
254
|
showLoaderOnConfirm: true,
|
|
255
|
-
preConfirm: () => {
|
|
256
|
-
return callback()
|
|
257
|
-
},
|
|
258
255
|
allowOutsideClick: () => !Swal__default["default"].isLoading()
|
|
259
256
|
})
|
|
260
257
|
}
|
|
@@ -3666,6 +3663,7 @@ return (_ctx, _cache) => {
|
|
|
3666
3663
|
], 64 /* STABLE_FRAGMENT */))
|
|
3667
3664
|
], 2 /* CLASS */))
|
|
3668
3665
|
}), 128 /* KEYED_FRAGMENT */)),
|
|
3666
|
+
vue.renderSlot(_ctx.$slots, "default"),
|
|
3669
3667
|
vue.createElementVNode("div", {
|
|
3670
3668
|
class: vue.normalizeClass(getElementClass('formGroup'))
|
|
3671
3669
|
}, [
|
|
@@ -3683,8 +3681,7 @@ return (_ctx, _cache) => {
|
|
|
3683
3681
|
? (vue.openBlock(), vue.createElementBlock("span", _hoisted_14$3, "Submit"))
|
|
3684
3682
|
: vue.createCommentVNode("v-if", true)
|
|
3685
3683
|
], 14 /* CLASS, STYLE, PROPS */, _hoisted_12$5)
|
|
3686
|
-
], 2 /* CLASS */)
|
|
3687
|
-
vue.renderSlot(_ctx.$slots, "default")
|
|
3684
|
+
], 2 /* CLASS */)
|
|
3688
3685
|
], 34 /* CLASS, NEED_HYDRATION */)
|
|
3689
3686
|
], 64 /* STABLE_FRAGMENT */))
|
|
3690
3687
|
}
|
|
@@ -4869,17 +4866,18 @@ const _hoisted_22 = { class: "sh-thead" };
|
|
|
4869
4866
|
const _hoisted_23 = ["onClick"];
|
|
4870
4867
|
const _hoisted_24 = ["onClick"];
|
|
4871
4868
|
const _hoisted_25 = ["onClick"];
|
|
4872
|
-
const _hoisted_26 =
|
|
4869
|
+
const _hoisted_26 = ["onClick"];
|
|
4870
|
+
const _hoisted_27 = {
|
|
4873
4871
|
key: 0,
|
|
4874
4872
|
class: "text-capitalize"
|
|
4875
4873
|
};
|
|
4876
|
-
const
|
|
4877
|
-
const
|
|
4874
|
+
const _hoisted_28 = { class: "sh-tbody" };
|
|
4875
|
+
const _hoisted_29 = {
|
|
4878
4876
|
key: 0,
|
|
4879
4877
|
class: "text-center"
|
|
4880
4878
|
};
|
|
4881
|
-
const
|
|
4882
|
-
const
|
|
4879
|
+
const _hoisted_30 = ["colspan"];
|
|
4880
|
+
const _hoisted_31 = /*#__PURE__*/vue.createElementVNode("div", { class: "text-center" }, [
|
|
4883
4881
|
/*#__PURE__*/vue.createElementVNode("div", {
|
|
4884
4882
|
class: "spinner-border",
|
|
4885
4883
|
role: "status"
|
|
@@ -4887,42 +4885,43 @@ const _hoisted_30 = /*#__PURE__*/vue.createElementVNode("div", { class: "text-ce
|
|
|
4887
4885
|
/*#__PURE__*/vue.createElementVNode("span", { class: "visually-hidden" }, "Loading...")
|
|
4888
4886
|
])
|
|
4889
4887
|
], -1 /* HOISTED */);
|
|
4890
|
-
const
|
|
4891
|
-
|
|
4888
|
+
const _hoisted_32 = [
|
|
4889
|
+
_hoisted_31
|
|
4892
4890
|
];
|
|
4893
|
-
const
|
|
4891
|
+
const _hoisted_33 = {
|
|
4894
4892
|
key: 1,
|
|
4895
4893
|
class: "text-center alert alert-danger"
|
|
4896
4894
|
};
|
|
4897
|
-
const
|
|
4898
|
-
const
|
|
4895
|
+
const _hoisted_34 = ["colspan"];
|
|
4896
|
+
const _hoisted_35 = {
|
|
4899
4897
|
key: 2,
|
|
4900
4898
|
class: "text-center alert alert-info no_records"
|
|
4901
4899
|
};
|
|
4902
|
-
const
|
|
4903
|
-
const
|
|
4904
|
-
const
|
|
4905
|
-
const
|
|
4906
|
-
const
|
|
4900
|
+
const _hoisted_36 = ["colspan"];
|
|
4901
|
+
const _hoisted_37 = /*#__PURE__*/vue.createElementVNode("i", { class: "bi-info-circle" }, null, -1 /* HOISTED */);
|
|
4902
|
+
const _hoisted_38 = ["onClick"];
|
|
4903
|
+
const _hoisted_39 = { key: 1 };
|
|
4904
|
+
const _hoisted_40 = {
|
|
4907
4905
|
key: 2,
|
|
4908
4906
|
class: "text-success fw-bold"
|
|
4909
4907
|
};
|
|
4910
|
-
const
|
|
4911
|
-
const _hoisted_41 = ["innerHTML"];
|
|
4908
|
+
const _hoisted_41 = { key: 3 };
|
|
4912
4909
|
const _hoisted_42 = ["innerHTML"];
|
|
4913
4910
|
const _hoisted_43 = ["innerHTML"];
|
|
4914
|
-
const _hoisted_44 =
|
|
4911
|
+
const _hoisted_44 = ["innerHTML"];
|
|
4912
|
+
const _hoisted_45 = ["innerHTML"];
|
|
4913
|
+
const _hoisted_46 = {
|
|
4915
4914
|
key: 0,
|
|
4916
4915
|
style: {"white-space":"nowrap"}
|
|
4917
4916
|
};
|
|
4918
|
-
const
|
|
4919
|
-
const
|
|
4920
|
-
const
|
|
4921
|
-
const
|
|
4917
|
+
const _hoisted_47 = ["href"];
|
|
4918
|
+
const _hoisted_48 = ["title", "onClick"];
|
|
4919
|
+
const _hoisted_49 = { key: 5 };
|
|
4920
|
+
const _hoisted_50 = {
|
|
4922
4921
|
key: 0,
|
|
4923
4922
|
class: "text-center"
|
|
4924
4923
|
};
|
|
4925
|
-
const
|
|
4924
|
+
const _hoisted_51 = /*#__PURE__*/vue.createElementVNode("div", { class: "text-center" }, [
|
|
4926
4925
|
/*#__PURE__*/vue.createElementVNode("div", {
|
|
4927
4926
|
class: "spinner-border",
|
|
4928
4927
|
role: "status"
|
|
@@ -4930,44 +4929,49 @@ const _hoisted_49 = /*#__PURE__*/vue.createElementVNode("div", { class: "text-ce
|
|
|
4930
4929
|
/*#__PURE__*/vue.createElementVNode("span", { class: "visually-hidden" }, "Loading...")
|
|
4931
4930
|
])
|
|
4932
4931
|
], -1 /* HOISTED */);
|
|
4933
|
-
const
|
|
4934
|
-
|
|
4932
|
+
const _hoisted_52 = [
|
|
4933
|
+
_hoisted_51
|
|
4935
4934
|
];
|
|
4936
|
-
const
|
|
4937
|
-
const
|
|
4935
|
+
const _hoisted_53 = { key: 1 };
|
|
4936
|
+
const _hoisted_54 = {
|
|
4938
4937
|
key: 2,
|
|
4939
4938
|
class: "mobile-list-items"
|
|
4940
4939
|
};
|
|
4941
|
-
const
|
|
4942
|
-
const
|
|
4940
|
+
const _hoisted_55 = ["onClick"];
|
|
4941
|
+
const _hoisted_56 = {
|
|
4943
4942
|
key: 0,
|
|
4944
4943
|
class: "mb-1 font-weight-bold text-capitalize profile-form-title"
|
|
4945
4944
|
};
|
|
4946
|
-
const
|
|
4945
|
+
const _hoisted_57 = {
|
|
4947
4946
|
key: 1,
|
|
4948
4947
|
class: "mb-1 font-weight-bold text-capitalize profile-form-title"
|
|
4949
4948
|
};
|
|
4950
|
-
const
|
|
4949
|
+
const _hoisted_58 = {
|
|
4951
4950
|
key: 2,
|
|
4952
4951
|
class: "mb-1 font-weight-bold text-capitalize profile-form-title"
|
|
4953
4952
|
};
|
|
4954
|
-
const
|
|
4955
|
-
|
|
4953
|
+
const _hoisted_59 = {
|
|
4954
|
+
key: 3,
|
|
4955
|
+
class: "mb-1 font-weight-bold text-capitalize profile-form-title"
|
|
4956
|
+
};
|
|
4957
|
+
const _hoisted_60 = { key: 1 };
|
|
4958
|
+
const _hoisted_61 = {
|
|
4956
4959
|
key: 2,
|
|
4957
4960
|
class: "text-primary fw-bold"
|
|
4958
4961
|
};
|
|
4959
|
-
const
|
|
4960
|
-
const
|
|
4961
|
-
const
|
|
4962
|
-
const
|
|
4963
|
-
const
|
|
4964
|
-
const
|
|
4965
|
-
const
|
|
4966
|
-
const
|
|
4962
|
+
const _hoisted_62 = { key: 3 };
|
|
4963
|
+
const _hoisted_63 = ["innerHTML"];
|
|
4964
|
+
const _hoisted_64 = ["innerHTML"];
|
|
4965
|
+
const _hoisted_65 = ["innerHTML"];
|
|
4966
|
+
const _hoisted_66 = ["innerHTML"];
|
|
4967
|
+
const _hoisted_67 = /*#__PURE__*/vue.createElementVNode("hr", { class: "my-2" }, null, -1 /* HOISTED */);
|
|
4968
|
+
const _hoisted_68 = { key: 0 };
|
|
4969
|
+
const _hoisted_69 = ["href"];
|
|
4970
|
+
const _hoisted_70 = ["title", "onClick"];
|
|
4967
4971
|
|
|
4968
4972
|
const __default__ = {
|
|
4969
4973
|
name: 'sh-table',
|
|
4970
|
-
props: ['endPoint', 'headers', 'cacheKey', 'query', 'pageCount', 'actions', 'hideCount', 'hideLoadMore', 'links', 'reload', 'hideSearch', 'sharedData', 'searchPlaceholder', 'event', 'displayMore', 'displayMoreBtnClass', 'moreDetailsColumns', 'moreDetailsFields', 'hasDownload', 'downloadFields', 'tableHover', 'hideIds', 'paginationStyle', 'hasRange','selectedRange','noRecordsMessage'],
|
|
4974
|
+
props: ['endPoint', 'headers','disableMobileResponsive', 'cacheKey', 'query', 'pageCount', 'actions', 'hideCount', 'hideLoadMore', 'links', 'reload', 'hideSearch', 'sharedData', 'searchPlaceholder', 'event', 'displayMore', 'displayMoreBtnClass', 'moreDetailsColumns', 'moreDetailsFields', 'hasDownload', 'downloadFields', 'tableHover', 'hideIds', 'paginationStyle', 'hasRange','selectedRange','noRecordsMessage'],
|
|
4971
4975
|
data(){
|
|
4972
4976
|
return {
|
|
4973
4977
|
order_by: '',
|
|
@@ -5394,7 +5398,7 @@ return (_ctx, _cache) => {
|
|
|
5394
5398
|
], 64 /* STABLE_FRAGMENT */))
|
|
5395
5399
|
: vue.createCommentVNode("v-if", true)
|
|
5396
5400
|
], 64 /* STABLE_FRAGMENT */))
|
|
5397
|
-
: (_ctx.windowWidth > 700)
|
|
5401
|
+
: (_ctx.windowWidth > 700 || __props.disableMobileResponsive)
|
|
5398
5402
|
? (vue.openBlock(), vue.createElementBlock("table", {
|
|
5399
5403
|
key: 4,
|
|
5400
5404
|
class: vue.normalizeClass(["table sh-table", __props.tableHover ? 'table-hover':''])
|
|
@@ -5409,47 +5413,54 @@ return (_ctx, _cache) => {
|
|
|
5409
5413
|
class: "text-capitalize",
|
|
5410
5414
|
onClick: $event => (_ctx.changeKey('order_by',title))
|
|
5411
5415
|
}, vue.toDisplayString(title.replace(/_/g, ' ')), 9 /* TEXT, PROPS */, _hoisted_23))
|
|
5416
|
+
: vue.createCommentVNode("v-if", true),
|
|
5417
|
+
(typeof title === 'object')
|
|
5418
|
+
? (vue.openBlock(), vue.createElementBlock("a", {
|
|
5419
|
+
key: 1,
|
|
5420
|
+
class: "text-capitalize",
|
|
5421
|
+
onClick: $event => (_ctx.changeKey('order_by',title.key))
|
|
5422
|
+
}, vue.toDisplayString(title.label ?? title.key.replace(/_/g, ' ')), 9 /* TEXT, PROPS */, _hoisted_24))
|
|
5412
5423
|
: (typeof title === 'function')
|
|
5413
5424
|
? (vue.openBlock(), vue.createElementBlock("a", {
|
|
5414
|
-
key:
|
|
5425
|
+
key: 2,
|
|
5415
5426
|
class: "text-capitalize",
|
|
5416
5427
|
onClick: $event => (_ctx.changeKey('order_by',title(null)))
|
|
5417
|
-
}, vue.toDisplayString(title(null).replace(/_/g, ' ')), 9 /* TEXT, PROPS */,
|
|
5428
|
+
}, vue.toDisplayString(title(null).replace(/_/g, ' ')), 9 /* TEXT, PROPS */, _hoisted_25))
|
|
5418
5429
|
: (typeof title !== 'undefined')
|
|
5419
5430
|
? (vue.openBlock(), vue.createElementBlock("a", {
|
|
5420
|
-
key:
|
|
5431
|
+
key: 3,
|
|
5421
5432
|
class: "text-capitalize",
|
|
5422
5433
|
onClick: $event => (_ctx.changeKey('order_by',title))
|
|
5423
|
-
}, vue.toDisplayString(title.replace(/_/g, ' ')), 9 /* TEXT, PROPS */,
|
|
5434
|
+
}, vue.toDisplayString(title.replace(/_/g, ' ')), 9 /* TEXT, PROPS */, _hoisted_26))
|
|
5424
5435
|
: vue.createCommentVNode("v-if", true)
|
|
5425
5436
|
]))
|
|
5426
5437
|
}), 128 /* KEYED_FRAGMENT */)),
|
|
5427
5438
|
(__props.actions)
|
|
5428
|
-
? (vue.openBlock(), vue.createElementBlock("th",
|
|
5439
|
+
? (vue.openBlock(), vue.createElementBlock("th", _hoisted_27, vue.toDisplayString(__props.actions.label), 1 /* TEXT */))
|
|
5429
5440
|
: vue.createCommentVNode("v-if", true)
|
|
5430
5441
|
])
|
|
5431
5442
|
]),
|
|
5432
|
-
vue.createElementVNode("tbody",
|
|
5443
|
+
vue.createElementVNode("tbody", _hoisted_28, [
|
|
5433
5444
|
(_ctx.loading === 'loading')
|
|
5434
|
-
? (vue.openBlock(), vue.createElementBlock("tr",
|
|
5445
|
+
? (vue.openBlock(), vue.createElementBlock("tr", _hoisted_29, [
|
|
5435
5446
|
vue.createElementVNode("td", {
|
|
5436
5447
|
colspan: _ctx.tableHeaders.length
|
|
5437
|
-
}, [...
|
|
5448
|
+
}, [..._hoisted_32], 8 /* PROPS */, _hoisted_30)
|
|
5438
5449
|
]))
|
|
5439
5450
|
: (_ctx.loading === 'error')
|
|
5440
|
-
? (vue.openBlock(), vue.createElementBlock("tr",
|
|
5451
|
+
? (vue.openBlock(), vue.createElementBlock("tr", _hoisted_33, [
|
|
5441
5452
|
vue.createElementVNode("td", {
|
|
5442
5453
|
colspan: _ctx.tableHeaders.length
|
|
5443
|
-
}, vue.toDisplayString(_ctx.loading_error), 9 /* TEXT, PROPS */,
|
|
5454
|
+
}, vue.toDisplayString(_ctx.loading_error), 9 /* TEXT, PROPS */, _hoisted_34)
|
|
5444
5455
|
]))
|
|
5445
5456
|
: (_ctx.records.length === 0)
|
|
5446
|
-
? (vue.openBlock(), vue.createElementBlock("tr",
|
|
5457
|
+
? (vue.openBlock(), vue.createElementBlock("tr", _hoisted_35, [
|
|
5447
5458
|
vue.createElementVNode("td", {
|
|
5448
5459
|
colspan: __props.actions ? _ctx.tableHeaders.length + 1 : _ctx.tableHeaders.length
|
|
5449
5460
|
}, [
|
|
5450
|
-
|
|
5461
|
+
_hoisted_37,
|
|
5451
5462
|
vue.createTextVNode(" No records found ")
|
|
5452
|
-
], 8 /* PROPS */,
|
|
5463
|
+
], 8 /* PROPS */, _hoisted_36)
|
|
5453
5464
|
]))
|
|
5454
5465
|
: (_ctx.loading === 'done')
|
|
5455
5466
|
? (vue.openBlock(true), vue.createElementBlock(vue.Fragment, { key: 3 }, vue.renderList(_ctx.records, (record, index) => {
|
|
@@ -5469,29 +5480,39 @@ return (_ctx, _cache) => {
|
|
|
5469
5480
|
innerHTML: record[key]
|
|
5470
5481
|
}, null, 8 /* PROPS */, ["target", "to", "class", "innerHTML"]))
|
|
5471
5482
|
: (_ctx.getFieldType(key) === 'numeric')
|
|
5472
|
-
? (vue.openBlock(), vue.createElementBlock("span",
|
|
5483
|
+
? (vue.openBlock(), vue.createElementBlock("span", _hoisted_39, vue.toDisplayString(Intl.NumberFormat().format(record[key])), 1 /* TEXT */))
|
|
5473
5484
|
: (_ctx.getFieldType(key) === 'money')
|
|
5474
|
-
? (vue.openBlock(), vue.createElementBlock("span",
|
|
5485
|
+
? (vue.openBlock(), vue.createElementBlock("span", _hoisted_40, vue.toDisplayString(Intl.NumberFormat().format(record[key])), 1 /* TEXT */))
|
|
5475
5486
|
: (_ctx.getFieldType(key) === 'date')
|
|
5476
|
-
? (vue.openBlock(), vue.createElementBlock("span",
|
|
5487
|
+
? (vue.openBlock(), vue.createElementBlock("span", _hoisted_41, vue.toDisplayString(_ctx.formatDate(record[key])), 1 /* TEXT */))
|
|
5477
5488
|
: (typeof key === 'string')
|
|
5478
5489
|
? (vue.openBlock(), vue.createElementBlock("span", {
|
|
5479
5490
|
key: 4,
|
|
5480
5491
|
innerHTML: record[key]
|
|
5481
|
-
}, null, 8 /* PROPS */,
|
|
5492
|
+
}, null, 8 /* PROPS */, _hoisted_42))
|
|
5482
5493
|
: (typeof key === 'function')
|
|
5483
5494
|
? (vue.openBlock(), vue.createElementBlock("span", {
|
|
5484
5495
|
key: 5,
|
|
5485
5496
|
innerHTML: key(record, index)
|
|
5486
|
-
}, null, 8 /* PROPS */, _hoisted_42))
|
|
5487
|
-
: (vue.openBlock(), vue.createElementBlock("span", {
|
|
5488
|
-
key: 6,
|
|
5489
|
-
innerHTML: record[key[0]]
|
|
5490
5497
|
}, null, 8 /* PROPS */, _hoisted_43))
|
|
5498
|
+
: (typeof key === 'object' && key.component)
|
|
5499
|
+
? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(key.component), {
|
|
5500
|
+
key: 6,
|
|
5501
|
+
item: record
|
|
5502
|
+
}, null, 8 /* PROPS */, ["item"]))
|
|
5503
|
+
: (typeof key === 'object')
|
|
5504
|
+
? (vue.openBlock(), vue.createElementBlock("span", {
|
|
5505
|
+
key: 7,
|
|
5506
|
+
innerHTML: record[key.key ?? key.field]
|
|
5507
|
+
}, null, 8 /* PROPS */, _hoisted_44))
|
|
5508
|
+
: (vue.openBlock(), vue.createElementBlock("span", {
|
|
5509
|
+
key: 8,
|
|
5510
|
+
innerHTML: record[key[0]]
|
|
5511
|
+
}, null, 8 /* PROPS */, _hoisted_45))
|
|
5491
5512
|
]))
|
|
5492
5513
|
}), 128 /* KEYED_FRAGMENT */)),
|
|
5493
5514
|
(__props.actions)
|
|
5494
|
-
? (vue.openBlock(), vue.createElementBlock("td",
|
|
5515
|
+
? (vue.openBlock(), vue.createElementBlock("td", _hoisted_46, [
|
|
5495
5516
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(__props.actions.actions, (act) => {
|
|
5496
5517
|
return (vue.openBlock(), vue.createElementBlock(vue.Fragment, {
|
|
5497
5518
|
key: act.path
|
|
@@ -5556,7 +5577,7 @@ return (_ctx, _cache) => {
|
|
|
5556
5577
|
}, null, 2 /* CLASS */))
|
|
5557
5578
|
: vue.createCommentVNode("v-if", true),
|
|
5558
5579
|
vue.createTextVNode(" " + vue.toDisplayString(act.label), 1 /* TEXT */)
|
|
5559
|
-
], 10 /* CLASS, PROPS */,
|
|
5580
|
+
], 10 /* CLASS, PROPS */, _hoisted_47))
|
|
5560
5581
|
: (act.emits)
|
|
5561
5582
|
? (vue.openBlock(), vue.createElementBlock("button", {
|
|
5562
5583
|
key: 3,
|
|
@@ -5571,7 +5592,7 @@ return (_ctx, _cache) => {
|
|
|
5571
5592
|
}, null, 2 /* CLASS */))
|
|
5572
5593
|
: vue.createCommentVNode("v-if", true),
|
|
5573
5594
|
vue.createTextVNode(" " + vue.toDisplayString(act.label), 1 /* TEXT */)
|
|
5574
|
-
], 10 /* CLASS, PROPS */,
|
|
5595
|
+
], 10 /* CLASS, PROPS */, _hoisted_48))
|
|
5575
5596
|
: (!act.emits)
|
|
5576
5597
|
? (vue.openBlock(), vue.createBlock(_component_router_link, {
|
|
5577
5598
|
key: 4,
|
|
@@ -5599,20 +5620,20 @@ return (_ctx, _cache) => {
|
|
|
5599
5620
|
}), 128 /* KEYED_FRAGMENT */))
|
|
5600
5621
|
]))
|
|
5601
5622
|
: vue.createCommentVNode("v-if", true)
|
|
5602
|
-
], 10 /* CLASS, PROPS */,
|
|
5623
|
+
], 10 /* CLASS, PROPS */, _hoisted_38))
|
|
5603
5624
|
}), 128 /* KEYED_FRAGMENT */))
|
|
5604
5625
|
: vue.createCommentVNode("v-if", true)
|
|
5605
5626
|
])
|
|
5606
5627
|
], 2 /* CLASS */))
|
|
5607
|
-
: (vue.openBlock(), vue.createElementBlock("div",
|
|
5628
|
+
: (vue.openBlock(), vue.createElementBlock("div", _hoisted_49, [
|
|
5608
5629
|
(_ctx.loading === 'loading')
|
|
5609
|
-
? (vue.openBlock(), vue.createElementBlock("div",
|
|
5630
|
+
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_50, [..._hoisted_52]))
|
|
5610
5631
|
: (_ctx.loading === 'error')
|
|
5611
|
-
? (vue.openBlock(), vue.createElementBlock("div",
|
|
5632
|
+
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_53, [
|
|
5612
5633
|
vue.createElementVNode("span", null, vue.toDisplayString(_ctx.loading_error), 1 /* TEXT */)
|
|
5613
5634
|
]))
|
|
5614
5635
|
: (_ctx.loading === 'done')
|
|
5615
|
-
? (vue.openBlock(), vue.createElementBlock("div",
|
|
5636
|
+
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_54, [
|
|
5616
5637
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.records, (record, index) => {
|
|
5617
5638
|
return (vue.openBlock(), vue.createElementBlock("div", {
|
|
5618
5639
|
key: record.id,
|
|
@@ -5624,10 +5645,12 @@ return (_ctx, _cache) => {
|
|
|
5624
5645
|
key: key[0]
|
|
5625
5646
|
}, [
|
|
5626
5647
|
(typeof key === 'string' )
|
|
5627
|
-
? (vue.openBlock(), vue.createElementBlock("p",
|
|
5648
|
+
? (vue.openBlock(), vue.createElementBlock("p", _hoisted_56, vue.toDisplayString(key.replace(/_/g, ' ')), 1 /* TEXT */))
|
|
5628
5649
|
: (typeof key === 'function')
|
|
5629
|
-
? (vue.openBlock(), vue.createElementBlock("p",
|
|
5630
|
-
: (
|
|
5650
|
+
? (vue.openBlock(), vue.createElementBlock("p", _hoisted_57, vue.toDisplayString(key(null).replace(/_/g, ' ')), 1 /* TEXT */))
|
|
5651
|
+
: (typeof key === 'object')
|
|
5652
|
+
? (vue.openBlock(), vue.createElementBlock("p", _hoisted_58, vue.toDisplayString(key.label ?? key.key.replace(/_/g, ' ')), 1 /* TEXT */))
|
|
5653
|
+
: (vue.openBlock(), vue.createElementBlock("p", _hoisted_59, vue.toDisplayString(key[1].replace(/_/g, ' ')), 1 /* TEXT */)),
|
|
5631
5654
|
vue.createElementVNode("span", null, [
|
|
5632
5655
|
(typeof key === 'string' && __props.links && __props.links[key])
|
|
5633
5656
|
? (vue.openBlock(), vue.createBlock(_component_router_link, {
|
|
@@ -5637,31 +5660,41 @@ return (_ctx, _cache) => {
|
|
|
5637
5660
|
innerHTML: record[key]
|
|
5638
5661
|
}, null, 8 /* PROPS */, ["to", "class", "innerHTML"]))
|
|
5639
5662
|
: (_ctx.getFieldType(key) === 'numeric')
|
|
5640
|
-
? (vue.openBlock(), vue.createElementBlock("span",
|
|
5663
|
+
? (vue.openBlock(), vue.createElementBlock("span", _hoisted_60, vue.toDisplayString(Intl.NumberFormat().format(record[key])), 1 /* TEXT */))
|
|
5641
5664
|
: (_ctx.getFieldType(key) === 'money')
|
|
5642
|
-
? (vue.openBlock(), vue.createElementBlock("span",
|
|
5665
|
+
? (vue.openBlock(), vue.createElementBlock("span", _hoisted_61, "KES " + vue.toDisplayString(Intl.NumberFormat().format(record[key])), 1 /* TEXT */))
|
|
5643
5666
|
: (_ctx.getFieldType(key) === 'date')
|
|
5644
|
-
? (vue.openBlock(), vue.createElementBlock("span",
|
|
5667
|
+
? (vue.openBlock(), vue.createElementBlock("span", _hoisted_62, vue.toDisplayString(_ctx.formatDate(record[key])), 1 /* TEXT */))
|
|
5645
5668
|
: (typeof key === 'string')
|
|
5646
5669
|
? (vue.openBlock(), vue.createElementBlock("span", {
|
|
5647
5670
|
key: 4,
|
|
5648
5671
|
innerHTML: record[key]
|
|
5649
|
-
}, null, 8 /* PROPS */,
|
|
5650
|
-
: (typeof key === '
|
|
5651
|
-
? (vue.openBlock(), vue.
|
|
5672
|
+
}, null, 8 /* PROPS */, _hoisted_63))
|
|
5673
|
+
: (typeof key === 'object' && key.component)
|
|
5674
|
+
? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(key.component), {
|
|
5652
5675
|
key: 5,
|
|
5653
|
-
|
|
5654
|
-
}, null, 8 /* PROPS */,
|
|
5655
|
-
: (
|
|
5656
|
-
|
|
5657
|
-
|
|
5658
|
-
|
|
5676
|
+
item: record
|
|
5677
|
+
}, null, 8 /* PROPS */, ["item"]))
|
|
5678
|
+
: (typeof key === 'object')
|
|
5679
|
+
? (vue.openBlock(), vue.createElementBlock("span", {
|
|
5680
|
+
key: 6,
|
|
5681
|
+
innerHTML: record[key.key ?? key.field]
|
|
5682
|
+
}, null, 8 /* PROPS */, _hoisted_64))
|
|
5683
|
+
: (typeof key === 'function')
|
|
5684
|
+
? (vue.openBlock(), vue.createElementBlock("span", {
|
|
5685
|
+
key: 7,
|
|
5686
|
+
innerHTML: key(record, index )
|
|
5687
|
+
}, null, 8 /* PROPS */, _hoisted_65))
|
|
5688
|
+
: (vue.openBlock(), vue.createElementBlock("span", {
|
|
5689
|
+
key: 8,
|
|
5690
|
+
innerHTML: record[key[0]]
|
|
5691
|
+
}, null, 8 /* PROPS */, _hoisted_66))
|
|
5659
5692
|
]),
|
|
5660
|
-
|
|
5693
|
+
_hoisted_67
|
|
5661
5694
|
], 64 /* STABLE_FRAGMENT */))
|
|
5662
5695
|
}), 128 /* KEYED_FRAGMENT */)),
|
|
5663
5696
|
(__props.actions)
|
|
5664
|
-
? (vue.openBlock(), vue.createElementBlock("div",
|
|
5697
|
+
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_68, [
|
|
5665
5698
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(__props.actions.actions, (act) => {
|
|
5666
5699
|
return (vue.openBlock(), vue.createElementBlock(vue.Fragment, {
|
|
5667
5700
|
key: act.path
|
|
@@ -5684,7 +5717,7 @@ return (_ctx, _cache) => {
|
|
|
5684
5717
|
}, null, 2 /* CLASS */))
|
|
5685
5718
|
: vue.createCommentVNode("v-if", true),
|
|
5686
5719
|
vue.createTextVNode(" " + vue.toDisplayString(act.label), 1 /* TEXT */)
|
|
5687
|
-
], 10 /* CLASS, PROPS */,
|
|
5720
|
+
], 10 /* CLASS, PROPS */, _hoisted_69))
|
|
5688
5721
|
: (act.emits)
|
|
5689
5722
|
? (vue.openBlock(), vue.createElementBlock("button", {
|
|
5690
5723
|
key: 1,
|
|
@@ -5699,7 +5732,7 @@ return (_ctx, _cache) => {
|
|
|
5699
5732
|
}, null, 2 /* CLASS */))
|
|
5700
5733
|
: vue.createCommentVNode("v-if", true),
|
|
5701
5734
|
vue.createTextVNode(" " + vue.toDisplayString(act.label), 1 /* TEXT */)
|
|
5702
|
-
], 10 /* CLASS, PROPS */,
|
|
5735
|
+
], 10 /* CLASS, PROPS */, _hoisted_70))
|
|
5703
5736
|
: (!act.emits)
|
|
5704
5737
|
? (vue.openBlock(), vue.createBlock(_component_router_link, {
|
|
5705
5738
|
key: 2,
|
|
@@ -5727,7 +5760,7 @@ return (_ctx, _cache) => {
|
|
|
5727
5760
|
}), 128 /* KEYED_FRAGMENT */))
|
|
5728
5761
|
]))
|
|
5729
5762
|
: vue.createCommentVNode("v-if", true)
|
|
5730
|
-
], 8 /* PROPS */,
|
|
5763
|
+
], 8 /* PROPS */, _hoisted_55))
|
|
5731
5764
|
}), 128 /* KEYED_FRAGMENT */))
|
|
5732
5765
|
]))
|
|
5733
5766
|
: vue.createCommentVNode("v-if", true)
|
package/dist/library.mjs
CHANGED
|
@@ -3,7 +3,7 @@ import moment from 'moment';
|
|
|
3
3
|
import Swal from 'sweetalert2';
|
|
4
4
|
import { Modal, Offcanvas } from 'bootstrap';
|
|
5
5
|
import NProgress from 'nprogress';
|
|
6
|
-
import { openBlock, createElementBlock, createElementVNode, createTextVNode, toDisplayString, createCommentVNode, withDirectives, Fragment, renderList, vModelSelect, vModelText, ref, onMounted, watch, unref, createBlock, resolveDynamicComponent, normalizeClass, resolveComponent, inject, mergeProps,
|
|
6
|
+
import { openBlock, createElementBlock, createElementVNode, createTextVNode, toDisplayString, createCommentVNode, withDirectives, Fragment, renderList, vModelSelect, vModelText, ref, onMounted, watch, unref, createBlock, resolveDynamicComponent, normalizeClass, resolveComponent, inject, mergeProps, renderSlot, normalizeStyle, computed, createVNode, withCtx, vModelCheckbox, shallowRef, normalizeProps, pushScopeId, popScopeId, markRaw, isRef } from 'vue';
|
|
7
7
|
import _ from 'lodash';
|
|
8
8
|
import { defineStore, storeToRefs } from 'pinia';
|
|
9
9
|
import { useRoute, useRouter } from 'vue-router';
|
|
@@ -227,7 +227,7 @@ async function runPlainRequest(url, message, title, data){
|
|
|
227
227
|
allowOutsideClick: () => !Swal.isLoading()
|
|
228
228
|
})
|
|
229
229
|
}
|
|
230
|
-
async function confirmAction(
|
|
230
|
+
async function confirmAction(title,message){
|
|
231
231
|
if (typeof title === 'undefined') {
|
|
232
232
|
title = null;
|
|
233
233
|
}
|
|
@@ -240,9 +240,6 @@ async function confirmAction(callback,title,message){
|
|
|
240
240
|
confirmButtonText: 'Yes, Proceed!',
|
|
241
241
|
reverseButtons: true,
|
|
242
242
|
showLoaderOnConfirm: true,
|
|
243
|
-
preConfirm: () => {
|
|
244
|
-
return callback()
|
|
245
|
-
},
|
|
246
243
|
allowOutsideClick: () => !Swal.isLoading()
|
|
247
244
|
})
|
|
248
245
|
}
|
|
@@ -3654,6 +3651,7 @@ return (_ctx, _cache) => {
|
|
|
3654
3651
|
], 64 /* STABLE_FRAGMENT */))
|
|
3655
3652
|
], 2 /* CLASS */))
|
|
3656
3653
|
}), 128 /* KEYED_FRAGMENT */)),
|
|
3654
|
+
renderSlot(_ctx.$slots, "default"),
|
|
3657
3655
|
createElementVNode("div", {
|
|
3658
3656
|
class: normalizeClass(getElementClass('formGroup'))
|
|
3659
3657
|
}, [
|
|
@@ -3671,8 +3669,7 @@ return (_ctx, _cache) => {
|
|
|
3671
3669
|
? (openBlock(), createElementBlock("span", _hoisted_14$3, "Submit"))
|
|
3672
3670
|
: createCommentVNode("v-if", true)
|
|
3673
3671
|
], 14 /* CLASS, STYLE, PROPS */, _hoisted_12$5)
|
|
3674
|
-
], 2 /* CLASS */)
|
|
3675
|
-
renderSlot(_ctx.$slots, "default")
|
|
3672
|
+
], 2 /* CLASS */)
|
|
3676
3673
|
], 34 /* CLASS, NEED_HYDRATION */)
|
|
3677
3674
|
], 64 /* STABLE_FRAGMENT */))
|
|
3678
3675
|
}
|
|
@@ -4857,17 +4854,18 @@ const _hoisted_22 = { class: "sh-thead" };
|
|
|
4857
4854
|
const _hoisted_23 = ["onClick"];
|
|
4858
4855
|
const _hoisted_24 = ["onClick"];
|
|
4859
4856
|
const _hoisted_25 = ["onClick"];
|
|
4860
|
-
const _hoisted_26 =
|
|
4857
|
+
const _hoisted_26 = ["onClick"];
|
|
4858
|
+
const _hoisted_27 = {
|
|
4861
4859
|
key: 0,
|
|
4862
4860
|
class: "text-capitalize"
|
|
4863
4861
|
};
|
|
4864
|
-
const
|
|
4865
|
-
const
|
|
4862
|
+
const _hoisted_28 = { class: "sh-tbody" };
|
|
4863
|
+
const _hoisted_29 = {
|
|
4866
4864
|
key: 0,
|
|
4867
4865
|
class: "text-center"
|
|
4868
4866
|
};
|
|
4869
|
-
const
|
|
4870
|
-
const
|
|
4867
|
+
const _hoisted_30 = ["colspan"];
|
|
4868
|
+
const _hoisted_31 = /*#__PURE__*/createElementVNode("div", { class: "text-center" }, [
|
|
4871
4869
|
/*#__PURE__*/createElementVNode("div", {
|
|
4872
4870
|
class: "spinner-border",
|
|
4873
4871
|
role: "status"
|
|
@@ -4875,42 +4873,43 @@ const _hoisted_30 = /*#__PURE__*/createElementVNode("div", { class: "text-center
|
|
|
4875
4873
|
/*#__PURE__*/createElementVNode("span", { class: "visually-hidden" }, "Loading...")
|
|
4876
4874
|
])
|
|
4877
4875
|
], -1 /* HOISTED */);
|
|
4878
|
-
const
|
|
4879
|
-
|
|
4876
|
+
const _hoisted_32 = [
|
|
4877
|
+
_hoisted_31
|
|
4880
4878
|
];
|
|
4881
|
-
const
|
|
4879
|
+
const _hoisted_33 = {
|
|
4882
4880
|
key: 1,
|
|
4883
4881
|
class: "text-center alert alert-danger"
|
|
4884
4882
|
};
|
|
4885
|
-
const
|
|
4886
|
-
const
|
|
4883
|
+
const _hoisted_34 = ["colspan"];
|
|
4884
|
+
const _hoisted_35 = {
|
|
4887
4885
|
key: 2,
|
|
4888
4886
|
class: "text-center alert alert-info no_records"
|
|
4889
4887
|
};
|
|
4890
|
-
const
|
|
4891
|
-
const
|
|
4892
|
-
const
|
|
4893
|
-
const
|
|
4894
|
-
const
|
|
4888
|
+
const _hoisted_36 = ["colspan"];
|
|
4889
|
+
const _hoisted_37 = /*#__PURE__*/createElementVNode("i", { class: "bi-info-circle" }, null, -1 /* HOISTED */);
|
|
4890
|
+
const _hoisted_38 = ["onClick"];
|
|
4891
|
+
const _hoisted_39 = { key: 1 };
|
|
4892
|
+
const _hoisted_40 = {
|
|
4895
4893
|
key: 2,
|
|
4896
4894
|
class: "text-success fw-bold"
|
|
4897
4895
|
};
|
|
4898
|
-
const
|
|
4899
|
-
const _hoisted_41 = ["innerHTML"];
|
|
4896
|
+
const _hoisted_41 = { key: 3 };
|
|
4900
4897
|
const _hoisted_42 = ["innerHTML"];
|
|
4901
4898
|
const _hoisted_43 = ["innerHTML"];
|
|
4902
|
-
const _hoisted_44 =
|
|
4899
|
+
const _hoisted_44 = ["innerHTML"];
|
|
4900
|
+
const _hoisted_45 = ["innerHTML"];
|
|
4901
|
+
const _hoisted_46 = {
|
|
4903
4902
|
key: 0,
|
|
4904
4903
|
style: {"white-space":"nowrap"}
|
|
4905
4904
|
};
|
|
4906
|
-
const
|
|
4907
|
-
const
|
|
4908
|
-
const
|
|
4909
|
-
const
|
|
4905
|
+
const _hoisted_47 = ["href"];
|
|
4906
|
+
const _hoisted_48 = ["title", "onClick"];
|
|
4907
|
+
const _hoisted_49 = { key: 5 };
|
|
4908
|
+
const _hoisted_50 = {
|
|
4910
4909
|
key: 0,
|
|
4911
4910
|
class: "text-center"
|
|
4912
4911
|
};
|
|
4913
|
-
const
|
|
4912
|
+
const _hoisted_51 = /*#__PURE__*/createElementVNode("div", { class: "text-center" }, [
|
|
4914
4913
|
/*#__PURE__*/createElementVNode("div", {
|
|
4915
4914
|
class: "spinner-border",
|
|
4916
4915
|
role: "status"
|
|
@@ -4918,44 +4917,49 @@ const _hoisted_49 = /*#__PURE__*/createElementVNode("div", { class: "text-center
|
|
|
4918
4917
|
/*#__PURE__*/createElementVNode("span", { class: "visually-hidden" }, "Loading...")
|
|
4919
4918
|
])
|
|
4920
4919
|
], -1 /* HOISTED */);
|
|
4921
|
-
const
|
|
4922
|
-
|
|
4920
|
+
const _hoisted_52 = [
|
|
4921
|
+
_hoisted_51
|
|
4923
4922
|
];
|
|
4924
|
-
const
|
|
4925
|
-
const
|
|
4923
|
+
const _hoisted_53 = { key: 1 };
|
|
4924
|
+
const _hoisted_54 = {
|
|
4926
4925
|
key: 2,
|
|
4927
4926
|
class: "mobile-list-items"
|
|
4928
4927
|
};
|
|
4929
|
-
const
|
|
4930
|
-
const
|
|
4928
|
+
const _hoisted_55 = ["onClick"];
|
|
4929
|
+
const _hoisted_56 = {
|
|
4931
4930
|
key: 0,
|
|
4932
4931
|
class: "mb-1 font-weight-bold text-capitalize profile-form-title"
|
|
4933
4932
|
};
|
|
4934
|
-
const
|
|
4933
|
+
const _hoisted_57 = {
|
|
4935
4934
|
key: 1,
|
|
4936
4935
|
class: "mb-1 font-weight-bold text-capitalize profile-form-title"
|
|
4937
4936
|
};
|
|
4938
|
-
const
|
|
4937
|
+
const _hoisted_58 = {
|
|
4939
4938
|
key: 2,
|
|
4940
4939
|
class: "mb-1 font-weight-bold text-capitalize profile-form-title"
|
|
4941
4940
|
};
|
|
4942
|
-
const
|
|
4943
|
-
|
|
4941
|
+
const _hoisted_59 = {
|
|
4942
|
+
key: 3,
|
|
4943
|
+
class: "mb-1 font-weight-bold text-capitalize profile-form-title"
|
|
4944
|
+
};
|
|
4945
|
+
const _hoisted_60 = { key: 1 };
|
|
4946
|
+
const _hoisted_61 = {
|
|
4944
4947
|
key: 2,
|
|
4945
4948
|
class: "text-primary fw-bold"
|
|
4946
4949
|
};
|
|
4947
|
-
const
|
|
4948
|
-
const
|
|
4949
|
-
const
|
|
4950
|
-
const
|
|
4951
|
-
const
|
|
4952
|
-
const
|
|
4953
|
-
const
|
|
4954
|
-
const
|
|
4950
|
+
const _hoisted_62 = { key: 3 };
|
|
4951
|
+
const _hoisted_63 = ["innerHTML"];
|
|
4952
|
+
const _hoisted_64 = ["innerHTML"];
|
|
4953
|
+
const _hoisted_65 = ["innerHTML"];
|
|
4954
|
+
const _hoisted_66 = ["innerHTML"];
|
|
4955
|
+
const _hoisted_67 = /*#__PURE__*/createElementVNode("hr", { class: "my-2" }, null, -1 /* HOISTED */);
|
|
4956
|
+
const _hoisted_68 = { key: 0 };
|
|
4957
|
+
const _hoisted_69 = ["href"];
|
|
4958
|
+
const _hoisted_70 = ["title", "onClick"];
|
|
4955
4959
|
|
|
4956
4960
|
const __default__ = {
|
|
4957
4961
|
name: 'sh-table',
|
|
4958
|
-
props: ['endPoint', 'headers', 'cacheKey', 'query', 'pageCount', 'actions', 'hideCount', 'hideLoadMore', 'links', 'reload', 'hideSearch', 'sharedData', 'searchPlaceholder', 'event', 'displayMore', 'displayMoreBtnClass', 'moreDetailsColumns', 'moreDetailsFields', 'hasDownload', 'downloadFields', 'tableHover', 'hideIds', 'paginationStyle', 'hasRange','selectedRange','noRecordsMessage'],
|
|
4962
|
+
props: ['endPoint', 'headers','disableMobileResponsive', 'cacheKey', 'query', 'pageCount', 'actions', 'hideCount', 'hideLoadMore', 'links', 'reload', 'hideSearch', 'sharedData', 'searchPlaceholder', 'event', 'displayMore', 'displayMoreBtnClass', 'moreDetailsColumns', 'moreDetailsFields', 'hasDownload', 'downloadFields', 'tableHover', 'hideIds', 'paginationStyle', 'hasRange','selectedRange','noRecordsMessage'],
|
|
4959
4963
|
data(){
|
|
4960
4964
|
return {
|
|
4961
4965
|
order_by: '',
|
|
@@ -5382,7 +5386,7 @@ return (_ctx, _cache) => {
|
|
|
5382
5386
|
], 64 /* STABLE_FRAGMENT */))
|
|
5383
5387
|
: createCommentVNode("v-if", true)
|
|
5384
5388
|
], 64 /* STABLE_FRAGMENT */))
|
|
5385
|
-
: (_ctx.windowWidth > 700)
|
|
5389
|
+
: (_ctx.windowWidth > 700 || __props.disableMobileResponsive)
|
|
5386
5390
|
? (openBlock(), createElementBlock("table", {
|
|
5387
5391
|
key: 4,
|
|
5388
5392
|
class: normalizeClass(["table sh-table", __props.tableHover ? 'table-hover':''])
|
|
@@ -5397,47 +5401,54 @@ return (_ctx, _cache) => {
|
|
|
5397
5401
|
class: "text-capitalize",
|
|
5398
5402
|
onClick: $event => (_ctx.changeKey('order_by',title))
|
|
5399
5403
|
}, toDisplayString(title.replace(/_/g, ' ')), 9 /* TEXT, PROPS */, _hoisted_23))
|
|
5404
|
+
: createCommentVNode("v-if", true),
|
|
5405
|
+
(typeof title === 'object')
|
|
5406
|
+
? (openBlock(), createElementBlock("a", {
|
|
5407
|
+
key: 1,
|
|
5408
|
+
class: "text-capitalize",
|
|
5409
|
+
onClick: $event => (_ctx.changeKey('order_by',title.key))
|
|
5410
|
+
}, toDisplayString(title.label ?? title.key.replace(/_/g, ' ')), 9 /* TEXT, PROPS */, _hoisted_24))
|
|
5400
5411
|
: (typeof title === 'function')
|
|
5401
5412
|
? (openBlock(), createElementBlock("a", {
|
|
5402
|
-
key:
|
|
5413
|
+
key: 2,
|
|
5403
5414
|
class: "text-capitalize",
|
|
5404
5415
|
onClick: $event => (_ctx.changeKey('order_by',title(null)))
|
|
5405
|
-
}, toDisplayString(title(null).replace(/_/g, ' ')), 9 /* TEXT, PROPS */,
|
|
5416
|
+
}, toDisplayString(title(null).replace(/_/g, ' ')), 9 /* TEXT, PROPS */, _hoisted_25))
|
|
5406
5417
|
: (typeof title !== 'undefined')
|
|
5407
5418
|
? (openBlock(), createElementBlock("a", {
|
|
5408
|
-
key:
|
|
5419
|
+
key: 3,
|
|
5409
5420
|
class: "text-capitalize",
|
|
5410
5421
|
onClick: $event => (_ctx.changeKey('order_by',title))
|
|
5411
|
-
}, toDisplayString(title.replace(/_/g, ' ')), 9 /* TEXT, PROPS */,
|
|
5422
|
+
}, toDisplayString(title.replace(/_/g, ' ')), 9 /* TEXT, PROPS */, _hoisted_26))
|
|
5412
5423
|
: createCommentVNode("v-if", true)
|
|
5413
5424
|
]))
|
|
5414
5425
|
}), 128 /* KEYED_FRAGMENT */)),
|
|
5415
5426
|
(__props.actions)
|
|
5416
|
-
? (openBlock(), createElementBlock("th",
|
|
5427
|
+
? (openBlock(), createElementBlock("th", _hoisted_27, toDisplayString(__props.actions.label), 1 /* TEXT */))
|
|
5417
5428
|
: createCommentVNode("v-if", true)
|
|
5418
5429
|
])
|
|
5419
5430
|
]),
|
|
5420
|
-
createElementVNode("tbody",
|
|
5431
|
+
createElementVNode("tbody", _hoisted_28, [
|
|
5421
5432
|
(_ctx.loading === 'loading')
|
|
5422
|
-
? (openBlock(), createElementBlock("tr",
|
|
5433
|
+
? (openBlock(), createElementBlock("tr", _hoisted_29, [
|
|
5423
5434
|
createElementVNode("td", {
|
|
5424
5435
|
colspan: _ctx.tableHeaders.length
|
|
5425
|
-
}, [...
|
|
5436
|
+
}, [..._hoisted_32], 8 /* PROPS */, _hoisted_30)
|
|
5426
5437
|
]))
|
|
5427
5438
|
: (_ctx.loading === 'error')
|
|
5428
|
-
? (openBlock(), createElementBlock("tr",
|
|
5439
|
+
? (openBlock(), createElementBlock("tr", _hoisted_33, [
|
|
5429
5440
|
createElementVNode("td", {
|
|
5430
5441
|
colspan: _ctx.tableHeaders.length
|
|
5431
|
-
}, toDisplayString(_ctx.loading_error), 9 /* TEXT, PROPS */,
|
|
5442
|
+
}, toDisplayString(_ctx.loading_error), 9 /* TEXT, PROPS */, _hoisted_34)
|
|
5432
5443
|
]))
|
|
5433
5444
|
: (_ctx.records.length === 0)
|
|
5434
|
-
? (openBlock(), createElementBlock("tr",
|
|
5445
|
+
? (openBlock(), createElementBlock("tr", _hoisted_35, [
|
|
5435
5446
|
createElementVNode("td", {
|
|
5436
5447
|
colspan: __props.actions ? _ctx.tableHeaders.length + 1 : _ctx.tableHeaders.length
|
|
5437
5448
|
}, [
|
|
5438
|
-
|
|
5449
|
+
_hoisted_37,
|
|
5439
5450
|
createTextVNode(" No records found ")
|
|
5440
|
-
], 8 /* PROPS */,
|
|
5451
|
+
], 8 /* PROPS */, _hoisted_36)
|
|
5441
5452
|
]))
|
|
5442
5453
|
: (_ctx.loading === 'done')
|
|
5443
5454
|
? (openBlock(true), createElementBlock(Fragment, { key: 3 }, renderList(_ctx.records, (record, index) => {
|
|
@@ -5457,29 +5468,39 @@ return (_ctx, _cache) => {
|
|
|
5457
5468
|
innerHTML: record[key]
|
|
5458
5469
|
}, null, 8 /* PROPS */, ["target", "to", "class", "innerHTML"]))
|
|
5459
5470
|
: (_ctx.getFieldType(key) === 'numeric')
|
|
5460
|
-
? (openBlock(), createElementBlock("span",
|
|
5471
|
+
? (openBlock(), createElementBlock("span", _hoisted_39, toDisplayString(Intl.NumberFormat().format(record[key])), 1 /* TEXT */))
|
|
5461
5472
|
: (_ctx.getFieldType(key) === 'money')
|
|
5462
|
-
? (openBlock(), createElementBlock("span",
|
|
5473
|
+
? (openBlock(), createElementBlock("span", _hoisted_40, toDisplayString(Intl.NumberFormat().format(record[key])), 1 /* TEXT */))
|
|
5463
5474
|
: (_ctx.getFieldType(key) === 'date')
|
|
5464
|
-
? (openBlock(), createElementBlock("span",
|
|
5475
|
+
? (openBlock(), createElementBlock("span", _hoisted_41, toDisplayString(_ctx.formatDate(record[key])), 1 /* TEXT */))
|
|
5465
5476
|
: (typeof key === 'string')
|
|
5466
5477
|
? (openBlock(), createElementBlock("span", {
|
|
5467
5478
|
key: 4,
|
|
5468
5479
|
innerHTML: record[key]
|
|
5469
|
-
}, null, 8 /* PROPS */,
|
|
5480
|
+
}, null, 8 /* PROPS */, _hoisted_42))
|
|
5470
5481
|
: (typeof key === 'function')
|
|
5471
5482
|
? (openBlock(), createElementBlock("span", {
|
|
5472
5483
|
key: 5,
|
|
5473
5484
|
innerHTML: key(record, index)
|
|
5474
|
-
}, null, 8 /* PROPS */, _hoisted_42))
|
|
5475
|
-
: (openBlock(), createElementBlock("span", {
|
|
5476
|
-
key: 6,
|
|
5477
|
-
innerHTML: record[key[0]]
|
|
5478
5485
|
}, null, 8 /* PROPS */, _hoisted_43))
|
|
5486
|
+
: (typeof key === 'object' && key.component)
|
|
5487
|
+
? (openBlock(), createBlock(resolveDynamicComponent(key.component), {
|
|
5488
|
+
key: 6,
|
|
5489
|
+
item: record
|
|
5490
|
+
}, null, 8 /* PROPS */, ["item"]))
|
|
5491
|
+
: (typeof key === 'object')
|
|
5492
|
+
? (openBlock(), createElementBlock("span", {
|
|
5493
|
+
key: 7,
|
|
5494
|
+
innerHTML: record[key.key ?? key.field]
|
|
5495
|
+
}, null, 8 /* PROPS */, _hoisted_44))
|
|
5496
|
+
: (openBlock(), createElementBlock("span", {
|
|
5497
|
+
key: 8,
|
|
5498
|
+
innerHTML: record[key[0]]
|
|
5499
|
+
}, null, 8 /* PROPS */, _hoisted_45))
|
|
5479
5500
|
]))
|
|
5480
5501
|
}), 128 /* KEYED_FRAGMENT */)),
|
|
5481
5502
|
(__props.actions)
|
|
5482
|
-
? (openBlock(), createElementBlock("td",
|
|
5503
|
+
? (openBlock(), createElementBlock("td", _hoisted_46, [
|
|
5483
5504
|
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.actions.actions, (act) => {
|
|
5484
5505
|
return (openBlock(), createElementBlock(Fragment, {
|
|
5485
5506
|
key: act.path
|
|
@@ -5544,7 +5565,7 @@ return (_ctx, _cache) => {
|
|
|
5544
5565
|
}, null, 2 /* CLASS */))
|
|
5545
5566
|
: createCommentVNode("v-if", true),
|
|
5546
5567
|
createTextVNode(" " + toDisplayString(act.label), 1 /* TEXT */)
|
|
5547
|
-
], 10 /* CLASS, PROPS */,
|
|
5568
|
+
], 10 /* CLASS, PROPS */, _hoisted_47))
|
|
5548
5569
|
: (act.emits)
|
|
5549
5570
|
? (openBlock(), createElementBlock("button", {
|
|
5550
5571
|
key: 3,
|
|
@@ -5559,7 +5580,7 @@ return (_ctx, _cache) => {
|
|
|
5559
5580
|
}, null, 2 /* CLASS */))
|
|
5560
5581
|
: createCommentVNode("v-if", true),
|
|
5561
5582
|
createTextVNode(" " + toDisplayString(act.label), 1 /* TEXT */)
|
|
5562
|
-
], 10 /* CLASS, PROPS */,
|
|
5583
|
+
], 10 /* CLASS, PROPS */, _hoisted_48))
|
|
5563
5584
|
: (!act.emits)
|
|
5564
5585
|
? (openBlock(), createBlock(_component_router_link, {
|
|
5565
5586
|
key: 4,
|
|
@@ -5587,20 +5608,20 @@ return (_ctx, _cache) => {
|
|
|
5587
5608
|
}), 128 /* KEYED_FRAGMENT */))
|
|
5588
5609
|
]))
|
|
5589
5610
|
: createCommentVNode("v-if", true)
|
|
5590
|
-
], 10 /* CLASS, PROPS */,
|
|
5611
|
+
], 10 /* CLASS, PROPS */, _hoisted_38))
|
|
5591
5612
|
}), 128 /* KEYED_FRAGMENT */))
|
|
5592
5613
|
: createCommentVNode("v-if", true)
|
|
5593
5614
|
])
|
|
5594
5615
|
], 2 /* CLASS */))
|
|
5595
|
-
: (openBlock(), createElementBlock("div",
|
|
5616
|
+
: (openBlock(), createElementBlock("div", _hoisted_49, [
|
|
5596
5617
|
(_ctx.loading === 'loading')
|
|
5597
|
-
? (openBlock(), createElementBlock("div",
|
|
5618
|
+
? (openBlock(), createElementBlock("div", _hoisted_50, [..._hoisted_52]))
|
|
5598
5619
|
: (_ctx.loading === 'error')
|
|
5599
|
-
? (openBlock(), createElementBlock("div",
|
|
5620
|
+
? (openBlock(), createElementBlock("div", _hoisted_53, [
|
|
5600
5621
|
createElementVNode("span", null, toDisplayString(_ctx.loading_error), 1 /* TEXT */)
|
|
5601
5622
|
]))
|
|
5602
5623
|
: (_ctx.loading === 'done')
|
|
5603
|
-
? (openBlock(), createElementBlock("div",
|
|
5624
|
+
? (openBlock(), createElementBlock("div", _hoisted_54, [
|
|
5604
5625
|
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.records, (record, index) => {
|
|
5605
5626
|
return (openBlock(), createElementBlock("div", {
|
|
5606
5627
|
key: record.id,
|
|
@@ -5612,10 +5633,12 @@ return (_ctx, _cache) => {
|
|
|
5612
5633
|
key: key[0]
|
|
5613
5634
|
}, [
|
|
5614
5635
|
(typeof key === 'string' )
|
|
5615
|
-
? (openBlock(), createElementBlock("p",
|
|
5636
|
+
? (openBlock(), createElementBlock("p", _hoisted_56, toDisplayString(key.replace(/_/g, ' ')), 1 /* TEXT */))
|
|
5616
5637
|
: (typeof key === 'function')
|
|
5617
|
-
? (openBlock(), createElementBlock("p",
|
|
5618
|
-
: (
|
|
5638
|
+
? (openBlock(), createElementBlock("p", _hoisted_57, toDisplayString(key(null).replace(/_/g, ' ')), 1 /* TEXT */))
|
|
5639
|
+
: (typeof key === 'object')
|
|
5640
|
+
? (openBlock(), createElementBlock("p", _hoisted_58, toDisplayString(key.label ?? key.key.replace(/_/g, ' ')), 1 /* TEXT */))
|
|
5641
|
+
: (openBlock(), createElementBlock("p", _hoisted_59, toDisplayString(key[1].replace(/_/g, ' ')), 1 /* TEXT */)),
|
|
5619
5642
|
createElementVNode("span", null, [
|
|
5620
5643
|
(typeof key === 'string' && __props.links && __props.links[key])
|
|
5621
5644
|
? (openBlock(), createBlock(_component_router_link, {
|
|
@@ -5625,31 +5648,41 @@ return (_ctx, _cache) => {
|
|
|
5625
5648
|
innerHTML: record[key]
|
|
5626
5649
|
}, null, 8 /* PROPS */, ["to", "class", "innerHTML"]))
|
|
5627
5650
|
: (_ctx.getFieldType(key) === 'numeric')
|
|
5628
|
-
? (openBlock(), createElementBlock("span",
|
|
5651
|
+
? (openBlock(), createElementBlock("span", _hoisted_60, toDisplayString(Intl.NumberFormat().format(record[key])), 1 /* TEXT */))
|
|
5629
5652
|
: (_ctx.getFieldType(key) === 'money')
|
|
5630
|
-
? (openBlock(), createElementBlock("span",
|
|
5653
|
+
? (openBlock(), createElementBlock("span", _hoisted_61, "KES " + toDisplayString(Intl.NumberFormat().format(record[key])), 1 /* TEXT */))
|
|
5631
5654
|
: (_ctx.getFieldType(key) === 'date')
|
|
5632
|
-
? (openBlock(), createElementBlock("span",
|
|
5655
|
+
? (openBlock(), createElementBlock("span", _hoisted_62, toDisplayString(_ctx.formatDate(record[key])), 1 /* TEXT */))
|
|
5633
5656
|
: (typeof key === 'string')
|
|
5634
5657
|
? (openBlock(), createElementBlock("span", {
|
|
5635
5658
|
key: 4,
|
|
5636
5659
|
innerHTML: record[key]
|
|
5637
|
-
}, null, 8 /* PROPS */,
|
|
5638
|
-
: (typeof key === '
|
|
5639
|
-
? (openBlock(),
|
|
5660
|
+
}, null, 8 /* PROPS */, _hoisted_63))
|
|
5661
|
+
: (typeof key === 'object' && key.component)
|
|
5662
|
+
? (openBlock(), createBlock(resolveDynamicComponent(key.component), {
|
|
5640
5663
|
key: 5,
|
|
5641
|
-
|
|
5642
|
-
}, null, 8 /* PROPS */,
|
|
5643
|
-
: (
|
|
5644
|
-
|
|
5645
|
-
|
|
5646
|
-
|
|
5664
|
+
item: record
|
|
5665
|
+
}, null, 8 /* PROPS */, ["item"]))
|
|
5666
|
+
: (typeof key === 'object')
|
|
5667
|
+
? (openBlock(), createElementBlock("span", {
|
|
5668
|
+
key: 6,
|
|
5669
|
+
innerHTML: record[key.key ?? key.field]
|
|
5670
|
+
}, null, 8 /* PROPS */, _hoisted_64))
|
|
5671
|
+
: (typeof key === 'function')
|
|
5672
|
+
? (openBlock(), createElementBlock("span", {
|
|
5673
|
+
key: 7,
|
|
5674
|
+
innerHTML: key(record, index )
|
|
5675
|
+
}, null, 8 /* PROPS */, _hoisted_65))
|
|
5676
|
+
: (openBlock(), createElementBlock("span", {
|
|
5677
|
+
key: 8,
|
|
5678
|
+
innerHTML: record[key[0]]
|
|
5679
|
+
}, null, 8 /* PROPS */, _hoisted_66))
|
|
5647
5680
|
]),
|
|
5648
|
-
|
|
5681
|
+
_hoisted_67
|
|
5649
5682
|
], 64 /* STABLE_FRAGMENT */))
|
|
5650
5683
|
}), 128 /* KEYED_FRAGMENT */)),
|
|
5651
5684
|
(__props.actions)
|
|
5652
|
-
? (openBlock(), createElementBlock("div",
|
|
5685
|
+
? (openBlock(), createElementBlock("div", _hoisted_68, [
|
|
5653
5686
|
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.actions.actions, (act) => {
|
|
5654
5687
|
return (openBlock(), createElementBlock(Fragment, {
|
|
5655
5688
|
key: act.path
|
|
@@ -5672,7 +5705,7 @@ return (_ctx, _cache) => {
|
|
|
5672
5705
|
}, null, 2 /* CLASS */))
|
|
5673
5706
|
: createCommentVNode("v-if", true),
|
|
5674
5707
|
createTextVNode(" " + toDisplayString(act.label), 1 /* TEXT */)
|
|
5675
|
-
], 10 /* CLASS, PROPS */,
|
|
5708
|
+
], 10 /* CLASS, PROPS */, _hoisted_69))
|
|
5676
5709
|
: (act.emits)
|
|
5677
5710
|
? (openBlock(), createElementBlock("button", {
|
|
5678
5711
|
key: 1,
|
|
@@ -5687,7 +5720,7 @@ return (_ctx, _cache) => {
|
|
|
5687
5720
|
}, null, 2 /* CLASS */))
|
|
5688
5721
|
: createCommentVNode("v-if", true),
|
|
5689
5722
|
createTextVNode(" " + toDisplayString(act.label), 1 /* TEXT */)
|
|
5690
|
-
], 10 /* CLASS, PROPS */,
|
|
5723
|
+
], 10 /* CLASS, PROPS */, _hoisted_70))
|
|
5691
5724
|
: (!act.emits)
|
|
5692
5725
|
? (openBlock(), createBlock(_component_router_link, {
|
|
5693
5726
|
key: 2,
|
|
@@ -5715,7 +5748,7 @@ return (_ctx, _cache) => {
|
|
|
5715
5748
|
}), 128 /* KEYED_FRAGMENT */))
|
|
5716
5749
|
]))
|
|
5717
5750
|
: createCommentVNode("v-if", true)
|
|
5718
|
-
], 8 /* PROPS */,
|
|
5751
|
+
], 8 /* PROPS */, _hoisted_55))
|
|
5719
5752
|
}), 128 /* KEYED_FRAGMENT */))
|
|
5720
5753
|
]))
|
|
5721
5754
|
: createCommentVNode("v-if", true)
|