@saasquatch/mint-components 2.2.0-0 → 2.2.0-2
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/cjs/{keys-cff24974.js → keys-5a2c9ed2.js} +4 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/mint-components.cjs.js +1 -1
- package/dist/cjs/sqm-banking-info-form_10.cjs.entry.js +12 -16
- package/dist/cjs/sqm-big-stat_46.cjs.entry.js +22 -26
- package/dist/cjs/sqm-code-verification.cjs.entry.js +1 -1
- package/dist/cjs/sqm-email-verification_2.cjs.entry.js +14 -35
- package/dist/cjs/{sqm-partner-info-modal-view-540886b4.js → sqm-partner-info-modal-view-431ff976.js} +15 -10
- package/dist/cjs/sqm-referral-table_11.cjs.entry.js +27 -9
- package/dist/cjs/sqm-rewards-table_9.cjs.entry.js +30 -9
- package/dist/cjs/sqm-stencilbook.cjs.entry.js +487 -310
- package/dist/cjs/{sqm-user-info-form-view-01bf2f41.js → sqm-user-info-form-view-f1127a60.js} +2 -2
- package/dist/cjs/sqm-widget-verification-controller.cjs.entry.js +1 -1
- package/dist/collection/components/sqm-partner-info-modal/PartnerInfoModal.stories.js +14 -4
- package/dist/collection/components/sqm-partner-info-modal/sqm-partner-info-modal-view.js +15 -10
- package/dist/collection/components/sqm-partner-info-modal/sqm-partner-info-modal.js +1 -30
- package/dist/collection/components/sqm-partner-info-modal/usePartnerInfoModal.js +13 -26
- package/dist/collection/components/sqm-referral-table/ReferralTable.stories.js +1 -0
- package/dist/collection/components/sqm-referral-table/ReferralTableRewardsCell.stories.js +1 -0
- package/dist/collection/components/sqm-referral-table/TaxAndCashReferralTableRewardsCell.stories.js +209 -157
- package/dist/collection/components/sqm-referral-table/cells/sqm-referral-table-rewards-cell.js +30 -10
- package/dist/collection/components/sqm-rewards-table/RewardsTableCell.stories.js +1 -0
- package/dist/collection/components/sqm-rewards-table/TaxAndCashRewardsTableCell.stories.js +223 -148
- package/dist/collection/components/sqm-rewards-table/cells/sqm-rewards-table-status-cell.js +30 -10
- package/dist/collection/components/sqm-rewards-table/useRewardsTable.js +1 -0
- package/dist/collection/components/sqm-widget-verification/keys.js +2 -0
- package/dist/collection/components/sqm-widget-verification/sqm-widget-verification.js +0 -59
- package/dist/collection/components/sqm-widget-verification/useWidgetVerification.js +23 -10
- package/dist/collection/components/tax-and-cash/sqm-indirect-tax-form/useIndirectTaxForm.js +5 -4
- package/dist/collection/components/tax-and-cash/sqm-tax-and-cash/sqm-tax-and-cash.js +1 -30
- package/dist/collection/components/tax-and-cash/sqm-tax-and-cash/useTaxAndCash.js +0 -1
- package/dist/collection/components/tax-and-cash/sqm-user-info-form/UserInfoFormView.stories.js +0 -1
- package/dist/collection/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form-view.js +2 -2
- package/dist/collection/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form.js +0 -25
- package/dist/collection/components/tax-and-cash/sqm-user-info-form/useUserInfoForm.js +5 -6
- package/dist/esm/keys-d7c5c851.js +8 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/mint-components.js +1 -1
- package/dist/esm/sqm-banking-info-form_10.entry.js +12 -16
- package/dist/esm/sqm-big-stat_46.entry.js +22 -26
- package/dist/esm/sqm-code-verification.entry.js +1 -1
- package/dist/esm/sqm-email-verification_2.entry.js +14 -35
- package/dist/esm/{sqm-partner-info-modal-view-eec8606e.js → sqm-partner-info-modal-view-b3c33bc3.js} +15 -10
- package/dist/esm/sqm-referral-table_11.entry.js +27 -9
- package/dist/esm/sqm-rewards-table_9.entry.js +30 -9
- package/dist/esm/sqm-stencilbook.entry.js +487 -310
- package/dist/esm/{sqm-user-info-form-view-365cef98.js → sqm-user-info-form-view-e732dc4d.js} +2 -2
- package/dist/esm/sqm-widget-verification-controller.entry.js +1 -1
- package/dist/esm-es5/keys-d7c5c851.js +1 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/mint-components.js +1 -1
- package/dist/esm-es5/sqm-banking-info-form_10.entry.js +1 -1
- package/dist/esm-es5/sqm-big-stat_46.entry.js +1 -1
- package/dist/esm-es5/sqm-code-verification.entry.js +1 -1
- package/dist/esm-es5/sqm-email-verification_2.entry.js +1 -1
- package/dist/esm-es5/sqm-partner-info-modal-view-b3c33bc3.js +1 -0
- package/dist/esm-es5/sqm-referral-table_11.entry.js +1 -1
- package/dist/esm-es5/sqm-rewards-table_9.entry.js +1 -1
- package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
- package/dist/esm-es5/{sqm-user-info-form-view-365cef98.js → sqm-user-info-form-view-e732dc4d.js} +1 -1
- package/dist/esm-es5/sqm-widget-verification-controller.entry.js +1 -1
- package/dist/mint-components/mint-components.esm.js +1 -1
- package/dist/mint-components/p-162da001.system.entry.js +1 -0
- package/dist/mint-components/p-16416781.system.entry.js +1 -0
- package/dist/mint-components/p-1bff74c0.js +1 -0
- package/dist/mint-components/p-1c413a06.system.js +1 -1
- package/dist/mint-components/p-1f76371b.entry.js +9 -0
- package/dist/mint-components/{p-2d3a12f2.entry.js → p-36b91873.entry.js} +2 -2
- package/dist/mint-components/{p-038d0b8f.entry.js → p-440d3788.entry.js} +3 -3
- package/dist/mint-components/p-4c47beb0.system.js +1 -0
- package/dist/mint-components/{p-55d4caaa.entry.js → p-63102c04.entry.js} +7 -13
- package/dist/mint-components/p-6d15ce09.system.entry.js +1 -0
- package/dist/mint-components/{p-a0986077.system.entry.js → p-70a90ad8.system.entry.js} +1 -1
- package/dist/mint-components/p-837c4cf8.js +1 -0
- package/dist/mint-components/p-987a54e2.system.js +1 -0
- package/dist/mint-components/{p-88c9cc1b.entry.js → p-a67f2ccf.entry.js} +1 -1
- package/dist/mint-components/p-bdf858c3.entry.js +1 -0
- package/dist/mint-components/{p-9e43f1eb.entry.js → p-be5ecf62.entry.js} +3 -2
- package/dist/mint-components/p-d3ac8246.system.entry.js +1 -0
- package/dist/mint-components/{p-64041ee1.entry.js → p-d43c728e.entry.js} +22 -22
- package/dist/mint-components/{p-52eca331.js → p-dd5d8095.js} +1 -1
- package/dist/mint-components/{p-4d009702.system.entry.js → p-e83d08d7.system.entry.js} +1 -1
- package/dist/mint-components/{p-6194855b.system.entry.js → p-ecdbe09b.system.entry.js} +1 -1
- package/dist/mint-components/{p-a2db4345.system.js → p-ed3ae5ba.system.js} +1 -1
- package/dist/mint-components/{p-037c1a4f.system.entry.js → p-fe944f94.system.entry.js} +1 -1
- package/dist/types/components/sqm-partner-info-modal/PartnerInfoModal.stories.d.ts +1 -0
- package/dist/types/components/sqm-partner-info-modal/sqm-partner-info-modal-view.d.ts +0 -2
- package/dist/types/components/sqm-partner-info-modal/sqm-partner-info-modal.d.ts +0 -6
- package/dist/types/components/sqm-referral-table/TaxAndCashReferralTableRewardsCell.stories.d.ts +16 -0
- package/dist/types/components/sqm-rewards-table/TaxAndCashRewardsTableCell.stories.d.ts +18 -7
- package/dist/types/components/sqm-widget-verification/keys.d.ts +2 -0
- package/dist/types/components/sqm-widget-verification/sqm-widget-verification.d.ts +0 -10
- package/dist/types/components/tax-and-cash/sqm-tax-and-cash/sqm-tax-and-cash.d.ts +0 -5
- package/dist/types/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form-view.d.ts +0 -1
- package/dist/types/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form.d.ts +0 -4
- package/dist/types/components.d.ts +0 -48
- package/dist/types/saasquatch.d.ts +1 -0
- package/docs/docs.docx +0 -0
- package/docs/raisins.json +1 -1
- package/grapesjs/grapesjs.js +1 -1
- package/package.json +1 -1
- package/dist/esm/keys-db1897ae.js +0 -6
- package/dist/esm-es5/keys-db1897ae.js +0 -1
- package/dist/esm-es5/sqm-partner-info-modal-view-eec8606e.js +0 -1
- package/dist/mint-components/p-39840341.js +0 -1
- package/dist/mint-components/p-55627a5c.entry.js +0 -1
- package/dist/mint-components/p-574a4089.system.js +0 -1
- package/dist/mint-components/p-7d5956ec.system.entry.js +0 -1
- package/dist/mint-components/p-91369a5f.js +0 -1
- package/dist/mint-components/p-b2a99637.system.js +0 -1
- package/dist/mint-components/p-d01949f7.system.entry.js +0 -1
- package/dist/mint-components/p-d273eb05.entry.js +0 -9
- package/dist/mint-components/p-e9e05970.system.entry.js +0 -1
- package/dist/mint-components/p-ea5eec69.system.entry.js +0 -1
|
@@ -2,6 +2,9 @@ import { h } from "@stencil/core";
|
|
|
2
2
|
export default {
|
|
3
3
|
title: "Components/Tax And Cash Rewards Table Cell",
|
|
4
4
|
};
|
|
5
|
+
// Reusable timestamps (current date is May 2026)
|
|
6
|
+
const PAST = 1640995200000; // Jan 1, 2022
|
|
7
|
+
const FUTURE = 2779257600000; // ~2058
|
|
5
8
|
const cashReward = {
|
|
6
9
|
id: "68c34fd98a6cb4f5f8394084",
|
|
7
10
|
type: "CREDIT",
|
|
@@ -21,13 +24,13 @@ const cashReward = {
|
|
|
21
24
|
name: "Cash",
|
|
22
25
|
},
|
|
23
26
|
name: null,
|
|
24
|
-
dateCreated:
|
|
25
|
-
dateScheduledFor:
|
|
26
|
-
dateGiven:
|
|
27
|
+
dateCreated: PAST,
|
|
28
|
+
dateScheduledFor: null,
|
|
29
|
+
dateGiven: PAST,
|
|
27
30
|
dateExpires: null,
|
|
28
31
|
dateCancelled: null,
|
|
29
|
-
dateRedeemed:
|
|
30
|
-
dateModified:
|
|
32
|
+
dateRedeemed: null,
|
|
33
|
+
dateModified: PAST,
|
|
31
34
|
rewardSource: "MANUAL",
|
|
32
35
|
fuelTankCode: null,
|
|
33
36
|
fuelTankType: null,
|
|
@@ -60,165 +63,237 @@ const cashReward = {
|
|
|
60
63
|
},
|
|
61
64
|
referral: null,
|
|
62
65
|
description: null,
|
|
63
|
-
statuses: [
|
|
66
|
+
statuses: [],
|
|
64
67
|
rewardRedemptionTransactions: {
|
|
65
68
|
data: null,
|
|
66
69
|
},
|
|
67
70
|
exchangedRewardRedemptionTransaction: null,
|
|
68
71
|
pendingReasons: [],
|
|
72
|
+
rewardedCash: true,
|
|
69
73
|
};
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
const
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
status: null,
|
|
87
|
-
dateCreated: 1355612521321,
|
|
88
|
-
dateScheduled: 2779257600000,
|
|
89
|
-
dateTransferred: null,
|
|
74
|
+
// ============================================================
|
|
75
|
+
// Reusable tax connections
|
|
76
|
+
// ============================================================
|
|
77
|
+
const fullySetupTaxConnection = {
|
|
78
|
+
connected: true,
|
|
79
|
+
taxHandlingEnabled: true,
|
|
80
|
+
connectionStatus: "COMPLETED",
|
|
81
|
+
publisher: {
|
|
82
|
+
requiredTaxDocumentType: "W9",
|
|
83
|
+
currentTaxDocument: {
|
|
84
|
+
status: "ACTIVE",
|
|
85
|
+
type: "W9",
|
|
86
|
+
dateCreated: PAST,
|
|
87
|
+
},
|
|
88
|
+
withdrawalSettings: { paymentMethod: "BANK_TRANSFER" },
|
|
89
|
+
payoutsAccount: null,
|
|
90
90
|
},
|
|
91
91
|
};
|
|
92
|
-
const
|
|
92
|
+
const connectedNoWithdrawalSettings = {
|
|
93
93
|
connected: true,
|
|
94
94
|
taxHandlingEnabled: true,
|
|
95
|
-
connectionStatus: "
|
|
95
|
+
connectionStatus: "COMPLETED",
|
|
96
96
|
publisher: {
|
|
97
|
-
requiredTaxDocumentType: "
|
|
97
|
+
requiredTaxDocumentType: "W9",
|
|
98
98
|
currentTaxDocument: {
|
|
99
|
-
status: "
|
|
100
|
-
type: "
|
|
101
|
-
dateCreated:
|
|
102
|
-
},
|
|
103
|
-
withdrawalSettings: {
|
|
104
|
-
paymentMethod: "BANK_TRANSFER",
|
|
99
|
+
status: "ACTIVE",
|
|
100
|
+
type: "W9",
|
|
101
|
+
dateCreated: PAST,
|
|
105
102
|
},
|
|
103
|
+
withdrawalSettings: null,
|
|
106
104
|
payoutsAccount: null,
|
|
107
105
|
},
|
|
108
106
|
};
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
...taxConnection,
|
|
115
|
-
publisher: {
|
|
116
|
-
requiredTaxDocumentType: "W8BEN",
|
|
117
|
-
currentTaxDocument: {
|
|
118
|
-
status: "",
|
|
119
|
-
},
|
|
120
|
-
...taxConnection.publisher,
|
|
121
|
-
},
|
|
122
|
-
} }));
|
|
123
|
-
};
|
|
124
|
-
export const StatusCellPendingNewTaxForm = () => {
|
|
125
|
-
return (h("sqm-rewards-table-status-cell", { statusText: "Pending", reward: {
|
|
126
|
-
...cashReward,
|
|
127
|
-
statuses: ["PENDING"],
|
|
128
|
-
pendingReasons: ["US_TAX"],
|
|
129
|
-
}, taxConnection: {
|
|
130
|
-
connected: true,
|
|
131
|
-
taxHandlingEnabled: true,
|
|
132
|
-
publisher: {
|
|
133
|
-
requiredTaxDocumentType: "W8BEN",
|
|
134
|
-
withdrawalSettings: {
|
|
135
|
-
paymentMethod: "BANK_TRANSFER",
|
|
136
|
-
},
|
|
137
|
-
payoutsAccount: null,
|
|
138
|
-
currentTaxDocument: {
|
|
139
|
-
status: "INACTIVE",
|
|
140
|
-
type: "W8BEN",
|
|
141
|
-
dateCreated: 321321487,
|
|
142
|
-
},
|
|
143
|
-
},
|
|
144
|
-
} }));
|
|
145
|
-
};
|
|
146
|
-
export const StatusCellPendingTaxSubmission = () => {
|
|
147
|
-
return (h("sqm-rewards-table-status-cell", { statusText: "Pending", reward: { ...cashReward, ...pending, pendingReasons: ["US_TAX"] }, taxConnection: {
|
|
148
|
-
...taxConnection,
|
|
149
|
-
publisher: {
|
|
150
|
-
...taxConnection.publisher,
|
|
151
|
-
requiredTaxDocumentType: "W8BEN",
|
|
152
|
-
currentTaxDocument: null,
|
|
153
|
-
},
|
|
154
|
-
} }));
|
|
155
|
-
};
|
|
156
|
-
export const StatusCellPartnerCreatedSetupStartedButIncomplete = () => {
|
|
157
|
-
return (h("sqm-rewards-table-status-cell", { statusText: "Pending", reward: {
|
|
158
|
-
...cashReward,
|
|
159
|
-
...pending,
|
|
160
|
-
pendingReasons: ["US_TAX"],
|
|
161
|
-
}, taxConnection: {
|
|
162
|
-
...taxConnection,
|
|
163
|
-
connected: false,
|
|
164
|
-
} }));
|
|
165
|
-
};
|
|
166
|
-
export const StatusCellPartnerNotCreatedSetupNotStarted = () => {
|
|
167
|
-
return (h("sqm-rewards-table-status-cell", { statusText: "Pending", reward: {
|
|
168
|
-
...cashReward,
|
|
169
|
-
...pending,
|
|
170
|
-
pendingReasons: ["US_TAX"],
|
|
171
|
-
}, taxConnection: {
|
|
172
|
-
...taxConnection,
|
|
173
|
-
connected: false,
|
|
174
|
-
} }));
|
|
175
|
-
};
|
|
176
|
-
export const StatusCellPendingW9 = () => {
|
|
177
|
-
return (h("sqm-rewards-table-status-cell", { statusText: "Pending", reward: {
|
|
178
|
-
...cashReward,
|
|
179
|
-
...pending,
|
|
180
|
-
pendingReasons: ["US_TAX"],
|
|
181
|
-
}, taxConnection: {
|
|
182
|
-
...taxConnection,
|
|
183
|
-
taxHandlingEnabled: false,
|
|
184
|
-
} }));
|
|
185
|
-
};
|
|
186
|
-
export const StatusCellPayoutSent = () => {
|
|
187
|
-
return (h("sqm-rewards-table-status-cell", { statusText: "Payout Sent", reward: {
|
|
188
|
-
...cashReward,
|
|
189
|
-
partnerFundsTransfer: {
|
|
190
|
-
id: "transfer-123",
|
|
191
|
-
status: "TRANSFERRED",
|
|
192
|
-
dateScheduled: 1640995200000,
|
|
193
|
-
dateTransferred: 1640995200000,
|
|
194
|
-
dateCreated: 1640995200000,
|
|
195
|
-
},
|
|
196
|
-
}, taxConnection: taxConnection }));
|
|
107
|
+
const notConnectedTaxConnection = {
|
|
108
|
+
connected: false,
|
|
109
|
+
taxHandlingEnabled: true,
|
|
110
|
+
connectionStatus: "NOT_STARTED",
|
|
111
|
+
publisher: null,
|
|
197
112
|
};
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
113
|
+
// ============================================================
|
|
114
|
+
// Reward Cell (kept from original)
|
|
115
|
+
// ============================================================
|
|
116
|
+
export const CashReward = () => (h("sqm-rewards-table-reward-cell", { reward: { ...cashReward, statuses: ["REDEEMED"], dateRedeemed: PAST }, availableText: "{availableAmount} remaining" }));
|
|
117
|
+
// ============================================================
|
|
118
|
+
// STATUS PRECEDENCE LADDER — one story per rule
|
|
119
|
+
// (See sqm-rewards-table-status-column-new.feature § 2)
|
|
120
|
+
// ============================================================
|
|
121
|
+
// 1. Fraud check denied the referral → status is Denied
|
|
122
|
+
export const StatusCellFraudDenied = () => (h("sqm-rewards-table-status-cell", { statusText: "Denied", reward: {
|
|
123
|
+
...cashReward,
|
|
124
|
+
referral: { fraudData: { moderationStatus: "DENIED" } },
|
|
125
|
+
}, taxConnection: fullySetupTaxConnection }));
|
|
126
|
+
// 2. Fraud check is still pending review → status is Pending Review
|
|
127
|
+
export const StatusCellFraudPendingReview = () => (h("sqm-rewards-table-status-cell", { statusText: "Pending", reward: {
|
|
128
|
+
...cashReward,
|
|
129
|
+
referral: { fraudData: { moderationStatus: "PENDING" } },
|
|
130
|
+
}, taxConnection: fullySetupTaxConnection }));
|
|
131
|
+
// 3. Partner funds transfer was reversed → status is Payout Cancelled
|
|
132
|
+
export const StatusCellPayoutCancelled = () => (h("sqm-rewards-table-status-cell", { statusText: "Payout Cancelled", reward: {
|
|
133
|
+
...cashReward,
|
|
134
|
+
partnerFundsTransfer: {
|
|
135
|
+
id: "pft-reversed",
|
|
136
|
+
status: "REVERSED",
|
|
137
|
+
dateCreated: PAST,
|
|
138
|
+
dateScheduled: PAST,
|
|
139
|
+
dateTransferred: null,
|
|
140
|
+
},
|
|
141
|
+
}, taxConnection: fullySetupTaxConnection }));
|
|
142
|
+
// 4. Partner funds transfer is overdue → status is Payout Failed
|
|
143
|
+
export const StatusCellPayoutFailed = () => (h("sqm-rewards-table-status-cell", { statusText: "Payout Failed", reward: {
|
|
144
|
+
...cashReward,
|
|
145
|
+
partnerFundsTransfer: {
|
|
146
|
+
id: "pft-overdue",
|
|
147
|
+
status: "OVERDUE",
|
|
148
|
+
dateCreated: PAST,
|
|
149
|
+
dateScheduled: PAST,
|
|
150
|
+
dateTransferred: null,
|
|
151
|
+
},
|
|
152
|
+
}, taxConnection: fullySetupTaxConnection }));
|
|
153
|
+
// 5. Connected partner has not finished withdrawal settings setup → status is Pending
|
|
154
|
+
export const StatusCellPartnerCreatedSetupStartedButIncomplete = () => (h("sqm-rewards-table-status-cell", { statusText: "Pending", reward: {
|
|
155
|
+
...cashReward,
|
|
156
|
+
partnerFundsTransfer: {
|
|
157
|
+
id: "pft-not-yet-due",
|
|
158
|
+
status: "NOT_YET_DUE",
|
|
159
|
+
dateCreated: PAST,
|
|
160
|
+
dateScheduled: FUTURE,
|
|
161
|
+
dateTransferred: null,
|
|
162
|
+
},
|
|
163
|
+
}, taxConnection: connectedNoWithdrawalSettings }));
|
|
164
|
+
// Reward is pending US_TAX and the partner has not been created yet → shows the partner-setup prompt
|
|
165
|
+
export const StatusCellPartnerNotCreatedSetupNotStarted = () => (h("sqm-rewards-table-status-cell", { statusText: "Pending", reward: {
|
|
166
|
+
...cashReward,
|
|
167
|
+
statuses: ["PENDING"],
|
|
168
|
+
pendingReasons: ["US_TAX"],
|
|
169
|
+
}, taxConnection: notConnectedTaxConnection }));
|
|
170
|
+
// 6. Reward has MISSING_PAYOUT_CONFIGURATION pending reason and no withdrawal settings → status is Pending
|
|
171
|
+
export const StatusCellMissingPayoutConfiguration = () => (h("sqm-rewards-table-status-cell", { statusText: "Pending", reward: {
|
|
172
|
+
...cashReward,
|
|
173
|
+
statuses: ["PENDING"],
|
|
174
|
+
pendingReasons: ["MISSING_PAYOUT_CONFIGURATION"],
|
|
175
|
+
}, taxConnection: connectedNoWithdrawalSettings }));
|
|
176
|
+
// 7. Partner funds transfer is scheduled for a future date → status is Processing
|
|
177
|
+
export const StatusCellPayoutProcessing = () => (h("sqm-rewards-table-status-cell", { statusText: "Processing", reward: {
|
|
178
|
+
...cashReward,
|
|
179
|
+
partnerFundsTransfer: {
|
|
180
|
+
id: "pft-processing",
|
|
181
|
+
status: null,
|
|
182
|
+
dateCreated: PAST,
|
|
183
|
+
dateScheduled: FUTURE,
|
|
184
|
+
dateTransferred: null,
|
|
185
|
+
},
|
|
186
|
+
}, taxConnection: fullySetupTaxConnection }));
|
|
187
|
+
// 8. Partner funds transfer has been transferred → status is Payout Approved
|
|
188
|
+
export const StatusCellPayoutApproved = () => (h("sqm-rewards-table-status-cell", { statusText: "Payout Approved", reward: {
|
|
189
|
+
...cashReward,
|
|
190
|
+
partnerFundsTransfer: {
|
|
191
|
+
id: "pft-transferred",
|
|
192
|
+
status: "TRANSFERRED",
|
|
193
|
+
dateCreated: PAST,
|
|
194
|
+
dateScheduled: PAST,
|
|
195
|
+
dateTransferred: PAST,
|
|
196
|
+
},
|
|
197
|
+
}, taxConnection: fullySetupTaxConnection }));
|
|
198
|
+
// 9. Reward has a cancellation date set → status is Cancelled
|
|
199
|
+
export const StatusCellRewardCancelled = () => (h("sqm-rewards-table-status-cell", { statusText: "Cancelled", reward: {
|
|
200
|
+
...cashReward,
|
|
201
|
+
statuses: ["CANCELLED"],
|
|
202
|
+
dateCancelled: PAST,
|
|
203
|
+
}, taxConnection: fullySetupTaxConnection }));
|
|
204
|
+
// 10. Reward statuses include EXPIRED → status is Expired
|
|
205
|
+
export const StatusCellRewardExpired = () => (h("sqm-rewards-table-status-cell", { statusText: "Expired", reward: {
|
|
206
|
+
...cashReward,
|
|
207
|
+
statuses: ["EXPIRED"],
|
|
208
|
+
dateExpires: PAST,
|
|
209
|
+
}, taxConnection: fullySetupTaxConnection }));
|
|
210
|
+
// 11. Reward is pending and scheduled for a future date → status is Pending with the scheduled date shown
|
|
211
|
+
export const StatusCellPendingScheduled = () => (h("sqm-rewards-table-status-cell", { statusText: "Pending", reward: {
|
|
212
|
+
...cashReward,
|
|
213
|
+
statuses: ["PENDING"],
|
|
214
|
+
pendingReasons: ["SCHEDULED"],
|
|
215
|
+
dateScheduledFor: FUTURE,
|
|
216
|
+
}, taxConnection: fullySetupTaxConnection }));
|
|
217
|
+
// 12. Reward does not match any precedence rule → no badge text, no description
|
|
218
|
+
export const StatusCellNoMatchingRule = () => (h("sqm-rewards-table-status-cell", { statusText: "", reward: {
|
|
219
|
+
...cashReward,
|
|
220
|
+
statuses: [],
|
|
221
|
+
}, taxConnection: fullySetupTaxConnection }));
|
|
222
|
+
// ============================================================
|
|
223
|
+
// US_TAX getTaxPendingReasons branches (Pending Description Resolution § 5)
|
|
224
|
+
// ============================================================
|
|
225
|
+
// Reward is pending US_TAX but tax handling is disabled → shows "W-9 required"
|
|
226
|
+
export const StatusCellPendingW9Required = () => (h("sqm-rewards-table-status-cell", { statusText: "Pending", reward: {
|
|
227
|
+
...cashReward,
|
|
228
|
+
statuses: ["PENDING"],
|
|
229
|
+
pendingReasons: ["US_TAX"],
|
|
230
|
+
}, taxConnection: { ...fullySetupTaxConnection, taxHandlingEnabled: false } }));
|
|
231
|
+
// Partner is connected but has not submitted any tax documents → shows the submit-tax-docs prompt
|
|
232
|
+
export const StatusCellPendingTaxSubmission = () => (h("sqm-rewards-table-status-cell", { statusText: "Pending", reward: {
|
|
233
|
+
...cashReward,
|
|
234
|
+
statuses: ["PENDING"],
|
|
235
|
+
pendingReasons: ["US_TAX"],
|
|
236
|
+
}, taxConnection: {
|
|
237
|
+
...fullySetupTaxConnection,
|
|
238
|
+
publisher: {
|
|
239
|
+
...fullySetupTaxConnection.publisher,
|
|
240
|
+
currentTaxDocument: null,
|
|
241
|
+
},
|
|
242
|
+
} }));
|
|
243
|
+
// Partner's tax document is inactive (rejected) → shows the submit-a-new-form prompt
|
|
244
|
+
export const StatusCellPendingNewTaxForm = () => (h("sqm-rewards-table-status-cell", { statusText: "Pending", reward: {
|
|
245
|
+
...cashReward,
|
|
246
|
+
statuses: ["PENDING"],
|
|
247
|
+
pendingReasons: ["US_TAX"],
|
|
248
|
+
}, taxConnection: {
|
|
249
|
+
...fullySetupTaxConnection,
|
|
250
|
+
publisher: {
|
|
251
|
+
...fullySetupTaxConnection.publisher,
|
|
252
|
+
currentTaxDocument: {
|
|
253
|
+
status: "INACTIVE",
|
|
254
|
+
type: "W9",
|
|
255
|
+
dateCreated: PAST,
|
|
207
256
|
},
|
|
208
|
-
}
|
|
209
|
-
};
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
257
|
+
},
|
|
258
|
+
} }));
|
|
259
|
+
// Partner's tax document is awaiting verification → shows the awaiting-review prompt
|
|
260
|
+
export const StatusCellPendingTaxReview = () => (h("sqm-rewards-table-status-cell", { statusText: "Pending", reward: {
|
|
261
|
+
...cashReward,
|
|
262
|
+
statuses: ["PENDING"],
|
|
263
|
+
pendingReasons: ["US_TAX"],
|
|
264
|
+
}, taxConnection: {
|
|
265
|
+
...fullySetupTaxConnection,
|
|
266
|
+
publisher: {
|
|
267
|
+
...fullySetupTaxConnection.publisher,
|
|
268
|
+
currentTaxDocument: {
|
|
269
|
+
status: "NOT_VERIFIED",
|
|
270
|
+
type: "W9",
|
|
271
|
+
dateCreated: PAST,
|
|
222
272
|
},
|
|
223
|
-
}
|
|
224
|
-
};
|
|
273
|
+
},
|
|
274
|
+
} }));
|
|
275
|
+
// Partner has an active tax form but has not configured withdrawal settings → shows the partner-setup prompt
|
|
276
|
+
export const StatusCellExistingTaxFormNoWithdrawalSettings = () => (h("sqm-rewards-table-status-cell", { statusText: "Pending", reward: {
|
|
277
|
+
...cashReward,
|
|
278
|
+
statuses: ["PENDING"],
|
|
279
|
+
pendingReasons: ["US_TAX"],
|
|
280
|
+
}, taxConnection: connectedNoWithdrawalSettings }));
|
|
281
|
+
// Partner is connected, no tax form is required, but withdrawal settings are not submitted → shows the partner-setup prompt
|
|
282
|
+
export const StatusCellConnectedNoTaxRequiredNoWithdrawalSettings = () => (h("sqm-rewards-table-status-cell", { statusText: "Pending", reward: {
|
|
283
|
+
...cashReward,
|
|
284
|
+
statuses: ["PENDING"],
|
|
285
|
+
pendingReasons: [],
|
|
286
|
+
}, taxConnection: {
|
|
287
|
+
connected: true,
|
|
288
|
+
taxHandlingEnabled: true,
|
|
289
|
+
connectionStatus: "COMPLETED",
|
|
290
|
+
publisher: {
|
|
291
|
+
requiredTaxDocumentType: null,
|
|
292
|
+
currentTaxDocument: null,
|
|
293
|
+
withdrawalSettings: null,
|
|
294
|
+
payoutsAccount: null,
|
|
295
|
+
},
|
|
296
|
+
} }));
|
|
297
|
+
// Aliases kept for the table-level stories file
|
|
298
|
+
export const StatusCellPayoutSent = StatusCellPayoutApproved;
|
|
299
|
+
export const StatusCellPendingW9 = StatusCellPendingW9Required;
|
|
@@ -68,7 +68,7 @@ export class RewardTableStatusCell {
|
|
|
68
68
|
this.pendingTaxReview = "Awaiting tax form review.";
|
|
69
69
|
this.pendingNewTaxForm = "Invalid tax form. Submit a new form to receive your rewards.";
|
|
70
70
|
this.pendingTaxSubmission = "Submit your tax documents to receive your rewards.";
|
|
71
|
-
this.pendingPartnerCreation = "Complete your
|
|
71
|
+
this.pendingPartnerCreation = "Complete your cash payout setup to receive your rewards.";
|
|
72
72
|
this.pendingScheduled = "Until";
|
|
73
73
|
this.pendingUnhandled = "Fulfillment error";
|
|
74
74
|
this.pendingReviewText = "Awaiting review";
|
|
@@ -79,16 +79,26 @@ export class RewardTableStatusCell {
|
|
|
79
79
|
this.payoutProcessing = "Processing until {date}. Payout is then scheduled based on your settings.";
|
|
80
80
|
}
|
|
81
81
|
rewardStatus(reward) {
|
|
82
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
82
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
83
83
|
const hasExpired = (_a = reward.statuses) === null || _a === void 0 ? void 0 : _a.includes("EXPIRED");
|
|
84
84
|
const isPending = (_b = reward.statuses) === null || _b === void 0 ? void 0 : _b.includes("PENDING");
|
|
85
85
|
const integrationOrFueltankReward = reward.type === "INTEGRATION" || reward.type === "FUELTANK";
|
|
86
|
+
// AL: TODO Scott said we should change this to use pendingReasons instead of fraudStatus - probably dont want to change this for backwards compatibility
|
|
86
87
|
const fraudStatus = (_d = (_c = reward.referral) === null || _c === void 0 ? void 0 : _c.fraudData) === null || _d === void 0 ? void 0 : _d.moderationStatus;
|
|
87
88
|
if (fraudStatus === "DENIED")
|
|
88
89
|
return "DENIED";
|
|
89
90
|
if (fraudStatus === "PENDING")
|
|
90
91
|
return "PENDING_REVIEW";
|
|
91
|
-
const
|
|
92
|
+
const isCashReward = reward.rewardedCash;
|
|
93
|
+
console.log(this.reward, "reward in status cell");
|
|
94
|
+
// pft can now be created before withdrawal settings exist
|
|
95
|
+
if (isCashReward) {
|
|
96
|
+
if (!((_e = this.taxConnection) === null || _e === void 0 ? void 0 : _e.connected) ||
|
|
97
|
+
(((_f = this.taxConnection) === null || _f === void 0 ? void 0 : _f.connected) &&
|
|
98
|
+
!((_h = (_g = this.taxConnection) === null || _g === void 0 ? void 0 : _g.publisher) === null || _h === void 0 ? void 0 : _h.withdrawalSettings)))
|
|
99
|
+
return "PENDING";
|
|
100
|
+
}
|
|
101
|
+
const partnerTransferStatus = (_j = reward.partnerFundsTransfer) === null || _j === void 0 ? void 0 : _j.status;
|
|
92
102
|
if (reward.partnerFundsTransfer) {
|
|
93
103
|
if (partnerTransferStatus === "REVERSED")
|
|
94
104
|
return "PAYOUT_CANCELLED";
|
|
@@ -113,24 +123,24 @@ export class RewardTableStatusCell {
|
|
|
113
123
|
if (isPending)
|
|
114
124
|
return "PENDING";
|
|
115
125
|
if (reward.type === "CREDIT") {
|
|
116
|
-
return ((
|
|
126
|
+
return ((_k = reward.statuses) === null || _k === void 0 ? void 0 : _k.includes("REDEEMED")) ? "REDEEMED" : "AVAILABLE";
|
|
117
127
|
}
|
|
118
|
-
if (reward.type === "PCT_DISCOUNT" && ((
|
|
128
|
+
if (reward.type === "PCT_DISCOUNT" && ((_l = reward.statuses) === null || _l === void 0 ? void 0 : _l.includes("AVAILABLE"))) {
|
|
119
129
|
return "AVAILABLE";
|
|
120
130
|
}
|
|
121
131
|
if (integrationOrFueltankReward && isPending) {
|
|
122
132
|
return "PENDING";
|
|
123
133
|
}
|
|
124
|
-
if (integrationOrFueltankReward && ((
|
|
134
|
+
if (integrationOrFueltankReward && ((_m = reward.statuses) === null || _m === void 0 ? void 0 : _m.includes("CANCELLED"))) {
|
|
125
135
|
return "CANCELLED";
|
|
126
136
|
}
|
|
127
|
-
if (integrationOrFueltankReward && ((
|
|
137
|
+
if (integrationOrFueltankReward && ((_o = reward.statuses) === null || _o === void 0 ? void 0 : _o.includes("AVAILABLE"))) {
|
|
128
138
|
return "AVAILABLE";
|
|
129
139
|
}
|
|
130
140
|
return "";
|
|
131
141
|
}
|
|
132
142
|
getTaxPendingReasons(reward, taxConnection) {
|
|
133
|
-
var _a, _b, _c, _d, _e;
|
|
143
|
+
var _a, _b, _c, _d, _e, _f;
|
|
134
144
|
if ((_a = reward === null || reward === void 0 ? void 0 : reward.pendingReasons) === null || _a === void 0 ? void 0 : _a.includes("US_TAX")) {
|
|
135
145
|
if (!(taxConnection === null || taxConnection === void 0 ? void 0 : taxConnection.taxHandlingEnabled))
|
|
136
146
|
return this.pendingUsTax;
|
|
@@ -145,12 +155,22 @@ export class RewardTableStatusCell {
|
|
|
145
155
|
if (status === "NOT_VERIFIED")
|
|
146
156
|
return this.pendingTaxReview;
|
|
147
157
|
}
|
|
148
|
-
if (!((_d = taxConnection === null || taxConnection === void 0 ? void 0 : taxConnection.publisher) === null || _d === void 0 ? void 0 : _d.withdrawalSettings))
|
|
158
|
+
if (!((_d = taxConnection === null || taxConnection === void 0 ? void 0 : taxConnection.publisher) === null || _d === void 0 ? void 0 : _d.withdrawalSettings)) {
|
|
149
159
|
return this.pendingPartnerCreation;
|
|
160
|
+
}
|
|
150
161
|
}
|
|
151
162
|
if ((_e = reward === null || reward === void 0 ? void 0 : reward.pendingReasons) === null || _e === void 0 ? void 0 : _e.includes("MISSING_PAYOUT_CONFIGURATION")) {
|
|
152
163
|
return this.pendingPartnerCreation;
|
|
153
164
|
}
|
|
165
|
+
// Fallback: when rewardStatus() forced PENDING because the user is
|
|
166
|
+
// connected but hasn't set up withdrawal settings (no pendingReasons
|
|
167
|
+
// were returned by the API, e.g. for credit rewards with a PFT).
|
|
168
|
+
if (reward.rewardedCash) {
|
|
169
|
+
if (!(taxConnection === null || taxConnection === void 0 ? void 0 : taxConnection.connected) ||
|
|
170
|
+
((taxConnection === null || taxConnection === void 0 ? void 0 : taxConnection.connected) &&
|
|
171
|
+
!((_f = taxConnection === null || taxConnection === void 0 ? void 0 : taxConnection.publisher) === null || _f === void 0 ? void 0 : _f.withdrawalSettings)))
|
|
172
|
+
return this.pendingPartnerCreation;
|
|
173
|
+
}
|
|
154
174
|
return "";
|
|
155
175
|
}
|
|
156
176
|
getBadgeType(rewardStatus) {
|
|
@@ -447,7 +467,7 @@ export class RewardTableStatusCell {
|
|
|
447
467
|
},
|
|
448
468
|
"attribute": "pending-partner-creation",
|
|
449
469
|
"reflect": false,
|
|
450
|
-
"defaultValue": "\"Complete your
|
|
470
|
+
"defaultValue": "\"Complete your cash payout setup to receive your rewards.\""
|
|
451
471
|
},
|
|
452
472
|
"pendingScheduled": {
|
|
453
473
|
"type": "string",
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export const SHOW_CODE_NAMESPACE = "sq:code-verification";
|
|
2
|
+
export const SHOW_PARTNER_MODAL_NAMESPACE = "sq:show-partner-modal";
|
|
3
|
+
export const PARTNER_CREATED_NAMESPACE = "sq:partner-created";
|
|
2
4
|
export const VERIFICATION_EMAIL_NAMESPACE = "sq:verification-email";
|
|
3
5
|
export const VERIFICATION_PARENT_NAMESPACE = "sq:verification-context";
|
|
4
6
|
export const VERIFICATION_EVENT_KEY = "sq:code-verified";
|
|
@@ -52,16 +52,6 @@ export class WidgetVerification {
|
|
|
52
52
|
* @uiGroup General Text
|
|
53
53
|
*/
|
|
54
54
|
this.general_widgetHeaderWithPartnerCreation = "Let's get you ready for rewards";
|
|
55
|
-
/**
|
|
56
|
-
* @uiName General verify widget header text
|
|
57
|
-
* @uiGroup General Text
|
|
58
|
-
*/
|
|
59
|
-
this.general_verifyEmailHeader = "Verify your email";
|
|
60
|
-
/**
|
|
61
|
-
* @uiName General verify widget description text
|
|
62
|
-
* @uiGroup General Text
|
|
63
|
-
*/
|
|
64
|
-
this.general_verifyEmailDescription = "To get your cash paid out directly to your bank account, please complete your account setup";
|
|
65
55
|
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
66
56
|
EMAIL STEP PROPS
|
|
67
57
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
|
|
@@ -246,7 +236,6 @@ export class WidgetVerification {
|
|
|
246
236
|
if (props.showPartnerModal && ((_a = partnerState === null || partnerState === void 0 ? void 0 : partnerState.states) === null || _a === void 0 ? void 0 : _a.open) === false) {
|
|
247
237
|
return h("div", null);
|
|
248
238
|
}
|
|
249
|
-
// const generalText = this.getStepTextProps("general_");
|
|
250
239
|
const partnerText = this.getStepTextProps("createPartnerStep_");
|
|
251
240
|
const dialogLabel = this.general_widgetHeaderWithPartnerCreation;
|
|
252
241
|
const renderStepContent = () => {
|
|
@@ -298,54 +287,6 @@ export class WidgetVerification {
|
|
|
298
287
|
"reflect": false,
|
|
299
288
|
"defaultValue": "\"Let's get you ready for rewards\""
|
|
300
289
|
},
|
|
301
|
-
"general_verifyEmailHeader": {
|
|
302
|
-
"type": "string",
|
|
303
|
-
"mutable": false,
|
|
304
|
-
"complexType": {
|
|
305
|
-
"original": "string",
|
|
306
|
-
"resolved": "string",
|
|
307
|
-
"references": {}
|
|
308
|
-
},
|
|
309
|
-
"required": false,
|
|
310
|
-
"optional": false,
|
|
311
|
-
"docs": {
|
|
312
|
-
"tags": [{
|
|
313
|
-
"text": "General verify widget header text",
|
|
314
|
-
"name": "uiName"
|
|
315
|
-
}, {
|
|
316
|
-
"text": "General Text",
|
|
317
|
-
"name": "uiGroup"
|
|
318
|
-
}],
|
|
319
|
-
"text": ""
|
|
320
|
-
},
|
|
321
|
-
"attribute": "general_verify-email-header",
|
|
322
|
-
"reflect": false,
|
|
323
|
-
"defaultValue": "\"Verify your email\""
|
|
324
|
-
},
|
|
325
|
-
"general_verifyEmailDescription": {
|
|
326
|
-
"type": "string",
|
|
327
|
-
"mutable": false,
|
|
328
|
-
"complexType": {
|
|
329
|
-
"original": "string",
|
|
330
|
-
"resolved": "string",
|
|
331
|
-
"references": {}
|
|
332
|
-
},
|
|
333
|
-
"required": false,
|
|
334
|
-
"optional": false,
|
|
335
|
-
"docs": {
|
|
336
|
-
"tags": [{
|
|
337
|
-
"text": "General verify widget description text",
|
|
338
|
-
"name": "uiName"
|
|
339
|
-
}, {
|
|
340
|
-
"text": "General Text",
|
|
341
|
-
"name": "uiGroup"
|
|
342
|
-
}],
|
|
343
|
-
"text": ""
|
|
344
|
-
},
|
|
345
|
-
"attribute": "general_verify-email-description",
|
|
346
|
-
"reflect": false,
|
|
347
|
-
"defaultValue": "\"To get your cash paid out directly to your bank account, please complete your account setup\""
|
|
348
|
-
},
|
|
349
290
|
"emailStep_verifyEmailHeaderText": {
|
|
350
291
|
"type": "string",
|
|
351
292
|
"mutable": false,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { useLazyQuery, useParentState, useSetParent,
|
|
1
|
+
import { useLazyQuery, useParentState, useSetParent, } from "@saasquatch/component-boilerplate";
|
|
2
2
|
import { useState } from "@saasquatch/stencil-hooks";
|
|
3
3
|
import { useEffect } from "@saasquatch/universal-hooks";
|
|
4
4
|
import { gql } from "graphql-request";
|
|
5
|
-
import { SHOW_CODE_NAMESPACE,
|
|
5
|
+
import { PARTNER_CREATED_NAMESPACE, SHOW_CODE_NAMESPACE, SHOW_PARTNER_MODAL_NAMESPACE, VERIFICATION_PARENT_NAMESPACE, } from "./keys";
|
|
6
6
|
const USER_LOOKUP = gql `
|
|
7
7
|
query checkUserVerification {
|
|
8
8
|
viewer {
|
|
@@ -23,18 +23,20 @@ const USER_LOOKUP = gql `
|
|
|
23
23
|
}
|
|
24
24
|
`;
|
|
25
25
|
export function useWidgetVerification() {
|
|
26
|
-
const
|
|
27
|
-
const [showCode, setShowCode] = useParentState({
|
|
26
|
+
const [showCode] = useParentState({
|
|
28
27
|
namespace: SHOW_CODE_NAMESPACE,
|
|
29
28
|
initialValue: false,
|
|
30
29
|
});
|
|
31
|
-
const [email, setEmail] = useParentState({
|
|
32
|
-
namespace: VERIFICATION_EMAIL_NAMESPACE,
|
|
33
|
-
initialValue: userIdentity === null || userIdentity === void 0 ? void 0 : userIdentity.email,
|
|
34
|
-
});
|
|
35
30
|
const setContext = useSetParent(VERIFICATION_PARENT_NAMESPACE);
|
|
36
31
|
const [loading, setLoading] = useState(true);
|
|
37
|
-
const [showPartnerModal, setShowPartnerModal] =
|
|
32
|
+
const [showPartnerModal, setShowPartnerModal] = useParentState({
|
|
33
|
+
namespace: SHOW_PARTNER_MODAL_NAMESPACE,
|
|
34
|
+
initialValue: false,
|
|
35
|
+
});
|
|
36
|
+
const [partnerCreated, setPartnerCreated] = useParentState({
|
|
37
|
+
namespace: PARTNER_CREATED_NAMESPACE,
|
|
38
|
+
initialValue: false,
|
|
39
|
+
});
|
|
38
40
|
const [fetch] = useLazyQuery(USER_LOOKUP);
|
|
39
41
|
useEffect(() => {
|
|
40
42
|
const checkUser = async () => {
|
|
@@ -69,7 +71,18 @@ export function useWidgetVerification() {
|
|
|
69
71
|
};
|
|
70
72
|
const onPartnerModalComplete = () => {
|
|
71
73
|
setShowPartnerModal(false);
|
|
74
|
+
setPartnerCreated(false);
|
|
72
75
|
setContext(true);
|
|
73
76
|
};
|
|
74
|
-
|
|
77
|
+
useEffect(() => {
|
|
78
|
+
if (partnerCreated)
|
|
79
|
+
onPartnerModalComplete();
|
|
80
|
+
}, [partnerCreated]);
|
|
81
|
+
return {
|
|
82
|
+
showCode,
|
|
83
|
+
showPartnerModal,
|
|
84
|
+
onVerification,
|
|
85
|
+
onPartnerModalComplete,
|
|
86
|
+
loading,
|
|
87
|
+
};
|
|
75
88
|
}
|