@jingx/lottery-components-react-jsx 1.0.29 → 1.0.31
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/index.cjs.js +171 -108
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +172 -109
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -32117,8 +32117,8 @@ function transformPostCode(posts, postCodeMap) {
|
|
|
32117
32117
|
}
|
|
32118
32118
|
|
|
32119
32119
|
var __defProp$a = Object.defineProperty;
|
|
32120
|
-
var __defProps$
|
|
32121
|
-
var __getOwnPropDescs$
|
|
32120
|
+
var __defProps$3 = Object.defineProperties;
|
|
32121
|
+
var __getOwnPropDescs$3 = Object.getOwnPropertyDescriptors;
|
|
32122
32122
|
var __getOwnPropSymbols$b = Object.getOwnPropertySymbols;
|
|
32123
32123
|
var __hasOwnProp$b = Object.prototype.hasOwnProperty;
|
|
32124
32124
|
var __propIsEnum$b = Object.prototype.propertyIsEnumerable;
|
|
@@ -32134,7 +32134,7 @@ var __spreadValues$a = (a, b) => {
|
|
|
32134
32134
|
}
|
|
32135
32135
|
return a;
|
|
32136
32136
|
};
|
|
32137
|
-
var __spreadProps$
|
|
32137
|
+
var __spreadProps$3 = (a, b) => __defProps$3(a, __getOwnPropDescs$3(b));
|
|
32138
32138
|
const KPPostCode = {
|
|
32139
32139
|
A: "\u179B\u17E1",
|
|
32140
32140
|
F: "\u179B\u17E2",
|
|
@@ -32193,7 +32193,7 @@ const lotteryLabel = {
|
|
|
32193
32193
|
HOSO: "\u1786\u17D2\u1793\u17C4\u178F HOSO",
|
|
32194
32194
|
KP: "\u1780\u17C6\u1796\u178F KP"
|
|
32195
32195
|
};
|
|
32196
|
-
const lotteryLabelVN = __spreadProps$
|
|
32196
|
+
const lotteryLabelVN = __spreadProps$3(__spreadValues$a({}, lotteryLabel), {
|
|
32197
32197
|
VN1: "\u1786\u17D2\u1793\u17C4\u178F\u1799\u17BD\u1793",
|
|
32198
32198
|
TN: "\u1786\u17D2\u1793\u17C4\u178F\u1799\u17BD\u1793",
|
|
32199
32199
|
KH: "\u1786\u17D2\u1793\u17C4\u178F\u1781\u17D2\u1798\u17C2\u179A"
|
|
@@ -38761,7 +38761,7 @@ const ProtestTicket = ({
|
|
|
38761
38761
|
});
|
|
38762
38762
|
};
|
|
38763
38763
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(ScopeHost, { children: /* @__PURE__ */ jsxRuntimeExports.jsx("table", { id: "transfer-ticket-58", className: "print-tb-58-1", cellPadding: "7px", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("tbody", { children: [
|
|
38764
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("tr", { style: { lineHeight: "35px" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
38764
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("tr", { style: { lineHeight: "35px" }, className: "no-hover", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
38765
38765
|
RenderTitle,
|
|
38766
38766
|
{
|
|
38767
38767
|
className: "text-center ticket-logo pt-2 mt-1 p-0",
|
|
@@ -38771,8 +38771,8 @@ const ProtestTicket = ({
|
|
|
38771
38771
|
logo
|
|
38772
38772
|
}
|
|
38773
38773
|
) }),
|
|
38774
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("tr", { children: /* @__PURE__ */ jsxRuntimeExports.jsx("td", { className: "p-0 pt-2", colSpan: 3, children: /* @__PURE__ */ jsxRuntimeExports.jsx("hr", { className: "border-top-ticket" }) }) }),
|
|
38775
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("tr", { children: /* @__PURE__ */ jsxRuntimeExports.jsx("td", { className: "p-0 pt-2 text-black font-weight-bold", colSpan: 3, children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "text-center", children: [
|
|
38774
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("tr", { className: "no-hover", children: /* @__PURE__ */ jsxRuntimeExports.jsx("td", { className: "p-0 pt-2", colSpan: 3, children: /* @__PURE__ */ jsxRuntimeExports.jsx("hr", { className: "border-top-ticket" }) }) }),
|
|
38775
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("tr", { className: "no-hover", children: /* @__PURE__ */ jsxRuntimeExports.jsx("td", { className: "p-0 pt-2 text-black font-weight-bold", colSpan: 3, children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "text-center", children: [
|
|
38776
38776
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "f-16", children: [
|
|
38777
38777
|
object == null ? void 0 : object.username,
|
|
38778
38778
|
" / #",
|
|
@@ -38780,8 +38780,8 @@ const ProtestTicket = ({
|
|
|
38780
38780
|
] }),
|
|
38781
38781
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "f-16", children: getDateTime(object == null ? void 0 : object.drawAt) })
|
|
38782
38782
|
] }) }) }),
|
|
38783
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("tr", { children: /* @__PURE__ */ jsxRuntimeExports.jsx("td", { className: "p-0 pb-2", colSpan: 3, children: /* @__PURE__ */ jsxRuntimeExports.jsx("hr", { className: "border-top-ticket" }) }) }),
|
|
38784
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("tr", { children: /* @__PURE__ */ jsxRuntimeExports.jsx("td", { colSpan: 3, className: "p-0 text-left", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("label", { className: "m-0 d-inline-flex align-items-center text-black", children: [
|
|
38783
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("tr", { className: "no-hover", children: /* @__PURE__ */ jsxRuntimeExports.jsx("td", { className: "p-0 pb-2", colSpan: 3, children: /* @__PURE__ */ jsxRuntimeExports.jsx("hr", { className: "border-top-ticket" }) }) }),
|
|
38784
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("tr", { className: "no-hover", children: /* @__PURE__ */ jsxRuntimeExports.jsx("td", { colSpan: 3, className: "p-0 text-left", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("label", { className: "m-0 d-inline-flex align-items-center text-black", children: [
|
|
38785
38785
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
38786
38786
|
"input",
|
|
38787
38787
|
{
|
|
@@ -38795,7 +38795,7 @@ const ProtestTicket = ({
|
|
|
38795
38795
|
),
|
|
38796
38796
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "ml-2 f-16", children: "Check all" })
|
|
38797
38797
|
] }) }) }),
|
|
38798
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("tr", { children: /* @__PURE__ */ jsxRuntimeExports.jsx("td", { colSpan: 3, className: "p-0", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
38798
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("tr", { className: "no-hover", children: /* @__PURE__ */ jsxRuntimeExports.jsx("td", { colSpan: 3, className: "p-0", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
38799
38799
|
PrintTicket58,
|
|
38800
38800
|
{
|
|
38801
38801
|
isNight,
|
|
@@ -38808,7 +38808,7 @@ const ProtestTicket = ({
|
|
|
38808
38808
|
isProtest
|
|
38809
38809
|
}
|
|
38810
38810
|
) }) }),
|
|
38811
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("tr", { children: /* @__PURE__ */ jsxRuntimeExports.jsx("td", { colSpan: 3, children: /* @__PURE__ */ jsxRuntimeExports.jsx("hr", { className: "border-top-ticket" }) }) })
|
|
38811
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("tr", { className: "no-hover", children: /* @__PURE__ */ jsxRuntimeExports.jsx("td", { colSpan: 3, children: /* @__PURE__ */ jsxRuntimeExports.jsx("hr", { className: "border-top-ticket" }) }) })
|
|
38812
38812
|
] }) }) });
|
|
38813
38813
|
};
|
|
38814
38814
|
|
|
@@ -38875,8 +38875,8 @@ const BasePrinter = (_a) => {
|
|
|
38875
38875
|
};
|
|
38876
38876
|
|
|
38877
38877
|
var __defProp$8 = Object.defineProperty;
|
|
38878
|
-
var __defProps$
|
|
38879
|
-
var __getOwnPropDescs$
|
|
38878
|
+
var __defProps$2 = Object.defineProperties;
|
|
38879
|
+
var __getOwnPropDescs$2 = Object.getOwnPropertyDescriptors;
|
|
38880
38880
|
var __getOwnPropSymbols$8 = Object.getOwnPropertySymbols;
|
|
38881
38881
|
var __hasOwnProp$8 = Object.prototype.hasOwnProperty;
|
|
38882
38882
|
var __propIsEnum$8 = Object.prototype.propertyIsEnumerable;
|
|
@@ -38892,7 +38892,7 @@ var __spreadValues$8 = (a, b) => {
|
|
|
38892
38892
|
}
|
|
38893
38893
|
return a;
|
|
38894
38894
|
};
|
|
38895
|
-
var __spreadProps$
|
|
38895
|
+
var __spreadProps$2 = (a, b) => __defProps$2(a, __getOwnPropDescs$2(b));
|
|
38896
38896
|
var __objRest$4 = (source, exclude) => {
|
|
38897
38897
|
var target = {};
|
|
38898
38898
|
for (var prop in source)
|
|
@@ -38909,7 +38909,7 @@ const Printer = (_a) => {
|
|
|
38909
38909
|
var _b = _a, { children } = _b, props = __objRest$4(_b, ["children"]);
|
|
38910
38910
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
38911
38911
|
BasePrinter,
|
|
38912
|
-
__spreadProps$
|
|
38912
|
+
__spreadProps$2(__spreadValues$8({
|
|
38913
38913
|
component: /* @__PURE__ */ jsxRuntimeExports.jsx(Ticket, __spreadValues$8({}, props))
|
|
38914
38914
|
}, props), {
|
|
38915
38915
|
children: children != null ? children : /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "btn btn-primary", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
@@ -47171,8 +47171,8 @@ const PostTable = React.memo(({ data = [], fallbackTwo = "", fallbackThree = "",
|
|
|
47171
47171
|
});
|
|
47172
47172
|
|
|
47173
47173
|
var __defProp$5 = Object.defineProperty;
|
|
47174
|
-
var __defProps = Object.defineProperties;
|
|
47175
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
47174
|
+
var __defProps$1 = Object.defineProperties;
|
|
47175
|
+
var __getOwnPropDescs$1 = Object.getOwnPropertyDescriptors;
|
|
47176
47176
|
var __getOwnPropSymbols$5 = Object.getOwnPropertySymbols;
|
|
47177
47177
|
var __hasOwnProp$5 = Object.prototype.hasOwnProperty;
|
|
47178
47178
|
var __propIsEnum$5 = Object.prototype.propertyIsEnumerable;
|
|
@@ -47188,8 +47188,8 @@ var __spreadValues$5 = (a, b) => {
|
|
|
47188
47188
|
}
|
|
47189
47189
|
return a;
|
|
47190
47190
|
};
|
|
47191
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
47192
|
-
const loCellStyle = __spreadProps(__spreadValues$5({}, baseCellStyle), {
|
|
47191
|
+
var __spreadProps$1 = (a, b) => __defProps$1(a, __getOwnPropDescs$1(b));
|
|
47192
|
+
const loCellStyle = __spreadProps$1(__spreadValues$5({}, baseCellStyle), {
|
|
47193
47193
|
width: "200px"
|
|
47194
47194
|
});
|
|
47195
47195
|
const LoTable = React.memo(({ LO = [], columnsCount = 3, showHeader = false }) => {
|
|
@@ -47201,7 +47201,7 @@ const LoTable = React.memo(({ LO = [], columnsCount = 3, showHeader = false }) =
|
|
|
47201
47201
|
"th",
|
|
47202
47202
|
{
|
|
47203
47203
|
className: "text-black text-center bg-light-red",
|
|
47204
|
-
style: __spreadProps(__spreadValues$5({}, loCellStyle), { fontSize: "16px" }),
|
|
47204
|
+
style: __spreadProps$1(__spreadValues$5({}, loCellStyle), { fontSize: "16px" }),
|
|
47205
47205
|
children: KPLO[col.columnNumber]
|
|
47206
47206
|
},
|
|
47207
47207
|
idx
|
|
@@ -59059,7 +59059,7 @@ var __objRest$2 = (source, exclude) => {
|
|
|
59059
59059
|
const DEFAULT_API_BASE_URL$3 = "https://api-web.dev.lottery.aazz168.com/";
|
|
59060
59060
|
function DeleteModal(_a) {
|
|
59061
59061
|
var _b = _a, {
|
|
59062
|
-
|
|
59062
|
+
ticket,
|
|
59063
59063
|
isOpen = false,
|
|
59064
59064
|
onClose,
|
|
59065
59065
|
onChange,
|
|
@@ -59070,7 +59070,7 @@ function DeleteModal(_a) {
|
|
|
59070
59070
|
accessToken,
|
|
59071
59071
|
isRemoveReason
|
|
59072
59072
|
} = _b; __objRest$2(_b, [
|
|
59073
|
-
"
|
|
59073
|
+
"ticket",
|
|
59074
59074
|
"isOpen",
|
|
59075
59075
|
"onClose",
|
|
59076
59076
|
"onChange",
|
|
@@ -59092,7 +59092,7 @@ function DeleteModal(_a) {
|
|
|
59092
59092
|
"X-DeviceType": "WEB"
|
|
59093
59093
|
}, token ? { Authorization: `Bearer ${token}` } : {});
|
|
59094
59094
|
React.useEffect(() => {
|
|
59095
|
-
if (!
|
|
59095
|
+
if (!ticket) return void 0;
|
|
59096
59096
|
setSelectedReason(null);
|
|
59097
59097
|
const fetchReasons = async () => {
|
|
59098
59098
|
var _a2, _b2, _c;
|
|
@@ -59121,7 +59121,7 @@ function DeleteModal(_a) {
|
|
|
59121
59121
|
}
|
|
59122
59122
|
};
|
|
59123
59123
|
fetchReasons();
|
|
59124
|
-
}, [Env.REACT_APP_API_BASE_URL, Env.REACT_APP_BASIC_TOKEN,
|
|
59124
|
+
}, [Env.REACT_APP_API_BASE_URL, Env.REACT_APP_BASIC_TOKEN, ticket]);
|
|
59125
59125
|
const handleReasonChange = (option) => {
|
|
59126
59126
|
setSelectedReason(option);
|
|
59127
59127
|
if (typeof onChange === "function") {
|
|
@@ -59140,8 +59140,8 @@ function DeleteModal(_a) {
|
|
|
59140
59140
|
try {
|
|
59141
59141
|
setIsSubmitting(true);
|
|
59142
59142
|
const payload = {
|
|
59143
|
-
lotteryType:
|
|
59144
|
-
ticketNumber:
|
|
59143
|
+
lotteryType: ticket == null ? void 0 : ticket.lotteryType,
|
|
59144
|
+
ticketNumber: ticket == null ? void 0 : ticket.ticketNumber,
|
|
59145
59145
|
message: (_a2 = selectedReason == null ? void 0 : selectedReason.value) != null ? _a2 : ""
|
|
59146
59146
|
};
|
|
59147
59147
|
const res = await axios$1.delete(
|
|
@@ -59172,58 +59172,71 @@ function DeleteModal(_a) {
|
|
|
59172
59172
|
setIsSubmitting(false);
|
|
59173
59173
|
}
|
|
59174
59174
|
};
|
|
59175
|
-
if (!
|
|
59176
|
-
|
|
59177
|
-
|
|
59178
|
-
|
|
59179
|
-
|
|
59180
|
-
|
|
59181
|
-
|
|
59182
|
-
|
|
59183
|
-
|
|
59184
|
-
|
|
59185
|
-
|
|
59186
|
-
|
|
59187
|
-
|
|
59188
|
-
|
|
59189
|
-
|
|
59190
|
-
|
|
59191
|
-
|
|
59192
|
-
style: { width: 110, height: 110, marginTop: 20, marginBottom: 0 }
|
|
59193
|
-
}
|
|
59194
|
-
) }),
|
|
59195
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "f-25 text-center mb-2", style: { color: "#000000a6" }, children: "\u178F\u17BE\u17A2\u17D2\u1793\u1780\u1794\u17D2\u179A\u17B6\u1780\u178A\u17AC\u17A2\u178F\u17CB?" }),
|
|
59196
|
-
isRemoveReason && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
59197
|
-
StateManagedSelect$1,
|
|
59198
|
-
{
|
|
59199
|
-
options,
|
|
59200
|
-
value: selectedReason,
|
|
59201
|
-
isLoading,
|
|
59202
|
-
isDisabled: isLoading || isSubmitting || externalSubmitting,
|
|
59203
|
-
onChange: handleReasonChange,
|
|
59204
|
-
placeholder: "\u1798\u17BC\u179B\u17A0\u17C1\u178F\u17BB \u179B\u17BB\u1794..."
|
|
59205
|
-
}
|
|
59206
|
-
) }),
|
|
59207
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "my-3 d-flex justify-content-center", children: [
|
|
59208
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("button", { type: "button", className: "btn-cancel", onClick: onClose, children: "\u1791\u17C1" }),
|
|
59209
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
59210
|
-
"button",
|
|
59175
|
+
if (!ticket) return null;
|
|
59176
|
+
console.log(ticket, "ticket");
|
|
59177
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(ScopeHost, { children: (container) => {
|
|
59178
|
+
var _a2, _b2;
|
|
59179
|
+
return container && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
59180
|
+
Modal,
|
|
59181
|
+
{
|
|
59182
|
+
isOpen,
|
|
59183
|
+
toggle: onClose,
|
|
59184
|
+
container,
|
|
59185
|
+
backdropClassName: "modal-backdrop",
|
|
59186
|
+
modalClassName: "modal scroll-modal",
|
|
59187
|
+
contentClassName: "",
|
|
59188
|
+
style: { width: 380 },
|
|
59189
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(ModalBody, { className: "d-inline-flex justify-content-center p-0 font-Hanuman", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "w-75", children: [
|
|
59190
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-center", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
59191
|
+
FeatherIcon,
|
|
59211
59192
|
{
|
|
59212
|
-
|
|
59213
|
-
className: "
|
|
59214
|
-
|
|
59215
|
-
disabled: isLoading || isSubmitting || externalSubmitting,
|
|
59216
|
-
children: "\u1794\u17B6\u1791/\u1785\u17B6\u179F\u17CE"
|
|
59193
|
+
icon: "alert-circle",
|
|
59194
|
+
className: "text-warning px-1",
|
|
59195
|
+
style: { width: 110, height: 110, marginTop: 20, marginBottom: 0 }
|
|
59217
59196
|
}
|
|
59218
|
-
)
|
|
59219
|
-
|
|
59220
|
-
|
|
59221
|
-
|
|
59222
|
-
|
|
59197
|
+
) }),
|
|
59198
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "f-25 text-center mb-0", style: { color: "#000000a6" }, children: "\u178F\u17BE\u17A2\u17D2\u1793\u1780\u1794\u17D2\u179A\u17B6\u1780\u178A\u17AC\u17A2\u178F\u17CB?" }),
|
|
59199
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "f-14 text-center mb-2 text-danger", children: [
|
|
59200
|
+
"\u179B\u17BB\u1794\u179F\u17C6\u1794\u17BB\u178F\u17D2\u179A #",
|
|
59201
|
+
ticket.ticketNumber,
|
|
59202
|
+
" = ",
|
|
59203
|
+
moneyFormatter((_a2 = ticket.totalKhr) == null ? void 0 : _a2.betAmount, "KHR"),
|
|
59204
|
+
"/",
|
|
59205
|
+
moneyFormatter((_b2 = ticket.totalUsd) == null ? void 0 : _b2.betAmount, "USD")
|
|
59206
|
+
] }),
|
|
59207
|
+
isRemoveReason && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
59208
|
+
StateManagedSelect$1,
|
|
59209
|
+
{
|
|
59210
|
+
options,
|
|
59211
|
+
value: selectedReason,
|
|
59212
|
+
isLoading,
|
|
59213
|
+
isDisabled: isLoading || isSubmitting || externalSubmitting,
|
|
59214
|
+
onChange: handleReasonChange,
|
|
59215
|
+
placeholder: "\u1798\u17BC\u179B\u17A0\u17C1\u178F\u17BB \u179B\u17BB\u1794..."
|
|
59216
|
+
}
|
|
59217
|
+
) }),
|
|
59218
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "my-3 d-flex justify-content-center", children: [
|
|
59219
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("button", { type: "button", className: "btn-cancel", onClick: onClose, children: "\u1791\u17C1" }),
|
|
59220
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
59221
|
+
"button",
|
|
59222
|
+
{
|
|
59223
|
+
type: "button",
|
|
59224
|
+
className: "btn-confirm ml-3",
|
|
59225
|
+
onClick: handleConfirm,
|
|
59226
|
+
disabled: isLoading || isSubmitting || externalSubmitting,
|
|
59227
|
+
children: "\u1794\u17B6\u1791/\u1785\u17B6\u179F\u17CE"
|
|
59228
|
+
}
|
|
59229
|
+
)
|
|
59230
|
+
] })
|
|
59231
|
+
] }) })
|
|
59232
|
+
}
|
|
59233
|
+
);
|
|
59234
|
+
} });
|
|
59223
59235
|
}
|
|
59224
59236
|
DeleteModal.propTypes = {
|
|
59225
|
-
|
|
59237
|
+
ticket: PropTypes$2.object,
|
|
59226
59238
|
isOpen: PropTypes$2.bool,
|
|
59239
|
+
isRemoveReason: PropTypes$2.bool.isRequired,
|
|
59227
59240
|
onClose: PropTypes$2.func.isRequired,
|
|
59228
59241
|
Env: PropTypes$2.object.isRequired,
|
|
59229
59242
|
accessToken: PropTypes$2.string.isRequired
|
|
@@ -59250,7 +59263,7 @@ function DeleteTicketButton(props) {
|
|
|
59250
59263
|
id,
|
|
59251
59264
|
onOpen,
|
|
59252
59265
|
Env,
|
|
59253
|
-
|
|
59266
|
+
ticket,
|
|
59254
59267
|
onClose,
|
|
59255
59268
|
accessToken,
|
|
59256
59269
|
onChange,
|
|
@@ -59298,7 +59311,7 @@ function DeleteTicketButton(props) {
|
|
|
59298
59311
|
DeleteModal,
|
|
59299
59312
|
{
|
|
59300
59313
|
Env,
|
|
59301
|
-
|
|
59314
|
+
ticket,
|
|
59302
59315
|
isOpen,
|
|
59303
59316
|
onClose: handleClose,
|
|
59304
59317
|
accessToken,
|
|
@@ -59314,7 +59327,7 @@ DeleteTicketButton.propTypes = {
|
|
|
59314
59327
|
id: PropTypes$2.string.isRequired,
|
|
59315
59328
|
onOpen: PropTypes$2.func.isRequired,
|
|
59316
59329
|
Env: PropTypes$2.object.isRequired,
|
|
59317
|
-
|
|
59330
|
+
ticket: PropTypes$2.object,
|
|
59318
59331
|
onClose: PropTypes$2.func.isRequired,
|
|
59319
59332
|
isOpen: PropTypes$2.bool,
|
|
59320
59333
|
isRemoveReason: PropTypes$2.bool.isRequired,
|
|
@@ -59619,6 +59632,7 @@ const DEFAULT_API_BASE_URL$1 = "https://api-web.dev.lottery.aazz168.com/";
|
|
|
59619
59632
|
function RemarkModal(_a) {
|
|
59620
59633
|
var _b = _a, {
|
|
59621
59634
|
object,
|
|
59635
|
+
ticket,
|
|
59622
59636
|
onClose,
|
|
59623
59637
|
onChange,
|
|
59624
59638
|
onSuccess,
|
|
@@ -59628,6 +59642,7 @@ function RemarkModal(_a) {
|
|
|
59628
59642
|
accessToken
|
|
59629
59643
|
} = _b; __objRest$1(_b, [
|
|
59630
59644
|
"object",
|
|
59645
|
+
"ticket",
|
|
59631
59646
|
"onClose",
|
|
59632
59647
|
"onChange",
|
|
59633
59648
|
"onSuccess",
|
|
@@ -59639,6 +59654,10 @@ function RemarkModal(_a) {
|
|
|
59639
59654
|
const [remark, setRemark] = React.useState("");
|
|
59640
59655
|
const [loadError, setLoadError] = React.useState("");
|
|
59641
59656
|
const [isSubmitting, setIsSubmitting] = React.useState(false);
|
|
59657
|
+
React.useEffect(() => {
|
|
59658
|
+
var _a2;
|
|
59659
|
+
setRemark((_a2 = ticket == null ? void 0 : ticket.remark) != null ? _a2 : "");
|
|
59660
|
+
}, [ticket]);
|
|
59642
59661
|
const token = accessToken || localStorage.getItem("accessToken") || sessionStorage.getItem("accessToken");
|
|
59643
59662
|
const headers = __spreadValues$1({
|
|
59644
59663
|
"Content-Type": "application/json",
|
|
@@ -59657,7 +59676,7 @@ function RemarkModal(_a) {
|
|
|
59657
59676
|
}
|
|
59658
59677
|
};
|
|
59659
59678
|
const handleConfirm = async () => {
|
|
59660
|
-
var _a2, _b2;
|
|
59679
|
+
var _a2, _b2, _c;
|
|
59661
59680
|
if (!remark) return setLoadError("\u179F\u17BC\u1798\u1794\u1789\u17D2\u1785\u17BC\u179B\u1780\u17C6\u178E\u178F\u17CB\u179F\u1798\u17D2\u1782\u17B6\u179B\u17CB!");
|
|
59662
59681
|
try {
|
|
59663
59682
|
setIsSubmitting(true);
|
|
@@ -59676,9 +59695,13 @@ function RemarkModal(_a) {
|
|
|
59676
59695
|
if (typeof onSuccess === "function") {
|
|
59677
59696
|
onSuccess(res.data, payload);
|
|
59678
59697
|
}
|
|
59698
|
+
PNotify_1.alert({
|
|
59699
|
+
text: ((_a2 = res.data) == null ? void 0 : _a2.message) || "\u179F\u1798\u17D2\u1782\u17B6\u179B\u17CB\u179F\u17C6\u1794\u17BB\u178F\u17D2\u179A\u1787\u17C4\u1782\u1787\u17D0\u1799 !",
|
|
59700
|
+
type: "success"
|
|
59701
|
+
});
|
|
59679
59702
|
onClose == null ? void 0 : onClose();
|
|
59680
59703
|
} catch (err) {
|
|
59681
|
-
const message = ((
|
|
59704
|
+
const message = ((_c = (_b2 = err.response) == null ? void 0 : _b2.data) == null ? void 0 : _c.message) || err.message || "\u1780\u17C6\u178E\u178F\u17CB\u179F\u1798\u17D2\u1782\u17B6\u179B\u17CB\u1794\u179A\u17B6\u1787\u17D0\u1799 !";
|
|
59682
59705
|
setLoadError(message);
|
|
59683
59706
|
if (typeof onError === "function") {
|
|
59684
59707
|
onError(err);
|
|
@@ -59740,12 +59763,15 @@ function RemarkModal(_a) {
|
|
|
59740
59763
|
}
|
|
59741
59764
|
RemarkModal.propTypes = {
|
|
59742
59765
|
object: PropTypes$2.object,
|
|
59766
|
+
ticket: PropTypes$2.object,
|
|
59743
59767
|
onClose: PropTypes$2.func.isRequired,
|
|
59744
59768
|
Env: PropTypes$2.object.isRequired,
|
|
59745
59769
|
accessToken: PropTypes$2.string.isRequired
|
|
59746
59770
|
};
|
|
59747
59771
|
|
|
59748
59772
|
var __defProp = Object.defineProperty;
|
|
59773
|
+
var __defProps = Object.defineProperties;
|
|
59774
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
59749
59775
|
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
59750
59776
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
59751
59777
|
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
@@ -59761,6 +59787,7 @@ var __spreadValues = (a, b) => {
|
|
|
59761
59787
|
}
|
|
59762
59788
|
return a;
|
|
59763
59789
|
};
|
|
59790
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
59764
59791
|
var __objRest = (source, exclude) => {
|
|
59765
59792
|
var target = {};
|
|
59766
59793
|
for (var prop in source)
|
|
@@ -59790,8 +59817,9 @@ function MoreMenu(_a) {
|
|
|
59790
59817
|
isSubmitting: externalSubmitting = false,
|
|
59791
59818
|
accessToken,
|
|
59792
59819
|
openCallback,
|
|
59793
|
-
closeCallback
|
|
59794
|
-
|
|
59820
|
+
closeCallback,
|
|
59821
|
+
DropdownButton
|
|
59822
|
+
} = _b, props = __objRest(_b, [
|
|
59795
59823
|
"id",
|
|
59796
59824
|
"object",
|
|
59797
59825
|
"ticket",
|
|
@@ -59806,13 +59834,16 @@ function MoreMenu(_a) {
|
|
|
59806
59834
|
"isSubmitting",
|
|
59807
59835
|
"accessToken",
|
|
59808
59836
|
"openCallback",
|
|
59809
|
-
"closeCallback"
|
|
59837
|
+
"closeCallback",
|
|
59838
|
+
"DropdownButton"
|
|
59810
59839
|
]);
|
|
59840
|
+
var _a2, _b2;
|
|
59811
59841
|
const [activeModal, setActiveModal] = React.useState(null);
|
|
59812
59842
|
const [isPaid, setIsPaid] = React.useState(Boolean(ticket == null ? void 0 : ticket.isPaid));
|
|
59813
59843
|
const [isPayout, setIsPayout] = React.useState(Boolean(ticket == null ? void 0 : ticket.isPayout));
|
|
59814
59844
|
const [isLoadingPaid, setLoadingPaid] = React.useState(false);
|
|
59815
59845
|
const [isLoadingPayout, setLoadingPayout] = React.useState(false);
|
|
59846
|
+
const isShowPayout = ((_a2 = ticket == null ? void 0 : ticket.totalKhr) == null ? void 0 : _a2.winAmount) > 0 || ((_b2 = ticket == null ? void 0 : ticket.totalUsd) == null ? void 0 : _b2.winAmount) > 0;
|
|
59816
59847
|
React.useEffect(() => {
|
|
59817
59848
|
setIsPaid(Boolean(ticket == null ? void 0 : ticket.isPaid));
|
|
59818
59849
|
setIsPayout(Boolean(ticket == null ? void 0 : ticket.isPayout));
|
|
@@ -59838,7 +59869,7 @@ function MoreMenu(_a) {
|
|
|
59838
59869
|
};
|
|
59839
59870
|
const createToggleHandler = ({ setValue, setLoading, successCallback, endpoint, failureMessage, successMessage }) => {
|
|
59840
59871
|
return async (event) => {
|
|
59841
|
-
var
|
|
59872
|
+
var _a3, _b3, _c, _d, _e;
|
|
59842
59873
|
const nextChecked = event.target.checked;
|
|
59843
59874
|
const previousValue = !nextChecked;
|
|
59844
59875
|
if (!ticket || !object) {
|
|
@@ -59848,8 +59879,8 @@ function MoreMenu(_a) {
|
|
|
59848
59879
|
setLoading(true);
|
|
59849
59880
|
setValue(nextChecked);
|
|
59850
59881
|
const payload = {
|
|
59851
|
-
lotteryType: (
|
|
59852
|
-
ticketNumber: (
|
|
59882
|
+
lotteryType: (_a3 = object == null ? void 0 : object.lotteryType) != null ? _a3 : ticket == null ? void 0 : ticket.lotteryType,
|
|
59883
|
+
ticketNumber: (_b3 = object == null ? void 0 : object.ticketNumber) != null ? _b3 : ticket == null ? void 0 : ticket.ticketNumber,
|
|
59853
59884
|
status: nextChecked
|
|
59854
59885
|
};
|
|
59855
59886
|
const res = await axios$1.post(
|
|
@@ -59894,28 +59925,55 @@ function MoreMenu(_a) {
|
|
|
59894
59925
|
failureMessage: "Failed to mark as payout.",
|
|
59895
59926
|
successMessage: "Marked as payout successfully."
|
|
59896
59927
|
});
|
|
59928
|
+
const toggleProps = {
|
|
59929
|
+
id,
|
|
59930
|
+
tag: "button",
|
|
59931
|
+
type: "button",
|
|
59932
|
+
caret: false,
|
|
59933
|
+
className: "border-0 p-2 rounded mb-1",
|
|
59934
|
+
style: { background: "#6c757d8f" }
|
|
59935
|
+
};
|
|
59936
|
+
const defaultToggleContent = /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
59937
|
+
FeatherIcon,
|
|
59938
|
+
{
|
|
59939
|
+
icon: "more-horizontal",
|
|
59940
|
+
className: "f-16 text-white px-1",
|
|
59941
|
+
style: { outline: "none", boxShadow: "none" }
|
|
59942
|
+
}
|
|
59943
|
+
);
|
|
59944
|
+
const resolveDropdownButton = () => {
|
|
59945
|
+
if (!DropdownButton) {
|
|
59946
|
+
return {
|
|
59947
|
+
props: toggleProps,
|
|
59948
|
+
children: defaultToggleContent
|
|
59949
|
+
};
|
|
59950
|
+
}
|
|
59951
|
+
const resolvedButton = typeof DropdownButton === "function" ? DropdownButton(toggleProps) : DropdownButton;
|
|
59952
|
+
if (!React.isValidElement(resolvedButton)) {
|
|
59953
|
+
return {
|
|
59954
|
+
props: toggleProps,
|
|
59955
|
+
children: resolvedButton || defaultToggleContent
|
|
59956
|
+
};
|
|
59957
|
+
}
|
|
59958
|
+
const customProps = __spreadValues({}, resolvedButton.props);
|
|
59959
|
+
const customChildren = customProps.children;
|
|
59960
|
+
delete customProps.children;
|
|
59961
|
+
if (resolvedButton.type !== DropdownToggle) {
|
|
59962
|
+
customProps.tag = customProps.tag || resolvedButton.type;
|
|
59963
|
+
}
|
|
59964
|
+
return {
|
|
59965
|
+
props: __spreadValues(__spreadValues({}, toggleProps), customProps),
|
|
59966
|
+
children: customChildren || defaultToggleContent
|
|
59967
|
+
};
|
|
59968
|
+
};
|
|
59969
|
+
const renderDropdownToggle = () => {
|
|
59970
|
+
const resolvedToggle = resolveDropdownButton();
|
|
59971
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(DropdownToggle, __spreadProps(__spreadValues({}, resolvedToggle.props), { children: resolvedToggle.children }));
|
|
59972
|
+
};
|
|
59897
59973
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
59898
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(ScopeHost, { children: (container) => container && /* @__PURE__ */ jsxRuntimeExports.jsxs(UncontrolledDropdown, { className: "drp-user font-Hanuman", children: [
|
|
59899
|
-
|
|
59900
|
-
|
|
59901
|
-
{
|
|
59902
|
-
id,
|
|
59903
|
-
tag: "button",
|
|
59904
|
-
type: "button",
|
|
59905
|
-
caret: false,
|
|
59906
|
-
className: "border-0 p-2 rounded mb-1",
|
|
59907
|
-
style: { background: "#6c757d8f" },
|
|
59908
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
59909
|
-
FeatherIcon,
|
|
59910
|
-
{
|
|
59911
|
-
icon: "more-horizontal",
|
|
59912
|
-
className: "f-16 text-white px-1",
|
|
59913
|
-
style: { outline: "none", boxShadow: "none" }
|
|
59914
|
-
}
|
|
59915
|
-
)
|
|
59916
|
-
}
|
|
59917
|
-
),
|
|
59918
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs(DropdownMenu, { right: true, className: "profile-notification pt-0", children: [
|
|
59974
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(ScopeHost, { children: (container) => container && /* @__PURE__ */ jsxRuntimeExports.jsxs(UncontrolledDropdown, __spreadProps(__spreadValues({ className: "drp-user font-Hanuman" }, props), { children: [
|
|
59975
|
+
renderDropdownToggle(),
|
|
59976
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(DropdownMenu, { className: "profile-notification pt-0", children: [
|
|
59919
59977
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(DropdownItem, { header: true, className: "drop-header", children: [
|
|
59920
59978
|
"#",
|
|
59921
59979
|
ticket == null ? void 0 : ticket.ticketNumber
|
|
@@ -59967,7 +60025,7 @@ function MoreMenu(_a) {
|
|
|
59967
60025
|
] })
|
|
59968
60026
|
}
|
|
59969
60027
|
),
|
|
59970
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(DropdownItem, { tag: "div", toggle: false, className: "w-100", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "d-flex align-items-center justify-content-between w-100", children: [
|
|
60028
|
+
isShowPayout && /* @__PURE__ */ jsxRuntimeExports.jsx(DropdownItem, { tag: "div", toggle: false, className: "w-100", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "d-flex align-items-center justify-content-between w-100", children: [
|
|
59971
60029
|
/* @__PURE__ */ jsxRuntimeExports.jsx(FeatherIcon, { icon: "check-circle", className: "mr-2 text-info", size: 16 }),
|
|
59972
60030
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "mr-3 drop-label", children: "\u1794\u17B6\u1793\u1791\u17BC\u1791\u17B6\u178F\u17CB\u179A\u1784\u17D2\u179C\u17B6\u1793\u17CB" }),
|
|
59973
60031
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "ml-auto", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -59983,7 +60041,7 @@ function MoreMenu(_a) {
|
|
|
59983
60041
|
) })
|
|
59984
60042
|
] }) })
|
|
59985
60043
|
] })
|
|
59986
|
-
] }) }),
|
|
60044
|
+
] })) }),
|
|
59987
60045
|
ticket && activeModal === "protest" && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
59988
60046
|
ProtestModal,
|
|
59989
60047
|
{
|
|
@@ -60002,6 +60060,7 @@ function MoreMenu(_a) {
|
|
|
60002
60060
|
object && activeModal === "remark" && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
60003
60061
|
RemarkModal,
|
|
60004
60062
|
{
|
|
60063
|
+
ticket,
|
|
60005
60064
|
object,
|
|
60006
60065
|
onClose: closeModal,
|
|
60007
60066
|
accessToken,
|
|
@@ -60023,7 +60082,11 @@ MoreMenu.propTypes = {
|
|
|
60023
60082
|
isSubmitting: PropTypes$2.bool,
|
|
60024
60083
|
onChange: PropTypes$2.func,
|
|
60025
60084
|
onSuccess: PropTypes$2.func,
|
|
60026
|
-
onError: PropTypes$2.func
|
|
60085
|
+
onError: PropTypes$2.func,
|
|
60086
|
+
DropdownButton: PropTypes$2.oneOfType([
|
|
60087
|
+
PropTypes$2.func,
|
|
60088
|
+
PropTypes$2.node
|
|
60089
|
+
])
|
|
60027
60090
|
};
|
|
60028
60091
|
|
|
60029
60092
|
exports.DeleteModal = DeleteModal;
|