@opexa/portal-components 0.0.169 → 0.0.171
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/client/hooks/useSignUpMutation.js +3 -6
- package/dist/components/Messages/Messages.lazy.d.ts +2 -0
- package/dist/components/Messages/Messages.lazy.js +10 -2
- package/dist/components/Messages/MessagesPopup.js +5 -1
- package/dist/components/Messages/utils.d.ts +6 -1
- package/dist/components/Messages/utils.js +8 -5
- package/dist/components/Quests/DailyCheckInQuest.js +1 -1
- package/dist/components/Quests/OnboardingQuest.js +1 -1
- package/dist/components/Quests/Quests.client.js +2 -2
- package/dist/components/Quests/WageringQuest.js +1 -1
- package/dist/components/TransactionRecords/DepositRecordsTable.js +8 -1
- package/dist/components/TransactionRecords/TableFilters.js +4 -4
- package/dist/components/TransactionRecords/WithdrawalRecordsTable.js +8 -1
- package/package.json +1 -1
|
@@ -7,13 +7,10 @@ export const useSignUpMutation = (config) => {
|
|
|
7
7
|
...config,
|
|
8
8
|
mutationKey: getSignUpMutationKey(),
|
|
9
9
|
mutationFn: async (input) => {
|
|
10
|
-
const
|
|
11
|
-
return await registerMemberAccountViaMobile({
|
|
12
|
-
domain,
|
|
13
|
-
...input,
|
|
14
|
-
}, {
|
|
10
|
+
const session = await getSession();
|
|
11
|
+
return await registerMemberAccountViaMobile(input, {
|
|
15
12
|
headers: {
|
|
16
|
-
domain,
|
|
13
|
+
Domain: session.domain,
|
|
17
14
|
},
|
|
18
15
|
});
|
|
19
16
|
},
|
|
@@ -11,6 +11,8 @@ export interface MessagesProps {
|
|
|
11
11
|
offsetTop?: string | [mobile: string, desktop: string];
|
|
12
12
|
/** @default '/transactions' */
|
|
13
13
|
transactionsPageUrl?: string;
|
|
14
|
+
/** @default '/quests' */
|
|
15
|
+
questsPageUrl?: string;
|
|
14
16
|
}
|
|
15
17
|
export declare function Messages(props: MessagesProps): import("react/jsx-runtime").JSX.Element;
|
|
16
18
|
export declare function MessageDetails(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -56,6 +56,7 @@ export function Messages(props) {
|
|
|
56
56
|
}
|
|
57
57
|
function Message() {
|
|
58
58
|
const messagesProps = useMessagesPropsContext();
|
|
59
|
+
const questsPageUrl = messagesProps.questsPageUrl ?? '/quests';
|
|
59
60
|
const transactionsPageUrl = messagesProps.transactionsPageUrl ?? '/transactions';
|
|
60
61
|
const message = useMessageContext();
|
|
61
62
|
const localeInfo = useLocaleInfo();
|
|
@@ -73,13 +74,17 @@ function Message() {
|
|
|
73
74
|
}
|
|
74
75
|
}, children: [_jsxs("div", { className: "flex items-center space-x-2", children: [_jsx("p", { className: "text-text-tertiary-600 text-xs font-normal", children: format(new Date(message.dateTimeCreated), 'M/d/yyyy - h:mma', {
|
|
75
76
|
in: tz(localeInfo.timezone),
|
|
76
|
-
}) }), !message.markedAsRead && (_jsx("span", { className: "bg-utility-success-500 block size-2.5 rounded-full" }))] }), _jsxs("div", { className: "flex items-center space-x-2", children: [_jsx(MessageIcon, { type: message.icon, className: "text-brand-400 size-5" }), _jsx("h2", { className: "text-text-primary-brand text-sm font-semibold", children: message.title })] }), message.content && (_jsx("div", { className: "mt-2 line-clamp-3 text-wrap text-sm font-normal", dangerouslySetInnerHTML: { __html: message.content } })), message.actions.length > 0 && (_jsx("div", { className: "mt-2 flex flex-wrap items-center justify-end gap-2", children: message.actions.map((action, index) => (_jsx(Link, { className: "border-button-secondary-border text-button-secondary-fg rounded-md border px-3 py-2 text-sm", href: normalizeActionUrl(
|
|
77
|
+
}) }), !message.markedAsRead && (_jsx("span", { className: "bg-utility-success-500 block size-2.5 rounded-full" }))] }), _jsxs("div", { className: "flex items-center space-x-2", children: [_jsx(MessageIcon, { type: message.icon, className: "text-brand-400 size-5" }), _jsx("h2", { className: "text-text-primary-brand text-sm font-semibold", children: message.title })] }), message.content && (_jsx("div", { className: "mt-2 line-clamp-3 text-wrap text-sm font-normal", dangerouslySetInnerHTML: { __html: message.content } })), message.actions.length > 0 && (_jsx("div", { className: "mt-2 flex flex-wrap items-center justify-end gap-2", children: message.actions.map((action, index) => (_jsx(Link, { className: "border-button-secondary-border text-button-secondary-fg rounded-md border px-3 py-2 text-sm", href: normalizeActionUrl(action.url, {
|
|
78
|
+
transactionsPageUrl,
|
|
79
|
+
questsPageUrl,
|
|
80
|
+
}), onClick: (e) => {
|
|
77
81
|
e.stopPropagation();
|
|
78
82
|
globalStore.messages.setOpen(false);
|
|
79
83
|
}, children: action.name }, index))) }))] }));
|
|
80
84
|
}
|
|
81
85
|
export function MessageDetails() {
|
|
82
86
|
const messagesProps = useMessagesPropsContext();
|
|
87
|
+
const questsPageUrl = messagesProps.questsPageUrl ?? '/quests';
|
|
83
88
|
const transactionsPageUrl = messagesProps.transactionsPageUrl ?? '/transactions';
|
|
84
89
|
const globalStore = useGlobalStore(useShallow((ctx) => ({
|
|
85
90
|
message: ctx.message,
|
|
@@ -89,7 +94,10 @@ export function MessageDetails() {
|
|
|
89
94
|
globalStore.message.setOpen(details.open);
|
|
90
95
|
}, closeOnEscape: false, closeOnInteractOutside: false, children: _jsxs(Portal, { children: [_jsx(Dialog.Backdrop, { className: "!z-[calc(var(--z-dialog)+1)]" }), _jsx(Dialog.Positioner, { className: "!z-[calc(var(--z-dialog)+2)] flex items-center justify-center", children: _jsxs(Dialog.Content, { className: "min-h-auto mx-auto min-w-[21.438rem] max-w-[21.438rem] rounded-xl p-3xl lg:min-w-[25rem] lg:max-w-[25rem]", children: [_jsx(Dialog.CloseTrigger, { children: _jsx(XIcon, {}) }), _jsx("div", { className: "bg-bg-brand-secondary text-text-brand mx-auto flex size-12 items-center justify-center rounded-full", children: _jsx(MessageIcon, { type: message?.icon ?? 'INFO', className: "size-6" }) }), _jsx(Dialog.Title, { className: "mt-lg text-center text-lg font-semibold lg:mt-xl", children: message?.title }), message?.content && (_jsx(Dialog.Description, { className: "text-text-secondary-700 mt-xs pb-5 text-center text-sm", dangerouslySetInnerHTML: {
|
|
91
96
|
__html: message?.content,
|
|
92
|
-
} })), message?.image && (_jsx("div", { className: "mt-5 pb-5", children: _jsx(Image, { src: message?.image, alt: "", width: 400, height: 250, loading: "lazy", unoptimized: true, className: "h-auto w-full rounded-sm" }) })), message?.actions.length ? (_jsx("div", { className: "mt-3xl flex flex-col gap-2 text-center lg:mt-4xl", children: message?.actions.map((action, index) => (_jsx(Button, { asChild: true, children: _jsx(Link, { href: normalizeActionUrl(
|
|
97
|
+
} })), message?.image && (_jsx("div", { className: "mt-5 pb-5", children: _jsx(Image, { src: message?.image, alt: "", width: 400, height: 250, loading: "lazy", unoptimized: true, className: "h-auto w-full rounded-sm" }) })), message?.actions.length ? (_jsx("div", { className: "mt-3xl flex flex-col gap-2 text-center lg:mt-4xl", children: message?.actions.map((action, index) => (_jsx(Button, { asChild: true, children: _jsx(Link, { href: normalizeActionUrl(action.url, {
|
|
98
|
+
transactionsPageUrl,
|
|
99
|
+
questsPageUrl,
|
|
100
|
+
}), onClick: (e) => {
|
|
93
101
|
e.stopPropagation();
|
|
94
102
|
globalStore.message.setOpen(false);
|
|
95
103
|
}, children: action.name }) }, index))) })) : null] }) })] }) }));
|
|
@@ -20,6 +20,7 @@ import { useMessagesPropsContext } from './MessagesContext.js';
|
|
|
20
20
|
import { normalizeActionUrl } from './utils.js';
|
|
21
21
|
export function MessagesPopup() {
|
|
22
22
|
const messagesProps = useMessagesPropsContext();
|
|
23
|
+
const questsPageUrl = messagesProps.questsPageUrl ?? '/quests';
|
|
23
24
|
const transactionsPageUrl = messagesProps.transactionsPageUrl ?? '/transactions';
|
|
24
25
|
const globalStore = useGlobalStore(useShallow((ctx) => ({
|
|
25
26
|
kyc: ctx.kyc,
|
|
@@ -86,7 +87,10 @@ export function MessagesPopup() {
|
|
|
86
87
|
disclosure.setOpen(details.open);
|
|
87
88
|
}, lazyMount: true, unmountOnExit: true, children: _jsxs(Portal, { children: [_jsx(Dialog.Backdrop, { className: "!z-[calc(var(--z-dialog)+3)]" }), _jsx(Dialog.Positioner, { className: "!z-[calc(var(--z-dialog)+4)] flex items-center justify-center", children: _jsxs(Dialog.Content, { className: "min-h-auto mx-auto min-w-[21.438rem] max-w-[21.438rem] rounded-xl p-3xl lg:min-w-[25rem] lg:max-w-[25rem]", children: [_jsx(Dialog.CloseTrigger, { children: _jsx(XIcon, {}) }), _jsxs(Carousel.Root, { page: index, onPageChange: (details) => {
|
|
88
89
|
setIndex(details.page);
|
|
89
|
-
}, slideCount: messages.length, allowMouseDrag: true, children: [_jsx(Carousel.ItemGroup, { children: messages.map((message, index) => (_jsxs(Carousel.Item, { index: index, className: "select-none", children: [_jsx("div", { className: "bg-bg-brand-secondary text-text-brand mx-auto flex size-12 items-center justify-center rounded-full", children: _jsx(MessageIcon, { type: message.icon, className: "size-6" }) }), _jsx("h2", { className: "mt-lg text-center text-lg font-semibold xl:mt-xl", children: message.title }), message.content && (_jsx("div", { dangerouslySetInnerHTML: { __html: message.content }, className: "text-text-secondary-700 mt-xs pb-5 text-center text-sm" })), message.image && (_jsx("div", { className: "mt-5 pb-5", children: _jsx(Image, { src: message.image, alt: "", width: 400, height: 250, loading: "lazy", unoptimized: true, className: "h-auto w-full rounded-sm" }) })), message.actions.length ? (_jsx("div", { className: "mt-3xl flex flex-col gap-2 text-center lg:mt-4xl", children: message.actions.map((action, index) => (_jsx(Button, { asChild: true, children: _jsx(Link, { href: normalizeActionUrl(
|
|
90
|
+
}, slideCount: messages.length, allowMouseDrag: true, children: [_jsx(Carousel.ItemGroup, { children: messages.map((message, index) => (_jsxs(Carousel.Item, { index: index, className: "select-none", children: [_jsx("div", { className: "bg-bg-brand-secondary text-text-brand mx-auto flex size-12 items-center justify-center rounded-full", children: _jsx(MessageIcon, { type: message.icon, className: "size-6" }) }), _jsx("h2", { className: "mt-lg text-center text-lg font-semibold xl:mt-xl", children: message.title }), message.content && (_jsx("div", { dangerouslySetInnerHTML: { __html: message.content }, className: "text-text-secondary-700 mt-xs pb-5 text-center text-sm" })), message.image && (_jsx("div", { className: "mt-5 pb-5", children: _jsx(Image, { src: message.image, alt: "", width: 400, height: 250, loading: "lazy", unoptimized: true, className: "h-auto w-full rounded-sm" }) })), message.actions.length ? (_jsx("div", { className: "mt-3xl flex flex-col gap-2 text-center lg:mt-4xl", children: message.actions.map((action, index) => (_jsx(Button, { asChild: true, children: _jsx(Link, { href: normalizeActionUrl(action.url, {
|
|
91
|
+
questsPageUrl,
|
|
92
|
+
transactionsPageUrl,
|
|
93
|
+
}), onClick: () => {
|
|
90
94
|
disclosure.setOpen(false);
|
|
91
95
|
}, children: action.name }) }, index))) })) : null] }, message.id))) }), _jsxs(Carousel.Control, { className: "mt-5 flex items-center lg:mt-3xl", children: [_jsxs(Carousel.PrevTrigger, { className: "text-text-quarterary-500 hidden items-center gap-md font-semibold disabled:invisible lg:flex", children: [_jsx(ChevronLeftIcon, { className: "size-5" }), "Back"] }), _jsx(Carousel.IndicatorGroup, { className: "flex grow justify-center gap-xs", children: messages.map((message, index) => (_jsx(Carousel.Indicator, { index: index, className: "bg-bg-quaternary ui-current:bg-brand-400 size-2.5 rounded-full transition-all duration-150 ui-current:w-5" }, message.id))) }), _jsxs(Carousel.NextTrigger, { className: "text-text-quarterary-500 hidden items-center gap-md font-semibold disabled:invisible lg:flex", children: ["Next", _jsx(ChevronRightIcon, { className: "size-5" })] })] })] })] }) })] }) }));
|
|
92
96
|
}
|
|
@@ -1 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
interface NormalizeActionUrlOptions {
|
|
2
|
+
transactionsPageUrl: string;
|
|
3
|
+
questsPageUrl: string;
|
|
4
|
+
}
|
|
5
|
+
export declare function normalizeActionUrl(value: string, options: NormalizeActionUrlOptions): string;
|
|
6
|
+
export {};
|
|
@@ -1,14 +1,17 @@
|
|
|
1
|
-
export function normalizeActionUrl(
|
|
2
|
-
const searchParams = new URLSearchParams(
|
|
1
|
+
export function normalizeActionUrl(value, options) {
|
|
2
|
+
const searchParams = new URLSearchParams(value);
|
|
3
|
+
if (value === 'quests') {
|
|
4
|
+
return options.questsPageUrl;
|
|
5
|
+
}
|
|
3
6
|
if (searchParams.has('personalCenter')) {
|
|
4
7
|
if (searchParams.get('personalCenter') === 'deposit' &&
|
|
5
8
|
searchParams.has('id')) {
|
|
6
|
-
return `${
|
|
9
|
+
return `${options.transactionsPageUrl}?tab=deposits&id=${searchParams.get('id')}`;
|
|
7
10
|
}
|
|
8
11
|
if (searchParams.get('personalCenter') === 'withdrawal' &&
|
|
9
12
|
searchParams.has('id')) {
|
|
10
|
-
return `${
|
|
13
|
+
return `${options.transactionsPageUrl}?tab=withdrawals&id=${searchParams.get('id')}`;
|
|
11
14
|
}
|
|
12
15
|
}
|
|
13
|
-
return
|
|
16
|
+
return value;
|
|
14
17
|
}
|
|
@@ -58,7 +58,7 @@ export function DailyCheckInQuest() {
|
|
|
58
58
|
},
|
|
59
59
|
});
|
|
60
60
|
const remainingTime = useRemainingTime(endDateTime);
|
|
61
|
-
return (_jsxs(_Fragment, { children: [_jsxs("div", { className: "border-border-primary bg-bg-tertiary flex h-full w-full flex-col space-y-6 rounded-2xl border px-4 pb-6 pt-5", children: [_jsxs("div", { className: "flex flex-col space-y-2", children: [_jsxs("div", { className: "flex max-h-7.5 items-start justify-between", children: [_jsx(RemainingTime, {}), _jsx("button", { type: "button", className: "bg-bg-primary border-border-secondary flex size-9 cursor-pointer items-center justify-center rounded-md border", onClick: () => disclosure.setOpen(true), "aria-label": "View Rules", children: _jsx(InfoCircleIcon, { className: "text-text-disabled size-5" }) })] }), _jsx("p", { className: "text-xl font-semibold", children: name }), _jsx("
|
|
61
|
+
return (_jsxs(_Fragment, { children: [_jsxs("div", { className: "border-border-primary bg-bg-tertiary flex h-full w-full flex-col space-y-6 rounded-2xl border px-4 pb-6 pt-5", children: [_jsxs("div", { className: "flex flex-col space-y-2", children: [_jsxs("div", { className: "flex max-h-7.5 items-start justify-between", children: [_jsx(RemainingTime, {}), _jsx("button", { type: "button", className: "bg-bg-primary border-border-secondary flex size-9 cursor-pointer items-center justify-center rounded-md border", onClick: () => disclosure.setOpen(true), "aria-label": "View Rules", children: _jsx(InfoCircleIcon, { className: "text-text-disabled size-5" }) })] }), _jsx("p", { className: "text-xl font-semibold", children: name }), _jsx("div", { className: "text-text-secondary-700 text-wrap text-sm font-normal", dangerouslySetInnerHTML: { __html: description } })] }), _jsxs("div", { className: "flex w-full flex-col space-y-2", children: [_jsx("div", { className: "grid grid-cols-7", children: dailyCheckedInData.map((item) => {
|
|
62
62
|
const reward = item.reward
|
|
63
63
|
? `+${formatNumber(item.reward, {
|
|
64
64
|
currency: localeInfo.currency.code,
|
|
@@ -24,7 +24,7 @@ export function OnboardingQuest() {
|
|
|
24
24
|
depositWithdrawal: ctx.depositWithdrawal,
|
|
25
25
|
})));
|
|
26
26
|
const remainingTime = useRemainingTime(quest.endDateTime);
|
|
27
|
-
return (_jsxs(_Fragment, { children: [_jsxs("div", { className: "border-border-primary bg-bg-tertiary flex h-full w-full flex-col space-y-6 rounded-2xl border px-4 pb-6 pt-5", children: [_jsxs("div", { className: "flex flex-col space-y-2", children: [_jsxs("div", { className: "flex max-h-7.5 items-start justify-between", children: [_jsx(RemainingTime, {}), _jsx("button", { type: "button", className: "bg-bg-primary border-border-secondary flex size-9 cursor-pointer items-center justify-center rounded-md border", onClick: () => disclosure.setOpen(true), "aria-label": "View Rules", children: _jsx(InfoCircleIcon, { className: "text-text-disabled size-5" }) })] }), _jsx("h2", { className: "text-xl font-semibold", children: quest.name }), _jsx("
|
|
27
|
+
return (_jsxs(_Fragment, { children: [_jsxs("div", { className: "border-border-primary bg-bg-tertiary flex h-full w-full flex-col space-y-6 rounded-2xl border px-4 pb-6 pt-5", children: [_jsxs("div", { className: "flex flex-col space-y-2", children: [_jsxs("div", { className: "flex max-h-7.5 items-start justify-between", children: [_jsx(RemainingTime, {}), _jsx("button", { type: "button", className: "bg-bg-primary border-border-secondary flex size-9 cursor-pointer items-center justify-center rounded-md border", onClick: () => disclosure.setOpen(true), "aria-label": "View Rules", children: _jsx(InfoCircleIcon, { className: "text-text-disabled size-5" }) })] }), _jsx("h2", { className: "text-xl font-semibold", children: quest.name }), _jsx("div", { className: "text-text-secondary-700 text-wrap text-sm font-normal", dangerouslySetInnerHTML: { __html: quest.description } })] }), _jsxs("div", { className: "w-full grow space-y-2", children: [_jsxs(Checkbox.Root, { checked: quest.accountVerificationCompleted, onCheckedChange: noop, children: [_jsx(Checkbox.Control, { className: "bg-transparent", children: _jsx(Checkbox.Indicator, { asChild: true, children: _jsx(CheckIcon, {}) }) }), _jsx(Checkbox.Label, { className: "text-sm font-medium leading-tight", children: "Complete personal verification" }), _jsx(Checkbox.HiddenInput, {})] }), _jsxs(Checkbox.Root, { checked: quest.firstDepositCompleted, onCheckedChange: noop, children: [_jsx(Checkbox.Control, { className: "bg-transparent", children: _jsx(Checkbox.Indicator, { asChild: true, children: _jsx(CheckIcon, {}) }) }), _jsx(Checkbox.Label, { className: "text-sm font-medium leading-tight", children: "Make your first deposit" }), _jsx(Checkbox.HiddenInput, {})] })] }), _jsxs("div", { className: "flex gap-lg", children: [_jsxs(Button, { size: "sm", onClick: () => {
|
|
28
28
|
globalStore.kyc.setOpen(true);
|
|
29
29
|
}, disabled: quest.accountVerificationCompleted ||
|
|
30
30
|
quest.status === 'COMPLETED' ||
|
|
@@ -36,7 +36,7 @@ export function Quests__client(props) {
|
|
|
36
36
|
return (_jsxs("div", { style: props.style, className: props.className, children: [_jsx("h2", { className: "text-lg font-semibold", children: props.heading ?? 'Quests' }), _jsxs(SegmentGroup.Root, { value: tab, onValueChange: (details) => {
|
|
37
37
|
setTab(TabDefinition.catch('AVAILABLE').parse(details.value));
|
|
38
38
|
}, className: "mt-3 w-full overflow-x-auto lg:mt-4.5 lg:w-fit", children: [_jsxs(SegmentGroup.Item, { value: "AVAILABLE", className: "w-full lg:w-fit", children: [_jsx(SegmentGroup.ItemText, { children: "Available" }), _jsx(SegmentGroup.ItemControl, {}), _jsx(SegmentGroup.ItemHiddenInput, {})] }), _jsxs(SegmentGroup.Item, { value: "COMPLETED", className: "w-full lg:w-fit", children: [_jsx(SegmentGroup.ItemText, { children: "Completed" }), _jsx(SegmentGroup.ItemControl, {}), _jsx(SegmentGroup.ItemHiddenInput, {})] }), _jsx(SegmentGroup.Indicator, {})] }), _jsx("div", { className: "mt-3xl grid gap-3xl lg:mt-lg lg:grid-cols-3", children: quests.map((quest) => {
|
|
39
|
-
const
|
|
40
|
-
return (_jsx(QuestContext, { value: quest, children: _jsx(
|
|
39
|
+
const Quest = QUEST_COMPONENT_MAP[quest.type];
|
|
40
|
+
return (_jsx(QuestContext, { value: quest, children: _jsx(Quest, {}) }, quest.id));
|
|
41
41
|
}) })] }));
|
|
42
42
|
}
|
|
@@ -19,7 +19,7 @@ export function WageringQuest() {
|
|
|
19
19
|
const localeInfo = useLocaleInfo();
|
|
20
20
|
const { progressPercentage, turnover, targetTurnover, name, description, endDateTime, bonus, status, } = quest;
|
|
21
21
|
const remainingTime = useRemainingTime(endDateTime);
|
|
22
|
-
return (_jsxs(_Fragment, { children: [_jsxs("div", { className: "border-border-primary bg-bg-tertiary flex h-full w-full flex-col space-y-6 rounded-2xl border px-4 pb-6 pt-5", children: [_jsxs("div", { className: "flex flex-col space-y-2", children: [_jsxs("div", { className: "flex max-h-7.5 items-start justify-between", children: [_jsx(RemainingTime, {}), _jsx("button", { type: "button", className: "bg-bg-primary border-border-secondary flex size-9 cursor-pointer items-center justify-center rounded-md border", onClick: () => disclosure.setOpen(true), "aria-label": "View Rules", children: _jsx(InfoCircleIcon, { className: "text-text-disabled size-5" }) })] }), _jsx("p", { className: "text-xl font-semibold", children: name }), _jsx("
|
|
22
|
+
return (_jsxs(_Fragment, { children: [_jsxs("div", { className: "border-border-primary bg-bg-tertiary flex h-full w-full flex-col space-y-6 rounded-2xl border px-4 pb-6 pt-5", children: [_jsxs("div", { className: "flex flex-col space-y-2", children: [_jsxs("div", { className: "flex max-h-7.5 items-start justify-between", children: [_jsx(RemainingTime, {}), _jsx("button", { type: "button", className: "bg-bg-primary border-border-secondary flex size-9 cursor-pointer items-center justify-center rounded-md border", onClick: () => disclosure.setOpen(true), "aria-label": "View Rules", children: _jsx(InfoCircleIcon, { className: "text-text-disabled size-5" }) })] }), _jsx("p", { className: "text-xl font-semibold", children: name }), _jsx("div", { className: "text-text-secondary-700 text-wrap text-sm font-normal", dangerouslySetInnerHTML: { __html: description } })] }), _jsxs("div", { className: "flex w-full flex-col space-y-2", children: [_jsxs("div", { className: "text-text-primary-brand group flex items-center justify-between", children: [_jsxs("p", { children: ["Progress ", parseDecimal(progressPercentage, 0).toFixed(2), "%"] }), _jsxs("p", { children: [turnover, _jsxs("span", { className: "text-text-quarterary-brand", children: ["/", targetTurnover, " ", localeInfo.currency.code] })] })] }), _jsx("div", { className: "bg-bg-primary h-2 w-full overflow-hidden rounded-full", children: _jsx("div", { className: "bg-utility-brand-600 h-full rounded-full transition-all duration-300", style: { width: `${progressPercentage}%` } }) })] }), _jsx("div", { className: "flex h-full items-end", children: _jsx("div", { className: "bg-button-secondary-bg border-bg-primary-hover w-full rounded-md border px-3.5 py-2.5 text-center text-white", children: _jsxs("p", { className: twMerge(remainingTime.expired ||
|
|
23
23
|
status === 'COMPLETED' ||
|
|
24
24
|
status === 'FAILED'
|
|
25
25
|
? 'opacity-50 grayscale'
|
|
@@ -37,7 +37,14 @@ export function DepositRecordsTable() {
|
|
|
37
37
|
}),
|
|
38
38
|
...(state.type && {
|
|
39
39
|
type: {
|
|
40
|
-
|
|
40
|
+
in: state.type === 'MANUAL'
|
|
41
|
+
? [
|
|
42
|
+
/* "MANUAL" and friends */
|
|
43
|
+
'MANUAL',
|
|
44
|
+
'MANUAL_BANK',
|
|
45
|
+
'MANUAL_UPI',
|
|
46
|
+
]
|
|
47
|
+
: [state.type],
|
|
41
48
|
},
|
|
42
49
|
}),
|
|
43
50
|
...(state.status && {
|
|
@@ -19,14 +19,14 @@ const DEPOSIT_TYPES = [
|
|
|
19
19
|
'BANK',
|
|
20
20
|
'GCASH',
|
|
21
21
|
'MAYA',
|
|
22
|
-
'
|
|
22
|
+
'MANUAL',
|
|
23
23
|
'ONLINE_BANK',
|
|
24
24
|
];
|
|
25
25
|
const DEPOSIT_TYPES_MAP = {
|
|
26
26
|
BANK: 'Bank',
|
|
27
27
|
GCASH: 'GCash',
|
|
28
28
|
MAYA: 'Maya',
|
|
29
|
-
|
|
29
|
+
MANUAL: 'Manual',
|
|
30
30
|
ONLINE_BANK: 'Online Bank',
|
|
31
31
|
};
|
|
32
32
|
const DEPOSIT_STATUSES = [
|
|
@@ -43,14 +43,14 @@ const WITHDRAWAL_TYPES = [
|
|
|
43
43
|
'GCASH',
|
|
44
44
|
'INSTAPAY',
|
|
45
45
|
'MAYA_APP',
|
|
46
|
-
'
|
|
46
|
+
'MANUAL',
|
|
47
47
|
];
|
|
48
48
|
const WITHDRAWAL_TYPES_MAP = {
|
|
49
49
|
BANK: 'Bank',
|
|
50
50
|
GCASH: 'GCash',
|
|
51
51
|
INSTAPAY: 'Instapay',
|
|
52
52
|
MAYA_APP: 'Maya App',
|
|
53
|
-
|
|
53
|
+
MANUAL: 'Manual',
|
|
54
54
|
};
|
|
55
55
|
const WITHDRAWAL_STATUSES = [
|
|
56
56
|
'ACCEPTED',
|
|
@@ -37,7 +37,14 @@ export function WithdrawalRecordsTable() {
|
|
|
37
37
|
}),
|
|
38
38
|
...(state.type && {
|
|
39
39
|
type: {
|
|
40
|
-
|
|
40
|
+
in: state.type === 'MANUAL'
|
|
41
|
+
? [
|
|
42
|
+
/* "MANUAL" and friends */
|
|
43
|
+
'MANUAL',
|
|
44
|
+
'MANUAL_BANK',
|
|
45
|
+
'MANUAL_UPI',
|
|
46
|
+
]
|
|
47
|
+
: [state.type],
|
|
41
48
|
},
|
|
42
49
|
}),
|
|
43
50
|
...(state.status && {
|