@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.esm.js CHANGED
@@ -32641,7 +32641,6 @@ const TicketPrintBody = (props) => {
32641
32641
  ] }, `select-${itemId}-${i}`);
32642
32642
  };
32643
32643
  const wrapWithCheckboxProtest = (node, obj, i) => {
32644
- console.log(obj, "OOOOOOOO");
32645
32644
  if (node == null) return null;
32646
32645
  if (!showItemCheckbox) return node;
32647
32646
  const itemId = getItemId(obj, i);
@@ -38714,7 +38713,6 @@ const ProtestTicket = ({
38714
38713
  const selectableIdSet = useMemo(() => new Set(selectableItemIds), [selectableItemIds]);
38715
38714
  const allChecked = selectableItemIds.length > 0 && selectableItemIds.every((id) => selectedIds.includes(id));
38716
38715
  const isIndeterminate = selectedIds.length > 0 && !allChecked;
38717
- console.log(selectableIdSet, "selectableIdSet");
38718
38716
  useEffect(() => {
38719
38717
  setSelectedIds((prev) => prev.filter((id) => selectableIdSet.has(id)));
38720
38718
  }, [selectableIdSet]);
@@ -59003,6 +59001,13 @@ var axios_1 = axios;
59003
59001
 
59004
59002
  var axios$1 = /*@__PURE__*/getDefaultExportFromCjs(axios_1);
59005
59003
 
59004
+ const ProtestApi = "api/v1.0.0/order/protest";
59005
+ const RemoveReasonApi = "api/v1.0.0/order/remove-reason";
59006
+ const DeleteApi = "api/v1.0.0/order/remove";
59007
+ const RemarkApi = "api/v1.0.0/order/remark";
59008
+ const PaidApi = "api/v1.0.0/order/paid";
59009
+ const PayoutApi = "api/v1.0.0/order/payout";
59010
+
59006
59011
  var __defProp$4 = Object.defineProperty;
59007
59012
  var __getOwnPropSymbols$4 = Object.getOwnPropertySymbols;
59008
59013
  var __hasOwnProp$4 = Object.prototype.hasOwnProperty;
@@ -59031,7 +59036,7 @@ var __objRest$2 = (source, exclude) => {
59031
59036
  }
59032
59037
  return target;
59033
59038
  };
59034
- const DEFAULT_API_BASE_URL$3 = "https://api-web.dev.lottery.aazz168.com";
59039
+ const DEFAULT_API_BASE_URL$3 = "https://api-web.dev.lottery.aazz168.com/";
59035
59040
  function DeleteModal(_a) {
59036
59041
  var _b = _a, {
59037
59042
  object,
@@ -59074,7 +59079,7 @@ function DeleteModal(_a) {
59074
59079
  try {
59075
59080
  setIsLoading(true);
59076
59081
  const res = await axios$1.get(
59077
- `${Env.REACT_APP_API_BASE_URL || DEFAULT_API_BASE_URL$3}/api/v1.0.0/order/remove-reason`,
59082
+ `${Env.REACT_APP_API_BASE_URL || DEFAULT_API_BASE_URL$3}${RemoveReasonApi}`,
59078
59083
  {
59079
59084
  headers
59080
59085
  }
@@ -59104,7 +59109,7 @@ function DeleteModal(_a) {
59104
59109
  }
59105
59110
  };
59106
59111
  const handleConfirm = async () => {
59107
- var _a2, _b2, _c;
59112
+ var _a2, _b2, _c, _d;
59108
59113
  if (isRemoveReason && !selectedReason) {
59109
59114
  PNotify_1.alert({
59110
59115
  text: "\u179F\u17BC\u1798\u1787\u17D2\u179A\u17BE\u179F\u179A\u17BE\u179F\u1798\u17BC\u179B\u17A0\u17C1\u178F\u17BB\u179B\u17BB\u1794",
@@ -59120,7 +59125,7 @@ function DeleteModal(_a) {
59120
59125
  message: (_a2 = selectedReason == null ? void 0 : selectedReason.value) != null ? _a2 : ""
59121
59126
  };
59122
59127
  const res = await axios$1.delete(
59123
- `${Env.REACT_APP_API_BASE_URL || DEFAULT_API_BASE_URL$3}/api/v1.0.0/order/remove`,
59128
+ `${Env.REACT_APP_API_BASE_URL || DEFAULT_API_BASE_URL$3}${DeleteApi}`,
59124
59129
  {
59125
59130
  headers,
59126
59131
  data: payload
@@ -59129,9 +59134,13 @@ function DeleteModal(_a) {
59129
59134
  if (typeof onSuccess === "function") {
59130
59135
  onSuccess(res.data, payload);
59131
59136
  }
59137
+ PNotify_1.alert({
59138
+ 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 !",
59139
+ type: "success"
59140
+ });
59132
59141
  onClose == null ? void 0 : onClose();
59133
59142
  } catch (err) {
59134
- const message = ((_c = (_b2 = err.response) == null ? void 0 : _b2.data) == null ? void 0 : _c.message) || err.message || "\u179F\u17C6\u1794\u17BB\u178F\u17D2\u179A\u179B\u17BB\u1794\u1794\u179A\u17B6\u1787\u17D0\u1799 !";
59143
+ 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 !";
59135
59144
  PNotify_1.alert({
59136
59145
  text: message,
59137
59146
  type: "error"
@@ -59310,7 +59319,7 @@ var __spreadValues$2 = (a, b) => {
59310
59319
  }
59311
59320
  return a;
59312
59321
  };
59313
- const DEFAULT_API_BASE_URL$2 = "https://api-web.dev.lottery.aazz168.com";
59322
+ const DEFAULT_API_BASE_URL$2 = "https://api-web.dev.lottery.aazz168.com/";
59314
59323
  const ProtestModal = ({
59315
59324
  isOpen,
59316
59325
  onClose,
@@ -59346,7 +59355,7 @@ const ProtestModal = ({
59346
59355
  try {
59347
59356
  setIsLoading(true);
59348
59357
  const res = await axios$1.get(
59349
- `${Env.REACT_APP_API_BASE_URL || DEFAULT_API_BASE_URL$2}/api/v1.0.0/order/remove-reason`,
59358
+ `${Env.REACT_APP_API_BASE_URL || DEFAULT_API_BASE_URL$2}${RemoveReasonApi}`,
59350
59359
  {
59351
59360
  params: { type: "protest" },
59352
59361
  headers
@@ -59406,7 +59415,7 @@ const ProtestModal = ({
59406
59415
  message: selectedReason.value
59407
59416
  };
59408
59417
  const res = await axios$1.post(
59409
- `${Env.REACT_APP_API_BASE_URL || DEFAULT_API_BASE_URL$2}/api/v1.0.0/order/protest`,
59418
+ `${Env.REACT_APP_API_BASE_URL || DEFAULT_API_BASE_URL$2}${ProtestApi}`,
59410
59419
  payload,
59411
59420
  { headers }
59412
59421
  );
@@ -59586,7 +59595,7 @@ var __objRest$1 = (source, exclude) => {
59586
59595
  }
59587
59596
  return target;
59588
59597
  };
59589
- const DEFAULT_API_BASE_URL$1 = "https://api-web.dev.lottery.aazz168.com";
59598
+ const DEFAULT_API_BASE_URL$1 = "https://api-web.dev.lottery.aazz168.com/";
59590
59599
  function RemarkModal(_a) {
59591
59600
  var _b = _a, {
59592
59601
  object,
@@ -59638,7 +59647,7 @@ function RemarkModal(_a) {
59638
59647
  message: remark
59639
59648
  };
59640
59649
  const res = await axios$1.delete(
59641
- `${Env.REACT_APP_API_BASE_URL || DEFAULT_API_BASE_URL$1}/api/v1.0.0/order/remark`,
59650
+ `${Env.REACT_APP_API_BASE_URL || DEFAULT_API_BASE_URL$1}${RemarkApi}`,
59642
59651
  {
59643
59652
  headers,
59644
59653
  data: payload
@@ -59744,7 +59753,7 @@ var __objRest = (source, exclude) => {
59744
59753
  }
59745
59754
  return target;
59746
59755
  };
59747
- const DEFAULT_API_BASE_URL = "https://api-web.dev.lottery.aazz168.com";
59756
+ const DEFAULT_API_BASE_URL = "https://api-web.dev.lottery.aazz168.com/";
59748
59757
  function MoreMenu(_a) {
59749
59758
  var _b = _a, {
59750
59759
  id = "more-menu",
@@ -59853,7 +59862,7 @@ function MoreMenu(_a) {
59853
59862
  setValue: setIsPaid,
59854
59863
  setLoading: setLoadingPaid,
59855
59864
  successCallback: onSuccessPaid != null ? onSuccessPaid : onSuccess,
59856
- endpoint: "/api/v1.0.0/order/paid",
59865
+ endpoint: PaidApi,
59857
59866
  failureMessage: "Failed to mark as paid.",
59858
59867
  successMessage: "Marked as paid successfully."
59859
59868
  });
@@ -59861,7 +59870,7 @@ function MoreMenu(_a) {
59861
59870
  setValue: setIsPayout,
59862
59871
  setLoading: setLoadingPayout,
59863
59872
  successCallback: onSuccessPayout != null ? onSuccessPayout : onSuccess,
59864
- endpoint: "/api/v1.0.0/order/payout",
59873
+ endpoint: PayoutApi,
59865
59874
  failureMessage: "Failed to mark as payout.",
59866
59875
  successMessage: "Marked as payout successfully."
59867
59876
  });