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