@saasquatch/mint-components 1.16.0-2 → 1.16.0-21
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/loader.cjs.js +1 -1
- package/dist/cjs/mint-components.cjs.js +1 -1
- package/dist/cjs/sqm-banking-info-form_17.cjs.entry.js +107 -29
- package/dist/cjs/sqm-big-stat_43.cjs.entry.js +50 -4
- package/dist/cjs/sqm-qr-code.cjs.entry.js +1 -13
- package/dist/cjs/sqm-referral-table_11.cjs.entry.js +2 -2
- package/dist/cjs/sqm-rewards-table_9.cjs.entry.js +1 -1
- package/dist/cjs/sqm-stencilbook.cjs.entry.js +2 -2
- package/dist/cjs/{usePayoutStatus-c84a7d98.js → usePayoutStatus-d459ddde.js} +32 -11
- package/dist/collection/components/sqm-name-fields/sqm-name-fields.js +1 -1
- package/dist/collection/components/sqm-qr-code/useQRCode.js +1 -13
- package/dist/collection/components/sqm-referral-table/cells/sqm-referral-table-rewards-cell.js +2 -2
- package/dist/collection/components/sqm-referral-table/columns/sqm-referral-table-rewards-column.js +3 -3
- package/dist/collection/components/sqm-referral-table/sqm-referral-table.js +1 -1
- package/dist/collection/components/sqm-rewards-table/columns/sqm-rewards-table-source-column.js +1 -1
- package/dist/collection/components/sqm-rewards-table/columns/sqm-rewards-table-status-column.js +3 -3
- package/dist/collection/components/sqm-rewards-table/sqm-rewards-table.js +1 -1
- package/dist/collection/components/tax-and-cash/sqm-banking-info-form/useBankingInfoForm.js +4 -0
- package/dist/collection/components/tax-and-cash/sqm-docusign-form/sqm-docusign-form.js +2 -2
- package/dist/collection/components/tax-and-cash/sqm-indirect-tax-form/useIndirectTaxForm.js +4 -0
- package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert-view.js +41 -3
- package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert.js +51 -1
- package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/usePayoutStatus.js +32 -11
- package/dist/collection/components/tax-and-cash/sqm-tax-and-cash/sqm-tax-and-cash.js +81 -2
- package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard-view.js +48 -12
- package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard.js +76 -27
- package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/useTaxAndCashDashboard.js +22 -11
- package/dist/collection/components/tax-and-cash/sqm-user-info-form/useUserInfoForm.js +4 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/mint-components.js +1 -1
- package/dist/esm/sqm-banking-info-form_17.entry.js +108 -30
- package/dist/esm/sqm-big-stat_43.entry.js +50 -4
- package/dist/esm/sqm-qr-code.entry.js +1 -13
- package/dist/esm/sqm-referral-table_11.entry.js +2 -2
- package/dist/esm/sqm-rewards-table_9.entry.js +1 -1
- package/dist/esm/sqm-stencilbook.entry.js +2 -2
- package/dist/esm/{usePayoutStatus-f07bcf90.js → usePayoutStatus-4a7625b9.js} +32 -11
- 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_17.entry.js +1 -1
- package/dist/esm-es5/sqm-big-stat_43.entry.js +1 -1
- package/dist/esm-es5/sqm-qr-code.entry.js +1 -1
- 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/{usePayoutStatus-f07bcf90.js → usePayoutStatus-4a7625b9.js} +2 -2
- package/dist/mint-components/mint-components.esm.js +1 -1
- package/dist/mint-components/p-0309fdfa.entry.js +1 -0
- package/dist/mint-components/{p-9a176cdf.entry.js → p-05389a8e.entry.js} +7 -7
- package/dist/mint-components/{p-c46a0007.entry.js → p-1a838f4d.entry.js} +1 -1
- package/dist/mint-components/{p-eff2e68b.entry.js → p-267c8f8c.entry.js} +2 -2
- package/dist/mint-components/p-2bf6eef0.entry.js +211 -0
- package/dist/mint-components/p-37996351.system.js +1 -1
- package/dist/mint-components/{p-776733b5.system.entry.js → p-37a4452c.system.entry.js} +1 -1
- package/dist/mint-components/{p-6bb25c02.js → p-3b2f1211.js} +9 -3
- package/dist/mint-components/p-4b29afb2.system.entry.js +1 -0
- package/dist/mint-components/p-8b584c46.system.entry.js +1 -0
- package/dist/mint-components/p-986d4c17.system.entry.js +1 -0
- package/dist/mint-components/{p-0c9debc1.system.js → p-9f22f58a.system.js} +2 -2
- package/dist/mint-components/p-a12f854d.system.entry.js +1 -0
- package/dist/mint-components/{p-0e864c3c.system.entry.js → p-beba8f57.system.entry.js} +1 -1
- package/dist/mint-components/p-c9b08184.entry.js +17 -0
- package/dist/types/components/sqm-name-fields/sqm-name-fields.d.ts +1 -1
- package/dist/types/components/sqm-referral-table/columns/sqm-referral-table-rewards-column.d.ts +1 -1
- package/dist/types/components/sqm-referral-table/sqm-referral-table.d.ts +1 -1
- package/dist/types/components/sqm-rewards-table/columns/sqm-rewards-table-source-column.d.ts +1 -1
- package/dist/types/components/sqm-rewards-table/columns/sqm-rewards-table-status-column.d.ts +1 -1
- package/dist/types/components/sqm-rewards-table/sqm-rewards-table.d.ts +1 -1
- package/dist/types/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert-view.d.ts +4 -1
- package/dist/types/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert.d.ts +8 -0
- package/dist/types/components/tax-and-cash/sqm-payout-status-alert/usePayoutStatus.d.ts +8 -1
- package/dist/types/components/tax-and-cash/sqm-tax-and-cash/sqm-tax-and-cash.d.ts +13 -0
- package/dist/types/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard-view.d.ts +4 -1
- package/dist/types/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard.d.ts +12 -5
- package/dist/types/components.d.ts +66 -10
- 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/mint-components/p-0c78815e.system.entry.js +0 -1
- package/dist/mint-components/p-1c67bf1c.system.entry.js +0 -1
- package/dist/mint-components/p-43b4bb99.entry.js +0 -1
- package/dist/mint-components/p-47bd2d7a.entry.js +0 -205
- package/dist/mint-components/p-53730ffe.entry.js +0 -17
- package/dist/mint-components/p-6f65f9e1.system.entry.js +0 -1
- package/dist/mint-components/p-ef75f3a9.system.entry.js +0 -1
- package/dist/types/global/android.d.ts +0 -7
- package/dist/types/global/demo.d.ts +0 -2
- package/dist/types/stories/features.d.ts +0 -4
- package/dist/types/stories/templates.d.ts +0 -4
|
@@ -130,10 +130,46 @@ export function PayoutStatusAlertView(props) {
|
|
|
130
130
|
class: sheet.classes.ErrorAlertContainer,
|
|
131
131
|
};
|
|
132
132
|
case "OVER_W9_THRESHOLD":
|
|
133
|
+
if (states.enforceUsTaxComplianceOption === "CASH_ONLY_DEFER_W9") {
|
|
134
|
+
return {
|
|
135
|
+
header: text.w9RequiredHeader,
|
|
136
|
+
description: intl.formatMessage({
|
|
137
|
+
id: "w9RequiredDescription",
|
|
138
|
+
defaultMessage: text.w9RequiredDescription,
|
|
139
|
+
}, {
|
|
140
|
+
termsAndConditions: (h("a", { target: "_blank", href: `https://terms.advocate.impact.com/PayoutTermsAndConditions.html` }, text.termsAndConditions)),
|
|
141
|
+
}),
|
|
142
|
+
buttonText: text.w9RequiredButtonText,
|
|
143
|
+
alertType: "warning",
|
|
144
|
+
icon: "exclamation-triangle",
|
|
145
|
+
class: sheet.classes.WarningAlertContainer,
|
|
146
|
+
};
|
|
147
|
+
}
|
|
148
|
+
else {
|
|
149
|
+
return {
|
|
150
|
+
header: text.holdHeader,
|
|
151
|
+
description: intl.formatMessage({
|
|
152
|
+
id: "holdDescription",
|
|
153
|
+
defaultMessage: text.holdDescription,
|
|
154
|
+
}, {
|
|
155
|
+
supportLink: (h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
|
|
156
|
+
}),
|
|
157
|
+
buttonText: null,
|
|
158
|
+
alertType: "warning",
|
|
159
|
+
icon: "exclamation-triangle",
|
|
160
|
+
class: sheet.classes.WarningAlertContainer,
|
|
161
|
+
};
|
|
162
|
+
}
|
|
163
|
+
case "ACCOUNT_REVIEW":
|
|
133
164
|
return {
|
|
134
|
-
header: text.
|
|
135
|
-
description: intl.formatMessage({
|
|
136
|
-
|
|
165
|
+
header: text.accountReviewHeader,
|
|
166
|
+
description: intl.formatMessage({
|
|
167
|
+
id: "accountReviewDescription",
|
|
168
|
+
defaultMessage: text.accountReviewDescription,
|
|
169
|
+
}, {
|
|
170
|
+
supportLink: (h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
|
|
171
|
+
}),
|
|
172
|
+
buttonText: null,
|
|
137
173
|
alertType: "warning",
|
|
138
174
|
icon: "exclamation-triangle",
|
|
139
175
|
class: sheet.classes.WarningAlertContainer,
|
|
@@ -159,6 +195,8 @@ export function PayoutStatusAlertView(props) {
|
|
|
159
195
|
function getButton(status) {
|
|
160
196
|
switch (status) {
|
|
161
197
|
case "OVER_W9_THRESHOLD":
|
|
198
|
+
if (states.enforceUsTaxComplianceOption === "CASH_ONLY")
|
|
199
|
+
return;
|
|
162
200
|
return data.type === "SquatchJS2" ? (h("sqm-scroll", { "scroll-tag-name": "sqm-tabs", "button-text": text.w9RequiredButtonText, "scroll-animation": "smooth" })) : data.type === "SquatchPortal" ? (h("sl-button", { type: "default", onClick: callbacks.onTermsClick }, text.w9RequiredButtonText)) : (
|
|
163
201
|
// Demo case
|
|
164
202
|
h("sl-button", { type: "default" }, text.w9RequiredButtonText));
|
package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert.js
CHANGED
|
@@ -60,6 +60,14 @@ export class PayoutStatusAlert {
|
|
|
60
60
|
* @uiName Verification failed internal alert description
|
|
61
61
|
*/
|
|
62
62
|
this.verificationFailedInternalDescription = "Identity verification has failed. Our team is reviewing the report and will contact you with further information. If you don't hear from us contact our {supportLink}.";
|
|
63
|
+
/**
|
|
64
|
+
* @uiName Account review alert header
|
|
65
|
+
*/
|
|
66
|
+
this.accountReviewHeader = "Your account is under review";
|
|
67
|
+
/**
|
|
68
|
+
* @uiName Account review alert description
|
|
69
|
+
*/
|
|
70
|
+
this.accountReviewDescription = "This process takes 48 hours, payouts are on hold until it's completed. You will receive an email from our referral provider, Impact.com, if any issues arise. It contains details on how to resolve this issue. If you need further assistance, please reach out to our {supportLink}.";
|
|
63
71
|
/**
|
|
64
72
|
* @uiName W9 payment threshold alert header
|
|
65
73
|
*/
|
|
@@ -367,6 +375,48 @@ export class PayoutStatusAlert {
|
|
|
367
375
|
"reflect": false,
|
|
368
376
|
"defaultValue": "\"Identity verification has failed. Our team is reviewing the report and will contact you with further information. If you don't hear from us contact our {supportLink}.\""
|
|
369
377
|
},
|
|
378
|
+
"accountReviewHeader": {
|
|
379
|
+
"type": "string",
|
|
380
|
+
"mutable": false,
|
|
381
|
+
"complexType": {
|
|
382
|
+
"original": "string",
|
|
383
|
+
"resolved": "string",
|
|
384
|
+
"references": {}
|
|
385
|
+
},
|
|
386
|
+
"required": false,
|
|
387
|
+
"optional": false,
|
|
388
|
+
"docs": {
|
|
389
|
+
"tags": [{
|
|
390
|
+
"text": "Account review alert header",
|
|
391
|
+
"name": "uiName"
|
|
392
|
+
}],
|
|
393
|
+
"text": ""
|
|
394
|
+
},
|
|
395
|
+
"attribute": "account-review-header",
|
|
396
|
+
"reflect": false,
|
|
397
|
+
"defaultValue": "\"Your account is under review\""
|
|
398
|
+
},
|
|
399
|
+
"accountReviewDescription": {
|
|
400
|
+
"type": "string",
|
|
401
|
+
"mutable": false,
|
|
402
|
+
"complexType": {
|
|
403
|
+
"original": "string",
|
|
404
|
+
"resolved": "string",
|
|
405
|
+
"references": {}
|
|
406
|
+
},
|
|
407
|
+
"required": false,
|
|
408
|
+
"optional": false,
|
|
409
|
+
"docs": {
|
|
410
|
+
"tags": [{
|
|
411
|
+
"text": "Account review alert description",
|
|
412
|
+
"name": "uiName"
|
|
413
|
+
}],
|
|
414
|
+
"text": ""
|
|
415
|
+
},
|
|
416
|
+
"attribute": "account-review-description",
|
|
417
|
+
"reflect": false,
|
|
418
|
+
"defaultValue": "\"This process takes 48 hours, payouts are on hold until it's completed. You will receive an email from our referral provider, Impact.com, if any issues arise. It contains details on how to resolve this issue. If you need further assistance, please reach out to our {supportLink}.\""
|
|
419
|
+
},
|
|
370
420
|
"w9RequiredHeader": {
|
|
371
421
|
"type": "string",
|
|
372
422
|
"mutable": false,
|
|
@@ -582,7 +632,7 @@ export class PayoutStatusAlert {
|
|
|
582
632
|
"mutable": false,
|
|
583
633
|
"complexType": {
|
|
584
634
|
"original": "DemoData<PayoutStatusAlertViewProps>",
|
|
585
|
-
"resolved": "{ states?: { error: boolean; loading: boolean; status: PayoutStatus; veriffLoading: boolean; }; data?: { type: \"SquatchJS2\" | \"SquatchAndroid\" | \"SquatchIOS\" | \"SquatchPortal\" | \"SquatchAdmin\" | \"None\"; }; }",
|
|
635
|
+
"resolved": "{ states?: { error: boolean; loading: boolean; status: PayoutStatus; veriffLoading: boolean; enforceUsTaxComplianceOption?: EnforceUsTaxComplianceOption; }; data?: { type: \"SquatchJS2\" | \"SquatchAndroid\" | \"SquatchIOS\" | \"SquatchPortal\" | \"SquatchAdmin\" | \"None\"; }; }",
|
|
586
636
|
"references": {
|
|
587
637
|
"DemoData": {
|
|
588
638
|
"location": "import",
|
|
@@ -22,34 +22,43 @@ const GET_USER_STATUS = gql `
|
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
`;
|
|
25
|
+
const GET_TAX_SETTING = gql `
|
|
26
|
+
query getTenantSettings {
|
|
27
|
+
tenantSettings {
|
|
28
|
+
enforceUsTaxCompliance
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
`;
|
|
25
32
|
export function getStatus(data) {
|
|
26
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m
|
|
33
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
27
34
|
const account = (_b = (_a = data.user.impactConnection) === null || _a === void 0 ? void 0 : _a.publisher) === null || _b === void 0 ? void 0 : _b.payoutsAccount;
|
|
28
35
|
if (!((_d = (_c = data.user) === null || _c === void 0 ? void 0 : _c.impactConnection) === null || _d === void 0 ? void 0 : _d.connected) || !account)
|
|
29
36
|
return "INFORMATION_REQUIRED";
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
}
|
|
33
|
-
const currentTaxDocument = (_h = (_g = data.user.impactConnection) === null || _g === void 0 ? void 0 : _g.publisher) === null || _h === void 0 ? void 0 : _h.currentTaxDocument;
|
|
34
|
-
if (((_j = account.holdReasons) === null || _j === void 0 ? void 0 : _j.includes("NO_W9_DOCUMENT")) && !currentTaxDocument)
|
|
37
|
+
const currentTaxDocument = (_f = (_e = data.user.impactConnection) === null || _e === void 0 ? void 0 : _e.publisher) === null || _f === void 0 ? void 0 : _f.currentTaxDocument;
|
|
38
|
+
if (((_g = account.holdReasons) === null || _g === void 0 ? void 0 : _g.includes("NO_W9_DOCUMENT")) && !currentTaxDocument)
|
|
35
39
|
return "OVER_W9_THRESHOLD";
|
|
36
|
-
if ((
|
|
40
|
+
if ((_h = account.holdReasons) === null || _h === void 0 ? void 0 : _h.includes("IDV_CHECK_REQUIRED"))
|
|
37
41
|
return "VERIFICATION:REQUIRED";
|
|
38
|
-
if ((
|
|
42
|
+
if ((_j = account.holdReasons) === null || _j === void 0 ? void 0 : _j.includes("IDV_CHECK_REQUIRED_INTERNAL"))
|
|
39
43
|
return "VERIFICATION:INTERNAL";
|
|
40
|
-
if ((
|
|
44
|
+
if ((_k = account.holdReasons) === null || _k === void 0 ? void 0 : _k.includes("IDV_CHECK_REVIEW_INTERNAL"))
|
|
41
45
|
return "VERIFICATION:REVIEW";
|
|
42
|
-
if ((
|
|
46
|
+
if ((_l = account.holdReasons) === null || _l === void 0 ? void 0 : _l.includes("IDV_CHECK_FAILED_INTERNAL"))
|
|
43
47
|
return "VERIFICATION:FAILED";
|
|
48
|
+
if ((_m = account.holdReasons) === null || _m === void 0 ? void 0 : _m.includes("NEW_PAYEE_REVIEW"))
|
|
49
|
+
return "ACCOUNT_REVIEW";
|
|
44
50
|
if (account.hold)
|
|
45
51
|
return "HOLD";
|
|
46
52
|
return "DONE";
|
|
47
53
|
}
|
|
48
54
|
export function usePayoutStatus(props) {
|
|
55
|
+
var _a;
|
|
49
56
|
const { type } = getEnvironmentSDK();
|
|
50
57
|
const { loading, data, errors, refetch } = useQuery(GET_USER_STATUS, {});
|
|
58
|
+
const { data: taxSettingRes } = useQuery(GET_TAX_SETTING, {});
|
|
51
59
|
const { render, loading: veriffLoading, errors: veriffErrors, } = useVeriffApp();
|
|
52
60
|
const [status, setStatus] = useState(undefined);
|
|
61
|
+
const enforceUsTaxComplianceOption = (_a = taxSettingRes === null || taxSettingRes === void 0 ? void 0 : taxSettingRes.tenantSettings) === null || _a === void 0 ? void 0 : _a.enforceUsTaxCompliance;
|
|
53
62
|
useEffect(() => {
|
|
54
63
|
if (!data)
|
|
55
64
|
return;
|
|
@@ -65,17 +74,29 @@ export function usePayoutStatus(props) {
|
|
|
65
74
|
window.removeEventListener(VERIFF_COMPLETE_EVENT_KEY, cb);
|
|
66
75
|
};
|
|
67
76
|
}, []);
|
|
77
|
+
const onTermsClick = () => {
|
|
78
|
+
let url = props.cashPayoutsPageUrl;
|
|
79
|
+
if (url.includes("#"))
|
|
80
|
+
url = url.split("#")[0];
|
|
81
|
+
if (status === "INFORMATION_REQUIRED")
|
|
82
|
+
url += "#1";
|
|
83
|
+
else if (status === "OVER_W9_THRESHOLD" &&
|
|
84
|
+
enforceUsTaxComplianceOption === "CASH_ONLY_DEFER_W9")
|
|
85
|
+
url += "#3";
|
|
86
|
+
window.history.pushState(null, "", url);
|
|
87
|
+
};
|
|
68
88
|
return {
|
|
69
89
|
states: {
|
|
70
90
|
loading,
|
|
71
91
|
veriffLoading,
|
|
72
92
|
status,
|
|
73
93
|
error: !!errors,
|
|
94
|
+
enforceUsTaxComplianceOption,
|
|
74
95
|
},
|
|
75
96
|
data: { type },
|
|
76
97
|
text: props.getTextProps(),
|
|
77
98
|
callbacks: {
|
|
78
|
-
onTermsClick
|
|
99
|
+
onTermsClick,
|
|
79
100
|
onClick: render,
|
|
80
101
|
},
|
|
81
102
|
};
|
|
@@ -272,7 +272,7 @@ export class TaxAndCashMonolith {
|
|
|
272
272
|
* @uiGroup Step 3 Properties
|
|
273
273
|
* @uiWidget textArea
|
|
274
274
|
*/
|
|
275
|
-
this.step3_taxFormDescriptionBusinessEntity = "Participants residing outside of the US
|
|
275
|
+
this.step3_taxFormDescriptionBusinessEntity = "Participants residing outside of the US working with a US Brand need to submit a {documentType} form.";
|
|
276
276
|
/**
|
|
277
277
|
* This appears inside the Docusign frame.
|
|
278
278
|
* @uiName Docusign session expired message
|
|
@@ -931,6 +931,19 @@ export class TaxAndCashMonolith {
|
|
|
931
931
|
* @uiWidget textArea
|
|
932
932
|
*/
|
|
933
933
|
this.dashboard_w9RequiredDescription = "You have surpassed the $600 threshold for a W9 tax form. To remove the hold, you need to submit a W9 tax form as outlined in our {termsAndConditions}. Please click 'Submit W9' to start the process.";
|
|
934
|
+
/**
|
|
935
|
+
* @uiName Account review alert header
|
|
936
|
+
*/
|
|
937
|
+
this.dashboard_accountReviewHeader = "Your account is under review";
|
|
938
|
+
/**
|
|
939
|
+
* @uiName Account review alert description
|
|
940
|
+
*/
|
|
941
|
+
this.dashboard_accountReviewDescription = "This process takes 48 hours, payouts are on hold until it's completed. You will receive an email from our referral provider, Impact.com, if any issues arise. It contains details on how to resolve this issue. If you need further assistance, please reach out to our {supportLink}.";
|
|
942
|
+
/**
|
|
943
|
+
* @uiName Terms and Conditions text
|
|
944
|
+
* @uiGroup Dashboard Properties
|
|
945
|
+
*/
|
|
946
|
+
this.dashboard_termsAndConditions = "Terms and Conditions";
|
|
934
947
|
/**
|
|
935
948
|
* @uiName W9 payment threshold alert button text
|
|
936
949
|
* @uiGroup Dashboard Properties
|
|
@@ -2164,7 +2177,7 @@ export class TaxAndCashMonolith {
|
|
|
2164
2177
|
},
|
|
2165
2178
|
"attribute": "step-3_tax-form-description-business-entity",
|
|
2166
2179
|
"reflect": false,
|
|
2167
|
-
"defaultValue": "\"Participants residing outside of the US
|
|
2180
|
+
"defaultValue": "\"Participants residing outside of the US working with a US Brand need to submit a {documentType} form.\""
|
|
2168
2181
|
},
|
|
2169
2182
|
"step3_docusignExpired": {
|
|
2170
2183
|
"type": "string",
|
|
@@ -4947,6 +4960,72 @@ export class TaxAndCashMonolith {
|
|
|
4947
4960
|
"reflect": false,
|
|
4948
4961
|
"defaultValue": "\"You have surpassed the $600 threshold for a W9 tax form. To remove the hold, you need to submit a W9 tax form as outlined in our {termsAndConditions}. Please click 'Submit W9' to start the process.\""
|
|
4949
4962
|
},
|
|
4963
|
+
"dashboard_accountReviewHeader": {
|
|
4964
|
+
"type": "string",
|
|
4965
|
+
"mutable": false,
|
|
4966
|
+
"complexType": {
|
|
4967
|
+
"original": "string",
|
|
4968
|
+
"resolved": "string",
|
|
4969
|
+
"references": {}
|
|
4970
|
+
},
|
|
4971
|
+
"required": false,
|
|
4972
|
+
"optional": false,
|
|
4973
|
+
"docs": {
|
|
4974
|
+
"tags": [{
|
|
4975
|
+
"text": "Account review alert header",
|
|
4976
|
+
"name": "uiName"
|
|
4977
|
+
}],
|
|
4978
|
+
"text": ""
|
|
4979
|
+
},
|
|
4980
|
+
"attribute": "dashboard_account-review-header",
|
|
4981
|
+
"reflect": false,
|
|
4982
|
+
"defaultValue": "\"Your account is under review\""
|
|
4983
|
+
},
|
|
4984
|
+
"dashboard_accountReviewDescription": {
|
|
4985
|
+
"type": "string",
|
|
4986
|
+
"mutable": false,
|
|
4987
|
+
"complexType": {
|
|
4988
|
+
"original": "string",
|
|
4989
|
+
"resolved": "string",
|
|
4990
|
+
"references": {}
|
|
4991
|
+
},
|
|
4992
|
+
"required": false,
|
|
4993
|
+
"optional": false,
|
|
4994
|
+
"docs": {
|
|
4995
|
+
"tags": [{
|
|
4996
|
+
"text": "Account review alert description",
|
|
4997
|
+
"name": "uiName"
|
|
4998
|
+
}],
|
|
4999
|
+
"text": ""
|
|
5000
|
+
},
|
|
5001
|
+
"attribute": "dashboard_account-review-description",
|
|
5002
|
+
"reflect": false,
|
|
5003
|
+
"defaultValue": "\"This process takes 48 hours, payouts are on hold until it's completed. You will receive an email from our referral provider, Impact.com, if any issues arise. It contains details on how to resolve this issue. If you need further assistance, please reach out to our {supportLink}.\""
|
|
5004
|
+
},
|
|
5005
|
+
"dashboard_termsAndConditions": {
|
|
5006
|
+
"type": "string",
|
|
5007
|
+
"mutable": false,
|
|
5008
|
+
"complexType": {
|
|
5009
|
+
"original": "string",
|
|
5010
|
+
"resolved": "string",
|
|
5011
|
+
"references": {}
|
|
5012
|
+
},
|
|
5013
|
+
"required": false,
|
|
5014
|
+
"optional": false,
|
|
5015
|
+
"docs": {
|
|
5016
|
+
"tags": [{
|
|
5017
|
+
"text": "Terms and Conditions text",
|
|
5018
|
+
"name": "uiName"
|
|
5019
|
+
}, {
|
|
5020
|
+
"text": "Dashboard Properties",
|
|
5021
|
+
"name": "uiGroup"
|
|
5022
|
+
}],
|
|
5023
|
+
"text": ""
|
|
5024
|
+
},
|
|
5025
|
+
"attribute": "dashboard_terms-and-conditions",
|
|
5026
|
+
"reflect": false,
|
|
5027
|
+
"defaultValue": "\"Terms and Conditions\""
|
|
5028
|
+
},
|
|
4950
5029
|
"dashboard_w9RequiredButtonText": {
|
|
4951
5030
|
"type": "string",
|
|
4952
5031
|
"mutable": false,
|
|
@@ -200,14 +200,36 @@ export const TaxAndCashDashboardView = (props) => {
|
|
|
200
200
|
function getAlert(status) {
|
|
201
201
|
switch (status) {
|
|
202
202
|
case "OVER_W9_THRESHOLD":
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
203
|
+
if (states.enforceUsTaxComplianceOption === "CASH_ONLY_DEFER_W9") {
|
|
204
|
+
return {
|
|
205
|
+
header: text.w9RequiredHeader,
|
|
206
|
+
description: intl.formatMessage({
|
|
207
|
+
id: "w9RequiredDescription",
|
|
208
|
+
defaultMessage: text.w9RequiredDescription,
|
|
209
|
+
}, {
|
|
210
|
+
termsAndConditions: (h("a", { target: "_blank", href: `https://terms.advocate.impact.com/PayoutTermsAndConditions.html` }, text.termsAndConditions)),
|
|
211
|
+
}),
|
|
212
|
+
button: (h("sl-button", { style: { marginTop: "var(--sl-spacing-x-small)" }, type: "default", onClick: callbacks.onNewFormClick }, text.w9RequiredButtonText)),
|
|
213
|
+
alertType: "info",
|
|
214
|
+
icon: "info-circle",
|
|
215
|
+
class: sheet.classes.WarningHoldAlertContainer,
|
|
216
|
+
};
|
|
217
|
+
}
|
|
218
|
+
else {
|
|
219
|
+
return {
|
|
220
|
+
header: text.payoutHoldAlertHeader,
|
|
221
|
+
description: intl.formatMessage({
|
|
222
|
+
id: "payoutHoldAlertDescription",
|
|
223
|
+
defaultMessage: text.payoutHoldAlertDescription,
|
|
224
|
+
}, {
|
|
225
|
+
supportLink: (h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
|
|
226
|
+
}),
|
|
227
|
+
buttonText: null,
|
|
228
|
+
alertType: "warning",
|
|
229
|
+
icon: "exclamation-triangle",
|
|
230
|
+
class: sheet.classes.WarningHoldAlertContainer,
|
|
231
|
+
};
|
|
232
|
+
}
|
|
211
233
|
case "VERIFICATION:REQUIRED":
|
|
212
234
|
return {
|
|
213
235
|
header: text.verificationRequiredHeader,
|
|
@@ -261,6 +283,20 @@ export const TaxAndCashDashboardView = (props) => {
|
|
|
261
283
|
icon: "exclamation-octagon",
|
|
262
284
|
class: sheet.classes.ErrorHoldAlertContainer,
|
|
263
285
|
};
|
|
286
|
+
case "ACCOUNT_REVIEW":
|
|
287
|
+
return {
|
|
288
|
+
header: text.accountReviewHeader,
|
|
289
|
+
description: intl.formatMessage({
|
|
290
|
+
id: "accountReviewDescription",
|
|
291
|
+
defaultMessage: text.accountReviewDescription,
|
|
292
|
+
}, {
|
|
293
|
+
supportLink: (h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
|
|
294
|
+
}),
|
|
295
|
+
buttonText: null,
|
|
296
|
+
alertType: "warning",
|
|
297
|
+
icon: "exclamation-triangle",
|
|
298
|
+
class: sheet.classes.WarningHoldAlertContainer,
|
|
299
|
+
};
|
|
264
300
|
case "HOLD":
|
|
265
301
|
return {
|
|
266
302
|
header: text.payoutHoldAlertHeader,
|
|
@@ -397,12 +433,11 @@ export const TaxAndCashDashboardView = (props) => {
|
|
|
397
433
|
states.status === "INACTIVE" && alertMap[states.status],
|
|
398
434
|
h("div", null,
|
|
399
435
|
h("h3", { style: { marginBottom: "0" } }, text.bankingInformationSectionHeader),
|
|
400
|
-
h("p", { class: sheet.classes.PageDescriptionText }, text.taxAndPayoutsDescription),
|
|
401
436
|
h("div", { class: sheet.classes.BankingInformationContainer },
|
|
402
437
|
slots.payoutDetailsCardSlot,
|
|
403
438
|
!states.loading && (h("p", { class: sheet.classes.DescriptionText }, text.payoutFromImpact)),
|
|
404
439
|
states.canEditPayoutInfo && (h("sl-button", { disabled: states.disabled || states.loading, type: "default", class: sheet.classes.EditBankDetailsButton, onClick: callbacks.onEditPayoutInfo }, text.editPaymentInformationButton)))),
|
|
405
|
-
!states.noFormNeeded && (h("div", { class: sheet.classes.TaxDocumentsContainer },
|
|
440
|
+
(!states.noFormNeeded || states.status === "NOT_VERIFIED") && (h("div", { class: sheet.classes.TaxDocumentsContainer },
|
|
406
441
|
h("div", null, states.loading ? (h("div", { class: sheet.classes.TaxSectionSkeletonContainer },
|
|
407
442
|
h("sl-skeleton", { class: sheet.classes.SkeletonOne }),
|
|
408
443
|
h("sl-skeleton", { class: sheet.classes.SkeletonTwo }))) : (h("div", null,
|
|
@@ -413,10 +448,11 @@ export const TaxAndCashDashboardView = (props) => {
|
|
|
413
448
|
id: "section-subheader",
|
|
414
449
|
defaultMessage: text.taxDocumentSectionSubHeader,
|
|
415
450
|
}, {
|
|
416
|
-
documentType: states.documentTypeString,
|
|
451
|
+
documentType: states.documentTypeString || "W9",
|
|
417
452
|
})),
|
|
418
453
|
h("span", { class: sheet.classes.StatusAlert }, statusMap[states.status]))),
|
|
419
|
-
states.
|
|
454
|
+
states.noFormNeeded &&
|
|
455
|
+
states.status !== "NOT_VERIFIED" && (h("sl-button", { disabled: states.disabled || states.loading, onClick: callbacks.onClick, type: "default", class: sheet.classes.NewFormButton, exportparts: "base: primarybutton-base" }, text.newFormButton)))))))),
|
|
420
456
|
h("div", { class: sheet.classes.IndirectTaxPreviewContainer }, states.loading ? (h("div", { class: sheet.classes.TaxSectionSkeletonContainer },
|
|
421
457
|
h("sl-skeleton", { class: sheet.classes.SkeletonOne }),
|
|
422
458
|
h("sl-skeleton", { class: sheet.classes.SkeletonTwo }))) : (h("div", null,
|
|
@@ -239,6 +239,18 @@ export class TaxAndCashDashboard {
|
|
|
239
239
|
* @uiName W9 payment threshold alert description
|
|
240
240
|
*/
|
|
241
241
|
this.w9RequiredDescription = "You have surpassed the $600 threshold for a W9 tax form. To remove the hold, you need to submit a W9 tax form as outlined in our {termsAndConditions}. Please click 'Submit W9' to start the process.";
|
|
242
|
+
/**
|
|
243
|
+
* @uiName Account review alert header
|
|
244
|
+
*/
|
|
245
|
+
this.accountReviewHeader = "Your account is under review";
|
|
246
|
+
/**
|
|
247
|
+
* @uiName Account review alert description
|
|
248
|
+
*/
|
|
249
|
+
this.accountReviewDescription = "This process takes 48 hours, payouts are on hold until it's completed. You will receive an email from our referral provider, Impact.com, if any issues arise. It contains details on how to resolve this issue. If you need further assistance, please reach out to our {supportLink}.";
|
|
250
|
+
/**
|
|
251
|
+
* @uiName Terms and Conditions text
|
|
252
|
+
*/
|
|
253
|
+
this.termsAndConditions = "Terms and Conditions";
|
|
242
254
|
/**
|
|
243
255
|
* @uiName W9 payment threshold alert button text
|
|
244
256
|
*/
|
|
@@ -310,11 +322,6 @@ export class TaxAndCashDashboard {
|
|
|
310
322
|
this.invoiceEmptyStateHeader = "View your invoice details";
|
|
311
323
|
/** @uiName Empty invoice table description */
|
|
312
324
|
this.invoiceEmptyStateText = "Refer a friend to view the status of your invoices and rewards earned";
|
|
313
|
-
/**
|
|
314
|
-
* Displayed at the top of the page on all set up steps and on the dashboard.
|
|
315
|
-
* @uiName Page description
|
|
316
|
-
*/
|
|
317
|
-
this.taxAndPayoutsDescription = "Submit your tax documents and add your banking information to receive your rewards.";
|
|
318
325
|
/**
|
|
319
326
|
* @uiName Replace tax form modal header
|
|
320
327
|
*/
|
|
@@ -1312,6 +1319,69 @@ export class TaxAndCashDashboard {
|
|
|
1312
1319
|
"reflect": false,
|
|
1313
1320
|
"defaultValue": "\"You have surpassed the $600 threshold for a W9 tax form. To remove the hold, you need to submit a W9 tax form as outlined in our {termsAndConditions}. Please click 'Submit W9' to start the process.\""
|
|
1314
1321
|
},
|
|
1322
|
+
"accountReviewHeader": {
|
|
1323
|
+
"type": "string",
|
|
1324
|
+
"mutable": false,
|
|
1325
|
+
"complexType": {
|
|
1326
|
+
"original": "string",
|
|
1327
|
+
"resolved": "string",
|
|
1328
|
+
"references": {}
|
|
1329
|
+
},
|
|
1330
|
+
"required": false,
|
|
1331
|
+
"optional": false,
|
|
1332
|
+
"docs": {
|
|
1333
|
+
"tags": [{
|
|
1334
|
+
"text": "Account review alert header",
|
|
1335
|
+
"name": "uiName"
|
|
1336
|
+
}],
|
|
1337
|
+
"text": ""
|
|
1338
|
+
},
|
|
1339
|
+
"attribute": "account-review-header",
|
|
1340
|
+
"reflect": false,
|
|
1341
|
+
"defaultValue": "\"Your account is under review\""
|
|
1342
|
+
},
|
|
1343
|
+
"accountReviewDescription": {
|
|
1344
|
+
"type": "string",
|
|
1345
|
+
"mutable": false,
|
|
1346
|
+
"complexType": {
|
|
1347
|
+
"original": "string",
|
|
1348
|
+
"resolved": "string",
|
|
1349
|
+
"references": {}
|
|
1350
|
+
},
|
|
1351
|
+
"required": false,
|
|
1352
|
+
"optional": false,
|
|
1353
|
+
"docs": {
|
|
1354
|
+
"tags": [{
|
|
1355
|
+
"text": "Account review alert description",
|
|
1356
|
+
"name": "uiName"
|
|
1357
|
+
}],
|
|
1358
|
+
"text": ""
|
|
1359
|
+
},
|
|
1360
|
+
"attribute": "account-review-description",
|
|
1361
|
+
"reflect": false,
|
|
1362
|
+
"defaultValue": "\"This process takes 48 hours, payouts are on hold until it's completed. You will receive an email from our referral provider, Impact.com, if any issues arise. It contains details on how to resolve this issue. If you need further assistance, please reach out to our {supportLink}.\""
|
|
1363
|
+
},
|
|
1364
|
+
"termsAndConditions": {
|
|
1365
|
+
"type": "string",
|
|
1366
|
+
"mutable": false,
|
|
1367
|
+
"complexType": {
|
|
1368
|
+
"original": "string",
|
|
1369
|
+
"resolved": "string",
|
|
1370
|
+
"references": {}
|
|
1371
|
+
},
|
|
1372
|
+
"required": false,
|
|
1373
|
+
"optional": false,
|
|
1374
|
+
"docs": {
|
|
1375
|
+
"tags": [{
|
|
1376
|
+
"text": "Terms and Conditions text",
|
|
1377
|
+
"name": "uiName"
|
|
1378
|
+
}],
|
|
1379
|
+
"text": ""
|
|
1380
|
+
},
|
|
1381
|
+
"attribute": "terms-and-conditions",
|
|
1382
|
+
"reflect": false,
|
|
1383
|
+
"defaultValue": "\"Terms and Conditions\""
|
|
1384
|
+
},
|
|
1315
1385
|
"w9RequiredButtonText": {
|
|
1316
1386
|
"type": "string",
|
|
1317
1387
|
"mutable": false,
|
|
@@ -1684,27 +1754,6 @@ export class TaxAndCashDashboard {
|
|
|
1684
1754
|
"reflect": false,
|
|
1685
1755
|
"defaultValue": "\"Refer a friend to view the status of your invoices and rewards earned\""
|
|
1686
1756
|
},
|
|
1687
|
-
"taxAndPayoutsDescription": {
|
|
1688
|
-
"type": "string",
|
|
1689
|
-
"mutable": false,
|
|
1690
|
-
"complexType": {
|
|
1691
|
-
"original": "string",
|
|
1692
|
-
"resolved": "string",
|
|
1693
|
-
"references": {}
|
|
1694
|
-
},
|
|
1695
|
-
"required": false,
|
|
1696
|
-
"optional": false,
|
|
1697
|
-
"docs": {
|
|
1698
|
-
"tags": [{
|
|
1699
|
-
"text": "Page description",
|
|
1700
|
-
"name": "uiName"
|
|
1701
|
-
}],
|
|
1702
|
-
"text": "Displayed at the top of the page on all set up steps and on the dashboard."
|
|
1703
|
-
},
|
|
1704
|
-
"attribute": "tax-and-payouts-description",
|
|
1705
|
-
"reflect": false,
|
|
1706
|
-
"defaultValue": "\"Submit your tax documents and add your banking information to receive your rewards.\""
|
|
1707
|
-
},
|
|
1708
1757
|
"replaceTaxFormModalHeader": {
|
|
1709
1758
|
"type": "string",
|
|
1710
1759
|
"mutable": false,
|
|
@@ -1794,7 +1843,7 @@ export class TaxAndCashDashboard {
|
|
|
1794
1843
|
"mutable": false,
|
|
1795
1844
|
"complexType": {
|
|
1796
1845
|
"original": "DemoData<UseTaxAndCashDashboardResult>",
|
|
1797
|
-
"resolved": "{ states?: { status?: string; documentType: TaxDocumentType; documentTypeString: string; canEditPayoutInfo: boolean; disabled?: boolean; dateSubmitted?: string; noFormNeeded?: boolean; indirectTaxType?: string; qstNumber?: string; subRegionTaxNumber?: string; subRegion?: string; indirectTaxNumber?: string; province?: string; country?: string; notRegistered?: boolean; isBusinessEntity?: boolean; loading?: boolean; loadingError?: boolean; showNewFormDialog: boolean; hasHold: boolean; payoutStatus: PayoutStatus; veriffLoading: boolean; errors?: { general?: boolean; }; }; }",
|
|
1846
|
+
"resolved": "{ states?: { status?: string; documentType: TaxDocumentType; documentTypeString: string; canEditPayoutInfo: boolean; disabled?: boolean; dateSubmitted?: string; noFormNeeded?: boolean; indirectTaxType?: string; qstNumber?: string; subRegionTaxNumber?: string; subRegion?: string; indirectTaxNumber?: string; province?: string; country?: string; notRegistered?: boolean; isBusinessEntity?: boolean; loading?: boolean; loadingError?: boolean; showNewFormDialog: boolean; hasHold: boolean; payoutStatus: PayoutStatus; veriffLoading: boolean; errors?: { general?: boolean; }; enforceUsTaxComplianceOption?: string; }; }",
|
|
1798
1847
|
"references": {
|
|
1799
1848
|
"DemoData": {
|
|
1800
1849
|
"location": "import",
|
package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/useTaxAndCashDashboard.js
CHANGED
|
@@ -1,12 +1,20 @@
|
|
|
1
|
-
import { useLocale, useParentQueryValue, useSetParent, } from "@saasquatch/component-boilerplate";
|
|
1
|
+
import { useLocale, useParentQueryValue, useQuery, useSetParent, } from "@saasquatch/component-boilerplate";
|
|
2
2
|
import { useEffect, useState } from "@saasquatch/universal-hooks";
|
|
3
3
|
import { DateTime } from "luxon";
|
|
4
4
|
import { vatLabels } from "../countries";
|
|
5
|
-
import { getStatus } from "../sqm-payout-status-alert/usePayoutStatus";
|
|
5
|
+
import { getStatus, } from "../sqm-payout-status-alert/usePayoutStatus";
|
|
6
6
|
import { TAX_CONTEXT_NAMESPACE, TAX_FORM_CONTEXT_NAMESPACE, USER_QUERY_NAMESPACE, } from "../sqm-tax-and-cash/data";
|
|
7
7
|
import { INDIRECT_TAX_PROVINCES, INDIRECT_TAX_SPAIN_REGIONS, } from "../subregions";
|
|
8
8
|
import { useVeriffApp, VERIFF_COMPLETE_EVENT_KEY } from "../useVeriffApp";
|
|
9
9
|
import { taxTypeToName } from "../utils";
|
|
10
|
+
import { gql } from "graphql-request";
|
|
11
|
+
const GET_TAX_SETTING = gql `
|
|
12
|
+
query getTenantSettings {
|
|
13
|
+
tenantSettings {
|
|
14
|
+
enforceUsTaxCompliance
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
`;
|
|
10
18
|
function getCountryName(countryCode, locale) {
|
|
11
19
|
if (!countryCode)
|
|
12
20
|
return undefined;
|
|
@@ -42,11 +50,12 @@ function getIndirectTaxType(taxInformation) {
|
|
|
42
50
|
return "Indirect Tax";
|
|
43
51
|
}
|
|
44
52
|
export const useTaxAndCashDashboard = (props) => {
|
|
45
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
53
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
46
54
|
const setStep = useSetParent(TAX_CONTEXT_NAMESPACE);
|
|
47
55
|
const setContext = useSetParent(TAX_FORM_CONTEXT_NAMESPACE);
|
|
48
56
|
const [showDialog, setShowDialog] = useState(false);
|
|
49
57
|
const { render, loading: veriffLoading, errors: veriffErrors, } = useVeriffApp();
|
|
58
|
+
const { data: taxSettingRes } = useQuery(GET_TAX_SETTING, {});
|
|
50
59
|
const locale = useLocale();
|
|
51
60
|
useEffect(() => {
|
|
52
61
|
// Clear override context once on submitted
|
|
@@ -87,30 +96,32 @@ export const useTaxAndCashDashboard = (props) => {
|
|
|
87
96
|
window.removeEventListener(VERIFF_COMPLETE_EVENT_KEY, cb);
|
|
88
97
|
};
|
|
89
98
|
}, []);
|
|
99
|
+
const enforceUsTaxComplianceOption = (_e = taxSettingRes === null || taxSettingRes === void 0 ? void 0 : taxSettingRes.tenantSettings) === null || _e === void 0 ? void 0 : _e.enforceUsTaxCompliance;
|
|
90
100
|
return {
|
|
91
101
|
states: {
|
|
92
102
|
dateSubmitted,
|
|
93
103
|
documentType,
|
|
94
104
|
canEditPayoutInfo: publisher === null || publisher === void 0 ? void 0 : publisher.brandedSignup,
|
|
95
105
|
documentTypeString: taxTypeToName(documentType),
|
|
96
|
-
status: (
|
|
97
|
-
subRegion: getSubRegionName((
|
|
98
|
-
subRegionTaxNumber: (
|
|
99
|
-
qstNumber: (
|
|
106
|
+
status: (_f = publisher === null || publisher === void 0 ? void 0 : publisher.currentTaxDocument) === null || _f === void 0 ? void 0 : _f.status,
|
|
107
|
+
subRegion: getSubRegionName((_g = publisher === null || publisher === void 0 ? void 0 : publisher.taxInformation) === null || _g === void 0 ? void 0 : _g.indirectTaxRegion),
|
|
108
|
+
subRegionTaxNumber: (_h = publisher === null || publisher === void 0 ? void 0 : publisher.taxInformation) === null || _h === void 0 ? void 0 : _h.withholdingTaxId,
|
|
109
|
+
qstNumber: (_j = publisher === null || publisher === void 0 ? void 0 : publisher.taxInformation) === null || _j === void 0 ? void 0 : _j.additionalTaxId,
|
|
100
110
|
indirectTaxType: getIndirectTaxType(publisher === null || publisher === void 0 ? void 0 : publisher.taxInformation),
|
|
101
|
-
indirectTaxNumber: (
|
|
111
|
+
indirectTaxNumber: (_k = publisher === null || publisher === void 0 ? void 0 : publisher.taxInformation) === null || _k === void 0 ? void 0 : _k.indirectTaxId,
|
|
102
112
|
isBusinessEntity: (publisher === null || publisher === void 0 ? void 0 : publisher.requiredTaxDocumentType) === "W8BENE",
|
|
103
113
|
province: provinceName,
|
|
104
|
-
country: getCountryName((
|
|
105
|
-
notRegistered: !((
|
|
114
|
+
country: getCountryName((_l = publisher === null || publisher === void 0 ? void 0 : publisher.taxInformation) === null || _l === void 0 ? void 0 : _l.indirectTaxCountryCode, locale),
|
|
115
|
+
notRegistered: !((_m = publisher === null || publisher === void 0 ? void 0 : publisher.taxInformation) === null || _m === void 0 ? void 0 : _m.indirectTaxId),
|
|
106
116
|
noFormNeeded: !documentType,
|
|
107
117
|
disabled: loading,
|
|
108
118
|
loading,
|
|
109
119
|
loadingError: !!(userError === null || userError === void 0 ? void 0 : userError.message),
|
|
110
120
|
showNewFormDialog: showDialog,
|
|
111
|
-
hasHold: !!((
|
|
121
|
+
hasHold: !!((_o = publisher === null || publisher === void 0 ? void 0 : publisher.payoutsAccount) === null || _o === void 0 ? void 0 : _o.hold),
|
|
112
122
|
payoutStatus,
|
|
113
123
|
veriffLoading,
|
|
124
|
+
enforceUsTaxComplianceOption,
|
|
114
125
|
},
|
|
115
126
|
callbacks: {
|
|
116
127
|
onClick: () => setShowDialog(true),
|
|
@@ -23,6 +23,10 @@ export function useUserInfoForm(props) {
|
|
|
23
23
|
const [currencySearch, setCurrencySearch] = useState("");
|
|
24
24
|
const [filteredCurrencies, setFilteredCurrencies] = useState(currencies || []);
|
|
25
25
|
const [formErrors, setErrors] = useState({});
|
|
26
|
+
useEffect(() => {
|
|
27
|
+
// reset redirect hash
|
|
28
|
+
window.location.hash = "";
|
|
29
|
+
}, []);
|
|
26
30
|
useEffect(() => {
|
|
27
31
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
28
32
|
const user = data === null || data === void 0 ? void 0 : data.user;
|