@dyedurham/search-and-file-widget 1.6.19 → 1.6.21
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 +139 -60
- package/package.json +1 -1
package/dnd-filing-shell.js
CHANGED
|
@@ -55905,6 +55905,7 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
55905
55905
|
FormationFormControls2["wasLegalOpinionObtained"] = "wasLegalOpinionObtained";
|
|
55906
55906
|
FormationFormControls2["RequestedDateForIncorporation"] = "requestedDateForIncorporation";
|
|
55907
55907
|
FormationFormControls2["LawyerSigningOpinion"] = "lawyerSigningOpinion";
|
|
55908
|
+
FormationFormControls2["LawFirm"] = "lawFirm";
|
|
55908
55909
|
FormationFormControls2["OtherProvisions"] = "otherProvisions";
|
|
55909
55910
|
FormationFormControls2["Contact"] = "contact";
|
|
55910
55911
|
})(FormationFormControls || (FormationFormControls = {}));
|
|
@@ -57052,6 +57053,41 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
57052
57053
|
}
|
|
57053
57054
|
};
|
|
57054
57055
|
}
|
|
57056
|
+
function createTelephone(phone) {
|
|
57057
|
+
const digits = (phone ?? "").replace(/\D/g, "");
|
|
57058
|
+
if (!digits) {
|
|
57059
|
+
return { CountryCode: "1", AreaCode: "", PhoneNumber: "" };
|
|
57060
|
+
}
|
|
57061
|
+
const { countryCode, areaCode, number } = getPhoneData(digits);
|
|
57062
|
+
return {
|
|
57063
|
+
CountryCode: countryCode,
|
|
57064
|
+
AreaCode: areaCode,
|
|
57065
|
+
PhoneNumber: number
|
|
57066
|
+
};
|
|
57067
|
+
}
|
|
57068
|
+
function createLegalOpinion(task, deltaData) {
|
|
57069
|
+
const legalOpinionDelta = deltaData?.legalOpinion;
|
|
57070
|
+
if (!legalOpinionDelta?.wasLegalOpinionObtained) {
|
|
57071
|
+
return void 0;
|
|
57072
|
+
}
|
|
57073
|
+
const lawyerAffiliation = task.entity.affiliations.find((aff) => aff._id === legalOpinionDelta.lawyerSigning);
|
|
57074
|
+
const lawyer = lawyerAffiliation?.participant;
|
|
57075
|
+
const lawyerAddress = lawyerAffiliation?.addresses?.[0] || lawyerAffiliation?.parent_affiliation?.addresses?.[0];
|
|
57076
|
+
const firstName = lawyer?._profile?.firstName || "";
|
|
57077
|
+
const middleName = lawyer?._profile?.middleName || "";
|
|
57078
|
+
const lastName = lawyer?._profile?.lastName || "";
|
|
57079
|
+
const email = lawyer?.communicationEmail || "";
|
|
57080
|
+
const phone = lawyer?.communicationPhone || "";
|
|
57081
|
+
return __spreadProps(__spreadValues({
|
|
57082
|
+
LawFirm: legalOpinionDelta.lawFirm || "",
|
|
57083
|
+
LawyerFirstName: firstName
|
|
57084
|
+
}, middleName && { LawyerMiddleName: middleName }), {
|
|
57085
|
+
LawyerLastName: lastName,
|
|
57086
|
+
LawyerEmail: email,
|
|
57087
|
+
Address: transformAddress(lawyerAddress ?? {}, legalOpinionDelta.address),
|
|
57088
|
+
ContactPhone: createTelephone(phone)
|
|
57089
|
+
});
|
|
57090
|
+
}
|
|
57055
57091
|
function findRegisteredOfficeAddress(task) {
|
|
57056
57092
|
const registeredOffice = [...task.entity.affiliations ?? []].find((aff) => aff.kind === "EntityAffiliationV3" && aff.role.role_name === "Shared Address" && aff.role.static_title === "Registered Office");
|
|
57057
57093
|
const registeredOfficeAddress = registeredOffice?.addresses?.[0] || registeredOffice?.parent_affiliation?.addresses?.[0];
|
|
@@ -57087,15 +57123,17 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
57087
57123
|
const restrictionsOnShareRights = task.entity._articles?.share_restrictions_text || "None";
|
|
57088
57124
|
const restrictionsOnShareTransfers = task.entity._articles?.transfer_restrictions_text || "None";
|
|
57089
57125
|
const otherProvisions = task.entity._articles?.other_provisions || "None";
|
|
57090
|
-
const
|
|
57126
|
+
const legalOpinion = createLegalOpinion(task, deltaData);
|
|
57127
|
+
const eCorePayload = __spreadProps(__spreadValues(__spreadProps(__spreadValues({
|
|
57091
57128
|
IncorporationType: mapNameTypeToECore(entityDetails?.corporationNameType),
|
|
57092
57129
|
LegalEnding: legalEnding,
|
|
57093
57130
|
EnglishName: englishName,
|
|
57094
57131
|
FrenchName: frenchName,
|
|
57095
57132
|
RegisteredOffice: transformAddress(registeredOfficeAddress, deltaData.registeredOfficeAddress),
|
|
57096
|
-
CoverLetter: createCoverLetter(deltaData)
|
|
57133
|
+
CoverLetter: createCoverLetter(deltaData)
|
|
57134
|
+
}, legalOpinion && { LegalOpinion: legalOpinion }), {
|
|
57097
57135
|
DirectorNumberType: task.entity._articles?.min_directors === task.entity._articles?.max_directors ? ECoreDirectorNumberType.Fixed : ECoreDirectorNumberType.Range
|
|
57098
|
-
}, task.entity._articles?.min_directors === task.entity._articles?.max_directors ? { FixedNumberOfDirectors: task.entity._articles?.min_directors } : {
|
|
57136
|
+
}), task.entity._articles?.min_directors === task.entity._articles?.max_directors ? { FixedNumberOfDirectors: task.entity._articles?.min_directors } : {
|
|
57099
57137
|
MinimumNumberOfDirectors: task.entity._articles?.min_directors,
|
|
57100
57138
|
MaximumNumberOfDirectors: task.entity._articles?.max_directors
|
|
57101
57139
|
}), {
|
|
@@ -57814,7 +57852,7 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
57814
57852
|
|
|
57815
57853
|
// src/app/utils/common.utils.ts
|
|
57816
57854
|
function buildValidationError(httpStatus, r) {
|
|
57817
|
-
const msgs = (r.Errors ?? []).map((e) => e.Message || e.message || e.Code || JSON.stringify(e)).filter(Boolean);
|
|
57855
|
+
const msgs = (r.Errors ?? []).map((e) => e.ErrorMessage || e.Message || e.message || e.Code || JSON.stringify(e)).filter(Boolean);
|
|
57818
57856
|
const status = r.Status ? String(r.Status) : "ValidationFailed";
|
|
57819
57857
|
return new Error(msgs.length ? `eCore validation failed (HTTP ${httpStatus}, ${status}): ${msgs.join(" | ")}` : `eCore validation failed (HTTP ${httpStatus}, ${status}).`);
|
|
57820
57858
|
}
|
|
@@ -57917,7 +57955,7 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
57917
57955
|
}
|
|
57918
57956
|
return d.length >= 10 ? d.slice(0, 10) : d;
|
|
57919
57957
|
}
|
|
57920
|
-
if (isNaN(d.getTime())) {
|
|
57958
|
+
if (d instanceof Date && isNaN(d.getTime())) {
|
|
57921
57959
|
return "Not specified";
|
|
57922
57960
|
}
|
|
57923
57961
|
return d.toISOString().slice(0, 10);
|
|
@@ -58388,7 +58426,6 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
58388
58426
|
init_OntarioConstants();
|
|
58389
58427
|
init_address_utils();
|
|
58390
58428
|
init_address_utils();
|
|
58391
|
-
init_transform_utils();
|
|
58392
58429
|
ONTARIO_NAME_TYPE_OPTIONS = Object.values(NameType).filter((v) => typeof v === "number").map((v) => ({ label: NameTypeLabel[v], value: v }));
|
|
58393
58430
|
FORMATION_CARD_FORM_AFFILIATION_FIELDS_CANADIAN_NO_SUIT = [
|
|
58394
58431
|
{
|
|
@@ -58633,6 +58670,7 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
58633
58670
|
formControlName: FormationFormControls.CorporationNameType,
|
|
58634
58671
|
required: true,
|
|
58635
58672
|
options: ONTARIO_NAME_TYPE_OPTIONS,
|
|
58673
|
+
needTranslate: true,
|
|
58636
58674
|
onChange: (form) => {
|
|
58637
58675
|
const corporationNameType = form.get(FormationFormControls.CorporationNameType)?.value;
|
|
58638
58676
|
const isNumbered = corporationNameType === NameType.Numbered;
|
|
@@ -58805,7 +58843,11 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
58805
58843
|
form.get(FormationFormControls.StreetName)?.setValue(streetName, { emitEvent: false });
|
|
58806
58844
|
form.get(FormationFormControls.StreetNumber)?.setValue(streetNumberOnly, { emitEvent: false });
|
|
58807
58845
|
form.get(FormationFormControls.UnitNumber)?.setValue(suite ?? "", { emitEvent: false });
|
|
58808
|
-
form.get(FormationFormControls.
|
|
58846
|
+
form.get(FormationFormControls.City)?.setValue(address?.city ?? "", { emitEvent: false });
|
|
58847
|
+
form.get(FormationFormControls.Province)?.setValue(address?.province_state ?? "", { emitEvent: false });
|
|
58848
|
+
form.get(FormationFormControls.PostalCode)?.setValue(address?.postal_zip ?? "", { emitEvent: false });
|
|
58849
|
+
form.get(FormationFormControls.UnitType)?.setValue(normalizedCountryCode ?? "", { emitEvent: false });
|
|
58850
|
+
form.get(FormationFormControls.UnitType)?.setValue(address?.country ?? normalizedCountryCode ?? "", { emitEvent: false });
|
|
58809
58851
|
let affiliationAddressType;
|
|
58810
58852
|
if (isCanadian) {
|
|
58811
58853
|
affiliationAddressType = suite ? AffiliationAddressType.CanadianSuite : AffiliationAddressType.CanadianNoSuite;
|
|
@@ -58816,6 +58858,14 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
58816
58858
|
}
|
|
58817
58859
|
},
|
|
58818
58860
|
options: lawyerOptions
|
|
58861
|
+
},
|
|
58862
|
+
{
|
|
58863
|
+
type: FormType.Input,
|
|
58864
|
+
label: "Law Firm",
|
|
58865
|
+
formControlName: FormationFormControls.LawFirm,
|
|
58866
|
+
required: true,
|
|
58867
|
+
isVisible: (form) => Boolean(form.get(FormationFormControls.LawyerSigningOpinion)?.value),
|
|
58868
|
+
class: "span-12"
|
|
58819
58869
|
}
|
|
58820
58870
|
];
|
|
58821
58871
|
};
|
|
@@ -59015,12 +59065,13 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
59015
59065
|
}
|
|
59016
59066
|
static generateLegalOpinionConfirmAddressFormGroup(deltaData, affiliations) {
|
|
59017
59067
|
const affiliation = affiliations?.find((a) => a._id === deltaData?.lawyerSigning);
|
|
59068
|
+
const address = affiliation?.addresses?.at(0) || affiliation?.parent_affiliation?.addresses?.at(0);
|
|
59069
|
+
console.log("Affiliation for legal opinion address:", address);
|
|
59070
|
+
const normalizedCountryCode = normalizeCountryCode(address?.country);
|
|
59071
|
+
const suite = getAddressComponent(address, "Suite/Apartment");
|
|
59072
|
+
const isCanadian = normalizedCountryCode === "CA";
|
|
59018
59073
|
let affiliationAddressType = "";
|
|
59019
59074
|
if (affiliation) {
|
|
59020
|
-
const address = affiliation?.addresses.at(0) || affiliation?.parent_affiliation?.addresses?.at(0);
|
|
59021
|
-
const normalizedCountryCode = normalizeCountryCode(address?.country);
|
|
59022
|
-
const suite = getAddressComponent(address, "Suite/Apartment");
|
|
59023
|
-
const isCanadian = normalizedCountryCode === "CA";
|
|
59024
59075
|
if (isCanadian) {
|
|
59025
59076
|
affiliationAddressType = suite ? AffiliationAddressType.CanadianSuite : AffiliationAddressType.CanadianNoSuite;
|
|
59026
59077
|
} else {
|
|
@@ -59029,12 +59080,18 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
59029
59080
|
}
|
|
59030
59081
|
return new FormGroup({
|
|
59031
59082
|
[FormationFormControls.LawyerSigningOpinion]: new FormControl(deltaData?.lawyerSigning ?? "", Validators.required),
|
|
59083
|
+
[FormationFormControls.LawFirm]: new FormControl(deltaData?.lawFirm ?? "", requiredIf(FormationFormControls.LawyerSigningOpinion)),
|
|
59032
59084
|
[FormationFormControls.UnitType]: new FormControl(deltaData?.address?.unitType ?? "", requiredIf(IRFormControls.UnitNumber)),
|
|
59033
|
-
[FormationFormControls.UnitNumber]: new FormControl(deltaData?.address?.
|
|
59085
|
+
[FormationFormControls.UnitNumber]: new FormControl(deltaData?.address?.unitNumber ?? "", requiredIf(IRFormControls.UnitType)),
|
|
59034
59086
|
[FormationFormControls.StreetNumber]: new FormControl(deltaData?.address?.streetNumber ?? "", Validators.required),
|
|
59035
59087
|
[FormationFormControls.StreetName]: new FormControl(deltaData?.address?.streetName ?? "", Validators.required),
|
|
59036
59088
|
[FormationFormControls.StreetType]: new FormControl(deltaData?.address?.streetType ?? ""),
|
|
59037
59089
|
[FormationFormControls.StreetDirection]: new FormControl(deltaData?.address?.streetDirection ?? ""),
|
|
59090
|
+
[FormationFormControls.City]: new FormControl(address?.city ?? ""),
|
|
59091
|
+
[FormationFormControls.Province]: new FormControl(address?.province_state ?? ""),
|
|
59092
|
+
[FormationFormControls.PostalCode]: new FormControl(address?.postal_zip ?? ""),
|
|
59093
|
+
[FormationFormControls.CountryCode]: new FormControl(normalizedCountryCode ?? ""),
|
|
59094
|
+
[FormationFormControls.Country]: new FormControl(address?.country ?? normalizedCountryCode ?? ""),
|
|
59038
59095
|
[FormationFormControls.AffiliationAddressType]: new FormControl(affiliationAddressType)
|
|
59039
59096
|
});
|
|
59040
59097
|
}
|
|
@@ -59151,23 +59208,8 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
59151
59208
|
init_app_enums();
|
|
59152
59209
|
init_ontario_formation_form_constants();
|
|
59153
59210
|
OntarioUpdateMaintainFormHelper = class _OntarioUpdateMaintainFormHelper {
|
|
59154
|
-
static normalizePersonKey(value) {
|
|
59155
|
-
return (value ?? "").toLowerCase().replace(/\s+/g, " ").trim();
|
|
59156
|
-
}
|
|
59157
|
-
static getCurrentPersonData(comparisonData, affiliation) {
|
|
59158
|
-
const lookupName = _OntarioUpdateMaintainFormHelper.normalizePersonKey(generateAffiliationFullName(affiliation));
|
|
59159
|
-
if (!lookupName || !comparisonData?.persons?.size) {
|
|
59160
|
-
return void 0;
|
|
59161
|
-
}
|
|
59162
|
-
for (const [personKey, personData] of comparisonData.persons.entries()) {
|
|
59163
|
-
const normalizedKey = _OntarioUpdateMaintainFormHelper.normalizePersonKey(personKey);
|
|
59164
|
-
if (normalizedKey === lookupName || normalizedKey.startsWith(`${lookupName} -`)) {
|
|
59165
|
-
return personData;
|
|
59166
|
-
}
|
|
59167
|
-
}
|
|
59168
|
-
return void 0;
|
|
59169
|
-
}
|
|
59170
59211
|
static generateInitialForm(task, comparisonData) {
|
|
59212
|
+
const isFirsSubmit = isInitialReturn(task);
|
|
59171
59213
|
const config2 = {};
|
|
59172
59214
|
const { _ext, incomingAffiliations, outgoingAffiliations } = task;
|
|
59173
59215
|
const deltaData = task.deltaData;
|
|
@@ -59190,20 +59232,20 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
59190
59232
|
const directorDeltaData = deltaData?.directors ?? {};
|
|
59191
59233
|
config2[InitialReturnFillingFormGroups.Directors] = new FormArray([
|
|
59192
59234
|
...addedDirectors.map((admin) => {
|
|
59193
|
-
const form = _OntarioUpdateMaintainFormHelper.generateAffiliationForm(admin, IRAffiliationType.Add, comparisonData, directorDeltaData[admin._id]);
|
|
59235
|
+
const form = _OntarioUpdateMaintainFormHelper.generateAffiliationForm(admin, IRAffiliationType.Add, isFirsSubmit ? null : comparisonData, directorDeltaData[admin._id]);
|
|
59194
59236
|
form.addControl(IRFormControls.IsCanadianResident, new FormControl(directorDeltaData[admin._id]?.residentCanadian ?? false));
|
|
59195
59237
|
return form;
|
|
59196
59238
|
}),
|
|
59197
59239
|
...ceasedDirectors.map((admin) => {
|
|
59198
|
-
const form = _OntarioUpdateMaintainFormHelper.generateAffiliationForm(admin, IRAffiliationType.Ceased, comparisonData, directorDeltaData[admin._id]);
|
|
59240
|
+
const form = _OntarioUpdateMaintainFormHelper.generateAffiliationForm(admin, IRAffiliationType.Ceased, isFirsSubmit ? null : comparisonData, directorDeltaData[admin._id]);
|
|
59199
59241
|
form.addControl(IRFormControls.IsCanadianResident, new FormControl(directorDeltaData[admin._id]?.residentCanadian ?? false));
|
|
59200
59242
|
return form;
|
|
59201
59243
|
})
|
|
59202
59244
|
]);
|
|
59203
59245
|
const officerDeltaData = deltaData?.officers ?? {};
|
|
59204
59246
|
config2[InitialReturnFillingFormGroups.Officers] = new FormArray([
|
|
59205
|
-
...addedOfficers.map((admin) => _OntarioUpdateMaintainFormHelper.generateAffiliationForm(admin, IRAffiliationType.Add, comparisonData, officerDeltaData[admin._id])),
|
|
59206
|
-
...ceasedOfficers.map((admin) => _OntarioUpdateMaintainFormHelper.generateAffiliationForm(admin, IRAffiliationType.Ceased, comparisonData, officerDeltaData[admin._id]))
|
|
59247
|
+
...addedOfficers.map((admin) => _OntarioUpdateMaintainFormHelper.generateAffiliationForm(admin, IRAffiliationType.Add, isFirsSubmit ? null : comparisonData, officerDeltaData[admin._id])),
|
|
59248
|
+
...ceasedOfficers.map((admin) => _OntarioUpdateMaintainFormHelper.generateAffiliationForm(admin, IRAffiliationType.Ceased, isFirsSubmit ? null : comparisonData, officerDeltaData[admin._id]))
|
|
59207
59249
|
]);
|
|
59208
59250
|
if (cert) {
|
|
59209
59251
|
config2[InitialReturnFillingFormGroups.CertifiedBy] = _OntarioUpdateMaintainFormHelper.generateCertification(cert, deltaData?.certifiedBy);
|
|
@@ -59309,22 +59351,28 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
59309
59351
|
const emailAddress = affiliation.participant.communicationEmail ?? communications?.find((item) => item.type.toLowerCase().includes("email"))?.value;
|
|
59310
59352
|
const name = generateAffiliationFullName(affiliation);
|
|
59311
59353
|
const key = generateAffiliationKey(affiliation).toLowerCase();
|
|
59312
|
-
const currentData =
|
|
59354
|
+
const currentData = comparisonData?.persons.get(key);
|
|
59313
59355
|
let correctedAffiliationType = affiliationType;
|
|
59314
59356
|
let isThisChangeToAnExistingEntity = false;
|
|
59315
59357
|
let isThisChangeToAnExistingEntityVisible = false;
|
|
59316
|
-
if (
|
|
59317
|
-
if (deltaData
|
|
59318
|
-
|
|
59319
|
-
|
|
59320
|
-
|
|
59321
|
-
|
|
59322
|
-
} else {
|
|
59323
|
-
if (currentData) {
|
|
59358
|
+
if (affiliationType !== IRAffiliationType.Ceased) {
|
|
59359
|
+
if (deltaData) {
|
|
59360
|
+
if (deltaData.currentName && !currentData) {
|
|
59361
|
+
isThisChangeToAnExistingEntity = true;
|
|
59362
|
+
isThisChangeToAnExistingEntityVisible = true;
|
|
59363
|
+
}
|
|
59324
59364
|
correctedAffiliationType = IRAffiliationType.Update;
|
|
59325
59365
|
} else {
|
|
59326
|
-
|
|
59327
|
-
|
|
59366
|
+
if (currentData) {
|
|
59367
|
+
correctedAffiliationType = IRAffiliationType.Update;
|
|
59368
|
+
} else {
|
|
59369
|
+
const keys = Array.from(comparisonData?.persons.keys() ?? []);
|
|
59370
|
+
const keyLikeField = keys.find((item) => item.includes(name.toLowerCase()));
|
|
59371
|
+
if (keyLikeField) {
|
|
59372
|
+
isThisChangeToAnExistingEntity = false;
|
|
59373
|
+
isThisChangeToAnExistingEntityVisible = true;
|
|
59374
|
+
}
|
|
59375
|
+
}
|
|
59328
59376
|
}
|
|
59329
59377
|
}
|
|
59330
59378
|
const config2 = {
|
|
@@ -59335,7 +59383,7 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
59335
59383
|
[IRFormControls.CeaseDate]: new FormControl(affiliation.end_date ? toYyyyMmDd(affiliation.end_date) : ""),
|
|
59336
59384
|
[IRFormControls.Email]: new FormControl(emailAddress ?? ""),
|
|
59337
59385
|
[IRFormControls.AffiliationType]: new FormControl(correctedAffiliationType),
|
|
59338
|
-
[IRFormControls.CurrentName]: new FormControl(deltaData ? deltaData.currentName :
|
|
59386
|
+
[IRFormControls.CurrentName]: new FormControl(deltaData ? deltaData.currentName : currentData ? key : "", requiredIf(IRFormControls.IsThisChangeToAnExistingEntity)),
|
|
59339
59387
|
[IRFormControls.IsThisChangeToAnExistingEntity]: new FormControl(isThisChangeToAnExistingEntity),
|
|
59340
59388
|
[IRFormControls.IsThisChangeToAnExistingEntityVisible]: new FormControl(isThisChangeToAnExistingEntityVisible)
|
|
59341
59389
|
};
|
|
@@ -63090,7 +63138,7 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
63090
63138
|
MatIcon,
|
|
63091
63139
|
ChipComponent,
|
|
63092
63140
|
TranslatePipe
|
|
63093
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, animations: [
|
|
63141
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, animations: [
|
|
63094
63142
|
trigger("expandCollapse", [
|
|
63095
63143
|
state("true", style({
|
|
63096
63144
|
height: "*",
|
|
@@ -63150,7 +63198,7 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
63150
63198
|
}], () => [], null);
|
|
63151
63199
|
})();
|
|
63152
63200
|
(() => {
|
|
63153
|
-
(typeof ngDevMode === "undefined" || ngDevMode) && \u0275setClassDebugInfo(ExpandableCardComponent, { className: "ExpandableCardComponent", filePath: "src/app/components/expandable-card/expandable-card.component.ts", lineNumber:
|
|
63201
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && \u0275setClassDebugInfo(ExpandableCardComponent, { className: "ExpandableCardComponent", filePath: "src/app/components/expandable-card/expandable-card.component.ts", lineNumber: 38 });
|
|
63154
63202
|
})();
|
|
63155
63203
|
}
|
|
63156
63204
|
});
|
|
@@ -78587,9 +78635,10 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
78587
78635
|
}
|
|
78588
78636
|
if (rf & 2) {
|
|
78589
78637
|
const option_r5 = ctx.$implicit;
|
|
78638
|
+
const field_r3 = \u0275\u0275nextContext(3).$implicit;
|
|
78590
78639
|
\u0275\u0275property("value", option_r5.value);
|
|
78591
78640
|
\u0275\u0275advance();
|
|
78592
|
-
\u0275\u0275textInterpolate1(" ", \u0275\u0275pipeBind1(2, 2, option_r5.label), " ");
|
|
78641
|
+
\u0275\u0275textInterpolate1(" ", field_r3.needTranslate ? \u0275\u0275pipeBind1(2, 2, option_r5.label) : option_r5.label, " ");
|
|
78593
78642
|
}
|
|
78594
78643
|
}
|
|
78595
78644
|
function FilingFormGroupComponent_For_5_Conditional_0_Case_1_Conditional_10_Template(rf, ctx) {
|
|
@@ -79150,18 +79199,19 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
79150
79199
|
*/
|
|
79151
79200
|
getDisplayFn(field) {
|
|
79152
79201
|
const form = this.form();
|
|
79202
|
+
const translate = (label) => field.needTranslate ? this.translateService.instant(label) : label;
|
|
79153
79203
|
return (value) => {
|
|
79154
79204
|
if (value === null || value === void 0 || value === "")
|
|
79155
79205
|
return "";
|
|
79156
79206
|
const staticOpt = (field.options ?? []).find((o) => o.value === value);
|
|
79157
79207
|
if (staticOpt)
|
|
79158
|
-
return
|
|
79208
|
+
return translate(staticOpt.label);
|
|
79159
79209
|
if (field.dynamicOptions) {
|
|
79160
79210
|
const dynOpt = field.dynamicOptions(form).find((o) => o.value === value);
|
|
79161
79211
|
if (dynOpt)
|
|
79162
|
-
return
|
|
79212
|
+
return translate(dynOpt.label);
|
|
79163
79213
|
}
|
|
79164
|
-
return
|
|
79214
|
+
return translate(String(value));
|
|
79165
79215
|
};
|
|
79166
79216
|
}
|
|
79167
79217
|
/**
|
|
@@ -79303,7 +79353,7 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
79303
79353
|
class="filing-form-group-select-option"\r
|
|
79304
79354
|
[value]="option.value"\r
|
|
79305
79355
|
>\r
|
|
79306
|
-
{{ option.label | translate }}\r
|
|
79356
|
+
{{ field.needTranslate ? (option.label | translate) : option.label }}\r
|
|
79307
79357
|
</mat-option>\r
|
|
79308
79358
|
}\r
|
|
79309
79359
|
@if (getFilteredOptions(field).length === 0) {\r
|
|
@@ -80079,7 +80129,7 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
80079
80129
|
TranslatePipe,
|
|
80080
80130
|
FilingFormGroupComponent,
|
|
80081
80131
|
ExpandableCardComponent
|
|
80082
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, animations: [
|
|
80132
|
+
], standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, animations: [
|
|
80083
80133
|
trigger("expandCollapse", [
|
|
80084
80134
|
state("true", style({
|
|
80085
80135
|
height: "*",
|
|
@@ -80176,7 +80226,7 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
80176
80226
|
}], () => [], null);
|
|
80177
80227
|
})();
|
|
80178
80228
|
(() => {
|
|
80179
|
-
(typeof ngDevMode === "undefined" || ngDevMode) && \u0275setClassDebugInfo(ExpandableListCardComponent, { className: "ExpandableListCardComponent", filePath: "src/app/components/expandable-list-card/expandable-list-card.component.ts", lineNumber:
|
|
80229
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && \u0275setClassDebugInfo(ExpandableListCardComponent, { className: "ExpandableListCardComponent", filePath: "src/app/components/expandable-list-card/expandable-list-card.component.ts", lineNumber: 67 });
|
|
80180
80230
|
})();
|
|
80181
80231
|
}
|
|
80182
80232
|
});
|
|
@@ -82613,6 +82663,7 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
82613
82663
|
data.legalOpinion = {
|
|
82614
82664
|
wasLegalOpinionObtained: corpDetails?.[FormationFormControls.wasLegalOpinionObtained] ?? false,
|
|
82615
82665
|
lawyerSigning: legalOpinionData?.[FormationFormControls.LawyerSigningOpinion] ?? null,
|
|
82666
|
+
lawFirm: legalOpinionData?.[FormationFormControls.LawFirm] ?? null,
|
|
82616
82667
|
address: this.mapFormationAddressDelta(legalOpinionData)
|
|
82617
82668
|
};
|
|
82618
82669
|
}
|
|
@@ -87392,11 +87443,12 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
87392
87443
|
return { persons: personsMap, corporationInfo: { primaryActivity: "", email: "" } };
|
|
87393
87444
|
const initialAdministrators = corporationInfo.CurrentData.InitialAdministrators;
|
|
87394
87445
|
const fullName = (payload) => {
|
|
87446
|
+
console.log(payload);
|
|
87395
87447
|
return [
|
|
87396
87448
|
payload.PersonName.FirstName?.toLowerCase() ?? "",
|
|
87397
87449
|
payload.PersonName.MiddleName?.toLowerCase() ?? "",
|
|
87398
87450
|
payload.PersonName.LastName?.toLowerCase() ?? "",
|
|
87399
|
-
payload.OfficerPositionName?.toLowerCase() ?? ""
|
|
87451
|
+
payload.OfficerPositionName?.toLowerCase() ?? payload.PersonName.Position ?? ""
|
|
87400
87452
|
].filter(Boolean).join(" ");
|
|
87401
87453
|
};
|
|
87402
87454
|
const populatePersonsMap = (list) => {
|
|
@@ -87413,7 +87465,7 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
87413
87465
|
toTitleCase(payload.PersonName.MiddleName ?? ""),
|
|
87414
87466
|
toTitleCase(payload.PersonName.LastName ?? "")
|
|
87415
87467
|
].filter(Boolean).join(" ");
|
|
87416
|
-
personsMap.set(fullName(payload), __spreadProps(__spreadValues({}, deltaData), { email, ceasedRoles, position: payload.OfficerPositionName, fullName: name }));
|
|
87468
|
+
personsMap.set(fullName(payload), __spreadProps(__spreadValues({}, deltaData), { email, ceasedRoles, position: payload.OfficerPositionName?.toLowerCase() ?? payload.PersonName.Position ?? "", fullName: name }));
|
|
87417
87469
|
}
|
|
87418
87470
|
};
|
|
87419
87471
|
populatePersonsMap(initialAdministrators);
|
|
@@ -88118,11 +88170,23 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
88118
88170
|
const certStreetOnly = getAddressComponent(certEntityAddr, "Street Only");
|
|
88119
88171
|
const { StreetName: certStreetName, StreetType: certStreetType, StreetDirection: certStreetDir } = parseStreetAddress(certStreetOnly);
|
|
88120
88172
|
const isCanadianCertifierAddress = certifierCountry === "CA";
|
|
88173
|
+
const initialAdministratorForCertifier = initialAdministrators?.find((admin) => {
|
|
88174
|
+
if ((admin.PersonName.FirstName ?? "").toLowerCase() === (cert.firstName ?? "").toLowerCase() && (admin.PersonName.LastName ?? "").toLowerCase() === (cert.lastName ?? "").toLowerCase() && (admin.PersonName.MiddleName ?? "").toLowerCase() === (cert.middleName ?? "").toLowerCase()) {
|
|
88175
|
+
if (cert.type === "Director" && admin.IsDirector) {
|
|
88176
|
+
return admin;
|
|
88177
|
+
}
|
|
88178
|
+
if (cert.type !== "Director" && (cert.officerTitle === admin.OfficerPositionName || cert.officerTitle === admin.Position)) {
|
|
88179
|
+
return admin;
|
|
88180
|
+
}
|
|
88181
|
+
}
|
|
88182
|
+
return false;
|
|
88183
|
+
});
|
|
88121
88184
|
const certifier = {
|
|
88122
88185
|
PersonName: {
|
|
88123
88186
|
FirstName: cert.firstName,
|
|
88124
88187
|
LastName: cert.lastName,
|
|
88125
88188
|
MiddleName: cert.middleName,
|
|
88189
|
+
RoleId: initialAdministratorForCertifier?.RoleId,
|
|
88126
88190
|
Position: cert.type === "Officer" ? cert.officerTitle ?? null : null
|
|
88127
88191
|
},
|
|
88128
88192
|
PostCode: certEntityAddr?.postal_zip ?? null,
|
|
@@ -88928,7 +88992,7 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
88928
88992
|
validatedOn: /* @__PURE__ */ new Date(),
|
|
88929
88993
|
provider: "obr",
|
|
88930
88994
|
draftPdf,
|
|
88931
|
-
documentName: this.validateOptions()?.documentName ??
|
|
88995
|
+
documentName: this.validateOptions()?.documentName ?? this.getUpdateMaintainDraftName(task),
|
|
88932
88996
|
documentType: "pdf"
|
|
88933
88997
|
});
|
|
88934
88998
|
}
|
|
@@ -88941,6 +89005,15 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
88941
89005
|
}
|
|
88942
89006
|
});
|
|
88943
89007
|
}
|
|
89008
|
+
getUpdateMaintainDraftName(task) {
|
|
89009
|
+
if (isNoticeOfChangeTask(task)) {
|
|
89010
|
+
return "Notice of Change Draft";
|
|
89011
|
+
}
|
|
89012
|
+
if (isAnnualReturnTask(task)) {
|
|
89013
|
+
return "Annual Return Draft";
|
|
89014
|
+
}
|
|
89015
|
+
return "Initial Return Draft";
|
|
89016
|
+
}
|
|
88944
89017
|
onEditClick() {
|
|
88945
89018
|
if (isUpdateMaintain(this.task())) {
|
|
88946
89019
|
this.serviceOrderId = "";
|
|
@@ -88949,7 +89022,7 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
88949
89022
|
this.activeStep.set(Step.Validate);
|
|
88950
89023
|
}
|
|
88951
89024
|
parseError(errors) {
|
|
88952
|
-
return errors.map((item) => (item["ErrorMessage"] ?? item["Message"] ?? "").toString());
|
|
89025
|
+
return errors.map((item) => (item["ErrorMessage"] ?? item["Message"] ?? "").toString().trim()).filter((message) => message.length > 0);
|
|
88953
89026
|
}
|
|
88954
89027
|
/**
|
|
88955
89028
|
* Checks a successful response for validation errors.
|
|
@@ -88968,9 +89041,13 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
88968
89041
|
*/
|
|
88969
89042
|
handleCatchError(response) {
|
|
88970
89043
|
console.error(response);
|
|
88971
|
-
|
|
88972
|
-
|
|
88973
|
-
|
|
89044
|
+
const validateErrors = response?.validateResult?.["Errors"];
|
|
89045
|
+
if (validateErrors?.length) {
|
|
89046
|
+
const messages = this.parseError(validateErrors);
|
|
89047
|
+
if (messages.length) {
|
|
89048
|
+
this.errors.set(messages);
|
|
89049
|
+
return;
|
|
89050
|
+
}
|
|
88974
89051
|
}
|
|
88975
89052
|
let parsed = response;
|
|
88976
89053
|
try {
|
|
@@ -93717,6 +93794,7 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
93717
93794
|
"A legal opinion was obtained to use the proposed name": "A legal opinion was obtained to use the proposed name",
|
|
93718
93795
|
"Legal Opinion": "Legal Opinion",
|
|
93719
93796
|
"Lawyer Signing Opinion": "Lawyer Signing Opinion",
|
|
93797
|
+
"Law Firm": "Law Firm",
|
|
93720
93798
|
"Laywer Signing Opinion is required": "Laywer Signing Opinion is required",
|
|
93721
93799
|
"Unit Type is required": "Unit Type is required",
|
|
93722
93800
|
"Unit Number is required": "Unit Number is required",
|
|
@@ -93985,6 +94063,7 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
93985
94063
|
"A legal opinion was obtained to use the proposed name": "Un avis juridique a \xE9t\xE9 obtenu concernant l'utilisation du nom propos\xE9",
|
|
93986
94064
|
"Legal Opinion": "Avis juridique",
|
|
93987
94065
|
"Lawyer Signing Opinion": "Avocat signataire de l'avis",
|
|
94066
|
+
"Law Firm": "Cabinet d'avocats",
|
|
93988
94067
|
"Laywer Signing Opinion is required": "L'avocat signataire de l'avis est requis",
|
|
93989
94068
|
"Unit Type is required": "Le type d'unit\xE9 est requis",
|
|
93990
94069
|
"Unit Number is required": "Le num\xE9ro d'unit\xE9 est requis",
|