@dyedurham/search-and-file-widget 2.0.89 → 2.0.90
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 +7 -33
- package/package.json +1 -1
package/dnd-filing-shell.js
CHANGED
|
@@ -95584,25 +95584,9 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
95584
95584
|
function getBritishColumbiaAccessCode(task) {
|
|
95585
95585
|
return task.entity._profile.registry_id?.trim() ?? "";
|
|
95586
95586
|
}
|
|
95587
|
-
function findBCChangeOfOfficeAddressesRequestIssues(request, accessCode) {
|
|
95588
|
-
const issues = [];
|
|
95589
|
-
const email = request.filing.companyEmail?.trim() ?? "";
|
|
95590
|
-
if (!email) {
|
|
95591
|
-
issues.push("The company email is missing on the entity. Add a Business Email to the entity.");
|
|
95592
|
-
} else if (email.length > BC_COMPANY_EMAIL_MAX_LENGTH) {
|
|
95593
|
-
issues.push(`The company email must be ${BC_COMPANY_EMAIL_MAX_LENGTH} characters or fewer.`);
|
|
95594
|
-
} else if (!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(email)) {
|
|
95595
|
-
issues.push("The company email on the entity is not a valid email address.");
|
|
95596
|
-
}
|
|
95597
|
-
if (!BC_PASSWORD_PATTERN.test(accessCode)) {
|
|
95598
|
-
issues.push("The company's BC Online access code or password (the entity's registry ID) is missing or contains characters other than letters and numbers.");
|
|
95599
|
-
}
|
|
95600
|
-
return issues;
|
|
95601
|
-
}
|
|
95602
95587
|
var BC_PROVINCE_CODE, CANADA_COUNTRY_CODE, clean;
|
|
95603
95588
|
var init_british_columbia_change_of_office_addresses_mapper = __esm({
|
|
95604
95589
|
"src/app/helpers/mappers/british-columbia-change-of-office-addresses.mapper.ts"() {
|
|
95605
|
-
init_BritishColumbiaConstants();
|
|
95606
95590
|
init_british_columbia_change_of_office_addresses_form_helper();
|
|
95607
95591
|
BC_PROVINCE_CODE = "BC";
|
|
95608
95592
|
CANADA_COUNTRY_CODE = "CA";
|
|
@@ -96263,25 +96247,15 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
96263
96247
|
if (!task || !signature) {
|
|
96264
96248
|
throw new Error("The filing is not ready yet. Please try again.");
|
|
96265
96249
|
}
|
|
96266
|
-
const companyPassword = getBritishColumbiaAccessCode(task);
|
|
96267
|
-
const requestBody = buildBCChangeOfOfficeAddressesValidateRequest(task, deltaData);
|
|
96268
|
-
const issues = findBCChangeOfOfficeAddressesRequestIssues(requestBody, companyPassword);
|
|
96269
|
-
if (issues.length) {
|
|
96270
|
-
this.errors.set(issues);
|
|
96271
|
-
return;
|
|
96272
|
-
}
|
|
96273
|
-
const corporationNumber = task.entity._profile.corp_number;
|
|
96274
|
-
const incorporationDate = String(task.entity._compliance?.incorporation_date ?? "").slice(0, 10);
|
|
96275
|
-
if (!corporationNumber) {
|
|
96276
|
-
throw new Error("The entity has no Incorporation Number. Add it to the entity before filing.");
|
|
96277
|
-
}
|
|
96278
|
-
if (!/^\d{4}-\d{2}-\d{2}$/.test(incorporationDate)) {
|
|
96279
|
-
throw new Error("The entity has no incorporation date. Add it to the entity before filing.");
|
|
96280
|
-
}
|
|
96281
96250
|
this.isLoading.set(true);
|
|
96282
96251
|
this.errors.set([]);
|
|
96252
|
+
const requestBody = buildBCChangeOfOfficeAddressesValidateRequest(task, deltaData);
|
|
96283
96253
|
const opts = this.validateOptions() ?? {};
|
|
96284
|
-
const context2 = {
|
|
96254
|
+
const context2 = {
|
|
96255
|
+
corporationNumber: task.entity._profile.corp_number ?? "",
|
|
96256
|
+
accessCodeOrPassword: getBritishColumbiaAccessCode(task),
|
|
96257
|
+
incorporationDate: String(task.entity._compliance?.incorporation_date ?? "").slice(0, 10)
|
|
96258
|
+
};
|
|
96285
96259
|
const extractId = yield this.bcMaintenanceService.orderCurrentDataExtract(signature, context2, opts);
|
|
96286
96260
|
yield this.bcMaintenanceService.waitForCurrentDataExtract(signature, extractId, opts);
|
|
96287
96261
|
const response = yield this.bcMaintenanceService.validate(signature, requestBody, extractId, context2, opts);
|
|
@@ -96893,7 +96867,7 @@ Note: Recommended intrinsic image size is calculated assuming a maximum DPR of $
|
|
|
96893
96867
|
}], () => [], null);
|
|
96894
96868
|
})();
|
|
96895
96869
|
(() => {
|
|
96896
|
-
(typeof ngDevMode === "undefined" || ngDevMode) && \u0275setClassDebugInfo(FilingComponent, { className: "FilingComponent", filePath: "src/app/components/filing/filing.component.ts", lineNumber:
|
|
96870
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && \u0275setClassDebugInfo(FilingComponent, { className: "FilingComponent", filePath: "src/app/components/filing/filing.component.ts", lineNumber: 93 });
|
|
96897
96871
|
})();
|
|
96898
96872
|
}
|
|
96899
96873
|
});
|