@saasquatch/mint-components 2.0.10 → 2.0.11-1
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-referral-table_11.cjs.entry.js +22 -12
- package/dist/cjs/sqm-rewards-table_9.cjs.entry.js +28 -9
- package/dist/cjs/sqm-stencilbook.cjs.entry.js +783 -268
- package/dist/collection/components/sqm-referral-table/TaxAndCashReferralTable.stories.js +97 -0
- package/dist/collection/components/sqm-referral-table/TaxAndCashReferralTableRewardsCell.stories.js +188 -0
- package/dist/collection/components/sqm-referral-table/cells/sqm-referral-table-rewards-cell.js +28 -15
- package/dist/collection/components/sqm-rewards-table/RewardsTable.stories.js +1 -43
- package/dist/collection/components/sqm-rewards-table/RewardsTableCell.stories.js +91 -61
- package/dist/collection/components/sqm-rewards-table/TaxAndCashRewardsTable.stories.js +113 -0
- package/dist/collection/components/sqm-rewards-table/TaxAndCashRewardsTableCell.stories.js +213 -0
- package/dist/collection/components/sqm-rewards-table/cells/sqm-rewards-table-status-cell.js +46 -9
- package/dist/collection/components/sqm-rewards-table/columns/sqm-rewards-table-status-column.js +2 -2
- package/dist/collection/components/sqm-stencilbook/sqm-stencilbook.js +9 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/mint-components.js +1 -1
- package/dist/esm/sqm-referral-table_11.entry.js +22 -12
- package/dist/esm/sqm-rewards-table_9.entry.js +28 -9
- package/dist/esm/sqm-stencilbook.entry.js +783 -268
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/mint-components.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/mint-components/mint-components.esm.js +1 -1
- package/dist/mint-components/p-0ffe46b4.entry.js +144 -0
- package/dist/mint-components/{p-4d60b275.entry.js → p-33c3bd0c.entry.js} +2 -2
- package/dist/mint-components/p-384fc8c5.system.entry.js +1 -0
- package/dist/mint-components/{p-55f1801e.system.entry.js → p-3c66200a.system.entry.js} +1 -1
- package/dist/mint-components/{p-63a928e0.system.entry.js → p-75d4e3df.system.entry.js} +1 -1
- package/dist/mint-components/p-af123d2b.system.js +1 -1
- package/dist/mint-components/p-bfd089ff.entry.js +1 -0
- package/dist/types/components/sqm-referral-table/TaxAndCashReferralTable.stories.d.ts +5 -0
- package/dist/types/components/sqm-referral-table/TaxAndCashReferralTableRewardsCell.stories.d.ts +14 -0
- package/dist/types/components/sqm-rewards-table/RewardsTableCell.stories.d.ts +0 -7
- package/dist/types/components/sqm-rewards-table/TaxAndCashRewardsTable.stories.d.ts +5 -0
- package/dist/types/components/sqm-rewards-table/TaxAndCashRewardsTableCell.stories.d.ts +14 -0
- package/dist/types/components/sqm-rewards-table/cells/sqm-rewards-table-status-cell.d.ts +1 -0
- package/dist/types/components.d.ts +2 -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/mint-components/p-636a841f.entry.js +0 -1
- package/dist/mint-components/p-9d19a0f7.system.entry.js +0 -1
- package/dist/mint-components/p-f08dd2a8.entry.js +0 -144
- package/docs/stats.json +0 -122783
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
import { GenericTableView } from "../../tables/GenericTableView";
|
|
3
|
+
import { SourceCellReferral, DateCell } from "./RewardsTableCell.stories";
|
|
4
|
+
import { StatusCellPayoutSent, StatusCellPayoutFailed, StatusCellPendingNewTaxForm, StatusCellPendingPartnerCreation, StatusCellPendingTaxReview, StatusCellPendingTaxSubmission, StatusCellPayoutProcessing, CashReward, StatusCellPendingW9, StatusCellPayoutCancelled, } from "./TaxAndCashRewardsTableCell.stories";
|
|
5
|
+
export default {
|
|
6
|
+
title: "Components/Tax And Cash Rewards Table",
|
|
7
|
+
};
|
|
8
|
+
const rewardsTableProps = (rows, empty = false, loading = false, prev = "Prev", next = "Next", hidden = "") => ({
|
|
9
|
+
states: {
|
|
10
|
+
hasPrev: false,
|
|
11
|
+
hasNext: true,
|
|
12
|
+
show: empty
|
|
13
|
+
? "empty"
|
|
14
|
+
: loading
|
|
15
|
+
? "loading"
|
|
16
|
+
: "rows",
|
|
17
|
+
namespace: "sqm-rewards-table",
|
|
18
|
+
},
|
|
19
|
+
data: {
|
|
20
|
+
textOverrides: {
|
|
21
|
+
showLabels: true,
|
|
22
|
+
prevLabel: prev,
|
|
23
|
+
moreLabel: next,
|
|
24
|
+
},
|
|
25
|
+
hiddenColumns: hidden,
|
|
26
|
+
mdBreakpoint: 799,
|
|
27
|
+
smBreakpoint: 599,
|
|
28
|
+
},
|
|
29
|
+
callbacks: {
|
|
30
|
+
prevPage: () => console.log("Prev"),
|
|
31
|
+
nextPage: () => console.log("Next"),
|
|
32
|
+
},
|
|
33
|
+
elements: {
|
|
34
|
+
columns: ["Rewards", "Status", "Source", "Date received"],
|
|
35
|
+
rows: rows,
|
|
36
|
+
},
|
|
37
|
+
});
|
|
38
|
+
/* -------------------------------------------------------------------------- */
|
|
39
|
+
/* PENDING ROWS */
|
|
40
|
+
/* -------------------------------------------------------------------------- */
|
|
41
|
+
const r_pending_new_tax_form = [
|
|
42
|
+
h(CashReward, null),
|
|
43
|
+
h(StatusCellPendingNewTaxForm, null),
|
|
44
|
+
h(SourceCellReferral, null),
|
|
45
|
+
h(DateCell, null),
|
|
46
|
+
];
|
|
47
|
+
const r_pending_tax_submission = [
|
|
48
|
+
h(CashReward, null),
|
|
49
|
+
h(StatusCellPendingTaxSubmission, null),
|
|
50
|
+
h(SourceCellReferral, null),
|
|
51
|
+
h(DateCell, null),
|
|
52
|
+
];
|
|
53
|
+
const r_pending_tax_review = [
|
|
54
|
+
h(CashReward, null),
|
|
55
|
+
h(StatusCellPendingTaxReview, null),
|
|
56
|
+
h(SourceCellReferral, null),
|
|
57
|
+
h(DateCell, null),
|
|
58
|
+
];
|
|
59
|
+
const r_pending_partner_creation = [
|
|
60
|
+
h(CashReward, null),
|
|
61
|
+
h(StatusCellPendingPartnerCreation, null),
|
|
62
|
+
h(SourceCellReferral, null),
|
|
63
|
+
h(DateCell, null),
|
|
64
|
+
];
|
|
65
|
+
const r_pending_w9 = [
|
|
66
|
+
h(CashReward, null),
|
|
67
|
+
h(StatusCellPendingW9, null),
|
|
68
|
+
h(SourceCellReferral, null),
|
|
69
|
+
h(DateCell, null),
|
|
70
|
+
];
|
|
71
|
+
/* -------------------------------------------------------------------------- */
|
|
72
|
+
/* SUCCESS / PROCESSING ROWS */
|
|
73
|
+
/* -------------------------------------------------------------------------- */
|
|
74
|
+
const r_payout_sent = [
|
|
75
|
+
h(CashReward, null),
|
|
76
|
+
h(StatusCellPayoutSent, null),
|
|
77
|
+
h(SourceCellReferral, null),
|
|
78
|
+
h(DateCell, null),
|
|
79
|
+
];
|
|
80
|
+
const r_payout_processing = [
|
|
81
|
+
h(CashReward, null),
|
|
82
|
+
h(StatusCellPayoutProcessing, null),
|
|
83
|
+
h(SourceCellReferral, null),
|
|
84
|
+
h(DateCell, null),
|
|
85
|
+
];
|
|
86
|
+
/* -------------------------------------------------------------------------- */
|
|
87
|
+
/* ERROR / CANCELLED ROWS */
|
|
88
|
+
/* -------------------------------------------------------------------------- */
|
|
89
|
+
const r_payout_failed = [
|
|
90
|
+
h(CashReward, null),
|
|
91
|
+
h(StatusCellPayoutFailed, null),
|
|
92
|
+
h(SourceCellReferral, null),
|
|
93
|
+
h(DateCell, null),
|
|
94
|
+
];
|
|
95
|
+
const r_payout_cancelled = [
|
|
96
|
+
h(CashReward, null),
|
|
97
|
+
h(StatusCellPayoutCancelled, null),
|
|
98
|
+
h(SourceCellReferral, null),
|
|
99
|
+
h(DateCell, null),
|
|
100
|
+
];
|
|
101
|
+
export const RewardsTable = () => {
|
|
102
|
+
return (h(GenericTableView, Object.assign({}, rewardsTableProps([
|
|
103
|
+
r_pending_new_tax_form,
|
|
104
|
+
r_pending_tax_submission,
|
|
105
|
+
r_pending_tax_review,
|
|
106
|
+
r_pending_partner_creation,
|
|
107
|
+
r_pending_w9,
|
|
108
|
+
r_payout_processing,
|
|
109
|
+
r_payout_sent,
|
|
110
|
+
r_payout_failed,
|
|
111
|
+
r_payout_cancelled,
|
|
112
|
+
]))));
|
|
113
|
+
};
|
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
export default {
|
|
3
|
+
title: "Components/Tax And Cash Rewards Table Cell",
|
|
4
|
+
};
|
|
5
|
+
const cashReward = {
|
|
6
|
+
id: "68c34fd98a6cb4f5f8394084",
|
|
7
|
+
type: "CREDIT",
|
|
8
|
+
value: 59900,
|
|
9
|
+
prettyValue: "$599.00",
|
|
10
|
+
availableValue: 0,
|
|
11
|
+
prettyAvailableValue: "$0.00",
|
|
12
|
+
prettyAssignedCredit: "$599.00",
|
|
13
|
+
prettyRedeemedCredit: "$599.00",
|
|
14
|
+
prettyValueNumber: "599",
|
|
15
|
+
prettyAvailableNumber: "0",
|
|
16
|
+
prettyRedeemedNumber: "599",
|
|
17
|
+
unit: "CASH/USD",
|
|
18
|
+
baseUnit: "CASH",
|
|
19
|
+
rewardUnit: {
|
|
20
|
+
key: "CASH/USD",
|
|
21
|
+
name: "Cash",
|
|
22
|
+
},
|
|
23
|
+
name: null,
|
|
24
|
+
dateCreated: 1757630425085,
|
|
25
|
+
dateScheduledFor: 1757631025115,
|
|
26
|
+
dateGiven: 1757630737115,
|
|
27
|
+
dateExpires: null,
|
|
28
|
+
dateCancelled: null,
|
|
29
|
+
dateRedeemed: 1757630737115,
|
|
30
|
+
dateModified: 1757630737115,
|
|
31
|
+
rewardSource: "MANUAL",
|
|
32
|
+
fuelTankCode: null,
|
|
33
|
+
fuelTankType: null,
|
|
34
|
+
fuelTankSyncSetting: null,
|
|
35
|
+
currency: "USD",
|
|
36
|
+
meta: null,
|
|
37
|
+
programId: "40444",
|
|
38
|
+
programRewardKey: null,
|
|
39
|
+
globalRewardKey: "cash",
|
|
40
|
+
program: {
|
|
41
|
+
id: "40444",
|
|
42
|
+
name: "Make Money Program",
|
|
43
|
+
template: {
|
|
44
|
+
id: "2qdmAx1fi31deo3P9O36sQ",
|
|
45
|
+
name: "Referral Program With Objectives",
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
partnerFundsTransfer: null,
|
|
49
|
+
user: {
|
|
50
|
+
id: "8da2c67e05e3e56de7ea638c2705017945211621c80e1cd4b4aac0e423d1cdb2",
|
|
51
|
+
accountId: "8da2c67e05e3e56de7ea638c2705017945211621c80e1cd4b4aac0e423d1cdb2",
|
|
52
|
+
firstName: "Billy",
|
|
53
|
+
lastName: "Jean",
|
|
54
|
+
email: "billy.jean@impact.com",
|
|
55
|
+
impactConnection: {
|
|
56
|
+
connected: true,
|
|
57
|
+
taxHandlingEnabled: true,
|
|
58
|
+
publisher: null,
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
referral: null,
|
|
62
|
+
description: null,
|
|
63
|
+
statuses: ["REDEEMED"],
|
|
64
|
+
rewardRedemptionTransactions: {
|
|
65
|
+
data: null,
|
|
66
|
+
},
|
|
67
|
+
exchangedRewardRedemptionTransaction: null,
|
|
68
|
+
pendingReasons: [],
|
|
69
|
+
};
|
|
70
|
+
const pending = {
|
|
71
|
+
statuses: ["PENDING"],
|
|
72
|
+
};
|
|
73
|
+
const payoutSent = {
|
|
74
|
+
statuses: ["PAYOUT_APPROVED"],
|
|
75
|
+
};
|
|
76
|
+
const payoutFailed = {
|
|
77
|
+
statuses: ["PAYOUT_FAILED"],
|
|
78
|
+
};
|
|
79
|
+
const payoutCancelled = {
|
|
80
|
+
statuses: ["PAYOUT_CANCELLED"],
|
|
81
|
+
dateCancelled: 1355612521321,
|
|
82
|
+
};
|
|
83
|
+
const processingPFT = {
|
|
84
|
+
partnerFundsTransfer: {
|
|
85
|
+
id: "123",
|
|
86
|
+
status: null,
|
|
87
|
+
dateCreated: 1355612521321,
|
|
88
|
+
dateScheduled: 2779257600000,
|
|
89
|
+
dateTransferred: null,
|
|
90
|
+
},
|
|
91
|
+
};
|
|
92
|
+
const taxConnection = {
|
|
93
|
+
connected: true,
|
|
94
|
+
taxHandlingEnabled: true,
|
|
95
|
+
publisher: {
|
|
96
|
+
requiredTaxDocumentType: "W8BEN",
|
|
97
|
+
currentTaxDocument: {
|
|
98
|
+
status: "NOT_VERIFIED",
|
|
99
|
+
type: "W8BEN",
|
|
100
|
+
dateCreated: 321321487,
|
|
101
|
+
},
|
|
102
|
+
withdrawalSettings: {
|
|
103
|
+
paymentMethod: "BANK_TRANSFER",
|
|
104
|
+
},
|
|
105
|
+
payoutsAccount: null,
|
|
106
|
+
},
|
|
107
|
+
};
|
|
108
|
+
export const CashReward = () => {
|
|
109
|
+
return (h("sqm-rewards-table-reward-cell", { reward: { ...cashReward }, availableText: "{availableAmount} remaining" }));
|
|
110
|
+
};
|
|
111
|
+
export const StatusCellPendingTaxReview = () => {
|
|
112
|
+
return (h("sqm-rewards-table-status-cell", { statusText: "Pending", reward: { ...cashReward, ...pending, pendingReasons: ["US_TAX"] }, taxConnection: {
|
|
113
|
+
...taxConnection,
|
|
114
|
+
publisher: {
|
|
115
|
+
requiredTaxDocumentType: "W8BEN",
|
|
116
|
+
currentTaxDocument: {
|
|
117
|
+
status: "",
|
|
118
|
+
},
|
|
119
|
+
...taxConnection.publisher,
|
|
120
|
+
},
|
|
121
|
+
} }));
|
|
122
|
+
};
|
|
123
|
+
export const StatusCellPendingNewTaxForm = () => {
|
|
124
|
+
return (h("sqm-rewards-table-status-cell", { statusText: "Pending", reward: {
|
|
125
|
+
...cashReward,
|
|
126
|
+
statuses: ["PENDING"],
|
|
127
|
+
pendingReasons: ["US_TAX"],
|
|
128
|
+
}, taxConnection: {
|
|
129
|
+
connected: true,
|
|
130
|
+
taxHandlingEnabled: true,
|
|
131
|
+
publisher: {
|
|
132
|
+
requiredTaxDocumentType: "W8BEN",
|
|
133
|
+
withdrawalSettings: {
|
|
134
|
+
paymentMethod: "BANK_TRANSFER",
|
|
135
|
+
},
|
|
136
|
+
payoutsAccount: null,
|
|
137
|
+
currentTaxDocument: {
|
|
138
|
+
status: "INACTIVE",
|
|
139
|
+
type: "W8BEN",
|
|
140
|
+
dateCreated: 321321487,
|
|
141
|
+
},
|
|
142
|
+
},
|
|
143
|
+
} }));
|
|
144
|
+
};
|
|
145
|
+
export const StatusCellPendingTaxSubmission = () => {
|
|
146
|
+
return (h("sqm-rewards-table-status-cell", { statusText: "Pending", reward: { ...cashReward, ...pending, pendingReasons: ["US_TAX"] }, taxConnection: {
|
|
147
|
+
...taxConnection,
|
|
148
|
+
publisher: {
|
|
149
|
+
...taxConnection.publisher,
|
|
150
|
+
requiredTaxDocumentType: "W8BEN",
|
|
151
|
+
currentTaxDocument: null,
|
|
152
|
+
},
|
|
153
|
+
} }));
|
|
154
|
+
};
|
|
155
|
+
export const StatusCellPendingPartnerCreation = () => {
|
|
156
|
+
return (h("sqm-rewards-table-status-cell", { statusText: "Pending", reward: {
|
|
157
|
+
...cashReward,
|
|
158
|
+
...pending,
|
|
159
|
+
pendingReasons: ["US_TAX"],
|
|
160
|
+
}, taxConnection: {
|
|
161
|
+
...taxConnection,
|
|
162
|
+
connected: false,
|
|
163
|
+
} }));
|
|
164
|
+
};
|
|
165
|
+
export const StatusCellPendingW9 = () => {
|
|
166
|
+
return (h("sqm-rewards-table-status-cell", { statusText: "Pending", reward: {
|
|
167
|
+
...cashReward,
|
|
168
|
+
...pending,
|
|
169
|
+
pendingReasons: ["US_TAX"],
|
|
170
|
+
}, taxConnection: {
|
|
171
|
+
...taxConnection,
|
|
172
|
+
taxHandlingEnabled: false,
|
|
173
|
+
} }));
|
|
174
|
+
};
|
|
175
|
+
export const StatusCellPayoutSent = () => {
|
|
176
|
+
return (h("sqm-rewards-table-status-cell", { statusText: "Payout Sent", reward: {
|
|
177
|
+
...cashReward,
|
|
178
|
+
partnerFundsTransfer: {
|
|
179
|
+
id: "transfer-123",
|
|
180
|
+
status: "TRANSFERRED",
|
|
181
|
+
dateScheduled: 1640995200000,
|
|
182
|
+
dateTransferred: 1640995200000,
|
|
183
|
+
dateCreated: 1640995200000,
|
|
184
|
+
},
|
|
185
|
+
}, taxConnection: taxConnection }));
|
|
186
|
+
};
|
|
187
|
+
export const StatusCellPayoutFailed = () => {
|
|
188
|
+
return (h("sqm-rewards-table-status-cell", { statusText: "Payout Failed", reward: {
|
|
189
|
+
...cashReward,
|
|
190
|
+
partnerFundsTransfer: {
|
|
191
|
+
id: "transfer-failed",
|
|
192
|
+
status: "OVERDUE",
|
|
193
|
+
dateScheduled: 1640995200000,
|
|
194
|
+
dateTransferred: null,
|
|
195
|
+
dateCreated: 1640995200000,
|
|
196
|
+
},
|
|
197
|
+
} }));
|
|
198
|
+
};
|
|
199
|
+
export const StatusCellPayoutProcessing = () => {
|
|
200
|
+
return (h("sqm-rewards-table-status-cell", { statusText: "Payment Processing", reward: { ...cashReward, ...processingPFT } }));
|
|
201
|
+
};
|
|
202
|
+
export const StatusCellPayoutCancelled = () => {
|
|
203
|
+
return (h("sqm-rewards-table-status-cell", { statusText: "Payout Cancelled", reward: {
|
|
204
|
+
...cashReward,
|
|
205
|
+
partnerFundsTransfer: {
|
|
206
|
+
id: "transfer-reversed",
|
|
207
|
+
status: "REVERSED",
|
|
208
|
+
dateScheduled: 1640995200000,
|
|
209
|
+
dateTransferred: null,
|
|
210
|
+
dateCreated: 1640995200000,
|
|
211
|
+
},
|
|
212
|
+
} }));
|
|
213
|
+
};
|
|
@@ -74,8 +74,9 @@ export class RewardTableStatusCell {
|
|
|
74
74
|
this.pendingReviewText = "Awaiting review";
|
|
75
75
|
this.deniedText = "Detected self-referral";
|
|
76
76
|
this.payoutFailed = "Payout failed due to a fulfillment issue and is current being retried.";
|
|
77
|
-
this.payoutApproved = "
|
|
77
|
+
this.payoutApproved = "Payout approved and scheduled for payment based on your settings.";
|
|
78
78
|
this.payoutCancelled = "If you think this is a mistake, contact our Support team.";
|
|
79
|
+
this.payoutProcessing = "Processing until {date}. Payout is then scheduled based on your settings.";
|
|
79
80
|
}
|
|
80
81
|
rewardStatus(reward) {
|
|
81
82
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
@@ -88,13 +89,21 @@ export class RewardTableStatusCell {
|
|
|
88
89
|
if (fraudStatus === "PENDING")
|
|
89
90
|
return "PENDING_REVIEW";
|
|
90
91
|
const partnerTransferStatus = (_e = reward.partnerFundsTransfer) === null || _e === void 0 ? void 0 : _e.status;
|
|
91
|
-
if (
|
|
92
|
-
partnerTransferStatus === "
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
92
|
+
if (reward.partnerFundsTransfer) {
|
|
93
|
+
if (partnerTransferStatus === "REVERSED")
|
|
94
|
+
return "PAYOUT_CANCELLED";
|
|
95
|
+
if (partnerTransferStatus === "OVERDUE")
|
|
96
|
+
return "PAYOUT_FAILED";
|
|
97
|
+
if (reward.partnerFundsTransfer.dateScheduled > Date.now()) {
|
|
98
|
+
return "PROCESSING";
|
|
99
|
+
}
|
|
100
|
+
if (partnerTransferStatus === "TRANSFERRED" ||
|
|
101
|
+
partnerTransferStatus === "NOT_YET_DUE" ||
|
|
102
|
+
(reward.partnerFundsTransfer.dateScheduled < Date.now() &&
|
|
103
|
+
partnerTransferStatus !== "OVERDUE" &&
|
|
104
|
+
partnerTransferStatus !== "REVERSED"))
|
|
105
|
+
return "PAYOUT_APPROVED";
|
|
106
|
+
}
|
|
98
107
|
if (reward.dateCancelled)
|
|
99
108
|
return "CANCELLED";
|
|
100
109
|
if (hasExpired)
|
|
@@ -151,12 +160,14 @@ export class RewardTableStatusCell {
|
|
|
151
160
|
return "primary";
|
|
152
161
|
case "PENDING":
|
|
153
162
|
case "PENDING_REVIEW":
|
|
163
|
+
case "PROCESSING":
|
|
154
164
|
return "warning";
|
|
155
165
|
default:
|
|
156
166
|
return "danger";
|
|
157
167
|
}
|
|
158
168
|
}
|
|
159
169
|
getPayoutStatusText(taxStatus) {
|
|
170
|
+
var _a;
|
|
160
171
|
switch (taxStatus) {
|
|
161
172
|
case "US_TAX":
|
|
162
173
|
return this.pendingUsTax;
|
|
@@ -174,6 +185,13 @@ export class RewardTableStatusCell {
|
|
|
174
185
|
return this.pendingTaxSubmission;
|
|
175
186
|
case "PENDING_PARTNER_CREATION":
|
|
176
187
|
return this.pendingPartnerCreation;
|
|
188
|
+
case "PROCESSING":
|
|
189
|
+
return intl.formatMessage({
|
|
190
|
+
id: "payoutProcessingText",
|
|
191
|
+
defaultMessage: this.payoutProcessing,
|
|
192
|
+
}, {
|
|
193
|
+
date: (_a = DateTime.fromMillis(this.reward.partnerFundsTransfer.dateScheduled)) === null || _a === void 0 ? void 0 : _a.setLocale(luxonLocale(this.locale)).toLocaleString(DateTime.DATE_MED),
|
|
194
|
+
});
|
|
177
195
|
}
|
|
178
196
|
}
|
|
179
197
|
render() {
|
|
@@ -210,6 +228,7 @@ export class RewardTableStatusCell {
|
|
|
210
228
|
return sheet.classes.RedeemBadge;
|
|
211
229
|
case "PENDING":
|
|
212
230
|
case "PENDING_REVIEW":
|
|
231
|
+
case "PROCESSING":
|
|
213
232
|
return sheet.classes.WarningBadge;
|
|
214
233
|
default:
|
|
215
234
|
return sheet.classes.DangerBadge;
|
|
@@ -534,7 +553,7 @@ export class RewardTableStatusCell {
|
|
|
534
553
|
},
|
|
535
554
|
"attribute": "payout-approved",
|
|
536
555
|
"reflect": false,
|
|
537
|
-
"defaultValue": "\"
|
|
556
|
+
"defaultValue": "\"Payout approved and scheduled for payment based on your settings.\""
|
|
538
557
|
},
|
|
539
558
|
"payoutCancelled": {
|
|
540
559
|
"type": "string",
|
|
@@ -553,6 +572,24 @@ export class RewardTableStatusCell {
|
|
|
553
572
|
"attribute": "payout-cancelled",
|
|
554
573
|
"reflect": false,
|
|
555
574
|
"defaultValue": "\"If you think this is a mistake, contact our Support team.\""
|
|
575
|
+
},
|
|
576
|
+
"payoutProcessing": {
|
|
577
|
+
"type": "string",
|
|
578
|
+
"mutable": false,
|
|
579
|
+
"complexType": {
|
|
580
|
+
"original": "string",
|
|
581
|
+
"resolved": "string",
|
|
582
|
+
"references": {}
|
|
583
|
+
},
|
|
584
|
+
"required": false,
|
|
585
|
+
"optional": false,
|
|
586
|
+
"docs": {
|
|
587
|
+
"tags": [],
|
|
588
|
+
"text": ""
|
|
589
|
+
},
|
|
590
|
+
"attribute": "payout-processing",
|
|
591
|
+
"reflect": false,
|
|
592
|
+
"defaultValue": "\"Processing until {date}. Payout is then scheduled based on your settings.\""
|
|
556
593
|
}
|
|
557
594
|
}; }
|
|
558
595
|
}
|
package/dist/collection/components/sqm-rewards-table/columns/sqm-rewards-table-status-column.js
CHANGED
|
@@ -17,7 +17,7 @@ export class RewardTableStatusColumn {
|
|
|
17
17
|
* @uiName Reward status text
|
|
18
18
|
* @uiWidget textArea
|
|
19
19
|
*/
|
|
20
|
-
this.statusText = "{status, select, AVAILABLE {Available} CANCELLED {Cancelled} PENDING {Pending} PENDING_REVIEW {Pending} PAYOUT_APPROVED {Payout Approved} PAYOUT_CANCELLED {Payout Cancelled} PAYOUT_FAILED {Payout Failed} EXPIRED {Expired} REDEEMED {Redeemed} DENIED {Denied} other {Not available} }";
|
|
20
|
+
this.statusText = "{status, select, AVAILABLE {Available} CANCELLED {Cancelled} PENDING {Pending} PENDING_REVIEW {Pending} PAYOUT_APPROVED {Payout Approved} PROCESSING {Processing} PAYOUT_CANCELLED {Payout Cancelled} PAYOUT_FAILED {Payout Failed} EXPIRED {Expired} REDEEMED {Redeemed} DENIED {Denied} other {Not available} }";
|
|
21
21
|
/**
|
|
22
22
|
* Text shown before the date of an expiring reward.
|
|
23
23
|
*
|
|
@@ -163,7 +163,7 @@ export class RewardTableStatusColumn {
|
|
|
163
163
|
},
|
|
164
164
|
"attribute": "status-text",
|
|
165
165
|
"reflect": false,
|
|
166
|
-
"defaultValue": "\"{status, select, AVAILABLE {Available} CANCELLED {Cancelled} PENDING {Pending} PENDING_REVIEW {Pending} PAYOUT_APPROVED {Payout Approved} PAYOUT_CANCELLED {Payout Cancelled} PAYOUT_FAILED {Payout Failed} EXPIRED {Expired} REDEEMED {Redeemed} DENIED {Denied} other {Not available} }\""
|
|
166
|
+
"defaultValue": "\"{status, select, AVAILABLE {Available} CANCELLED {Cancelled} PENDING {Pending} PENDING_REVIEW {Pending} PAYOUT_APPROVED {Payout Approved} PROCESSING {Processing} PAYOUT_CANCELLED {Payout Cancelled} PAYOUT_FAILED {Payout Failed} EXPIRED {Expired} REDEEMED {Redeemed} DENIED {Denied} other {Not available} }\""
|
|
167
167
|
},
|
|
168
168
|
"expiryText": {
|
|
169
169
|
"type": "string",
|
|
@@ -66,13 +66,17 @@ import * as ReferralCode from "../sqm-referral-code/ReferralCode.stories";
|
|
|
66
66
|
import * as ReferralCodes from "../sqm-referral-codes/ReferralCodes.stories";
|
|
67
67
|
import * as ReferralIframe from "../sqm-referral-iframe/ReferralIframe.stories";
|
|
68
68
|
import * as ReferralTable from "../sqm-referral-table/ReferralTable.stories";
|
|
69
|
+
import * as TaxAndCashReferralTable from "../sqm-referral-table/TaxAndCashReferralTable.stories";
|
|
70
|
+
import * as TaxAndCashReferralTableRewardsCell from "../sqm-referral-table/TaxAndCashReferralTableRewardsCell.stories";
|
|
69
71
|
import * as ReferralTableCell from "../sqm-referral-table/ReferralTableCell.stories";
|
|
70
72
|
import * as ReferralTableRewardsCell from "../sqm-referral-table/ReferralTableRewardsCell.stories";
|
|
71
73
|
import * as UseReferralTable from "../sqm-referral-table/UseReferralTable.stories";
|
|
72
74
|
import * as RewardExchangeList from "../sqm-reward-exchange-list/RewardExchangeList.stories";
|
|
73
75
|
import * as UseRewardExchangeList from "../sqm-reward-exchange-list/UseRewardExchangeList.stories";
|
|
74
|
-
import * as RewardsTable from "../sqm-rewards-table/
|
|
76
|
+
import * as RewardsTable from "../sqm-rewards-table/TaxAndCashRewardsTable.stories";
|
|
77
|
+
import * as TaxAndCashRewardsTable from "../sqm-rewards-table/RewardsTable.stories";
|
|
75
78
|
import * as RewardsTableCell from "../sqm-rewards-table/RewardsTableCell.stories";
|
|
79
|
+
import * as TaxAndCashRewardsTableCell from "../sqm-rewards-table/TaxAndCashRewardsTableCell.stories";
|
|
76
80
|
import * as UseRewardsTable from "../sqm-rewards-table/UseRewardsTable.stories";
|
|
77
81
|
import * as Router from "../sqm-router/Router.stories";
|
|
78
82
|
import * as Scroll from "../sqm-scroll/Scroll.stories";
|
|
@@ -208,6 +212,10 @@ const stories = [
|
|
|
208
212
|
LeadInputField,
|
|
209
213
|
LeadFormDropdownField,
|
|
210
214
|
LeadCheckboxField,
|
|
215
|
+
TaxAndCashRewardsTableCell,
|
|
216
|
+
TaxAndCashRewardsTable,
|
|
217
|
+
TaxAndCashReferralTableRewardsCell,
|
|
218
|
+
TaxAndCashReferralTable,
|
|
211
219
|
];
|
|
212
220
|
/**
|
|
213
221
|
* For internal documentation
|