@flarehr/apollo-super-selection 1.2.32739 → 1.3.36
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/lib/apollo-super-selection/apollo-super-selection.css +1 -1
- package/dist/lib/apollo-super-selection/apollo-super-selection.esm.js +1 -1
- package/dist/lib/apollo-super-selection/p-065c0e01.system.entry.js +69 -0
- package/dist/lib/apollo-super-selection/p-42cd55d4.entry.js +14 -0
- package/dist/lib/apollo-super-selection/p-bdcfc026.system.js +1 -1
- package/dist/lib/cjs/apollo-super-selection.cjs.js +1 -1
- package/dist/lib/cjs/loader.cjs.js +1 -1
- package/dist/lib/cjs/{sss-button_30.cjs.entry.js → sss-button_34.cjs.entry.js} +6510 -5652
- package/dist/lib/collection/apollo-super-selection.css +1 -1
- package/dist/lib/collection/collection-manifest.json +25 -17
- package/dist/lib/collection/components/app-host/services/appinsights.service.js +3 -0
- package/dist/lib/collection/components/app-host/super-selection-app-host.css +6 -6
- package/dist/lib/collection/components/super-campaign/fund-tile-clicked.handler.js +49 -0
- package/dist/lib/collection/components/super-campaign/promoted-fund-joined.handler.js +121 -0
- package/dist/lib/collection/components/super-campaign/super-campaign-types.js +6 -0
- package/dist/lib/collection/components/super-campaign/super-campaign.js +213 -0
- package/dist/lib/collection/components/super-selection-app/api/super-campaign-errors-api.js +9 -0
- package/dist/lib/collection/components/super-selection-app/api/super-campaign-errors.api.dtos.js +1 -0
- package/dist/lib/collection/components/super-selection-app/api/super-selection-events.model.js +16 -1
- package/dist/lib/collection/components/super-selection-app/api/super-selection.api.dto.js +71 -22
- package/dist/lib/collection/components/super-selection-app/api/super-selection.api.js +5 -9
- package/dist/lib/collection/components/super-selection-app/app-state-pages/success.js +11 -1
- package/dist/lib/collection/components/super-selection-app/choice/choice-router.js +42 -0
- package/dist/lib/collection/components/super-selection-app/existing-choice/existing-choice.js +26 -15
- package/dist/lib/collection/components/super-selection-app/footer-section/footer-section.js +15 -15
- package/dist/lib/collection/components/super-selection-app/funds/custom-fund/api/custom-fund-choice.api.js +9 -0
- package/dist/lib/collection/components/super-selection-app/funds/custom-fund/custom-fund.js +30 -7
- package/dist/lib/collection/components/super-selection-app/funds/custom-fund/custom-fund.store.js +6 -23
- package/dist/lib/collection/components/super-selection-app/funds/custom-fund/default-fund/default-fund.js +8 -3
- package/dist/lib/collection/components/super-selection-app/funds/custom-fund/featured-funds/super-campaign-featured-funds.js +113 -0
- package/dist/lib/collection/components/super-selection-app/funds/custom-fund/featured-funds/super-campaign-featured-funds.types.js +1 -0
- package/dist/lib/collection/components/super-selection-app/funds/custom-fund/member-name-input.js +19 -5
- package/dist/lib/collection/components/super-selection-app/funds/custom-fund/my-own-fund/my-own-fund-engagement-step-types.js +1 -0
- package/dist/lib/collection/components/super-selection-app/funds/custom-fund/my-own-fund/my-own-fund-engagement-step.js +115 -0
- package/dist/lib/collection/components/super-selection-app/funds/custom-fund/my-own-fund/my-own-fund-inputs.js +4 -4
- package/dist/lib/collection/components/super-selection-app/funds/custom-fund/my-own-fund/my-own-fund.js +16 -4
- package/dist/lib/collection/components/super-selection-app/funds/custom-fund/self-managed-fund/self-managed-fund-inputs.js +32 -17
- package/dist/lib/collection/components/super-selection-app/funds/custom-fund/self-managed-fund/self-managed-fund.js +8 -3
- package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/api/promoted-fund-choice.api.js +9 -0
- package/dist/lib/collection/components/super-selection-app/funds/slate-super/api/slate.js +4 -0
- package/dist/lib/collection/components/super-selection-app/header-section/header-section.js +8 -38
- package/dist/lib/collection/components/super-selection-app/misc/button.js +20 -2
- package/dist/lib/collection/components/super-selection-app/misc/dropdown-async.js +18 -1
- package/dist/lib/collection/components/super-selection-app/prefill-fund/prefill-common.js +22 -0
- package/dist/lib/collection/components/super-selection-app/prefill-fund/prefill-display-field.js +42 -0
- package/dist/lib/collection/components/super-selection-app/prefill-fund/prefill-error-box.js +66 -0
- package/dist/lib/collection/components/super-selection-app/prefill-fund/prefill-invalid-my-own-fund.js +121 -0
- package/dist/lib/collection/components/super-selection-app/prefill-fund/prefill-invalid-smsf.js +145 -0
- package/dist/lib/collection/components/super-selection-app/prefill-fund/prefill-my-own-fund.js +223 -0
- package/dist/lib/collection/components/super-selection-app/prefill-fund/prefill-smsf.js +398 -0
- package/dist/lib/collection/components/super-selection-app/prefill-fund/prefill-types.js +288 -0
- package/dist/lib/collection/components/super-selection-app/prefill-fund/prefill-warning-box.js +37 -0
- package/dist/lib/collection/components/super-selection-app/prefill-fund/prefill.js +81 -0
- package/dist/lib/collection/components/super-selection-app/services/event-tracking.service.js +30 -25
- package/dist/lib/collection/components/super-selection-app/services/existing-super-choice-info.service.js +29 -7
- package/dist/lib/collection/components/super-selection-app/services/navigation.service.js +1 -0
- package/dist/lib/collection/components/super-selection-app/services/super-selection-app.routes.js +17 -9
- package/dist/lib/collection/components/super-selection-app/services/super-selection-app.service.js +69 -20
- package/dist/lib/collection/components/super-selection-app/services/super-selection.store.js +31 -3
- package/dist/lib/collection/components/super-selection-app/standard-choice/standard-choice-form.js +75 -12
- package/dist/lib/collection/components/super-selection-app/standard-choice/standard-choice-form.store.js +1 -0
- package/dist/lib/collection/components/super-selection-app/super-selection-app.js +14 -20
- package/dist/lib/esm/apollo-super-selection.js +1 -1
- package/dist/lib/esm/loader.js +1 -1
- package/dist/lib/esm/{sss-button_30.entry.js → sss-button_34.entry.js} +7864 -7030
- package/dist/lib/esm-es5/apollo-super-selection.js +1 -1
- package/dist/lib/esm-es5/loader.js +1 -1
- package/dist/lib/esm-es5/sss-button_34.entry.js +69 -0
- package/dist/lib/types/components/app-host/services/appinsights.service.d.ts +1 -0
- package/dist/lib/types/components/super-campaign/fund-tile-clicked.handler.d.ts +12 -0
- package/dist/lib/types/components/super-campaign/promoted-fund-joined.handler.d.ts +15 -0
- package/dist/lib/types/components/super-campaign/super-campaign-types.d.ts +98 -0
- package/dist/lib/types/components/super-campaign/super-campaign.d.ts +28 -0
- package/dist/lib/types/components/super-selection-app/api/super-campaign-errors-api.d.ts +6 -0
- package/dist/lib/types/components/super-selection-app/api/super-campaign-errors.api.dtos.d.ts +7 -0
- package/dist/lib/types/components/super-selection-app/api/super-selection-events.model.d.ts +83 -32
- package/dist/lib/types/components/super-selection-app/api/super-selection.api.d.ts +2 -2
- package/dist/lib/types/components/super-selection-app/api/super-selection.api.dto.d.ts +88 -8
- package/dist/lib/types/components/super-selection-app/app-state-pages/success.d.ts +3 -0
- package/dist/lib/types/components/super-selection-app/{funds/promoted-fund/promoted-fund-join-v1-page.d.ts → choice/choice-router.d.ts} +2 -1
- package/dist/lib/types/components/super-selection-app/footer-section/footer-section.d.ts +1 -2
- package/dist/lib/types/components/super-selection-app/funds/custom-fund/api/custom-fund-choice.api.d.ts +2 -1
- package/dist/lib/types/components/super-selection-app/funds/custom-fund/api/custom-fund-choice.api.dto.d.ts +16 -12
- package/dist/lib/types/components/super-selection-app/funds/custom-fund/custom-fund.store.d.ts +6 -9
- package/dist/lib/types/components/super-selection-app/funds/custom-fund/featured-funds/super-campaign-featured-funds.d.ts +18 -0
- package/dist/lib/types/components/super-selection-app/funds/custom-fund/featured-funds/super-campaign-featured-funds.types.d.ts +26 -0
- package/dist/lib/types/components/super-selection-app/funds/custom-fund/member-name-input.d.ts +1 -0
- package/dist/lib/types/components/super-selection-app/funds/custom-fund/my-own-fund/my-own-fund-engagement-step-types.d.ts +15 -0
- package/dist/lib/types/components/super-selection-app/funds/custom-fund/my-own-fund/my-own-fund-engagement-step.d.ts +20 -0
- package/dist/lib/types/components/super-selection-app/funds/custom-fund/self-managed-fund/self-managed-fund-inputs.d.ts +1 -2
- package/dist/lib/types/components/super-selection-app/funds/promoted-fund/api/promoted-fund-choice.api.d.ts +2 -1
- package/dist/lib/types/components/super-selection-app/funds/promoted-fund/api/promoted-fund-choice.api.dto.d.ts +16 -15
- package/dist/lib/types/components/super-selection-app/funds/slate-super/api/slate-choice.api.dto.d.ts +3 -5
- package/dist/lib/types/components/super-selection-app/funds/slate-super/api/slate.d.ts +4 -0
- package/dist/lib/types/components/super-selection-app/header-section/header-section.d.ts +0 -1
- package/dist/lib/types/components/super-selection-app/misc/button.d.ts +2 -1
- package/dist/lib/types/components/super-selection-app/misc/dropdown-async.d.ts +1 -0
- package/dist/lib/types/components/super-selection-app/prefill-fund/prefill-common.d.ts +9 -0
- package/dist/lib/types/components/super-selection-app/prefill-fund/prefill-display-field.d.ts +5 -0
- package/dist/lib/types/components/super-selection-app/prefill-fund/prefill-error-box.d.ts +5 -0
- package/dist/lib/types/components/super-selection-app/prefill-fund/prefill-invalid-my-own-fund.d.ts +18 -0
- package/dist/lib/types/components/super-selection-app/prefill-fund/prefill-invalid-smsf.d.ts +28 -0
- package/dist/lib/types/components/super-selection-app/prefill-fund/prefill-my-own-fund.d.ts +30 -0
- package/dist/lib/types/components/super-selection-app/prefill-fund/prefill-smsf.d.ts +52 -0
- package/dist/lib/types/components/super-selection-app/prefill-fund/prefill-types.d.ts +95 -0
- package/dist/lib/types/components/super-selection-app/prefill-fund/prefill-warning-box.d.ts +4 -0
- package/dist/lib/types/components/super-selection-app/prefill-fund/prefill.d.ts +14 -0
- package/dist/lib/types/components/super-selection-app/services/event-tracking.service.d.ts +6 -5
- package/dist/lib/types/components/super-selection-app/services/existing-super-choice-info.service.d.ts +17 -1
- package/dist/lib/types/components/super-selection-app/services/navigation.service.d.ts +2 -0
- package/dist/lib/types/components/super-selection-app/services/super-selection-app.routes.d.ts +8 -4
- package/dist/lib/types/components/super-selection-app/services/super-selection-app.service.d.ts +18 -9
- package/dist/lib/types/components/super-selection-app/services/super-selection.store.d.ts +22 -4
- package/dist/lib/types/components/super-selection-app/standard-choice/standard-choice-form.d.ts +5 -0
- package/dist/lib/types/components/super-selection-app/standard-choice/standard-choice-form.store.d.ts +34 -0
- package/dist/lib/types/components/super-selection-app/super-selection-app.d.ts +0 -2
- package/dist/lib/types/components.d.ts +172 -115
- package/package.json +3 -3
- package/dist/lib/apollo-super-selection/assets/icon-check.svg +0 -3
- package/dist/lib/apollo-super-selection/assets/logo-active.svg +0 -1
- package/dist/lib/apollo-super-selection/assets/logo-art.svg +0 -7
- package/dist/lib/apollo-super-selection/assets/logo-aus-eth.svg +0 -31
- package/dist/lib/apollo-super-selection/assets/logo-aware.svg +0 -1
- package/dist/lib/apollo-super-selection/assets/logo-first.svg +0 -15
- package/dist/lib/apollo-super-selection/assets/logo-hesta.svg +0 -5
- package/dist/lib/apollo-super-selection/assets/logo-mercer-mychoice.svg +0 -1
- package/dist/lib/apollo-super-selection/assets/logo-slate.png +0 -0
- package/dist/lib/apollo-super-selection/assets/logo-spirit.svg +0 -141
- package/dist/lib/apollo-super-selection/assets/logo-virgin.svg +0 -8
- package/dist/lib/apollo-super-selection/p-74878c94.entry.js +0 -14
- package/dist/lib/apollo-super-selection/p-823c6c2c.system.entry.js +0 -69
- package/dist/lib/collection/components/super-selection-app/assets/icon-check.svg +0 -3
- package/dist/lib/collection/components/super-selection-app/consent/consent.js +0 -54
- package/dist/lib/collection/components/super-selection-app/funds/constants.js +0 -33
- package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/funds/active.js +0 -26
- package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/funds/australian-ethical.js +0 -43
- package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/funds/australian-retirement-trust.js +0 -32
- package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/funds/aware.js +0 -27
- package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/funds/first.js +0 -27
- package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/funds/hesta-default.js +0 -41
- package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/funds/mercermychoice.js +0 -32
- package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/funds/slate.js +0 -32
- package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/funds/spirit.js +0 -43
- package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/funds/virgin.js +0 -36
- package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/promoted-fund-join-v1-page.js +0 -30
- package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/promoted-fund-join-v2-page.js +0 -30
- package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/promoted-fund.store.js +0 -8
- package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/services/promoted-fund-join-v1-iframe-builder.js +0 -115
- package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/services/promoted-fund-join-v2-iframe-builder.js +0 -131
- package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/types.js +0 -14
- package/dist/lib/collection/components/super-selection-app/funds/slate-super/services/slate-iframe-builder.js +0 -136
- package/dist/lib/collection/components/super-selection-app/funds/slate-super/slate-join-page.js +0 -30
- package/dist/lib/collection/components/super-selection-app/misc/iframe-host.js +0 -32
- package/dist/lib/collection/components/super-selection-app/super-choice-page/assets/logo-active.svg +0 -1
- package/dist/lib/collection/components/super-selection-app/super-choice-page/assets/logo-art.svg +0 -7
- package/dist/lib/collection/components/super-selection-app/super-choice-page/assets/logo-aus-eth.svg +0 -31
- package/dist/lib/collection/components/super-selection-app/super-choice-page/assets/logo-aware.svg +0 -1
- package/dist/lib/collection/components/super-selection-app/super-choice-page/assets/logo-first.svg +0 -15
- package/dist/lib/collection/components/super-selection-app/super-choice-page/assets/logo-hesta.svg +0 -5
- package/dist/lib/collection/components/super-selection-app/super-choice-page/assets/logo-mercer-mychoice.svg +0 -1
- package/dist/lib/collection/components/super-selection-app/super-choice-page/assets/logo-slate.png +0 -0
- package/dist/lib/collection/components/super-selection-app/super-choice-page/assets/logo-spirit.svg +0 -141
- package/dist/lib/collection/components/super-selection-app/super-choice-page/assets/logo-virgin.svg +0 -8
- package/dist/lib/collection/components/super-selection-app/super-choice-page/super-choice-item/super-choice-item-bottom.js +0 -112
- package/dist/lib/collection/components/super-selection-app/super-choice-page/super-choice-item/super-choice-item-top.js +0 -136
- package/dist/lib/collection/components/super-selection-app/super-choice-page/super-choice-page.js +0 -181
- package/dist/lib/esm-es5/sss-button_30.entry.js +0 -69
- package/dist/lib/types/components/super-selection-app/consent/consent.d.ts +0 -8
- package/dist/lib/types/components/super-selection-app/funds/constants.d.ts +0 -8
- package/dist/lib/types/components/super-selection-app/funds/promoted-fund/funds/active.d.ts +0 -3
- package/dist/lib/types/components/super-selection-app/funds/promoted-fund/funds/australian-ethical.d.ts +0 -3
- package/dist/lib/types/components/super-selection-app/funds/promoted-fund/funds/australian-retirement-trust.d.ts +0 -3
- package/dist/lib/types/components/super-selection-app/funds/promoted-fund/funds/aware.d.ts +0 -3
- package/dist/lib/types/components/super-selection-app/funds/promoted-fund/funds/first.d.ts +0 -3
- package/dist/lib/types/components/super-selection-app/funds/promoted-fund/funds/hesta-default.d.ts +0 -3
- package/dist/lib/types/components/super-selection-app/funds/promoted-fund/funds/mercermychoice.d.ts +0 -3
- package/dist/lib/types/components/super-selection-app/funds/promoted-fund/funds/slate.d.ts +0 -4
- package/dist/lib/types/components/super-selection-app/funds/promoted-fund/funds/spirit.d.ts +0 -3
- package/dist/lib/types/components/super-selection-app/funds/promoted-fund/funds/virgin.d.ts +0 -3
- package/dist/lib/types/components/super-selection-app/funds/promoted-fund/promoted-fund-join-v2-page.d.ts +0 -5
- package/dist/lib/types/components/super-selection-app/funds/promoted-fund/promoted-fund.store.d.ts +0 -8
- package/dist/lib/types/components/super-selection-app/funds/promoted-fund/services/promoted-fund-join-v1-iframe-builder.d.ts +0 -10
- package/dist/lib/types/components/super-selection-app/funds/promoted-fund/services/promoted-fund-join-v2-iframe-builder.d.ts +0 -9
- package/dist/lib/types/components/super-selection-app/funds/promoted-fund/types.d.ts +0 -24
- package/dist/lib/types/components/super-selection-app/funds/slate-super/services/slate-iframe-builder.d.ts +0 -14
- package/dist/lib/types/components/super-selection-app/funds/slate-super/slate-join-page.d.ts +0 -5
- package/dist/lib/types/components/super-selection-app/misc/iframe-host.d.ts +0 -6
- package/dist/lib/types/components/super-selection-app/super-choice-page/super-choice-item/super-choice-item-bottom.d.ts +0 -10
- package/dist/lib/types/components/super-selection-app/super-choice-page/super-choice-item/super-choice-item-top.d.ts +0 -10
- package/dist/lib/types/components/super-selection-app/super-choice-page/super-choice-page.d.ts +0 -11
- package/readme.md +0 -41
package/dist/lib/collection/components/super-selection-app/api/super-selection-events.model.js
CHANGED
|
@@ -1 +1,16 @@
|
|
|
1
|
-
|
|
1
|
+
import { isSome } from 'fp-ts/lib/Option';
|
|
2
|
+
import superSelectionService from '../services/super-selection-app.service';
|
|
3
|
+
export const SuperFundDisclaimerViewedDetail = {
|
|
4
|
+
create: (superCampaignEnabled) => {
|
|
5
|
+
let isDefinedBenefitsEligibleString = 'Not set';
|
|
6
|
+
if (isSome(superSelectionService.isDefinedBenefitsEligible)) {
|
|
7
|
+
isDefinedBenefitsEligibleString = superSelectionService.isDefinedBenefitsEligible.value
|
|
8
|
+
? 'True'
|
|
9
|
+
: 'False';
|
|
10
|
+
}
|
|
11
|
+
return {
|
|
12
|
+
isDefinedBenefitsEligible: isDefinedBenefitsEligibleString,
|
|
13
|
+
superCampaignEnabled: superCampaignEnabled
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { none, some } from 'fp-ts/Option';
|
|
2
2
|
import { assertExhaustive } from '../../../utils';
|
|
3
|
+
import { slate } from '../funds/slate-super/api/slate';
|
|
3
4
|
export function hydratePromotedFundChoiceDtoKind(dto) {
|
|
4
5
|
if ('slate' in dto) {
|
|
5
6
|
dto.kind = 'slate';
|
|
@@ -28,36 +29,68 @@ export function hydratePromotedFundChoiceDtoKind(dto) {
|
|
|
28
29
|
else if ('mercerMyChoice' in dto) {
|
|
29
30
|
dto.kind = 'mercerMyChoice';
|
|
30
31
|
}
|
|
32
|
+
else if ('generic' in dto) {
|
|
33
|
+
dto.kind = 'generic';
|
|
34
|
+
}
|
|
31
35
|
}
|
|
32
36
|
function getPromotedFundUsi(dto) {
|
|
33
37
|
switch (dto.kind) {
|
|
34
38
|
case 'slate':
|
|
35
|
-
return
|
|
39
|
+
return slate.usi;
|
|
36
40
|
case 'australianRetirementTrust':
|
|
37
|
-
return
|
|
41
|
+
return dto.australianRetirementTrust.usi;
|
|
38
42
|
case 'aware':
|
|
39
|
-
return
|
|
43
|
+
return dto.aware.usi;
|
|
40
44
|
case 'active':
|
|
41
|
-
return
|
|
45
|
+
return dto.active.usi;
|
|
42
46
|
case 'australianEthical':
|
|
43
|
-
return
|
|
47
|
+
return dto.australianEthical.usi;
|
|
44
48
|
case 'virgin':
|
|
45
|
-
return
|
|
49
|
+
return dto.virgin.usi;
|
|
46
50
|
case 'spirit':
|
|
47
|
-
return
|
|
51
|
+
return dto.spirit.usi;
|
|
48
52
|
case 'firstSuper':
|
|
49
|
-
return
|
|
53
|
+
return dto.firstSuper.usi;
|
|
50
54
|
case 'mercerMyChoice':
|
|
51
|
-
return
|
|
55
|
+
return dto.mercerMyChoice.usi;
|
|
56
|
+
case 'generic':
|
|
57
|
+
return dto.generic.usi;
|
|
52
58
|
default:
|
|
53
59
|
assertExhaustive(dto);
|
|
54
|
-
return
|
|
60
|
+
return '';
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
export function getPromotedFundId(dto) {
|
|
64
|
+
switch (dto.kind) {
|
|
65
|
+
case 'slate':
|
|
66
|
+
return slate.fundId;
|
|
67
|
+
case 'australianRetirementTrust':
|
|
68
|
+
return 'australian-retirement-trust';
|
|
69
|
+
case 'aware':
|
|
70
|
+
return 'aware';
|
|
71
|
+
case 'active':
|
|
72
|
+
return 'active';
|
|
73
|
+
case 'australianEthical':
|
|
74
|
+
return 'australian-ethical';
|
|
75
|
+
case 'virgin':
|
|
76
|
+
return 'virgin';
|
|
77
|
+
case 'spirit':
|
|
78
|
+
return 'spirit';
|
|
79
|
+
case 'firstSuper':
|
|
80
|
+
return 'first-super';
|
|
81
|
+
case 'mercerMyChoice':
|
|
82
|
+
return 'mercermychoice';
|
|
83
|
+
case 'generic':
|
|
84
|
+
return dto.generic.fundId;
|
|
85
|
+
default:
|
|
86
|
+
assertExhaustive(dto);
|
|
87
|
+
return '';
|
|
55
88
|
}
|
|
56
89
|
}
|
|
57
90
|
export function getSuperChoiceUsi(dto) {
|
|
58
91
|
switch (dto.kind) {
|
|
59
92
|
case 'Promoted':
|
|
60
|
-
return getPromotedFundUsi(dto.promoted);
|
|
93
|
+
return some(getPromotedFundUsi(dto.promoted));
|
|
61
94
|
case 'MyOwnFund':
|
|
62
95
|
return some(dto.myOwnFund.usi);
|
|
63
96
|
case 'SMSF':
|
|
@@ -66,6 +99,10 @@ export function getSuperChoiceUsi(dto) {
|
|
|
66
99
|
return some(dto.default.usi);
|
|
67
100
|
case 'PromotedDefault':
|
|
68
101
|
return some(dto.promotedDefault.usi);
|
|
102
|
+
case 'DefinedBenefits':
|
|
103
|
+
return some(dto.definedBenefits.usi);
|
|
104
|
+
case 'PromotedDefaultWithJoin':
|
|
105
|
+
return some(dto.promotedDefaultWithJoin.usi);
|
|
69
106
|
default:
|
|
70
107
|
assertExhaustive(dto);
|
|
71
108
|
return none;
|
|
@@ -74,34 +111,40 @@ export function getSuperChoiceUsi(dto) {
|
|
|
74
111
|
function getPromotedFundMemberNumber(dto) {
|
|
75
112
|
switch (dto.kind) {
|
|
76
113
|
case 'slate':
|
|
77
|
-
return
|
|
114
|
+
return dto.slate.memberNumber;
|
|
78
115
|
case 'australianRetirementTrust':
|
|
79
|
-
return
|
|
116
|
+
return dto.australianRetirementTrust.memberNumber;
|
|
80
117
|
case 'aware':
|
|
81
|
-
return
|
|
118
|
+
return dto.aware.memberNumber;
|
|
82
119
|
case 'active':
|
|
83
|
-
return
|
|
120
|
+
return dto.active.memberNumber;
|
|
84
121
|
case 'australianEthical':
|
|
85
|
-
return
|
|
122
|
+
return dto.australianEthical.memberNumber;
|
|
86
123
|
case 'virgin':
|
|
87
|
-
return
|
|
124
|
+
return dto.virgin.memberNumber;
|
|
88
125
|
case 'spirit':
|
|
89
|
-
return
|
|
126
|
+
return dto.spirit.memberNumber;
|
|
90
127
|
case 'firstSuper':
|
|
91
|
-
return
|
|
128
|
+
return dto.firstSuper.memberNumber;
|
|
92
129
|
case 'mercerMyChoice':
|
|
93
|
-
return
|
|
130
|
+
return dto.mercerMyChoice.memberNumber;
|
|
131
|
+
case 'generic':
|
|
132
|
+
return dto.generic.memberNumber;
|
|
94
133
|
default:
|
|
95
134
|
assertExhaustive(dto);
|
|
96
|
-
return
|
|
135
|
+
return '';
|
|
97
136
|
}
|
|
98
137
|
}
|
|
99
138
|
export function getSuperChoiceMemberNumber(dto) {
|
|
100
139
|
switch (dto.kind) {
|
|
101
140
|
case 'Promoted':
|
|
102
|
-
return getPromotedFundMemberNumber(dto.promoted);
|
|
141
|
+
return some(getPromotedFundMemberNumber(dto.promoted));
|
|
103
142
|
case 'MyOwnFund':
|
|
104
143
|
return some(dto.myOwnFund.memberNumber);
|
|
144
|
+
case 'DefinedBenefits':
|
|
145
|
+
return some(dto.definedBenefits.memberNumber);
|
|
146
|
+
case 'PromotedDefaultWithJoin':
|
|
147
|
+
return some(dto.promotedDefaultWithJoin.memberNumber);
|
|
105
148
|
case 'SMSF':
|
|
106
149
|
case 'Default':
|
|
107
150
|
case 'PromotedDefault':
|
|
@@ -127,4 +170,10 @@ export function hydrateSuperChoiceDetailsDtoKind(dto) {
|
|
|
127
170
|
else if ('promotedDefault' in dto) {
|
|
128
171
|
dto.kind = 'PromotedDefault';
|
|
129
172
|
}
|
|
173
|
+
else if ('definedBenefits' in dto) {
|
|
174
|
+
dto.kind = 'DefinedBenefits';
|
|
175
|
+
}
|
|
176
|
+
else if ('promotedDefaultWithJoin' in dto) {
|
|
177
|
+
dto.kind = 'PromotedDefaultWithJoin';
|
|
178
|
+
}
|
|
130
179
|
}
|
|
@@ -40,6 +40,8 @@ export class SuperSelectionApi {
|
|
|
40
40
|
case 'MyOwnFund':
|
|
41
41
|
case 'PromotedDefault':
|
|
42
42
|
case 'SMSF':
|
|
43
|
+
case 'DefinedBenefits':
|
|
44
|
+
case 'PromotedDefaultWithJoin':
|
|
43
45
|
break;
|
|
44
46
|
default:
|
|
45
47
|
assertExhaustive(response.superBuyer.superChoice.choiceDetails);
|
|
@@ -47,18 +49,12 @@ export class SuperSelectionApi {
|
|
|
47
49
|
}
|
|
48
50
|
return response;
|
|
49
51
|
}
|
|
50
|
-
async getCampaignConnectAsync() {
|
|
51
|
-
return buildBackendApiClient()
|
|
52
|
-
.url('campaign-connect')
|
|
53
|
-
.get()
|
|
54
|
-
.notFound(() => {
|
|
55
|
-
throw new Error('Failed to fetch campaign connect.');
|
|
56
|
-
})
|
|
57
|
-
.json();
|
|
58
|
-
}
|
|
59
52
|
async clickPromotedTileAsync(payload) {
|
|
60
53
|
return buildBackendApiClient().url('click-promoted-tile').post(payload).res();
|
|
61
54
|
}
|
|
55
|
+
async viewSuperFundPanelAsync(payload) {
|
|
56
|
+
return buildBackendApiClient().url('view-super-fund-panel').post(payload).res();
|
|
57
|
+
}
|
|
62
58
|
toSearchFilterQueryString(searchFilter) {
|
|
63
59
|
return (`search=${searchFilter.searchString}` +
|
|
64
60
|
(searchFilter.maxRecordCount > 0 ? '&maxRecordCount=' + searchFilter.maxRecordCount : ''));
|
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
import { Component, h, Host } from '@stencil/core';
|
|
2
2
|
import superSelectionAppService from '../services/super-selection-app.service';
|
|
3
3
|
export class Success {
|
|
4
|
+
constructor() {
|
|
5
|
+
this.ignorePopState = () => window.history.pushState(null, '', null);
|
|
6
|
+
}
|
|
7
|
+
connectedCallback() {
|
|
8
|
+
this.ignorePopState();
|
|
9
|
+
window.addEventListener('popstate', this.ignorePopState);
|
|
10
|
+
}
|
|
11
|
+
disconnectedCallback() {
|
|
12
|
+
window.removeEventListener('popstate', this.ignorePopState);
|
|
13
|
+
}
|
|
4
14
|
render() {
|
|
5
15
|
const CheckIcon = () => {
|
|
6
16
|
return (h("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 448 512", class: "fill-primary-base" },
|
|
@@ -16,7 +26,7 @@ export class Success {
|
|
|
16
26
|
h("p", { class: "mt-4 text-center text-gray-600 leading-7 max-w-560 mx-auto" }, "Your superannuation details have been updated successfully and will be submitted to your employer."),
|
|
17
27
|
h("div", { class: "flex justify-center mt-8" },
|
|
18
28
|
h("div", { class: "max-w-[200px] w-full" },
|
|
19
|
-
h("sss-button", { size: "xl", fillWidth: true, onClick: this.handleContinueButtonClick },
|
|
29
|
+
h("sss-button", { testid: "continue-button", size: "xl", fillWidth: true, onClick: this.handleContinueButtonClick },
|
|
20
30
|
h("span", null, "Continue"))))));
|
|
21
31
|
}
|
|
22
32
|
handleContinueButtonClick(_event) {
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { Component, Fragment, h, Prop } from '@stencil/core';
|
|
2
|
+
import { injectHistory } from '@stencil/router';
|
|
3
|
+
import navigationService from '../services/navigation.service';
|
|
4
|
+
import { SuperSelectionAppRoutes } from '../services/super-selection-app.routes';
|
|
5
|
+
import superSelectionService from '../services/super-selection-app.service';
|
|
6
|
+
export class ChoiceRouter {
|
|
7
|
+
async componentWillLoad() {
|
|
8
|
+
if (superSelectionService.superCampaignCanNotBeActivated) {
|
|
9
|
+
navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.MyOwnFund);
|
|
10
|
+
}
|
|
11
|
+
else {
|
|
12
|
+
navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.SuperCampaign);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
render() {
|
|
16
|
+
return h(Fragment, null);
|
|
17
|
+
}
|
|
18
|
+
static get is() { return "sss-choice-router"; }
|
|
19
|
+
static get properties() { return {
|
|
20
|
+
"history": {
|
|
21
|
+
"type": "unknown",
|
|
22
|
+
"mutable": false,
|
|
23
|
+
"complexType": {
|
|
24
|
+
"original": "RouterHistory",
|
|
25
|
+
"resolved": "RouterHistory",
|
|
26
|
+
"references": {
|
|
27
|
+
"RouterHistory": {
|
|
28
|
+
"location": "import",
|
|
29
|
+
"path": "@stencil/router"
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
"required": false,
|
|
34
|
+
"optional": false,
|
|
35
|
+
"docs": {
|
|
36
|
+
"tags": [],
|
|
37
|
+
"text": ""
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}; }
|
|
41
|
+
}
|
|
42
|
+
injectHistory(ChoiceRouter);
|
package/dist/lib/collection/components/super-selection-app/existing-choice/existing-choice.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { Component, h, Prop, State } from '@stencil/core';
|
|
2
2
|
import { isSome } from 'fp-ts/Option';
|
|
3
3
|
import { assertExhaustive } from '../../../utils';
|
|
4
|
-
import { getFundNameByFundId, getLogoSrcByFundId } from '../funds/constants';
|
|
5
4
|
import { EventTrackingService } from '../services/event-tracking.service';
|
|
6
5
|
import existingFundService from '../services/existing-super-choice-info.service';
|
|
7
6
|
import navigationService from '../services/navigation.service';
|
|
@@ -40,15 +39,12 @@ export class ExistingChoice {
|
|
|
40
39
|
this.existingFund = chosenFundOption.value;
|
|
41
40
|
}
|
|
42
41
|
else {
|
|
43
|
-
navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.
|
|
42
|
+
navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.ChoicePage);
|
|
44
43
|
}
|
|
45
44
|
}
|
|
46
45
|
render() {
|
|
47
|
-
const PromotedFundView = (
|
|
48
|
-
|
|
49
|
-
const fundName = getFundNameByFundId(props.id);
|
|
50
|
-
return (h("div", { class: "flex justify-center" },
|
|
51
|
-
h("img", { class: "h-16 object-contain w-full max-w-140", alt: isSome(fundName) ? fundName.value : undefined, src: isSome(logo) ? logo.value : undefined })));
|
|
46
|
+
const PromotedFundView = (_props) => {
|
|
47
|
+
return (h("div", { class: "flex justify-center" }));
|
|
52
48
|
};
|
|
53
49
|
const MyOwnFundView = () => {
|
|
54
50
|
return (h("div", { class: "flex h-20 justify-center items-center relative" },
|
|
@@ -71,9 +67,20 @@ export class ExistingChoice {
|
|
|
71
67
|
h("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 512 512", class: "fill-primary-base" },
|
|
72
68
|
h("path", { d: "M448 96h-64V48C384 21.53 362.5 0 336 0h-160C149.5 0 128 21.53 128 48V96H64C28.65 96 0 124.7 0 160v256c0 35.35 28.65 64 64 64h384c35.35 0 64-28.65 64-64V160C512 124.7 483.3 96 448 96zM160 48C160 39.17 167.2 32 176 32h160C344.8 32 352 39.17 352 48V96H160V48zM480 416c0 17.64-14.36 32-32 32H64c-17.64 0-32-14.36-32-32V288h144v64c0 8.844 7.156 16 16 16h128c8.844 0 16-7.156 16-16V288H480V416zM208 336V288h96v48H208zM480 256H32V160c0-17.64 14.36-32 32-32h384c17.64 0 32 14.36 32 32V256z" })))));
|
|
73
69
|
};
|
|
70
|
+
const DefinedBenefitsFundView = () => {
|
|
71
|
+
return (h("div", { class: "flex h-20 justify-center items-center relative" },
|
|
72
|
+
h("div", { class: "h-20 w-20 rounded-full bg-primary-base opacity-10" }),
|
|
73
|
+
h("div", { class: "h-10 w-10 absolute" },
|
|
74
|
+
h("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 576 512", class: "fill-primary-base" },
|
|
75
|
+
h("path", { d: "M174.7 111.8C165.1 110.3 160.1 102.1 161.5 93.35C170.4 40.37 216.5 0 272 0C320.8 0 362.3 31.19 377.6 74.67C380.6 82.1 376.2 92.14 367.9 95.09C359.5 98.03 350.4 93.66 347.5 85.33C336.5 54.24 306.8 32 272 32C232.4 32 199.5 60.82 193.1 98.65C191.6 107.4 183.4 113.2 174.7 111.8V111.8zM400 264C400 250.7 410.7 240 424 240C437.3 240 448 250.7 448 264C448 277.3 437.3 288 424 288C410.7 288 400 277.3 400 264zM488.5 125.8L480 159.1C501.1 176.5 519.6 198.5 530.7 224H544C561.7 224 576 238.3 576 256V352C576 369.7 561.7 384 544 384H512C495.5 405.1 473.5 423.6 448 434.7V464C448 490.5 426.5 512 400 512H368C341.5 512 320 490.5 320 464V448H256V464C256 490.5 234.5 512 208 512H176C149.5 512 128 490.5 128 464V416C89.14 386.8 64 340.3 64 288C28.52 287.2 0 258.2 0 222.6C0 197.8 14 175.1 36.18 164L40.84 161.7C48.75 157.7 58.36 160.9 62.31 168.8C66.26 176.7 63.06 186.4 55.16 190.3L50.49 192.6C39.16 198.3 31.1 209.9 31.1 222.6C31.1 241 46.97 256 65.44 256H67.2C82.02 182.1 146.6 128 223.1 128H376.4C394 108.4 419.6 96 448 96H465.3C480.9 96 492.3 110.7 488.5 125.8H488.5zM224 160C153.3 160 96 217.3 96 288C96 329.9 116.1 367 147.2 390.4L160 400V464C160 472.8 167.2 480 176 480H208C216.8 480 224 472.8 224 464V416H352V464C352 472.8 359.2 480 368 480H400C408.8 480 416 472.8 416 464V413.7L435.2 405.4C455.6 396.5 473.2 382.4 486.4 364.8L496 352H544V256H509.7L501.4 236.8C492.5 216.4 478.4 198.8 460.8 185.6L443.8 172.8L455 128H448C429 128 412.1 136.2 400.3 149.3L390.7 160H224z" })))));
|
|
76
|
+
};
|
|
77
|
+
const ChooseAnotherFundView = () => {
|
|
78
|
+
return this.existingFund.type == 'Defined Benefits Fund' ? null : (h("div", { class: "mt-4" },
|
|
79
|
+
h("sss-button", { testid: "choose-another-fund-button", fillWidth: true, variant: "secondary", promiseFn: () => this.handleFundNominationDeclined() }, "Choose another fund")));
|
|
80
|
+
};
|
|
74
81
|
return (h("div", null,
|
|
75
|
-
h("div", { class: "text-2xl sm:text-3xl font-bold text-center" }, "Your super
|
|
76
|
-
h("div", { class: "sm:text-lg text-gray-600 mt-3 sm:mt-4 max-w-800 text-center leading-7" }, "Continue with your chosen fund or choose another fund below."),
|
|
82
|
+
h("div", { class: "text-2xl sm:text-3xl font-bold text-center" }, "Your super nomination"),
|
|
83
|
+
this.existingFund.type == 'Defined Benefits Fund' ? null : (h("div", { class: "sm:text-lg text-gray-600 mt-3 sm:mt-4 max-w-800 text-center leading-7" }, "Continue with your chosen fund or choose another fund below.")),
|
|
77
84
|
h("div", { class: "flex justify-center mt-8 sm:mt-12" },
|
|
78
85
|
h("div", { class: "max-w-400 w-full" },
|
|
79
86
|
h("div", { class: "flex-col border shadow-sm p-6 pt-8 rounded-lg text-center" },
|
|
@@ -82,19 +89,22 @@ export class ExistingChoice {
|
|
|
82
89
|
switch (this.existingFund.type) {
|
|
83
90
|
case 'Promoted Fund':
|
|
84
91
|
case 'Promoted Default Fund':
|
|
85
|
-
return h(PromotedFundView, {
|
|
92
|
+
return h(PromotedFundView, { name: this.existingFund.name });
|
|
86
93
|
case 'Self Managed Fund':
|
|
87
94
|
return h(SelfManagedFundView, null);
|
|
88
95
|
case 'My Own Fund':
|
|
96
|
+
case 'Promoted Default Fund With Join':
|
|
89
97
|
return h(MyOwnFundView, null);
|
|
90
98
|
case 'Default Fund':
|
|
91
99
|
return h(DefaultFundView, null);
|
|
100
|
+
case 'Defined Benefits Fund':
|
|
101
|
+
return h(DefinedBenefitsFundView, null);
|
|
92
102
|
default:
|
|
93
103
|
assertExhaustive(this.existingFund);
|
|
94
104
|
return h("div", null);
|
|
95
105
|
}
|
|
96
106
|
})(),
|
|
97
|
-
h("div", { class: "sm:text-lg font-bold leading-6" }, (() => {
|
|
107
|
+
h("div", { class: "sm:text-lg font-bold leading-6 break-words" }, (() => {
|
|
98
108
|
switch (this.existingFund.type) {
|
|
99
109
|
case 'Default Fund':
|
|
100
110
|
return "Employer's default fund";
|
|
@@ -102,6 +112,8 @@ export class ExistingChoice {
|
|
|
102
112
|
case 'Promoted Fund':
|
|
103
113
|
case 'Self Managed Fund':
|
|
104
114
|
case 'Promoted Default Fund':
|
|
115
|
+
case 'Defined Benefits Fund':
|
|
116
|
+
case 'Promoted Default Fund With Join':
|
|
105
117
|
return this.existingFund.name;
|
|
106
118
|
default:
|
|
107
119
|
assertExhaustive(this.existingFund);
|
|
@@ -109,9 +121,8 @@ export class ExistingChoice {
|
|
|
109
121
|
}
|
|
110
122
|
})())),
|
|
111
123
|
h("div", { class: "mt-6" },
|
|
112
|
-
h("sss-button", { fillWidth: true, promiseFn: () => this.handleFundNominationAccepted() }, "Continue with this fund"))),
|
|
113
|
-
h(
|
|
114
|
-
h("sss-button", { fillWidth: true, variant: "secondary", promiseFn: () => this.handleFundNominationDeclined() }, "Choose another fund"))))));
|
|
124
|
+
h("sss-button", { testid: "continue-with-this-fund-button", fillWidth: true, promiseFn: () => this.handleFundNominationAccepted() }, "Continue with this fund"))),
|
|
125
|
+
h(ChooseAnotherFundView, null)))));
|
|
115
126
|
}
|
|
116
127
|
async handleFundNominationAccepted() {
|
|
117
128
|
const detail = this.createSuperFundNominationDetail(this.existingFund);
|
|
@@ -121,7 +132,7 @@ export class ExistingChoice {
|
|
|
121
132
|
async handleFundNominationDeclined() {
|
|
122
133
|
const detail = this.createSuperFundNominationDetail(this.existingFund);
|
|
123
134
|
await this.eventTrackingService.TrackSuperFundNominationDeclinedAsync(detail);
|
|
124
|
-
navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.
|
|
135
|
+
navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.ChoicePage);
|
|
125
136
|
}
|
|
126
137
|
static get is() { return "sss-existing-choice-page"; }
|
|
127
138
|
static get properties() { return {
|
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
import { Component, h, Prop } from '@stencil/core';
|
|
2
|
-
import { isSome } from 'fp-ts/lib/Option';
|
|
3
2
|
import { AppVersion } from '../../../utils';
|
|
3
|
+
import superSelectionAppService from '../services/super-selection-app.service';
|
|
4
4
|
const DefaultFooterText = 'Powered by Flare';
|
|
5
5
|
export class FooterSection {
|
|
6
6
|
constructor() {
|
|
7
|
-
this.footerText = () =>
|
|
7
|
+
this.footerText = () => this.textOverride !== undefined ? this.textOverride : DefaultFooterText;
|
|
8
8
|
}
|
|
9
9
|
render() {
|
|
10
|
-
return (h("div", { class:
|
|
11
|
-
|
|
10
|
+
return (h("div", { class: {
|
|
11
|
+
'text-center text-gray-500 text-xs w-full max-w-960 mx-auto': true,
|
|
12
|
+
'mt-8 sm:mt-20': !superSelectionAppService.hideFooterSection
|
|
13
|
+
} },
|
|
14
|
+
!superSelectionAppService.hideFooterSection && h("span", null, this.footerText()),
|
|
12
15
|
h("p", { class: "block text-transparent" },
|
|
13
16
|
"v",
|
|
14
17
|
AppVersion)));
|
|
@@ -16,24 +19,21 @@ export class FooterSection {
|
|
|
16
19
|
static get is() { return "sss-footer-section"; }
|
|
17
20
|
static get properties() { return {
|
|
18
21
|
"textOverride": {
|
|
19
|
-
"type": "
|
|
22
|
+
"type": "string",
|
|
20
23
|
"mutable": false,
|
|
21
24
|
"complexType": {
|
|
22
|
-
"original": "
|
|
23
|
-
"resolved": "
|
|
24
|
-
"references": {
|
|
25
|
-
"Option": {
|
|
26
|
-
"location": "import",
|
|
27
|
-
"path": "fp-ts/lib/Option"
|
|
28
|
-
}
|
|
29
|
-
}
|
|
25
|
+
"original": "string",
|
|
26
|
+
"resolved": "string | undefined",
|
|
27
|
+
"references": {}
|
|
30
28
|
},
|
|
31
29
|
"required": false,
|
|
32
|
-
"optional":
|
|
30
|
+
"optional": true,
|
|
33
31
|
"docs": {
|
|
34
32
|
"tags": [],
|
|
35
33
|
"text": ""
|
|
36
|
-
}
|
|
34
|
+
},
|
|
35
|
+
"attribute": "text-override",
|
|
36
|
+
"reflect": false
|
|
37
37
|
}
|
|
38
38
|
}; }
|
|
39
39
|
}
|
|
@@ -27,6 +27,15 @@ export class CustomFundChoiceApi {
|
|
|
27
27
|
})
|
|
28
28
|
.text();
|
|
29
29
|
}
|
|
30
|
+
async submitDefinedBenefitsChoiceAsync(dto) {
|
|
31
|
+
return buildBackendApiClient()
|
|
32
|
+
.url('super-choice/defined-benefits')
|
|
33
|
+
.post(dto)
|
|
34
|
+
.badRequest(() => {
|
|
35
|
+
throw new Error('Failed to process Defined Benefits choice request');
|
|
36
|
+
})
|
|
37
|
+
.text();
|
|
38
|
+
}
|
|
30
39
|
async validateAbnForSMSF(abn) {
|
|
31
40
|
const response = await buildBackendApiClient()
|
|
32
41
|
.url(`super-choice/smsf/${abn}/validate`)
|
|
@@ -2,24 +2,47 @@ import { Component, h, Prop, State } from '@stencil/core';
|
|
|
2
2
|
import { injectHistory } from '@stencil/router';
|
|
3
3
|
import navigationService from '../../services/navigation.service';
|
|
4
4
|
import { SuperSelectionAppRoutes } from '../../services/super-selection-app.routes';
|
|
5
|
-
import
|
|
6
|
-
|
|
5
|
+
import superSelectionAppService from '../../services/super-selection-app.service';
|
|
6
|
+
import { CustomFundTypes } from '../custom-fund/custom-fund.store';
|
|
7
|
+
const myOwnFundCustomOption = {
|
|
8
|
+
label: CustomFundTypes.MyOwnFund,
|
|
9
|
+
value: SuperSelectionAppRoutes.MyOwnFund
|
|
10
|
+
};
|
|
7
11
|
export class CustomFund {
|
|
8
12
|
constructor() {
|
|
9
|
-
this.currentCustomFund =
|
|
10
|
-
this.fundOptionsList = customFundOptions;
|
|
13
|
+
this.currentCustomFund = myOwnFundCustomOption;
|
|
11
14
|
this.showFundOptionsSelection = false;
|
|
12
15
|
}
|
|
13
16
|
componentWillLoad() {
|
|
14
|
-
let currentRoute =
|
|
17
|
+
let currentRoute = SuperSelectionAppRoutes.MyOwnFund;
|
|
15
18
|
if (window.location.pathname.includes(SuperSelectionAppRoutes.MyOwnFund))
|
|
16
19
|
currentRoute = SuperSelectionAppRoutes.MyOwnFund;
|
|
17
20
|
if (window.location.pathname.includes(SuperSelectionAppRoutes.DefaultFund))
|
|
18
21
|
currentRoute = SuperSelectionAppRoutes.DefaultFund;
|
|
19
22
|
if (window.location.pathname.includes(SuperSelectionAppRoutes.SelfManagedFund))
|
|
20
23
|
currentRoute = SuperSelectionAppRoutes.SelfManagedFund;
|
|
24
|
+
if (window.location.pathname.includes(SuperSelectionAppRoutes.FeaturedFunds))
|
|
25
|
+
currentRoute = SuperSelectionAppRoutes.FeaturedFunds;
|
|
26
|
+
this.fundOptionsList = [
|
|
27
|
+
myOwnFundCustomOption,
|
|
28
|
+
{
|
|
29
|
+
label: CustomFundTypes.SelfManagedFund,
|
|
30
|
+
value: SuperSelectionAppRoutes.SelfManagedFund
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
label: CustomFundTypes.DefaultFund,
|
|
34
|
+
value: SuperSelectionAppRoutes.DefaultFund
|
|
35
|
+
}
|
|
36
|
+
];
|
|
37
|
+
if (superSelectionAppService.isFeaturedFundsEnabled &&
|
|
38
|
+
superSelectionAppService.isUsingSuperCampaign) {
|
|
39
|
+
this.fundOptionsList.push({
|
|
40
|
+
label: CustomFundTypes.FeaturedFunds,
|
|
41
|
+
value: SuperSelectionAppRoutes.FeaturedFunds
|
|
42
|
+
});
|
|
43
|
+
}
|
|
21
44
|
this.currentCustomFund =
|
|
22
|
-
|
|
45
|
+
this.fundOptionsList.find((item) => item.value === currentRoute) || this.currentCustomFund;
|
|
23
46
|
navigationService.navigateInternally(this.history, currentRoute);
|
|
24
47
|
}
|
|
25
48
|
render() {
|
|
@@ -31,7 +54,7 @@ export class CustomFund {
|
|
|
31
54
|
return (h("svg", { class: "h-5 w-5 fill-primary-base group-hover:fill-white", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 20 20" },
|
|
32
55
|
h("path", { "fill-rule": "evenodd", d: "M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z", "clip-rule": "evenodd" })));
|
|
33
56
|
};
|
|
34
|
-
return (h("div", { class: "max-w-560 relative" },
|
|
57
|
+
return (h("div", { class: "max-w-560 sm:w-560 relative" },
|
|
35
58
|
h("label", { class: "font-medium text-gray-700 text-sm" }, "Which fund would you like to nominate?"),
|
|
36
59
|
h("div", { class: "mt-1 mb-4" },
|
|
37
60
|
h("button", { type: "button", class: "bg-white relative w-full border border-gray-300 rounded-md shadow-sm pl-3 pr-10 py-2 text-left cursor-default focus:outline-none focus:ring-1 focus:ring-primary-focus focus:border-primary-base text-base sm:text-sm", onClick: () => (this.showFundOptionsSelection = !this.showFundOptionsSelection) },
|
package/dist/lib/collection/components/super-selection-app/funds/custom-fund/custom-fund.store.js
CHANGED
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
import { createStore } from '@stencil/store';
|
|
2
2
|
import * as O from 'fp-ts/Option';
|
|
3
|
-
|
|
4
|
-
var CustomFundTypes;
|
|
3
|
+
export var CustomFundTypes;
|
|
5
4
|
(function (CustomFundTypes) {
|
|
6
|
-
CustomFundTypes["MyOwnFund"] = "
|
|
7
|
-
CustomFundTypes["DefaultFund"] = "
|
|
8
|
-
CustomFundTypes["SelfManagedFund"] = "
|
|
5
|
+
CustomFundTypes["MyOwnFund"] = "Existing super fund";
|
|
6
|
+
CustomFundTypes["DefaultFund"] = "Default super fund";
|
|
7
|
+
CustomFundTypes["SelfManagedFund"] = "Self-managed super fund";
|
|
8
|
+
CustomFundTypes["FeaturedFunds"] = "Featured super funds";
|
|
9
9
|
})(CustomFundTypes || (CustomFundTypes = {}));
|
|
10
10
|
export const initialStateCustomFund = {
|
|
11
|
-
continueAllowed: false,
|
|
12
|
-
nextRoute: '/',
|
|
13
11
|
myOwnFundForm: {
|
|
14
12
|
fundUsi: O.none,
|
|
15
13
|
fundName: O.none,
|
|
@@ -31,22 +29,7 @@ export const initialStateCustomFund = {
|
|
|
31
29
|
bankAccountNumber: '',
|
|
32
30
|
memberFirstName: '',
|
|
33
31
|
memberFamilyName: ''
|
|
34
|
-
}
|
|
35
|
-
currentCustomFundType: CustomFundTypes.MyOwnFund,
|
|
36
|
-
customFunds: [
|
|
37
|
-
{
|
|
38
|
-
label: CustomFundTypes.MyOwnFund,
|
|
39
|
-
value: SuperSelectionAppRoutes.MyOwnFund
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
label: CustomFundTypes.SelfManagedFund,
|
|
43
|
-
value: SuperSelectionAppRoutes.SelfManagedFund
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
label: CustomFundTypes.DefaultFund,
|
|
47
|
-
value: SuperSelectionAppRoutes.DefaultFund
|
|
48
|
-
}
|
|
49
|
-
]
|
|
32
|
+
}
|
|
50
33
|
};
|
|
51
34
|
const { state, reset } = createStore(initialStateCustomFund);
|
|
52
35
|
export const resetCustomFund = reset;
|
|
@@ -36,7 +36,7 @@ export class DefaultFund {
|
|
|
36
36
|
}
|
|
37
37
|
render() {
|
|
38
38
|
return (h(Host, null,
|
|
39
|
-
h("sss-header-section",
|
|
39
|
+
h("sss-header-section", null),
|
|
40
40
|
h("div", { class: "flex justify-center mt-11" },
|
|
41
41
|
h("sss-custom-fund", null,
|
|
42
42
|
h("div", { class: "p-4 sm:p-6 pb-6 sm:pb-8 border shadow-sm rounded-lg" },
|
|
@@ -64,9 +64,9 @@ export class DefaultFund {
|
|
|
64
64
|
h("div", { class: "flex justify-center mt-8" },
|
|
65
65
|
h("div", { class: "sm:max-w-320 w-full" },
|
|
66
66
|
this.isDefaultFundExists && !this.isInvalidDefaultFund && (h("div", { class: "mb-4" },
|
|
67
|
-
h("sss-button", { fillWidth: true, promiseFn: () => this.handleSubmitForm() }, "Continue"))),
|
|
67
|
+
h("sss-button", { testid: "continue-button", fillWidth: true, promiseFn: () => this.handleSubmitForm() }, "Continue"))),
|
|
68
68
|
h("stencil-route-link", { url: SuperSelectionAppRoutes.ChoicePage },
|
|
69
|
-
h("sss-button", { fillWidth: true, variant: "secondary" }, "Back"))))))));
|
|
69
|
+
h("sss-button", { testid: "back-button", fillWidth: true, variant: "secondary" }, "Back"))))))));
|
|
70
70
|
}
|
|
71
71
|
async handleSubmitForm() {
|
|
72
72
|
if (this.isInvalidDefaultFund) {
|
|
@@ -75,6 +75,11 @@ export class DefaultFund {
|
|
|
75
75
|
navigationService.navigateInternallyToStandardChoice({
|
|
76
76
|
history: this.history,
|
|
77
77
|
fundName: `Employer’s default fund`,
|
|
78
|
+
fundDetails: {
|
|
79
|
+
type: 'default',
|
|
80
|
+
fundName: this.defaultFundProductName,
|
|
81
|
+
fundUsi: this.defaultFund.usi
|
|
82
|
+
},
|
|
78
83
|
handleSubmitFn: async (standardChoiceFormSignature) => {
|
|
79
84
|
await customFundChoiceApi.submitDefaultFundChoiceAsync(Object.assign({ standardChoiceFormSignature }, superSelectionAppService.promotedFundsConfig));
|
|
80
85
|
}
|