@jingx/lottery-components-react-jsx 1.0.28 → 1.0.29
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 +24 -15
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +24 -15
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -32661,7 +32661,6 @@ const TicketPrintBody = (props) => {
|
|
|
32661
32661
|
] }, `select-${itemId}-${i}`);
|
|
32662
32662
|
};
|
|
32663
32663
|
const wrapWithCheckboxProtest = (node, obj, i) => {
|
|
32664
|
-
console.log(obj, "OOOOOOOO");
|
|
32665
32664
|
if (node == null) return null;
|
|
32666
32665
|
if (!showItemCheckbox) return node;
|
|
32667
32666
|
const itemId = getItemId(obj, i);
|
|
@@ -38734,7 +38733,6 @@ const ProtestTicket = ({
|
|
|
38734
38733
|
const selectableIdSet = React.useMemo(() => new Set(selectableItemIds), [selectableItemIds]);
|
|
38735
38734
|
const allChecked = selectableItemIds.length > 0 && selectableItemIds.every((id) => selectedIds.includes(id));
|
|
38736
38735
|
const isIndeterminate = selectedIds.length > 0 && !allChecked;
|
|
38737
|
-
console.log(selectableIdSet, "selectableIdSet");
|
|
38738
38736
|
React.useEffect(() => {
|
|
38739
38737
|
setSelectedIds((prev) => prev.filter((id) => selectableIdSet.has(id)));
|
|
38740
38738
|
}, [selectableIdSet]);
|
|
@@ -59023,6 +59021,13 @@ var axios_1 = axios;
|
|
|
59023
59021
|
|
|
59024
59022
|
var axios$1 = /*@__PURE__*/getDefaultExportFromCjs(axios_1);
|
|
59025
59023
|
|
|
59024
|
+
const ProtestApi = "api/v1.0.0/order/protest";
|
|
59025
|
+
const RemoveReasonApi = "api/v1.0.0/order/remove-reason";
|
|
59026
|
+
const DeleteApi = "api/v1.0.0/order/remove";
|
|
59027
|
+
const RemarkApi = "api/v1.0.0/order/remark";
|
|
59028
|
+
const PaidApi = "api/v1.0.0/order/paid";
|
|
59029
|
+
const PayoutApi = "api/v1.0.0/order/payout";
|
|
59030
|
+
|
|
59026
59031
|
var __defProp$4 = Object.defineProperty;
|
|
59027
59032
|
var __getOwnPropSymbols$4 = Object.getOwnPropertySymbols;
|
|
59028
59033
|
var __hasOwnProp$4 = Object.prototype.hasOwnProperty;
|
|
@@ -59051,7 +59056,7 @@ var __objRest$2 = (source, exclude) => {
|
|
|
59051
59056
|
}
|
|
59052
59057
|
return target;
|
|
59053
59058
|
};
|
|
59054
|
-
const DEFAULT_API_BASE_URL$3 = "https://api-web.dev.lottery.aazz168.com";
|
|
59059
|
+
const DEFAULT_API_BASE_URL$3 = "https://api-web.dev.lottery.aazz168.com/";
|
|
59055
59060
|
function DeleteModal(_a) {
|
|
59056
59061
|
var _b = _a, {
|
|
59057
59062
|
object,
|
|
@@ -59094,7 +59099,7 @@ function DeleteModal(_a) {
|
|
|
59094
59099
|
try {
|
|
59095
59100
|
setIsLoading(true);
|
|
59096
59101
|
const res = await axios$1.get(
|
|
59097
|
-
`${Env.REACT_APP_API_BASE_URL || DEFAULT_API_BASE_URL$3}
|
|
59102
|
+
`${Env.REACT_APP_API_BASE_URL || DEFAULT_API_BASE_URL$3}${RemoveReasonApi}`,
|
|
59098
59103
|
{
|
|
59099
59104
|
headers
|
|
59100
59105
|
}
|
|
@@ -59124,7 +59129,7 @@ function DeleteModal(_a) {
|
|
|
59124
59129
|
}
|
|
59125
59130
|
};
|
|
59126
59131
|
const handleConfirm = async () => {
|
|
59127
|
-
var _a2, _b2, _c;
|
|
59132
|
+
var _a2, _b2, _c, _d;
|
|
59128
59133
|
if (isRemoveReason && !selectedReason) {
|
|
59129
59134
|
PNotify_1.alert({
|
|
59130
59135
|
text: "\u179F\u17BC\u1798\u1787\u17D2\u179A\u17BE\u179F\u179A\u17BE\u179F\u1798\u17BC\u179B\u17A0\u17C1\u178F\u17BB\u179B\u17BB\u1794",
|
|
@@ -59140,7 +59145,7 @@ function DeleteModal(_a) {
|
|
|
59140
59145
|
message: (_a2 = selectedReason == null ? void 0 : selectedReason.value) != null ? _a2 : ""
|
|
59141
59146
|
};
|
|
59142
59147
|
const res = await axios$1.delete(
|
|
59143
|
-
`${Env.REACT_APP_API_BASE_URL || DEFAULT_API_BASE_URL$3}
|
|
59148
|
+
`${Env.REACT_APP_API_BASE_URL || DEFAULT_API_BASE_URL$3}${DeleteApi}`,
|
|
59144
59149
|
{
|
|
59145
59150
|
headers,
|
|
59146
59151
|
data: payload
|
|
@@ -59149,9 +59154,13 @@ function DeleteModal(_a) {
|
|
|
59149
59154
|
if (typeof onSuccess === "function") {
|
|
59150
59155
|
onSuccess(res.data, payload);
|
|
59151
59156
|
}
|
|
59157
|
+
PNotify_1.alert({
|
|
59158
|
+
text: ((_b2 = res.data) == null ? void 0 : _b2.message) || "\u179F\u17C6\u1794\u17BB\u178F\u17D2\u179A\u179B\u17BB\u1794\u1787\u17C4\u1782\u1787\u17D0\u1799 !",
|
|
59159
|
+
type: "success"
|
|
59160
|
+
});
|
|
59152
59161
|
onClose == null ? void 0 : onClose();
|
|
59153
59162
|
} catch (err) {
|
|
59154
|
-
const message = ((
|
|
59163
|
+
const message = ((_d = (_c = err.response) == null ? void 0 : _c.data) == null ? void 0 : _d.message) || err.message || "\u179F\u17C6\u1794\u17BB\u178F\u17D2\u179A\u179B\u17BB\u1794\u1794\u179A\u17B6\u1787\u17D0\u1799 !";
|
|
59155
59164
|
PNotify_1.alert({
|
|
59156
59165
|
text: message,
|
|
59157
59166
|
type: "error"
|
|
@@ -59330,7 +59339,7 @@ var __spreadValues$2 = (a, b) => {
|
|
|
59330
59339
|
}
|
|
59331
59340
|
return a;
|
|
59332
59341
|
};
|
|
59333
|
-
const DEFAULT_API_BASE_URL$2 = "https://api-web.dev.lottery.aazz168.com";
|
|
59342
|
+
const DEFAULT_API_BASE_URL$2 = "https://api-web.dev.lottery.aazz168.com/";
|
|
59334
59343
|
const ProtestModal = ({
|
|
59335
59344
|
isOpen,
|
|
59336
59345
|
onClose,
|
|
@@ -59366,7 +59375,7 @@ const ProtestModal = ({
|
|
|
59366
59375
|
try {
|
|
59367
59376
|
setIsLoading(true);
|
|
59368
59377
|
const res = await axios$1.get(
|
|
59369
|
-
`${Env.REACT_APP_API_BASE_URL || DEFAULT_API_BASE_URL$2}
|
|
59378
|
+
`${Env.REACT_APP_API_BASE_URL || DEFAULT_API_BASE_URL$2}${RemoveReasonApi}`,
|
|
59370
59379
|
{
|
|
59371
59380
|
params: { type: "protest" },
|
|
59372
59381
|
headers
|
|
@@ -59426,7 +59435,7 @@ const ProtestModal = ({
|
|
|
59426
59435
|
message: selectedReason.value
|
|
59427
59436
|
};
|
|
59428
59437
|
const res = await axios$1.post(
|
|
59429
|
-
`${Env.REACT_APP_API_BASE_URL || DEFAULT_API_BASE_URL$2}
|
|
59438
|
+
`${Env.REACT_APP_API_BASE_URL || DEFAULT_API_BASE_URL$2}${ProtestApi}`,
|
|
59430
59439
|
payload,
|
|
59431
59440
|
{ headers }
|
|
59432
59441
|
);
|
|
@@ -59606,7 +59615,7 @@ var __objRest$1 = (source, exclude) => {
|
|
|
59606
59615
|
}
|
|
59607
59616
|
return target;
|
|
59608
59617
|
};
|
|
59609
|
-
const DEFAULT_API_BASE_URL$1 = "https://api-web.dev.lottery.aazz168.com";
|
|
59618
|
+
const DEFAULT_API_BASE_URL$1 = "https://api-web.dev.lottery.aazz168.com/";
|
|
59610
59619
|
function RemarkModal(_a) {
|
|
59611
59620
|
var _b = _a, {
|
|
59612
59621
|
object,
|
|
@@ -59658,7 +59667,7 @@ function RemarkModal(_a) {
|
|
|
59658
59667
|
message: remark
|
|
59659
59668
|
};
|
|
59660
59669
|
const res = await axios$1.delete(
|
|
59661
|
-
`${Env.REACT_APP_API_BASE_URL || DEFAULT_API_BASE_URL$1}
|
|
59670
|
+
`${Env.REACT_APP_API_BASE_URL || DEFAULT_API_BASE_URL$1}${RemarkApi}`,
|
|
59662
59671
|
{
|
|
59663
59672
|
headers,
|
|
59664
59673
|
data: payload
|
|
@@ -59764,7 +59773,7 @@ var __objRest = (source, exclude) => {
|
|
|
59764
59773
|
}
|
|
59765
59774
|
return target;
|
|
59766
59775
|
};
|
|
59767
|
-
const DEFAULT_API_BASE_URL = "https://api-web.dev.lottery.aazz168.com";
|
|
59776
|
+
const DEFAULT_API_BASE_URL = "https://api-web.dev.lottery.aazz168.com/";
|
|
59768
59777
|
function MoreMenu(_a) {
|
|
59769
59778
|
var _b = _a, {
|
|
59770
59779
|
id = "more-menu",
|
|
@@ -59873,7 +59882,7 @@ function MoreMenu(_a) {
|
|
|
59873
59882
|
setValue: setIsPaid,
|
|
59874
59883
|
setLoading: setLoadingPaid,
|
|
59875
59884
|
successCallback: onSuccessPaid != null ? onSuccessPaid : onSuccess,
|
|
59876
|
-
endpoint:
|
|
59885
|
+
endpoint: PaidApi,
|
|
59877
59886
|
failureMessage: "Failed to mark as paid.",
|
|
59878
59887
|
successMessage: "Marked as paid successfully."
|
|
59879
59888
|
});
|
|
@@ -59881,7 +59890,7 @@ function MoreMenu(_a) {
|
|
|
59881
59890
|
setValue: setIsPayout,
|
|
59882
59891
|
setLoading: setLoadingPayout,
|
|
59883
59892
|
successCallback: onSuccessPayout != null ? onSuccessPayout : onSuccess,
|
|
59884
|
-
endpoint:
|
|
59893
|
+
endpoint: PayoutApi,
|
|
59885
59894
|
failureMessage: "Failed to mark as payout.",
|
|
59886
59895
|
successMessage: "Marked as payout successfully."
|
|
59887
59896
|
});
|