@iankibetsh/shframework 4.8.1 → 4.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/dist/library.mjs.css +32 -32
- package/dist/library.js +51 -212
- package/dist/library.mjs +50 -212
- package/package.json +1 -1
|
@@ -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,6 +31,38 @@
|
|
|
63
31
|
color: white;
|
|
64
32
|
}
|
|
65
33
|
|
|
34
|
+
.sh-phone{
|
|
35
|
+
display: flex;
|
|
36
|
+
width: 100%;
|
|
37
|
+
align-items: center;
|
|
38
|
+
padding: 0 0.25rem;
|
|
39
|
+
}
|
|
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;
|
|
47
|
+
}
|
|
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;
|
|
55
|
+
}
|
|
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
66
|
.permissions-main {
|
|
67
67
|
background: #edeff2;
|
|
68
68
|
}
|
package/dist/library.js
CHANGED
|
@@ -10,6 +10,7 @@ var NProgress = require('nprogress');
|
|
|
10
10
|
var vue = require('vue');
|
|
11
11
|
var _ = require('lodash');
|
|
12
12
|
var pinia = require('pinia');
|
|
13
|
+
var TableActions = require('@/lib/components/table/TableActions.vue');
|
|
13
14
|
var vueRouter = require('vue-router');
|
|
14
15
|
|
|
15
16
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
@@ -19,6 +20,7 @@ var moment__default = /*#__PURE__*/_interopDefaultLegacy(moment);
|
|
|
19
20
|
var Swal__default = /*#__PURE__*/_interopDefaultLegacy(Swal);
|
|
20
21
|
var NProgress__default = /*#__PURE__*/_interopDefaultLegacy(NProgress);
|
|
21
22
|
var ___default = /*#__PURE__*/_interopDefaultLegacy(_);
|
|
23
|
+
var TableActions__default = /*#__PURE__*/_interopDefaultLegacy(TableActions);
|
|
22
24
|
|
|
23
25
|
function setItem (key, value) {
|
|
24
26
|
let toStore = value;
|
|
@@ -3630,7 +3632,7 @@ return (_ctx, _cache) => {
|
|
|
3630
3632
|
: vue.createCommentVNode("v-if", true)
|
|
3631
3633
|
], 2 /* CLASS */))
|
|
3632
3634
|
: vue.createCommentVNode("v-if", true),
|
|
3633
|
-
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(getFieldComponent(field)), vue.mergeProps(getComponentProps(field), {
|
|
3635
|
+
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(getFieldComponent(field)), vue.mergeProps({ ref_for: true }, getComponentProps(field), {
|
|
3634
3636
|
isInvalid: typeof validationErrors.value[field.field] !== 'undefined',
|
|
3635
3637
|
onClick: $event => (fieldChanged(field.field)),
|
|
3636
3638
|
"onUpdate:modelValue": [$event => (fieldChanged(field.field)), $event => ((formFields.value[index].value) = $event)],
|
|
@@ -4914,14 +4916,12 @@ const _hoisted_46 = {
|
|
|
4914
4916
|
key: 0,
|
|
4915
4917
|
style: {"white-space":"nowrap"}
|
|
4916
4918
|
};
|
|
4917
|
-
const _hoisted_47 =
|
|
4918
|
-
const _hoisted_48 =
|
|
4919
|
-
const _hoisted_49 = { key: 5 };
|
|
4920
|
-
const _hoisted_50 = {
|
|
4919
|
+
const _hoisted_47 = { key: 5 };
|
|
4920
|
+
const _hoisted_48 = {
|
|
4921
4921
|
key: 0,
|
|
4922
4922
|
class: "text-center"
|
|
4923
4923
|
};
|
|
4924
|
-
const
|
|
4924
|
+
const _hoisted_49 = /*#__PURE__*/vue.createElementVNode("div", { class: "text-center" }, [
|
|
4925
4925
|
/*#__PURE__*/vue.createElementVNode("div", {
|
|
4926
4926
|
class: "spinner-border",
|
|
4927
4927
|
role: "status"
|
|
@@ -4929,45 +4929,43 @@ const _hoisted_51 = /*#__PURE__*/vue.createElementVNode("div", { class: "text-ce
|
|
|
4929
4929
|
/*#__PURE__*/vue.createElementVNode("span", { class: "visually-hidden" }, "Loading...")
|
|
4930
4930
|
])
|
|
4931
4931
|
], -1 /* HOISTED */);
|
|
4932
|
-
const
|
|
4933
|
-
|
|
4932
|
+
const _hoisted_50 = [
|
|
4933
|
+
_hoisted_49
|
|
4934
4934
|
];
|
|
4935
|
-
const
|
|
4936
|
-
const
|
|
4935
|
+
const _hoisted_51 = { key: 1 };
|
|
4936
|
+
const _hoisted_52 = {
|
|
4937
4937
|
key: 2,
|
|
4938
4938
|
class: "mobile-list-items"
|
|
4939
4939
|
};
|
|
4940
|
-
const
|
|
4941
|
-
const
|
|
4940
|
+
const _hoisted_53 = ["onClick"];
|
|
4941
|
+
const _hoisted_54 = {
|
|
4942
4942
|
key: 0,
|
|
4943
4943
|
class: "mb-1 font-weight-bold text-capitalize profile-form-title"
|
|
4944
4944
|
};
|
|
4945
|
-
const
|
|
4945
|
+
const _hoisted_55 = {
|
|
4946
4946
|
key: 1,
|
|
4947
4947
|
class: "mb-1 font-weight-bold text-capitalize profile-form-title"
|
|
4948
4948
|
};
|
|
4949
|
-
const
|
|
4949
|
+
const _hoisted_56 = {
|
|
4950
4950
|
key: 2,
|
|
4951
4951
|
class: "mb-1 font-weight-bold text-capitalize profile-form-title"
|
|
4952
4952
|
};
|
|
4953
|
-
const
|
|
4953
|
+
const _hoisted_57 = {
|
|
4954
4954
|
key: 3,
|
|
4955
4955
|
class: "mb-1 font-weight-bold text-capitalize profile-form-title"
|
|
4956
4956
|
};
|
|
4957
|
-
const
|
|
4958
|
-
const
|
|
4957
|
+
const _hoisted_58 = { key: 1 };
|
|
4958
|
+
const _hoisted_59 = {
|
|
4959
4959
|
key: 2,
|
|
4960
4960
|
class: "text-primary fw-bold"
|
|
4961
4961
|
};
|
|
4962
|
-
const
|
|
4962
|
+
const _hoisted_60 = { key: 3 };
|
|
4963
|
+
const _hoisted_61 = ["innerHTML"];
|
|
4964
|
+
const _hoisted_62 = ["innerHTML"];
|
|
4963
4965
|
const _hoisted_63 = ["innerHTML"];
|
|
4964
4966
|
const _hoisted_64 = ["innerHTML"];
|
|
4965
|
-
const _hoisted_65 =
|
|
4966
|
-
const _hoisted_66 =
|
|
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
|
+
const _hoisted_65 = /*#__PURE__*/vue.createElementVNode("hr", { class: "my-2" }, null, -1 /* HOISTED */);
|
|
4968
|
+
const _hoisted_66 = { key: 0 };
|
|
4971
4969
|
|
|
4972
4970
|
const __default__ = {
|
|
4973
4971
|
name: 'sh-table',
|
|
@@ -5288,7 +5286,7 @@ var script$d = /*#__PURE__*/Object.assign(__default__, {
|
|
|
5288
5286
|
|
|
5289
5287
|
const noRecordsComponent = vue.inject('noRecordsComponent', script$i);
|
|
5290
5288
|
|
|
5291
|
-
|
|
5289
|
+
pinia.storeToRefs(useUserStore());
|
|
5292
5290
|
|
|
5293
5291
|
|
|
5294
5292
|
return (_ctx, _cache) => {
|
|
@@ -5512,111 +5510,10 @@ return (_ctx, _cache) => {
|
|
|
5512
5510
|
}), 128 /* KEYED_FRAGMENT */)),
|
|
5513
5511
|
(__props.actions)
|
|
5514
5512
|
? (vue.openBlock(), vue.createElementBlock("td", _hoisted_46, [
|
|
5515
|
-
|
|
5516
|
-
|
|
5517
|
-
|
|
5518
|
-
|
|
5519
|
-
(!act.permission || vue.unref(user).isAllowedTo(act.permission))
|
|
5520
|
-
? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
|
|
5521
|
-
(!act.validator || act.validator(record))
|
|
5522
|
-
? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
|
|
5523
|
-
(['confirmAction','confirmaction','confirm-action','confirm'].includes(act.type))
|
|
5524
|
-
? (vue.openBlock(), vue.createBlock(script$g, {
|
|
5525
|
-
key: 0,
|
|
5526
|
-
onActionSuccessful: $event => (_ctx.doEmitAction('actionSuccessful',record)),
|
|
5527
|
-
onActionFailed: $event => (_ctx.doEmitAction('actionFailed',record)),
|
|
5528
|
-
onActionCanceled: $event => (_ctx.doEmitAction('actionCanceled',record)),
|
|
5529
|
-
"loading-message": act.label,
|
|
5530
|
-
class: vue.normalizeClass(act.class),
|
|
5531
|
-
url: _ctx.replaceActionUrl(act.url,record)
|
|
5532
|
-
}, {
|
|
5533
|
-
default: vue.withCtx(() => [
|
|
5534
|
-
(act.icon)
|
|
5535
|
-
? (vue.openBlock(), vue.createElementBlock("span", {
|
|
5536
|
-
key: 0,
|
|
5537
|
-
class: vue.normalizeClass(act.icon)
|
|
5538
|
-
}, null, 2 /* CLASS */))
|
|
5539
|
-
: vue.createCommentVNode("v-if", true),
|
|
5540
|
-
vue.createTextVNode(" " + vue.toDisplayString(act.label), 1 /* TEXT */)
|
|
5541
|
-
]),
|
|
5542
|
-
_: 2 /* DYNAMIC */
|
|
5543
|
-
}, 1032 /* PROPS, DYNAMIC_SLOTS */, ["onActionSuccessful", "onActionFailed", "onActionCanceled", "loading-message", "class", "url"]))
|
|
5544
|
-
: (['silentAction','silentaction','silent-action','silent'].includes(act.type))
|
|
5545
|
-
? (vue.openBlock(), vue.createBlock(script$f, {
|
|
5546
|
-
key: 1,
|
|
5547
|
-
onActionSuccessful: $event => (_ctx.doEmitAction('actionSuccessful',record)),
|
|
5548
|
-
onActionFailed: $event => (_ctx.doEmitAction('actionFailed',record)),
|
|
5549
|
-
onActionCanceled: $event => (_ctx.doEmitAction('actionCanceled',record)),
|
|
5550
|
-
"loading-message": act.label,
|
|
5551
|
-
class: vue.normalizeClass(act.class),
|
|
5552
|
-
url: _ctx.replaceActionUrl(act.url,record)
|
|
5553
|
-
}, {
|
|
5554
|
-
default: vue.withCtx(() => [
|
|
5555
|
-
(act.icon)
|
|
5556
|
-
? (vue.openBlock(), vue.createElementBlock("span", {
|
|
5557
|
-
key: 0,
|
|
5558
|
-
class: vue.normalizeClass(act.icon)
|
|
5559
|
-
}, null, 2 /* CLASS */))
|
|
5560
|
-
: vue.createCommentVNode("v-if", true),
|
|
5561
|
-
vue.createTextVNode(" " + vue.toDisplayString(act.label), 1 /* TEXT */)
|
|
5562
|
-
]),
|
|
5563
|
-
_: 2 /* DYNAMIC */
|
|
5564
|
-
}, 1032 /* PROPS, DYNAMIC_SLOTS */, ["onActionSuccessful", "onActionFailed", "onActionCanceled", "loading-message", "class", "url"]))
|
|
5565
|
-
: (act.canvasId || act.type === 'offcanvas')
|
|
5566
|
-
? (vue.openBlock(), vue.createElementBlock("a", {
|
|
5567
|
-
key: 2,
|
|
5568
|
-
href: '#' + act.canvasId,
|
|
5569
|
-
"data-bs-toggle": "offcanvas",
|
|
5570
|
-
class: vue.normalizeClass(act.class)
|
|
5571
|
-
}, [
|
|
5572
|
-
(act.icon)
|
|
5573
|
-
? (vue.openBlock(), vue.createElementBlock("span", {
|
|
5574
|
-
key: 0,
|
|
5575
|
-
class: vue.normalizeClass(act.icon)
|
|
5576
|
-
}, null, 2 /* CLASS */))
|
|
5577
|
-
: vue.createCommentVNode("v-if", true),
|
|
5578
|
-
vue.createTextVNode(" " + vue.toDisplayString(act.label), 1 /* TEXT */)
|
|
5579
|
-
], 10 /* CLASS, PROPS */, _hoisted_47))
|
|
5580
|
-
: (act.emits)
|
|
5581
|
-
? (vue.openBlock(), vue.createElementBlock("button", {
|
|
5582
|
-
key: 3,
|
|
5583
|
-
title: act.title,
|
|
5584
|
-
class: vue.normalizeClass(act.class ? act.class:'btn btn-default'),
|
|
5585
|
-
onClick: $event => (_ctx.doEmitAction(act.emits,record))
|
|
5586
|
-
}, [
|
|
5587
|
-
(act.icon)
|
|
5588
|
-
? (vue.openBlock(), vue.createElementBlock("span", {
|
|
5589
|
-
key: 0,
|
|
5590
|
-
class: vue.normalizeClass(act.icon)
|
|
5591
|
-
}, null, 2 /* CLASS */))
|
|
5592
|
-
: vue.createCommentVNode("v-if", true),
|
|
5593
|
-
vue.createTextVNode(" " + vue.toDisplayString(act.label), 1 /* TEXT */)
|
|
5594
|
-
], 10 /* CLASS, PROPS */, _hoisted_48))
|
|
5595
|
-
: (!act.emits)
|
|
5596
|
-
? (vue.openBlock(), vue.createBlock(_component_router_link, {
|
|
5597
|
-
key: 4,
|
|
5598
|
-
title: act.title,
|
|
5599
|
-
to: _ctx.replaceActionUrl(act.path,record),
|
|
5600
|
-
class: vue.normalizeClass(act.class)
|
|
5601
|
-
}, {
|
|
5602
|
-
default: vue.withCtx(() => [
|
|
5603
|
-
(act.icon)
|
|
5604
|
-
? (vue.openBlock(), vue.createElementBlock("span", {
|
|
5605
|
-
key: 0,
|
|
5606
|
-
class: vue.normalizeClass(act.icon)
|
|
5607
|
-
}, null, 2 /* CLASS */))
|
|
5608
|
-
: vue.createCommentVNode("v-if", true),
|
|
5609
|
-
vue.createTextVNode(" " + vue.toDisplayString(act.label), 1 /* TEXT */)
|
|
5610
|
-
]),
|
|
5611
|
-
_: 2 /* DYNAMIC */
|
|
5612
|
-
}, 1032 /* PROPS, DYNAMIC_SLOTS */, ["title", "to", "class"]))
|
|
5613
|
-
: vue.createCommentVNode("v-if", true)
|
|
5614
|
-
], 64 /* STABLE_FRAGMENT */))
|
|
5615
|
-
: vue.createCommentVNode("v-if", true)
|
|
5616
|
-
], 64 /* STABLE_FRAGMENT */))
|
|
5617
|
-
: vue.createCommentVNode("v-if", true)
|
|
5618
|
-
], 64 /* STABLE_FRAGMENT */))
|
|
5619
|
-
}), 128 /* KEYED_FRAGMENT */))
|
|
5513
|
+
vue.createVNode(TableActions__default["default"], {
|
|
5514
|
+
actions: __props.actions,
|
|
5515
|
+
record: record
|
|
5516
|
+
}, null, 8 /* PROPS */, ["actions", "record"])
|
|
5620
5517
|
]))
|
|
5621
5518
|
: vue.createCommentVNode("v-if", true)
|
|
5622
5519
|
], 10 /* CLASS, PROPS */, _hoisted_38))
|
|
@@ -5624,15 +5521,15 @@ return (_ctx, _cache) => {
|
|
|
5624
5521
|
: vue.createCommentVNode("v-if", true)
|
|
5625
5522
|
])
|
|
5626
5523
|
], 2 /* CLASS */))
|
|
5627
|
-
: (vue.openBlock(), vue.createElementBlock("div",
|
|
5524
|
+
: (vue.openBlock(), vue.createElementBlock("div", _hoisted_47, [
|
|
5628
5525
|
(_ctx.loading === 'loading')
|
|
5629
|
-
? (vue.openBlock(), vue.createElementBlock("div",
|
|
5526
|
+
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_48, [..._hoisted_50]))
|
|
5630
5527
|
: (_ctx.loading === 'error')
|
|
5631
|
-
? (vue.openBlock(), vue.createElementBlock("div",
|
|
5528
|
+
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_51, [
|
|
5632
5529
|
vue.createElementVNode("span", null, vue.toDisplayString(_ctx.loading_error), 1 /* TEXT */)
|
|
5633
5530
|
]))
|
|
5634
5531
|
: (_ctx.loading === 'done')
|
|
5635
|
-
? (vue.openBlock(), vue.createElementBlock("div",
|
|
5532
|
+
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_52, [
|
|
5636
5533
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.records, (record, index) => {
|
|
5637
5534
|
return (vue.openBlock(), vue.createElementBlock("div", {
|
|
5638
5535
|
key: record.id,
|
|
@@ -5644,12 +5541,12 @@ return (_ctx, _cache) => {
|
|
|
5644
5541
|
key: key[0]
|
|
5645
5542
|
}, [
|
|
5646
5543
|
(typeof key === 'string' )
|
|
5647
|
-
? (vue.openBlock(), vue.createElementBlock("p",
|
|
5544
|
+
? (vue.openBlock(), vue.createElementBlock("p", _hoisted_54, vue.toDisplayString(key.replace(/_/g, ' ')), 1 /* TEXT */))
|
|
5648
5545
|
: (typeof key === 'function')
|
|
5649
|
-
? (vue.openBlock(), vue.createElementBlock("p",
|
|
5546
|
+
? (vue.openBlock(), vue.createElementBlock("p", _hoisted_55, vue.toDisplayString(key(null).replace(/_/g, ' ')), 1 /* TEXT */))
|
|
5650
5547
|
: (typeof key === 'object')
|
|
5651
|
-
? (vue.openBlock(), vue.createElementBlock("p",
|
|
5652
|
-
: (vue.openBlock(), vue.createElementBlock("p",
|
|
5548
|
+
? (vue.openBlock(), vue.createElementBlock("p", _hoisted_56, vue.toDisplayString(key.label ?? key.key.replace(/_/g, ' ')), 1 /* TEXT */))
|
|
5549
|
+
: (vue.openBlock(), vue.createElementBlock("p", _hoisted_57, vue.toDisplayString(key[1].replace(/_/g, ' ')), 1 /* TEXT */)),
|
|
5653
5550
|
vue.createElementVNode("span", null, [
|
|
5654
5551
|
(typeof key === 'string' && __props.links && __props.links[key])
|
|
5655
5552
|
? (vue.openBlock(), vue.createBlock(_component_router_link, {
|
|
@@ -5659,16 +5556,16 @@ return (_ctx, _cache) => {
|
|
|
5659
5556
|
innerHTML: record[key]
|
|
5660
5557
|
}, null, 8 /* PROPS */, ["to", "class", "innerHTML"]))
|
|
5661
5558
|
: (_ctx.getFieldType(key) === 'numeric')
|
|
5662
|
-
? (vue.openBlock(), vue.createElementBlock("span",
|
|
5559
|
+
? (vue.openBlock(), vue.createElementBlock("span", _hoisted_58, vue.toDisplayString(Intl.NumberFormat().format(record[key])), 1 /* TEXT */))
|
|
5663
5560
|
: (_ctx.getFieldType(key) === 'money')
|
|
5664
|
-
? (vue.openBlock(), vue.createElementBlock("span",
|
|
5561
|
+
? (vue.openBlock(), vue.createElementBlock("span", _hoisted_59, "KES " + vue.toDisplayString(Intl.NumberFormat().format(record[key])), 1 /* TEXT */))
|
|
5665
5562
|
: (_ctx.getFieldType(key) === 'date')
|
|
5666
|
-
? (vue.openBlock(), vue.createElementBlock("span",
|
|
5563
|
+
? (vue.openBlock(), vue.createElementBlock("span", _hoisted_60, vue.toDisplayString(_ctx.formatDate(record[key])), 1 /* TEXT */))
|
|
5667
5564
|
: (typeof key === 'string')
|
|
5668
5565
|
? (vue.openBlock(), vue.createElementBlock("span", {
|
|
5669
5566
|
key: 4,
|
|
5670
5567
|
innerHTML: record[key]
|
|
5671
|
-
}, null, 8 /* PROPS */,
|
|
5568
|
+
}, null, 8 /* PROPS */, _hoisted_61))
|
|
5672
5569
|
: (typeof key === 'object' && key.component)
|
|
5673
5570
|
? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(key.component), {
|
|
5674
5571
|
key: 5,
|
|
@@ -5678,88 +5575,29 @@ return (_ctx, _cache) => {
|
|
|
5678
5575
|
? (vue.openBlock(), vue.createElementBlock("span", {
|
|
5679
5576
|
key: 6,
|
|
5680
5577
|
innerHTML: record[key.key ?? key.field]
|
|
5681
|
-
}, null, 8 /* PROPS */,
|
|
5578
|
+
}, null, 8 /* PROPS */, _hoisted_62))
|
|
5682
5579
|
: (typeof key === 'function')
|
|
5683
5580
|
? (vue.openBlock(), vue.createElementBlock("span", {
|
|
5684
5581
|
key: 7,
|
|
5685
5582
|
innerHTML: key(record, index )
|
|
5686
|
-
}, null, 8 /* PROPS */,
|
|
5583
|
+
}, null, 8 /* PROPS */, _hoisted_63))
|
|
5687
5584
|
: (vue.openBlock(), vue.createElementBlock("span", {
|
|
5688
5585
|
key: 8,
|
|
5689
5586
|
innerHTML: record[key[0]]
|
|
5690
|
-
}, null, 8 /* PROPS */,
|
|
5587
|
+
}, null, 8 /* PROPS */, _hoisted_64))
|
|
5691
5588
|
]),
|
|
5692
|
-
|
|
5589
|
+
_hoisted_65
|
|
5693
5590
|
], 64 /* STABLE_FRAGMENT */))
|
|
5694
5591
|
}), 128 /* KEYED_FRAGMENT */)),
|
|
5695
5592
|
(__props.actions)
|
|
5696
|
-
? (vue.openBlock(), vue.createElementBlock("div",
|
|
5697
|
-
|
|
5698
|
-
|
|
5699
|
-
|
|
5700
|
-
|
|
5701
|
-
(!act.permission || vue.unref(user).isAllowedTo(act.permission))
|
|
5702
|
-
? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
|
|
5703
|
-
(!act.validator || act.validator(record))
|
|
5704
|
-
? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
|
|
5705
|
-
(act.canvasId)
|
|
5706
|
-
? (vue.openBlock(), vue.createElementBlock("a", {
|
|
5707
|
-
key: 0,
|
|
5708
|
-
href: '#' + act.canvasId,
|
|
5709
|
-
"data-bs-toggle": "offcanvas",
|
|
5710
|
-
class: vue.normalizeClass(act.class)
|
|
5711
|
-
}, [
|
|
5712
|
-
(act.icon)
|
|
5713
|
-
? (vue.openBlock(), vue.createElementBlock("span", {
|
|
5714
|
-
key: 0,
|
|
5715
|
-
class: vue.normalizeClass(act.icon)
|
|
5716
|
-
}, null, 2 /* CLASS */))
|
|
5717
|
-
: vue.createCommentVNode("v-if", true),
|
|
5718
|
-
vue.createTextVNode(" " + vue.toDisplayString(act.label), 1 /* TEXT */)
|
|
5719
|
-
], 10 /* CLASS, PROPS */, _hoisted_69))
|
|
5720
|
-
: (act.emits)
|
|
5721
|
-
? (vue.openBlock(), vue.createElementBlock("button", {
|
|
5722
|
-
key: 1,
|
|
5723
|
-
title: act.title,
|
|
5724
|
-
class: vue.normalizeClass(act.class ? act.class:'btn btn-default'),
|
|
5725
|
-
onClick: $event => (_ctx.doEmitAction(act.emits,record))
|
|
5726
|
-
}, [
|
|
5727
|
-
(act.icon)
|
|
5728
|
-
? (vue.openBlock(), vue.createElementBlock("span", {
|
|
5729
|
-
key: 0,
|
|
5730
|
-
class: vue.normalizeClass(act.icon)
|
|
5731
|
-
}, null, 2 /* CLASS */))
|
|
5732
|
-
: vue.createCommentVNode("v-if", true),
|
|
5733
|
-
vue.createTextVNode(" " + vue.toDisplayString(act.label), 1 /* TEXT */)
|
|
5734
|
-
], 10 /* CLASS, PROPS */, _hoisted_70))
|
|
5735
|
-
: (!act.emits)
|
|
5736
|
-
? (vue.openBlock(), vue.createBlock(_component_router_link, {
|
|
5737
|
-
key: 2,
|
|
5738
|
-
title: act.title,
|
|
5739
|
-
to: _ctx.replaceActionUrl(act.path,record),
|
|
5740
|
-
class: vue.normalizeClass(act.class)
|
|
5741
|
-
}, {
|
|
5742
|
-
default: vue.withCtx(() => [
|
|
5743
|
-
(act.icon)
|
|
5744
|
-
? (vue.openBlock(), vue.createElementBlock("span", {
|
|
5745
|
-
key: 0,
|
|
5746
|
-
class: vue.normalizeClass(act.icon)
|
|
5747
|
-
}, null, 2 /* CLASS */))
|
|
5748
|
-
: vue.createCommentVNode("v-if", true),
|
|
5749
|
-
vue.createTextVNode(" " + vue.toDisplayString(act.label), 1 /* TEXT */)
|
|
5750
|
-
]),
|
|
5751
|
-
_: 2 /* DYNAMIC */
|
|
5752
|
-
}, 1032 /* PROPS, DYNAMIC_SLOTS */, ["title", "to", "class"]))
|
|
5753
|
-
: vue.createCommentVNode("v-if", true)
|
|
5754
|
-
], 64 /* STABLE_FRAGMENT */))
|
|
5755
|
-
: vue.createCommentVNode("v-if", true)
|
|
5756
|
-
], 64 /* STABLE_FRAGMENT */))
|
|
5757
|
-
: vue.createCommentVNode("v-if", true)
|
|
5758
|
-
], 64 /* STABLE_FRAGMENT */))
|
|
5759
|
-
}), 128 /* KEYED_FRAGMENT */))
|
|
5593
|
+
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_66, [
|
|
5594
|
+
vue.createVNode(TableActions__default["default"], {
|
|
5595
|
+
actions: __props.actions,
|
|
5596
|
+
record: record
|
|
5597
|
+
}, null, 8 /* PROPS */, ["actions", "record"])
|
|
5760
5598
|
]))
|
|
5761
5599
|
: vue.createCommentVNode("v-if", true)
|
|
5762
|
-
], 8 /* PROPS */,
|
|
5600
|
+
], 8 /* PROPS */, _hoisted_53))
|
|
5763
5601
|
}), 128 /* KEYED_FRAGMENT */))
|
|
5764
5602
|
]))
|
|
5765
5603
|
: vue.createCommentVNode("v-if", true)
|
|
@@ -5794,7 +5632,8 @@ return (_ctx, _cache) => {
|
|
|
5794
5632
|
(_ctx.selectedRecord)
|
|
5795
5633
|
? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(action.canvasComponent), vue.mergeProps({
|
|
5796
5634
|
key: 0,
|
|
5797
|
-
onRecordUpdated: _ctx.reloadData
|
|
5635
|
+
onRecordUpdated: _ctx.reloadData,
|
|
5636
|
+
ref_for: true
|
|
5798
5637
|
}, _ctx.cleanCanvasProps(action), { record: _ctx.selectedRecord }), null, 16 /* FULL_PROPS */, ["onRecordUpdated", "record"]))
|
|
5799
5638
|
: vue.createCommentVNode("v-if", true)
|
|
5800
5639
|
]),
|
package/dist/library.mjs
CHANGED
|
@@ -6,6 +6,7 @@ import NProgress from 'nprogress';
|
|
|
6
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
|
+
import TableActions from '@/lib/components/table/TableActions.vue';
|
|
9
10
|
import { useRoute, useRouter } from 'vue-router';
|
|
10
11
|
|
|
11
12
|
function setItem (key, value) {
|
|
@@ -3618,7 +3619,7 @@ return (_ctx, _cache) => {
|
|
|
3618
3619
|
: createCommentVNode("v-if", true)
|
|
3619
3620
|
], 2 /* CLASS */))
|
|
3620
3621
|
: createCommentVNode("v-if", true),
|
|
3621
|
-
(openBlock(), createBlock(resolveDynamicComponent(getFieldComponent(field)), mergeProps(getComponentProps(field), {
|
|
3622
|
+
(openBlock(), createBlock(resolveDynamicComponent(getFieldComponent(field)), mergeProps({ ref_for: true }, getComponentProps(field), {
|
|
3622
3623
|
isInvalid: typeof validationErrors.value[field.field] !== 'undefined',
|
|
3623
3624
|
onClick: $event => (fieldChanged(field.field)),
|
|
3624
3625
|
"onUpdate:modelValue": [$event => (fieldChanged(field.field)), $event => ((formFields.value[index].value) = $event)],
|
|
@@ -4902,14 +4903,12 @@ const _hoisted_46 = {
|
|
|
4902
4903
|
key: 0,
|
|
4903
4904
|
style: {"white-space":"nowrap"}
|
|
4904
4905
|
};
|
|
4905
|
-
const _hoisted_47 =
|
|
4906
|
-
const _hoisted_48 =
|
|
4907
|
-
const _hoisted_49 = { key: 5 };
|
|
4908
|
-
const _hoisted_50 = {
|
|
4906
|
+
const _hoisted_47 = { key: 5 };
|
|
4907
|
+
const _hoisted_48 = {
|
|
4909
4908
|
key: 0,
|
|
4910
4909
|
class: "text-center"
|
|
4911
4910
|
};
|
|
4912
|
-
const
|
|
4911
|
+
const _hoisted_49 = /*#__PURE__*/createElementVNode("div", { class: "text-center" }, [
|
|
4913
4912
|
/*#__PURE__*/createElementVNode("div", {
|
|
4914
4913
|
class: "spinner-border",
|
|
4915
4914
|
role: "status"
|
|
@@ -4917,45 +4916,43 @@ const _hoisted_51 = /*#__PURE__*/createElementVNode("div", { class: "text-center
|
|
|
4917
4916
|
/*#__PURE__*/createElementVNode("span", { class: "visually-hidden" }, "Loading...")
|
|
4918
4917
|
])
|
|
4919
4918
|
], -1 /* HOISTED */);
|
|
4920
|
-
const
|
|
4921
|
-
|
|
4919
|
+
const _hoisted_50 = [
|
|
4920
|
+
_hoisted_49
|
|
4922
4921
|
];
|
|
4923
|
-
const
|
|
4924
|
-
const
|
|
4922
|
+
const _hoisted_51 = { key: 1 };
|
|
4923
|
+
const _hoisted_52 = {
|
|
4925
4924
|
key: 2,
|
|
4926
4925
|
class: "mobile-list-items"
|
|
4927
4926
|
};
|
|
4928
|
-
const
|
|
4929
|
-
const
|
|
4927
|
+
const _hoisted_53 = ["onClick"];
|
|
4928
|
+
const _hoisted_54 = {
|
|
4930
4929
|
key: 0,
|
|
4931
4930
|
class: "mb-1 font-weight-bold text-capitalize profile-form-title"
|
|
4932
4931
|
};
|
|
4933
|
-
const
|
|
4932
|
+
const _hoisted_55 = {
|
|
4934
4933
|
key: 1,
|
|
4935
4934
|
class: "mb-1 font-weight-bold text-capitalize profile-form-title"
|
|
4936
4935
|
};
|
|
4937
|
-
const
|
|
4936
|
+
const _hoisted_56 = {
|
|
4938
4937
|
key: 2,
|
|
4939
4938
|
class: "mb-1 font-weight-bold text-capitalize profile-form-title"
|
|
4940
4939
|
};
|
|
4941
|
-
const
|
|
4940
|
+
const _hoisted_57 = {
|
|
4942
4941
|
key: 3,
|
|
4943
4942
|
class: "mb-1 font-weight-bold text-capitalize profile-form-title"
|
|
4944
4943
|
};
|
|
4945
|
-
const
|
|
4946
|
-
const
|
|
4944
|
+
const _hoisted_58 = { key: 1 };
|
|
4945
|
+
const _hoisted_59 = {
|
|
4947
4946
|
key: 2,
|
|
4948
4947
|
class: "text-primary fw-bold"
|
|
4949
4948
|
};
|
|
4950
|
-
const
|
|
4949
|
+
const _hoisted_60 = { key: 3 };
|
|
4950
|
+
const _hoisted_61 = ["innerHTML"];
|
|
4951
|
+
const _hoisted_62 = ["innerHTML"];
|
|
4951
4952
|
const _hoisted_63 = ["innerHTML"];
|
|
4952
4953
|
const _hoisted_64 = ["innerHTML"];
|
|
4953
|
-
const _hoisted_65 =
|
|
4954
|
-
const _hoisted_66 =
|
|
4955
|
-
const _hoisted_67 = /*#__PURE__*/createElementVNode("hr", { class: "my-2" }, null, -1 /* HOISTED */);
|
|
4956
|
-
const _hoisted_68 = { key: 0 };
|
|
4957
|
-
const _hoisted_69 = ["href"];
|
|
4958
|
-
const _hoisted_70 = ["title", "onClick"];
|
|
4954
|
+
const _hoisted_65 = /*#__PURE__*/createElementVNode("hr", { class: "my-2" }, null, -1 /* HOISTED */);
|
|
4955
|
+
const _hoisted_66 = { key: 0 };
|
|
4959
4956
|
|
|
4960
4957
|
const __default__ = {
|
|
4961
4958
|
name: 'sh-table',
|
|
@@ -5276,7 +5273,7 @@ var script$d = /*#__PURE__*/Object.assign(__default__, {
|
|
|
5276
5273
|
|
|
5277
5274
|
const noRecordsComponent = inject('noRecordsComponent', script$i);
|
|
5278
5275
|
|
|
5279
|
-
|
|
5276
|
+
storeToRefs(useUserStore());
|
|
5280
5277
|
|
|
5281
5278
|
|
|
5282
5279
|
return (_ctx, _cache) => {
|
|
@@ -5500,111 +5497,10 @@ return (_ctx, _cache) => {
|
|
|
5500
5497
|
}), 128 /* KEYED_FRAGMENT */)),
|
|
5501
5498
|
(__props.actions)
|
|
5502
5499
|
? (openBlock(), createElementBlock("td", _hoisted_46, [
|
|
5503
|
-
(
|
|
5504
|
-
|
|
5505
|
-
|
|
5506
|
-
|
|
5507
|
-
(!act.permission || unref(user).isAllowedTo(act.permission))
|
|
5508
|
-
? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
5509
|
-
(!act.validator || act.validator(record))
|
|
5510
|
-
? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
5511
|
-
(['confirmAction','confirmaction','confirm-action','confirm'].includes(act.type))
|
|
5512
|
-
? (openBlock(), createBlock(script$g, {
|
|
5513
|
-
key: 0,
|
|
5514
|
-
onActionSuccessful: $event => (_ctx.doEmitAction('actionSuccessful',record)),
|
|
5515
|
-
onActionFailed: $event => (_ctx.doEmitAction('actionFailed',record)),
|
|
5516
|
-
onActionCanceled: $event => (_ctx.doEmitAction('actionCanceled',record)),
|
|
5517
|
-
"loading-message": act.label,
|
|
5518
|
-
class: normalizeClass(act.class),
|
|
5519
|
-
url: _ctx.replaceActionUrl(act.url,record)
|
|
5520
|
-
}, {
|
|
5521
|
-
default: withCtx(() => [
|
|
5522
|
-
(act.icon)
|
|
5523
|
-
? (openBlock(), createElementBlock("span", {
|
|
5524
|
-
key: 0,
|
|
5525
|
-
class: normalizeClass(act.icon)
|
|
5526
|
-
}, null, 2 /* CLASS */))
|
|
5527
|
-
: createCommentVNode("v-if", true),
|
|
5528
|
-
createTextVNode(" " + toDisplayString(act.label), 1 /* TEXT */)
|
|
5529
|
-
]),
|
|
5530
|
-
_: 2 /* DYNAMIC */
|
|
5531
|
-
}, 1032 /* PROPS, DYNAMIC_SLOTS */, ["onActionSuccessful", "onActionFailed", "onActionCanceled", "loading-message", "class", "url"]))
|
|
5532
|
-
: (['silentAction','silentaction','silent-action','silent'].includes(act.type))
|
|
5533
|
-
? (openBlock(), createBlock(script$f, {
|
|
5534
|
-
key: 1,
|
|
5535
|
-
onActionSuccessful: $event => (_ctx.doEmitAction('actionSuccessful',record)),
|
|
5536
|
-
onActionFailed: $event => (_ctx.doEmitAction('actionFailed',record)),
|
|
5537
|
-
onActionCanceled: $event => (_ctx.doEmitAction('actionCanceled',record)),
|
|
5538
|
-
"loading-message": act.label,
|
|
5539
|
-
class: normalizeClass(act.class),
|
|
5540
|
-
url: _ctx.replaceActionUrl(act.url,record)
|
|
5541
|
-
}, {
|
|
5542
|
-
default: withCtx(() => [
|
|
5543
|
-
(act.icon)
|
|
5544
|
-
? (openBlock(), createElementBlock("span", {
|
|
5545
|
-
key: 0,
|
|
5546
|
-
class: normalizeClass(act.icon)
|
|
5547
|
-
}, null, 2 /* CLASS */))
|
|
5548
|
-
: createCommentVNode("v-if", true),
|
|
5549
|
-
createTextVNode(" " + toDisplayString(act.label), 1 /* TEXT */)
|
|
5550
|
-
]),
|
|
5551
|
-
_: 2 /* DYNAMIC */
|
|
5552
|
-
}, 1032 /* PROPS, DYNAMIC_SLOTS */, ["onActionSuccessful", "onActionFailed", "onActionCanceled", "loading-message", "class", "url"]))
|
|
5553
|
-
: (act.canvasId || act.type === 'offcanvas')
|
|
5554
|
-
? (openBlock(), createElementBlock("a", {
|
|
5555
|
-
key: 2,
|
|
5556
|
-
href: '#' + act.canvasId,
|
|
5557
|
-
"data-bs-toggle": "offcanvas",
|
|
5558
|
-
class: normalizeClass(act.class)
|
|
5559
|
-
}, [
|
|
5560
|
-
(act.icon)
|
|
5561
|
-
? (openBlock(), createElementBlock("span", {
|
|
5562
|
-
key: 0,
|
|
5563
|
-
class: normalizeClass(act.icon)
|
|
5564
|
-
}, null, 2 /* CLASS */))
|
|
5565
|
-
: createCommentVNode("v-if", true),
|
|
5566
|
-
createTextVNode(" " + toDisplayString(act.label), 1 /* TEXT */)
|
|
5567
|
-
], 10 /* CLASS, PROPS */, _hoisted_47))
|
|
5568
|
-
: (act.emits)
|
|
5569
|
-
? (openBlock(), createElementBlock("button", {
|
|
5570
|
-
key: 3,
|
|
5571
|
-
title: act.title,
|
|
5572
|
-
class: normalizeClass(act.class ? act.class:'btn btn-default'),
|
|
5573
|
-
onClick: $event => (_ctx.doEmitAction(act.emits,record))
|
|
5574
|
-
}, [
|
|
5575
|
-
(act.icon)
|
|
5576
|
-
? (openBlock(), createElementBlock("span", {
|
|
5577
|
-
key: 0,
|
|
5578
|
-
class: normalizeClass(act.icon)
|
|
5579
|
-
}, null, 2 /* CLASS */))
|
|
5580
|
-
: createCommentVNode("v-if", true),
|
|
5581
|
-
createTextVNode(" " + toDisplayString(act.label), 1 /* TEXT */)
|
|
5582
|
-
], 10 /* CLASS, PROPS */, _hoisted_48))
|
|
5583
|
-
: (!act.emits)
|
|
5584
|
-
? (openBlock(), createBlock(_component_router_link, {
|
|
5585
|
-
key: 4,
|
|
5586
|
-
title: act.title,
|
|
5587
|
-
to: _ctx.replaceActionUrl(act.path,record),
|
|
5588
|
-
class: normalizeClass(act.class)
|
|
5589
|
-
}, {
|
|
5590
|
-
default: withCtx(() => [
|
|
5591
|
-
(act.icon)
|
|
5592
|
-
? (openBlock(), createElementBlock("span", {
|
|
5593
|
-
key: 0,
|
|
5594
|
-
class: normalizeClass(act.icon)
|
|
5595
|
-
}, null, 2 /* CLASS */))
|
|
5596
|
-
: createCommentVNode("v-if", true),
|
|
5597
|
-
createTextVNode(" " + toDisplayString(act.label), 1 /* TEXT */)
|
|
5598
|
-
]),
|
|
5599
|
-
_: 2 /* DYNAMIC */
|
|
5600
|
-
}, 1032 /* PROPS, DYNAMIC_SLOTS */, ["title", "to", "class"]))
|
|
5601
|
-
: createCommentVNode("v-if", true)
|
|
5602
|
-
], 64 /* STABLE_FRAGMENT */))
|
|
5603
|
-
: createCommentVNode("v-if", true)
|
|
5604
|
-
], 64 /* STABLE_FRAGMENT */))
|
|
5605
|
-
: createCommentVNode("v-if", true)
|
|
5606
|
-
], 64 /* STABLE_FRAGMENT */))
|
|
5607
|
-
}), 128 /* KEYED_FRAGMENT */))
|
|
5500
|
+
createVNode(TableActions, {
|
|
5501
|
+
actions: __props.actions,
|
|
5502
|
+
record: record
|
|
5503
|
+
}, null, 8 /* PROPS */, ["actions", "record"])
|
|
5608
5504
|
]))
|
|
5609
5505
|
: createCommentVNode("v-if", true)
|
|
5610
5506
|
], 10 /* CLASS, PROPS */, _hoisted_38))
|
|
@@ -5612,15 +5508,15 @@ return (_ctx, _cache) => {
|
|
|
5612
5508
|
: createCommentVNode("v-if", true)
|
|
5613
5509
|
])
|
|
5614
5510
|
], 2 /* CLASS */))
|
|
5615
|
-
: (openBlock(), createElementBlock("div",
|
|
5511
|
+
: (openBlock(), createElementBlock("div", _hoisted_47, [
|
|
5616
5512
|
(_ctx.loading === 'loading')
|
|
5617
|
-
? (openBlock(), createElementBlock("div",
|
|
5513
|
+
? (openBlock(), createElementBlock("div", _hoisted_48, [..._hoisted_50]))
|
|
5618
5514
|
: (_ctx.loading === 'error')
|
|
5619
|
-
? (openBlock(), createElementBlock("div",
|
|
5515
|
+
? (openBlock(), createElementBlock("div", _hoisted_51, [
|
|
5620
5516
|
createElementVNode("span", null, toDisplayString(_ctx.loading_error), 1 /* TEXT */)
|
|
5621
5517
|
]))
|
|
5622
5518
|
: (_ctx.loading === 'done')
|
|
5623
|
-
? (openBlock(), createElementBlock("div",
|
|
5519
|
+
? (openBlock(), createElementBlock("div", _hoisted_52, [
|
|
5624
5520
|
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.records, (record, index) => {
|
|
5625
5521
|
return (openBlock(), createElementBlock("div", {
|
|
5626
5522
|
key: record.id,
|
|
@@ -5632,12 +5528,12 @@ return (_ctx, _cache) => {
|
|
|
5632
5528
|
key: key[0]
|
|
5633
5529
|
}, [
|
|
5634
5530
|
(typeof key === 'string' )
|
|
5635
|
-
? (openBlock(), createElementBlock("p",
|
|
5531
|
+
? (openBlock(), createElementBlock("p", _hoisted_54, toDisplayString(key.replace(/_/g, ' ')), 1 /* TEXT */))
|
|
5636
5532
|
: (typeof key === 'function')
|
|
5637
|
-
? (openBlock(), createElementBlock("p",
|
|
5533
|
+
? (openBlock(), createElementBlock("p", _hoisted_55, toDisplayString(key(null).replace(/_/g, ' ')), 1 /* TEXT */))
|
|
5638
5534
|
: (typeof key === 'object')
|
|
5639
|
-
? (openBlock(), createElementBlock("p",
|
|
5640
|
-
: (openBlock(), createElementBlock("p",
|
|
5535
|
+
? (openBlock(), createElementBlock("p", _hoisted_56, toDisplayString(key.label ?? key.key.replace(/_/g, ' ')), 1 /* TEXT */))
|
|
5536
|
+
: (openBlock(), createElementBlock("p", _hoisted_57, toDisplayString(key[1].replace(/_/g, ' ')), 1 /* TEXT */)),
|
|
5641
5537
|
createElementVNode("span", null, [
|
|
5642
5538
|
(typeof key === 'string' && __props.links && __props.links[key])
|
|
5643
5539
|
? (openBlock(), createBlock(_component_router_link, {
|
|
@@ -5647,16 +5543,16 @@ return (_ctx, _cache) => {
|
|
|
5647
5543
|
innerHTML: record[key]
|
|
5648
5544
|
}, null, 8 /* PROPS */, ["to", "class", "innerHTML"]))
|
|
5649
5545
|
: (_ctx.getFieldType(key) === 'numeric')
|
|
5650
|
-
? (openBlock(), createElementBlock("span",
|
|
5546
|
+
? (openBlock(), createElementBlock("span", _hoisted_58, toDisplayString(Intl.NumberFormat().format(record[key])), 1 /* TEXT */))
|
|
5651
5547
|
: (_ctx.getFieldType(key) === 'money')
|
|
5652
|
-
? (openBlock(), createElementBlock("span",
|
|
5548
|
+
? (openBlock(), createElementBlock("span", _hoisted_59, "KES " + toDisplayString(Intl.NumberFormat().format(record[key])), 1 /* TEXT */))
|
|
5653
5549
|
: (_ctx.getFieldType(key) === 'date')
|
|
5654
|
-
? (openBlock(), createElementBlock("span",
|
|
5550
|
+
? (openBlock(), createElementBlock("span", _hoisted_60, toDisplayString(_ctx.formatDate(record[key])), 1 /* TEXT */))
|
|
5655
5551
|
: (typeof key === 'string')
|
|
5656
5552
|
? (openBlock(), createElementBlock("span", {
|
|
5657
5553
|
key: 4,
|
|
5658
5554
|
innerHTML: record[key]
|
|
5659
|
-
}, null, 8 /* PROPS */,
|
|
5555
|
+
}, null, 8 /* PROPS */, _hoisted_61))
|
|
5660
5556
|
: (typeof key === 'object' && key.component)
|
|
5661
5557
|
? (openBlock(), createBlock(resolveDynamicComponent(key.component), {
|
|
5662
5558
|
key: 5,
|
|
@@ -5666,88 +5562,29 @@ return (_ctx, _cache) => {
|
|
|
5666
5562
|
? (openBlock(), createElementBlock("span", {
|
|
5667
5563
|
key: 6,
|
|
5668
5564
|
innerHTML: record[key.key ?? key.field]
|
|
5669
|
-
}, null, 8 /* PROPS */,
|
|
5565
|
+
}, null, 8 /* PROPS */, _hoisted_62))
|
|
5670
5566
|
: (typeof key === 'function')
|
|
5671
5567
|
? (openBlock(), createElementBlock("span", {
|
|
5672
5568
|
key: 7,
|
|
5673
5569
|
innerHTML: key(record, index )
|
|
5674
|
-
}, null, 8 /* PROPS */,
|
|
5570
|
+
}, null, 8 /* PROPS */, _hoisted_63))
|
|
5675
5571
|
: (openBlock(), createElementBlock("span", {
|
|
5676
5572
|
key: 8,
|
|
5677
5573
|
innerHTML: record[key[0]]
|
|
5678
|
-
}, null, 8 /* PROPS */,
|
|
5574
|
+
}, null, 8 /* PROPS */, _hoisted_64))
|
|
5679
5575
|
]),
|
|
5680
|
-
|
|
5576
|
+
_hoisted_65
|
|
5681
5577
|
], 64 /* STABLE_FRAGMENT */))
|
|
5682
5578
|
}), 128 /* KEYED_FRAGMENT */)),
|
|
5683
5579
|
(__props.actions)
|
|
5684
|
-
? (openBlock(), createElementBlock("div",
|
|
5685
|
-
(
|
|
5686
|
-
|
|
5687
|
-
|
|
5688
|
-
|
|
5689
|
-
(!act.permission || unref(user).isAllowedTo(act.permission))
|
|
5690
|
-
? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
5691
|
-
(!act.validator || act.validator(record))
|
|
5692
|
-
? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
5693
|
-
(act.canvasId)
|
|
5694
|
-
? (openBlock(), createElementBlock("a", {
|
|
5695
|
-
key: 0,
|
|
5696
|
-
href: '#' + act.canvasId,
|
|
5697
|
-
"data-bs-toggle": "offcanvas",
|
|
5698
|
-
class: normalizeClass(act.class)
|
|
5699
|
-
}, [
|
|
5700
|
-
(act.icon)
|
|
5701
|
-
? (openBlock(), createElementBlock("span", {
|
|
5702
|
-
key: 0,
|
|
5703
|
-
class: normalizeClass(act.icon)
|
|
5704
|
-
}, null, 2 /* CLASS */))
|
|
5705
|
-
: createCommentVNode("v-if", true),
|
|
5706
|
-
createTextVNode(" " + toDisplayString(act.label), 1 /* TEXT */)
|
|
5707
|
-
], 10 /* CLASS, PROPS */, _hoisted_69))
|
|
5708
|
-
: (act.emits)
|
|
5709
|
-
? (openBlock(), createElementBlock("button", {
|
|
5710
|
-
key: 1,
|
|
5711
|
-
title: act.title,
|
|
5712
|
-
class: normalizeClass(act.class ? act.class:'btn btn-default'),
|
|
5713
|
-
onClick: $event => (_ctx.doEmitAction(act.emits,record))
|
|
5714
|
-
}, [
|
|
5715
|
-
(act.icon)
|
|
5716
|
-
? (openBlock(), createElementBlock("span", {
|
|
5717
|
-
key: 0,
|
|
5718
|
-
class: normalizeClass(act.icon)
|
|
5719
|
-
}, null, 2 /* CLASS */))
|
|
5720
|
-
: createCommentVNode("v-if", true),
|
|
5721
|
-
createTextVNode(" " + toDisplayString(act.label), 1 /* TEXT */)
|
|
5722
|
-
], 10 /* CLASS, PROPS */, _hoisted_70))
|
|
5723
|
-
: (!act.emits)
|
|
5724
|
-
? (openBlock(), createBlock(_component_router_link, {
|
|
5725
|
-
key: 2,
|
|
5726
|
-
title: act.title,
|
|
5727
|
-
to: _ctx.replaceActionUrl(act.path,record),
|
|
5728
|
-
class: normalizeClass(act.class)
|
|
5729
|
-
}, {
|
|
5730
|
-
default: withCtx(() => [
|
|
5731
|
-
(act.icon)
|
|
5732
|
-
? (openBlock(), createElementBlock("span", {
|
|
5733
|
-
key: 0,
|
|
5734
|
-
class: normalizeClass(act.icon)
|
|
5735
|
-
}, null, 2 /* CLASS */))
|
|
5736
|
-
: createCommentVNode("v-if", true),
|
|
5737
|
-
createTextVNode(" " + toDisplayString(act.label), 1 /* TEXT */)
|
|
5738
|
-
]),
|
|
5739
|
-
_: 2 /* DYNAMIC */
|
|
5740
|
-
}, 1032 /* PROPS, DYNAMIC_SLOTS */, ["title", "to", "class"]))
|
|
5741
|
-
: createCommentVNode("v-if", true)
|
|
5742
|
-
], 64 /* STABLE_FRAGMENT */))
|
|
5743
|
-
: createCommentVNode("v-if", true)
|
|
5744
|
-
], 64 /* STABLE_FRAGMENT */))
|
|
5745
|
-
: createCommentVNode("v-if", true)
|
|
5746
|
-
], 64 /* STABLE_FRAGMENT */))
|
|
5747
|
-
}), 128 /* KEYED_FRAGMENT */))
|
|
5580
|
+
? (openBlock(), createElementBlock("div", _hoisted_66, [
|
|
5581
|
+
createVNode(TableActions, {
|
|
5582
|
+
actions: __props.actions,
|
|
5583
|
+
record: record
|
|
5584
|
+
}, null, 8 /* PROPS */, ["actions", "record"])
|
|
5748
5585
|
]))
|
|
5749
5586
|
: createCommentVNode("v-if", true)
|
|
5750
|
-
], 8 /* PROPS */,
|
|
5587
|
+
], 8 /* PROPS */, _hoisted_53))
|
|
5751
5588
|
}), 128 /* KEYED_FRAGMENT */))
|
|
5752
5589
|
]))
|
|
5753
5590
|
: createCommentVNode("v-if", true)
|
|
@@ -5782,7 +5619,8 @@ return (_ctx, _cache) => {
|
|
|
5782
5619
|
(_ctx.selectedRecord)
|
|
5783
5620
|
? (openBlock(), createBlock(resolveDynamicComponent(action.canvasComponent), mergeProps({
|
|
5784
5621
|
key: 0,
|
|
5785
|
-
onRecordUpdated: _ctx.reloadData
|
|
5622
|
+
onRecordUpdated: _ctx.reloadData,
|
|
5623
|
+
ref_for: true
|
|
5786
5624
|
}, _ctx.cleanCanvasProps(action), { record: _ctx.selectedRecord }), null, 16 /* FULL_PROPS */, ["onRecordUpdated", "record"]))
|
|
5787
5625
|
: createCommentVNode("v-if", true)
|
|
5788
5626
|
]),
|