@dyedurham/search-and-file-widget 1.5.10 → 1.6.0
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/dnd-filing-shell.js +1105 -99
- package/package.json +1 -1
package/dnd-filing-shell.js
CHANGED
|
@@ -50682,6 +50682,11 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
50682
50682
|
const status = r.Status ? String(r.Status) : "ValidationFailed";
|
|
50683
50683
|
return new Error(msgs.length ? `eCore validation failed (HTTP ${httpStatus}, ${status}): ${msgs.join(" | ")}` : `eCore validation failed (HTTP ${httpStatus}, ${status}).`);
|
|
50684
50684
|
}
|
|
50685
|
+
function joinUrl(base, path) {
|
|
50686
|
+
const b = base.endsWith("/") ? base.slice(0, -1) : base;
|
|
50687
|
+
const p = path.startsWith("/") ? path : `/${path}`;
|
|
50688
|
+
return `${b}${p}`;
|
|
50689
|
+
}
|
|
50685
50690
|
function ensureAuthInputs(signature) {
|
|
50686
50691
|
if (!signature?.proxyApiUrl) {
|
|
50687
50692
|
const err = new Error("Missing signature.proxyApiUrl (required input from Athennian).");
|
|
@@ -50856,6 +50861,25 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
50856
50861
|
function isAnnualReturnTask(task) {
|
|
50857
50862
|
return task?._taskType === TaskType.AnnualCompliance;
|
|
50858
50863
|
}
|
|
50864
|
+
function getSearchOrFilingType(task) {
|
|
50865
|
+
if (!task) {
|
|
50866
|
+
return void 0;
|
|
50867
|
+
}
|
|
50868
|
+
const prefix = isOntarioTask(task) ? "ontario" : "federal";
|
|
50869
|
+
if (isFormationTask2(task)) {
|
|
50870
|
+
return `${prefix}Incorporation`;
|
|
50871
|
+
}
|
|
50872
|
+
if (isInitialReturn(task)) {
|
|
50873
|
+
return `${prefix}InitialReturn`;
|
|
50874
|
+
}
|
|
50875
|
+
if (isNoticeOfChangeTask(task)) {
|
|
50876
|
+
return `${prefix}NoticeOfChange`;
|
|
50877
|
+
}
|
|
50878
|
+
if (isAnnualReturnTask(task)) {
|
|
50879
|
+
return `${prefix}AnnualReturn`;
|
|
50880
|
+
}
|
|
50881
|
+
return void 0;
|
|
50882
|
+
}
|
|
50859
50883
|
function markFormGroupTouched(formGroup) {
|
|
50860
50884
|
Object.values(formGroup.controls).forEach((control) => {
|
|
50861
50885
|
control.markAsTouched();
|
|
@@ -78786,7 +78810,7 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
78786
78810
|
static \u0275fac = function TermsAndConditionsComponent_Factory(__ngFactoryType__) {
|
|
78787
78811
|
return new (__ngFactoryType__ || _TermsAndConditionsComponent)();
|
|
78788
78812
|
};
|
|
78789
|
-
static \u0275cmp = /* @__PURE__ */ \u0275\u0275defineComponent({ type: _TermsAndConditionsComponent, selectors: [["terms-and-conditions"]], outputs: { confirm: "confirm", prev: "prev", close: "close" }, decls: 71, vars: 14, consts: [[1, "terms-and-conditions"], [1, "terms-and-conditions-content"], ["title", "Terms and Conditions", 1, "terms-and-conditions-card"], [1, "terms-and-conditions-card-content"], [1, "terms-and-conditions-text-wrapper"], [1, "terms-and-conditions-text"], [1, "body-1-regular"], [3, "formControl"], ["title", "Signatory"], [3, "isSubmitted", "form", "config"], [1, "terms-and-conditions-form-actions"], ["mat-stroked-button", "", "mat-button", "", 3, "click"], [1, "body-1-semibold"], ["mat-flat-button", "", "type", "submit", 3, "click", "disabled"]], template: function TermsAndConditionsComponent_Template(rf, ctx) {
|
|
78813
|
+
static \u0275cmp = /* @__PURE__ */ \u0275\u0275defineComponent({ type: _TermsAndConditionsComponent, selectors: [["terms-and-conditions"]], outputs: { confirm: "confirm", prev: "prev", close: "close" }, decls: 71, vars: 14, consts: [[1, "terms-and-conditions"], [1, "terms-and-conditions-content"], ["title", "Terms and Conditions", 1, "terms-and-conditions-card"], [1, "terms-and-conditions-card-content"], [1, "terms-and-conditions-text-wrapper"], [1, "terms-and-conditions-text"], [1, "body-1-regular"], [3, "formControl"], [1, "body-1-regular", "black"], ["title", "Signatory"], [3, "isSubmitted", "form", "config"], [1, "terms-and-conditions-form-actions"], ["mat-stroked-button", "", "mat-button", "", 3, "click"], [1, "body-1-semibold"], ["mat-flat-button", "", "type", "submit", 3, "click", "disabled"]], template: function TermsAndConditionsComponent_Template(rf, ctx) {
|
|
78790
78814
|
if (rf & 1) {
|
|
78791
78815
|
\u0275\u0275elementStart(0, "div", 0)(1, "div", 1)(2, "expandable-card", 2)(3, "div", 3)(4, "div", 4)(5, "div", 5)(6, "span", 6);
|
|
78792
78816
|
\u0275\u0275text(7, ' The following are the Terms and Conditions for filing with the Ministry of Public and Business Service Delivery ("Ministry") under the Business Corporations Act, Business Names Act, Corporations Act, Corporations Information Act, Extra-Provincial Corporations Act, Limited Partnerships Act and Not-for-Profit Corporations Act, 2010. ');
|
|
@@ -78857,33 +78881,33 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
78857
78881
|
\u0275\u0275elementStart(50, "span", 6);
|
|
78858
78882
|
\u0275\u0275text(51, " 17. If this is a filing made in respect of an arrangement under the Business Corporations Act or Not-for-Profit Corporations Act, 2010, the corporation acknowledges that it must give the Director notice of the application to the court and that the Director is entitled to appear in court and be heard in person or by counsel. The corporation agrees to submit the required notice and a draft copy of the Plan of Arrangement under the applicable Act for review through the electronic system maintained by the Ministry at least seven business days before seeking an interim and/or final order with the court. The corporation agrees to make changes required by the Director to ensure that the Plan complies with the applicable Act and Ministry requirements, and is capable of being implemented in the electronic system maintained by the Ministry under the applicable Act. The corporation agrees that if the Ministry does not receive a draft of the application or sufficient notice of the application, additional time may be required for review. The corporation acknowledges that the Ministry may seek an adjournment if the corporation fails to provide a draft of the application or sufficient notice of the application. The corporation agrees that if it obtains a court order without providing the required notice of the application to the Ministry, revisions may be required to any Plan of Arrangement attached to a court order and a further court order may be required before the articles of arrangement are endorsed. ");
|
|
78859
78883
|
\u0275\u0275elementEnd()()();
|
|
78860
|
-
\u0275\u0275elementStart(52, "mat-checkbox", 7)(53, "div",
|
|
78884
|
+
\u0275\u0275elementStart(52, "mat-checkbox", 7)(53, "div", 8)(54, "span");
|
|
78861
78885
|
\u0275\u0275text(55, "I agree to the Terms and Conditions and confirm that all required person(s) and/or entities agree to them");
|
|
78862
78886
|
\u0275\u0275elementEnd()()()()();
|
|
78863
|
-
\u0275\u0275elementStart(56, "expandable-card",
|
|
78864
|
-
\u0275\u0275element(57, "filing-form-group",
|
|
78887
|
+
\u0275\u0275elementStart(56, "expandable-card", 9);
|
|
78888
|
+
\u0275\u0275element(57, "filing-form-group", 10);
|
|
78865
78889
|
\u0275\u0275elementEnd()();
|
|
78866
|
-
\u0275\u0275elementStart(58, "div",
|
|
78890
|
+
\u0275\u0275elementStart(58, "div", 11)(59, "button", 12);
|
|
78867
78891
|
\u0275\u0275listener("click", function TermsAndConditionsComponent_Template_button_click_59_listener() {
|
|
78868
78892
|
return ctx.close.emit();
|
|
78869
78893
|
});
|
|
78870
|
-
\u0275\u0275elementStart(60, "span",
|
|
78894
|
+
\u0275\u0275elementStart(60, "span", 13);
|
|
78871
78895
|
\u0275\u0275text(61);
|
|
78872
78896
|
\u0275\u0275pipe(62, "translate");
|
|
78873
78897
|
\u0275\u0275elementEnd()();
|
|
78874
|
-
\u0275\u0275elementStart(63, "button",
|
|
78898
|
+
\u0275\u0275elementStart(63, "button", 12);
|
|
78875
78899
|
\u0275\u0275listener("click", function TermsAndConditionsComponent_Template_button_click_63_listener() {
|
|
78876
78900
|
return ctx.prev.emit();
|
|
78877
78901
|
});
|
|
78878
|
-
\u0275\u0275elementStart(64, "span",
|
|
78902
|
+
\u0275\u0275elementStart(64, "span", 13);
|
|
78879
78903
|
\u0275\u0275text(65);
|
|
78880
78904
|
\u0275\u0275pipe(66, "translate");
|
|
78881
78905
|
\u0275\u0275elementEnd()();
|
|
78882
|
-
\u0275\u0275elementStart(67, "button",
|
|
78906
|
+
\u0275\u0275elementStart(67, "button", 14);
|
|
78883
78907
|
\u0275\u0275listener("click", function TermsAndConditionsComponent_Template_button_click_67_listener() {
|
|
78884
78908
|
return ctx.onConfirm();
|
|
78885
78909
|
});
|
|
78886
|
-
\u0275\u0275elementStart(68, "span",
|
|
78910
|
+
\u0275\u0275elementStart(68, "span", 13);
|
|
78887
78911
|
\u0275\u0275text(69);
|
|
78888
78912
|
\u0275\u0275pipe(70, "translate");
|
|
78889
78913
|
\u0275\u0275elementEnd()()()();
|
|
@@ -79158,7 +79182,7 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
79158
79182
|
</div>\r
|
|
79159
79183
|
\r
|
|
79160
79184
|
<mat-checkbox [formControl]="getFormControl(termsAndConditionsControls.AcceptTerms)">\r
|
|
79161
|
-
<div class="body-1-regular">\r
|
|
79185
|
+
<div class="body-1-regular black">\r
|
|
79162
79186
|
<span>I agree to the Terms and Conditions and confirm that all required person(s) and/or entities agree to them</span>\r
|
|
79163
79187
|
</div>\r
|
|
79164
79188
|
</mat-checkbox>\r
|
|
@@ -81582,7 +81606,7 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
81582
81606
|
const registeredOffice = formData[InitialReturnFillingFormGroups.RegisteredOfficeAddress];
|
|
81583
81607
|
const certifiedBy = formData[InitialReturnFillingFormGroups.CertifiedBy];
|
|
81584
81608
|
const contact = formData[InitialReturnFillingFormGroups.Contact];
|
|
81585
|
-
const
|
|
81609
|
+
const mapAddress3 = (src) => ({
|
|
81586
81610
|
unitType: src?.[IRFormControls.UnitType] ?? null,
|
|
81587
81611
|
unitNumber: src?.[IRFormControls.UnitNumber] ?? null,
|
|
81588
81612
|
streetNumber: src?.[IRFormControls.StreetNumber] ?? null,
|
|
@@ -81594,7 +81618,7 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
81594
81618
|
const id = item[IRFormControls.ID];
|
|
81595
81619
|
if (id) {
|
|
81596
81620
|
acc[id] = {
|
|
81597
|
-
address:
|
|
81621
|
+
address: mapAddress3(item),
|
|
81598
81622
|
residentCanadian: item[IRFormControls.IsCanadianResident] ?? false
|
|
81599
81623
|
};
|
|
81600
81624
|
}
|
|
@@ -81603,11 +81627,11 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
81603
81627
|
return {
|
|
81604
81628
|
referenceNumber: generalInfo?.[IRFormControls.ClientMatterNumber] ?? null,
|
|
81605
81629
|
docketNumber: generalInfo?.[IRFormControls.Docket] ?? null,
|
|
81606
|
-
registeredOfficeAddress:
|
|
81630
|
+
registeredOfficeAddress: mapAddress3(registeredOffice),
|
|
81607
81631
|
directors: mapPersons(formData[InitialReturnFillingFormGroups.Directors]),
|
|
81608
81632
|
officers: mapPersons(formData[InitialReturnFillingFormGroups.Officers]),
|
|
81609
81633
|
certifiedBy: {
|
|
81610
|
-
address:
|
|
81634
|
+
address: mapAddress3(certifiedBy)
|
|
81611
81635
|
},
|
|
81612
81636
|
contactUid: contact?.[IRFormControls.Contact] ?? null
|
|
81613
81637
|
};
|
|
@@ -81992,7 +82016,7 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
81992
82016
|
});
|
|
81993
82017
|
|
|
81994
82018
|
// src/app/constants/FederalConstants.ts
|
|
81995
|
-
var NameType2, NameTypeLabel2, LegalElement, LegalElementLabel, ISCOptions, ISCOptionsLabel, ISCExclusionReason, ISCExclusionReasonLabel, ISCTypeOfInterest, ISCTypeOfInterestLabel, ISCShareHoldingMethod, ISCShareHoldingMethodLabel, ISCJointHoldingType, ISCJointHoldingTypeLabel, ISCPercentageInterest, ISCPercentageInterestLabel, EPLLangage, SignatoryRole3, SignatoryRoleLabel;
|
|
82019
|
+
var NameType2, NameTypeLabel2, LegalElement, LegalElementLabel, ISCOptions, ISCOptionsLabel, ISCExclusionReason, ISCExclusionReasonLabel, ISCTypeOfInterest, ISCTypeOfInterestLabel, ISCShareHoldingMethod, ISCShareHoldingMethodLabel, ISCJointHoldingType, ISCJointHoldingTypeLabel, ISCPercentageInterest, ISCPercentageInterestLabel, EPLLangage, CorporationType, CorporationTypeLabel, NumberOfShareholders, NumberOfShareholdersLabel, SignatoryRole3, SignatoryRoleLabel;
|
|
81996
82020
|
var init_FederalConstants = __esm({
|
|
81997
82021
|
"src/app/constants/FederalConstants.ts"() {
|
|
81998
82022
|
(function(NameType3) {
|
|
@@ -82105,6 +82129,42 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
82105
82129
|
EPLLangage2["English"] = "English";
|
|
82106
82130
|
EPLLangage2["French"] = "French";
|
|
82107
82131
|
})(EPLLangage || (EPLLangage = {}));
|
|
82132
|
+
(function(CorporationType2) {
|
|
82133
|
+
CorporationType2[CorporationType2["ShareCapital"] = 1] = "ShareCapital";
|
|
82134
|
+
CorporationType2[CorporationType2["NonShareCapital"] = 2] = "NonShareCapital";
|
|
82135
|
+
CorporationType2[CorporationType2["Cooperative"] = 3] = "Cooperative";
|
|
82136
|
+
CorporationType2[CorporationType2["Other"] = 4] = "Other";
|
|
82137
|
+
})(CorporationType || (CorporationType = {}));
|
|
82138
|
+
CorporationTypeLabel = {
|
|
82139
|
+
[CorporationType.ShareCapital]: "Share capital corporation",
|
|
82140
|
+
[CorporationType.NonShareCapital]: "Non-share capital corporation",
|
|
82141
|
+
[CorporationType.Cooperative]: "Co-operative",
|
|
82142
|
+
[CorporationType.Other]: "Other"
|
|
82143
|
+
};
|
|
82144
|
+
(function(NumberOfShareholders2) {
|
|
82145
|
+
NumberOfShareholders2[NumberOfShareholders2["One"] = 1] = "One";
|
|
82146
|
+
NumberOfShareholders2[NumberOfShareholders2["Two"] = 2] = "Two";
|
|
82147
|
+
NumberOfShareholders2[NumberOfShareholders2["Three"] = 3] = "Three";
|
|
82148
|
+
NumberOfShareholders2[NumberOfShareholders2["Four"] = 4] = "Four";
|
|
82149
|
+
NumberOfShareholders2[NumberOfShareholders2["Five"] = 5] = "Five";
|
|
82150
|
+
NumberOfShareholders2[NumberOfShareholders2["Six"] = 6] = "Six";
|
|
82151
|
+
NumberOfShareholders2[NumberOfShareholders2["Seven"] = 7] = "Seven";
|
|
82152
|
+
NumberOfShareholders2[NumberOfShareholders2["Eight"] = 8] = "Eight";
|
|
82153
|
+
NumberOfShareholders2[NumberOfShareholders2["Nine"] = 9] = "Nine";
|
|
82154
|
+
NumberOfShareholders2[NumberOfShareholders2["TenOrMore"] = 10] = "TenOrMore";
|
|
82155
|
+
})(NumberOfShareholders || (NumberOfShareholders = {}));
|
|
82156
|
+
NumberOfShareholdersLabel = {
|
|
82157
|
+
[NumberOfShareholders.One]: "1",
|
|
82158
|
+
[NumberOfShareholders.Two]: "2",
|
|
82159
|
+
[NumberOfShareholders.Three]: "3",
|
|
82160
|
+
[NumberOfShareholders.Four]: "4",
|
|
82161
|
+
[NumberOfShareholders.Five]: "5",
|
|
82162
|
+
[NumberOfShareholders.Six]: "6",
|
|
82163
|
+
[NumberOfShareholders.Seven]: "7",
|
|
82164
|
+
[NumberOfShareholders.Eight]: "8",
|
|
82165
|
+
[NumberOfShareholders.Nine]: "9",
|
|
82166
|
+
[NumberOfShareholders.TenOrMore]: "10+"
|
|
82167
|
+
};
|
|
82108
82168
|
(function(SignatoryRole4) {
|
|
82109
82169
|
SignatoryRole4[SignatoryRole4["Director"] = 1] = "Director";
|
|
82110
82170
|
SignatoryRole4[SignatoryRole4["AuthorizedOfficer"] = 2] = "AuthorizedOfficer";
|
|
@@ -82478,9 +82538,9 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
82478
82538
|
dynamicLabel: (form, t) => {
|
|
82479
82539
|
const id = form.get(FederalFormationFormControl.Contact)?.value;
|
|
82480
82540
|
const contact = contacts.find((contact2) => contact2._id === id);
|
|
82481
|
-
const email = contact?.
|
|
82482
|
-
const phone = contact?.
|
|
82483
|
-
return
|
|
82541
|
+
const email = contact?.addresses[0]?.emails?.primary;
|
|
82542
|
+
const phone = contact?.addresses[0]?.contact_numbers?.primary;
|
|
82543
|
+
return `<span class="body-1-semibold">${t("Contact Details")}:</span> ${getContactDetailsPreview(email, phone, t)}`;
|
|
82484
82544
|
},
|
|
82485
82545
|
formControlName: "",
|
|
82486
82546
|
required: false,
|
|
@@ -83073,6 +83133,7 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
83073
83133
|
init_address_utils();
|
|
83074
83134
|
init_transform_utils();
|
|
83075
83135
|
init_app_enums();
|
|
83136
|
+
init_ontario_formation_form_constants();
|
|
83076
83137
|
FederalFormHelper = class _FederalFormHelper {
|
|
83077
83138
|
static generateConfig(task) {
|
|
83078
83139
|
const delta = task.deltaData;
|
|
@@ -83171,10 +83232,13 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
83171
83232
|
[FederalFormationFormControl.RestrictionsOnBusiness]: new FormControl({ value: task.entity._articles?.restrictions ?? "", disabled: true }),
|
|
83172
83233
|
[FederalFormationFormControl.OtherProvisions]: new FormControl({ value: task.entity._articles?.other_provisions ?? "", disabled: true })
|
|
83173
83234
|
});
|
|
83174
|
-
|
|
83175
|
-
|
|
83176
|
-
|
|
83177
|
-
|
|
83235
|
+
const registeredOfficeAddressConfig = this.generateAddressFormGroup(findRegisteredOfficeAddress(task));
|
|
83236
|
+
const registeredOfficeAddressForm = new FormGroup(__spreadValues({}, registeredOfficeAddressConfig));
|
|
83237
|
+
const affiliationType = registeredOfficeAddressConfig[FormationFormControls.AffiliationAddressType].value;
|
|
83238
|
+
updateFormControlsEnableState(registeredOfficeAddressForm, addressEnabledFieldsMap[affiliationType]);
|
|
83239
|
+
config2[FederalFormationFormGroups.RegisteredOfficeAddress] = registeredOfficeAddressForm;
|
|
83240
|
+
registeredOfficeAddressForm.addControl(FederalFormationFormControl.UseDifferentMailingAddress, new FormControl(delta?.registeredOfficeAddress?.useDifferentAddressForCorrespondence ?? false));
|
|
83241
|
+
registeredOfficeAddressForm.addControl(FederalFormationFormControl.MailingAddress, new FormControl(delta?.registeredOfficeAddress?.mailingAddressForCorrespondenceUid ?? null, requiredIfValue(FederalFormationFormControl.UseDifferentMailingAddress, true)));
|
|
83178
83242
|
const invitedDirectorIds = Object.entries(delta?.directors ?? {}).filter(([, d]) => d.inviteForFullAccessManager).map(([id]) => id);
|
|
83179
83243
|
config2[FederalFormationFormGroups.InviteDirectorToBeFullAccessManager] = new FormGroup({
|
|
83180
83244
|
[FederalFormationFormControl.InvitedDirectors]: new FormControl(invitedDirectorIds),
|
|
@@ -83195,7 +83259,7 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
83195
83259
|
return new FormGroup(__spreadValues({
|
|
83196
83260
|
[FormationFormControls.AffiliationName]: new FormControl({ value: name, disabled: true }),
|
|
83197
83261
|
[FormationFormControls.Id]: new FormControl({ value: id, disabled: true }),
|
|
83198
|
-
[FederalFormationFormControl.AddressForService]: new FormControl("", Validators.required),
|
|
83262
|
+
[FederalFormationFormControl.AddressForService]: new FormControl(deltaData?.addressForService ?? "", Validators.required),
|
|
83199
83263
|
[FederalFormationFormControl.DateOfBirth]: new FormControl(isc.participant._profile.date_of_birth, Validators.required),
|
|
83200
83264
|
[FederalFormationFormControl.CountriesOfCitizenship]: new FormControl(countriesOfCitizenship),
|
|
83201
83265
|
[FederalFormationFormControl.CountriesOfResidence]: new FormControl(countriesOfResidence),
|
|
@@ -84204,6 +84268,227 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
84204
84268
|
}
|
|
84205
84269
|
});
|
|
84206
84270
|
|
|
84271
|
+
// src/app/enums/federal-update-maintain.enum.ts
|
|
84272
|
+
var FederalUpdateMaintainFormGroups, FederalUpdateMaintainFormControl;
|
|
84273
|
+
var init_federal_update_maintain_enum = __esm({
|
|
84274
|
+
"src/app/enums/federal-update-maintain.enum.ts"() {
|
|
84275
|
+
(function(FederalUpdateMaintainFormGroups2) {
|
|
84276
|
+
FederalUpdateMaintainFormGroups2["CorporationDetails"] = "Corporation Details";
|
|
84277
|
+
FederalUpdateMaintainFormGroups2["Directors"] = "Directors";
|
|
84278
|
+
FederalUpdateMaintainFormGroups2["AnnualReturn"] = "Annual Return";
|
|
84279
|
+
FederalUpdateMaintainFormGroups2["SignificantControl"] = "Significant Control";
|
|
84280
|
+
FederalUpdateMaintainFormGroups2["IndividualsWithSignificantControl"] = "Individuals With Significant Control";
|
|
84281
|
+
FederalUpdateMaintainFormGroups2["Contact"] = "Contact";
|
|
84282
|
+
})(FederalUpdateMaintainFormGroups || (FederalUpdateMaintainFormGroups = {}));
|
|
84283
|
+
(function(FederalUpdateMaintainFormControl2) {
|
|
84284
|
+
FederalUpdateMaintainFormControl2["CorporationName"] = "corporationName";
|
|
84285
|
+
FederalUpdateMaintainFormControl2["BusinessNumber"] = "businessNumber";
|
|
84286
|
+
FederalUpdateMaintainFormControl2["RegisteredOfficeAddress"] = "registeredOfficeAddress";
|
|
84287
|
+
FederalUpdateMaintainFormControl2["AnniversaryDate"] = "anniversaryDate";
|
|
84288
|
+
FederalUpdateMaintainFormControl2["YearOfFiling"] = "yearOfFiling";
|
|
84289
|
+
FederalUpdateMaintainFormControl2["AnnualMeetingDate"] = "annualMeetingDate";
|
|
84290
|
+
FederalUpdateMaintainFormControl2["CorporationType"] = "corporationType";
|
|
84291
|
+
FederalUpdateMaintainFormControl2["NumberOfShareholders"] = "numberOfShareholders";
|
|
84292
|
+
FederalUpdateMaintainFormControl2["AddressPreview"] = "addressPreview";
|
|
84293
|
+
})(FederalUpdateMaintainFormControl || (FederalUpdateMaintainFormControl = {}));
|
|
84294
|
+
}
|
|
84295
|
+
});
|
|
84296
|
+
|
|
84297
|
+
// src/app/constants/federal-update-maintain-form.constants.ts
|
|
84298
|
+
var FEDERAL_UPDATE_MAINTAIN_CORPORATION_TYPE_OPTIONS, FEDERAL_UPDATE_MAINTAIN_NUMBER_OF_SHAREHOLDERS_OPTIONS, FEDERAL_UPDATE_MAINTAIN_CORPORATION_DETAILS_FIELDS, FEDERAL_UPDATE_MAINTAIN_DIRECTORS_FIELDS, FEDERAL_UPDATE_MAINTAIN_ANNUAL_RETURN_FIELDS, FEDERAL_UPDATE_MAINTAIN_SIGNIFICANT_CONTROL_FIELDS, FEDERAL_UPDATE_MAINTAIN_INDIVIDUALS_WITH_SIGNIFICANT_CONTROL_FIELDS, FEDERAL_UPDATE_MAINTAIN_CONTACT_FIELDS;
|
|
84299
|
+
var init_federal_update_maintain_form_constants = __esm({
|
|
84300
|
+
"src/app/constants/federal-update-maintain-form.constants.ts"() {
|
|
84301
|
+
init_form_enums();
|
|
84302
|
+
init_federal_update_maintain_enum();
|
|
84303
|
+
init_FederalConstants();
|
|
84304
|
+
init_federal_formation_form_contants();
|
|
84305
|
+
FEDERAL_UPDATE_MAINTAIN_CORPORATION_TYPE_OPTIONS = Object.values(CorporationType).filter((v) => typeof v === "number").map((v) => ({ value: v, label: CorporationTypeLabel[v] }));
|
|
84306
|
+
FEDERAL_UPDATE_MAINTAIN_NUMBER_OF_SHAREHOLDERS_OPTIONS = Object.values(NumberOfShareholders).filter((v) => typeof v === "number").map((v) => ({ value: v, label: NumberOfShareholdersLabel[v] }));
|
|
84307
|
+
FEDERAL_UPDATE_MAINTAIN_CORPORATION_DETAILS_FIELDS = [
|
|
84308
|
+
{
|
|
84309
|
+
type: FormType.Text,
|
|
84310
|
+
formControlName: "",
|
|
84311
|
+
class: "span-12",
|
|
84312
|
+
dynamicLabel: (form) => `<span class="body-1-semibold">Corporate name:</span> ${form.get(FederalUpdateMaintainFormControl.CorporationName)?.value ?? ""}`
|
|
84313
|
+
},
|
|
84314
|
+
{
|
|
84315
|
+
type: FormType.Text,
|
|
84316
|
+
formControlName: "",
|
|
84317
|
+
class: "span-12",
|
|
84318
|
+
dynamicLabel: (form) => `<span class="body-1-semibold">Business Number:</span> ${form.get(FederalUpdateMaintainFormControl.BusinessNumber)?.value ?? ""}`
|
|
84319
|
+
},
|
|
84320
|
+
{
|
|
84321
|
+
type: FormType.Text,
|
|
84322
|
+
formControlName: "",
|
|
84323
|
+
class: "span-12",
|
|
84324
|
+
dynamicLabel: (form) => `<span class="body-1-semibold">Registered Office Address:</span> ${form.get(FederalUpdateMaintainFormControl.RegisteredOfficeAddress)?.value ?? ""}`
|
|
84325
|
+
}
|
|
84326
|
+
];
|
|
84327
|
+
FEDERAL_UPDATE_MAINTAIN_DIRECTORS_FIELDS = [
|
|
84328
|
+
{
|
|
84329
|
+
type: FormType.Text,
|
|
84330
|
+
formControlName: "",
|
|
84331
|
+
class: "span-12",
|
|
84332
|
+
dynamicLabel: (form) => `<span class="body-1-semibold">Address:</span> ${form.get(FederalUpdateMaintainFormControl.AddressPreview)?.value ?? ""}`
|
|
84333
|
+
}
|
|
84334
|
+
];
|
|
84335
|
+
FEDERAL_UPDATE_MAINTAIN_ANNUAL_RETURN_FIELDS = [
|
|
84336
|
+
{
|
|
84337
|
+
type: FormType.Text,
|
|
84338
|
+
formControlName: "",
|
|
84339
|
+
class: "span-12",
|
|
84340
|
+
dynamicLabel: (form) => `<span class="body-1-semibold">Anniversary Date:</span> ${form.get(FederalUpdateMaintainFormControl.AnniversaryDate)?.value ?? ""}`
|
|
84341
|
+
},
|
|
84342
|
+
{
|
|
84343
|
+
type: FormType.Text,
|
|
84344
|
+
formControlName: "",
|
|
84345
|
+
class: "span-12",
|
|
84346
|
+
dynamicLabel: (form) => `<span class="body-1-semibold">Year of Filing:</span> ${form.get(FederalUpdateMaintainFormControl.YearOfFiling)?.value ?? ""}`
|
|
84347
|
+
},
|
|
84348
|
+
{
|
|
84349
|
+
type: FormType.Text,
|
|
84350
|
+
formControlName: "",
|
|
84351
|
+
class: "span-12",
|
|
84352
|
+
dynamicLabel: (form) => `<span class="body-1-semibold">Annual Meeting:</span> ${form.get(FederalUpdateMaintainFormControl.AnnualMeetingDate)?.value ?? ""}`
|
|
84353
|
+
},
|
|
84354
|
+
{
|
|
84355
|
+
type: FormType.Select,
|
|
84356
|
+
label: "Type of Corporation",
|
|
84357
|
+
formControlName: FederalUpdateMaintainFormControl.CorporationType,
|
|
84358
|
+
options: FEDERAL_UPDATE_MAINTAIN_CORPORATION_TYPE_OPTIONS,
|
|
84359
|
+
required: true,
|
|
84360
|
+
class: "span-6"
|
|
84361
|
+
},
|
|
84362
|
+
{
|
|
84363
|
+
type: FormType.Select,
|
|
84364
|
+
label: "Number of Shareholders",
|
|
84365
|
+
formControlName: FederalUpdateMaintainFormControl.NumberOfShareholders,
|
|
84366
|
+
options: FEDERAL_UPDATE_MAINTAIN_NUMBER_OF_SHAREHOLDERS_OPTIONS,
|
|
84367
|
+
required: true,
|
|
84368
|
+
class: "span-6"
|
|
84369
|
+
}
|
|
84370
|
+
];
|
|
84371
|
+
FEDERAL_UPDATE_MAINTAIN_SIGNIFICANT_CONTROL_FIELDS = FEDERAL_FORMATION_FORM_SIGNIFICANT_CONTROL;
|
|
84372
|
+
FEDERAL_UPDATE_MAINTAIN_INDIVIDUALS_WITH_SIGNIFICANT_CONTROL_FIELDS = federalFormationFormIndividualsWithSignificantControl;
|
|
84373
|
+
FEDERAL_UPDATE_MAINTAIN_CONTACT_FIELDS = generateFederalFormationFormContactControl;
|
|
84374
|
+
}
|
|
84375
|
+
});
|
|
84376
|
+
|
|
84377
|
+
// src/app/helpers/federal-update-maintain.helper.ts
|
|
84378
|
+
var FederalUpdateMaintainFormHelper;
|
|
84379
|
+
var init_federal_update_maintain_helper = __esm({
|
|
84380
|
+
"src/app/helpers/federal-update-maintain.helper.ts"() {
|
|
84381
|
+
init_forms();
|
|
84382
|
+
init_common_utils();
|
|
84383
|
+
init_form_enums();
|
|
84384
|
+
init_federal_update_maintain_enum();
|
|
84385
|
+
init_federal_form_enum();
|
|
84386
|
+
init_FederalConstants();
|
|
84387
|
+
init_custom_validators();
|
|
84388
|
+
init_federal_form_helper();
|
|
84389
|
+
FederalUpdateMaintainFormHelper = class _FederalUpdateMaintainFormHelper {
|
|
84390
|
+
static generateConfig(task) {
|
|
84391
|
+
const delta = task.deltaData;
|
|
84392
|
+
const config2 = {};
|
|
84393
|
+
const regOfficeAddress = _FederalUpdateMaintainFormHelper.findRegisteredOfficeAddressDisplay(task);
|
|
84394
|
+
config2[FederalUpdateMaintainFormGroups.CorporationDetails] = new FormGroup({
|
|
84395
|
+
[FederalUpdateMaintainFormControl.CorporationName]: new FormControl({
|
|
84396
|
+
value: task.entity._profile?.name ?? "",
|
|
84397
|
+
disabled: true
|
|
84398
|
+
}),
|
|
84399
|
+
[FederalUpdateMaintainFormControl.BusinessNumber]: new FormControl({
|
|
84400
|
+
value: task.entity._profile?.taxID_number ?? "",
|
|
84401
|
+
disabled: true
|
|
84402
|
+
}),
|
|
84403
|
+
[FederalUpdateMaintainFormControl.RegisteredOfficeAddress]: new FormControl({
|
|
84404
|
+
value: regOfficeAddress,
|
|
84405
|
+
disabled: true
|
|
84406
|
+
})
|
|
84407
|
+
});
|
|
84408
|
+
const directors = (task.entity.affiliations ?? []).filter((a) => isPrincipalAffiliation2(a) && a.role?.role_name === "Director");
|
|
84409
|
+
config2[FederalUpdateMaintainFormGroups.Directors] = new FormArray(directors.map((director) => {
|
|
84410
|
+
const person = director.participant;
|
|
84411
|
+
const name = getPersonName(person);
|
|
84412
|
+
const address = director.addresses?.[0] || director.parent_affiliation?.addresses?.[0];
|
|
84413
|
+
const display = `${address?.display?.line1 ?? ""}${address?.display?.line2 ?? ""}`.trim();
|
|
84414
|
+
return new FormGroup({
|
|
84415
|
+
[FormationFormControls.Id]: new FormControl({ value: director._id, disabled: true }),
|
|
84416
|
+
[FormationFormControls.AffiliationName]: new FormControl({ value: name, disabled: true }),
|
|
84417
|
+
[FederalUpdateMaintainFormControl.AddressPreview]: new FormControl({
|
|
84418
|
+
value: display,
|
|
84419
|
+
disabled: true
|
|
84420
|
+
})
|
|
84421
|
+
});
|
|
84422
|
+
}));
|
|
84423
|
+
const yearOfFiling = _FederalUpdateMaintainFormHelper.getYearOfFiling(task);
|
|
84424
|
+
const anniversary = _FederalUpdateMaintainFormHelper.getAnniversaryDate(task);
|
|
84425
|
+
const annualMeeting = task?._ext?._agm_date ?? "";
|
|
84426
|
+
config2[FederalUpdateMaintainFormGroups.AnnualReturn] = new FormGroup({
|
|
84427
|
+
[FederalUpdateMaintainFormControl.AnniversaryDate]: new FormControl({ value: anniversary, disabled: true }),
|
|
84428
|
+
[FederalUpdateMaintainFormControl.YearOfFiling]: new FormControl({ value: yearOfFiling, disabled: true }),
|
|
84429
|
+
[FederalUpdateMaintainFormControl.AnnualMeetingDate]: new FormControl({ value: annualMeeting, disabled: true }),
|
|
84430
|
+
[FederalUpdateMaintainFormControl.CorporationType]: new FormControl(delta?.corporationType ?? null, Validators.required),
|
|
84431
|
+
[FederalUpdateMaintainFormControl.NumberOfShareholders]: new FormControl(delta?.numberOfShareholders ?? null, Validators.required)
|
|
84432
|
+
});
|
|
84433
|
+
config2[FederalUpdateMaintainFormGroups.SignificantControl] = new FormGroup({
|
|
84434
|
+
[FederalFormationFormControl.SignificantControlType]: new FormControl(delta?.individualsWithSignificantControl?.type ?? null, Validators.required),
|
|
84435
|
+
[FederalFormationFormControl.ExclusionReason]: new FormControl(delta?.individualsWithSignificantControl?.exclusionReason ?? null, requiredIfValue(FederalFormationFormControl.SignificantControlType, ISCOptions.Excluded))
|
|
84436
|
+
});
|
|
84437
|
+
const iscIndividuals = delta?.individualsWithSignificantControl?.individuals ?? [];
|
|
84438
|
+
const iscGroups = iscIndividuals.map((individualDelta) => {
|
|
84439
|
+
const affiliation = (task.entity.affiliations ?? []).find((a) => a._id === individualDelta.affiliationId);
|
|
84440
|
+
if (!affiliation)
|
|
84441
|
+
return null;
|
|
84442
|
+
return FederalFormHelper.generateIndividualWithSignificantForms(affiliation, individualDelta);
|
|
84443
|
+
}).filter((g) => g !== null);
|
|
84444
|
+
config2[FederalUpdateMaintainFormGroups.IndividualsWithSignificantControl] = new FormArray(iscGroups);
|
|
84445
|
+
config2[FederalUpdateMaintainFormGroups.Contact] = new FormGroup({
|
|
84446
|
+
[FederalFormationFormControl.Contact]: new FormControl(delta?.contactUid ?? null, Validators.required)
|
|
84447
|
+
});
|
|
84448
|
+
return config2;
|
|
84449
|
+
}
|
|
84450
|
+
static getYearOfFiling(task) {
|
|
84451
|
+
const due = task?._due_date;
|
|
84452
|
+
const d = due ? new Date(due) : /* @__PURE__ */ new Date();
|
|
84453
|
+
return String(d.getFullYear());
|
|
84454
|
+
}
|
|
84455
|
+
static getAnniversaryDate(task) {
|
|
84456
|
+
const inc = task.entity?._compliance?.incorporation_date;
|
|
84457
|
+
if (!inc)
|
|
84458
|
+
return "";
|
|
84459
|
+
const parts = inc.split("-");
|
|
84460
|
+
if (parts.length >= 3) {
|
|
84461
|
+
return `${parts[1]}-${parts[2]}`;
|
|
84462
|
+
}
|
|
84463
|
+
return inc;
|
|
84464
|
+
}
|
|
84465
|
+
static findRegisteredOfficeAddressDisplay(task) {
|
|
84466
|
+
const registeredOffice = (task.entity.affiliations ?? []).find((aff) => aff.kind === "EntityAffiliationV3" && aff.role?.role_name === "Shared Address" && aff.role?.static_title === "Registered Office");
|
|
84467
|
+
const address = registeredOffice?.addresses?.[0] || registeredOffice?.parent_affiliation?.addresses?.[0];
|
|
84468
|
+
const line1 = address?.display?.line1 ?? "";
|
|
84469
|
+
const line2 = address?.display?.line2 ?? "";
|
|
84470
|
+
return `${line1}${line2}`.trim();
|
|
84471
|
+
}
|
|
84472
|
+
/** Utility: returns a map of ISC affiliation id -> address options for Address For Service. */
|
|
84473
|
+
static generateISCAddressesMap(affiliations) {
|
|
84474
|
+
const map2 = /* @__PURE__ */ new Map();
|
|
84475
|
+
const individuals = getIndividualWithSignificantControl(affiliations);
|
|
84476
|
+
for (const individual of individuals) {
|
|
84477
|
+
const options = [
|
|
84478
|
+
...individual.addresses ?? [],
|
|
84479
|
+
...individual.parent_affiliation?.addresses ?? []
|
|
84480
|
+
].map((address) => ({
|
|
84481
|
+
value: address.uid,
|
|
84482
|
+
label: `${address.display?.line1 ?? ""}${address.display?.line2 ?? ""}`.trim()
|
|
84483
|
+
}));
|
|
84484
|
+
map2.set(individual._id, options);
|
|
84485
|
+
}
|
|
84486
|
+
return map2;
|
|
84487
|
+
}
|
|
84488
|
+
};
|
|
84489
|
+
}
|
|
84490
|
+
});
|
|
84491
|
+
|
|
84207
84492
|
// src/app/components/federal/update-maintain/update-maintain-form/update-maintain-form.component.ts
|
|
84208
84493
|
function FederalUpdateMaintainFormComponent_Conditional_1_Template(rf, ctx) {
|
|
84209
84494
|
if (rf & 1) {
|
|
@@ -84223,12 +84508,140 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
84223
84508
|
\u0275\u0275property("content", ctx_r0.errors());
|
|
84224
84509
|
}
|
|
84225
84510
|
}
|
|
84511
|
+
function FederalUpdateMaintainFormComponent_Conditional_5_Template(rf, ctx) {
|
|
84512
|
+
if (rf & 1) {
|
|
84513
|
+
\u0275\u0275elementStart(0, "expandable-card", 4);
|
|
84514
|
+
\u0275\u0275element(1, "filing-form-group", 7);
|
|
84515
|
+
\u0275\u0275elementEnd();
|
|
84516
|
+
}
|
|
84517
|
+
if (rf & 2) {
|
|
84518
|
+
const ctx_r0 = \u0275\u0275nextContext();
|
|
84519
|
+
const corporationDetails_r2 = \u0275\u0275readContextLet(4);
|
|
84520
|
+
\u0275\u0275property("isValid", !corporationDetails_r2.invalid)("title", ctx_r0.groups.CorporationDetails);
|
|
84521
|
+
\u0275\u0275advance();
|
|
84522
|
+
\u0275\u0275property("isSubmitted", ctx_r0.isSubmitted())("form", corporationDetails_r2)("config", ctx_r0.corporationDetailsFields);
|
|
84523
|
+
}
|
|
84524
|
+
}
|
|
84525
|
+
function FederalUpdateMaintainFormComponent_Conditional_7_Template(rf, ctx) {
|
|
84526
|
+
if (rf & 1) {
|
|
84527
|
+
\u0275\u0275element(0, "expandable-list-card", 5);
|
|
84528
|
+
}
|
|
84529
|
+
if (rf & 2) {
|
|
84530
|
+
const ctx_r0 = \u0275\u0275nextContext();
|
|
84531
|
+
const directorsArray_r3 = \u0275\u0275readContextLet(6);
|
|
84532
|
+
\u0275\u0275property("isOpen", true)("isValid", directorsArray_r3.valid)("isSubmitted", ctx_r0.isSubmitted())("fields", ctx_r0.directorsFields)("formArray", directorsArray_r3)("labelKey", ctx_r0.controls.AffiliationName)("title", ctx_r0.groups.Directors);
|
|
84533
|
+
}
|
|
84534
|
+
}
|
|
84535
|
+
function FederalUpdateMaintainFormComponent_Conditional_9_Template(rf, ctx) {
|
|
84536
|
+
if (rf & 1) {
|
|
84537
|
+
\u0275\u0275elementStart(0, "expandable-card", 4);
|
|
84538
|
+
\u0275\u0275element(1, "filing-form-group", 7);
|
|
84539
|
+
\u0275\u0275elementEnd();
|
|
84540
|
+
}
|
|
84541
|
+
if (rf & 2) {
|
|
84542
|
+
const ctx_r0 = \u0275\u0275nextContext();
|
|
84543
|
+
const annualReturn_r4 = \u0275\u0275readContextLet(8);
|
|
84544
|
+
\u0275\u0275property("isValid", !annualReturn_r4.invalid)("title", ctx_r0.groups.AnnualReturn);
|
|
84545
|
+
\u0275\u0275advance();
|
|
84546
|
+
\u0275\u0275property("isSubmitted", ctx_r0.isSubmitted())("form", annualReturn_r4)("config", ctx_r0.annualReturnFields);
|
|
84547
|
+
}
|
|
84548
|
+
}
|
|
84549
|
+
function FederalUpdateMaintainFormComponent_Conditional_11_Conditional_1_Conditional_1_Template(rf, ctx) {
|
|
84550
|
+
if (rf & 1) {
|
|
84551
|
+
const _r6 = \u0275\u0275getCurrentView();
|
|
84552
|
+
\u0275\u0275elementStart(0, "button", 12);
|
|
84553
|
+
\u0275\u0275listener("click", function FederalUpdateMaintainFormComponent_Conditional_11_Conditional_1_Conditional_1_Template_button_click_0_listener() {
|
|
84554
|
+
\u0275\u0275restoreView(_r6);
|
|
84555
|
+
const ctx_r0 = \u0275\u0275nextContext(3);
|
|
84556
|
+
return \u0275\u0275resetView(ctx_r0.addIndividualWithSignificantControl());
|
|
84557
|
+
});
|
|
84558
|
+
\u0275\u0275elementStart(1, "span", 13);
|
|
84559
|
+
\u0275\u0275text(2);
|
|
84560
|
+
\u0275\u0275pipe(3, "translate");
|
|
84561
|
+
\u0275\u0275elementEnd()();
|
|
84562
|
+
}
|
|
84563
|
+
if (rf & 2) {
|
|
84564
|
+
const ctx_r0 = \u0275\u0275nextContext(3);
|
|
84565
|
+
\u0275\u0275property("disabled", ctx_r0.isAddIndividualWithSignificantControlDisabled());
|
|
84566
|
+
\u0275\u0275advance(2);
|
|
84567
|
+
\u0275\u0275textInterpolate(\u0275\u0275pipeBind1(3, 2, "Add Individuals With Significant Control"));
|
|
84568
|
+
}
|
|
84569
|
+
}
|
|
84570
|
+
function FederalUpdateMaintainFormComponent_Conditional_11_Conditional_1_Template(rf, ctx) {
|
|
84571
|
+
if (rf & 1) {
|
|
84572
|
+
const _r5 = \u0275\u0275getCurrentView();
|
|
84573
|
+
\u0275\u0275elementStart(0, "expandable-list-card", 9);
|
|
84574
|
+
\u0275\u0275listener("remove", function FederalUpdateMaintainFormComponent_Conditional_11_Conditional_1_Template_expandable_list_card_remove_0_listener($event) {
|
|
84575
|
+
\u0275\u0275restoreView(_r5);
|
|
84576
|
+
const ctx_r0 = \u0275\u0275nextContext(2);
|
|
84577
|
+
return \u0275\u0275resetView(ctx_r0.onRemoveIndividualWithSignificantForm($event));
|
|
84578
|
+
});
|
|
84579
|
+
\u0275\u0275template(1, FederalUpdateMaintainFormComponent_Conditional_11_Conditional_1_Conditional_1_Template, 4, 4, "button", 10);
|
|
84580
|
+
\u0275\u0275elementStart(2, "div", 11);
|
|
84581
|
+
\u0275\u0275element(3, "filing-form-group", 7);
|
|
84582
|
+
\u0275\u0275elementEnd()();
|
|
84583
|
+
}
|
|
84584
|
+
if (rf & 2) {
|
|
84585
|
+
\u0275\u0275nextContext();
|
|
84586
|
+
const individualsArray_r7 = \u0275\u0275readContextLet(0);
|
|
84587
|
+
const ctx_r0 = \u0275\u0275nextContext();
|
|
84588
|
+
const significantControl_r8 = \u0275\u0275readContextLet(10);
|
|
84589
|
+
\u0275\u0275property("isOpen", ctx_r0.isIndividualsWithSignificantControlOpen())("isValid", individualsArray_r7.valid && significantControl_r8.valid)("isSubmitted", ctx_r0.isSubmitted())("isStatusIcon", true)("removable", !ctx_r0.readonly())("fields", ctx_r0.individualsWithSignificantControlFields())("formArray", individualsArray_r7)("labelKey", ctx_r0.controls.AffiliationName)("title", ctx_r0.groups.IndividualsWithSignificantControl);
|
|
84590
|
+
\u0275\u0275advance();
|
|
84591
|
+
\u0275\u0275conditional(!ctx_r0.readonly() && ctx_r0.isAddIndividualWithSignificantControlAvailable() ? 1 : -1);
|
|
84592
|
+
\u0275\u0275advance(2);
|
|
84593
|
+
\u0275\u0275property("isSubmitted", ctx_r0.isSubmitted())("form", significantControl_r8)("config", ctx_r0.significantControlFields);
|
|
84594
|
+
}
|
|
84595
|
+
}
|
|
84596
|
+
function FederalUpdateMaintainFormComponent_Conditional_11_Template(rf, ctx) {
|
|
84597
|
+
if (rf & 1) {
|
|
84598
|
+
\u0275\u0275declareLet(0);
|
|
84599
|
+
\u0275\u0275template(1, FederalUpdateMaintainFormComponent_Conditional_11_Conditional_1_Template, 4, 13, "expandable-list-card", 8);
|
|
84600
|
+
}
|
|
84601
|
+
if (rf & 2) {
|
|
84602
|
+
const ctx_r0 = \u0275\u0275nextContext();
|
|
84603
|
+
const individualsArray_r9 = \u0275\u0275storeLet(ctx_r0.getFormArray(ctx_r0.groups.IndividualsWithSignificantControl));
|
|
84604
|
+
\u0275\u0275advance();
|
|
84605
|
+
\u0275\u0275conditional(individualsArray_r9 ? 1 : -1);
|
|
84606
|
+
}
|
|
84607
|
+
}
|
|
84608
|
+
function FederalUpdateMaintainFormComponent_Conditional_13_Template(rf, ctx) {
|
|
84609
|
+
if (rf & 1) {
|
|
84610
|
+
\u0275\u0275elementStart(0, "expandable-card", 6);
|
|
84611
|
+
\u0275\u0275element(1, "filing-form-group", 7);
|
|
84612
|
+
\u0275\u0275elementEnd();
|
|
84613
|
+
}
|
|
84614
|
+
if (rf & 2) {
|
|
84615
|
+
const ctx_r0 = \u0275\u0275nextContext();
|
|
84616
|
+
const contact_r10 = \u0275\u0275readContextLet(12);
|
|
84617
|
+
\u0275\u0275property("isStatusIcon", !ctx_r0.readonly())("isValid", !contact_r10.invalid)("title", ctx_r0.groups.Contact);
|
|
84618
|
+
\u0275\u0275advance();
|
|
84619
|
+
\u0275\u0275property("isSubmitted", ctx_r0.isSubmitted())("form", contact_r10)("config", ctx_r0.contactControl());
|
|
84620
|
+
}
|
|
84621
|
+
}
|
|
84226
84622
|
var FederalUpdateMaintainFormComponent;
|
|
84227
84623
|
var init_update_maintain_form_component2 = __esm({
|
|
84228
84624
|
"src/app/components/federal/update-maintain/update-maintain-form/update-maintain-form.component.ts"() {
|
|
84229
84625
|
init_core();
|
|
84626
|
+
init_forms();
|
|
84230
84627
|
init_alert_component();
|
|
84231
84628
|
init_alert_enum();
|
|
84629
|
+
init_federal_update_maintain_form_constants();
|
|
84630
|
+
init_federal_update_maintain_enum();
|
|
84631
|
+
init_expandable_card_component();
|
|
84632
|
+
init_expandable_list_card_component();
|
|
84633
|
+
init_filing_form_group_component();
|
|
84634
|
+
init_form_enums();
|
|
84635
|
+
init_common_utils();
|
|
84636
|
+
init_federal_update_maintain_helper();
|
|
84637
|
+
init_federal_form_enum();
|
|
84638
|
+
init_FederalConstants();
|
|
84639
|
+
init_button();
|
|
84640
|
+
init_ngx_translate_core();
|
|
84641
|
+
init_dialog2();
|
|
84642
|
+
init_select_modal_component();
|
|
84643
|
+
init_federal_form_helper();
|
|
84644
|
+
init_rxjs_interop();
|
|
84232
84645
|
init_core();
|
|
84233
84646
|
FederalUpdateMaintainFormComponent = class _FederalUpdateMaintainFormComponent {
|
|
84234
84647
|
form = input.required();
|
|
@@ -84237,35 +84650,296 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
84237
84650
|
isNote = input(false);
|
|
84238
84651
|
isSubmitted = input(false);
|
|
84239
84652
|
readonly = input(false);
|
|
84653
|
+
dialog = inject(MatDialog);
|
|
84654
|
+
cdr = inject(ChangeDetectorRef);
|
|
84655
|
+
dr = inject(DestroyRef);
|
|
84240
84656
|
alertType = AlertType;
|
|
84657
|
+
groups = FederalUpdateMaintainFormGroups;
|
|
84658
|
+
controls = FormationFormControls;
|
|
84659
|
+
federalControls = FederalFormationFormControl;
|
|
84660
|
+
iscOptions = ISCOptions;
|
|
84661
|
+
corporationDetailsFields = FEDERAL_UPDATE_MAINTAIN_CORPORATION_DETAILS_FIELDS;
|
|
84662
|
+
annualReturnFields = FEDERAL_UPDATE_MAINTAIN_ANNUAL_RETURN_FIELDS;
|
|
84663
|
+
directorsFields = FEDERAL_UPDATE_MAINTAIN_DIRECTORS_FIELDS;
|
|
84664
|
+
significantControlFields = FEDERAL_UPDATE_MAINTAIN_SIGNIFICANT_CONTROL_FIELDS;
|
|
84665
|
+
contactControl = signal([]);
|
|
84666
|
+
addressForServiceMap = signal(/* @__PURE__ */ new Map());
|
|
84667
|
+
individualsWithSignificantControlFields = computed(() => FEDERAL_UPDATE_MAINTAIN_INDIVIDUALS_WITH_SIGNIFICANT_CONTROL_FIELDS(this.addressForServiceMap()));
|
|
84668
|
+
/**
|
|
84669
|
+
* UX requirement: if total ISC count is <= 3 start expanded, otherwise start collapsed.
|
|
84670
|
+
* Use total available ISC affiliations (not only selected rows) to decide the initial open state.
|
|
84671
|
+
*/
|
|
84672
|
+
isIndividualsWithSignificantControlOpen = computed(() => {
|
|
84673
|
+
const task = this.task();
|
|
84674
|
+
if (!task)
|
|
84675
|
+
return true;
|
|
84676
|
+
return getIndividualWithSignificantControl(task.entity.affiliations).length <= 3;
|
|
84677
|
+
});
|
|
84678
|
+
selectedIndividualWithSignificant = signal([]);
|
|
84679
|
+
isListISC = signal(false);
|
|
84680
|
+
isAddIndividualWithSignificantControlAvailable = computed(() => {
|
|
84681
|
+
const task = this.task();
|
|
84682
|
+
const isListISC = this.isListISC();
|
|
84683
|
+
if (!task)
|
|
84684
|
+
return false;
|
|
84685
|
+
const individualWithSignificantControl = getIndividualWithSignificantControl(task.entity.affiliations);
|
|
84686
|
+
return Boolean(individualWithSignificantControl.length) && isListISC;
|
|
84687
|
+
});
|
|
84688
|
+
isAddIndividualWithSignificantControlDisabled = computed(() => {
|
|
84689
|
+
const task = this.task();
|
|
84690
|
+
if (!task)
|
|
84691
|
+
return false;
|
|
84692
|
+
const individualWithSignificantControl = getIndividualWithSignificantControl(task.entity.affiliations);
|
|
84693
|
+
return individualWithSignificantControl.length === this.selectedIndividualWithSignificant().length;
|
|
84694
|
+
});
|
|
84695
|
+
constructor() {
|
|
84696
|
+
effect(() => {
|
|
84697
|
+
const task = this.task();
|
|
84698
|
+
if (!task)
|
|
84699
|
+
return;
|
|
84700
|
+
const contacts = task.entity.affiliations.filter((a) => a.role?.role_name === "Contact");
|
|
84701
|
+
this.contactControl.set(FEDERAL_UPDATE_MAINTAIN_CONTACT_FIELDS(contacts));
|
|
84702
|
+
this.addressForServiceMap.set(FederalUpdateMaintainFormHelper.generateISCAddressesMap(task.entity.affiliations));
|
|
84703
|
+
});
|
|
84704
|
+
effect(() => {
|
|
84705
|
+
const form = this.form();
|
|
84706
|
+
if (!form)
|
|
84707
|
+
return;
|
|
84708
|
+
const iscFormArray = this.getFormArray(FederalUpdateMaintainFormGroups.IndividualsWithSignificantControl);
|
|
84709
|
+
const selected = (iscFormArray?.getRawValue?.() ?? []).map((i) => i[this.controls.AffiliationName]) ?? [];
|
|
84710
|
+
this.selectedIndividualWithSignificant.set(selected);
|
|
84711
|
+
const sigControl = this.getFormGroup(FederalUpdateMaintainFormGroups.SignificantControl);
|
|
84712
|
+
this.isListISC.set(sigControl?.get(this.federalControls.SignificantControlType)?.value === ISCOptions.ListISC);
|
|
84713
|
+
form.valueChanges.pipe(takeUntilDestroyed(this.dr)).subscribe(() => {
|
|
84714
|
+
const sig = this.getFormGroup(FederalUpdateMaintainFormGroups.SignificantControl);
|
|
84715
|
+
this.isListISC.set(sig?.get(this.federalControls.SignificantControlType)?.value === ISCOptions.ListISC);
|
|
84716
|
+
});
|
|
84717
|
+
});
|
|
84718
|
+
}
|
|
84719
|
+
addIndividualWithSignificantControl() {
|
|
84720
|
+
const task = this.task();
|
|
84721
|
+
if (!task)
|
|
84722
|
+
return;
|
|
84723
|
+
const alreadySelected = new Set(this.selectedIndividualWithSignificant());
|
|
84724
|
+
const individualWithSignificantControl = getIndividualWithSignificantControl(task.entity.affiliations);
|
|
84725
|
+
const available = [];
|
|
84726
|
+
const itemsMap = /* @__PURE__ */ new Map();
|
|
84727
|
+
for (const individual of individualWithSignificantControl) {
|
|
84728
|
+
const name = getPersonName(individual.participant);
|
|
84729
|
+
if (!alreadySelected.has(name)) {
|
|
84730
|
+
available.push(name);
|
|
84731
|
+
itemsMap.set(name, individual);
|
|
84732
|
+
}
|
|
84733
|
+
}
|
|
84734
|
+
const data = {
|
|
84735
|
+
items: available,
|
|
84736
|
+
title: "Select Individuals",
|
|
84737
|
+
submitButton: "Add Individuals"
|
|
84738
|
+
};
|
|
84739
|
+
this.dialog.open(SelectModalComponent, {
|
|
84740
|
+
data,
|
|
84741
|
+
panelClass: ["zero-padding-modal"],
|
|
84742
|
+
width: "560px"
|
|
84743
|
+
}).afterClosed().subscribe((selected) => {
|
|
84744
|
+
if (selected?.length) {
|
|
84745
|
+
this.selectedIndividualWithSignificant.update((value) => [
|
|
84746
|
+
...value,
|
|
84747
|
+
...selected
|
|
84748
|
+
]);
|
|
84749
|
+
selected.forEach((name) => {
|
|
84750
|
+
this.onAddIndividualWithSignificantForm(itemsMap.get(name));
|
|
84751
|
+
});
|
|
84752
|
+
}
|
|
84753
|
+
});
|
|
84754
|
+
}
|
|
84755
|
+
onAddIndividualWithSignificantForm(affiliation) {
|
|
84756
|
+
const formArray = this.getFormArray(FederalUpdateMaintainFormGroups.IndividualsWithSignificantControl);
|
|
84757
|
+
formArray.push(FederalFormHelper.generateIndividualWithSignificantForms(affiliation));
|
|
84758
|
+
this.cdr.detectChanges();
|
|
84759
|
+
}
|
|
84760
|
+
onRemoveIndividualWithSignificantForm(index) {
|
|
84761
|
+
const formArray = this.getFormArray(FederalUpdateMaintainFormGroups.IndividualsWithSignificantControl);
|
|
84762
|
+
const row = formArray.controls[index];
|
|
84763
|
+
const affiliationName = row.getRawValue()[this.controls.AffiliationName];
|
|
84764
|
+
this.selectedIndividualWithSignificant.update((items) => items.filter((i) => i !== affiliationName));
|
|
84765
|
+
formArray.removeAt(index);
|
|
84766
|
+
}
|
|
84767
|
+
getFormGroup(key) {
|
|
84768
|
+
return this.form().get(key);
|
|
84769
|
+
}
|
|
84770
|
+
getFormArray(key) {
|
|
84771
|
+
return this.form().get(key);
|
|
84772
|
+
}
|
|
84241
84773
|
static \u0275fac = function FederalUpdateMaintainFormComponent_Factory(__ngFactoryType__) {
|
|
84242
84774
|
return new (__ngFactoryType__ || _FederalUpdateMaintainFormComponent)();
|
|
84243
84775
|
};
|
|
84244
|
-
static \u0275cmp = /* @__PURE__ */ \u0275\u0275defineComponent({ type: _FederalUpdateMaintainFormComponent, selectors: [["federal-update-maintain-form"]], inputs: { form: [1, "form"], task: [1, "task"], errors: [1, "errors"], isNote: [1, "isNote"], isSubmitted: [1, "isSubmitted"], readonly: [1, "readonly"] }, decls:
|
|
84776
|
+
static \u0275cmp = /* @__PURE__ */ \u0275\u0275defineComponent({ type: _FederalUpdateMaintainFormComponent, selectors: [["federal-update-maintain-form"]], inputs: { form: [1, "form"], task: [1, "task"], errors: [1, "errors"], isNote: [1, "isNote"], isSubmitted: [1, "isSubmitted"], readonly: [1, "readonly"] }, decls: 14, vars: 12, consts: [[1, "federal-update-maintain-form"], ["title", "Entity changed", "content", "A new draft needs to be generated as the Entity was changed since the last draft was produced.", 3, "type"], ["title", "The following issues need to be resolved before proceeding:", 3, "content"], [1, "federal-update-maintain-form-content"], [3, "isValid", "title"], [3, "isOpen", "isValid", "isSubmitted", "fields", "formArray", "labelKey", "title"], [3, "isStatusIcon", "isValid", "title"], [3, "isSubmitted", "form", "config"], [3, "isOpen", "isValid", "isSubmitted", "isStatusIcon", "removable", "fields", "formArray", "labelKey", "title"], [3, "remove", "isOpen", "isValid", "isSubmitted", "isStatusIcon", "removable", "fields", "formArray", "labelKey", "title"], ["slot", "subtitle", "mat-stroked-button", "", "mat-button", "", 3, "disabled"], ["slot", "header-content", 1, "card-header-content"], ["slot", "subtitle", "mat-stroked-button", "", "mat-button", "", 3, "click", "disabled"], [1, "body-1-semibold"]], template: function FederalUpdateMaintainFormComponent_Template(rf, ctx) {
|
|
84245
84777
|
if (rf & 1) {
|
|
84246
84778
|
\u0275\u0275elementStart(0, "div", 0);
|
|
84247
84779
|
\u0275\u0275template(1, FederalUpdateMaintainFormComponent_Conditional_1_Template, 1, 1, "alert", 1)(2, FederalUpdateMaintainFormComponent_Conditional_2_Template, 1, 1, "alert", 2);
|
|
84248
|
-
\u0275\
|
|
84249
|
-
\u0275\
|
|
84780
|
+
\u0275\u0275elementStart(3, "div", 3);
|
|
84781
|
+
\u0275\u0275declareLet(4);
|
|
84782
|
+
\u0275\u0275template(5, FederalUpdateMaintainFormComponent_Conditional_5_Template, 2, 5, "expandable-card", 4);
|
|
84783
|
+
\u0275\u0275declareLet(6);
|
|
84784
|
+
\u0275\u0275template(7, FederalUpdateMaintainFormComponent_Conditional_7_Template, 1, 7, "expandable-list-card", 5);
|
|
84785
|
+
\u0275\u0275declareLet(8);
|
|
84786
|
+
\u0275\u0275template(9, FederalUpdateMaintainFormComponent_Conditional_9_Template, 2, 5, "expandable-card", 4);
|
|
84787
|
+
\u0275\u0275declareLet(10);
|
|
84788
|
+
\u0275\u0275template(11, FederalUpdateMaintainFormComponent_Conditional_11_Template, 2, 2);
|
|
84789
|
+
\u0275\u0275declareLet(12);
|
|
84790
|
+
\u0275\u0275template(13, FederalUpdateMaintainFormComponent_Conditional_13_Template, 2, 6, "expandable-card", 6);
|
|
84791
|
+
\u0275\u0275elementEnd()();
|
|
84250
84792
|
}
|
|
84251
84793
|
if (rf & 2) {
|
|
84252
84794
|
\u0275\u0275advance();
|
|
84253
84795
|
\u0275\u0275conditional(ctx.isNote() ? 1 : -1);
|
|
84254
84796
|
\u0275\u0275advance();
|
|
84255
84797
|
\u0275\u0275conditional(ctx.errors().length ? 2 : -1);
|
|
84798
|
+
\u0275\u0275advance(2);
|
|
84799
|
+
const corporationDetails_r11 = \u0275\u0275storeLet(ctx.getFormGroup(ctx.groups.CorporationDetails));
|
|
84800
|
+
\u0275\u0275advance();
|
|
84801
|
+
\u0275\u0275conditional(corporationDetails_r11 ? 5 : -1);
|
|
84802
|
+
\u0275\u0275advance();
|
|
84803
|
+
const directorsArray_r12 = \u0275\u0275storeLet(ctx.getFormArray(ctx.groups.Directors));
|
|
84804
|
+
\u0275\u0275advance();
|
|
84805
|
+
\u0275\u0275conditional(directorsArray_r12 ? 7 : -1);
|
|
84806
|
+
\u0275\u0275advance();
|
|
84807
|
+
const annualReturn_r13 = \u0275\u0275storeLet(ctx.getFormGroup(ctx.groups.AnnualReturn));
|
|
84808
|
+
\u0275\u0275advance();
|
|
84809
|
+
\u0275\u0275conditional(annualReturn_r13 ? 9 : -1);
|
|
84810
|
+
\u0275\u0275advance();
|
|
84811
|
+
const significantControl_r14 = \u0275\u0275storeLet(ctx.getFormGroup(ctx.groups.SignificantControl));
|
|
84812
|
+
\u0275\u0275advance();
|
|
84813
|
+
\u0275\u0275conditional(significantControl_r14 ? 11 : -1);
|
|
84814
|
+
\u0275\u0275advance();
|
|
84815
|
+
const contact_r15 = \u0275\u0275storeLet(ctx.getFormGroup(ctx.groups.Contact));
|
|
84816
|
+
\u0275\u0275advance();
|
|
84817
|
+
\u0275\u0275conditional(contact_r15 ? 13 : -1);
|
|
84256
84818
|
}
|
|
84257
|
-
}, dependencies: [
|
|
84819
|
+
}, dependencies: [
|
|
84820
|
+
AlertComponent,
|
|
84821
|
+
ExpandableCardComponent,
|
|
84822
|
+
ExpandableListCardComponent,
|
|
84823
|
+
FilingFormGroupComponent,
|
|
84824
|
+
ReactiveFormsModule,
|
|
84825
|
+
MatButton,
|
|
84826
|
+
TranslatePipe
|
|
84827
|
+
], styles: ["\n\n[_nghost-%COMP%] .federal-update-maintain-form[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n gap: 16px;\n height: 100%;\n overflow-y: auto;\n}\n[_nghost-%COMP%] .federal-update-maintain-form-content[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n gap: 24px;\n}\n[_nghost-%COMP%] .card-header-content[_ngcontent-%COMP%] {\n padding: 0 16px;\n}\n/*# sourceMappingURL=update-maintain-form.component.css.map */"], changeDetection: 0 });
|
|
84258
84828
|
};
|
|
84259
84829
|
(() => {
|
|
84260
84830
|
(typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(FederalUpdateMaintainFormComponent, [{
|
|
84261
84831
|
type: Component,
|
|
84262
84832
|
args: [{ standalone: true, selector: "federal-update-maintain-form", changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
|
84263
|
-
AlertComponent
|
|
84264
|
-
|
|
84265
|
-
|
|
84833
|
+
AlertComponent,
|
|
84834
|
+
ExpandableCardComponent,
|
|
84835
|
+
ExpandableListCardComponent,
|
|
84836
|
+
FilingFormGroupComponent,
|
|
84837
|
+
ReactiveFormsModule,
|
|
84838
|
+
MatButton,
|
|
84839
|
+
TranslatePipe
|
|
84840
|
+
], template: `<div class="federal-update-maintain-form">\r
|
|
84841
|
+
@if (isNote()) {\r
|
|
84842
|
+
<alert [type]="alertType.Info" title="Entity changed"\r
|
|
84843
|
+
content="A new draft needs to be generated as the Entity was changed since the last draft was produced."/>\r
|
|
84844
|
+
}\r
|
|
84845
|
+
\r
|
|
84846
|
+
@if (errors().length) {\r
|
|
84847
|
+
<alert title="The following issues need to be resolved before proceeding:" [content]="errors()"/>\r
|
|
84848
|
+
}\r
|
|
84849
|
+
\r
|
|
84850
|
+
<div class="federal-update-maintain-form-content">\r
|
|
84851
|
+
@let corporationDetails = getFormGroup(groups.CorporationDetails);\r
|
|
84852
|
+
@if (corporationDetails) {\r
|
|
84853
|
+
<expandable-card [isValid]="!corporationDetails.invalid" [title]="groups.CorporationDetails">\r
|
|
84854
|
+
<filing-form-group\r
|
|
84855
|
+
[isSubmitted]="isSubmitted()"\r
|
|
84856
|
+
[form]="corporationDetails"\r
|
|
84857
|
+
[config]="corporationDetailsFields"\r
|
|
84858
|
+
/>\r
|
|
84859
|
+
</expandable-card>\r
|
|
84860
|
+
}\r
|
|
84861
|
+
\r
|
|
84862
|
+
@let directorsArray = getFormArray(groups.Directors);\r
|
|
84863
|
+
@if (directorsArray) {\r
|
|
84864
|
+
<expandable-list-card\r
|
|
84865
|
+
[isOpen]="true"\r
|
|
84866
|
+
[isValid]="directorsArray.valid"\r
|
|
84867
|
+
[isSubmitted]="isSubmitted()"\r
|
|
84868
|
+
[fields]="directorsFields"\r
|
|
84869
|
+
[formArray]="directorsArray"\r
|
|
84870
|
+
[labelKey]="controls.AffiliationName"\r
|
|
84871
|
+
[title]="groups.Directors"\r
|
|
84872
|
+
/>\r
|
|
84873
|
+
}\r
|
|
84874
|
+
\r
|
|
84875
|
+
@let annualReturn = getFormGroup(groups.AnnualReturn);\r
|
|
84876
|
+
@if (annualReturn) {\r
|
|
84877
|
+
<expandable-card [isValid]="!annualReturn.invalid" [title]="groups.AnnualReturn">\r
|
|
84878
|
+
<filing-form-group\r
|
|
84879
|
+
[isSubmitted]="isSubmitted()"\r
|
|
84880
|
+
[form]="annualReturn"\r
|
|
84881
|
+
[config]="annualReturnFields"\r
|
|
84882
|
+
/>\r
|
|
84883
|
+
</expandable-card>\r
|
|
84884
|
+
}\r
|
|
84885
|
+
\r
|
|
84886
|
+
@let significantControl = getFormGroup(groups.SignificantControl);\r
|
|
84887
|
+
@if (significantControl) {\r
|
|
84888
|
+
@let individualsArray = getFormArray(groups.IndividualsWithSignificantControl);\r
|
|
84889
|
+
@if (individualsArray) {\r
|
|
84890
|
+
<expandable-list-card\r
|
|
84891
|
+
[isOpen]="isIndividualsWithSignificantControlOpen()"\r
|
|
84892
|
+
[isValid]="individualsArray.valid && significantControl.valid"\r
|
|
84893
|
+
[isSubmitted]="isSubmitted()"\r
|
|
84894
|
+
[isStatusIcon]="true"\r
|
|
84895
|
+
[removable]="!readonly()"\r
|
|
84896
|
+
[fields]="individualsWithSignificantControlFields()"\r
|
|
84897
|
+
[formArray]="individualsArray"\r
|
|
84898
|
+
[labelKey]="controls.AffiliationName"\r
|
|
84899
|
+
[title]="groups.IndividualsWithSignificantControl"\r
|
|
84900
|
+
(remove)="onRemoveIndividualWithSignificantForm($event)"\r
|
|
84901
|
+
>\r
|
|
84902
|
+
@if (!readonly() && isAddIndividualWithSignificantControlAvailable()) {\r
|
|
84903
|
+
<button\r
|
|
84904
|
+
[disabled]="isAddIndividualWithSignificantControlDisabled()"\r
|
|
84905
|
+
slot="subtitle"\r
|
|
84906
|
+
mat-stroked-button\r
|
|
84907
|
+
mat-button\r
|
|
84908
|
+
(click)="addIndividualWithSignificantControl()"\r
|
|
84909
|
+
>\r
|
|
84910
|
+
<span class="body-1-semibold">{{ 'Add Individuals With Significant Control' | translate }}</span>\r
|
|
84911
|
+
</button>\r
|
|
84912
|
+
}\r
|
|
84913
|
+
\r
|
|
84914
|
+
<div class="card-header-content" slot="header-content">\r
|
|
84915
|
+
<filing-form-group\r
|
|
84916
|
+
[isSubmitted]="isSubmitted()"\r
|
|
84917
|
+
[form]="significantControl"\r
|
|
84918
|
+
[config]="significantControlFields"\r
|
|
84919
|
+
/>\r
|
|
84920
|
+
</div>\r
|
|
84921
|
+
</expandable-list-card>\r
|
|
84922
|
+
}\r
|
|
84923
|
+
}\r
|
|
84924
|
+
\r
|
|
84925
|
+
@let contact = getFormGroup(groups.Contact);\r
|
|
84926
|
+
@if (contact) {\r
|
|
84927
|
+
<expandable-card [isStatusIcon]="!readonly()" [isValid]="!contact.invalid" [title]="groups.Contact">\r
|
|
84928
|
+
<filing-form-group\r
|
|
84929
|
+
[isSubmitted]="isSubmitted()"\r
|
|
84930
|
+
[form]="contact"\r
|
|
84931
|
+
[config]="contactControl()"\r
|
|
84932
|
+
/>\r
|
|
84933
|
+
</expandable-card>\r
|
|
84934
|
+
}\r
|
|
84935
|
+
</div>\r
|
|
84936
|
+
</div>\r
|
|
84937
|
+
\r
|
|
84938
|
+
`, styles: ["/* src/app/components/federal/update-maintain/update-maintain-form/update-maintain-form.component.scss */\n:host .federal-update-maintain-form {\n display: flex;\n flex-direction: column;\n gap: 16px;\n height: 100%;\n overflow-y: auto;\n}\n:host .federal-update-maintain-form-content {\n display: flex;\n flex-direction: column;\n gap: 24px;\n}\n:host .card-header-content {\n padding: 0 16px;\n}\n/*# sourceMappingURL=update-maintain-form.component.css.map */\n"] }]
|
|
84939
|
+
}], () => [], null);
|
|
84266
84940
|
})();
|
|
84267
84941
|
(() => {
|
|
84268
|
-
(typeof ngDevMode === "undefined" || ngDevMode) && \u0275setClassDebugInfo(FederalUpdateMaintainFormComponent, { className: "FederalUpdateMaintainFormComponent", filePath: "src/app/components/federal/update-maintain/update-maintain-form/update-maintain-form.component.ts", lineNumber:
|
|
84942
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && \u0275setClassDebugInfo(FederalUpdateMaintainFormComponent, { className: "FederalUpdateMaintainFormComponent", filePath: "src/app/components/federal/update-maintain/update-maintain-form/update-maintain-form.component.ts", lineNumber: 61 });
|
|
84269
84943
|
})();
|
|
84270
84944
|
}
|
|
84271
84945
|
});
|
|
@@ -84593,7 +85267,7 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
84593
85267
|
})("file", function FederalComponent_Conditional_1_Conditional_1_Conditional_1_Template_federal_update_maintain_preview_form_file_0_listener() {
|
|
84594
85268
|
\u0275\u0275restoreView(_r6);
|
|
84595
85269
|
const ctx_r1 = \u0275\u0275nextContext(3);
|
|
84596
|
-
return \u0275\u0275resetView(ctx_r1.
|
|
85270
|
+
return \u0275\u0275resetView(ctx_r1.onUmSubmit());
|
|
84597
85271
|
});
|
|
84598
85272
|
\u0275\u0275elementEnd();
|
|
84599
85273
|
}
|
|
@@ -84603,42 +85277,20 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
84603
85277
|
\u0275\u0275property("task", currentTask_r3)("form", ctx_r1.umPreviewForm())("actionsDisabled", ctx_r1.actionsDisabled())("errors", ctx_r1.errors());
|
|
84604
85278
|
}
|
|
84605
85279
|
}
|
|
84606
|
-
function FederalComponent_Conditional_1_Conditional_1_Conditional_2_Template(rf, ctx) {
|
|
84607
|
-
if (rf & 1) {
|
|
84608
|
-
const _r7 = \u0275\u0275getCurrentView();
|
|
84609
|
-
\u0275\u0275elementStart(0, "terms-and-conditions", 8);
|
|
84610
|
-
\u0275\u0275listener("prev", function FederalComponent_Conditional_1_Conditional_1_Conditional_2_Template_terms_and_conditions_prev_0_listener() {
|
|
84611
|
-
\u0275\u0275restoreView(_r7);
|
|
84612
|
-
const ctx_r1 = \u0275\u0275nextContext(3);
|
|
84613
|
-
return \u0275\u0275resetView(ctx_r1.nextStep.emit());
|
|
84614
|
-
})("close", function FederalComponent_Conditional_1_Conditional_1_Conditional_2_Template_terms_and_conditions_close_0_listener() {
|
|
84615
|
-
\u0275\u0275restoreView(_r7);
|
|
84616
|
-
const ctx_r1 = \u0275\u0275nextContext(3);
|
|
84617
|
-
return \u0275\u0275resetView(ctx_r1.close.emit());
|
|
84618
|
-
})("confirm", function FederalComponent_Conditional_1_Conditional_1_Conditional_2_Template_terms_and_conditions_confirm_0_listener($event) {
|
|
84619
|
-
\u0275\u0275restoreView(_r7);
|
|
84620
|
-
const ctx_r1 = \u0275\u0275nextContext(3);
|
|
84621
|
-
return \u0275\u0275resetView(ctx_r1.onUmSubmit($event));
|
|
84622
|
-
});
|
|
84623
|
-
\u0275\u0275elementEnd();
|
|
84624
|
-
}
|
|
84625
|
-
}
|
|
84626
85280
|
function FederalComponent_Conditional_1_Conditional_1_Template(rf, ctx) {
|
|
84627
85281
|
if (rf & 1) {
|
|
84628
|
-
\u0275\u0275template(0, FederalComponent_Conditional_1_Conditional_1_Conditional_0_Template, 1, 5, "federal-update-maintain-delta-form", 4)(1, FederalComponent_Conditional_1_Conditional_1_Conditional_1_Template, 1, 4, "federal-update-maintain-preview-form", 5)
|
|
85282
|
+
\u0275\u0275template(0, FederalComponent_Conditional_1_Conditional_1_Conditional_0_Template, 1, 5, "federal-update-maintain-delta-form", 4)(1, FederalComponent_Conditional_1_Conditional_1_Conditional_1_Template, 1, 4, "federal-update-maintain-preview-form", 5);
|
|
84629
85283
|
}
|
|
84630
85284
|
if (rf & 2) {
|
|
84631
85285
|
const ctx_r1 = \u0275\u0275nextContext(2);
|
|
84632
85286
|
\u0275\u0275conditional(ctx_r1.activeStep() === ctx_r1.steps.Validate ? 0 : -1);
|
|
84633
85287
|
\u0275\u0275advance();
|
|
84634
85288
|
\u0275\u0275conditional(ctx_r1.activeStep() === ctx_r1.steps.FilingPreview ? 1 : -1);
|
|
84635
|
-
\u0275\u0275advance();
|
|
84636
|
-
\u0275\u0275conditional(ctx_r1.activeStep() === ctx_r1.steps.TermsAndConditions ? 2 : -1);
|
|
84637
85289
|
}
|
|
84638
85290
|
}
|
|
84639
85291
|
function FederalComponent_Conditional_1_Template(rf, ctx) {
|
|
84640
85292
|
if (rf & 1) {
|
|
84641
|
-
\u0275\u0275template(0, FederalComponent_Conditional_1_Conditional_0_Template, 2, 1)(1, FederalComponent_Conditional_1_Conditional_1_Template,
|
|
85293
|
+
\u0275\u0275template(0, FederalComponent_Conditional_1_Conditional_0_Template, 2, 1)(1, FederalComponent_Conditional_1_Conditional_1_Template, 2, 2);
|
|
84642
85294
|
}
|
|
84643
85295
|
if (rf & 2) {
|
|
84644
85296
|
const ctx_r1 = \u0275\u0275nextContext();
|
|
@@ -84666,7 +85318,8 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
84666
85318
|
init_FederalConstants();
|
|
84667
85319
|
init_update_maintain_delta_form_component2();
|
|
84668
85320
|
init_update_maintain_preview_form_component2();
|
|
84669
|
-
|
|
85321
|
+
init_federal_update_maintain_helper();
|
|
85322
|
+
init_federal_update_maintain_enum();
|
|
84670
85323
|
init_core();
|
|
84671
85324
|
FederalComponent = class _FederalComponent {
|
|
84672
85325
|
actionsDisabled = input(false);
|
|
@@ -84705,7 +85358,7 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
84705
85358
|
this.initialDeltaValue.set(untracked2(() => this.generateFederalFormationDeltaData()));
|
|
84706
85359
|
}
|
|
84707
85360
|
if (isUpdateMaintain(task)) {
|
|
84708
|
-
this.umDeltaForm.set(new FormGroup(
|
|
85361
|
+
this.umDeltaForm.set(new FormGroup(FederalUpdateMaintainFormHelper.generateConfig(task)));
|
|
84709
85362
|
this.umInitialDeltaValue.set(untracked2(() => this.generateFederalUpdateMaintainDeltaData()));
|
|
84710
85363
|
}
|
|
84711
85364
|
}
|
|
@@ -84725,7 +85378,7 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
84725
85378
|
}
|
|
84726
85379
|
}
|
|
84727
85380
|
if (isUpdateMaintain(task)) {
|
|
84728
|
-
const form = new FormGroup(
|
|
85381
|
+
const form = new FormGroup(FederalUpdateMaintainFormHelper.generateConfig(task));
|
|
84729
85382
|
form.disable();
|
|
84730
85383
|
this.umPreviewForm.set(form);
|
|
84731
85384
|
if (untracked2(this.activeStep) === Step.Validate) {
|
|
@@ -84769,11 +85422,33 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
84769
85422
|
this.umInitialDeltaValue.set(delta);
|
|
84770
85423
|
this.umSave.emit(delta);
|
|
84771
85424
|
}
|
|
84772
|
-
onUmSubmit(
|
|
84773
|
-
this.umSubmit.emit(
|
|
85425
|
+
onUmSubmit() {
|
|
85426
|
+
this.umSubmit.emit();
|
|
84774
85427
|
}
|
|
84775
85428
|
generateFederalUpdateMaintainDeltaData() {
|
|
84776
|
-
|
|
85429
|
+
const formData = this.umDeltaForm().getRawValue();
|
|
85430
|
+
const annualReturnData = formData[FederalUpdateMaintainFormGroups.AnnualReturn] ?? {};
|
|
85431
|
+
const significantControlData = formData[FederalUpdateMaintainFormGroups.SignificantControl] ?? {};
|
|
85432
|
+
const iscIndividualsData = formData[FederalUpdateMaintainFormGroups.IndividualsWithSignificantControl] ?? [];
|
|
85433
|
+
const contactData = formData[FederalUpdateMaintainFormGroups.Contact] ?? {};
|
|
85434
|
+
const significantControlType = significantControlData[FederalFormationFormControl.SignificantControlType];
|
|
85435
|
+
return {
|
|
85436
|
+
corporationType: annualReturnData[FederalUpdateMaintainFormControl.CorporationType] ?? void 0,
|
|
85437
|
+
numberOfShareholders: annualReturnData[FederalUpdateMaintainFormControl.NumberOfShareholders] ?? void 0,
|
|
85438
|
+
individualsWithSignificantControl: {
|
|
85439
|
+
type: significantControlType,
|
|
85440
|
+
exclusionReason: significantControlType === ISCOptions.Excluded ? significantControlData[FederalFormationFormControl.ExclusionReason] : void 0,
|
|
85441
|
+
individuals: significantControlType === ISCOptions.ListISC ? iscIndividualsData.map((isc) => ({
|
|
85442
|
+
affiliationId: isc[FormationFormControls.Id],
|
|
85443
|
+
typeOfInterest: isc[FederalFormationFormControl.ISCTypeOfInterest],
|
|
85444
|
+
shareHoldingMethod: isc[FederalFormationFormControl.ISCShareHoldingMethod],
|
|
85445
|
+
jointHoldingType: isc[FederalFormationFormControl.ISCJointHoldingType],
|
|
85446
|
+
percentageInterest: isc[FederalFormationFormControl.ISCPercentageInterest],
|
|
85447
|
+
addressForService: isc[FederalFormationFormControl.AddressForService]
|
|
85448
|
+
})) : void 0
|
|
85449
|
+
},
|
|
85450
|
+
contactUid: contactData[FederalFormationFormControl.Contact]
|
|
85451
|
+
};
|
|
84777
85452
|
}
|
|
84778
85453
|
generateFederalFormationDeltaData() {
|
|
84779
85454
|
const formData = this.deltaForm().getRawValue();
|
|
@@ -84878,22 +85553,21 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
84878
85553
|
static \u0275fac = function FederalComponent_Factory(__ngFactoryType__) {
|
|
84879
85554
|
return new (__ngFactoryType__ || _FederalComponent)();
|
|
84880
85555
|
};
|
|
84881
|
-
static \u0275cmp = /* @__PURE__ */ \u0275\u0275defineComponent({ type: _FederalComponent, selectors: [["federal"]], inputs: { actionsDisabled: [1, "actionsDisabled"], task: [1, "task"], errors: [1, "errors"], activeStep: [1, "activeStep"], isNote: [1, "isNote"] }, outputs: { close: "close", deltaDataChange: "deltaDataChange", file: "file", validate: "validate", nextStep: "nextStep", umValidate: "umValidate", umSave: "umSave", umSubmit: "umSubmit" }, decls: 2, vars: 2, consts: [[3, "documents", "selectedDocuments", "task", "errors", "actionsDisabled", "isNote", "form"], [3, "task", "errors", "actionsDisabled", "form", "selectedDocuments"], [3, "addDocuments", "removeDocument", "close", "validate", "save", "documents", "selectedDocuments", "task", "errors", "actionsDisabled", "isNote", "form"], [3, "close", "file", "task", "errors", "actionsDisabled", "form", "selectedDocuments"], [3, "task", "form", "actionsDisabled", "errors", "isNote"], [3, "task", "form", "actionsDisabled", "errors"], [3, "validate", "close", "save", "task", "form", "actionsDisabled", "errors", "isNote"], [3, "close", "file", "task", "form", "actionsDisabled", "errors"]
|
|
85556
|
+
static \u0275cmp = /* @__PURE__ */ \u0275\u0275defineComponent({ type: _FederalComponent, selectors: [["federal"]], inputs: { actionsDisabled: [1, "actionsDisabled"], task: [1, "task"], errors: [1, "errors"], activeStep: [1, "activeStep"], isNote: [1, "isNote"] }, outputs: { close: "close", deltaDataChange: "deltaDataChange", file: "file", validate: "validate", nextStep: "nextStep", umValidate: "umValidate", umSave: "umSave", umSubmit: "umSubmit" }, decls: 2, vars: 2, consts: [[3, "documents", "selectedDocuments", "task", "errors", "actionsDisabled", "isNote", "form"], [3, "task", "errors", "actionsDisabled", "form", "selectedDocuments"], [3, "addDocuments", "removeDocument", "close", "validate", "save", "documents", "selectedDocuments", "task", "errors", "actionsDisabled", "isNote", "form"], [3, "close", "file", "task", "errors", "actionsDisabled", "form", "selectedDocuments"], [3, "task", "form", "actionsDisabled", "errors", "isNote"], [3, "task", "form", "actionsDisabled", "errors"], [3, "validate", "close", "save", "task", "form", "actionsDisabled", "errors", "isNote"], [3, "close", "file", "task", "form", "actionsDisabled", "errors"]], template: function FederalComponent_Template(rf, ctx) {
|
|
84882
85557
|
if (rf & 1) {
|
|
84883
85558
|
\u0275\u0275declareLet(0);
|
|
84884
85559
|
\u0275\u0275template(1, FederalComponent_Conditional_1_Template, 2, 2);
|
|
84885
85560
|
}
|
|
84886
85561
|
if (rf & 2) {
|
|
84887
|
-
const
|
|
85562
|
+
const currentTask_r7 = \u0275\u0275storeLet(ctx.task());
|
|
84888
85563
|
\u0275\u0275advance();
|
|
84889
|
-
\u0275\u0275conditional(
|
|
85564
|
+
\u0275\u0275conditional(currentTask_r7 ? 1 : -1);
|
|
84890
85565
|
}
|
|
84891
85566
|
}, dependencies: [
|
|
84892
85567
|
FederalIncorporationDeltaFormComponent,
|
|
84893
85568
|
FederalIncorporationPreviewFormComponent,
|
|
84894
85569
|
FederalUpdateMaintainDeltaFormComponent,
|
|
84895
|
-
FederalUpdateMaintainPreviewFormComponent
|
|
84896
|
-
TermsAndConditionsComponent
|
|
85570
|
+
FederalUpdateMaintainPreviewFormComponent
|
|
84897
85571
|
], styles: ["\n\n[_nghost-%COMP%] .federal[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n gap: 16px;\n}\n/*# sourceMappingURL=federal.component.css.map */"], changeDetection: 0 });
|
|
84898
85572
|
};
|
|
84899
85573
|
(() => {
|
|
@@ -84903,13 +85577,12 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
84903
85577
|
FederalIncorporationDeltaFormComponent,
|
|
84904
85578
|
FederalIncorporationPreviewFormComponent,
|
|
84905
85579
|
FederalUpdateMaintainDeltaFormComponent,
|
|
84906
|
-
FederalUpdateMaintainPreviewFormComponent
|
|
84907
|
-
|
|
84908
|
-
], template: '@let currentTask = task();\r\n\r\n@if (currentTask) {\r\n @if (isFormationTask(currentTask)) {\r\n @if (activeStep() === steps.Validate) {\r\n <federal-incorporation-delta-form\r\n [documents]="documents"\r\n [selectedDocuments]="selectedDocuments()"\r\n (addDocuments)="onAddDocuments($event)"\r\n (removeDocument)="onRemoveDocument($event)"\r\n (close)="onClose()"\r\n (validate)="onValidate()"\r\n (save)="onSave()"\r\n [task]="currentTask"\r\n [errors]="errors()"\r\n [actionsDisabled]="actionsDisabled()"\r\n [isNote]="isNote()"\r\n [form]="deltaForm()"\r\n />\r\n\r\n } @else if (activeStep() === steps.FilingPreview) {\r\n <federal-incorporation-preview-form (close)="close.emit()" (file)="onFile()" [task]="currentTask"\r\n [errors]="errors()"\r\n [actionsDisabled]="actionsDisabled()" [form]="previewForm()"\r\n [selectedDocuments]="selectedDocuments()"/>\r\n }\r\n }\r\n\r\n @if (isUpdateMaintainTask(currentTask)) {\r\n @if (activeStep() === steps.Validate) {\r\n <federal-update-maintain-delta-form\r\n [task]="$any(currentTask)"\r\n [form]="umDeltaForm()"\r\n [actionsDisabled]="actionsDisabled()"\r\n [errors]="errors()"\r\n [isNote]="isNote()"\r\n (validate)="onUmValidate()"\r\n (close)="onClose()"\r\n (save)="onUmSave()"\r\n />\r\n }\r\n\r\n @if (activeStep() === steps.FilingPreview) {\r\n <federal-update-maintain-preview-form\r\n [task]="$any(currentTask)"\r\n [form]="umPreviewForm()"\r\n [actionsDisabled]="actionsDisabled()"\r\n [errors]="errors()"\r\n (close)="close.emit()"\r\n (file)="nextStep.emit()"\r\n />\r\n }\r\n\r\n @if (activeStep() === steps.TermsAndConditions) {\r\n <terms-and-conditions\r\n (prev)="nextStep.emit()"\r\n (close)="close.emit()"\r\n (confirm)="onUmSubmit($event)"\r\n />\r\n }\r\n }\r\n}\r\n\r\n\r\n\r\n\r\n\r\n', styles: ["/* src/app/components/federal/federal.component.scss */\n:host .federal {\n display: flex;\n flex-direction: column;\n gap: 16px;\n}\n/*# sourceMappingURL=federal.component.css.map */\n"] }]
|
|
85580
|
+
FederalUpdateMaintainPreviewFormComponent
|
|
85581
|
+
], template: '@let currentTask = task();\r\n\r\n@if (currentTask) {\r\n @if (isFormationTask(currentTask)) {\r\n @if (activeStep() === steps.Validate) {\r\n <federal-incorporation-delta-form\r\n [documents]="documents"\r\n [selectedDocuments]="selectedDocuments()"\r\n (addDocuments)="onAddDocuments($event)"\r\n (removeDocument)="onRemoveDocument($event)"\r\n (close)="onClose()"\r\n (validate)="onValidate()"\r\n (save)="onSave()"\r\n [task]="currentTask"\r\n [errors]="errors()"\r\n [actionsDisabled]="actionsDisabled()"\r\n [isNote]="isNote()"\r\n [form]="deltaForm()"\r\n />\r\n\r\n } @else if (activeStep() === steps.FilingPreview) {\r\n <federal-incorporation-preview-form (close)="close.emit()" (file)="onFile()" [task]="currentTask"\r\n [errors]="errors()"\r\n [actionsDisabled]="actionsDisabled()" [form]="previewForm()"\r\n [selectedDocuments]="selectedDocuments()"/>\r\n }\r\n }\r\n\r\n @if (isUpdateMaintainTask(currentTask)) {\r\n @if (activeStep() === steps.Validate) {\r\n <federal-update-maintain-delta-form\r\n [task]="$any(currentTask)"\r\n [form]="umDeltaForm()"\r\n [actionsDisabled]="actionsDisabled()"\r\n [errors]="errors()"\r\n [isNote]="isNote()"\r\n (validate)="onUmValidate()"\r\n (close)="onClose()"\r\n (save)="onUmSave()"\r\n />\r\n }\r\n\r\n @if (activeStep() === steps.FilingPreview) {\r\n <federal-update-maintain-preview-form\r\n [task]="$any(currentTask)"\r\n [form]="umPreviewForm()"\r\n [actionsDisabled]="actionsDisabled()"\r\n [errors]="errors()"\r\n (close)="close.emit()"\r\n (file)="onUmSubmit()"\r\n />\r\n }\r\n }\r\n}\r\n\r\n\r\n\r\n\r\n\r\n', styles: ["/* src/app/components/federal/federal.component.scss */\n:host .federal {\n display: flex;\n flex-direction: column;\n gap: 16px;\n}\n/*# sourceMappingURL=federal.component.css.map */\n"] }]
|
|
84909
85582
|
}], () => [], null);
|
|
84910
85583
|
})();
|
|
84911
85584
|
(() => {
|
|
84912
|
-
(typeof ngDevMode === "undefined" || ngDevMode) && \u0275setClassDebugInfo(FederalComponent, { className: "FederalComponent", filePath: "src/app/components/federal/federal.component.ts", lineNumber:
|
|
85585
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && \u0275setClassDebugInfo(FederalComponent, { className: "FederalComponent", filePath: "src/app/components/federal/federal.component.ts", lineNumber: 43 });
|
|
84913
85586
|
})();
|
|
84914
85587
|
}
|
|
84915
85588
|
});
|
|
@@ -84936,9 +85609,9 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
84936
85609
|
const url = signature.proxyApiUrl;
|
|
84937
85610
|
const req = requestBody;
|
|
84938
85611
|
const resp = yield fetchWithJwtRetry(signature, () => postJson(fetchFn, url, signature.jwtToken, req, {
|
|
84939
|
-
|
|
85612
|
+
// 'ApiKey': 'a759101c-aeac-4fa6-90dc-8b56f01b2939',
|
|
84940
85613
|
Authorization: `Bearer ${signature.jwtToken}`,
|
|
84941
|
-
|
|
85614
|
+
// 'AccountKey': '1c3e3a6e-2a8b-4dd2-b906-aec25a1a7227',
|
|
84942
85615
|
"x-target-url": `${this.config.ONAOI}api/Incorporation`,
|
|
84943
85616
|
"x-access-token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJtaWNoZWwubGF2b2llQGF0aGVubmlhbi5jb20iLCJzdWIiOiI2N2RkY2IwNWRjNDAzMjg0ZTdmYTA3ZmIiLCJpYXQiOjE3NzAyMTI2OTQsImV4cCI6MTc3MDIxOTg5NCwiYmlkIjoiIiwiYXV0IjoidHJ1ZSIsIm9yZyI6Imh0dHBzOi8vb2xpdmUtMS50ZXN0LmF0aGVubmlhbi5jb20iLCJwZXIiOiIifQ.0QsFPBVGTA8JyacfEDx4qz5XVQB3AeL2-uCBiCs9qF0",
|
|
84944
85617
|
Cookie: "AWSALB=PpMRL+JDLimOntn4FPEpJ2ZX9rtRbn/7wOE1Ntyq9RGhYPgnJpjAN8xr8R5TyM4v1tBvC62q0YWVR2fQwDLLKWIIQm+U79VccsjiMHRffNr6an9tJNOOdpX94R53; AWSALBCORS=PpMRL+JDLimOntn4FPEpJ2ZX9rtRbn/7wOE1Ntyq9RGhYPgnJpjAN8xr8R5TyM4v1tBvC62q0YWVR2fQwDLLKWIIQm+U79VccsjiMHRffNr6an9tJNOOdpX94R53"
|
|
@@ -85009,15 +85682,18 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
85009
85682
|
serviceOrderId: payload.ServiceOrderId ?? serviceOrderId
|
|
85010
85683
|
});
|
|
85011
85684
|
if (payload?.ReceiptPdf) {
|
|
85012
|
-
signature.
|
|
85013
|
-
|
|
85014
|
-
|
|
85015
|
-
|
|
85016
|
-
|
|
85017
|
-
|
|
85018
|
-
|
|
85019
|
-
|
|
85020
|
-
|
|
85685
|
+
const searchOrFilingType = getSearchOrFilingType(signature.task);
|
|
85686
|
+
if (searchOrFilingType) {
|
|
85687
|
+
signature.filingValidateSuccess?.({
|
|
85688
|
+
searchOrFilingType,
|
|
85689
|
+
serviceOrderId,
|
|
85690
|
+
validatedOn: /* @__PURE__ */ new Date(),
|
|
85691
|
+
provider: "obr",
|
|
85692
|
+
draftPdf: payload.ReceiptPdf,
|
|
85693
|
+
documentName: "Incorporation Receipt",
|
|
85694
|
+
documentType: "pdf"
|
|
85695
|
+
});
|
|
85696
|
+
}
|
|
85021
85697
|
}
|
|
85022
85698
|
return payload;
|
|
85023
85699
|
});
|
|
@@ -85038,6 +85714,116 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
85038
85714
|
}
|
|
85039
85715
|
});
|
|
85040
85716
|
|
|
85717
|
+
// src/app/services/federal/federal-update-maintain.service.ts
|
|
85718
|
+
var FederalUpdateMaintainService;
|
|
85719
|
+
var init_federal_update_maintain_service = __esm({
|
|
85720
|
+
"src/app/services/federal/federal-update-maintain.service.ts"() {
|
|
85721
|
+
init_core();
|
|
85722
|
+
init_common_utils();
|
|
85723
|
+
init_core();
|
|
85724
|
+
FederalUpdateMaintainService = class _FederalUpdateMaintainService {
|
|
85725
|
+
config;
|
|
85726
|
+
setConfig(config2) {
|
|
85727
|
+
this.config = config2;
|
|
85728
|
+
}
|
|
85729
|
+
validate(_0, _1) {
|
|
85730
|
+
return __async(this, arguments, function* (signature, requestBody, opts = {}) {
|
|
85731
|
+
if (!isUpdateMaintain(signature.task)) {
|
|
85732
|
+
throw new Error(`Expected Maintain task, got: ${signature.task?._taskType}`);
|
|
85733
|
+
}
|
|
85734
|
+
ensureAuthInputs(signature);
|
|
85735
|
+
const fetchFn = opts.fetchImpl ?? fetch;
|
|
85736
|
+
const url = signature.proxyApiUrl;
|
|
85737
|
+
const targetPath = opts.endpointPath ?? "/api/FilingCD";
|
|
85738
|
+
const req = requestBody;
|
|
85739
|
+
const baseUrl = this.config.ONFiling;
|
|
85740
|
+
if (!baseUrl) {
|
|
85741
|
+
throw new Error("FederalUpdateMaintainService: missing EnvConfig.ONFiling/ONAOI");
|
|
85742
|
+
}
|
|
85743
|
+
const resp = yield fetchWithJwtRetry(signature, () => postJson(fetchFn, url, signature.jwtToken, req, __spreadValues({
|
|
85744
|
+
"x-target-url": joinUrl(baseUrl, targetPath)
|
|
85745
|
+
}, opts.headers ?? {})));
|
|
85746
|
+
const raw = yield resp.text();
|
|
85747
|
+
const parsed = tryParseJson(raw);
|
|
85748
|
+
if (!parsed.ok) {
|
|
85749
|
+
const err2 = new Error(`eCore returned ${resp.status} ${resp.statusText}: ${raw || "(empty response)"}`);
|
|
85750
|
+
err2.httpStatus = resp.status;
|
|
85751
|
+
throw err2;
|
|
85752
|
+
}
|
|
85753
|
+
const payload = unwrapRequestResults(parsed.value);
|
|
85754
|
+
if (resp.ok) {
|
|
85755
|
+
return payload;
|
|
85756
|
+
}
|
|
85757
|
+
const err = buildValidationError(resp.status, payload);
|
|
85758
|
+
err.validateResult = payload;
|
|
85759
|
+
err.httpStatus = resp.status;
|
|
85760
|
+
throw err;
|
|
85761
|
+
});
|
|
85762
|
+
}
|
|
85763
|
+
submitRequest(_0, _1) {
|
|
85764
|
+
return __async(this, arguments, function* (signature, serviceOrderId, opts = {}) {
|
|
85765
|
+
ensureAuthInputs(signature);
|
|
85766
|
+
if (!serviceOrderId) {
|
|
85767
|
+
throw new Error("Missing serviceOrderId.");
|
|
85768
|
+
}
|
|
85769
|
+
const fetchFn = opts.fetchImpl ?? fetch;
|
|
85770
|
+
const url = signature.proxyApiUrl;
|
|
85771
|
+
const resp = yield fetchWithJwtRetry(signature, () => fetchFn(url, {
|
|
85772
|
+
method: "POST",
|
|
85773
|
+
headers: __spreadValues({
|
|
85774
|
+
Authorization: `Bearer ${signature.jwtToken}`,
|
|
85775
|
+
"x-target-url": `${this.config.ONFiling}api/${encodeURIComponent(serviceOrderId)}/submit`
|
|
85776
|
+
}, opts.headers ?? {})
|
|
85777
|
+
}));
|
|
85778
|
+
const raw = yield resp.text();
|
|
85779
|
+
const parsed = tryParseJson(raw);
|
|
85780
|
+
if (!parsed.ok) {
|
|
85781
|
+
if (resp.ok) {
|
|
85782
|
+
const minimal = {
|
|
85783
|
+
Status: "Success",
|
|
85784
|
+
ServiceOrderId: serviceOrderId,
|
|
85785
|
+
raw
|
|
85786
|
+
};
|
|
85787
|
+
signature.filingSubmitSuccess?.({
|
|
85788
|
+
filedOn: /* @__PURE__ */ new Date(),
|
|
85789
|
+
serviceOrderId
|
|
85790
|
+
});
|
|
85791
|
+
return minimal;
|
|
85792
|
+
}
|
|
85793
|
+
const err = new Error(`eCore submit returned ${resp.status} ${resp.statusText}: ${raw || "(empty response)"}`);
|
|
85794
|
+
err.httpStatus = resp.status;
|
|
85795
|
+
throw err;
|
|
85796
|
+
}
|
|
85797
|
+
const payload = unwrapRequestResults(parsed.value);
|
|
85798
|
+
if (!resp.ok) {
|
|
85799
|
+
const err = buildGenericError(resp.status, "eCore submit failed", payload);
|
|
85800
|
+
err.submitResult = payload;
|
|
85801
|
+
err.httpStatus = resp.status;
|
|
85802
|
+
throw err;
|
|
85803
|
+
}
|
|
85804
|
+
signature.filingSubmitSuccess?.({
|
|
85805
|
+
filedOn: /* @__PURE__ */ new Date(),
|
|
85806
|
+
serviceOrderId: payload.ServiceOrderId ?? serviceOrderId
|
|
85807
|
+
});
|
|
85808
|
+
return payload;
|
|
85809
|
+
});
|
|
85810
|
+
}
|
|
85811
|
+
static \u0275fac = function FederalUpdateMaintainService_Factory(__ngFactoryType__) {
|
|
85812
|
+
return new (__ngFactoryType__ || _FederalUpdateMaintainService)();
|
|
85813
|
+
};
|
|
85814
|
+
static \u0275prov = /* @__PURE__ */ \u0275\u0275defineInjectable({ token: _FederalUpdateMaintainService, factory: _FederalUpdateMaintainService.\u0275fac, providedIn: "root" });
|
|
85815
|
+
};
|
|
85816
|
+
(() => {
|
|
85817
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(FederalUpdateMaintainService, [{
|
|
85818
|
+
type: Injectable,
|
|
85819
|
+
args: [{
|
|
85820
|
+
providedIn: "root"
|
|
85821
|
+
}]
|
|
85822
|
+
}], null, null);
|
|
85823
|
+
})();
|
|
85824
|
+
}
|
|
85825
|
+
});
|
|
85826
|
+
|
|
85041
85827
|
// src/app/services/ontario/ontario-update-maintain.service.ts
|
|
85042
85828
|
var OntarioUpdateMaintainService;
|
|
85043
85829
|
var init_ontario_update_maintain_service = __esm({
|
|
@@ -85166,15 +85952,18 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
85166
85952
|
}
|
|
85167
85953
|
const result = parsed.value;
|
|
85168
85954
|
if (result?.Draft) {
|
|
85169
|
-
signature.
|
|
85170
|
-
|
|
85171
|
-
|
|
85172
|
-
|
|
85173
|
-
|
|
85174
|
-
|
|
85175
|
-
|
|
85176
|
-
|
|
85177
|
-
|
|
85955
|
+
const searchOrFilingType = getSearchOrFilingType(signature.task);
|
|
85956
|
+
if (searchOrFilingType) {
|
|
85957
|
+
signature.filingValidateSuccess?.({
|
|
85958
|
+
searchOrFilingType,
|
|
85959
|
+
serviceOrderId: requestBody.CurrentDataServiceOrderId,
|
|
85960
|
+
validatedOn: /* @__PURE__ */ new Date(),
|
|
85961
|
+
provider: "obr",
|
|
85962
|
+
draftPdf: result.Draft,
|
|
85963
|
+
documentName: opts?.documentName ?? "Initial Return Draft",
|
|
85964
|
+
documentType: "pdf"
|
|
85965
|
+
});
|
|
85966
|
+
}
|
|
85178
85967
|
}
|
|
85179
85968
|
if (parsed.ok) {
|
|
85180
85969
|
return result;
|
|
@@ -85517,7 +86306,7 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
85517
86306
|
LastName: affiliation.participant._profile.lastName,
|
|
85518
86307
|
DateOfBirth: affiliation.participant._profile.date_of_birth,
|
|
85519
86308
|
CountriesOfCitizenship: (affiliation.participant?._profile?.["citizenships"] ?? []).map((c) => normalizeCountryCode(c)),
|
|
85520
|
-
CountriesOfResidence: (affiliation.participant?._profile?.tax_residency
|
|
86309
|
+
CountriesOfResidence: normalizeCountryCode(affiliation.participant?._profile?.tax_residency?.country),
|
|
85521
86310
|
Address: address ? mapAddress(address) : void 0,
|
|
85522
86311
|
ServiceAddress: serviceAddress ? mapAddress(serviceAddress) : void 0,
|
|
85523
86312
|
TypeOfInterest: deltaData.typeOfInterest,
|
|
@@ -86108,6 +86897,112 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
86108
86897
|
}
|
|
86109
86898
|
});
|
|
86110
86899
|
|
|
86900
|
+
// src/app/helpers/mappers/federal-update-maintain.mapper.ts
|
|
86901
|
+
function buildFederalUpdateMaintainValidationRequest(deltaData, task) {
|
|
86902
|
+
const significantControl = deltaData.individualsWithSignificantControl;
|
|
86903
|
+
const isListIsc = significantControl?.type === ISCOptions.ListISC;
|
|
86904
|
+
const corporationName = task?.entity?._profile?.name ?? "";
|
|
86905
|
+
const corporationNumber = task?.entity?._profile?.corp_number ?? "";
|
|
86906
|
+
const annualComplianceTask = task;
|
|
86907
|
+
const referenceDate = annualComplianceTask?._ext?._reference_date;
|
|
86908
|
+
const annualReturnYear = referenceDate ? new Date(referenceDate).getFullYear().toString() : (/* @__PURE__ */ new Date()).getFullYear().toString();
|
|
86909
|
+
const agmDate = annualComplianceTask?._ext?._agm_date;
|
|
86910
|
+
const annualMeetingDate = agmDate ? new Date(agmDate).toISOString().split("T")[0] : void 0;
|
|
86911
|
+
let signatory;
|
|
86912
|
+
if (task && deltaData.signatoryUid) {
|
|
86913
|
+
const signatoryAff = task.entity.affiliations.find((a) => a._id === deltaData.signatoryUid);
|
|
86914
|
+
if (signatoryAff?.participant) {
|
|
86915
|
+
signatory = {
|
|
86916
|
+
Name: signatoryAff.participant._profile?.name || "",
|
|
86917
|
+
Phone: signatoryAff.participant.communicationPhone || ""
|
|
86918
|
+
};
|
|
86919
|
+
}
|
|
86920
|
+
}
|
|
86921
|
+
let individualsWithSignificantControl;
|
|
86922
|
+
if (task && isListIsc && significantControl?.individuals?.length) {
|
|
86923
|
+
const iscAffiliations = getIndividualWithSignificantControl(task.entity.affiliations);
|
|
86924
|
+
const deltaMap = new Map((significantControl.individuals ?? []).map((d) => [d.affiliationId, d]));
|
|
86925
|
+
individualsWithSignificantControl = iscAffiliations.filter((aff) => deltaMap.has(aff._id)).map((aff) => transformISC(aff, deltaMap.get(aff._id)));
|
|
86926
|
+
}
|
|
86927
|
+
return {
|
|
86928
|
+
CorporationName: corporationName,
|
|
86929
|
+
CorporationNumber: corporationNumber,
|
|
86930
|
+
FilingType: "1",
|
|
86931
|
+
Filing: {
|
|
86932
|
+
AnnualReturn: {
|
|
86933
|
+
AnnualReturnYear: annualReturnYear,
|
|
86934
|
+
AnnualMeetingDate: annualMeetingDate,
|
|
86935
|
+
TypeOfCorporation: deltaData.corporationType,
|
|
86936
|
+
NumberOfShareholders: deltaData.numberOfShareholders,
|
|
86937
|
+
Signatory: signatory,
|
|
86938
|
+
SignificantControlType: significantControl?.type,
|
|
86939
|
+
ExclusionReason: significantControl?.exclusionReason,
|
|
86940
|
+
IndividualsWithSignificantControl: individualsWithSignificantControl
|
|
86941
|
+
}
|
|
86942
|
+
}
|
|
86943
|
+
};
|
|
86944
|
+
}
|
|
86945
|
+
function transformISC(affiliation, deltaData) {
|
|
86946
|
+
const address = affiliation.addresses[0] || affiliation.parent_affiliation?.addresses?.[0];
|
|
86947
|
+
const allAddresses = [
|
|
86948
|
+
...affiliation.addresses ?? [],
|
|
86949
|
+
...affiliation.parent_affiliation?.addresses ?? []
|
|
86950
|
+
];
|
|
86951
|
+
const serviceAddress = deltaData.addressForService ? allAddresses.find((a) => a.uid === deltaData.addressForService) : void 0;
|
|
86952
|
+
return {
|
|
86953
|
+
FirstName: affiliation.participant._profile.firstName ?? "",
|
|
86954
|
+
MiddleName: affiliation.participant._profile.middleName ?? "",
|
|
86955
|
+
LastName: affiliation.participant._profile.lastName ?? "",
|
|
86956
|
+
DateOfBirth: affiliation.participant._profile.date_of_birth,
|
|
86957
|
+
CountriesOfCitizenship: (affiliation.participant?._profile?.["citizenships"] ?? []).map((c) => normalizeCountryCode(c)),
|
|
86958
|
+
CountriesOfResidence: [normalizeCountryCode(affiliation.participant?._profile?.tax_residency?.country)],
|
|
86959
|
+
Address: address ? mapAddress2(address) : void 0,
|
|
86960
|
+
ServiceAddress: serviceAddress ? mapServiceAddress(serviceAddress) : void 0,
|
|
86961
|
+
TypeOfInterest: deltaData.typeOfInterest ?? "",
|
|
86962
|
+
ShareHoldingMethod: deltaData.shareHoldingMethod ?? "",
|
|
86963
|
+
JointHoldingType: deltaData.jointHoldingType ?? "",
|
|
86964
|
+
PercentageInterest: deltaData.percentageInterest ?? "",
|
|
86965
|
+
EffectiveDate: affiliation.start_date
|
|
86966
|
+
};
|
|
86967
|
+
}
|
|
86968
|
+
function mapAddress2(address) {
|
|
86969
|
+
const country = normalizeCountryCode(address?.country ?? "");
|
|
86970
|
+
const provinceState = country === "CA" ? CANProvinceToCode(address?.province_state) : country === "US" ? USStateToCode(address?.province_state) : address?.province_state ?? "";
|
|
86971
|
+
return {
|
|
86972
|
+
StreetNumber: address?.components?.find((c) => c.name === "Street Number Only")?.value || "",
|
|
86973
|
+
StreetName: address?.components?.find((c) => c.name === "Street Only")?.value || "",
|
|
86974
|
+
UnitNumber: address?.components?.find((c) => c.name === "Suite/Apartment")?.value || "",
|
|
86975
|
+
AddressLine2: "",
|
|
86976
|
+
City: address?.city ?? "",
|
|
86977
|
+
ProvinceState: provinceState,
|
|
86978
|
+
Code: address?.postal_zip ?? "",
|
|
86979
|
+
Country: country
|
|
86980
|
+
};
|
|
86981
|
+
}
|
|
86982
|
+
function mapServiceAddress(address) {
|
|
86983
|
+
const country = normalizeCountryCode(address?.country ?? "");
|
|
86984
|
+
const provinceState = country === "CA" ? CANProvinceToCode(address?.province_state) : country === "US" ? USStateToCode(address?.province_state) : address?.province_state ?? "";
|
|
86985
|
+
const streetOnly = address?.components?.find((c) => c.name === "Street Only")?.value || "";
|
|
86986
|
+
const parsed = parseStreetAddress(streetOnly);
|
|
86987
|
+
return {
|
|
86988
|
+
StreetNumber: address?.components?.find((c) => c.name === "Street Number Only")?.value || "",
|
|
86989
|
+
StreetName: parsed.StreetName || "",
|
|
86990
|
+
UnitNumber: address?.components?.find((c) => c.name === "Suite/Apartment")?.value || "",
|
|
86991
|
+
AddressLine2: "",
|
|
86992
|
+
City: address?.city ?? "",
|
|
86993
|
+
ProvinceState: provinceState,
|
|
86994
|
+
Code: address?.postal_zip ?? "",
|
|
86995
|
+
Country: country
|
|
86996
|
+
};
|
|
86997
|
+
}
|
|
86998
|
+
var init_federal_update_maintain_mapper = __esm({
|
|
86999
|
+
"src/app/helpers/mappers/federal-update-maintain.mapper.ts"() {
|
|
87000
|
+
init_address_utils();
|
|
87001
|
+
init_common_utils();
|
|
87002
|
+
init_FederalConstants();
|
|
87003
|
+
}
|
|
87004
|
+
});
|
|
87005
|
+
|
|
86111
87006
|
// src/app/components/filing/filing.component.ts
|
|
86112
87007
|
function FilingComponent_Conditional_7_Template(rf, ctx) {
|
|
86113
87008
|
if (rf & 1) {
|
|
@@ -86199,6 +87094,18 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
86199
87094
|
\u0275\u0275restoreView(_r6);
|
|
86200
87095
|
const ctx_r2 = \u0275\u0275nextContext(2);
|
|
86201
87096
|
return \u0275\u0275resetView(ctx_r2.onFederalValidate($event));
|
|
87097
|
+
})("umSave", function FilingComponent_Conditional_10_Conditional_1_Template_federal_umSave_0_listener($event) {
|
|
87098
|
+
\u0275\u0275restoreView(_r6);
|
|
87099
|
+
const ctx_r2 = \u0275\u0275nextContext(2);
|
|
87100
|
+
return \u0275\u0275resetView(ctx_r2.onFederalUpdateMaintainSave($event));
|
|
87101
|
+
})("umValidate", function FilingComponent_Conditional_10_Conditional_1_Template_federal_umValidate_0_listener($event) {
|
|
87102
|
+
\u0275\u0275restoreView(_r6);
|
|
87103
|
+
const ctx_r2 = \u0275\u0275nextContext(2);
|
|
87104
|
+
return \u0275\u0275resetView(ctx_r2.onFederalUpdateMaintainValidate($event));
|
|
87105
|
+
})("umSubmit", function FilingComponent_Conditional_10_Conditional_1_Template_federal_umSubmit_0_listener() {
|
|
87106
|
+
\u0275\u0275restoreView(_r6);
|
|
87107
|
+
const ctx_r2 = \u0275\u0275nextContext(2);
|
|
87108
|
+
return \u0275\u0275resetView(ctx_r2.onFederalUpdateMaintainSubmit());
|
|
86202
87109
|
})("nextStep", function FilingComponent_Conditional_10_Conditional_1_Template_federal_nextStep_0_listener() {
|
|
86203
87110
|
\u0275\u0275restoreView(_r6);
|
|
86204
87111
|
const ctx_r2 = \u0275\u0275nextContext(2);
|
|
@@ -86248,11 +87155,13 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
86248
87155
|
init_icon();
|
|
86249
87156
|
init_federal_component();
|
|
86250
87157
|
init_federal_formation_service();
|
|
87158
|
+
init_federal_update_maintain_service();
|
|
86251
87159
|
init_ontario_update_maintain_service();
|
|
86252
87160
|
init_initial_return_payload_helper();
|
|
86253
87161
|
init_ontario_formation_mapper();
|
|
86254
87162
|
init_federal_formation_mapper();
|
|
86255
87163
|
init_ontario_update_maintain_mapper();
|
|
87164
|
+
init_federal_update_maintain_mapper();
|
|
86256
87165
|
init_core();
|
|
86257
87166
|
init_button();
|
|
86258
87167
|
FilingComponent = class _FilingComponent {
|
|
@@ -86299,6 +87208,7 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
86299
87208
|
isInitialReturnTask = isUpdateMaintain;
|
|
86300
87209
|
ontarioFormationService = inject(OntarioFormationService);
|
|
86301
87210
|
federalFormationService = inject(FederalFormationService);
|
|
87211
|
+
federalUpdateMaintainService = inject(FederalUpdateMaintainService);
|
|
86302
87212
|
updateMaintainService = inject(OntarioUpdateMaintainService);
|
|
86303
87213
|
translate = inject(TranslateService);
|
|
86304
87214
|
isEditButton = computed(() => {
|
|
@@ -86349,6 +87259,7 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
86349
87259
|
this.updateMaintainService.setConfig(config2);
|
|
86350
87260
|
this.ontarioFormationService.setConfig(config2);
|
|
86351
87261
|
this.federalFormationService.setConfig(config2);
|
|
87262
|
+
this.federalUpdateMaintainService.setConfig(config2);
|
|
86352
87263
|
}
|
|
86353
87264
|
});
|
|
86354
87265
|
addStylesVariables();
|
|
@@ -86364,7 +87275,7 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
86364
87275
|
if (!task) {
|
|
86365
87276
|
return;
|
|
86366
87277
|
}
|
|
86367
|
-
if (isUpdateMaintain(task)) {
|
|
87278
|
+
if (isUpdateMaintain(task) && isOntarioTask(task)) {
|
|
86368
87279
|
if (deltaData.serviceOrderId) {
|
|
86369
87280
|
this.defineInitialStep();
|
|
86370
87281
|
}
|
|
@@ -86397,8 +87308,9 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
86397
87308
|
const requestBody = buildOntarioFormationValidateRequest(signature.task, deltaData);
|
|
86398
87309
|
const response = yield this.ontarioFormationService.validate(signature, requestBody, this.validateOptions() ?? {});
|
|
86399
87310
|
const serviceOrderId = response["ServiceOrderId"] ?? "";
|
|
87311
|
+
const searchOrFilingType = getSearchOrFilingType(signature.task);
|
|
86400
87312
|
this.filingValidateSuccess.emit({
|
|
86401
|
-
searchOrFilingType
|
|
87313
|
+
searchOrFilingType,
|
|
86402
87314
|
serviceOrderId: response["ServiceOrderId"] ?? "",
|
|
86403
87315
|
validatedOn: /* @__PURE__ */ new Date(),
|
|
86404
87316
|
provider: "obr",
|
|
@@ -86430,8 +87342,9 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
86430
87342
|
const requestBody = buildFederalFormationValidateRequest(signature.task, deltaData);
|
|
86431
87343
|
const response = yield this.federalFormationService.validate(signature, requestBody, this.validateOptions() ?? {});
|
|
86432
87344
|
const serviceOrderId = response["ServiceOrderId"] ?? "";
|
|
87345
|
+
const searchOrFilingType = getSearchOrFilingType(signature.task);
|
|
86433
87346
|
this.filingValidateSuccess.emit({
|
|
86434
|
-
searchOrFilingType
|
|
87347
|
+
searchOrFilingType,
|
|
86435
87348
|
serviceOrderId: response["ServiceOrderId"] ?? "",
|
|
86436
87349
|
validatedOn: /* @__PURE__ */ new Date(),
|
|
86437
87350
|
provider: "obr",
|
|
@@ -86453,6 +87366,80 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
86453
87366
|
}
|
|
86454
87367
|
});
|
|
86455
87368
|
}
|
|
87369
|
+
/**
|
|
87370
|
+
* Federal Update/Maintain (Annual Return / NOC / Initial Return) Save Changes.
|
|
87371
|
+
* For now we just propagate delta data up to the host via deltaDataChange.
|
|
87372
|
+
*/
|
|
87373
|
+
onFederalUpdateMaintainSave(deltaData) {
|
|
87374
|
+
this.deltaDataChange.emit(deltaData);
|
|
87375
|
+
}
|
|
87376
|
+
/**
|
|
87377
|
+
* Federal Update/Maintain validate. Backend integration is not implemented yet;
|
|
87378
|
+
* still propagate delta so the host can persist it.
|
|
87379
|
+
*/
|
|
87380
|
+
onFederalUpdateMaintainValidate(deltaData) {
|
|
87381
|
+
const task = this.task();
|
|
87382
|
+
const signature = this._signature();
|
|
87383
|
+
if (!task || !signature) {
|
|
87384
|
+
return;
|
|
87385
|
+
}
|
|
87386
|
+
const requestBody = buildFederalUpdateMaintainValidationRequest(deltaData, task);
|
|
87387
|
+
this.isLoading.set(true);
|
|
87388
|
+
this.errors.set([]);
|
|
87389
|
+
this.federalUpdateMaintainService.validate(signature, requestBody, this.validateOptions() ?? {}).then((response) => {
|
|
87390
|
+
const serviceOrderId = response?.ServiceOrderId ?? response?.["ServiceOrderId"] ?? "";
|
|
87391
|
+
const draftPdf = response?.Draft ?? response?.["Draft"] ?? "";
|
|
87392
|
+
const searchOrFilingType = getSearchOrFilingType(task);
|
|
87393
|
+
if (draftPdf && searchOrFilingType) {
|
|
87394
|
+
this.filingValidateSuccess.emit({
|
|
87395
|
+
searchOrFilingType,
|
|
87396
|
+
serviceOrderId,
|
|
87397
|
+
validatedOn: /* @__PURE__ */ new Date(),
|
|
87398
|
+
provider: "obr",
|
|
87399
|
+
draftPdf,
|
|
87400
|
+
documentName: this.validateOptions()?.documentName ?? "Federal Draft",
|
|
87401
|
+
documentType: "pdf"
|
|
87402
|
+
});
|
|
87403
|
+
}
|
|
87404
|
+
this.deltaDataChange.emit(__spreadProps(__spreadValues({}, deltaData), {
|
|
87405
|
+
serviceOrderId,
|
|
87406
|
+
validatedData: JSON.parse(JSON.stringify(requestBody))
|
|
87407
|
+
}));
|
|
87408
|
+
this.close.emit();
|
|
87409
|
+
}).catch((response) => {
|
|
87410
|
+
console.error(response);
|
|
87411
|
+
const errors = JSON.parse(JSON.stringify(response))?.validateResult?.["Errors"];
|
|
87412
|
+
if (errors?.length) {
|
|
87413
|
+
this.errors.set(this.parseError(errors));
|
|
87414
|
+
}
|
|
87415
|
+
}).finally(() => {
|
|
87416
|
+
this.isLoading.set(false);
|
|
87417
|
+
});
|
|
87418
|
+
}
|
|
87419
|
+
/**
|
|
87420
|
+
* Federal Update/Maintain submit/file. Backend integration pending.
|
|
87421
|
+
* Keep the handler to avoid dropped events.
|
|
87422
|
+
*/
|
|
87423
|
+
onFederalUpdateMaintainSubmit() {
|
|
87424
|
+
const signature = this._signature();
|
|
87425
|
+
const serviceOrderId = this.task()?.deltaData?.serviceOrderId;
|
|
87426
|
+
if (!signature || !serviceOrderId) {
|
|
87427
|
+
return;
|
|
87428
|
+
}
|
|
87429
|
+
this.isLoading.set(true);
|
|
87430
|
+
this.errors.set([]);
|
|
87431
|
+
this.federalUpdateMaintainService.submitRequest(signature, serviceOrderId, this.validateOptions() ?? {}).then(() => {
|
|
87432
|
+
this.close.emit();
|
|
87433
|
+
}).catch((response) => {
|
|
87434
|
+
console.error(response);
|
|
87435
|
+
const errors = JSON.parse(JSON.stringify(response))?.validateResult?.["Errors"];
|
|
87436
|
+
if (errors?.length) {
|
|
87437
|
+
this.errors.set(this.parseError(errors));
|
|
87438
|
+
}
|
|
87439
|
+
}).finally(() => {
|
|
87440
|
+
this.isLoading.set(false);
|
|
87441
|
+
});
|
|
87442
|
+
}
|
|
86456
87443
|
onFederalFormationSubmit() {
|
|
86457
87444
|
return __async(this, null, function* () {
|
|
86458
87445
|
try {
|
|
@@ -86530,8 +87517,21 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
86530
87517
|
if (signature) {
|
|
86531
87518
|
try {
|
|
86532
87519
|
const requestBody = buildOntarioUpdateMaintainValidationRequest(task, deltaData, this.serviceOrderId);
|
|
86533
|
-
yield this.updateMaintainService.submitInitialReturnValidationToECore(signature, requestBody, this.validateOptions());
|
|
87520
|
+
const response = yield this.updateMaintainService.submitInitialReturnValidationToECore(signature, requestBody, this.validateOptions());
|
|
86534
87521
|
this.deltaDataChange.emit(__spreadProps(__spreadValues({}, deltaData), { serviceOrderId: this.serviceOrderId, validatedData: JSON.parse(JSON.stringify(requestBody)) }));
|
|
87522
|
+
const draftPdf = response?.Draft ?? response?.["Draft"] ?? "";
|
|
87523
|
+
const searchOrFilingType = getSearchOrFilingType(task);
|
|
87524
|
+
if (searchOrFilingType) {
|
|
87525
|
+
this.filingValidateSuccess.emit({
|
|
87526
|
+
searchOrFilingType,
|
|
87527
|
+
serviceOrderId: this.serviceOrderId,
|
|
87528
|
+
validatedOn: /* @__PURE__ */ new Date(),
|
|
87529
|
+
provider: "obr",
|
|
87530
|
+
draftPdf,
|
|
87531
|
+
documentName: this.validateOptions()?.documentName ?? "Federal Draft",
|
|
87532
|
+
documentType: "pdf"
|
|
87533
|
+
});
|
|
87534
|
+
}
|
|
86535
87535
|
this.close.emit();
|
|
86536
87536
|
} catch (response) {
|
|
86537
87537
|
const errors = JSON.parse(JSON.stringify(response))?.validateResult?.["Errors"];
|
|
@@ -86634,6 +87634,9 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
86634
87634
|
}
|
|
86635
87635
|
return buildOntarioUpdateMaintainValidationRequest(task, deltaData, serviceOrderId);
|
|
86636
87636
|
}
|
|
87637
|
+
if (isUpdateMaintain(task)) {
|
|
87638
|
+
return buildFederalUpdateMaintainValidationRequest(deltaData, task);
|
|
87639
|
+
}
|
|
86637
87640
|
return void 0;
|
|
86638
87641
|
}
|
|
86639
87642
|
static \u0275fac = function FilingComponent_Factory(__ngFactoryType__) {
|
|
@@ -86647,7 +87650,7 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
86647
87650
|
if (rf & 2) {
|
|
86648
87651
|
\u0275\u0275queryAdvance(2);
|
|
86649
87652
|
}
|
|
86650
|
-
}, inputs: { env: [1, "env"], config: [1, "config"], language: [1, "language"], proxyApiUrl: [1, "proxyApiUrl"], jwtToken: [1, "jwtToken"], task: [1, "task"], height: [1, "height"], validateOptions: [1, "validateOptions"], getDocumentBytes: [1, "getDocumentBytes"] }, outputs: { deltaDataChange: "deltaDataChange", filingValidateSuccess: "filingValidateSuccess", filingSubmitSuccess: "filingSubmitSuccess", close: "close" }, decls: 12, vars: 11, consts: [[1, "filing"], [1, "filing-title"], [1, "filing-title-text"], [1, "filing-title-action", 3, "click"], [1, "filing-header"], [1, "filing-content"], [1, "filing-content-loading"], ["mat-stroked-button", "", 3, "click", "disabled"], [3, "task", "activeStep", "isNote", "actionsDisabled", "errors", "prevData", "irValidationConfig"], [3, "actionsDisabled", "isNote", "activeStep", "task", "errors"], [3, "close", "formationValidate", "saveFormationDeltaData", "formationSubmit", "nextStep", "prevStep", "irValidate", "saveIrDeltaData", "irSubmit", "task", "activeStep", "isNote", "actionsDisabled", "errors", "prevData", "irValidationConfig"], [3, "close", "deltaDataChange", "file", "validate", "nextStep", "actionsDisabled", "isNote", "activeStep", "task", "errors"], [3, "diameter"]], template: function FilingComponent_Template(rf, ctx) {
|
|
87653
|
+
}, inputs: { env: [1, "env"], config: [1, "config"], language: [1, "language"], proxyApiUrl: [1, "proxyApiUrl"], jwtToken: [1, "jwtToken"], task: [1, "task"], height: [1, "height"], validateOptions: [1, "validateOptions"], getDocumentBytes: [1, "getDocumentBytes"] }, outputs: { deltaDataChange: "deltaDataChange", filingValidateSuccess: "filingValidateSuccess", filingSubmitSuccess: "filingSubmitSuccess", close: "close" }, decls: 12, vars: 11, consts: [[1, "filing"], [1, "filing-title"], [1, "filing-title-text"], [1, "filing-title-action", 3, "click"], [1, "filing-header"], [1, "filing-content"], [1, "filing-content-loading"], ["mat-stroked-button", "", 3, "click", "disabled"], [3, "task", "activeStep", "isNote", "actionsDisabled", "errors", "prevData", "irValidationConfig"], [3, "actionsDisabled", "isNote", "activeStep", "task", "errors"], [3, "close", "formationValidate", "saveFormationDeltaData", "formationSubmit", "nextStep", "prevStep", "irValidate", "saveIrDeltaData", "irSubmit", "task", "activeStep", "isNote", "actionsDisabled", "errors", "prevData", "irValidationConfig"], [3, "close", "deltaDataChange", "file", "validate", "umSave", "umValidate", "umSubmit", "nextStep", "actionsDisabled", "isNote", "activeStep", "task", "errors"], [3, "diameter"]], template: function FilingComponent_Template(rf, ctx) {
|
|
86651
87654
|
if (rf & 1) {
|
|
86652
87655
|
const _r1 = \u0275\u0275getCurrentView();
|
|
86653
87656
|
\u0275\u0275elementStart(0, "div", 0)(1, "div", 1)(2, "h1", 2);
|
|
@@ -86754,6 +87757,9 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
86754
87757
|
(deltaDataChange)="deltaDataChange.emit($event)"\r
|
|
86755
87758
|
(file)="onFederalFormationSubmit()"\r
|
|
86756
87759
|
(validate)="onFederalValidate($event)"\r
|
|
87760
|
+
(umSave)="onFederalUpdateMaintainSave($event)"\r
|
|
87761
|
+
(umValidate)="onFederalUpdateMaintainValidate($event)"\r
|
|
87762
|
+
(umSubmit)="onFederalUpdateMaintainSubmit()"\r
|
|
86757
87763
|
(nextStep)="defineInitialStep()"\r
|
|
86758
87764
|
/>\r
|
|
86759
87765
|
}\r
|
|
@@ -86770,7 +87776,7 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
86770
87776
|
}], () => [], null);
|
|
86771
87777
|
})();
|
|
86772
87778
|
(() => {
|
|
86773
|
-
(typeof ngDevMode === "undefined" || ngDevMode) && \u0275setClassDebugInfo(FilingComponent, { className: "FilingComponent", filePath: "src/app/components/filing/filing.component.ts", lineNumber:
|
|
87779
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && \u0275setClassDebugInfo(FilingComponent, { className: "FilingComponent", filePath: "src/app/components/filing/filing.component.ts", lineNumber: 69 });
|
|
86774
87780
|
})();
|
|
86775
87781
|
}
|
|
86776
87782
|
});
|