@saasquatch/mint-components 1.8.0-41 → 1.8.0-43
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/sqm-banking-info-form_6.cjs.entry.js +17 -20
- package/dist/cjs/sqm-referral-table_11.cjs.entry.js +17 -2
- package/dist/cjs/sqm-stencilbook.cjs.entry.js +94 -3
- package/dist/cjs/sqm-tax-and-cash.cjs.entry.js +27 -69
- package/dist/collection/components/sqm-referral-table/ReferralTableRewardsCell.stories.js +87 -2
- package/dist/collection/components/sqm-referral-table/cells/sqm-referral-table-rewards-cell.js +30 -0
- package/dist/collection/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form.js +2 -2
- package/dist/collection/components/tax-and-cash/sqm-banking-info-form/useBankingInfoForm.js +11 -9
- package/dist/collection/components/tax-and-cash/sqm-docusign-form/useDocusignForm.js +2 -2
- package/dist/collection/components/tax-and-cash/sqm-indirect-tax-form/useIndirectTaxForm.js +3 -1
- package/dist/collection/components/tax-and-cash/sqm-tax-and-cash/sqm-tax-and-cash.js +11 -13
- package/dist/collection/components/tax-and-cash/sqm-tax-and-cash/useTaxAndCash.js +13 -16
- package/dist/esm/sqm-banking-info-form_6.entry.js +17 -20
- package/dist/esm/sqm-referral-table_11.entry.js +17 -2
- package/dist/esm/sqm-stencilbook.entry.js +94 -3
- package/dist/esm/sqm-tax-and-cash.entry.js +28 -70
- package/dist/esm/useParentQuery-777aa4a0.js +1 -1
- package/dist/esm-es5/sqm-banking-info-form_6.entry.js +1 -1
- package/dist/esm-es5/sqm-referral-table_11.entry.js +1 -1
- package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
- package/dist/esm-es5/sqm-tax-and-cash.entry.js +1 -1
- package/dist/esm-es5/useParentQuery-777aa4a0.js +1 -1
- package/dist/mint-components/mint-components.esm.js +1 -1
- package/dist/mint-components/p-09f7d8e5.js +2 -2
- package/dist/mint-components/p-1bda1a60.system.entry.js +1 -0
- package/dist/mint-components/p-4dc1d016.system.entry.js +1 -0
- package/dist/mint-components/p-7979f8b0.entry.js +34 -0
- package/dist/mint-components/p-8b6b9a4e.system.entry.js +1 -0
- package/dist/mint-components/p-9f8eb3ee.entry.js +1 -0
- package/dist/mint-components/p-a53c22c5.system.js +1 -1
- package/dist/mint-components/p-d5364cae.system.js +1 -1
- package/dist/mint-components/p-ddbdbe21.system.entry.js +1 -0
- package/dist/mint-components/p-e9d340d3.entry.js +1 -0
- package/dist/mint-components/p-f63327c8.entry.js +9 -0
- package/dist/types/components/sqm-referral-table/ReferralTableRewardsCell.stories.d.ts +6 -0
- package/dist/types/saasquatch.d.ts +4 -1
- package/docs/docs.docx +0 -0
- package/docs/raisins.json +1 -1
- package/package.json +1 -1
- package/dist/mint-components/p-143f0b1a.system.entry.js +0 -1
- package/dist/mint-components/p-283e11e6.entry.js +0 -1
- package/dist/mint-components/p-32d501fa.entry.js +0 -9
- package/dist/mint-components/p-4fb73c19.system.entry.js +0 -1
- package/dist/mint-components/p-53cc17a2.entry.js +0 -1
- package/dist/mint-components/p-83791771.system.entry.js +0 -1
- package/dist/mint-components/p-a0340d7c.entry.js +0 -34
- package/dist/mint-components/p-d73863dd.system.entry.js +0 -1
|
@@ -722,13 +722,6 @@ const SAVE_WITHDRAWAL_SETTINGS = index_module.dist.gql `
|
|
|
722
722
|
}
|
|
723
723
|
}
|
|
724
724
|
`;
|
|
725
|
-
function getPaymentMethod(paymentOption) {
|
|
726
|
-
if (paymentOption.paymentMethod === 3 || paymentOption.paymentMethod === 5)
|
|
727
|
-
return "BANK_TRANSFER";
|
|
728
|
-
if (paymentOption.paymentMethod === 7)
|
|
729
|
-
return "PAYPAL";
|
|
730
|
-
return "";
|
|
731
|
-
}
|
|
732
725
|
function useBankingInfoForm(props) {
|
|
733
726
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
734
727
|
const locale = index_module.N();
|
|
@@ -760,6 +753,7 @@ function useBankingInfoForm(props) {
|
|
|
760
753
|
}
|
|
761
754
|
});
|
|
762
755
|
setErrors(validationErrors);
|
|
756
|
+
console.log({ validationErrors });
|
|
763
757
|
if (Object.keys(validationErrors).length) {
|
|
764
758
|
return;
|
|
765
759
|
}
|
|
@@ -769,17 +763,18 @@ function useBankingInfoForm(props) {
|
|
|
769
763
|
// @ts-ignore figure out what the values for paymentDay are
|
|
770
764
|
// const { paymentDay, ...rest } = formData;
|
|
771
765
|
// TODO: wire up mutation
|
|
772
|
-
await saveWithdrawalSettings({
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
});
|
|
780
|
-
|
|
766
|
+
// await saveWithdrawalSettings({
|
|
767
|
+
// setImpactPublisherWithdrawalSettingsInput: {
|
|
768
|
+
// userId: user.id,
|
|
769
|
+
// accountId: user.accountId,
|
|
770
|
+
// paymentMethod: getPaymentMethod(currentPaymentOption),
|
|
771
|
+
// ...formData,
|
|
772
|
+
// },
|
|
773
|
+
// });
|
|
774
|
+
setStep("/submitted");
|
|
781
775
|
}
|
|
782
776
|
catch (e) {
|
|
777
|
+
console.error(e);
|
|
783
778
|
setErrors({ general: true });
|
|
784
779
|
}
|
|
785
780
|
finally {
|
|
@@ -875,7 +870,7 @@ const BankingInfoForm = class {
|
|
|
875
870
|
* Subtext shown at the top of the page, used to show the current step of the tax form.
|
|
876
871
|
* @uiName Form step text
|
|
877
872
|
*/
|
|
878
|
-
this.formStep = "Step
|
|
873
|
+
this.formStep = "Step 4 of 5";
|
|
879
874
|
/**
|
|
880
875
|
* Heading text shown at the top of the page
|
|
881
876
|
* @uiName Tax and Payouts heading text
|
|
@@ -1518,7 +1513,7 @@ function useDocusignForm(props) {
|
|
|
1518
1513
|
if (DOCUSIGN_ERROR_STATES.includes(docusignStatus))
|
|
1519
1514
|
return;
|
|
1520
1515
|
if (DOCUSIGN_SUCCESS_STATES.includes(docusignStatus)) {
|
|
1521
|
-
setPath("/
|
|
1516
|
+
setPath("/4");
|
|
1522
1517
|
}
|
|
1523
1518
|
if (DOCUSIGN_ERROR_STATES.includes(docusignStatus)) {
|
|
1524
1519
|
setErrors({
|
|
@@ -1542,7 +1537,7 @@ function useDocusignForm(props) {
|
|
|
1542
1537
|
if (status === "NOT_VERIFIED" || status === "ACTIVE") {
|
|
1543
1538
|
console.log("Document has been registered as submitted");
|
|
1544
1539
|
}
|
|
1545
|
-
setPath(context.overrideNextStep || "/
|
|
1540
|
+
setPath(context.overrideNextStep || "/4");
|
|
1546
1541
|
}
|
|
1547
1542
|
catch (e) {
|
|
1548
1543
|
setErrors({ formSubission: { status: "document-error" } });
|
|
@@ -2132,10 +2127,12 @@ function useIndirectTaxForm(props) {
|
|
|
2132
2127
|
await refetch();
|
|
2133
2128
|
console.log({ result });
|
|
2134
2129
|
if ((_d = (_c = (_b = result.createImpactConnection) === null || _b === void 0 ? void 0 : _b.impactConnection) === null || _c === void 0 ? void 0 : _c.publisher) === null || _d === void 0 ? void 0 : _d.requiredTaxDocumentType) {
|
|
2130
|
+
// Go to docusign form
|
|
2135
2131
|
setStep("/3");
|
|
2136
2132
|
}
|
|
2137
2133
|
else {
|
|
2138
|
-
|
|
2134
|
+
// Go to banking information form
|
|
2135
|
+
setStep("/4");
|
|
2139
2136
|
}
|
|
2140
2137
|
}
|
|
2141
2138
|
catch (e) {
|
|
@@ -499,6 +499,12 @@ const ReferralTableRewardsCell = class {
|
|
|
499
499
|
"AVAILABLE",
|
|
500
500
|
"PENDING_REVIEW",
|
|
501
501
|
"DENIED",
|
|
502
|
+
"PAYOUT_SENT",
|
|
503
|
+
"PAYOUT_FAILED",
|
|
504
|
+
"PENDING_TAX_REVIEW",
|
|
505
|
+
"PENDING_NEW_TAX_FORM",
|
|
506
|
+
"PENDING_TAX_SUBMISSION",
|
|
507
|
+
"PENDING_PARTNER_CREATION",
|
|
502
508
|
];
|
|
503
509
|
if (((_b = (_a = reward.referral) === null || _a === void 0 ? void 0 : _a.fraudData) === null || _b === void 0 ? void 0 : _b.moderationStatus) !== "APPROVED") {
|
|
504
510
|
if (((_d = (_c = reward.referral) === null || _c === void 0 ? void 0 : _c.fraudData) === null || _d === void 0 ? void 0 : _d.moderationStatus) === "PENDING")
|
|
@@ -513,13 +519,19 @@ const ReferralTableRewardsCell = class {
|
|
|
513
519
|
const getSLBadgeType = (state) => {
|
|
514
520
|
switch (state) {
|
|
515
521
|
case "REDEEMED":
|
|
522
|
+
case "PAYOUT_SENT":
|
|
516
523
|
return "primary";
|
|
517
524
|
case "DENIED":
|
|
518
525
|
case "EXPIRED":
|
|
519
526
|
case "CANCELLED":
|
|
527
|
+
case "PAYOUT_FAILED":
|
|
520
528
|
return "danger";
|
|
521
529
|
case "PENDING":
|
|
522
530
|
case "PENDING_REVIEW":
|
|
531
|
+
case "PENDING_TAX_REVIEW":
|
|
532
|
+
case "PENDING_NEW_TAX_FORM":
|
|
533
|
+
case "PENDING_TAX_SUBMISSION":
|
|
534
|
+
case "PENDING_PARTNER_CREATION":
|
|
523
535
|
return "warning";
|
|
524
536
|
case "AVAILABLE":
|
|
525
537
|
return "success";
|
|
@@ -546,6 +558,7 @@ const ReferralTableRewardsCell = class {
|
|
|
546
558
|
}, {
|
|
547
559
|
status: state,
|
|
548
560
|
});
|
|
561
|
+
console.log(statusText);
|
|
549
562
|
return (index.h("sl-details", { class: sheet.classes.Details, disabled: this.hideDetails }, index.h("style", { type: "text/css" }, styleString), index.h("div", { slot: "summary", class: sheet.classes.DetailsContainer }, index.h(sqmTextSpanView.TextSpanView, { type: "p" }, index.h("span", { part: "sqm-cell-value", class: sheet.classes.BoldText }, reward.prettyValue)), index.h("div", { class: sheet.classes.BadgeContainer }, state === "PENDING" && reward.dateScheduledFor ? (index.h("sl-badge", { class: slBadgeType === "primary"
|
|
550
563
|
? sheet.classes.RedeemBadge
|
|
551
564
|
: sheet.classes.StatusBadge, type: slBadgeType, pill: true }, global.intl.formatMessage({
|
|
@@ -558,9 +571,9 @@ const ReferralTableRewardsCell = class {
|
|
|
558
571
|
? sheet.classes.RedeemBadge
|
|
559
572
|
: sheet.classes.StatusBadge, type: slBadgeType, pill: true }, badgeText)), reward.dateExpires && state === "AVAILABLE" && (index.h("sl-badge", { class: slBadgeType === "primary"
|
|
560
573
|
? sheet.classes.RedeemBadge
|
|
561
|
-
: sheet.classes.StatusBadge, type: "info", pill: true }, this.expiringText, ` ${getTimeDiff(reward.dateExpires)}`)))), index.h("div", null, state === "PENDING_REVIEW" && ((_a = reward.referral) === null || _a === void 0 ? void 0 : _a.dateModerated) && (index.h("div", null, index.h(sqmTextSpanView.TextSpanView, { type: "p" }, statusText, " ", index.h("span", { class: sheet.classes.BoldText, part: "sqm-cell-value" }, luxon.luxon.DateTime.fromMillis(reward.referral.dateModerated)
|
|
574
|
+
: sheet.classes.StatusBadge, type: "info", pill: true }, this.expiringText, ` ${getTimeDiff(reward.dateExpires)}`)))), index.h("div", null, state === "PAYOUT_SENT" && (index.h("div", null, index.h(sqmTextSpanView.TextSpanView, { type: "p" }, statusText))), state === "PENDING_REVIEW" && ((_a = reward.referral) === null || _a === void 0 ? void 0 : _a.dateModerated) && (index.h("div", null, index.h(sqmTextSpanView.TextSpanView, { type: "p" }, statusText, " ", index.h("span", { class: sheet.classes.BoldText, part: "sqm-cell-value" }, luxon.luxon.DateTime.fromMillis(reward.referral.dateModerated)
|
|
562
575
|
.setLocale(utils.luxonLocale(this.locale))
|
|
563
|
-
.toLocaleString(luxon.luxon.DateTime.DATE_MED))))), state === "DENIED" && ((_b = reward.referral) === null || _b === void 0 ? void 0 : _b.dateModerated) && (index.h("div", null, index.h(sqmTextSpanView.TextSpanView, { type: "p" }, statusText, " ", index.h("span", { class: sheet.classes.BoldText, part: "sqm-cell-value" }, luxon.luxon.DateTime.fromMillis(reward.referral.dateModerated)
|
|
576
|
+
.toLocaleString(luxon.luxon.DateTime.DATE_MED))))), state === "PENDING_TAX_REVIEW" && (index.h("div", null, index.h(sqmTextSpanView.TextSpanView, { type: "p" }, statusText))), state === "PENDING_NEW_TAX_FORM" && (index.h("div", null, index.h(sqmTextSpanView.TextSpanView, { type: "p" }, statusText))), state === "PENDING_TAX_SUBMISSION" && (index.h("div", null, index.h(sqmTextSpanView.TextSpanView, { type: "p" }, statusText))), state === "PENDING_PARTNER_CREATION" && (index.h("div", null, index.h(sqmTextSpanView.TextSpanView, { type: "p" }, statusText))), state === "DENIED" && ((_b = reward.referral) === null || _b === void 0 ? void 0 : _b.dateModerated) && (index.h("div", null, index.h(sqmTextSpanView.TextSpanView, { type: "p" }, statusText, " ", index.h("span", { class: sheet.classes.BoldText, part: "sqm-cell-value" }, luxon.luxon.DateTime.fromMillis(reward.referral.dateModerated)
|
|
564
577
|
.setLocale(utils.luxonLocale(this.locale))
|
|
565
578
|
.toLocaleString(luxon.luxon.DateTime.DATE_MED)), ".", this.deniedHelpText ? ` ${this.deniedHelpText}` : ``))), reward.dateGiven && (index.h("div", null, index.h(sqmTextSpanView.TextSpanView, { type: "p" }, this.rewardReceivedText, " ", index.h("span", { class: sheet.classes.BoldText, part: "sqm-cell-value" }, luxon.luxon.DateTime.fromMillis(reward.dateGiven)
|
|
566
579
|
.setLocale(utils.luxonLocale(this.locale))
|
|
@@ -568,6 +581,8 @@ const ReferralTableRewardsCell = class {
|
|
|
568
581
|
.setLocale(utils.luxonLocale(this.locale))
|
|
569
582
|
.toLocaleString(luxon.luxon.DateTime.DATE_MED))))), state === "CANCELLED" && reward.dateCancelled && (index.h("div", null, index.h(sqmTextSpanView.TextSpanView, { type: "p" }, statusText, " ", index.h("span", { class: sheet.classes.BoldText, part: "sqm-cell-value" }, luxon.luxon.DateTime.fromMillis(reward.dateCancelled)
|
|
570
583
|
.setLocale(utils.luxonLocale(this.locale))
|
|
584
|
+
.toLocaleString(luxon.luxon.DateTime.DATE_MED))))), state === "PAYOUT_FAILED" && reward.dateCancelled && (index.h("div", null, index.h(sqmTextSpanView.TextSpanView, { type: "p" }, statusText, " ", index.h("span", { class: sheet.classes.BoldText, part: "sqm-cell-value" }, luxon.luxon.DateTime.fromMillis(reward.datePayoutRetried)
|
|
585
|
+
.setLocale(utils.luxonLocale(this.locale))
|
|
571
586
|
.toLocaleString(luxon.luxon.DateTime.DATE_MED))))), state === "PENDING" && reward.dateScheduledFor && (index.h("div", null, index.h(sqmTextSpanView.TextSpanView, { type: "p" }, statusText, " ", index.h("span", { class: sheet.classes.BoldText, part: "sqm-cell-value" }, luxon.luxon.DateTime.fromMillis(reward.dateScheduledFor)
|
|
572
587
|
.setLocale(utils.luxonLocale(this.locale))
|
|
573
588
|
.toLocaleString(luxon.luxon.DateTime.DATE_MED))))), " ", state === "AVAILABLE" && reward.dateExpires && (index.h("div", null, index.h(sqmTextSpanView.TextSpanView, { type: "p" }, statusText, " ", index.h("span", { class: sheet.classes.BoldText, part: "sqm-cell-value" }, luxon.luxon.DateTime.fromMillis(reward.dateExpires)
|
|
@@ -8166,7 +8166,7 @@ const column = "@author:noah\n@owner:noah\nFeature: Referral Table User Column\n
|
|
|
8166
8166
|
|
|
8167
8167
|
const date = "@author:noah\n@owner:noah\nFeature: Referral Table Date Column\n\n Shows the date of each referral\n\n Background:\n Given the date column is included in the referral table\n\n @motivating\n @ui\n Scenario Outline: The title of the date column is configurable\n Given the \"column-title\" prop is set to <value>\n Then the date column is shown with <columTitle>\n Examples:\n | value | columnTitle |\n | | Date Converted |\n | My column title | My column title |\n\n @motivating\n Scenario Outline: A configurable date associated with the referral is shown for each referral\n Given the \"date-shown\" prop is set to <dateType>\n And referrals exist\n Then for each referral the <referralDate> is shown in the table\n And the date is localized to the users locale\n Examples:\n | dateType | referralDate |\n | dateReferralStarted | date referral started |\n | dateReferralPaid | date referral paid |\n | dateReferralEnded | date referral ended |\n | dateModerated | date moderated |\n | dateUserModified | date user modified |\n | dateConverted | date converted |\n | dateModified | date modified |\n | | date converted |";
|
|
8168
8168
|
|
|
8169
|
-
const reward = "@author:noah\n@owner:noah\nFeature: Referral Table Reward Column\n\n Shows the reward associated with each referral\n\n Background:\n Given the status column is included in the referral table\n And at least one referral exists\n\n @motivating\n @ui\n Scenario Outline: The referral reward and it's status are shown for each referral\n Then for each referral reward there exists a reward cell\n And the reward type and value is displayed in the cell\n And the status of each reward is displayed as a pill in the cell\n And rewards of <status> have a <pillColour> pill with the text <statusText>\n Examples:\n | status
|
|
8169
|
+
const reward = "@author:noah\n@owner:noah\nFeature: Referral Table Reward Column\n\n Shows the reward associated with each referral\n\n Background:\n Given the status column is included in the referral table\n And at least one referral exists\n\n @motivating\n @ui\n Scenario Outline: The referral reward and it's status are shown for each referral\n Then for each referral reward there exists a reward cell\n And the reward type and value is displayed in the cell\n And the status of each reward is displayed as a pill in the cell\n And rewards of <status> have a <pillColour> pill with the text <statusText>\n Examples:\n | status | pillColour | statusText |\n | Available | green | Available |\n | Pending | orange | Pending |\n | Pending Tax Review | orange | Pending Tax Review |\n | Pending New Tax Form | orange | Pending New Tax Form |\n | Pending Tax Submission | orange | Pending Tax Submission |\n | Pending Partner Creation | orange | Pending Partner Creation |\n | Cancelled | red | Cancelled |\n | Payout Failed | red | Payout Failed |\n | Expired | red | Expired |\n | Redeemed | blue | Redeemed |\n | Payout Sent | blue | Payout Sent |\n | Pending Review | orange | Pending Review |\n | Denied | red | Denied |\n\n @motivating\n Scenario: The pending period of a referral reward is shown if it exists\n Given a reward that is pending\n And the reward has a set pending period\n Then the status pill of the reward will instead have the text \"Pending for <relativeTime>\"\n And all dates are localized to the users locale\n Examples:\n | relativeTime |\n | 2 days |\n | 1 week |\n | 3 months |\n | 2 years |\n\n @motivating\n Scenario: The expiry date of a reward is shown if it exists\n Given a reward that is available\n And the reward has a set expiry date\n Then an additional grey pill will appear next to the status pill with the text \"Expiring in <relativeTime>\"\n And all dates are localized to the users locale\n Examples:\n | relativeTime |\n | 2 days |\n | 1 week |\n | 3 months |\n | 2 years |\n\n @motivating\n Scenario: Each reward can be expanded to show additional details about the reward\n When a reward cell is clicked\n Then it expands to show the following additional information (if it's available):\n | Date the reward was received |\n | Date the reward was cancelled |\n | Date the reward expires |\n | Date the reward is pending until |\n | Coupon code |\n And all dates are localized to a users locale";
|
|
8170
8170
|
|
|
8171
8171
|
const status = "@author:noah\n@owner:noah\nFeature: Referral Table Status Column\n\n Shows the status of each referral\n\n Background:\n Given the status column is included in the referral table\n\n @motivating\n @ui\n Scenario: The title of the date column is configurable\n Given the \"column-title\" prop is set to \"My column title\"\n Then the date column is shown with \"My column title\"\n\n @motivating\n Scenario: The status column's fraudStatus maps to the fraud status of the referral\n Given at least one referral\n Then the referral cell fraud status is set to `moderationStatus` of the referral\n\n @motivating\n Scenario Outline: The status column displays the status of each referral\n Given referrals exist\n Then the status of each referral is displayed\n And the status <status> is displayed as text from <statusTextProp> in a <pillColour> pill\n\n Examples:\n | status | statusTextProp | pillColour |\n | In Progress | inProgressStatusText | Orange |\n | Converted | convertedStatusText | Green |\n | Pending | pendingReviewStatusText | Orange |\n | Denied | deniedStatusText | Red |\n";
|
|
8172
8172
|
|
|
@@ -8213,6 +8213,43 @@ const baseReward = {
|
|
|
8213
8213
|
],
|
|
8214
8214
|
},
|
|
8215
8215
|
};
|
|
8216
|
+
const baseCashReward = {
|
|
8217
|
+
id: "1234",
|
|
8218
|
+
type: "CREDIT",
|
|
8219
|
+
value: 50,
|
|
8220
|
+
unit: "USD",
|
|
8221
|
+
name: "test",
|
|
8222
|
+
dateScheduledFor: getDays(),
|
|
8223
|
+
dateExpires: getMonths(),
|
|
8224
|
+
dateCancelled: 134400,
|
|
8225
|
+
dateRedeemed: 0,
|
|
8226
|
+
fuelTankCode: null,
|
|
8227
|
+
fuelTankType: null,
|
|
8228
|
+
currency: "USD",
|
|
8229
|
+
prettyValue: "$50.00",
|
|
8230
|
+
statuses: ["AVAILABLE"],
|
|
8231
|
+
globalRewardKey: "Key",
|
|
8232
|
+
rewardRedemptionTransactions: null,
|
|
8233
|
+
};
|
|
8234
|
+
const cashPayoutSentReward = {
|
|
8235
|
+
id: "1234",
|
|
8236
|
+
type: "CREDIT",
|
|
8237
|
+
value: 50,
|
|
8238
|
+
unit: "USD",
|
|
8239
|
+
name: "test",
|
|
8240
|
+
dateScheduledFor: getDays(),
|
|
8241
|
+
dateExpires: getMonths(),
|
|
8242
|
+
datePayoutExpected: getDays(),
|
|
8243
|
+
dateCancelled: 134400,
|
|
8244
|
+
dateRedeemed: 0,
|
|
8245
|
+
fuelTankCode: null,
|
|
8246
|
+
fuelTankType: null,
|
|
8247
|
+
currency: "USD",
|
|
8248
|
+
prettyValue: "$50.00",
|
|
8249
|
+
statuses: ["AVAILABLE"],
|
|
8250
|
+
globalRewardKey: "Key",
|
|
8251
|
+
rewardRedemptionTransactions: null,
|
|
8252
|
+
};
|
|
8216
8253
|
const nullExpiresIn = {
|
|
8217
8254
|
dateExpires: null,
|
|
8218
8255
|
};
|
|
@@ -8239,6 +8276,9 @@ const integrationReward = {
|
|
|
8239
8276
|
const pendingReward = {
|
|
8240
8277
|
statuses: ["AVAILABLE", "PENDING"],
|
|
8241
8278
|
};
|
|
8279
|
+
const payoutSentReward = {
|
|
8280
|
+
statuses: ["PAYOUT_SENT"],
|
|
8281
|
+
};
|
|
8242
8282
|
const cancelledReward = {
|
|
8243
8283
|
statuses: ["PENDING", "CANCELLED"],
|
|
8244
8284
|
dateCancelled: 1626850800000,
|
|
@@ -8250,9 +8290,24 @@ const expiredReward = {
|
|
|
8250
8290
|
const deniedReward = {
|
|
8251
8291
|
statuses: ["DENIED"],
|
|
8252
8292
|
};
|
|
8293
|
+
const payoutFailedReward = {
|
|
8294
|
+
statuses: ["PAYOUT_FAILED"],
|
|
8295
|
+
};
|
|
8253
8296
|
const pendingReviewReward = {
|
|
8254
8297
|
statuses: ["PENDING_REVIEW"],
|
|
8255
8298
|
};
|
|
8299
|
+
const pendingTaxReviewReward = {
|
|
8300
|
+
statuses: ["PENDING_TAX_REVIEW"],
|
|
8301
|
+
};
|
|
8302
|
+
const pendingNewTaxFormReward = {
|
|
8303
|
+
statuses: ["PENDING_NEW_TAX_FORM"],
|
|
8304
|
+
};
|
|
8305
|
+
const pendingTaxSubmissionReward = {
|
|
8306
|
+
statuses: ["PENDING_TAX_SUBMISSION"],
|
|
8307
|
+
};
|
|
8308
|
+
const pendingPartnerCreationReward = {
|
|
8309
|
+
statuses: ["PENDING_PARTNER_CREATION"],
|
|
8310
|
+
};
|
|
8256
8311
|
const redeemedReward = {
|
|
8257
8312
|
statuses: ["AVAILABLE", "EXPIRED", "REDEEMED"],
|
|
8258
8313
|
};
|
|
@@ -8317,8 +8372,8 @@ function getMonths() {
|
|
|
8317
8372
|
function getYears() {
|
|
8318
8373
|
return luxon.luxon.DateTime.now().toMillis() + 200000000000;
|
|
8319
8374
|
}
|
|
8320
|
-
const statusText = "{status, select, AVAILABLE {Available} CANCELLED {Cancelled} PENDING {Pending} PENDING_REVIEW {Pending} DENIED {Denied} EXPIRED {Expired} REDEEMED {Redeemed} other {Not available} }";
|
|
8321
|
-
const statusLongText = "{status, select, AVAILABLE {Reward expiring on} CANCELLED {Reward cancelled on} PENDING {Available on} PENDING_REVIEW {Pending since} DENIED {Denied on} EXPIRED {Reward expired on} REDEEMED {Redeemed} other {Not available} }";
|
|
8375
|
+
const statusText = "{status, select, AVAILABLE {Available} PAYOUT_SENT {Payout Sent} CANCELLED {Cancelled} PAYOUT_FAILED {Payout Failed} PENDING {Pending} PENDING_REVIEW {Pending} PENDING_TAX_REVIEW {Pending} PENDING_NEW_TAX_FORM {Pending} PENDING_TAX_SUBMISSION {Pending} PENDING_PARTNER_CREATION {Pending} DENIED {Denied} EXPIRED {Expired} REDEEMED {Redeemed} other {Not available} }";
|
|
8376
|
+
const statusLongText = "{status, select, AVAILABLE {Reward expiring on} PAYOUT_SENT {Payout process started on datePayoutStarted. Expected payout on datePayoutExpected.} CANCELLED {Reward cancelled on} PAYOUT_FAILED {This payout will be retried on} PENDING {Available on} PENDING_REVIEW {Pending since} PENDING_TAX_REVIEW {Awaiting tax form review.} PENDING_NEW_TAX_FORM {Invalid tax form. Submit a new form to receive your rewards.} PENDING_TAX_SUBMISSION {Submit your tax form to receive your rewards.} PENDING_PARTNER_CREATION {Complete your tax and cash payout setup to receive your rewards.} DENIED {Denied on} EXPIRED {Reward expired on} REDEEMED {Redeemed} other {Not available} }";
|
|
8322
8377
|
const PendingNoUnpend = () => {
|
|
8323
8378
|
return (index.h("sqm-referral-table-rewards-cell", { rewards: [{ ...baseReward, ...pendingReward, ...nullScheduledFor }], statusText: statusText, statusLongText: statusLongText, fuelTankText: "Your code is", rewardReceivedText: "Reward received on", expiringText: "Expiring in", pendingForText: "{status} for {date}", deniedHelpText: "Contact support if you think this is a mistake." }));
|
|
8324
8379
|
};
|
|
@@ -8379,6 +8434,9 @@ const AvailableWithExpiry = () => {
|
|
|
8379
8434
|
const Redeemed = () => {
|
|
8380
8435
|
return (index.h("sqm-referral-table-rewards-cell", { rewards: [{ ...baseReward, ...redeemedReward }], statusText: statusText, statusLongText: statusLongText, fuelTankText: "Your code is", rewardReceivedText: "Reward received on", expiringText: "Expiring in", pendingForText: "{status} for {date}", deniedHelpText: "Contact support if you think this is a mistake." }));
|
|
8381
8436
|
};
|
|
8437
|
+
const PayoutSent = () => {
|
|
8438
|
+
return (index.h("sqm-referral-table-rewards-cell", { rewards: [{ ...cashPayoutSentReward, ...payoutSentReward }], statusText: statusText, statusLongText: statusLongText, fuelTankText: "Your code is", rewardReceivedText: "Reward received on", expiringText: "Expiring in", pendingForText: "{status} for {date}", deniedHelpText: "Contact support if you think this is a mistake." }));
|
|
8439
|
+
};
|
|
8382
8440
|
const Cancelled = () => {
|
|
8383
8441
|
return (index.h("sqm-referral-table-rewards-cell", { rewards: [{ ...baseReward, ...cancelledReward }], statusText: statusText, statusLongText: statusLongText, fuelTankText: "Your code is", rewardReceivedText: "Reward received on", expiringText: "Expiring in", pendingForText: "{status} for {date}", deniedHelpText: "Contact support if you think this is a mistake." }));
|
|
8384
8442
|
};
|
|
@@ -8388,9 +8446,36 @@ const Expired = () => {
|
|
|
8388
8446
|
const Denied = () => {
|
|
8389
8447
|
return (index.h("sqm-referral-table-rewards-cell", { rewards: [{ ...baseReward, ...deniedReward }], statusText: statusText, statusLongText: statusLongText, fuelTankText: "Your code is", rewardReceivedText: "Reward received on", expiringText: "Expiring in", pendingForText: "{status} for {date}", deniedHelpText: "Contact support if you think this is a mistake." }));
|
|
8390
8448
|
};
|
|
8449
|
+
const PayoutFailed = () => {
|
|
8450
|
+
return (index.h("sqm-referral-table-rewards-cell", { rewards: [
|
|
8451
|
+
{
|
|
8452
|
+
...cashPayoutSentReward,
|
|
8453
|
+
...payoutFailedReward,
|
|
8454
|
+
datePayoutRetried: getDays(),
|
|
8455
|
+
dateGiven: null,
|
|
8456
|
+
},
|
|
8457
|
+
], statusText: statusText, statusLongText: statusLongText, fuelTankText: "Your code is", rewardReceivedText: "Reward received on", expiringText: "Expiring in", pendingForText: "{status} for {date}", deniedHelpText: "Contact support if you think this is a mistake." }));
|
|
8458
|
+
};
|
|
8391
8459
|
const PendingReview = () => {
|
|
8392
8460
|
return (index.h("sqm-referral-table-rewards-cell", { rewards: [{ ...baseReward, ...pendingReviewReward }], statusText: statusText, statusLongText: statusLongText, fuelTankText: "Your code is", rewardReceivedText: "Reward received on", expiringText: "Expiring in", pendingForText: "{status} for {date}", deniedHelpText: "Contact support if you think this is a mistake." }));
|
|
8393
8461
|
};
|
|
8462
|
+
const PendingTaxReview = () => {
|
|
8463
|
+
return (index.h("sqm-referral-table-rewards-cell", { rewards: [{ ...baseCashReward, ...pendingTaxReviewReward }], statusText: statusText, statusLongText: statusLongText, fuelTankText: "Your code is", expiringText: "Expiring in", pendingForText: "{status} for {date}", deniedHelpText: "Contact support if you think this is a mistake." }));
|
|
8464
|
+
};
|
|
8465
|
+
const PendingNewTaxForm = () => {
|
|
8466
|
+
return (index.h("sqm-referral-table-rewards-cell", { rewards: [{ ...baseCashReward, ...pendingNewTaxFormReward }], statusText: statusText, statusLongText: statusLongText, fuelTankText: "Your code is", expiringText: "Expiring in", pendingForText: "{status} for {date}", deniedHelpText: "Contact support if you think this is a mistake." }));
|
|
8467
|
+
};
|
|
8468
|
+
const PendingTaxSubmission = () => {
|
|
8469
|
+
return (index.h("sqm-referral-table-rewards-cell", { rewards: [{ ...baseCashReward, ...pendingTaxSubmissionReward }], statusText: statusText, statusLongText: statusLongText, fuelTankText: "Your code is", expiringText: "Expiring in", pendingForText: "{status} for {date}", deniedHelpText: "Contact support if you think this is a mistake." }));
|
|
8470
|
+
};
|
|
8471
|
+
const PendingPartnerCreation = () => {
|
|
8472
|
+
return (index.h("sqm-referral-table-rewards-cell", { rewards: [
|
|
8473
|
+
{
|
|
8474
|
+
...baseCashReward,
|
|
8475
|
+
...pendingPartnerCreationReward,
|
|
8476
|
+
},
|
|
8477
|
+
], statusText: statusText, statusLongText: statusLongText, fuelTankText: "Your code is", expiringText: "Expiring in", pendingForText: "{status} for {date}", deniedHelpText: "Contact support if you think this is a mistake." }));
|
|
8478
|
+
};
|
|
8394
8479
|
const EmptyCell = () => {
|
|
8395
8480
|
return (index.h("sqm-referral-table-rewards-cell", { rewards: zeroRewards, statusText: statusText, statusLongText: statusLongText, fuelTankText: "Your code is", rewardReceivedText: "Reward received on", expiringText: "Expiring in", pendingForText: "{status} for {date}", deniedHelpText: "Contact support if you think this is a mistake." }));
|
|
8396
8481
|
};
|
|
@@ -8423,10 +8508,16 @@ const ReferralTableRewardsCell = /*#__PURE__*/Object.freeze({
|
|
|
8423
8508
|
AvailableNoExpiry: AvailableNoExpiry,
|
|
8424
8509
|
AvailableWithExpiry: AvailableWithExpiry,
|
|
8425
8510
|
Redeemed: Redeemed,
|
|
8511
|
+
PayoutSent: PayoutSent,
|
|
8426
8512
|
Cancelled: Cancelled,
|
|
8427
8513
|
Expired: Expired,
|
|
8428
8514
|
Denied: Denied,
|
|
8515
|
+
PayoutFailed: PayoutFailed,
|
|
8429
8516
|
PendingReview: PendingReview,
|
|
8517
|
+
PendingTaxReview: PendingTaxReview,
|
|
8518
|
+
PendingNewTaxForm: PendingNewTaxForm,
|
|
8519
|
+
PendingTaxSubmission: PendingTaxSubmission,
|
|
8520
|
+
PendingPartnerCreation: PendingPartnerCreation,
|
|
8430
8521
|
EmptyCell: EmptyCell,
|
|
8431
8522
|
oneRewardCell: oneRewardCell,
|
|
8432
8523
|
twoRewardsCell: twoRewardsCell,
|
|
@@ -5,84 +5,35 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
const index = require('./index-78c52836.js');
|
|
6
6
|
const stencilHooks_module = require('./stencil-hooks.module-7c2013c9.js');
|
|
7
7
|
const index_module = require('./index.module-9243c470.js');
|
|
8
|
-
require('./cjs-1066ec21.js');
|
|
8
|
+
const cjs = require('./cjs-1066ec21.js');
|
|
9
9
|
const utils = require('./utils-6847bc06.js');
|
|
10
10
|
const useParentQuery = require('./useParentQuery-cc43afaf.js');
|
|
11
11
|
|
|
12
12
|
function getCurrentStep(user) {
|
|
13
|
-
|
|
13
|
+
// TODO: include banking form step as a case
|
|
14
|
+
var _a, _b;
|
|
14
15
|
if (!user.impactConnection ||
|
|
15
16
|
((_a = user.impactConnection) === null || _a === void 0 ? void 0 : _a.connectionStatus) === "NOT_CONNECTED" ||
|
|
16
17
|
!((_b = user.impactConnection) === null || _b === void 0 ? void 0 : _b.publisher)) {
|
|
17
18
|
return "/1";
|
|
18
19
|
}
|
|
19
|
-
|
|
20
|
-
if (!
|
|
20
|
+
const { requiredTaxDocumentType, currentTaxDocument } = user.impactConnection.publisher;
|
|
21
|
+
if (!requiredTaxDocumentType ||
|
|
22
|
+
(currentTaxDocument === null || currentTaxDocument === void 0 ? void 0 : currentTaxDocument.status) === "NOT_VERIFIED" ||
|
|
23
|
+
(currentTaxDocument === null || currentTaxDocument === void 0 ? void 0 : currentTaxDocument.status) === "ACTIVE") {
|
|
21
24
|
return "/submitted";
|
|
22
25
|
}
|
|
23
26
|
// If they do have a required document, look at current document
|
|
24
|
-
if (
|
|
25
|
-
const { status } = (_c = user.impactConnection.publisher) === null || _c === void 0 ? void 0 : _c.currentTaxDocument;
|
|
26
|
-
if (status === "ACTIVE" || status === "NOT_VERIFIED")
|
|
27
|
-
return "/submitted";
|
|
27
|
+
if (requiredTaxDocumentType) {
|
|
28
28
|
return "/3";
|
|
29
29
|
}
|
|
30
|
-
if
|
|
31
|
-
|
|
32
|
-
}
|
|
33
|
-
// Catchall
|
|
34
|
-
return "/error";
|
|
30
|
+
// TODO: Check if banking info here
|
|
31
|
+
return "/submitted";
|
|
35
32
|
}
|
|
36
33
|
function useTaxAndCash() {
|
|
37
34
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
38
35
|
const host = index_module.O();
|
|
39
|
-
|
|
40
|
-
// coleton
|
|
41
|
-
const id = "8e8613f156efabb26aa499d52a3e4ce5b7c627b4033a0f6523f476f3863665bc";
|
|
42
|
-
const accountId = "8e8613f156efabb26aa499d52a3e4ce5b7c627b4033a0f6523f476f3863665bc";
|
|
43
|
-
// andy
|
|
44
|
-
// const id =
|
|
45
|
-
// "64fdeb7347c94ab69bb5ff4c788ca78c0ba127cdc374a8300157250b1643767b";
|
|
46
|
-
// const accountId =
|
|
47
|
-
// "64fdeb7347c94ab69bb5ff4c788ca78c0ba127cdc374a8300157250b1643767b";
|
|
48
|
-
// sam
|
|
49
|
-
// const id =
|
|
50
|
-
// "ea9c677dda4e031bcb559541007ff61179fbe8bf8f6c32e478d97f09d069fd5b";
|
|
51
|
-
// const accountId =
|
|
52
|
-
// "ea9c677dda4e031bcb559541007ff61179fbe8bf8f6c32e478d97f09d069fd5b";
|
|
53
|
-
const programId = "22514";
|
|
54
|
-
//@ts-ignore
|
|
55
|
-
window.widgetIdent = {
|
|
56
|
-
tenantAlias: "aprh0cfq6y8tk",
|
|
57
|
-
appDomain: "https://staging.referralsaasquatch.com",
|
|
58
|
-
programId,
|
|
59
|
-
};
|
|
60
|
-
// coleton
|
|
61
|
-
stencilHooks_module.useEffect(() => {
|
|
62
|
-
index_module.setUserIdentity({
|
|
63
|
-
accountId,
|
|
64
|
-
id,
|
|
65
|
-
jwt: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6IklSTVhzWXk2WVlxcTQ2OTQzN21HOEVSUXQ4UW9LRkJhRzEifQ.eyJ1c2VyIjp7ImlkIjoiOGU4NjEzZjE1NmVmYWJiMjZhYTQ5OWQ1MmEzZTRjZTViN2M2MjdiNDAzM2EwZjY1MjNmNDc2ZjM4NjM2NjViYyIsImFjY291bnRJZCI6IjhlODYxM2YxNTZlZmFiYjI2YWE0OTlkNTJhM2U0Y2U1YjdjNjI3YjQwMzNhMGY2NTIzZjQ3NmYzODYzNjY1YmMifX0.pmLeLxR80-BxbQqGcvVqyxM491AfbhsvJ6aeXP7ZY40",
|
|
66
|
-
});
|
|
67
|
-
}, []);
|
|
68
|
-
// andy
|
|
69
|
-
// useEffect(() => {
|
|
70
|
-
// setUserIdentity({
|
|
71
|
-
// accountId,
|
|
72
|
-
// id,
|
|
73
|
-
// jwt: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6IklSTVhzWXk2WVlxcTQ2OTQzN21HOEVSUXQ4UW9LRkJhRzEifQ.eyJ1c2VyIjp7ImlkIjoiNjRmZGViNzM0N2M5NGFiNjliYjVmZjRjNzg4Y2E3OGMwYmExMjdjZGMzNzRhODMwMDE1NzI1MGIxNjQzNzY3YiIsImFjY291bnRJZCI6IjY0ZmRlYjczNDdjOTRhYjY5YmI1ZmY0Yzc4OGNhNzhjMGJhMTI3Y2RjMzc0YTgzMDAxNTcyNTBiMTY0Mzc2N2IifX0.rSeFVjrPvRlO_m4skwgnvJNbWfnIM7f_q2tfqo4R0pU",
|
|
74
|
-
// });
|
|
75
|
-
// }, []);
|
|
76
|
-
// sam
|
|
77
|
-
// useEffect(() => {
|
|
78
|
-
// setUserIdentity({
|
|
79
|
-
// accountId,
|
|
80
|
-
// id,
|
|
81
|
-
// jwt: "eyJraWQiOiJJUk1Yc1l5NllZcXE0Njk0MzdtRzhFUlF0OFFvS0ZCYUcxIiwidHlwIjoiSldUIiwiYWxnIjoiSFMyNTYifQ.eyJqdGkiOiI2NWRkMjE3YjVhYmE1MjI2MDAxMDhmZTciLCJpYXQiOjE3MDg5OTA4NDMsImV4cCI6MTcwOTA3NzI0Mywic3ViIjoiWldFNVl6WTNOMlJrWVRSbE1ETXhZbU5pTlRVNU5UUXhNREEzWm1ZMk1URTNPV1ppWlRoaVpqaG1ObU16TW1VME56aGtPVGRtTURsa01EWTVabVExWWc9PTpaV0U1WXpZM04yUmtZVFJsTURNeFltTmlOVFU1TlRReE1EQTNabVkyTVRFM09XWmlaVGhpWmpobU5tTXpNbVUwTnpoa09UZG1NRGxrTURZNVptUTFZZz09QGFwcmgwY2ZxNnk4dGs6dXNlcnMiLCJ1c2VyIjp7ImlkIjoiZWE5YzY3N2RkYTRlMDMxYmNiNTU5NTQxMDA3ZmY2MTE3OWZiZThiZjhmNmMzMmU0NzhkOTdmMDlkMDY5ZmQ1YiIsImFjY291bnRJZCI6ImVhOWM2NzdkZGE0ZTAzMWJjYjU1OTU0MTAwN2ZmNjExNzlmYmU4YmY4ZjZjMzJlNDc4ZDk3ZjA5ZDA2OWZkNWIiLCJkYXRlQmxvY2tlZCI6bnVsbH19.4d48e9AT21uCR-yA7rkn1TuBpHz8a56vI0pHpRtio0M",
|
|
82
|
-
// });
|
|
83
|
-
// }, []);
|
|
84
|
-
}
|
|
85
|
-
setupDemo();
|
|
36
|
+
// setupDemo();
|
|
86
37
|
/** END DEMO DATA */
|
|
87
38
|
const user = index_module.H();
|
|
88
39
|
// State for current step of form
|
|
@@ -260,7 +211,7 @@ const TaxAndCashMonolith = class {
|
|
|
260
211
|
* @uiName Tax form step text
|
|
261
212
|
* @uiGroup Step 1 Properties
|
|
262
213
|
*/
|
|
263
|
-
this.step1_formStep = "Step 1 of
|
|
214
|
+
this.step1_formStep = "Step 1 of 5";
|
|
264
215
|
/**
|
|
265
216
|
* Heading text shown above the forms inputs.
|
|
266
217
|
* @uiName Form heading text
|
|
@@ -367,7 +318,7 @@ const TaxAndCashMonolith = class {
|
|
|
367
318
|
* @uiName Indirect tax form step text
|
|
368
319
|
* @uiGroup Step 2 Properties
|
|
369
320
|
*/
|
|
370
|
-
this.step2_formStep = "Step 2 of
|
|
321
|
+
this.step2_formStep = "Step 2 of 5";
|
|
371
322
|
/**
|
|
372
323
|
* Heading text shown at the top of the page
|
|
373
324
|
* @uiName Indirect tax heading text
|
|
@@ -534,7 +485,7 @@ const TaxAndCashMonolith = class {
|
|
|
534
485
|
* @uiName Tax form step text
|
|
535
486
|
* @uiGroup Step 3 Properties
|
|
536
487
|
*/
|
|
537
|
-
this.step3_formStep = "Step 3 of
|
|
488
|
+
this.step3_formStep = "Step 3 of 5";
|
|
538
489
|
/**
|
|
539
490
|
* Heading text shown at the top of the page
|
|
540
491
|
* @uiName Tax form heading text
|
|
@@ -672,7 +623,7 @@ const TaxAndCashMonolith = class {
|
|
|
672
623
|
* @uiName Tax form step text
|
|
673
624
|
* @uiGroup Step 3b Properties
|
|
674
625
|
*/
|
|
675
|
-
this.step3b_formStep = "Step 3 of
|
|
626
|
+
this.step3b_formStep = "Step 3 of 5";
|
|
676
627
|
/**
|
|
677
628
|
* Sub text shown above form selection radio buttons
|
|
678
629
|
* @uiName Tax form selection heading text
|
|
@@ -968,17 +919,14 @@ const TaxAndCashMonolith = class {
|
|
|
968
919
|
return extractProps(props, "step4_");
|
|
969
920
|
}
|
|
970
921
|
render() {
|
|
971
|
-
const props = useTaxAndCash();
|
|
972
|
-
|
|
922
|
+
// const props = useTaxAndCash();
|
|
923
|
+
const props = index_module.isDemo() ? useDemoTaxAndCash(this) : useTaxAndCash();
|
|
973
924
|
switch (props.step) {
|
|
974
925
|
case "/1":
|
|
975
926
|
return (index.h("sqm-user-info-form", Object.assign({}, this.getUserInfoFormTextProps())));
|
|
976
927
|
case "/2":
|
|
977
928
|
return (index.h("sqm-indirect-tax-form", Object.assign({}, this.getIndirectTaxFormTextProps())));
|
|
978
929
|
case "/3":
|
|
979
|
-
case "/3/W8BEN":
|
|
980
|
-
case "/3/W8BENE":
|
|
981
|
-
case "/3/W9":
|
|
982
930
|
return (index.h("sqm-docusign-form", Object.assign({}, this.getDocuSignFormTextProps())));
|
|
983
931
|
case "/4":
|
|
984
932
|
return index.h("sqm-banking-info-form", null);
|
|
@@ -989,5 +937,15 @@ const TaxAndCashMonolith = class {
|
|
|
989
937
|
return index.h("div", null);
|
|
990
938
|
}
|
|
991
939
|
};
|
|
940
|
+
function useDemoTaxAndCash(props) {
|
|
941
|
+
const [step, setStep] = useParentQuery.useParentState({
|
|
942
|
+
namespace: useParentQuery.TAX_CONTEXT_NAMESPACE,
|
|
943
|
+
initialValue: "/1",
|
|
944
|
+
});
|
|
945
|
+
return cjs.cjs({
|
|
946
|
+
step,
|
|
947
|
+
setStep,
|
|
948
|
+
}, props.demoData || {}, { arrayMerge: (_, a) => a });
|
|
949
|
+
}
|
|
992
950
|
|
|
993
951
|
exports.sqm_tax_and_cash = TaxAndCashMonolith;
|
|
@@ -46,6 +46,43 @@ const baseReward = {
|
|
|
46
46
|
],
|
|
47
47
|
},
|
|
48
48
|
};
|
|
49
|
+
const baseCashReward = {
|
|
50
|
+
id: "1234",
|
|
51
|
+
type: "CREDIT",
|
|
52
|
+
value: 50,
|
|
53
|
+
unit: "USD",
|
|
54
|
+
name: "test",
|
|
55
|
+
dateScheduledFor: getDays(),
|
|
56
|
+
dateExpires: getMonths(),
|
|
57
|
+
dateCancelled: 134400,
|
|
58
|
+
dateRedeemed: 0,
|
|
59
|
+
fuelTankCode: null,
|
|
60
|
+
fuelTankType: null,
|
|
61
|
+
currency: "USD",
|
|
62
|
+
prettyValue: "$50.00",
|
|
63
|
+
statuses: ["AVAILABLE"],
|
|
64
|
+
globalRewardKey: "Key",
|
|
65
|
+
rewardRedemptionTransactions: null,
|
|
66
|
+
};
|
|
67
|
+
const cashPayoutSentReward = {
|
|
68
|
+
id: "1234",
|
|
69
|
+
type: "CREDIT",
|
|
70
|
+
value: 50,
|
|
71
|
+
unit: "USD",
|
|
72
|
+
name: "test",
|
|
73
|
+
dateScheduledFor: getDays(),
|
|
74
|
+
dateExpires: getMonths(),
|
|
75
|
+
datePayoutExpected: getDays(),
|
|
76
|
+
dateCancelled: 134400,
|
|
77
|
+
dateRedeemed: 0,
|
|
78
|
+
fuelTankCode: null,
|
|
79
|
+
fuelTankType: null,
|
|
80
|
+
currency: "USD",
|
|
81
|
+
prettyValue: "$50.00",
|
|
82
|
+
statuses: ["AVAILABLE"],
|
|
83
|
+
globalRewardKey: "Key",
|
|
84
|
+
rewardRedemptionTransactions: null,
|
|
85
|
+
};
|
|
49
86
|
const nullExpiresIn = {
|
|
50
87
|
dateExpires: null,
|
|
51
88
|
};
|
|
@@ -72,6 +109,9 @@ const integrationReward = {
|
|
|
72
109
|
const pendingReward = {
|
|
73
110
|
statuses: ["AVAILABLE", "PENDING"],
|
|
74
111
|
};
|
|
112
|
+
const payoutSentReward = {
|
|
113
|
+
statuses: ["PAYOUT_SENT"],
|
|
114
|
+
};
|
|
75
115
|
const cancelledReward = {
|
|
76
116
|
statuses: ["PENDING", "CANCELLED"],
|
|
77
117
|
dateCancelled: 1626850800000,
|
|
@@ -83,9 +123,24 @@ const expiredReward = {
|
|
|
83
123
|
const deniedReward = {
|
|
84
124
|
statuses: ["DENIED"],
|
|
85
125
|
};
|
|
126
|
+
const payoutFailedReward = {
|
|
127
|
+
statuses: ["PAYOUT_FAILED"],
|
|
128
|
+
};
|
|
86
129
|
const pendingReviewReward = {
|
|
87
130
|
statuses: ["PENDING_REVIEW"],
|
|
88
131
|
};
|
|
132
|
+
const pendingTaxReviewReward = {
|
|
133
|
+
statuses: ["PENDING_TAX_REVIEW"],
|
|
134
|
+
};
|
|
135
|
+
const pendingNewTaxFormReward = {
|
|
136
|
+
statuses: ["PENDING_NEW_TAX_FORM"],
|
|
137
|
+
};
|
|
138
|
+
const pendingTaxSubmissionReward = {
|
|
139
|
+
statuses: ["PENDING_TAX_SUBMISSION"],
|
|
140
|
+
};
|
|
141
|
+
const pendingPartnerCreationReward = {
|
|
142
|
+
statuses: ["PENDING_PARTNER_CREATION"],
|
|
143
|
+
};
|
|
89
144
|
const redeemedReward = {
|
|
90
145
|
statuses: ["AVAILABLE", "EXPIRED", "REDEEMED"],
|
|
91
146
|
};
|
|
@@ -150,8 +205,8 @@ function getMonths() {
|
|
|
150
205
|
function getYears() {
|
|
151
206
|
return DateTime.now().toMillis() + 200000000000;
|
|
152
207
|
}
|
|
153
|
-
const statusText = "{status, select, AVAILABLE {Available} CANCELLED {Cancelled} PENDING {Pending} PENDING_REVIEW {Pending} DENIED {Denied} EXPIRED {Expired} REDEEMED {Redeemed} other {Not available} }";
|
|
154
|
-
const statusLongText = "{status, select, AVAILABLE {Reward expiring on} CANCELLED {Reward cancelled on} PENDING {Available on} PENDING_REVIEW {Pending since} DENIED {Denied on} EXPIRED {Reward expired on} REDEEMED {Redeemed} other {Not available} }";
|
|
208
|
+
const statusText = "{status, select, AVAILABLE {Available} PAYOUT_SENT {Payout Sent} CANCELLED {Cancelled} PAYOUT_FAILED {Payout Failed} PENDING {Pending} PENDING_REVIEW {Pending} PENDING_TAX_REVIEW {Pending} PENDING_NEW_TAX_FORM {Pending} PENDING_TAX_SUBMISSION {Pending} PENDING_PARTNER_CREATION {Pending} DENIED {Denied} EXPIRED {Expired} REDEEMED {Redeemed} other {Not available} }";
|
|
209
|
+
const statusLongText = "{status, select, AVAILABLE {Reward expiring on} PAYOUT_SENT {Payout process started on datePayoutStarted. Expected payout on datePayoutExpected.} CANCELLED {Reward cancelled on} PAYOUT_FAILED {This payout will be retried on} PENDING {Available on} PENDING_REVIEW {Pending since} PENDING_TAX_REVIEW {Awaiting tax form review.} PENDING_NEW_TAX_FORM {Invalid tax form. Submit a new form to receive your rewards.} PENDING_TAX_SUBMISSION {Submit your tax form to receive your rewards.} PENDING_PARTNER_CREATION {Complete your tax and cash payout setup to receive your rewards.} DENIED {Denied on} EXPIRED {Reward expired on} REDEEMED {Redeemed} other {Not available} }";
|
|
155
210
|
export const PendingNoUnpend = () => {
|
|
156
211
|
return (h("sqm-referral-table-rewards-cell", { rewards: [{ ...baseReward, ...pendingReward, ...nullScheduledFor }], statusText: statusText, statusLongText: statusLongText, fuelTankText: "Your code is", rewardReceivedText: "Reward received on", expiringText: "Expiring in", pendingForText: "{status} for {date}", deniedHelpText: "Contact support if you think this is a mistake." }));
|
|
157
212
|
};
|
|
@@ -212,6 +267,9 @@ export const AvailableWithExpiry = () => {
|
|
|
212
267
|
export const Redeemed = () => {
|
|
213
268
|
return (h("sqm-referral-table-rewards-cell", { rewards: [{ ...baseReward, ...redeemedReward }], statusText: statusText, statusLongText: statusLongText, fuelTankText: "Your code is", rewardReceivedText: "Reward received on", expiringText: "Expiring in", pendingForText: "{status} for {date}", deniedHelpText: "Contact support if you think this is a mistake." }));
|
|
214
269
|
};
|
|
270
|
+
export const PayoutSent = () => {
|
|
271
|
+
return (h("sqm-referral-table-rewards-cell", { rewards: [{ ...cashPayoutSentReward, ...payoutSentReward }], statusText: statusText, statusLongText: statusLongText, fuelTankText: "Your code is", rewardReceivedText: "Reward received on", expiringText: "Expiring in", pendingForText: "{status} for {date}", deniedHelpText: "Contact support if you think this is a mistake." }));
|
|
272
|
+
};
|
|
215
273
|
export const Cancelled = () => {
|
|
216
274
|
return (h("sqm-referral-table-rewards-cell", { rewards: [{ ...baseReward, ...cancelledReward }], statusText: statusText, statusLongText: statusLongText, fuelTankText: "Your code is", rewardReceivedText: "Reward received on", expiringText: "Expiring in", pendingForText: "{status} for {date}", deniedHelpText: "Contact support if you think this is a mistake." }));
|
|
217
275
|
};
|
|
@@ -221,9 +279,36 @@ export const Expired = () => {
|
|
|
221
279
|
export const Denied = () => {
|
|
222
280
|
return (h("sqm-referral-table-rewards-cell", { rewards: [{ ...baseReward, ...deniedReward }], statusText: statusText, statusLongText: statusLongText, fuelTankText: "Your code is", rewardReceivedText: "Reward received on", expiringText: "Expiring in", pendingForText: "{status} for {date}", deniedHelpText: "Contact support if you think this is a mistake." }));
|
|
223
281
|
};
|
|
282
|
+
export const PayoutFailed = () => {
|
|
283
|
+
return (h("sqm-referral-table-rewards-cell", { rewards: [
|
|
284
|
+
{
|
|
285
|
+
...cashPayoutSentReward,
|
|
286
|
+
...payoutFailedReward,
|
|
287
|
+
datePayoutRetried: getDays(),
|
|
288
|
+
dateGiven: null,
|
|
289
|
+
},
|
|
290
|
+
], statusText: statusText, statusLongText: statusLongText, fuelTankText: "Your code is", rewardReceivedText: "Reward received on", expiringText: "Expiring in", pendingForText: "{status} for {date}", deniedHelpText: "Contact support if you think this is a mistake." }));
|
|
291
|
+
};
|
|
224
292
|
export const PendingReview = () => {
|
|
225
293
|
return (h("sqm-referral-table-rewards-cell", { rewards: [{ ...baseReward, ...pendingReviewReward }], statusText: statusText, statusLongText: statusLongText, fuelTankText: "Your code is", rewardReceivedText: "Reward received on", expiringText: "Expiring in", pendingForText: "{status} for {date}", deniedHelpText: "Contact support if you think this is a mistake." }));
|
|
226
294
|
};
|
|
295
|
+
export const PendingTaxReview = () => {
|
|
296
|
+
return (h("sqm-referral-table-rewards-cell", { rewards: [{ ...baseCashReward, ...pendingTaxReviewReward }], statusText: statusText, statusLongText: statusLongText, fuelTankText: "Your code is", expiringText: "Expiring in", pendingForText: "{status} for {date}", deniedHelpText: "Contact support if you think this is a mistake." }));
|
|
297
|
+
};
|
|
298
|
+
export const PendingNewTaxForm = () => {
|
|
299
|
+
return (h("sqm-referral-table-rewards-cell", { rewards: [{ ...baseCashReward, ...pendingNewTaxFormReward }], statusText: statusText, statusLongText: statusLongText, fuelTankText: "Your code is", expiringText: "Expiring in", pendingForText: "{status} for {date}", deniedHelpText: "Contact support if you think this is a mistake." }));
|
|
300
|
+
};
|
|
301
|
+
export const PendingTaxSubmission = () => {
|
|
302
|
+
return (h("sqm-referral-table-rewards-cell", { rewards: [{ ...baseCashReward, ...pendingTaxSubmissionReward }], statusText: statusText, statusLongText: statusLongText, fuelTankText: "Your code is", expiringText: "Expiring in", pendingForText: "{status} for {date}", deniedHelpText: "Contact support if you think this is a mistake." }));
|
|
303
|
+
};
|
|
304
|
+
export const PendingPartnerCreation = () => {
|
|
305
|
+
return (h("sqm-referral-table-rewards-cell", { rewards: [
|
|
306
|
+
{
|
|
307
|
+
...baseCashReward,
|
|
308
|
+
...pendingPartnerCreationReward,
|
|
309
|
+
},
|
|
310
|
+
], statusText: statusText, statusLongText: statusLongText, fuelTankText: "Your code is", expiringText: "Expiring in", pendingForText: "{status} for {date}", deniedHelpText: "Contact support if you think this is a mistake." }));
|
|
311
|
+
};
|
|
227
312
|
export const EmptyCell = () => {
|
|
228
313
|
return (h("sqm-referral-table-rewards-cell", { rewards: zeroRewards, statusText: statusText, statusLongText: statusLongText, fuelTankText: "Your code is", rewardReceivedText: "Reward received on", expiringText: "Expiring in", pendingForText: "{status} for {date}", deniedHelpText: "Contact support if you think this is a mistake." }));
|
|
229
314
|
};
|