@realtek/core-theme 0.0.254 → 0.0.255
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-lib/index.cjs +2 -2
- package/dist-lib/index.cjs.map +1 -1
- package/dist-lib/index.js +47 -41
- package/dist-lib/index.js.map +1 -1
- package/package.json +1 -1
package/dist-lib/index.js
CHANGED
|
@@ -2922,7 +2922,9 @@ function $c(e) {
|
|
|
2922
2922
|
canView: Qc(t.view),
|
|
2923
2923
|
canAdd: Qc(t.add),
|
|
2924
2924
|
canEdit: Qc(t.edit),
|
|
2925
|
-
canDelete: Qc(t.delete)
|
|
2925
|
+
canDelete: Qc(t.delete),
|
|
2926
|
+
canApprove: Qc(t.approve),
|
|
2927
|
+
canReject: Qc(t.reject)
|
|
2926
2928
|
};
|
|
2927
2929
|
}, [e]);
|
|
2928
2930
|
}
|
|
@@ -15967,31 +15969,31 @@ function Fy({ value: e, disabled: t = !1, onChange: n, label: r = "Notes / Comme
|
|
|
15967
15969
|
})]
|
|
15968
15970
|
});
|
|
15969
15971
|
}
|
|
15970
|
-
function Iy({ status: e, loading: t = !1, readonly: n = !1, rejectionReason: r, rejectionMode: i = "modal", title: a = "Review Notes", hint: o = "Review comment is mandatory while rejecting", approveDisabled: s = !1, approveDisabledReason: c,
|
|
15971
|
-
let [
|
|
15972
|
+
function Iy({ status: e, loading: t = !1, readonly: n = !1, rejectionReason: r, rejectionMode: i = "modal", title: a = "Review Notes", hint: o = "Review comment is mandatory while rejecting", approveDisabled: s = !1, approveDisabledReason: c, rejectDisabled: l = !1, rejectDisabledReason: u, onSubmit: d, onApprove: f, onReject: p, onReopen: m }) {
|
|
15973
|
+
let [h, g] = R(!1), [_, v] = R(!1), [y, b] = R(""), x = [
|
|
15972
15974
|
"submitted",
|
|
15973
15975
|
"resubmitted",
|
|
15974
15976
|
"reopened",
|
|
15975
15977
|
"save_draft"
|
|
15976
|
-
].includes(e),
|
|
15977
|
-
|
|
15978
|
+
].includes(e), S = e === "rejected", C = e === "approved", w = e === "submitted" || e === "resubmitted", T = e === "reopened", E = !e || e === "draft" || e === "not_submitted", D = async (e) => {
|
|
15979
|
+
v(!0);
|
|
15978
15980
|
try {
|
|
15979
|
-
await
|
|
15981
|
+
await p?.(e), g(!1);
|
|
15980
15982
|
} finally {
|
|
15981
|
-
|
|
15983
|
+
v(!1);
|
|
15982
15984
|
}
|
|
15983
|
-
},
|
|
15985
|
+
}, O = () => hr.confirm({
|
|
15984
15986
|
title: "Reopen timesheet?",
|
|
15985
15987
|
content: "This returns the month to the resource to correct and re-submit. It cannot be reopened once its invoice or payment has been processed.",
|
|
15986
15988
|
okText: "Reopen",
|
|
15987
|
-
onOk:
|
|
15988
|
-
}),
|
|
15989
|
-
let e =
|
|
15989
|
+
onOk: m
|
|
15990
|
+
}), k = () => {
|
|
15991
|
+
let e = y.trim();
|
|
15990
15992
|
if (!e) {
|
|
15991
15993
|
J.error("A review comment is required to reject");
|
|
15992
15994
|
return;
|
|
15993
15995
|
}
|
|
15994
|
-
|
|
15996
|
+
p?.(e);
|
|
15995
15997
|
};
|
|
15996
15998
|
if (i === "inline") return /* @__PURE__ */ Z(nr, {
|
|
15997
15999
|
size: "small",
|
|
@@ -16012,34 +16014,38 @@ function Iy({ status: e, loading: t = !1, readonly: n = !1, rejectionReason: r,
|
|
|
16012
16014
|
]
|
|
16013
16015
|
})]
|
|
16014
16016
|
}),
|
|
16015
|
-
r &&
|
|
16017
|
+
r && S && /* @__PURE__ */ X(Zn, {
|
|
16016
16018
|
type: "error",
|
|
16017
16019
|
showIcon: !0,
|
|
16018
16020
|
message: "Rejected",
|
|
16019
16021
|
description: r,
|
|
16020
16022
|
className: "timesheet-review-notes-card__alert"
|
|
16021
16023
|
}),
|
|
16022
|
-
|
|
16024
|
+
w ? /* @__PURE__ */ Z(Y, { children: [/* @__PURE__ */ X(H.TextArea, {
|
|
16023
16025
|
rows: 3,
|
|
16024
16026
|
maxLength: 1e3,
|
|
16025
|
-
value:
|
|
16026
|
-
onChange: (e) =>
|
|
16027
|
+
value: y,
|
|
16028
|
+
onChange: (e) => b(e.target.value),
|
|
16027
16029
|
placeholder: "Add your note",
|
|
16028
16030
|
className: "timesheet-review-notes-card__input"
|
|
16029
16031
|
}), /* @__PURE__ */ Z("div", {
|
|
16030
16032
|
className: "timesheet-review-notes-card__actions",
|
|
16031
|
-
children: [/* @__PURE__ */ X(
|
|
16032
|
-
|
|
16033
|
-
|
|
16034
|
-
|
|
16035
|
-
|
|
16033
|
+
children: [/* @__PURE__ */ X(q, {
|
|
16034
|
+
title: l ? u : "",
|
|
16035
|
+
children: /* @__PURE__ */ X(z, {
|
|
16036
|
+
danger: !0,
|
|
16037
|
+
loading: t,
|
|
16038
|
+
disabled: l,
|
|
16039
|
+
onClick: k,
|
|
16040
|
+
children: "Reject"
|
|
16041
|
+
})
|
|
16036
16042
|
}), /* @__PURE__ */ X(q, {
|
|
16037
16043
|
title: s ? c : "",
|
|
16038
16044
|
children: /* @__PURE__ */ X(z, {
|
|
16039
16045
|
type: "primary",
|
|
16040
16046
|
loading: t,
|
|
16041
16047
|
disabled: s,
|
|
16042
|
-
onClick:
|
|
16048
|
+
onClick: f,
|
|
16043
16049
|
children: "Approve"
|
|
16044
16050
|
})
|
|
16045
16051
|
})]
|
|
@@ -16052,18 +16058,18 @@ function Iy({ status: e, loading: t = !1, readonly: n = !1, rejectionReason: r,
|
|
|
16052
16058
|
e,
|
|
16053
16059
|
"."
|
|
16054
16060
|
]
|
|
16055
|
-
}), (
|
|
16061
|
+
}), (C || S) && m ? /* @__PURE__ */ X(z, {
|
|
16056
16062
|
icon: /* @__PURE__ */ X(Ni, {}),
|
|
16057
16063
|
loading: t,
|
|
16058
|
-
onClick:
|
|
16064
|
+
onClick: O,
|
|
16059
16065
|
children: "Reopen"
|
|
16060
16066
|
}) : null]
|
|
16061
16067
|
})
|
|
16062
16068
|
]
|
|
16063
16069
|
});
|
|
16064
|
-
let
|
|
16065
|
-
return
|
|
16066
|
-
r &&
|
|
16070
|
+
let A = "Submit", j = !1;
|
|
16071
|
+
return w && (A = e === "resubmitted" ? "Re-Submitted" : "Submitted", j = !0), (S || T) && (A = "Re-Submit", j = !1), C && (A = "Approved", j = !0), /* @__PURE__ */ Z(Y, { children: [
|
|
16072
|
+
r && S && /* @__PURE__ */ X(Zn, {
|
|
16067
16073
|
type: "error",
|
|
16068
16074
|
showIcon: !0,
|
|
16069
16075
|
message: "Rejected",
|
|
@@ -16073,41 +16079,41 @@ function Iy({ status: e, loading: t = !1, readonly: n = !1, rejectionReason: r,
|
|
|
16073
16079
|
/* @__PURE__ */ Z("div", {
|
|
16074
16080
|
className: "timesheet-action-bar",
|
|
16075
16081
|
children: [
|
|
16076
|
-
(
|
|
16082
|
+
(E || S || T || w || C) && d && /* @__PURE__ */ X(Cu, {
|
|
16077
16083
|
variant: "primary",
|
|
16078
16084
|
icon: /* @__PURE__ */ X(sa, {}),
|
|
16079
16085
|
loading: t,
|
|
16080
|
-
disabled:
|
|
16081
|
-
onClick:
|
|
16086
|
+
disabled: j,
|
|
16087
|
+
onClick: j ? void 0 : d,
|
|
16082
16088
|
block: !0,
|
|
16083
|
-
children:
|
|
16089
|
+
children: A
|
|
16084
16090
|
}),
|
|
16085
|
-
|
|
16091
|
+
x && f && /* @__PURE__ */ X(Cu, {
|
|
16086
16092
|
variant: "primary",
|
|
16087
16093
|
icon: /* @__PURE__ */ X(Yr, {}),
|
|
16088
16094
|
loading: t,
|
|
16089
|
-
onClick:
|
|
16095
|
+
onClick: f,
|
|
16090
16096
|
children: "Approve"
|
|
16091
16097
|
}),
|
|
16092
|
-
|
|
16098
|
+
x && p && /* @__PURE__ */ X(z, {
|
|
16093
16099
|
danger: !0,
|
|
16094
16100
|
loading: t,
|
|
16095
|
-
onClick: () =>
|
|
16101
|
+
onClick: () => g(!0),
|
|
16096
16102
|
children: "Reject"
|
|
16097
16103
|
}),
|
|
16098
|
-
(
|
|
16104
|
+
(C || S) && m && /* @__PURE__ */ X(z, {
|
|
16099
16105
|
icon: /* @__PURE__ */ X(Ni, {}),
|
|
16100
16106
|
loading: t,
|
|
16101
|
-
onClick:
|
|
16107
|
+
onClick: O,
|
|
16102
16108
|
children: "Reopen"
|
|
16103
16109
|
})
|
|
16104
16110
|
]
|
|
16105
16111
|
}),
|
|
16106
16112
|
/* @__PURE__ */ X(My, {
|
|
16107
|
-
open:
|
|
16108
|
-
loading:
|
|
16109
|
-
onSave:
|
|
16110
|
-
onCancel: () =>
|
|
16113
|
+
open: h,
|
|
16114
|
+
loading: _,
|
|
16115
|
+
onSave: D,
|
|
16116
|
+
onCancel: () => g(!1)
|
|
16111
16117
|
})
|
|
16112
16118
|
] });
|
|
16113
16119
|
}
|