@dyedurham/search-and-file-widget 1.5.9 → 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 +1133 -101
- 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).");
|
|
@@ -50739,6 +50744,33 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
50739
50744
|
}
|
|
50740
50745
|
return obj;
|
|
50741
50746
|
}
|
|
50747
|
+
function copyWithShape(shape, source) {
|
|
50748
|
+
if (shape === null || shape === void 0) {
|
|
50749
|
+
return source;
|
|
50750
|
+
}
|
|
50751
|
+
if (Array.isArray(shape)) {
|
|
50752
|
+
if (!Array.isArray(source)) {
|
|
50753
|
+
return [];
|
|
50754
|
+
}
|
|
50755
|
+
if (!shape.length) {
|
|
50756
|
+
return source.map((item) => copyWithShape(item, item));
|
|
50757
|
+
}
|
|
50758
|
+
return source.map((item) => copyWithShape(shape[0], item));
|
|
50759
|
+
}
|
|
50760
|
+
if (typeof shape !== "object") {
|
|
50761
|
+
return source;
|
|
50762
|
+
}
|
|
50763
|
+
if (source === null || source === void 0 || typeof source !== "object") {
|
|
50764
|
+
return source;
|
|
50765
|
+
}
|
|
50766
|
+
const result = {};
|
|
50767
|
+
for (const key of Object.keys(shape)) {
|
|
50768
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
50769
|
+
result[key] = copyWithShape(shape[key], source[key]);
|
|
50770
|
+
}
|
|
50771
|
+
}
|
|
50772
|
+
return result;
|
|
50773
|
+
}
|
|
50742
50774
|
function toYyyyMmDd(d) {
|
|
50743
50775
|
if (!d)
|
|
50744
50776
|
return void 0;
|
|
@@ -50829,6 +50861,25 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
50829
50861
|
function isAnnualReturnTask(task) {
|
|
50830
50862
|
return task?._taskType === TaskType.AnnualCompliance;
|
|
50831
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
|
+
}
|
|
50832
50883
|
function markFormGroupTouched(formGroup) {
|
|
50833
50884
|
Object.values(formGroup.controls).forEach((control) => {
|
|
50834
50885
|
control.markAsTouched();
|
|
@@ -77425,7 +77476,6 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
77425
77476
|
const task = this.task();
|
|
77426
77477
|
if (task) {
|
|
77427
77478
|
const contacts = task.entity.affiliations.filter((a) => {
|
|
77428
|
-
console.log(a.role);
|
|
77429
77479
|
return a.role.role_name === "Contact";
|
|
77430
77480
|
});
|
|
77431
77481
|
this.contactsFields = generateOntarioFormationFormContactControl(contacts);
|
|
@@ -78760,7 +78810,7 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
78760
78810
|
static \u0275fac = function TermsAndConditionsComponent_Factory(__ngFactoryType__) {
|
|
78761
78811
|
return new (__ngFactoryType__ || _TermsAndConditionsComponent)();
|
|
78762
78812
|
};
|
|
78763
|
-
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) {
|
|
78764
78814
|
if (rf & 1) {
|
|
78765
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);
|
|
78766
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. ');
|
|
@@ -78831,33 +78881,33 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
78831
78881
|
\u0275\u0275elementStart(50, "span", 6);
|
|
78832
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. ");
|
|
78833
78883
|
\u0275\u0275elementEnd()()();
|
|
78834
|
-
\u0275\u0275elementStart(52, "mat-checkbox", 7)(53, "div",
|
|
78884
|
+
\u0275\u0275elementStart(52, "mat-checkbox", 7)(53, "div", 8)(54, "span");
|
|
78835
78885
|
\u0275\u0275text(55, "I agree to the Terms and Conditions and confirm that all required person(s) and/or entities agree to them");
|
|
78836
78886
|
\u0275\u0275elementEnd()()()()();
|
|
78837
|
-
\u0275\u0275elementStart(56, "expandable-card",
|
|
78838
|
-
\u0275\u0275element(57, "filing-form-group",
|
|
78887
|
+
\u0275\u0275elementStart(56, "expandable-card", 9);
|
|
78888
|
+
\u0275\u0275element(57, "filing-form-group", 10);
|
|
78839
78889
|
\u0275\u0275elementEnd()();
|
|
78840
|
-
\u0275\u0275elementStart(58, "div",
|
|
78890
|
+
\u0275\u0275elementStart(58, "div", 11)(59, "button", 12);
|
|
78841
78891
|
\u0275\u0275listener("click", function TermsAndConditionsComponent_Template_button_click_59_listener() {
|
|
78842
78892
|
return ctx.close.emit();
|
|
78843
78893
|
});
|
|
78844
|
-
\u0275\u0275elementStart(60, "span",
|
|
78894
|
+
\u0275\u0275elementStart(60, "span", 13);
|
|
78845
78895
|
\u0275\u0275text(61);
|
|
78846
78896
|
\u0275\u0275pipe(62, "translate");
|
|
78847
78897
|
\u0275\u0275elementEnd()();
|
|
78848
|
-
\u0275\u0275elementStart(63, "button",
|
|
78898
|
+
\u0275\u0275elementStart(63, "button", 12);
|
|
78849
78899
|
\u0275\u0275listener("click", function TermsAndConditionsComponent_Template_button_click_63_listener() {
|
|
78850
78900
|
return ctx.prev.emit();
|
|
78851
78901
|
});
|
|
78852
|
-
\u0275\u0275elementStart(64, "span",
|
|
78902
|
+
\u0275\u0275elementStart(64, "span", 13);
|
|
78853
78903
|
\u0275\u0275text(65);
|
|
78854
78904
|
\u0275\u0275pipe(66, "translate");
|
|
78855
78905
|
\u0275\u0275elementEnd()();
|
|
78856
|
-
\u0275\u0275elementStart(67, "button",
|
|
78906
|
+
\u0275\u0275elementStart(67, "button", 14);
|
|
78857
78907
|
\u0275\u0275listener("click", function TermsAndConditionsComponent_Template_button_click_67_listener() {
|
|
78858
78908
|
return ctx.onConfirm();
|
|
78859
78909
|
});
|
|
78860
|
-
\u0275\u0275elementStart(68, "span",
|
|
78910
|
+
\u0275\u0275elementStart(68, "span", 13);
|
|
78861
78911
|
\u0275\u0275text(69);
|
|
78862
78912
|
\u0275\u0275pipe(70, "translate");
|
|
78863
78913
|
\u0275\u0275elementEnd()()()();
|
|
@@ -79132,7 +79182,7 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
79132
79182
|
</div>\r
|
|
79133
79183
|
\r
|
|
79134
79184
|
<mat-checkbox [formControl]="getFormControl(termsAndConditionsControls.AcceptTerms)">\r
|
|
79135
|
-
<div class="body-1-regular">\r
|
|
79185
|
+
<div class="body-1-regular black">\r
|
|
79136
79186
|
<span>I agree to the Terms and Conditions and confirm that all required person(s) and/or entities agree to them</span>\r
|
|
79137
79187
|
</div>\r
|
|
79138
79188
|
</mat-checkbox>\r
|
|
@@ -81556,7 +81606,7 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
81556
81606
|
const registeredOffice = formData[InitialReturnFillingFormGroups.RegisteredOfficeAddress];
|
|
81557
81607
|
const certifiedBy = formData[InitialReturnFillingFormGroups.CertifiedBy];
|
|
81558
81608
|
const contact = formData[InitialReturnFillingFormGroups.Contact];
|
|
81559
|
-
const
|
|
81609
|
+
const mapAddress3 = (src) => ({
|
|
81560
81610
|
unitType: src?.[IRFormControls.UnitType] ?? null,
|
|
81561
81611
|
unitNumber: src?.[IRFormControls.UnitNumber] ?? null,
|
|
81562
81612
|
streetNumber: src?.[IRFormControls.StreetNumber] ?? null,
|
|
@@ -81568,7 +81618,7 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
81568
81618
|
const id = item[IRFormControls.ID];
|
|
81569
81619
|
if (id) {
|
|
81570
81620
|
acc[id] = {
|
|
81571
|
-
address:
|
|
81621
|
+
address: mapAddress3(item),
|
|
81572
81622
|
residentCanadian: item[IRFormControls.IsCanadianResident] ?? false
|
|
81573
81623
|
};
|
|
81574
81624
|
}
|
|
@@ -81577,11 +81627,11 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
81577
81627
|
return {
|
|
81578
81628
|
referenceNumber: generalInfo?.[IRFormControls.ClientMatterNumber] ?? null,
|
|
81579
81629
|
docketNumber: generalInfo?.[IRFormControls.Docket] ?? null,
|
|
81580
|
-
registeredOfficeAddress:
|
|
81630
|
+
registeredOfficeAddress: mapAddress3(registeredOffice),
|
|
81581
81631
|
directors: mapPersons(formData[InitialReturnFillingFormGroups.Directors]),
|
|
81582
81632
|
officers: mapPersons(formData[InitialReturnFillingFormGroups.Officers]),
|
|
81583
81633
|
certifiedBy: {
|
|
81584
|
-
address:
|
|
81634
|
+
address: mapAddress3(certifiedBy)
|
|
81585
81635
|
},
|
|
81586
81636
|
contactUid: contact?.[IRFormControls.Contact] ?? null
|
|
81587
81637
|
};
|
|
@@ -81966,7 +82016,7 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
81966
82016
|
});
|
|
81967
82017
|
|
|
81968
82018
|
// src/app/constants/FederalConstants.ts
|
|
81969
|
-
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;
|
|
81970
82020
|
var init_FederalConstants = __esm({
|
|
81971
82021
|
"src/app/constants/FederalConstants.ts"() {
|
|
81972
82022
|
(function(NameType3) {
|
|
@@ -82079,6 +82129,42 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
82079
82129
|
EPLLangage2["English"] = "English";
|
|
82080
82130
|
EPLLangage2["French"] = "French";
|
|
82081
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
|
+
};
|
|
82082
82168
|
(function(SignatoryRole4) {
|
|
82083
82169
|
SignatoryRole4[SignatoryRole4["Director"] = 1] = "Director";
|
|
82084
82170
|
SignatoryRole4[SignatoryRole4["AuthorizedOfficer"] = 2] = "AuthorizedOfficer";
|
|
@@ -82452,9 +82538,9 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
82452
82538
|
dynamicLabel: (form, t) => {
|
|
82453
82539
|
const id = form.get(FederalFormationFormControl.Contact)?.value;
|
|
82454
82540
|
const contact = contacts.find((contact2) => contact2._id === id);
|
|
82455
|
-
const email = contact?.
|
|
82456
|
-
const phone = contact?.
|
|
82457
|
-
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)}`;
|
|
82458
82544
|
},
|
|
82459
82545
|
formControlName: "",
|
|
82460
82546
|
required: false,
|
|
@@ -83047,6 +83133,7 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
83047
83133
|
init_address_utils();
|
|
83048
83134
|
init_transform_utils();
|
|
83049
83135
|
init_app_enums();
|
|
83136
|
+
init_ontario_formation_form_constants();
|
|
83050
83137
|
FederalFormHelper = class _FederalFormHelper {
|
|
83051
83138
|
static generateConfig(task) {
|
|
83052
83139
|
const delta = task.deltaData;
|
|
@@ -83145,10 +83232,13 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
83145
83232
|
[FederalFormationFormControl.RestrictionsOnBusiness]: new FormControl({ value: task.entity._articles?.restrictions ?? "", disabled: true }),
|
|
83146
83233
|
[FederalFormationFormControl.OtherProvisions]: new FormControl({ value: task.entity._articles?.other_provisions ?? "", disabled: true })
|
|
83147
83234
|
});
|
|
83148
|
-
|
|
83149
|
-
|
|
83150
|
-
|
|
83151
|
-
|
|
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)));
|
|
83152
83242
|
const invitedDirectorIds = Object.entries(delta?.directors ?? {}).filter(([, d]) => d.inviteForFullAccessManager).map(([id]) => id);
|
|
83153
83243
|
config2[FederalFormationFormGroups.InviteDirectorToBeFullAccessManager] = new FormGroup({
|
|
83154
83244
|
[FederalFormationFormControl.InvitedDirectors]: new FormControl(invitedDirectorIds),
|
|
@@ -83169,7 +83259,7 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
83169
83259
|
return new FormGroup(__spreadValues({
|
|
83170
83260
|
[FormationFormControls.AffiliationName]: new FormControl({ value: name, disabled: true }),
|
|
83171
83261
|
[FormationFormControls.Id]: new FormControl({ value: id, disabled: true }),
|
|
83172
|
-
[FederalFormationFormControl.AddressForService]: new FormControl("", Validators.required),
|
|
83262
|
+
[FederalFormationFormControl.AddressForService]: new FormControl(deltaData?.addressForService ?? "", Validators.required),
|
|
83173
83263
|
[FederalFormationFormControl.DateOfBirth]: new FormControl(isc.participant._profile.date_of_birth, Validators.required),
|
|
83174
83264
|
[FederalFormationFormControl.CountriesOfCitizenship]: new FormControl(countriesOfCitizenship),
|
|
83175
83265
|
[FederalFormationFormControl.CountriesOfResidence]: new FormControl(countriesOfResidence),
|
|
@@ -84178,6 +84268,227 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
84178
84268
|
}
|
|
84179
84269
|
});
|
|
84180
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
|
+
|
|
84181
84492
|
// src/app/components/federal/update-maintain/update-maintain-form/update-maintain-form.component.ts
|
|
84182
84493
|
function FederalUpdateMaintainFormComponent_Conditional_1_Template(rf, ctx) {
|
|
84183
84494
|
if (rf & 1) {
|
|
@@ -84197,12 +84508,140 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
84197
84508
|
\u0275\u0275property("content", ctx_r0.errors());
|
|
84198
84509
|
}
|
|
84199
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
|
+
}
|
|
84200
84622
|
var FederalUpdateMaintainFormComponent;
|
|
84201
84623
|
var init_update_maintain_form_component2 = __esm({
|
|
84202
84624
|
"src/app/components/federal/update-maintain/update-maintain-form/update-maintain-form.component.ts"() {
|
|
84203
84625
|
init_core();
|
|
84626
|
+
init_forms();
|
|
84204
84627
|
init_alert_component();
|
|
84205
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();
|
|
84206
84645
|
init_core();
|
|
84207
84646
|
FederalUpdateMaintainFormComponent = class _FederalUpdateMaintainFormComponent {
|
|
84208
84647
|
form = input.required();
|
|
@@ -84211,35 +84650,296 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
84211
84650
|
isNote = input(false);
|
|
84212
84651
|
isSubmitted = input(false);
|
|
84213
84652
|
readonly = input(false);
|
|
84653
|
+
dialog = inject(MatDialog);
|
|
84654
|
+
cdr = inject(ChangeDetectorRef);
|
|
84655
|
+
dr = inject(DestroyRef);
|
|
84214
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
|
+
}
|
|
84215
84773
|
static \u0275fac = function FederalUpdateMaintainFormComponent_Factory(__ngFactoryType__) {
|
|
84216
84774
|
return new (__ngFactoryType__ || _FederalUpdateMaintainFormComponent)();
|
|
84217
84775
|
};
|
|
84218
|
-
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) {
|
|
84219
84777
|
if (rf & 1) {
|
|
84220
84778
|
\u0275\u0275elementStart(0, "div", 0);
|
|
84221
84779
|
\u0275\u0275template(1, FederalUpdateMaintainFormComponent_Conditional_1_Template, 1, 1, "alert", 1)(2, FederalUpdateMaintainFormComponent_Conditional_2_Template, 1, 1, "alert", 2);
|
|
84222
|
-
\u0275\
|
|
84223
|
-
\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()();
|
|
84224
84792
|
}
|
|
84225
84793
|
if (rf & 2) {
|
|
84226
84794
|
\u0275\u0275advance();
|
|
84227
84795
|
\u0275\u0275conditional(ctx.isNote() ? 1 : -1);
|
|
84228
84796
|
\u0275\u0275advance();
|
|
84229
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);
|
|
84230
84818
|
}
|
|
84231
|
-
}, 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 });
|
|
84232
84828
|
};
|
|
84233
84829
|
(() => {
|
|
84234
84830
|
(typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(FederalUpdateMaintainFormComponent, [{
|
|
84235
84831
|
type: Component,
|
|
84236
84832
|
args: [{ standalone: true, selector: "federal-update-maintain-form", changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
|
84237
|
-
AlertComponent
|
|
84238
|
-
|
|
84239
|
-
|
|
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);
|
|
84240
84940
|
})();
|
|
84241
84941
|
(() => {
|
|
84242
|
-
(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 });
|
|
84243
84943
|
})();
|
|
84244
84944
|
}
|
|
84245
84945
|
});
|
|
@@ -84567,7 +85267,7 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
84567
85267
|
})("file", function FederalComponent_Conditional_1_Conditional_1_Conditional_1_Template_federal_update_maintain_preview_form_file_0_listener() {
|
|
84568
85268
|
\u0275\u0275restoreView(_r6);
|
|
84569
85269
|
const ctx_r1 = \u0275\u0275nextContext(3);
|
|
84570
|
-
return \u0275\u0275resetView(ctx_r1.
|
|
85270
|
+
return \u0275\u0275resetView(ctx_r1.onUmSubmit());
|
|
84571
85271
|
});
|
|
84572
85272
|
\u0275\u0275elementEnd();
|
|
84573
85273
|
}
|
|
@@ -84577,42 +85277,20 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
84577
85277
|
\u0275\u0275property("task", currentTask_r3)("form", ctx_r1.umPreviewForm())("actionsDisabled", ctx_r1.actionsDisabled())("errors", ctx_r1.errors());
|
|
84578
85278
|
}
|
|
84579
85279
|
}
|
|
84580
|
-
function FederalComponent_Conditional_1_Conditional_1_Conditional_2_Template(rf, ctx) {
|
|
84581
|
-
if (rf & 1) {
|
|
84582
|
-
const _r7 = \u0275\u0275getCurrentView();
|
|
84583
|
-
\u0275\u0275elementStart(0, "terms-and-conditions", 8);
|
|
84584
|
-
\u0275\u0275listener("prev", function FederalComponent_Conditional_1_Conditional_1_Conditional_2_Template_terms_and_conditions_prev_0_listener() {
|
|
84585
|
-
\u0275\u0275restoreView(_r7);
|
|
84586
|
-
const ctx_r1 = \u0275\u0275nextContext(3);
|
|
84587
|
-
return \u0275\u0275resetView(ctx_r1.nextStep.emit());
|
|
84588
|
-
})("close", function FederalComponent_Conditional_1_Conditional_1_Conditional_2_Template_terms_and_conditions_close_0_listener() {
|
|
84589
|
-
\u0275\u0275restoreView(_r7);
|
|
84590
|
-
const ctx_r1 = \u0275\u0275nextContext(3);
|
|
84591
|
-
return \u0275\u0275resetView(ctx_r1.close.emit());
|
|
84592
|
-
})("confirm", function FederalComponent_Conditional_1_Conditional_1_Conditional_2_Template_terms_and_conditions_confirm_0_listener($event) {
|
|
84593
|
-
\u0275\u0275restoreView(_r7);
|
|
84594
|
-
const ctx_r1 = \u0275\u0275nextContext(3);
|
|
84595
|
-
return \u0275\u0275resetView(ctx_r1.onUmSubmit($event));
|
|
84596
|
-
});
|
|
84597
|
-
\u0275\u0275elementEnd();
|
|
84598
|
-
}
|
|
84599
|
-
}
|
|
84600
85280
|
function FederalComponent_Conditional_1_Conditional_1_Template(rf, ctx) {
|
|
84601
85281
|
if (rf & 1) {
|
|
84602
|
-
\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);
|
|
84603
85283
|
}
|
|
84604
85284
|
if (rf & 2) {
|
|
84605
85285
|
const ctx_r1 = \u0275\u0275nextContext(2);
|
|
84606
85286
|
\u0275\u0275conditional(ctx_r1.activeStep() === ctx_r1.steps.Validate ? 0 : -1);
|
|
84607
85287
|
\u0275\u0275advance();
|
|
84608
85288
|
\u0275\u0275conditional(ctx_r1.activeStep() === ctx_r1.steps.FilingPreview ? 1 : -1);
|
|
84609
|
-
\u0275\u0275advance();
|
|
84610
|
-
\u0275\u0275conditional(ctx_r1.activeStep() === ctx_r1.steps.TermsAndConditions ? 2 : -1);
|
|
84611
85289
|
}
|
|
84612
85290
|
}
|
|
84613
85291
|
function FederalComponent_Conditional_1_Template(rf, ctx) {
|
|
84614
85292
|
if (rf & 1) {
|
|
84615
|
-
\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);
|
|
84616
85294
|
}
|
|
84617
85295
|
if (rf & 2) {
|
|
84618
85296
|
const ctx_r1 = \u0275\u0275nextContext();
|
|
@@ -84640,7 +85318,8 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
84640
85318
|
init_FederalConstants();
|
|
84641
85319
|
init_update_maintain_delta_form_component2();
|
|
84642
85320
|
init_update_maintain_preview_form_component2();
|
|
84643
|
-
|
|
85321
|
+
init_federal_update_maintain_helper();
|
|
85322
|
+
init_federal_update_maintain_enum();
|
|
84644
85323
|
init_core();
|
|
84645
85324
|
FederalComponent = class _FederalComponent {
|
|
84646
85325
|
actionsDisabled = input(false);
|
|
@@ -84679,7 +85358,7 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
84679
85358
|
this.initialDeltaValue.set(untracked2(() => this.generateFederalFormationDeltaData()));
|
|
84680
85359
|
}
|
|
84681
85360
|
if (isUpdateMaintain(task)) {
|
|
84682
|
-
this.umDeltaForm.set(new FormGroup(
|
|
85361
|
+
this.umDeltaForm.set(new FormGroup(FederalUpdateMaintainFormHelper.generateConfig(task)));
|
|
84683
85362
|
this.umInitialDeltaValue.set(untracked2(() => this.generateFederalUpdateMaintainDeltaData()));
|
|
84684
85363
|
}
|
|
84685
85364
|
}
|
|
@@ -84699,7 +85378,7 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
84699
85378
|
}
|
|
84700
85379
|
}
|
|
84701
85380
|
if (isUpdateMaintain(task)) {
|
|
84702
|
-
const form = new FormGroup(
|
|
85381
|
+
const form = new FormGroup(FederalUpdateMaintainFormHelper.generateConfig(task));
|
|
84703
85382
|
form.disable();
|
|
84704
85383
|
this.umPreviewForm.set(form);
|
|
84705
85384
|
if (untracked2(this.activeStep) === Step.Validate) {
|
|
@@ -84743,11 +85422,33 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
84743
85422
|
this.umInitialDeltaValue.set(delta);
|
|
84744
85423
|
this.umSave.emit(delta);
|
|
84745
85424
|
}
|
|
84746
|
-
onUmSubmit(
|
|
84747
|
-
this.umSubmit.emit(
|
|
85425
|
+
onUmSubmit() {
|
|
85426
|
+
this.umSubmit.emit();
|
|
84748
85427
|
}
|
|
84749
85428
|
generateFederalUpdateMaintainDeltaData() {
|
|
84750
|
-
|
|
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
|
+
};
|
|
84751
85452
|
}
|
|
84752
85453
|
generateFederalFormationDeltaData() {
|
|
84753
85454
|
const formData = this.deltaForm().getRawValue();
|
|
@@ -84852,22 +85553,21 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
84852
85553
|
static \u0275fac = function FederalComponent_Factory(__ngFactoryType__) {
|
|
84853
85554
|
return new (__ngFactoryType__ || _FederalComponent)();
|
|
84854
85555
|
};
|
|
84855
|
-
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) {
|
|
84856
85557
|
if (rf & 1) {
|
|
84857
85558
|
\u0275\u0275declareLet(0);
|
|
84858
85559
|
\u0275\u0275template(1, FederalComponent_Conditional_1_Template, 2, 2);
|
|
84859
85560
|
}
|
|
84860
85561
|
if (rf & 2) {
|
|
84861
|
-
const
|
|
85562
|
+
const currentTask_r7 = \u0275\u0275storeLet(ctx.task());
|
|
84862
85563
|
\u0275\u0275advance();
|
|
84863
|
-
\u0275\u0275conditional(
|
|
85564
|
+
\u0275\u0275conditional(currentTask_r7 ? 1 : -1);
|
|
84864
85565
|
}
|
|
84865
85566
|
}, dependencies: [
|
|
84866
85567
|
FederalIncorporationDeltaFormComponent,
|
|
84867
85568
|
FederalIncorporationPreviewFormComponent,
|
|
84868
85569
|
FederalUpdateMaintainDeltaFormComponent,
|
|
84869
|
-
FederalUpdateMaintainPreviewFormComponent
|
|
84870
|
-
TermsAndConditionsComponent
|
|
85570
|
+
FederalUpdateMaintainPreviewFormComponent
|
|
84871
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 });
|
|
84872
85572
|
};
|
|
84873
85573
|
(() => {
|
|
@@ -84877,13 +85577,12 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
84877
85577
|
FederalIncorporationDeltaFormComponent,
|
|
84878
85578
|
FederalIncorporationPreviewFormComponent,
|
|
84879
85579
|
FederalUpdateMaintainDeltaFormComponent,
|
|
84880
|
-
FederalUpdateMaintainPreviewFormComponent
|
|
84881
|
-
|
|
84882
|
-
], 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"] }]
|
|
84883
85582
|
}], () => [], null);
|
|
84884
85583
|
})();
|
|
84885
85584
|
(() => {
|
|
84886
|
-
(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 });
|
|
84887
85586
|
})();
|
|
84888
85587
|
}
|
|
84889
85588
|
});
|
|
@@ -84910,9 +85609,9 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
84910
85609
|
const url = signature.proxyApiUrl;
|
|
84911
85610
|
const req = requestBody;
|
|
84912
85611
|
const resp = yield fetchWithJwtRetry(signature, () => postJson(fetchFn, url, signature.jwtToken, req, {
|
|
84913
|
-
|
|
85612
|
+
// 'ApiKey': 'a759101c-aeac-4fa6-90dc-8b56f01b2939',
|
|
84914
85613
|
Authorization: `Bearer ${signature.jwtToken}`,
|
|
84915
|
-
|
|
85614
|
+
// 'AccountKey': '1c3e3a6e-2a8b-4dd2-b906-aec25a1a7227',
|
|
84916
85615
|
"x-target-url": `${this.config.ONAOI}api/Incorporation`,
|
|
84917
85616
|
"x-access-token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJtaWNoZWwubGF2b2llQGF0aGVubmlhbi5jb20iLCJzdWIiOiI2N2RkY2IwNWRjNDAzMjg0ZTdmYTA3ZmIiLCJpYXQiOjE3NzAyMTI2OTQsImV4cCI6MTc3MDIxOTg5NCwiYmlkIjoiIiwiYXV0IjoidHJ1ZSIsIm9yZyI6Imh0dHBzOi8vb2xpdmUtMS50ZXN0LmF0aGVubmlhbi5jb20iLCJwZXIiOiIifQ.0QsFPBVGTA8JyacfEDx4qz5XVQB3AeL2-uCBiCs9qF0",
|
|
84918
85617
|
Cookie: "AWSALB=PpMRL+JDLimOntn4FPEpJ2ZX9rtRbn/7wOE1Ntyq9RGhYPgnJpjAN8xr8R5TyM4v1tBvC62q0YWVR2fQwDLLKWIIQm+U79VccsjiMHRffNr6an9tJNOOdpX94R53; AWSALBCORS=PpMRL+JDLimOntn4FPEpJ2ZX9rtRbn/7wOE1Ntyq9RGhYPgnJpjAN8xr8R5TyM4v1tBvC62q0YWVR2fQwDLLKWIIQm+U79VccsjiMHRffNr6an9tJNOOdpX94R53"
|
|
@@ -84983,15 +85682,18 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
84983
85682
|
serviceOrderId: payload.ServiceOrderId ?? serviceOrderId
|
|
84984
85683
|
});
|
|
84985
85684
|
if (payload?.ReceiptPdf) {
|
|
84986
|
-
signature.
|
|
84987
|
-
|
|
84988
|
-
|
|
84989
|
-
|
|
84990
|
-
|
|
84991
|
-
|
|
84992
|
-
|
|
84993
|
-
|
|
84994
|
-
|
|
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
|
+
}
|
|
84995
85697
|
}
|
|
84996
85698
|
return payload;
|
|
84997
85699
|
});
|
|
@@ -85012,6 +85714,116 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
85012
85714
|
}
|
|
85013
85715
|
});
|
|
85014
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
|
+
|
|
85015
85827
|
// src/app/services/ontario/ontario-update-maintain.service.ts
|
|
85016
85828
|
var OntarioUpdateMaintainService;
|
|
85017
85829
|
var init_ontario_update_maintain_service = __esm({
|
|
@@ -85140,15 +85952,18 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
85140
85952
|
}
|
|
85141
85953
|
const result = parsed.value;
|
|
85142
85954
|
if (result?.Draft) {
|
|
85143
|
-
signature.
|
|
85144
|
-
|
|
85145
|
-
|
|
85146
|
-
|
|
85147
|
-
|
|
85148
|
-
|
|
85149
|
-
|
|
85150
|
-
|
|
85151
|
-
|
|
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
|
+
}
|
|
85152
85967
|
}
|
|
85153
85968
|
if (parsed.ok) {
|
|
85154
85969
|
return result;
|
|
@@ -85491,7 +86306,7 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
85491
86306
|
LastName: affiliation.participant._profile.lastName,
|
|
85492
86307
|
DateOfBirth: affiliation.participant._profile.date_of_birth,
|
|
85493
86308
|
CountriesOfCitizenship: (affiliation.participant?._profile?.["citizenships"] ?? []).map((c) => normalizeCountryCode(c)),
|
|
85494
|
-
CountriesOfResidence: (affiliation.participant?._profile?.tax_residency
|
|
86309
|
+
CountriesOfResidence: normalizeCountryCode(affiliation.participant?._profile?.tax_residency?.country),
|
|
85495
86310
|
Address: address ? mapAddress(address) : void 0,
|
|
85496
86311
|
ServiceAddress: serviceAddress ? mapAddress(serviceAddress) : void 0,
|
|
85497
86312
|
TypeOfInterest: deltaData.typeOfInterest,
|
|
@@ -86082,6 +86897,112 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
86082
86897
|
}
|
|
86083
86898
|
});
|
|
86084
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
|
+
|
|
86085
87006
|
// src/app/components/filing/filing.component.ts
|
|
86086
87007
|
function FilingComponent_Conditional_7_Template(rf, ctx) {
|
|
86087
87008
|
if (rf & 1) {
|
|
@@ -86173,6 +87094,18 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
86173
87094
|
\u0275\u0275restoreView(_r6);
|
|
86174
87095
|
const ctx_r2 = \u0275\u0275nextContext(2);
|
|
86175
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());
|
|
86176
87109
|
})("nextStep", function FilingComponent_Conditional_10_Conditional_1_Template_federal_nextStep_0_listener() {
|
|
86177
87110
|
\u0275\u0275restoreView(_r6);
|
|
86178
87111
|
const ctx_r2 = \u0275\u0275nextContext(2);
|
|
@@ -86222,11 +87155,13 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
86222
87155
|
init_icon();
|
|
86223
87156
|
init_federal_component();
|
|
86224
87157
|
init_federal_formation_service();
|
|
87158
|
+
init_federal_update_maintain_service();
|
|
86225
87159
|
init_ontario_update_maintain_service();
|
|
86226
87160
|
init_initial_return_payload_helper();
|
|
86227
87161
|
init_ontario_formation_mapper();
|
|
86228
87162
|
init_federal_formation_mapper();
|
|
86229
87163
|
init_ontario_update_maintain_mapper();
|
|
87164
|
+
init_federal_update_maintain_mapper();
|
|
86230
87165
|
init_core();
|
|
86231
87166
|
init_button();
|
|
86232
87167
|
FilingComponent = class _FilingComponent {
|
|
@@ -86273,6 +87208,7 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
86273
87208
|
isInitialReturnTask = isUpdateMaintain;
|
|
86274
87209
|
ontarioFormationService = inject(OntarioFormationService);
|
|
86275
87210
|
federalFormationService = inject(FederalFormationService);
|
|
87211
|
+
federalUpdateMaintainService = inject(FederalUpdateMaintainService);
|
|
86276
87212
|
updateMaintainService = inject(OntarioUpdateMaintainService);
|
|
86277
87213
|
translate = inject(TranslateService);
|
|
86278
87214
|
isEditButton = computed(() => {
|
|
@@ -86323,6 +87259,7 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
86323
87259
|
this.updateMaintainService.setConfig(config2);
|
|
86324
87260
|
this.ontarioFormationService.setConfig(config2);
|
|
86325
87261
|
this.federalFormationService.setConfig(config2);
|
|
87262
|
+
this.federalUpdateMaintainService.setConfig(config2);
|
|
86326
87263
|
}
|
|
86327
87264
|
});
|
|
86328
87265
|
addStylesVariables();
|
|
@@ -86338,7 +87275,7 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
86338
87275
|
if (!task) {
|
|
86339
87276
|
return;
|
|
86340
87277
|
}
|
|
86341
|
-
if (isUpdateMaintain(task)) {
|
|
87278
|
+
if (isUpdateMaintain(task) && isOntarioTask(task)) {
|
|
86342
87279
|
if (deltaData.serviceOrderId) {
|
|
86343
87280
|
this.defineInitialStep();
|
|
86344
87281
|
}
|
|
@@ -86371,8 +87308,9 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
86371
87308
|
const requestBody = buildOntarioFormationValidateRequest(signature.task, deltaData);
|
|
86372
87309
|
const response = yield this.ontarioFormationService.validate(signature, requestBody, this.validateOptions() ?? {});
|
|
86373
87310
|
const serviceOrderId = response["ServiceOrderId"] ?? "";
|
|
87311
|
+
const searchOrFilingType = getSearchOrFilingType(signature.task);
|
|
86374
87312
|
this.filingValidateSuccess.emit({
|
|
86375
|
-
searchOrFilingType
|
|
87313
|
+
searchOrFilingType,
|
|
86376
87314
|
serviceOrderId: response["ServiceOrderId"] ?? "",
|
|
86377
87315
|
validatedOn: /* @__PURE__ */ new Date(),
|
|
86378
87316
|
provider: "obr",
|
|
@@ -86404,8 +87342,9 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
86404
87342
|
const requestBody = buildFederalFormationValidateRequest(signature.task, deltaData);
|
|
86405
87343
|
const response = yield this.federalFormationService.validate(signature, requestBody, this.validateOptions() ?? {});
|
|
86406
87344
|
const serviceOrderId = response["ServiceOrderId"] ?? "";
|
|
87345
|
+
const searchOrFilingType = getSearchOrFilingType(signature.task);
|
|
86407
87346
|
this.filingValidateSuccess.emit({
|
|
86408
|
-
searchOrFilingType
|
|
87347
|
+
searchOrFilingType,
|
|
86409
87348
|
serviceOrderId: response["ServiceOrderId"] ?? "",
|
|
86410
87349
|
validatedOn: /* @__PURE__ */ new Date(),
|
|
86411
87350
|
provider: "obr",
|
|
@@ -86427,6 +87366,80 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
86427
87366
|
}
|
|
86428
87367
|
});
|
|
86429
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
|
+
}
|
|
86430
87443
|
onFederalFormationSubmit() {
|
|
86431
87444
|
return __async(this, null, function* () {
|
|
86432
87445
|
try {
|
|
@@ -86504,8 +87517,21 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
86504
87517
|
if (signature) {
|
|
86505
87518
|
try {
|
|
86506
87519
|
const requestBody = buildOntarioUpdateMaintainValidationRequest(task, deltaData, this.serviceOrderId);
|
|
86507
|
-
yield this.updateMaintainService.submitInitialReturnValidationToECore(signature, requestBody, this.validateOptions());
|
|
87520
|
+
const response = yield this.updateMaintainService.submitInitialReturnValidationToECore(signature, requestBody, this.validateOptions());
|
|
86508
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
|
+
}
|
|
86509
87535
|
this.close.emit();
|
|
86510
87536
|
} catch (response) {
|
|
86511
87537
|
const errors = JSON.parse(JSON.stringify(response))?.validateResult?.["Errors"];
|
|
@@ -86586,7 +87612,7 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
86586
87612
|
this.activeStep.set(Step.Validate);
|
|
86587
87613
|
return;
|
|
86588
87614
|
}
|
|
86589
|
-
const dataWasChanged = !deepEqual(currentMappedPayload, taskFromDeltaData);
|
|
87615
|
+
const dataWasChanged = !deepEqual(currentMappedPayload, copyWithShape(currentMappedPayload, taskFromDeltaData));
|
|
86590
87616
|
this.dataWasChanged.set(dataWasChanged);
|
|
86591
87617
|
this.activeStep.set(dataWasChanged ? Step.Validate : Step.FilingPreview);
|
|
86592
87618
|
}
|
|
@@ -86608,6 +87634,9 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
86608
87634
|
}
|
|
86609
87635
|
return buildOntarioUpdateMaintainValidationRequest(task, deltaData, serviceOrderId);
|
|
86610
87636
|
}
|
|
87637
|
+
if (isUpdateMaintain(task)) {
|
|
87638
|
+
return buildFederalUpdateMaintainValidationRequest(deltaData, task);
|
|
87639
|
+
}
|
|
86611
87640
|
return void 0;
|
|
86612
87641
|
}
|
|
86613
87642
|
static \u0275fac = function FilingComponent_Factory(__ngFactoryType__) {
|
|
@@ -86621,7 +87650,7 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
86621
87650
|
if (rf & 2) {
|
|
86622
87651
|
\u0275\u0275queryAdvance(2);
|
|
86623
87652
|
}
|
|
86624
|
-
}, 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) {
|
|
86625
87654
|
if (rf & 1) {
|
|
86626
87655
|
const _r1 = \u0275\u0275getCurrentView();
|
|
86627
87656
|
\u0275\u0275elementStart(0, "div", 0)(1, "div", 1)(2, "h1", 2);
|
|
@@ -86728,6 +87757,9 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
86728
87757
|
(deltaDataChange)="deltaDataChange.emit($event)"\r
|
|
86729
87758
|
(file)="onFederalFormationSubmit()"\r
|
|
86730
87759
|
(validate)="onFederalValidate($event)"\r
|
|
87760
|
+
(umSave)="onFederalUpdateMaintainSave($event)"\r
|
|
87761
|
+
(umValidate)="onFederalUpdateMaintainValidate($event)"\r
|
|
87762
|
+
(umSubmit)="onFederalUpdateMaintainSubmit()"\r
|
|
86731
87763
|
(nextStep)="defineInitialStep()"\r
|
|
86732
87764
|
/>\r
|
|
86733
87765
|
}\r
|
|
@@ -86744,7 +87776,7 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
86744
87776
|
}], () => [], null);
|
|
86745
87777
|
})();
|
|
86746
87778
|
(() => {
|
|
86747
|
-
(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 });
|
|
86748
87780
|
})();
|
|
86749
87781
|
}
|
|
86750
87782
|
});
|