@flarehr/apollo-super-selection 1.3.34200 → 1.3.34266
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-2855d33a.system.entry.js +69 -0
- package/dist/lib/apollo-super-selection/p-7fcf97a5.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_38.cjs.entry.js} +880 -3
- package/dist/lib/collection/apollo-super-selection.css +1 -1
- package/dist/lib/collection/collection-manifest.json +16 -0
- package/dist/lib/collection/components/app-host/super-selection-app-host.css +2 -2
- package/dist/lib/collection/components/super-selection-app/misc/button.js +2 -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 +41 -0
- package/dist/lib/collection/components/super-selection-app/prefill-fund/prefill-error-box.js +76 -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 +144 -0
- package/dist/lib/collection/components/super-selection-app/prefill-fund/prefill-my-own-fund.js +217 -0
- package/dist/lib/collection/components/super-selection-app/prefill-fund/prefill-smsf.js +355 -0
- package/dist/lib/collection/components/super-selection-app/prefill-fund/prefill-types.js +281 -0
- package/dist/lib/collection/components/super-selection-app/prefill-fund/prefill-warning-box.js +46 -0
- package/dist/lib/collection/components/super-selection-app/prefill-fund/prefill.js +73 -0
- package/dist/lib/collection/components/super-selection-app/services/event-tracking.service.js +10 -0
- package/dist/lib/collection/components/super-selection-app/services/super-selection-app.routes.js +10 -0
- package/dist/lib/collection/components/super-selection-app/services/super-selection-app.service.js +1 -0
- package/dist/lib/collection/components/super-selection-app/services/super-selection.store.js +1 -0
- package/dist/lib/collection/components/super-selection-app/super-selection-app.js +4 -1
- 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_38.entry.js} +873 -4
- 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_38.entry.js +69 -0
- package/dist/lib/types/components/super-selection-app/api/super-selection-events.model.d.ts +20 -0
- package/dist/lib/types/components/super-selection-app/api/super-selection.api.dto.d.ts +39 -0
- package/dist/lib/types/components/super-selection-app/funds/custom-fund/api/custom-fund-choice.api.dto.d.ts +1 -1
- package/dist/lib/types/components/super-selection-app/misc/button.d.ts +1 -1
- 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 +48 -0
- package/dist/lib/types/components/super-selection-app/prefill-fund/prefill-types.d.ts +90 -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 +11 -0
- package/dist/lib/types/components/super-selection-app/services/event-tracking.service.d.ts +2 -0
- package/dist/lib/types/components/super-selection-app/services/super-selection-app.routes.d.ts +5 -0
- package/dist/lib/types/components/super-selection-app/services/super-selection.store.d.ts +2 -1
- package/dist/lib/types/components.d.ts +132 -0
- package/package.json +2 -2
- package/dist/lib/apollo-super-selection/p-4eccef5e.entry.js +0 -14
- package/dist/lib/apollo-super-selection/p-51445515.system.entry.js +0 -69
- package/dist/lib/esm-es5/sss-button_30.entry.js +0 -69
|
@@ -264,7 +264,7 @@ class TapSubscriber extends datoramaAkita.Subscriber {
|
|
|
264
264
|
}
|
|
265
265
|
}
|
|
266
266
|
|
|
267
|
-
const AppVersion = '1.3.
|
|
267
|
+
const AppVersion = '1.3.34266';
|
|
268
268
|
|
|
269
269
|
// -------------------------------------------------------------------------------------
|
|
270
270
|
// guards
|
|
@@ -947,6 +947,7 @@ const Button = class {
|
|
|
947
947
|
'disabled:pointer-events-none disabled:border-gray-300 disabled:bg-gray-100 disabled:text-gray-400': true,
|
|
948
948
|
'border-transparent text-white bg-primary-base hover:bg-primary-hover': this.variant === 'primary',
|
|
949
949
|
'border-gray-300 text-gray-700 bg-white hover:bg-gray-50': this.variant === 'secondary',
|
|
950
|
+
'border-transparent bg-primary-light hover:bg-primary-base text-primary-dark hover:text-white': this.variant === 'light',
|
|
950
951
|
'w-full': this.fillWidth || this.fillWidthOnMobile,
|
|
951
952
|
'sm:w-auto': this.fillWidthOnMobile
|
|
952
953
|
}, disabled: this.disabled, onClick: () => this.clicked() }, this.state === PromiseButtonState.Pending && (index.h("sss-loading-indicator", { theme: this.variant === 'primary' ? 'light' : 'primary', size: 16 })), index.h("div", { class: { hidden: this.state === PromiseButtonState.Pending } }, index.h("slot", null))));
|
|
@@ -3471,6 +3472,7 @@ const initialState = {
|
|
|
3471
3472
|
profileId: Option.none,
|
|
3472
3473
|
jwt: Option.none,
|
|
3473
3474
|
superBuyer: Option.none,
|
|
3475
|
+
superChoicePrefill: Option.none,
|
|
3474
3476
|
promotedFunds: Option.none,
|
|
3475
3477
|
accountConfiguration: Option.none,
|
|
3476
3478
|
profileConfiguration: Option.none,
|
|
@@ -3576,6 +3578,7 @@ class SuperSelectionAppService {
|
|
|
3576
3578
|
this._state.superBuyer = Option.fromNullable(appStateResponse.superBuyer);
|
|
3577
3579
|
this._state.promotedFunds = Option.fromNullable(appStateResponse.promotedFunds);
|
|
3578
3580
|
this._state.campaignConnectEnabled = appStateResponse.campaignConnectEnabled;
|
|
3581
|
+
this._state.superChoicePrefill = Option.fromNullable(appStateResponse.prefill);
|
|
3579
3582
|
if (this._state.campaignConnectEnabled) {
|
|
3580
3583
|
this._state.campaignConnectPromise = Option.fromNullable(superSelectionApi.getCampaignConnectAsync());
|
|
3581
3584
|
}
|
|
@@ -3708,6 +3711,16 @@ class EventTrackingService {
|
|
|
3708
3711
|
SuperFundDisclaimerAccepted: detail
|
|
3709
3712
|
});
|
|
3710
3713
|
}
|
|
3714
|
+
async TrackSuperFundPrefillViewedAsync(detail) {
|
|
3715
|
+
return this.trackEventAsync({
|
|
3716
|
+
SuperFundPrefillViewed: detail
|
|
3717
|
+
});
|
|
3718
|
+
}
|
|
3719
|
+
async TrackSuperFundPrefillDeclinedAsync(detail) {
|
|
3720
|
+
return this.trackEventAsync({
|
|
3721
|
+
SuperFundPrefillDeclined: detail
|
|
3722
|
+
});
|
|
3723
|
+
}
|
|
3711
3724
|
async trackEventAsync(event) {
|
|
3712
3725
|
try {
|
|
3713
3726
|
await this.eventTrackingApi.PostAnalyticsEventAsync({ event });
|
|
@@ -3770,6 +3783,11 @@ var SuperSelectionAppRoutes;
|
|
|
3770
3783
|
SuperSelectionAppRoutes["PromotedFundJoinV1"] = "/promoted-fund/join/v1";
|
|
3771
3784
|
SuperSelectionAppRoutes["PromotedFundJoinV2"] = "/promoted-fund/join/v2";
|
|
3772
3785
|
SuperSelectionAppRoutes["MyOwnFund"] = "/super-choice/my-own-fund/";
|
|
3786
|
+
SuperSelectionAppRoutes["Prefill"] = "/super-choice/prefill/";
|
|
3787
|
+
SuperSelectionAppRoutes["PrefillInvalidMyOwnFundPage"] = "/super-choice/sss-prefill-invalid-my-own-fund/";
|
|
3788
|
+
SuperSelectionAppRoutes["PrefillMyOwnFundPage"] = "/super-choice/prefill-my-own-fund/";
|
|
3789
|
+
SuperSelectionAppRoutes["PrefillSMSFPage"] = "/super-choice/prefill-smsf/";
|
|
3790
|
+
SuperSelectionAppRoutes["PrefillInvalidSMSFPage"] = "/super-choice/prefill-invalid-smsf/";
|
|
3773
3791
|
SuperSelectionAppRoutes["SelfManagedFund"] = "/super-choice/smsf/";
|
|
3774
3792
|
SuperSelectionAppRoutes["DefaultFund"] = "/super-choice/default/";
|
|
3775
3793
|
SuperSelectionAppRoutes["StandardChoice"] = "/standard-choice/";
|
|
@@ -3783,6 +3801,11 @@ const superSelectionAppStencilRoutes = [
|
|
|
3783
3801
|
index.h("stencil-route", { url: SuperSelectionAppRoutes.PromotedFundJoinV1, component: "sss-promoted-fund-join-v1-page" }),
|
|
3784
3802
|
index.h("stencil-route", { url: SuperSelectionAppRoutes.PromotedFundJoinV2, component: "sss-promoted-fund-join-v2-page" }),
|
|
3785
3803
|
index.h("stencil-route", { url: SuperSelectionAppRoutes.MyOwnFund, component: "sss-my-own-fund" }),
|
|
3804
|
+
index.h("stencil-route", { url: SuperSelectionAppRoutes.PrefillInvalidMyOwnFundPage, component: "sss-prefill-invalid-my-own-fund" }),
|
|
3805
|
+
index.h("stencil-route", { url: SuperSelectionAppRoutes.Prefill, component: "sss-prefill" }),
|
|
3806
|
+
index.h("stencil-route", { url: SuperSelectionAppRoutes.PrefillMyOwnFundPage, component: "sss-prefill-my-own-fund" }),
|
|
3807
|
+
index.h("stencil-route", { url: SuperSelectionAppRoutes.PrefillSMSFPage, component: "sss-prefill-smsf" }),
|
|
3808
|
+
index.h("stencil-route", { url: SuperSelectionAppRoutes.PrefillInvalidSMSFPage, component: "sss-prefill-invalid-smsf" }),
|
|
3786
3809
|
index.h("stencil-route", { url: SuperSelectionAppRoutes.SelfManagedFund, component: "sss-self-managed-fund" }),
|
|
3787
3810
|
index.h("stencil-route", { url: SuperSelectionAppRoutes.DefaultFund, component: "sss-default-fund" }),
|
|
3788
3811
|
index.h("stencil-route", { url: SuperSelectionAppRoutes.StandardChoice, component: "sss-standard-choice-form" }),
|
|
@@ -4987,6 +5010,849 @@ const MemberNameInput = class {
|
|
|
4987
5010
|
}
|
|
4988
5011
|
};
|
|
4989
5012
|
|
|
5013
|
+
const Prefill = class {
|
|
5014
|
+
constructor(hostRef) {
|
|
5015
|
+
index.registerInstance(this, hostRef);
|
|
5016
|
+
this.prefill = undefined;
|
|
5017
|
+
}
|
|
5018
|
+
async componentWillLoad() {
|
|
5019
|
+
this.prefill = isSome(superSelectionAppService.state.superChoicePrefill)
|
|
5020
|
+
? superSelectionAppService.state.superChoicePrefill.value
|
|
5021
|
+
: undefined;
|
|
5022
|
+
}
|
|
5023
|
+
render() {
|
|
5024
|
+
if (this.prefill && this.prefill.type === 'myOwnFund') {
|
|
5025
|
+
if (this.prefill.data.fundDetail.type === 'Valid') {
|
|
5026
|
+
return this.renderMyOwnFund(this.prefill.data);
|
|
5027
|
+
}
|
|
5028
|
+
else {
|
|
5029
|
+
return this.renderInvalidMyOwnFund(this.prefill.data);
|
|
5030
|
+
}
|
|
5031
|
+
}
|
|
5032
|
+
if (this.prefill && this.prefill.type === 'smsf') {
|
|
5033
|
+
if (this.prefill.data.fundAbn.valid) {
|
|
5034
|
+
return this.renderSMSF(this.prefill.data);
|
|
5035
|
+
}
|
|
5036
|
+
else {
|
|
5037
|
+
return this.renderInvalidSMSF(this.prefill.data);
|
|
5038
|
+
}
|
|
5039
|
+
}
|
|
5040
|
+
navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.ConsentPage);
|
|
5041
|
+
return null;
|
|
5042
|
+
}
|
|
5043
|
+
renderMyOwnFund(data) {
|
|
5044
|
+
return index.h("sss-prefill-my-own-fund", { history: this.history, prefill: data });
|
|
5045
|
+
}
|
|
5046
|
+
renderInvalidMyOwnFund(data) {
|
|
5047
|
+
return index.h("sss-prefill-invalid-my-own-fund", { history: this.history, prefill: data });
|
|
5048
|
+
}
|
|
5049
|
+
renderSMSF(data) {
|
|
5050
|
+
return index.h("sss-prefill-smsf", { history: this.history, prefill: data });
|
|
5051
|
+
}
|
|
5052
|
+
renderInvalidSMSF(data) {
|
|
5053
|
+
return index.h("sss-prefill-invalid-smsf", { history: this.history, prefill: data });
|
|
5054
|
+
}
|
|
5055
|
+
};
|
|
5056
|
+
|
|
5057
|
+
const DisplayField = class {
|
|
5058
|
+
constructor(hostRef) {
|
|
5059
|
+
index.registerInstance(this, hostRef);
|
|
5060
|
+
}
|
|
5061
|
+
render() {
|
|
5062
|
+
return (index.h("div", { class: "flex w-full flex-col sm:flex-row sm:min-h-5 justify-center items-start gap-0.5 sm:gap-4 self-stretch" }, index.h("div", { class: {
|
|
5063
|
+
'sm:w-2/5 sm:max-w-40 self-stretch text-gray-500 text-xs sm:text-sm not-italic font-medium leading-4 sm:leading-5': true,
|
|
5064
|
+
'text-red-600': !this.field.isValid
|
|
5065
|
+
} }, this.field.name), index.h("div", { class: {
|
|
5066
|
+
'sm:w-3/5 self-stretch text-gray-900 text-sm not-italic font-normal leading-5': true,
|
|
5067
|
+
'text-red-600': !this.field.isValid
|
|
5068
|
+
} }, this.field.value)));
|
|
5069
|
+
}
|
|
5070
|
+
};
|
|
5071
|
+
|
|
5072
|
+
const PrefillErrorBox = class {
|
|
5073
|
+
constructor(hostRef) {
|
|
5074
|
+
index.registerInstance(this, hostRef);
|
|
5075
|
+
this.withHeader = false;
|
|
5076
|
+
}
|
|
5077
|
+
render() {
|
|
5078
|
+
const bgColour = 'bg-red-50';
|
|
5079
|
+
const accentColour = 'bg-red-400';
|
|
5080
|
+
const textColour = 'text-red-700';
|
|
5081
|
+
const textHeadingColour = 'text-red-800';
|
|
5082
|
+
const bulletColour = '#B91C1C';
|
|
5083
|
+
const BulletIcon = () => {
|
|
5084
|
+
return (index.h("div", { class: "flex justify-center items-center pt-2" }, index.h("div", { class: "w-1.5 h-1.5 fill-red-700" }, index.h("svg", { width: "6", height: "6", viewBox: "0 0 6 6", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, index.h("circle", { id: "Bullet", cx: "3", cy: "3", r: "3", fill: bulletColour })))));
|
|
5085
|
+
};
|
|
5086
|
+
const ErrorIcon = () => {
|
|
5087
|
+
return (index.h("div", { class: "w-5 h-5" }, index.h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "20", height: "20", viewBox: "0 0 20 20", fill: "none" }, index.h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M10 18C14.4183 18 18 14.4183 18 10C18 5.58172 14.4183 2 10 2C5.58172 2 2 5.58172 2 10C2 14.4183 5.58172 18 10 18ZM8.70711 7.29289C8.31658 6.90237 7.68342 6.90237 7.29289 7.29289C6.90237 7.68342 6.90237 8.31658 7.29289 8.70711L8.58579 10L7.29289 11.2929C6.90237 11.6834 6.90237 12.3166 7.29289 12.7071C7.68342 13.0976 8.31658 13.0976 8.70711 12.7071L10 11.4142L11.2929 12.7071C11.6834 13.0976 12.3166 13.0976 12.7071 12.7071C13.0976 12.3166 13.0976 11.6834 12.7071 11.2929L11.4142 10L12.7071 8.70711C13.0976 8.31658 13.0976 7.68342 12.7071 7.29289C12.3166 6.90237 11.6834 6.90237 11.2929 7.29289L10 8.58579L8.70711 7.29289Z", fill: "#F87171" }))));
|
|
5088
|
+
};
|
|
5089
|
+
return (index.h("div", { class: 'flex items-start self-stretch rounded-md ' + bgColour }, index.h("div", { class: 'w-1 self-stretch ' + accentColour }), index.h("div", { class: "flex items-start gap-3 flex-[1_0_0] p-4" }, index.h(ErrorIcon, null), index.h("div", { class: "flex flex-col items-start gap-2 flex-[1_0_0]" }, index.h("div", { class: "flex flex-col items-start gap-1 self-stretch" }, this.withHeader && (index.h("div", null, index.h("div", { class: 'text-sm font-medium leading-tight ' + textHeadingColour }, "Please correct ", this.notificationList.length, " issues with your fund details"), this.notificationList.map((text) => (index.h("div", { class: "flex items-start gap-[7px] self-stretch pl-0" }, index.h(BulletIcon, null), index.h("div", { class: 'flex-[1_0_0] text-sm not-italic font-normal leading-5 ' + textColour }, text)))))), !this.withHeader &&
|
|
5090
|
+
this.notificationList.map((text) => (index.h("div", { class: 'text-sm font-medium leading-tight ' + textHeadingColour }, text))))))));
|
|
5091
|
+
}
|
|
5092
|
+
};
|
|
5093
|
+
|
|
5094
|
+
function isNullOrWhitespace(value) {
|
|
5095
|
+
return value == null || value.trim() === '';
|
|
5096
|
+
}
|
|
5097
|
+
const DisabledField = (name, value) => {
|
|
5098
|
+
return (index.h("div", { class: "mt-3" },
|
|
5099
|
+
index.h("label", { class: "text-sm font-medium text-gray-700" }, name),
|
|
5100
|
+
index.h("div", { class: "mt-1 shadow-sm px-3 py-2 rounded-md border border-gray-300 bg-gray-50 text-gray-500 text-base sm:text-sm" }, value)));
|
|
5101
|
+
};
|
|
5102
|
+
const Header = () => {
|
|
5103
|
+
return (index.h("div", null,
|
|
5104
|
+
index.h("div", { class: "text-2xl sm:text-3xl font-bold text-center" }, "Your super nomination"),
|
|
5105
|
+
index.h("div", { class: "sm:text-lg text-gray-600 mt-3 sm:mt-4 max-w-800 text-center leading-7" }, "Review or update the below super fund nomination details provided by your employer.")));
|
|
5106
|
+
};
|
|
5107
|
+
class Style {
|
|
5108
|
+
static Input(isValidated) {
|
|
5109
|
+
return {
|
|
5110
|
+
'relative shadow-sm focus:ring-primary-focus focus:border-primary-base block w-full text-base sm:text-sm border-gray-300 rounded-md focus:z-10': true,
|
|
5111
|
+
'invalid:border-red-300 invalid:text-red-900 invalid:placeholder-red-300 invalid:focus:ring-red-500 invalid:focus:border-red-500': isValidated
|
|
5112
|
+
};
|
|
5113
|
+
}
|
|
5114
|
+
}
|
|
5115
|
+
|
|
5116
|
+
const NAME_PATTERN = "[A-Za-z][A-Za-z']+(( |-)[A-Za-z][A-Za-z']+)*\\s*$";
|
|
5117
|
+
class FormField {
|
|
5118
|
+
constructor(name, value) {
|
|
5119
|
+
this.name = name;
|
|
5120
|
+
this._value = value !== null && value !== void 0 ? value : '';
|
|
5121
|
+
this._errorMessage = this.validateAndReturnErrorMessage(this._value);
|
|
5122
|
+
}
|
|
5123
|
+
get value() {
|
|
5124
|
+
return this._value;
|
|
5125
|
+
}
|
|
5126
|
+
set value(newValue) {
|
|
5127
|
+
this._errorMessage = this.validateAndReturnErrorMessage(newValue);
|
|
5128
|
+
this._value = newValue;
|
|
5129
|
+
}
|
|
5130
|
+
get isValid() {
|
|
5131
|
+
return this._errorMessage === null;
|
|
5132
|
+
}
|
|
5133
|
+
get isEmpty() {
|
|
5134
|
+
return isNullOrWhitespace(this._value);
|
|
5135
|
+
}
|
|
5136
|
+
get errorMessage() {
|
|
5137
|
+
return this._errorMessage;
|
|
5138
|
+
}
|
|
5139
|
+
}
|
|
5140
|
+
class StaticFormField {
|
|
5141
|
+
constructor(name, value, isValid) {
|
|
5142
|
+
this.name = name;
|
|
5143
|
+
this._value = value !== null && value !== void 0 ? value : '';
|
|
5144
|
+
this._isValid = isValid;
|
|
5145
|
+
}
|
|
5146
|
+
get value() {
|
|
5147
|
+
return this._value;
|
|
5148
|
+
}
|
|
5149
|
+
get isValid() {
|
|
5150
|
+
return this._isValid;
|
|
5151
|
+
}
|
|
5152
|
+
get isEmpty() {
|
|
5153
|
+
return isNullOrWhitespace(this._value);
|
|
5154
|
+
}
|
|
5155
|
+
}
|
|
5156
|
+
class FundUsi extends StaticFormField {
|
|
5157
|
+
constructor(value, isValid) {
|
|
5158
|
+
super('Fund USI', value, isValid);
|
|
5159
|
+
}
|
|
5160
|
+
}
|
|
5161
|
+
class FundName extends StaticFormField {
|
|
5162
|
+
constructor(value, isValid) {
|
|
5163
|
+
super('Fund name', value, isValid);
|
|
5164
|
+
}
|
|
5165
|
+
}
|
|
5166
|
+
class SmsfFundName extends FormField {
|
|
5167
|
+
constructor(value) {
|
|
5168
|
+
super('Fund name', value);
|
|
5169
|
+
}
|
|
5170
|
+
validateAndReturnErrorMessage(newValue) {
|
|
5171
|
+
if (isNullOrWhitespace(newValue)) {
|
|
5172
|
+
return 'Fund name is required.';
|
|
5173
|
+
}
|
|
5174
|
+
else if (newValue.length < 2) {
|
|
5175
|
+
return 'Enter a valid Fund name.';
|
|
5176
|
+
}
|
|
5177
|
+
else {
|
|
5178
|
+
return null;
|
|
5179
|
+
}
|
|
5180
|
+
}
|
|
5181
|
+
}
|
|
5182
|
+
class MemberNumber extends FormField {
|
|
5183
|
+
constructor(value) {
|
|
5184
|
+
super('Member number', value);
|
|
5185
|
+
}
|
|
5186
|
+
validateAndReturnErrorMessage(newValue) {
|
|
5187
|
+
const regex = /^[A-Za-z0-9]{4,16}$/;
|
|
5188
|
+
if (isNullOrWhitespace(newValue)) {
|
|
5189
|
+
return 'Member number is required.';
|
|
5190
|
+
}
|
|
5191
|
+
else if (!regex.test(newValue)) {
|
|
5192
|
+
return 'Enter a valid member number (only numbers and / or letters)';
|
|
5193
|
+
}
|
|
5194
|
+
else {
|
|
5195
|
+
return null;
|
|
5196
|
+
}
|
|
5197
|
+
}
|
|
5198
|
+
}
|
|
5199
|
+
class MemberLastName extends FormField {
|
|
5200
|
+
constructor(value) {
|
|
5201
|
+
super('Member last name', value);
|
|
5202
|
+
}
|
|
5203
|
+
validateAndReturnErrorMessage(newValue) {
|
|
5204
|
+
const regex = new RegExp(NAME_PATTERN);
|
|
5205
|
+
if (isNullOrWhitespace(newValue)) {
|
|
5206
|
+
return 'Member last name is required.';
|
|
5207
|
+
}
|
|
5208
|
+
else if (!regex.test(newValue)) {
|
|
5209
|
+
return 'Member last name contains unsupported characters.';
|
|
5210
|
+
}
|
|
5211
|
+
else {
|
|
5212
|
+
return null;
|
|
5213
|
+
}
|
|
5214
|
+
}
|
|
5215
|
+
}
|
|
5216
|
+
class MemberGivenNames extends FormField {
|
|
5217
|
+
constructor(value) {
|
|
5218
|
+
super('Member given name(s)', value);
|
|
5219
|
+
}
|
|
5220
|
+
validateAndReturnErrorMessage(newValue) {
|
|
5221
|
+
const regex = new RegExp(NAME_PATTERN);
|
|
5222
|
+
if (isNullOrWhitespace(newValue)) {
|
|
5223
|
+
return 'Member given name(s) is required.';
|
|
5224
|
+
}
|
|
5225
|
+
else if (!regex.test(newValue)) {
|
|
5226
|
+
return 'Member given name(s) contains unsupported characters.';
|
|
5227
|
+
}
|
|
5228
|
+
else {
|
|
5229
|
+
return null;
|
|
5230
|
+
}
|
|
5231
|
+
}
|
|
5232
|
+
}
|
|
5233
|
+
class FundAbn extends StaticFormField {
|
|
5234
|
+
constructor(value, isValid) {
|
|
5235
|
+
super('Fund ABN', value, isValid);
|
|
5236
|
+
}
|
|
5237
|
+
}
|
|
5238
|
+
class FundEsa extends FormField {
|
|
5239
|
+
constructor(value) {
|
|
5240
|
+
super('Fund ESA', value);
|
|
5241
|
+
}
|
|
5242
|
+
validateAndReturnErrorMessage(newValue) {
|
|
5243
|
+
if (isNullOrWhitespace(newValue)) {
|
|
5244
|
+
return 'Fund ESA is required.';
|
|
5245
|
+
}
|
|
5246
|
+
else if (newValue.length < 2) {
|
|
5247
|
+
return 'Enter a valid Fund ESA.';
|
|
5248
|
+
}
|
|
5249
|
+
else {
|
|
5250
|
+
return null;
|
|
5251
|
+
}
|
|
5252
|
+
}
|
|
5253
|
+
}
|
|
5254
|
+
class FundAddressLine1 extends FormField {
|
|
5255
|
+
constructor(value) {
|
|
5256
|
+
super('Address line 1', value);
|
|
5257
|
+
}
|
|
5258
|
+
validateAndReturnErrorMessage(newValue) {
|
|
5259
|
+
if (isNullOrWhitespace(newValue)) {
|
|
5260
|
+
return 'Address line 1 is required.';
|
|
5261
|
+
}
|
|
5262
|
+
else if (newValue.length < 2) {
|
|
5263
|
+
return 'Enter a valid Address line 1.';
|
|
5264
|
+
}
|
|
5265
|
+
else {
|
|
5266
|
+
return null;
|
|
5267
|
+
}
|
|
5268
|
+
}
|
|
5269
|
+
}
|
|
5270
|
+
class FundAddressLine2 extends FormField {
|
|
5271
|
+
constructor(value) {
|
|
5272
|
+
super('Address line 2', value);
|
|
5273
|
+
}
|
|
5274
|
+
validateAndReturnErrorMessage(_newValue) {
|
|
5275
|
+
return null;
|
|
5276
|
+
}
|
|
5277
|
+
}
|
|
5278
|
+
class FundAddressCity extends FormField {
|
|
5279
|
+
constructor(value) {
|
|
5280
|
+
super('City/suburb', value);
|
|
5281
|
+
}
|
|
5282
|
+
validateAndReturnErrorMessage(newValue) {
|
|
5283
|
+
if (isNullOrWhitespace(newValue)) {
|
|
5284
|
+
return 'City/suburb is required.';
|
|
5285
|
+
}
|
|
5286
|
+
else {
|
|
5287
|
+
return null;
|
|
5288
|
+
}
|
|
5289
|
+
}
|
|
5290
|
+
}
|
|
5291
|
+
class FundAddressPostcode extends FormField {
|
|
5292
|
+
constructor(value) {
|
|
5293
|
+
super('Postcode', value);
|
|
5294
|
+
}
|
|
5295
|
+
validateAndReturnErrorMessage(newValue) {
|
|
5296
|
+
const regex = /^[0-9]{4}$/;
|
|
5297
|
+
if (isNullOrWhitespace(newValue)) {
|
|
5298
|
+
return 'Postcode is required.';
|
|
5299
|
+
}
|
|
5300
|
+
else if (!regex.test(newValue)) {
|
|
5301
|
+
return 'Enter a valid postcode.';
|
|
5302
|
+
}
|
|
5303
|
+
else {
|
|
5304
|
+
return null;
|
|
5305
|
+
}
|
|
5306
|
+
}
|
|
5307
|
+
}
|
|
5308
|
+
class FundAddressState extends FormField {
|
|
5309
|
+
constructor(value) {
|
|
5310
|
+
super('State', value);
|
|
5311
|
+
}
|
|
5312
|
+
get options() {
|
|
5313
|
+
return [
|
|
5314
|
+
{ value: 'NSW', label: 'NSW' },
|
|
5315
|
+
{ value: 'QLD', label: 'QLD' },
|
|
5316
|
+
{ value: 'ACT', label: 'ACT' },
|
|
5317
|
+
{ value: 'VIC', label: 'VIC' },
|
|
5318
|
+
{ value: 'TAS', label: 'TAS' },
|
|
5319
|
+
{ value: 'WA', label: 'WA' },
|
|
5320
|
+
{ value: 'SA', label: 'SA' },
|
|
5321
|
+
{ value: 'NT', label: 'NT' }
|
|
5322
|
+
];
|
|
5323
|
+
}
|
|
5324
|
+
validateAndReturnErrorMessage(newValue) {
|
|
5325
|
+
if (isNullOrWhitespace(newValue)) {
|
|
5326
|
+
return 'State is required.';
|
|
5327
|
+
}
|
|
5328
|
+
else if (this.options.find((option) => (option.value = newValue)) === undefined) {
|
|
5329
|
+
return 'Enter a valid state.';
|
|
5330
|
+
}
|
|
5331
|
+
else {
|
|
5332
|
+
return null;
|
|
5333
|
+
}
|
|
5334
|
+
}
|
|
5335
|
+
}
|
|
5336
|
+
class FundAddress extends StaticFormField {
|
|
5337
|
+
constructor(addrLine1, addrLine2, city, state, postcode) {
|
|
5338
|
+
const value = [addrLine1, addrLine2, city, state, postcode]
|
|
5339
|
+
.map((x) => x.value)
|
|
5340
|
+
.filter((v) => v)
|
|
5341
|
+
.join(', ');
|
|
5342
|
+
const isValid = addrLine1.isValid && addrLine2.isValid && city.isValid && state.isValid && postcode.isValid;
|
|
5343
|
+
super('Fund address', value, isValid);
|
|
5344
|
+
}
|
|
5345
|
+
}
|
|
5346
|
+
class BankAccountName extends FormField {
|
|
5347
|
+
constructor(value) {
|
|
5348
|
+
super('Account name', value);
|
|
5349
|
+
}
|
|
5350
|
+
validateAndReturnErrorMessage(newValue) {
|
|
5351
|
+
if (isNullOrWhitespace(newValue)) {
|
|
5352
|
+
return 'Account name is required.';
|
|
5353
|
+
}
|
|
5354
|
+
else if (newValue.length < 2) {
|
|
5355
|
+
return 'Enter a valid Account name.';
|
|
5356
|
+
}
|
|
5357
|
+
else {
|
|
5358
|
+
return null;
|
|
5359
|
+
}
|
|
5360
|
+
}
|
|
5361
|
+
}
|
|
5362
|
+
class BankAccountBsb extends FormField {
|
|
5363
|
+
constructor(value) {
|
|
5364
|
+
super('BSB', value);
|
|
5365
|
+
}
|
|
5366
|
+
validateAndReturnErrorMessage(newValue) {
|
|
5367
|
+
const regex = /^[0-9]{6,7}$/;
|
|
5368
|
+
if (isNullOrWhitespace(newValue)) {
|
|
5369
|
+
return 'BSB is required.';
|
|
5370
|
+
}
|
|
5371
|
+
else if (!regex.test(newValue)) {
|
|
5372
|
+
return 'Enter a valid BSB.';
|
|
5373
|
+
}
|
|
5374
|
+
else {
|
|
5375
|
+
return null;
|
|
5376
|
+
}
|
|
5377
|
+
}
|
|
5378
|
+
}
|
|
5379
|
+
class BankAccountNumber extends FormField {
|
|
5380
|
+
constructor(value) {
|
|
5381
|
+
super('Account number', value);
|
|
5382
|
+
}
|
|
5383
|
+
validateAndReturnErrorMessage(newValue) {
|
|
5384
|
+
const regex = /^[0-9]{2,11}$/;
|
|
5385
|
+
if (isNullOrWhitespace(newValue)) {
|
|
5386
|
+
return 'Account number is required.';
|
|
5387
|
+
}
|
|
5388
|
+
else if (!regex.test(newValue)) {
|
|
5389
|
+
return 'Enter a valid Account number.';
|
|
5390
|
+
}
|
|
5391
|
+
else {
|
|
5392
|
+
return null;
|
|
5393
|
+
}
|
|
5394
|
+
}
|
|
5395
|
+
}
|
|
5396
|
+
|
|
5397
|
+
const PrefillInvalidMyOwnFund = class {
|
|
5398
|
+
constructor(hostRef) {
|
|
5399
|
+
index.registerInstance(this, hostRef);
|
|
5400
|
+
this.eventTrackingService = EventTrackingService.Instance;
|
|
5401
|
+
this.createSuperFundPrefillDeclinedDetail = (prefill) => {
|
|
5402
|
+
return {
|
|
5403
|
+
fundType: 'My Own Fund',
|
|
5404
|
+
isUsiValid: prefill.fundDetail.type === 'Valid',
|
|
5405
|
+
isMemberNumberPresent: !isNullOrWhitespace(prefill.memberNumber),
|
|
5406
|
+
isMemberFirstNamePresent: !isNullOrWhitespace(prefill.memberFirstName),
|
|
5407
|
+
isMemberLastNamePresent: !isNullOrWhitespace(prefill.memberFamilyName)
|
|
5408
|
+
};
|
|
5409
|
+
};
|
|
5410
|
+
this.createSuperFundPrefillViewedDetail = (prefill) => {
|
|
5411
|
+
return {
|
|
5412
|
+
fundType: 'My Own Fund',
|
|
5413
|
+
isUsiValid: prefill.fundDetail.type === 'Valid',
|
|
5414
|
+
isMemberNumberPresent: !isNullOrWhitespace(prefill.memberNumber),
|
|
5415
|
+
isMemberFirstNamePresent: !isNullOrWhitespace(prefill.memberFirstName),
|
|
5416
|
+
isMemberLastNamePresent: !isNullOrWhitespace(prefill.memberFamilyName)
|
|
5417
|
+
};
|
|
5418
|
+
};
|
|
5419
|
+
}
|
|
5420
|
+
componentDidLoad() {
|
|
5421
|
+
const detail = this.createSuperFundPrefillViewedDetail(this.prefill);
|
|
5422
|
+
return this.eventTrackingService.TrackSuperFundPrefillViewedAsync(detail);
|
|
5423
|
+
}
|
|
5424
|
+
async componentWillLoad() {
|
|
5425
|
+
if (this.prefill && this.prefill.fundDetail.type === 'Invalid') {
|
|
5426
|
+
this.fundUsi = new FundUsi(this.prefill.fundDetail.fundUsi, false);
|
|
5427
|
+
this.fundName = new FundName('', false);
|
|
5428
|
+
this.memberNumber = new MemberNumber(this.prefill.memberNumber);
|
|
5429
|
+
this.memberGivenNames = new MemberGivenNames(this.prefill.memberFirstName);
|
|
5430
|
+
this.memberLastName = new MemberLastName(this.prefill.memberFamilyName);
|
|
5431
|
+
}
|
|
5432
|
+
else {
|
|
5433
|
+
// If prefill does not exist, or is valid we should
|
|
5434
|
+
// not have landed on this page, navigate to consent page
|
|
5435
|
+
navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.ConsentPage);
|
|
5436
|
+
}
|
|
5437
|
+
}
|
|
5438
|
+
render() {
|
|
5439
|
+
return (index.h("div", null, index.h(Header, null), index.h("div", { class: "flex flex-col items-center gap-8 mt-8 sm:mt-12" }, index.h("div", { class: "flex max-w-[560px] flex-col items-start gap-6 p-6 border shadow-sm rounded-lg" }, index.h("div", { class: "flex flex-col items-start gap-3 self-stretch" }, index.h("div", { class: "self-stretch text-grey-900 text-lg not-italic font-bold leading-7" }, "Your fund details"), index.h("sss-prefill-error-box", { class: "self-stretch", notificationList: [
|
|
5440
|
+
'The fund USI is invalid, or no longer in use. You are required to choose another fund to continue with your super nomination.'
|
|
5441
|
+
] }), index.h("div", { class: "flex flex-col gap-3 self-stretch mt-4" }, index.h("sss-prefill-display-field", { field: this.fundUsi }), index.h("sss-prefill-display-field", { field: this.fundName }), index.h("sss-prefill-display-field", { field: this.memberNumber }), index.h("sss-prefill-display-field", { field: this.memberLastName }), index.h("sss-prefill-display-field", { field: this.memberGivenNames })))), index.h("div", { class: "flex w-80 flex-col items-start gap-4" }, index.h("sss-button", { class: "self-stretch", fillWidth: true, variant: "primary", promiseFn: () => this.handleChooseAnotherFund() }, "Choose another fund")))));
|
|
5442
|
+
}
|
|
5443
|
+
async handleChooseAnotherFund() {
|
|
5444
|
+
const detail = this.createSuperFundPrefillDeclinedDetail(this.prefill);
|
|
5445
|
+
await this.eventTrackingService.TrackSuperFundPrefillDeclinedAsync(detail);
|
|
5446
|
+
return navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.ConsentPage);
|
|
5447
|
+
}
|
|
5448
|
+
};
|
|
5449
|
+
|
|
5450
|
+
const PrefillInvalidSMSF = class {
|
|
5451
|
+
constructor(hostRef) {
|
|
5452
|
+
index.registerInstance(this, hostRef);
|
|
5453
|
+
this.eventTrackingService = EventTrackingService.Instance;
|
|
5454
|
+
this.createSuperFundPrefillDeclinedDetail = (prefill) => {
|
|
5455
|
+
return {
|
|
5456
|
+
fundType: 'SMSF',
|
|
5457
|
+
isAbnValid: prefill.fundAbn.valid,
|
|
5458
|
+
isMemberFirstNamePresent: !isNullOrWhitespace(prefill.memberFirstName),
|
|
5459
|
+
isMemberLastNamePresent: !isNullOrWhitespace(prefill.memberFamilyName)
|
|
5460
|
+
};
|
|
5461
|
+
};
|
|
5462
|
+
this.createSuperFundPrefillViewedDetail = (prefill) => {
|
|
5463
|
+
return {
|
|
5464
|
+
fundType: 'SMSF',
|
|
5465
|
+
isAbnValid: prefill.fundAbn.valid,
|
|
5466
|
+
isMemberFirstNamePresent: !isNullOrWhitespace(prefill.memberFirstName),
|
|
5467
|
+
isMemberLastNamePresent: !isNullOrWhitespace(prefill.memberFamilyName)
|
|
5468
|
+
};
|
|
5469
|
+
};
|
|
5470
|
+
}
|
|
5471
|
+
componentDidLoad() {
|
|
5472
|
+
const detail = this.createSuperFundPrefillViewedDetail(this.prefill);
|
|
5473
|
+
return this.eventTrackingService.TrackSuperFundPrefillViewedAsync(detail);
|
|
5474
|
+
}
|
|
5475
|
+
async componentWillLoad() {
|
|
5476
|
+
if (this.prefill && !this.prefill.fundAbn.valid) {
|
|
5477
|
+
this.initialiseComponent(this.prefill);
|
|
5478
|
+
}
|
|
5479
|
+
else {
|
|
5480
|
+
// If prefill does not exist, or is valid we should
|
|
5481
|
+
// not have landed on this page, navigate to consent page
|
|
5482
|
+
navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.PrefillInvalidMyOwnFundPage);
|
|
5483
|
+
}
|
|
5484
|
+
}
|
|
5485
|
+
render() {
|
|
5486
|
+
return (index.h("div", null, index.h(Header, null), index.h("div", { class: "flex flex-col items-center gap-8 mt-8 sm:mt-12" }, index.h("div", { class: "flex max-w-[560px] flex-col items-start gap-6 p-6 border shadow-sm rounded-lg" }, index.h("div", { class: "flex flex-col items-start gap-3 self-stretch" }, index.h("div", { class: "self-stretch text-grey-900 text-lg not-italic font-bold leading-7" }, "Your self-managed super fund (SMSF) details"), index.h("sss-prefill-error-box", { class: "self-stretch", notificationList: [
|
|
5487
|
+
'The fund ABN is invalid. You are required to choose another fund to continue with your super nomination.'
|
|
5488
|
+
] }), index.h("div", { class: "flex flex-col gap-3 self-stretch mt-4" }, index.h("sss-prefill-display-field", { field: this.fundName }), index.h("sss-prefill-display-field", { field: this.fundAbn }), index.h("sss-prefill-display-field", { field: this.fundEsa }), index.h("sss-prefill-display-field", { field: this.fundAddress }), index.h("sss-prefill-display-field", { field: this.memberLastName }), index.h("sss-prefill-display-field", { field: this.memberGivenNames }), index.h("sss-prefill-display-field", { field: this.bankAccountName }), index.h("sss-prefill-display-field", { field: this.bankAccountBsb }), index.h("sss-prefill-display-field", { field: this.bankAccountNumber })))), index.h("div", { class: "flex w-80 flex-col items-start gap-4" }, index.h("sss-button", { class: "self-stretch", fillWidth: true, variant: "primary", promiseFn: () => this.handleFundNominationDeclined() }, "Choose another fund")))));
|
|
5489
|
+
}
|
|
5490
|
+
initialiseComponent(prefill) {
|
|
5491
|
+
this.fundName = new SmsfFundName(prefill.fundName);
|
|
5492
|
+
this.fundAbn = new FundAbn(prefill.fundAbn.value, prefill.fundAbn.valid);
|
|
5493
|
+
this.fundEsa = new FundEsa(prefill.electronicServiceAddress);
|
|
5494
|
+
this.fundAddressLine1 = new FundAddressLine1(prefill.addressLine1);
|
|
5495
|
+
this.fundAddressLine2 = new FundAddressLine2(prefill.addressLine2);
|
|
5496
|
+
this.fundAddressCity = new FundAddressCity(prefill.addressCity);
|
|
5497
|
+
this.fundAddressPostcode = new FundAddressPostcode(prefill.addressPostcode);
|
|
5498
|
+
this.fundAddressState = new FundAddressState(prefill.addressState);
|
|
5499
|
+
this.fundAddress = new FundAddress(this.fundAddressLine1, this.fundAddressLine2, this.fundAddressCity, this.fundAddressState, this.fundAddressPostcode);
|
|
5500
|
+
this.memberGivenNames = new MemberGivenNames(prefill.memberFirstName);
|
|
5501
|
+
this.memberLastName = new MemberLastName(prefill.memberFamilyName);
|
|
5502
|
+
this.bankAccountName = new BankAccountName(prefill.bankAccountName);
|
|
5503
|
+
this.bankAccountBsb = new BankAccountBsb(prefill.bankAccountBsb);
|
|
5504
|
+
this.bankAccountNumber = new BankAccountNumber(prefill.bankAccountNumber);
|
|
5505
|
+
}
|
|
5506
|
+
async handleFundNominationDeclined() {
|
|
5507
|
+
const detail = this.createSuperFundPrefillDeclinedDetail(this.prefill);
|
|
5508
|
+
await this.eventTrackingService.TrackSuperFundPrefillDeclinedAsync(detail);
|
|
5509
|
+
return navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.ConsentPage);
|
|
5510
|
+
}
|
|
5511
|
+
};
|
|
5512
|
+
|
|
5513
|
+
const PrefillMyOwnFund = class {
|
|
5514
|
+
constructor(hostRef) {
|
|
5515
|
+
index.registerInstance(this, hostRef);
|
|
5516
|
+
this.mode = 'review';
|
|
5517
|
+
this.formState = 'pristine';
|
|
5518
|
+
this.isSubmitDisabled = true;
|
|
5519
|
+
this.eventTrackingService = EventTrackingService.Instance;
|
|
5520
|
+
this.createSuperFundPrefillDeclinedDetail = (prefill) => {
|
|
5521
|
+
return {
|
|
5522
|
+
fundType: 'My Own Fund',
|
|
5523
|
+
isUsiValid: prefill.fundDetail.type === 'Valid',
|
|
5524
|
+
isMemberNumberPresent: !isNullOrWhitespace(prefill.memberNumber),
|
|
5525
|
+
isMemberFirstNamePresent: !isNullOrWhitespace(prefill.memberFirstName),
|
|
5526
|
+
isMemberLastNamePresent: !isNullOrWhitespace(prefill.memberFamilyName)
|
|
5527
|
+
};
|
|
5528
|
+
};
|
|
5529
|
+
this.createSuperFundPrefillViewedDetail = (prefill) => {
|
|
5530
|
+
return {
|
|
5531
|
+
fundType: 'My Own Fund',
|
|
5532
|
+
isUsiValid: prefill.fundDetail.type === 'Valid',
|
|
5533
|
+
isMemberNumberPresent: !isNullOrWhitespace(prefill.memberNumber),
|
|
5534
|
+
isMemberFirstNamePresent: !isNullOrWhitespace(prefill.memberFirstName),
|
|
5535
|
+
isMemberLastNamePresent: !isNullOrWhitespace(prefill.memberFamilyName)
|
|
5536
|
+
};
|
|
5537
|
+
};
|
|
5538
|
+
}
|
|
5539
|
+
componentDidLoad() {
|
|
5540
|
+
const detail = this.createSuperFundPrefillViewedDetail(this.prefill);
|
|
5541
|
+
return this.eventTrackingService.TrackSuperFundPrefillViewedAsync(detail);
|
|
5542
|
+
}
|
|
5543
|
+
async componentWillLoad() {
|
|
5544
|
+
if (this.prefill && this.prefill.fundDetail.type === 'Valid') {
|
|
5545
|
+
this.initialiseComponent(this.prefill.fundDetail.fundName, this.prefill);
|
|
5546
|
+
}
|
|
5547
|
+
else {
|
|
5548
|
+
// If prefill does not exist, or is invalid we should
|
|
5549
|
+
// not have landed on this page, navigate to consent page
|
|
5550
|
+
navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.ConsentPage);
|
|
5551
|
+
}
|
|
5552
|
+
}
|
|
5553
|
+
render() {
|
|
5554
|
+
const errorMessages = [
|
|
5555
|
+
this.memberNumber.errorMessage,
|
|
5556
|
+
this.memberLastName.errorMessage,
|
|
5557
|
+
this.memberGivenNames.errorMessage
|
|
5558
|
+
].filter((err) => err !== null);
|
|
5559
|
+
return (index.h("div", null, index.h(Header, null), index.h("div", { class: "flex flex-col items-center gap-8 mt-8 sm:mt-12" }, index.h("div", { class: "flex max-w-[560px] flex-col items-start gap-6 p-6 border shadow-sm rounded-lg" }, index.h("div", { class: "flex flex-col items-start gap-3.5 self-stretch" }, index.h("div", { class: "self-stretch text-grey-900 text-lg not-italic font-bold leading-7" }, "Your fund details"), index.h("sss-prefill-warning-box", { class: "self-stretch", notificationList: [
|
|
5560
|
+
'Make sure you are a current member of the fund before completing this step.',
|
|
5561
|
+
'Please check that the fund USI is correct as some funds have similar names.'
|
|
5562
|
+
] }), this.mode === 'review' && errorMessages.length > 0 && (index.h("sss-prefill-error-box", { class: "self-stretch", notificationList: errorMessages, withHeader: true })), this.mode === 'review' && (index.h("div", { class: "flex flex-col gap-3 self-stretch mt-4" }, index.h("sss-prefill-display-field", { field: this.fundUsi }), index.h("sss-prefill-display-field", { field: this.fundName }), index.h("sss-prefill-display-field", { field: this.memberNumber }), index.h("sss-prefill-display-field", { field: this.memberLastName }), index.h("sss-prefill-display-field", { field: this.memberGivenNames }))), this.mode === 'review' && (index.h("sss-button", { class: "self-stretch", fillWidth: true, variant: "light", promiseFn: () => this.setModeToEdit() }, index.h("div", { class: "flex flex-row gap-2" }, index.h("div", { class: "text-sm not-italic font-medium leading-4" }, "Edit details"), index.h("div", { class: "w-4 h-4 relative" }, index.h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "17", height: "16", viewBox: "0 0 17 16", fill: "currentColor" }, index.h("path", { d: "M11.369 2.86865C11.9939 2.24381 13.0069 2.24381 13.6318 2.86865C14.2566 3.49349 14.2566 4.50656 13.6318 5.1314L12.9974 5.76571L10.7347 3.50297L11.369 2.86865Z" }), index.h("path", { d: "M9.60334 4.63434L2.90039 11.3373V13.6H5.16313L11.8661 6.89708L9.60334 4.63434Z" })))))), this.mode === 'edit' && (index.h("form", { noValidate: true, onSubmit: (ev) => ev.preventDefault(), class: { 'was-validated': this.formState === 'validated' }, ref: (el) => (this.formElement = el), onInput: (_) => (this.isSubmitDisabled = this.formHasMissingData()) }, DisabledField(this.fundName.name, this.fundName.value), DisabledField(this.fundUsi.name, this.fundUsi.value), index.h("div", { class: "mt-3" }, index.h("label", { class: "text-sm font-medium text-gray-700" }, this.memberNumber.name), index.h("div", { class: "mt-1" }, index.h("input", { type: "text", class: Style.Input(this.formState === 'validated'), required: true, pattern: "[A-Za-z0-9]{4,16}", value: this.memberNumber.value, onInput: (ev) => {
|
|
5563
|
+
this.updateMemberNumber(ev.target.value);
|
|
5564
|
+
} }), index.h("div", { class: "mt-2 text-sm text-red-600" }, this.formState === 'validated' && this.memberNumber.errorMessage))), index.h("div", { class: "flex gap-x-4 flex-col sm:flex-row" }, index.h("div", { class: "mt-3 w-full sm:w-1/2" }, index.h("label", { class: "text-sm font-medium text-gray-700" }, this.memberGivenNames.name), index.h("div", { class: "mt-1" }, index.h("input", { type: "text", class: Style.Input(this.formState === 'validated'), required: true, pattern: NAME_PATTERN, value: this.memberGivenNames.value, onInput: (ev) => {
|
|
5565
|
+
this.updateMemberGivenNames(ev.target.value);
|
|
5566
|
+
} }), index.h("div", { class: "mt-2 text-sm text-red-600" }, this.formState === 'validated' && this.memberGivenNames.errorMessage))), index.h("div", { class: "mt-3 w-full sm:w-1/2" }, index.h("label", { class: "text-sm font-medium text-gray-700" }, this.memberLastName.name), index.h("div", { class: "mt-1" }, index.h("input", { type: "text", class: Style.Input(this.formState === 'validated'), required: true, pattern: NAME_PATTERN, value: this.memberLastName.value, onInput: (ev) => {
|
|
5567
|
+
this.updateMemberLastName(ev.target.value);
|
|
5568
|
+
} }), index.h("div", { class: "mt-2 text-sm text-red-600" }, this.formState === 'validated' && this.memberLastName.errorMessage)))))))), index.h("div", { class: "flex w-80 flex-col items-start gap-4" }, index.h("sss-button", { class: "self-stretch", fillWidth: true, variant: "primary", disabled: this.isSubmitDisabled, promiseFn: () => this.handleSubmitForm() }, "Continue"), index.h("sss-button", { class: "self-stretch", fillWidth: true, variant: "secondary", promiseFn: () => this.handleFundNominationDeclined() }, "Choose another fund")))));
|
|
5569
|
+
}
|
|
5570
|
+
initialiseComponent(fundName, prefill) {
|
|
5571
|
+
this.fundUsi = new FundUsi(prefill.fundDetail.fundUsi, true);
|
|
5572
|
+
this.fundName = new FundName(fundName, true);
|
|
5573
|
+
this.memberNumber = new MemberNumber(prefill.memberNumber);
|
|
5574
|
+
this.memberGivenNames = new MemberGivenNames(prefill.memberFirstName);
|
|
5575
|
+
this.memberLastName = new MemberLastName(prefill.memberFamilyName);
|
|
5576
|
+
this.isSubmitDisabled = this.formHasMissingData();
|
|
5577
|
+
}
|
|
5578
|
+
isFormValid() {
|
|
5579
|
+
return (this.fundUsi.isValid &&
|
|
5580
|
+
this.fundName.isValid &&
|
|
5581
|
+
this.memberNumber.isValid &&
|
|
5582
|
+
this.memberGivenNames.isValid &&
|
|
5583
|
+
this.memberLastName.isValid);
|
|
5584
|
+
}
|
|
5585
|
+
formHasMissingData() {
|
|
5586
|
+
return (this.fundUsi.isEmpty ||
|
|
5587
|
+
this.fundName.isEmpty ||
|
|
5588
|
+
this.memberNumber.isEmpty ||
|
|
5589
|
+
this.memberGivenNames.isEmpty ||
|
|
5590
|
+
this.memberLastName.isEmpty);
|
|
5591
|
+
}
|
|
5592
|
+
setModeToEdit() {
|
|
5593
|
+
this.mode = 'edit';
|
|
5594
|
+
return Promise.resolve();
|
|
5595
|
+
}
|
|
5596
|
+
updateMemberNumber(memberNumber) {
|
|
5597
|
+
this.memberNumber = new MemberNumber(memberNumber.trim());
|
|
5598
|
+
}
|
|
5599
|
+
updateMemberGivenNames(memberGivenNames) {
|
|
5600
|
+
this.memberGivenNames = new MemberGivenNames(memberGivenNames.trimStart());
|
|
5601
|
+
}
|
|
5602
|
+
updateMemberLastName(memberLastName) {
|
|
5603
|
+
this.memberLastName = new MemberLastName(memberLastName.trim());
|
|
5604
|
+
}
|
|
5605
|
+
async handleSubmitForm() {
|
|
5606
|
+
this.formState = 'validated';
|
|
5607
|
+
if (!this.isFormValid()) {
|
|
5608
|
+
return;
|
|
5609
|
+
}
|
|
5610
|
+
if (this.mode === 'edit' && !this.formElement.checkValidity()) {
|
|
5611
|
+
return;
|
|
5612
|
+
}
|
|
5613
|
+
navigationService.navigateInternallyToStandardChoice({
|
|
5614
|
+
history: this.history,
|
|
5615
|
+
fundName: this.fundName.value,
|
|
5616
|
+
handleSubmitFn: async (standardChoiceFormSignature) => {
|
|
5617
|
+
const customFundChoiceDto = Object.assign({ fundUsi: this.fundUsi.value, memberNumber: this.memberNumber.value, memberFirstName: this.memberGivenNames.value, memberFamilyName: this.memberLastName.value, standardChoiceFormSignature }, superSelectionAppService.promotedFundsConfig);
|
|
5618
|
+
await customFundChoiceApi.submitCustomFundChoiceAsync(customFundChoiceDto);
|
|
5619
|
+
}
|
|
5620
|
+
});
|
|
5621
|
+
}
|
|
5622
|
+
async handleFundNominationDeclined() {
|
|
5623
|
+
const detail = this.createSuperFundPrefillDeclinedDetail(this.prefill);
|
|
5624
|
+
await this.eventTrackingService.TrackSuperFundPrefillDeclinedAsync(detail);
|
|
5625
|
+
return navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.ConsentPage);
|
|
5626
|
+
}
|
|
5627
|
+
};
|
|
5628
|
+
|
|
5629
|
+
const PrefillSMSF = class {
|
|
5630
|
+
constructor(hostRef) {
|
|
5631
|
+
index.registerInstance(this, hostRef);
|
|
5632
|
+
this.mode = 'review';
|
|
5633
|
+
this.formState = 'pristine';
|
|
5634
|
+
this.isSubmitDisabled = true;
|
|
5635
|
+
this.eventTrackingService = EventTrackingService.Instance;
|
|
5636
|
+
this.createSuperFundPrefillDeclinedDetail = (prefill) => {
|
|
5637
|
+
return {
|
|
5638
|
+
fundType: 'SMSF',
|
|
5639
|
+
isAbnValid: prefill.fundAbn.valid,
|
|
5640
|
+
isMemberFirstNamePresent: !isNullOrWhitespace(prefill.memberFirstName),
|
|
5641
|
+
isMemberLastNamePresent: !isNullOrWhitespace(prefill.memberFamilyName)
|
|
5642
|
+
};
|
|
5643
|
+
};
|
|
5644
|
+
this.createSuperFundPrefillViewedDetail = (prefill) => {
|
|
5645
|
+
return {
|
|
5646
|
+
fundType: 'SMSF',
|
|
5647
|
+
isAbnValid: prefill.fundAbn.valid,
|
|
5648
|
+
isMemberFirstNamePresent: !isNullOrWhitespace(prefill.memberFirstName),
|
|
5649
|
+
isMemberLastNamePresent: !isNullOrWhitespace(prefill.memberFamilyName)
|
|
5650
|
+
};
|
|
5651
|
+
};
|
|
5652
|
+
}
|
|
5653
|
+
componentDidLoad() {
|
|
5654
|
+
const detail = this.createSuperFundPrefillViewedDetail(this.prefill);
|
|
5655
|
+
return this.eventTrackingService.TrackSuperFundPrefillViewedAsync(detail);
|
|
5656
|
+
}
|
|
5657
|
+
async componentWillLoad() {
|
|
5658
|
+
if (this.prefill && this.prefill.fundAbn.valid) {
|
|
5659
|
+
this.initialiseComponent(this.prefill);
|
|
5660
|
+
}
|
|
5661
|
+
else {
|
|
5662
|
+
// If prefill does not exist, or is invalid we should
|
|
5663
|
+
// not have landed on this page, navigate to consent page
|
|
5664
|
+
navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.PrefillInvalidMyOwnFundPage);
|
|
5665
|
+
}
|
|
5666
|
+
}
|
|
5667
|
+
render() {
|
|
5668
|
+
const errorMessages = [
|
|
5669
|
+
this.fundName.errorMessage,
|
|
5670
|
+
this.fundEsa.errorMessage,
|
|
5671
|
+
this.fundAddressLine1.errorMessage,
|
|
5672
|
+
this.fundAddressLine2.errorMessage,
|
|
5673
|
+
this.fundAddressCity.errorMessage,
|
|
5674
|
+
this.fundAddressPostcode.errorMessage,
|
|
5675
|
+
this.fundAddressState.errorMessage,
|
|
5676
|
+
this.memberLastName.errorMessage,
|
|
5677
|
+
this.memberGivenNames.errorMessage,
|
|
5678
|
+
this.bankAccountName.errorMessage,
|
|
5679
|
+
this.bankAccountBsb.errorMessage,
|
|
5680
|
+
this.bankAccountNumber.errorMessage
|
|
5681
|
+
].filter((err) => err !== null);
|
|
5682
|
+
return (index.h("div", null, index.h(Header, null), index.h("div", { class: "flex flex-col items-center gap-8 mt-8 sm:mt-12" }, index.h("div", { class: "flex max-w-[560px] flex-col items-start gap-6 p-6 border shadow-sm rounded-lg" }, index.h("div", { class: "flex flex-col items-start gap-3 self-stretch" }, index.h("div", { class: "self-stretch text-grey-900 text-lg not-italic font-bold leading-7" }, "Your self-managed super fund (SMSF) details"), index.h("sss-prefill-warning-box", { class: "self-stretch", notificationList: [
|
|
5683
|
+
'Make sure your Self-managed super fund (SMSF) is a registered fund before completing this step.'
|
|
5684
|
+
] }), this.mode === 'review' && errorMessages.length > 0 && (index.h("sss-prefill-error-box", { class: "self-stretch", notificationList: errorMessages, withHeader: true })), this.mode === 'review' && (index.h("div", { class: "flex flex-col gap-3 self-stretch mt-4" }, index.h("sss-prefill-display-field", { field: this.fundName }), index.h("sss-prefill-display-field", { field: this.fundAbn }), index.h("sss-prefill-display-field", { field: this.fundEsa }), index.h("sss-prefill-display-field", { field: this.fundAddress }), index.h("sss-prefill-display-field", { field: this.memberLastName }), index.h("sss-prefill-display-field", { field: this.memberGivenNames }), index.h("sss-prefill-display-field", { field: this.bankAccountName }), index.h("sss-prefill-display-field", { field: this.bankAccountBsb }), index.h("sss-prefill-display-field", { field: this.bankAccountNumber }))), this.mode === 'review' && (index.h("sss-button", { class: "self-stretch", fillWidth: true, variant: "light", promiseFn: () => this.setModeToEdit() }, index.h("div", { class: "flex flex-row gap-2" }, index.h("div", { class: "text-sm not-italic font-medium leading-4" }, "Edit details"), index.h("div", { class: "w-4 h-4 relative" }, index.h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "17", height: "16", viewBox: "0 0 17 16", fill: "currentColor" }, index.h("path", { d: "M11.369 2.86865C11.9939 2.24381 13.0069 2.24381 13.6318 2.86865C14.2566 3.49349 14.2566 4.50656 13.6318 5.1314L12.9974 5.76571L10.7347 3.50297L11.369 2.86865Z" }), index.h("path", { d: "M9.60334 4.63434L2.90039 11.3373V13.6H5.16313L11.8661 6.89708L9.60334 4.63434Z" })))))), this.mode === 'edit' && (index.h("form", { noValidate: true, onSubmit: (ev) => ev.preventDefault(), class: { 'was-validated': this.formState === 'validated' }, ref: (el) => (this.formElement = el), onInput: (_) => (this.isSubmitDisabled = this.formHasMissingData()) }, index.h("div", { class: "mt-3" }, index.h("label", { class: "text-sm font-medium text-gray-700" }, this.fundName.name), index.h("div", { class: "mt-1" }, index.h("input", { type: "text", class: Style.Input(this.formState === 'validated'), required: true, value: this.fundName.value, onInput: (ev) => {
|
|
5685
|
+
this.updateFundName(ev.target.value);
|
|
5686
|
+
} }), index.h("div", { class: "mt-2 text-sm text-red-600" }, this.formState === 'validated' && this.fundName.errorMessage))), DisabledField(this.fundAbn.name, this.fundAbn.value), index.h("div", { class: "mt-3" }, index.h("label", { class: "text-sm font-medium text-gray-700" }, this.fundEsa.name), index.h("div", { class: "mt-1" }, index.h("input", { type: "text", class: Style.Input(this.formState === 'validated'), required: true, minlength: "2", value: this.fundEsa.value, onInput: (ev) => {
|
|
5687
|
+
this.updateFundEsa(ev.target.value);
|
|
5688
|
+
} }), index.h("div", { class: "mt-2 text-sm text-red-600" }, this.formState === 'validated' && this.fundEsa.errorMessage))), index.h("div", { class: "mt-3" }, index.h("label", { class: "text-sm font-medium text-gray-700" }, "Fund address"), index.h("div", { class: "mt-1 rounded-md shadow-sm -space-y-px" }, index.h("input", { placeholder: "Address line 1", type: "text", class: Object.assign(Object.assign({}, Style.Input(this.formState === 'validated')), { 'rounded-none rounded-t-md shadow-none': true }), required: true, minlength: "2", name: "addressLine1", id: "addressLine1", value: this.fundAddressLine1.value, onChange: (ev) => {
|
|
5689
|
+
this.updateAddressLine1(ev.target.value);
|
|
5690
|
+
} }), index.h("input", { placeholder: "Address line 2 (optional)", type: "text", class: Object.assign(Object.assign({}, Style.Input(this.formState === 'validated')), { 'rounded-none shadow-none': true }), value: this.fundAddressLine2.value, onChange: (ev) => this.updateAddressLine2(ev.target.value) }), index.h("input", { placeholder: "City/suburb", type: "text", class: Object.assign(Object.assign({}, Style.Input(this.formState === 'validated')), { 'rounded-none shadow-none': true }), required: true, value: this.fundAddressCity.value, onChange: (ev) => {
|
|
5691
|
+
this.updateAddressCity(ev.target.value);
|
|
5692
|
+
} }), index.h("div", { class: "flex -space-x-px" }, index.h("div", { class: "w-1/2 flex-1 min-w-0" }, index.h("input", { placeholder: "Postcode", type: "text", required: true, class: Object.assign(Object.assign({}, Style.Input(this.formState === 'validated')), { 'rounded-none rounded-bl-md shadow-none': true }), name: "postcode", minlength: "4", maxlength: "4", pattern: "[0-9]{4}", id: "postcode", value: this.fundAddressPostcode.value, inputmode: "numeric", onChange: (ev) => {
|
|
5693
|
+
this.updateAddressPostcode(ev.target.value);
|
|
5694
|
+
} })), index.h("div", { class: "flex-1 min-w-0" }, index.h("select", { class: Object.assign(Object.assign({}, Style.Input(this.formState === 'validated')), { 'rounded-none rounded-br-md shadow-none': true, 'text-gray-500': this.formState !== 'validated' }), name: "state", required: true, id: "state", onChange: (ev) => {
|
|
5695
|
+
this.updateAddressState(ev.target.value);
|
|
5696
|
+
} }, index.h("option", { disabled: true, selected: this.fundAddressState.value !== undefined, value: "" }, "State"), this.fundAddressState.options.map((s) => (index.h("option", { value: s.value, selected: this.fundAddressState.value === s.value }, s.label))))))), this.formState === 'validated' && (index.h("div", { class: "mt-2 text-sm text-red-600" }, this.fundAddressLine1.errorMessage ||
|
|
5697
|
+
this.fundAddressLine1.errorMessage ||
|
|
5698
|
+
this.fundAddressCity.errorMessage ||
|
|
5699
|
+
this.fundAddressPostcode.errorMessage ||
|
|
5700
|
+
this.fundAddressState.errorMessage))), index.h("div", { class: "flex gap-x-4 flex-col sm:flex-row" }, index.h("div", { class: "mt-3 w-full sm:w-1/2" }, index.h("label", { class: "text-sm font-medium text-gray-700" }, this.memberGivenNames.name), index.h("div", { class: "mt-1" }, index.h("input", { type: "text", class: Style.Input(this.formState === 'validated'), required: true, value: this.memberGivenNames.value, onInput: (ev) => {
|
|
5701
|
+
this.updateMemberGivenNames(ev.target.value);
|
|
5702
|
+
} }), index.h("div", { class: "mt-2 text-sm text-red-600" }, this.formState === 'validated' && this.memberGivenNames.errorMessage))), index.h("div", { class: "mt-3 w-full sm:w-1/2" }, index.h("label", { class: "text-sm font-medium text-gray-700" }, this.memberLastName.name), index.h("div", { class: "mt-1" }, index.h("input", { type: "text", class: Style.Input(this.formState === 'validated'), required: true, value: this.memberLastName.value, onInput: (ev) => {
|
|
5703
|
+
this.updateMemberLastName(ev.target.value);
|
|
5704
|
+
} }), index.h("div", { class: "mt-2 text-sm text-red-600" }, this.formState === 'validated' && this.memberLastName.errorMessage)))), index.h("div", { class: "mt-3" }, index.h("label", { class: "text-sm font-medium text-gray-700" }, this.bankAccountName.name), index.h("div", { class: "mt-1" }, index.h("input", { type: "text", class: Style.Input(this.formState === 'validated'), required: true, value: this.bankAccountName.value, onInput: (ev) => {
|
|
5705
|
+
this.updateBankAccountName(ev.target.value);
|
|
5706
|
+
} }), index.h("div", { class: "mt-2 text-sm text-red-600" }, this.formState === 'validated' && this.bankAccountName.errorMessage))), index.h("div", { class: "mt-3" }, index.h("label", { class: "text-sm font-medium text-gray-700" }, this.bankAccountBsb.name), index.h("div", { class: "mt-1" }, index.h("input", { type: "text", class: Style.Input(this.formState === 'validated'), required: true, value: this.bankAccountBsb.value, onInput: (ev) => {
|
|
5707
|
+
this.updateBankAccountBsb(ev.target.value);
|
|
5708
|
+
} }), index.h("div", { class: "mt-2 text-sm text-red-600" }, this.formState === 'validated' && this.bankAccountBsb.errorMessage))), index.h("div", { class: "mt-3" }, index.h("label", { class: "text-sm font-medium text-gray-700" }, this.bankAccountNumber.name), index.h("div", { class: "mt-1" }, index.h("input", { type: "text", class: Style.Input(this.formState === 'validated'), required: true, value: this.bankAccountNumber.value, onInput: (ev) => {
|
|
5709
|
+
this.updateBankAccountNumber(ev.target.value);
|
|
5710
|
+
} }), index.h("div", { class: "mt-2 text-sm text-red-600" }, this.formState === 'validated' && this.bankAccountNumber.errorMessage))))))), index.h("div", { class: "flex w-80 flex-col items-start gap-4" }, index.h("sss-button", { class: "self-stretch", fillWidth: true, variant: "primary", disabled: this.isSubmitDisabled, promiseFn: () => this.handleSubmitForm() }, "Continue"), index.h("sss-button", { class: "self-stretch", fillWidth: true, variant: "secondary", promiseFn: () => this.handleFundNominationDeclined() }, "Choose another fund")))));
|
|
5711
|
+
}
|
|
5712
|
+
isFormValid() {
|
|
5713
|
+
return (this.fundName.isValid &&
|
|
5714
|
+
this.fundAbn.isValid &&
|
|
5715
|
+
this.fundEsa.isValid &&
|
|
5716
|
+
this.fundAddressLine1.isValid &&
|
|
5717
|
+
this.fundAddressLine2.isValid &&
|
|
5718
|
+
this.fundAddressCity.isValid &&
|
|
5719
|
+
this.fundAddressPostcode.isValid &&
|
|
5720
|
+
this.fundAddressState.isValid &&
|
|
5721
|
+
this.memberGivenNames.isValid &&
|
|
5722
|
+
this.memberLastName.isValid &&
|
|
5723
|
+
this.bankAccountName.isValid &&
|
|
5724
|
+
this.bankAccountBsb.isValid &&
|
|
5725
|
+
this.bankAccountNumber.isValid);
|
|
5726
|
+
}
|
|
5727
|
+
formHasMissingData() {
|
|
5728
|
+
return (this.fundName.isEmpty ||
|
|
5729
|
+
this.fundAbn.isEmpty ||
|
|
5730
|
+
this.fundEsa.isEmpty ||
|
|
5731
|
+
this.fundAddressLine1.isEmpty ||
|
|
5732
|
+
this.fundAddressCity.isEmpty ||
|
|
5733
|
+
this.fundAddressPostcode.isEmpty ||
|
|
5734
|
+
this.fundAddressState.isEmpty ||
|
|
5735
|
+
this.memberGivenNames.isEmpty ||
|
|
5736
|
+
this.memberLastName.isEmpty ||
|
|
5737
|
+
this.bankAccountName.isEmpty ||
|
|
5738
|
+
this.bankAccountBsb.isEmpty ||
|
|
5739
|
+
this.bankAccountNumber.isEmpty);
|
|
5740
|
+
}
|
|
5741
|
+
setModeToEdit() {
|
|
5742
|
+
this.mode = 'edit';
|
|
5743
|
+
return Promise.resolve();
|
|
5744
|
+
}
|
|
5745
|
+
updateFundName(fundName) {
|
|
5746
|
+
this.fundName = new SmsfFundName(fundName.trim());
|
|
5747
|
+
}
|
|
5748
|
+
updateFundEsa(fundEda) {
|
|
5749
|
+
this.fundEsa = new FundEsa(fundEda.trim());
|
|
5750
|
+
}
|
|
5751
|
+
updateAddressLine1(value) {
|
|
5752
|
+
this.fundAddressLine1 = new FundAddressLine1(value.trim());
|
|
5753
|
+
}
|
|
5754
|
+
updateAddressLine2(value) {
|
|
5755
|
+
this.fundAddressLine2 = new FundAddressLine2(value.trim());
|
|
5756
|
+
}
|
|
5757
|
+
updateAddressCity(value) {
|
|
5758
|
+
this.fundAddressCity = new FundAddressCity(value.trim());
|
|
5759
|
+
}
|
|
5760
|
+
updateAddressPostcode(value) {
|
|
5761
|
+
this.fundAddressPostcode = new FundAddressPostcode(value.trim());
|
|
5762
|
+
}
|
|
5763
|
+
updateAddressState(value) {
|
|
5764
|
+
this.fundAddressState = new FundAddressState(value.trim());
|
|
5765
|
+
}
|
|
5766
|
+
updateBankAccountName(bankAccountName) {
|
|
5767
|
+
this.bankAccountName = new BankAccountName(bankAccountName.trim());
|
|
5768
|
+
}
|
|
5769
|
+
updateBankAccountBsb(bankAccountBsb) {
|
|
5770
|
+
this.bankAccountBsb = new BankAccountBsb(bankAccountBsb.trim());
|
|
5771
|
+
}
|
|
5772
|
+
updateBankAccountNumber(bankAccountNumber) {
|
|
5773
|
+
this.bankAccountNumber = new BankAccountNumber(bankAccountNumber.trim());
|
|
5774
|
+
}
|
|
5775
|
+
updateMemberGivenNames(memberGivenNames) {
|
|
5776
|
+
this.memberGivenNames = new MemberGivenNames(memberGivenNames);
|
|
5777
|
+
}
|
|
5778
|
+
updateMemberLastName(memberLastName) {
|
|
5779
|
+
this.memberLastName = new MemberLastName(memberLastName.trim());
|
|
5780
|
+
}
|
|
5781
|
+
async handleSubmitForm() {
|
|
5782
|
+
this.formState = 'validated';
|
|
5783
|
+
if (!this.isFormValid() || !this.formElement.checkValidity()) {
|
|
5784
|
+
return;
|
|
5785
|
+
}
|
|
5786
|
+
navigationService.navigateInternallyToStandardChoice({
|
|
5787
|
+
history: this.history,
|
|
5788
|
+
fundName: this.fundName.value,
|
|
5789
|
+
handleSubmitFn: async (standardChoiceFormSignature) => {
|
|
5790
|
+
const smsfChoiceDto = Object.assign({ smsfChoice: {
|
|
5791
|
+
abn: this.fundAbn.value,
|
|
5792
|
+
fundName: this.fundName.value,
|
|
5793
|
+
fundAddress: {
|
|
5794
|
+
addressLine1: this.fundAddressLine1.value,
|
|
5795
|
+
addressLine2: this.fundAddressLine2.value.trim() === ''
|
|
5796
|
+
? null
|
|
5797
|
+
: this.fundAddressLine2.value.trim(),
|
|
5798
|
+
city: this.fundAddressCity.value,
|
|
5799
|
+
state: this.fundAddressState.value,
|
|
5800
|
+
postcode: this.fundAddressPostcode.value
|
|
5801
|
+
},
|
|
5802
|
+
bsb: this.bankAccountBsb.value,
|
|
5803
|
+
bankAccountName: this.bankAccountName.value,
|
|
5804
|
+
bankAccountNumber: this.bankAccountNumber.value,
|
|
5805
|
+
electronicServiceAddress: this.fundEsa.value,
|
|
5806
|
+
memberFirstName: this.memberGivenNames.value,
|
|
5807
|
+
memberFamilyName: this.memberLastName.value
|
|
5808
|
+
}, standardChoiceFormSignature }, superSelectionAppService.promotedFundsConfig);
|
|
5809
|
+
await customFundChoiceApi.submitSelfManagedFundChoiceAsync(smsfChoiceDto);
|
|
5810
|
+
}
|
|
5811
|
+
});
|
|
5812
|
+
}
|
|
5813
|
+
initialiseComponent(prefill) {
|
|
5814
|
+
this.fundName = new SmsfFundName(prefill.fundName);
|
|
5815
|
+
this.fundAbn = new FundAbn(prefill.fundAbn.value, prefill.fundAbn.valid);
|
|
5816
|
+
this.fundEsa = new FundEsa(prefill.electronicServiceAddress);
|
|
5817
|
+
this.fundAddressLine1 = new FundAddressLine1(prefill.addressLine1);
|
|
5818
|
+
this.fundAddressLine2 = new FundAddressLine2(prefill.addressLine2);
|
|
5819
|
+
this.fundAddressCity = new FundAddressCity(prefill.addressCity);
|
|
5820
|
+
this.fundAddressPostcode = new FundAddressPostcode(prefill.addressPostcode);
|
|
5821
|
+
this.fundAddressState = new FundAddressState(prefill.addressState);
|
|
5822
|
+
this.fundAddress = new FundAddress(this.fundAddressLine1, this.fundAddressLine2, this.fundAddressCity, this.fundAddressState, this.fundAddressPostcode);
|
|
5823
|
+
this.memberGivenNames = new MemberGivenNames(prefill.memberFirstName);
|
|
5824
|
+
this.memberLastName = new MemberLastName(prefill.memberFamilyName);
|
|
5825
|
+
this.bankAccountName = new BankAccountName(prefill.bankAccountName);
|
|
5826
|
+
this.bankAccountBsb = new BankAccountBsb(prefill.bankAccountBsb);
|
|
5827
|
+
this.bankAccountNumber = new BankAccountNumber(prefill.bankAccountNumber);
|
|
5828
|
+
this.isSubmitDisabled = this.formHasMissingData();
|
|
5829
|
+
}
|
|
5830
|
+
async handleFundNominationDeclined() {
|
|
5831
|
+
const detail = this.createSuperFundPrefillDeclinedDetail(this.prefill);
|
|
5832
|
+
await this.eventTrackingService.TrackSuperFundPrefillDeclinedAsync(detail);
|
|
5833
|
+
return navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.ConsentPage);
|
|
5834
|
+
}
|
|
5835
|
+
};
|
|
5836
|
+
|
|
5837
|
+
const PrefillWarningBox = class {
|
|
5838
|
+
constructor(hostRef) {
|
|
5839
|
+
index.registerInstance(this, hostRef);
|
|
5840
|
+
}
|
|
5841
|
+
render() {
|
|
5842
|
+
const bgColour = 'bg-yellow-50';
|
|
5843
|
+
const accentColour = 'bg-yellow-400';
|
|
5844
|
+
const textColour = 'text-yellow-700';
|
|
5845
|
+
const bulletColour = '#B45309';
|
|
5846
|
+
const BulletIcon = () => {
|
|
5847
|
+
return (index.h("div", { class: "flex justify-center items-center pt-2" }, index.h("div", { class: "w-1.5 h-1.5 fill-yellow-700" }, index.h("svg", { width: "6", height: "6", viewBox: "0 0 6 6", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, index.h("circle", { id: "Bullet", cx: "3", cy: "3", r: "3", fill: bulletColour })))));
|
|
5848
|
+
};
|
|
5849
|
+
const WarningIcon = () => {
|
|
5850
|
+
return (index.h("div", { class: "w-5 h-5" }, index.h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "20", height: "20", viewBox: "0 0 20 20", fill: "none" }, index.h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M8.25706 3.09882C9.02167 1.73952 10.9788 1.73952 11.7434 3.09882L17.3237 13.0194C18.0736 14.3526 17.1102 15.9999 15.5805 15.9999H4.4199C2.89025 15.9999 1.92682 14.3526 2.67675 13.0194L8.25706 3.09882ZM11.0001 13C11.0001 13.5523 10.5524 14 10.0001 14C9.44784 14 9.00012 13.5523 9.00012 13C9.00012 12.4477 9.44784 12 10.0001 12C10.5524 12 11.0001 12.4477 11.0001 13ZM10.0001 5C9.44784 5 9.00012 5.44772 9.00012 6V9C9.00012 9.55228 9.44784 10 10.0001 10C10.5524 10 11.0001 9.55228 11.0001 9V6C11.0001 5.44772 10.5524 5 10.0001 5Z", fill: "#FBBF24" }))));
|
|
5851
|
+
};
|
|
5852
|
+
return (index.h("div", { class: 'flex items-start self-stretch rounded-md ' + bgColour }, index.h("div", { class: 'w-1 self-stretch ' + accentColour }), index.h("div", { class: "flex items-start gap-3 flex-[1_0_0] p-4" }, index.h(WarningIcon, null), index.h("div", { class: "flex flex-col items-start gap-2 flex-[1_0_0]" }, index.h("div", { class: "flex flex-col items-start gap-1 self-stretch" }, this.notificationList.map((text) => (index.h("div", { class: "flex items-start gap-[7px] self-stretch pl-0" }, index.h(BulletIcon, null), index.h("div", { class: 'flex-[1_0_0] text-sm not-italic font-normal leading-5 ' + textColour }, text)))))))));
|
|
5853
|
+
}
|
|
5854
|
+
};
|
|
5855
|
+
|
|
4990
5856
|
class PromotedFundChoiceApi {
|
|
4991
5857
|
async submitChoiceAsync(dto) {
|
|
4992
5858
|
return buildBackendApiClient()
|
|
@@ -6935,7 +7801,10 @@ const SuperSelectionApp = class {
|
|
|
6935
7801
|
iframe.appReady();
|
|
6936
7802
|
const ignoreExistingSelectionOption = Option.fromNullable(this.ignoreExistingSelection);
|
|
6937
7803
|
const shouldIgnoreExistingChoice = Option.isSome(ignoreExistingSelectionOption) && ignoreExistingSelectionOption.value;
|
|
6938
|
-
if (Option.isSome(
|
|
7804
|
+
if (Option.isSome(superSelectionAppService.state.superChoicePrefill)) {
|
|
7805
|
+
navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.Prefill);
|
|
7806
|
+
}
|
|
7807
|
+
else if (Option.isSome(chosenFundOption) &&
|
|
6939
7808
|
chosenFundOption.value.valid !== 'Inactive' &&
|
|
6940
7809
|
!shouldIgnoreExistingChoice) {
|
|
6941
7810
|
navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.ExistingChoicePage);
|
|
@@ -17305,7 +18174,7 @@ class AppParametersQuery extends datoramaAkita.Query {
|
|
|
17305
18174
|
}
|
|
17306
18175
|
const appParametersQuery = new AppParametersQuery(sessionStore);
|
|
17307
18176
|
|
|
17308
|
-
const superSelectionAppHostCss = "html{scroll-behavior:smooth}.sss-app-container{--fl-color-primary:#fdbd00;--fl-color-primary-light:#
|
|
18177
|
+
const superSelectionAppHostCss = "html{scroll-behavior:smooth}.sss-app-container{--fl-color-primary:#fdbd00;--fl-color-primary-light:#fef3c7;--fl-color-primary-dark:#d97706;--fl-color-primary-disabled:#ffde7e;--fl-color-primary-hover:#e4aa00;--fl-color-primary-focus:#ca9700;--fl-color-primary-text:#3d3d3d;--fl-color-secondary:#e5e5e5;--fl-color-secondary-hover:#b3b3b3;--fl-color-secondary-focus:#b3b3b3}@media screen and (-webkit-min-device-pixel-ratio: 0){select,textarea,input{font-size:16px}}";
|
|
17309
18178
|
|
|
17310
18179
|
const SuperSelectionAppHost = class {
|
|
17311
18180
|
constructor(hostRef) {
|
|
@@ -17381,6 +18250,14 @@ exports.sss_loading_page = LoadingPage;
|
|
|
17381
18250
|
exports.sss_my_own_fund = MyOwnFund;
|
|
17382
18251
|
exports.sss_my_own_fund_inputs = MyOwnFundInputs;
|
|
17383
18252
|
exports.sss_name_input = MemberNameInput;
|
|
18253
|
+
exports.sss_prefill = Prefill;
|
|
18254
|
+
exports.sss_prefill_display_field = DisplayField;
|
|
18255
|
+
exports.sss_prefill_error_box = PrefillErrorBox;
|
|
18256
|
+
exports.sss_prefill_invalid_my_own_fund = PrefillInvalidMyOwnFund;
|
|
18257
|
+
exports.sss_prefill_invalid_smsf = PrefillInvalidSMSF;
|
|
18258
|
+
exports.sss_prefill_my_own_fund = PrefillMyOwnFund;
|
|
18259
|
+
exports.sss_prefill_smsf = PrefillSMSF;
|
|
18260
|
+
exports.sss_prefill_warning_box = PrefillWarningBox;
|
|
17384
18261
|
exports.sss_promoted_fund_join_v1_page = PromotedFundJoinV1Page;
|
|
17385
18262
|
exports.sss_promoted_fund_join_v2_page = PromotedFundJoinV2Page;
|
|
17386
18263
|
exports.sss_self_managed_fund = SelfManagedFund;
|