diff --git a/alcs-frontend/src/app/features/application/decision/decision.component.html b/alcs-frontend/src/app/features/application/decision/decision.component.html index 22436d8883..51c5de2e2c 100644 --- a/alcs-frontend/src/app/features/application/decision/decision.component.html +++ b/alcs-frontend/src/app/features/application/decision/decision.component.html @@ -1,6 +1,6 @@
- +
diff --git a/alcs-frontend/src/app/features/application/intake/intake.component.html b/alcs-frontend/src/app/features/application/intake/intake.component.html index 3d16d4982b..fda4559697 100644 --- a/alcs-frontend/src/app/features/application/intake/intake.component.html +++ b/alcs-frontend/src/app/features/application/intake/intake.component.html @@ -8,7 +8,7 @@
Submitted to ALC
[required]="true" > -
+
Payment
@@ -41,7 +41,7 @@
Payment
-
+
Payment Date
Application Prep -
+
Proposal Components - {{ application?.type?.label }}
diff --git a/alcs-frontend/src/app/features/notice-of-intent/proposal/proposal.component.html b/alcs-frontend/src/app/features/notice-of-intent/proposal/proposal.component.html index aeed51b1ba..400f9c73a4 100644 --- a/alcs-frontend/src/app/features/notice-of-intent/proposal/proposal.component.html +++ b/alcs-frontend/src/app/features/notice-of-intent/proposal/proposal.component.html @@ -1,5 +1,5 @@

Notice of Intent Prep

-
+
Proposal Components - {{ noticeOfIntent?.type?.label }}
diff --git a/bin/migrate-oats-data/applications/decisions/application_decisions_init.py b/bin/migrate-oats-data/applications/decisions/application_decisions_init.py index b9d2e86268..458e572d06 100644 --- a/bin/migrate-oats-data/applications/decisions/application_decisions_init.py +++ b/bin/migrate-oats-data/applications/decisions/application_decisions_init.py @@ -112,7 +112,7 @@ def _get_insert_query(): %(created_at)s, %(date)s, %(decision_description)s, - false, + true, false, %(outcome_code)s, %(rescinded_comment)s, @@ -133,6 +133,9 @@ def _get_insert_query(): rescinded_comment = COALESCE(EXCLUDED.rescinded_comment, alcs.application_decision.rescinded_comment), rescinded_date = COALESCE(EXCLUDED.rescinded_date, alcs.application_decision.rescinded_date), is_subject_to_conditions = COALESCE(EXCLUDED.is_subject_to_conditions, alcs.application_decision.is_subject_to_conditions), + was_released = True, + is_draft = False, + chair_review_required = COALESCE(EXCLUDED.chair_review_required, true), oats_alr_appl_decision_id = EXCLUDED.oats_alr_appl_decision_id; """ return query diff --git a/bin/migrate-oats-data/applications/migrate_application.py b/bin/migrate-oats-data/applications/migrate_application.py index 4e2422bfae..58548d3ae9 100644 --- a/bin/migrate-oats-data/applications/migrate_application.py +++ b/bin/migrate-oats-data/applications/migrate_application.py @@ -50,12 +50,16 @@ ) from .set_application_visibility import set_application_visibility + +from .update_app_created_date import update_application_created_date + from .application_decision_date import process_alcs_application_decision_date def process_application_etl(batch_size): process_alcs_application_prep_fields(batch_size) update_application_date_rx_all_items(batch_size) + update_application_created_date(batch_size) process_alcs_app_submissions(batch_size) update_application_submissions() insert_application_submission_review(batch_size) diff --git a/bin/migrate-oats-data/applications/sql/application_created_date_update.sql b/bin/migrate-oats-data/applications/sql/application_created_date_update.sql new file mode 100644 index 0000000000..127fc11483 --- /dev/null +++ b/bin/migrate-oats-data/applications/sql/application_created_date_update.sql @@ -0,0 +1,3 @@ +SELECT oaa.created_date, oaa.alr_application_id, a.audit_created_by, oaa.when_created +FROM oats.oats_alr_applications oaa +JOIN alcs.application a ON a.file_number = oaa.alr_application_id::TEXT \ No newline at end of file diff --git a/bin/migrate-oats-data/applications/sql/application_created_date_update_count.sql b/bin/migrate-oats-data/applications/sql/application_created_date_update_count.sql new file mode 100644 index 0000000000..ec99bf1a9d --- /dev/null +++ b/bin/migrate-oats-data/applications/sql/application_created_date_update_count.sql @@ -0,0 +1,3 @@ +SELECT count(*) +FROM oats.oats_alr_applications oaa +JOIN alcs.application a ON a.file_number = oaa.alr_application_id::TEXT \ No newline at end of file diff --git a/bin/migrate-oats-data/applications/update_app_created_date.py b/bin/migrate-oats-data/applications/update_app_created_date.py new file mode 100644 index 0000000000..fcf11d6f58 --- /dev/null +++ b/bin/migrate-oats-data/applications/update_app_created_date.py @@ -0,0 +1,116 @@ +from common import ( + setup_and_get_logger, + add_timezone_and_keep_date_part, + BATCH_UPLOAD_SIZE +) +from db import inject_conn_pool +from psycopg2.extras import RealDictCursor, execute_batch + +etl_name = "update_application_created_date" +logger = setup_and_get_logger(etl_name) + + +@inject_conn_pool +def update_application_created_date(conn=None, batch_size=BATCH_UPLOAD_SIZE): + """ + This function is responsible for updating existing the application created_at_date in ALCS. + + Args: + conn (psycopg2.extensions.connection): PostgreSQL database connection. Provided by the decorator. + batch_size (int): The number of items to process at once. Defaults to BATCH_UPLOAD_SIZE. + """ + + logger.info(f"Start {etl_name}") + with conn.cursor(cursor_factory=RealDictCursor) as cursor: + with open( + "applications/sql/application_created_date_update_count.sql", + "r", + encoding="utf-8", + ) as sql_file: + count_query = sql_file.read() + cursor.execute(count_query) + count_total = dict(cursor.fetchone())["count"] + logger.info(f"Total Application data to be updated: {count_total}") + + failed_updates_count = 0 + successful_updates_count = 0 + last_application_id = 0 + + with open( + "applications/sql/application_created_date_update.sql", + "r", + encoding="utf-8", + ) as sql_file: + query = sql_file.read() + while True: + cursor.execute( + f"""{query} + WHERE oaa.alr_application_id > {last_application_id} ORDER BY oaa.alr_application_id;""" + ) + + rows = cursor.fetchmany(batch_size) + + if not rows: + break + try: + conditions_to_be_updated_count = len(rows) + + _update_application_created_at_date(conn, batch_size, cursor, rows) + + successful_updates_count = ( + successful_updates_count + conditions_to_be_updated_count + ) + last_application_id = dict(rows[-1])["alr_application_id"] + + logger.debug( + f"retrieved/updated items count: {conditions_to_be_updated_count}; total successfully updated applications so far {successful_updates_count}; last updated application: {last_application_id}" + ) + except Exception as err: + logger.exception(err) + conn.rollback() + failed_updates_count = count_total - successful_updates_count + last_application_id = last_application_id + 1 + + logger.info( + f"Finished {etl_name}: total amount of successful updates {successful_updates_count}, total failed updates {failed_updates_count}" + ) + + +def _update_application_created_at_date(conn, batch_size, cursor, rows): + data = _prepare_oats_alr_applications_data(rows) + + if len(data) > 0: + execute_batch( + cursor, + _get_update_query(), + data, + page_size=batch_size, + ) + + conn.commit() + + +def _get_update_query(): + query = f""" + UPDATE alcs.application + SET created_at = %(date_to_insert)s + WHERE alcs.application.file_number = %(alr_application_id)s::TEXT; + """ + return query + + +def _prepare_oats_alr_applications_data(row_data_list): + data_list = [] + date_to_insert = None + for row in row_data_list: + if row.get("created_date"): + date_to_insert = row.get("created_date") + else: + date_to_insert = row.get("when_created") + mapped_row = { + "date_to_insert": add_timezone_and_keep_date_part(date_to_insert), + "alr_application_id": row.get("alr_application_id"), + } + data_list.append(mapped_row) + + return data_list diff --git a/bin/migrate-oats-data/noi/noi_decisions/notice_of_intent_decisions_init.py b/bin/migrate-oats-data/noi/noi_decisions/notice_of_intent_decisions_init.py index f6252e78d6..81eb9d0646 100644 --- a/bin/migrate-oats-data/noi/noi_decisions/notice_of_intent_decisions_init.py +++ b/bin/migrate-oats-data/noi/noi_decisions/notice_of_intent_decisions_init.py @@ -2,7 +2,7 @@ OATS_ETL_USER, setup_and_get_logger, add_timezone_and_keep_date_part, - BATCH_UPLOAD_SIZE + BATCH_UPLOAD_SIZE, ) from db import inject_conn_pool from psycopg2.extras import RealDictCursor, execute_batch @@ -133,6 +133,8 @@ def _get_insert_query(): rescinded_comment = COALESCE(EXCLUDED.rescinded_comment, alcs.notice_of_intent_decision.rescinded_comment), rescinded_date = COALESCE(EXCLUDED.rescinded_date, alcs.notice_of_intent_decision.rescinded_date), is_subject_to_conditions = COALESCE(EXCLUDED.is_subject_to_conditions, alcs.notice_of_intent_decision.is_subject_to_conditions), + was_released = True, + is_draft = False, oats_alr_appl_decision_id = EXCLUDED.oats_alr_appl_decision_id; """ return query diff --git a/bin/migrate-oats-data/noi/notice_of_intent_migration.py b/bin/migrate-oats-data/noi/notice_of_intent_migration.py index 776e074801..d61a9f2e79 100644 --- a/bin/migrate-oats-data/noi/notice_of_intent_migration.py +++ b/bin/migrate-oats-data/noi/notice_of_intent_migration.py @@ -28,6 +28,7 @@ from .oats_to_alcs_notice_of_intent_table_etl.notice_of_intent_rx_all_items import ( update_notice_of_intent_date_rx_all_items, ) +from .oats_to_alcs_notice_of_intent_table_etl.update_notice_of_intent_created_date import update_noi_created_date from .notice_of_intent_submissions.parcels import ( init_notice_of_intent_parcels, @@ -131,6 +132,8 @@ def process_notice_of_intent(batch_size): update_notice_of_intent_date_rx_all_items(batch_size) + update_noi_created_date(batch_size) + process_alcs_notice_of_intent_decision_date(batch_size) init_notice_of_intent_submissions(batch_size) diff --git a/bin/migrate-oats-data/noi/oats_to_alcs_notice_of_intent_table_etl/__init__.py b/bin/migrate-oats-data/noi/oats_to_alcs_notice_of_intent_table_etl/__init__.py index 3de24653c3..cc728f40db 100644 --- a/bin/migrate-oats-data/noi/oats_to_alcs_notice_of_intent_table_etl/__init__.py +++ b/bin/migrate-oats-data/noi/oats_to_alcs_notice_of_intent_table_etl/__init__.py @@ -2,3 +2,4 @@ process_alcs_notice_of_intent_base_fields, ) from .notice_of_intent_rx_all_items import update_notice_of_intent_date_rx_all_items +from .update_notice_of_intent_created_date import update_noi_created_date \ No newline at end of file diff --git a/bin/migrate-oats-data/noi/oats_to_alcs_notice_of_intent_table_etl/update_notice_of_intent_created_date.py b/bin/migrate-oats-data/noi/oats_to_alcs_notice_of_intent_table_etl/update_notice_of_intent_created_date.py new file mode 100644 index 0000000000..4ebd6ab614 --- /dev/null +++ b/bin/migrate-oats-data/noi/oats_to_alcs_notice_of_intent_table_etl/update_notice_of_intent_created_date.py @@ -0,0 +1,116 @@ +from common import ( + setup_and_get_logger, + add_timezone_and_keep_date_part, + BATCH_UPLOAD_SIZE +) +from db import inject_conn_pool +from psycopg2.extras import RealDictCursor, execute_batch + +etl_name = "update_notice_of_intent_created_date" +logger = setup_and_get_logger(etl_name) + + +@inject_conn_pool +def update_noi_created_date(conn=None, batch_size=BATCH_UPLOAD_SIZE): + """ + This function is responsible for updating existing the notice_of_intent created_at_date in ALCS. + + Args: + conn (psycopg2.extensions.connection): PostgreSQL database connection. Provided by the decorator. + batch_size (int): The number of items to process at once. Defaults to BATCH_UPLOAD_SIZE. + """ + + logger.info(f"Start {etl_name}") + with conn.cursor(cursor_factory=RealDictCursor) as cursor: + with open( + "noi/sql/notice_of_intent_base/notice_of_intent_created_date_update_count.sql", + "r", + encoding="utf-8", + ) as sql_file: + count_query = sql_file.read() + cursor.execute(count_query) + count_total = dict(cursor.fetchone())["count"] + logger.info(f"Total Notice of Intent data to be updated: {count_total}") + + failed_updates_count = 0 + successful_updates_count = 0 + last_application_id = 0 + + with open( + "noi/sql/notice_of_intent_base/notice_of_intent_created_date_update.sql", + "r", + encoding="utf-8", + ) as sql_file: + query = sql_file.read() + while True: + cursor.execute( + f"""{query} + WHERE oaa.alr_application_id > {last_application_id} ORDER BY oaa.alr_application_id;""" + ) + + rows = cursor.fetchmany(batch_size) + + if not rows: + break + try: + conditions_to_be_updated_count = len(rows) + + _update_notice_of_intent_created_at_date(conn, batch_size, cursor, rows) + + successful_updates_count = ( + successful_updates_count + conditions_to_be_updated_count + ) + last_application_id = dict(rows[-1])["alr_application_id"] + + logger.debug( + f"retrieved/updated items count: {conditions_to_be_updated_count}; total successfully updated notice of intents so far {successful_updates_count}; last updated notice of intent: {last_application_id}" + ) + except Exception as err: + logger.exception(err) + conn.rollback() + failed_updates_count = count_total - successful_updates_count + last_application_id = last_application_id + 1 + + logger.info( + f"Finished {etl_name}: total amount of successful updates {successful_updates_count}, total failed updates {failed_updates_count}" + ) + + +def _update_notice_of_intent_created_at_date(conn, batch_size, cursor, rows): + data = _prepare_oats_alr_notice_of_intents_data(rows) + + if len(data) > 0: + execute_batch( + cursor, + _get_update_query(), + data, + page_size=batch_size, + ) + + conn.commit() + + +def _get_update_query(): + query = f""" + UPDATE alcs.notice_of_intent + SET created_at = %(date_to_insert)s + WHERE alcs.notice_of_intent.file_number = %(alr_application_id)s::TEXT; + """ + return query + + +def _prepare_oats_alr_notice_of_intents_data(row_data_list): + data_list = [] + date_to_insert = None + for row in row_data_list: + if row.get("created_date"): + date_to_insert = row.get("created_date") + else: + date_to_insert = row.get("when_created") + mapped_row = { + "date_to_insert": add_timezone_and_keep_date_part(date_to_insert), + "alr_application_id": row.get("alr_application_id"), + } + data_list.append(mapped_row) + + return data_list diff --git a/bin/migrate-oats-data/noi/sql/notice_of_intent_base/notice_of_intent_created_date_update.sql b/bin/migrate-oats-data/noi/sql/notice_of_intent_base/notice_of_intent_created_date_update.sql new file mode 100644 index 0000000000..761871311e --- /dev/null +++ b/bin/migrate-oats-data/noi/sql/notice_of_intent_base/notice_of_intent_created_date_update.sql @@ -0,0 +1,3 @@ +SELECT oaa.created_date, oaa.alr_application_id, oaa.when_created +FROM oats.oats_alr_applications oaa +JOIN alcs.notice_of_intent noi ON noi.file_number = oaa.alr_application_id::TEXT \ No newline at end of file diff --git a/bin/migrate-oats-data/noi/sql/notice_of_intent_base/notice_of_intent_created_date_update_count.sql b/bin/migrate-oats-data/noi/sql/notice_of_intent_base/notice_of_intent_created_date_update_count.sql new file mode 100644 index 0000000000..4ea5708d7e --- /dev/null +++ b/bin/migrate-oats-data/noi/sql/notice_of_intent_base/notice_of_intent_created_date_update_count.sql @@ -0,0 +1,3 @@ +SELECT count(*) +FROM oats.oats_alr_applications oaa +JOIN alcs.notice_of_intent noi ON noi.file_number = oaa.alr_application_id::TEXT \ No newline at end of file diff --git a/portal-frontend/src/app/features/applications/application-details/application-details.component.html b/portal-frontend/src/app/features/applications/application-details/application-details.component.html index c5ab3c914e..0a4cd6716b 100644 --- a/portal-frontend/src/app/features/applications/application-details/application-details.component.html +++ b/portal-frontend/src/app/features/applications/application-details/application-details.component.html @@ -71,7 +71,7 @@

3. Primary Contact

Phone
- {{ primaryContact?.phoneNumber }} + {{ primaryContact?.phoneNumber ?? '' | mask : '(000) 000-0000' }} Invalid FormatGovernment
Phone
- {{ parcel.owners[0].phoneNumber }} + {{ parcel.owners[0].phoneNumber ?? '' | mask : '(000) 000-0000' }}
Email
@@ -170,7 +170,7 @@
Government {{ owner.organizationName }}
-
{{ owner.phoneNumber }}
+
{{ owner.phoneNumber ?? '' | mask : '(000) 000-0000' }}
{{ owner.email }}
{{ diff --git a/portal-frontend/src/app/features/applications/edit-submission/parcel-details/parcel-entry/parcel-entry.component.html b/portal-frontend/src/app/features/applications/edit-submission/parcel-details/parcel-entry/parcel-entry.component.html index 8364019faa..9abc57fe4e 100644 --- a/portal-frontend/src/app/features/applications/edit-submission/parcel-details/parcel-entry/parcel-entry.component.html +++ b/portal-frontend/src/app/features/applications/edit-submission/parcel-details/parcel-entry/parcel-entry.component.html @@ -236,7 +236,7 @@
Government Parcel Contact
[submissionUuid]="submissionUuid" [parcelUuid]="parcel.uuid" [owners]="parcel.owners" - (onOwnersUpdated)="onOwnersUpdated.emit()" + (onOwnersUpdated)="onEditOwner()" (onOwnerRemoved)="onRemoveOwner($event)" (onOwnersDeleted)="onDeleteOwner()" [documentService]="applicationDocumentService" @@ -338,7 +338,7 @@
OR
Phone Number:
-
{{ selectedOwner.phoneNumber }}
+
{{ selectedOwner.phoneNumber ?? '' | mask : '(000) 000-0000' }}
Email:
diff --git a/portal-frontend/src/app/features/applications/edit-submission/parcel-details/parcel-entry/parcel-entry.component.ts b/portal-frontend/src/app/features/applications/edit-submission/parcel-details/parcel-entry/parcel-entry.component.ts index 3144eea5f5..18d869091b 100644 --- a/portal-frontend/src/app/features/applications/edit-submission/parcel-details/parcel-entry/parcel-entry.component.ts +++ b/portal-frontend/src/app/features/applications/edit-submission/parcel-details/parcel-entry/parcel-entry.component.ts @@ -411,6 +411,16 @@ export class ParcelEntryComponent implements OnInit { }); } + onEditOwner() { + this.parcelForm.patchValue( + { + isConfirmedByApplicant: false, + }, + { emitEvent: false } + ); + this.onOwnersUpdated.emit(); + } + onEditCrownOwner(owner: ApplicationOwnerDto) { let dialog; dialog = this.dialog.open(CrownOwnerDialogComponent, { @@ -424,6 +434,13 @@ export class ParcelEntryComponent implements OnInit { }); dialog.afterClosed().subscribe((result) => { if (result) { + this.parcelForm.patchValue( + { + isConfirmedByApplicant: false, + }, + { emitEvent: false } + ); + this.onOwnersUpdated.emit(); if (result.type === 'delete') { this.onRemoveOwner(result.uuid); @@ -584,6 +601,13 @@ export class ParcelEntryComponent implements OnInit { this.ownerInput.enable(); } + this.parcelForm.patchValue( + { + isConfirmedByApplicant: false, + }, + { emitEvent: false } + ); + this.parcel.owners = updatedArray; this.filteredOwners = this.mapOwners(this.owners); this.onFormGroupChange.emit({ diff --git a/portal-frontend/src/app/features/applications/edit-submission/primary-contact/primary-contact.component.html b/portal-frontend/src/app/features/applications/edit-submission/primary-contact/primary-contact.component.html index 73e0f98faa..0b785f50e9 100644 --- a/portal-frontend/src/app/features/applications/edit-submission/primary-contact/primary-contact.component.html +++ b/portal-frontend/src/app/features/applications/edit-submission/primary-contact/primary-contact.component.html @@ -82,7 +82,7 @@

Primary Contact

Phone Number:
-
{{ phoneNumber.value }}
+
{{ phoneNumber.value ?? '' | mask : '(000) 000-0000' }}
Email:
diff --git a/portal-frontend/src/app/features/applications/edit-submission/proposal/naru-proposal/naru-proposal.component.html b/portal-frontend/src/app/features/applications/edit-submission/proposal/naru-proposal/naru-proposal.component.html index 2d319ee6ca..97f2f28415 100644 --- a/portal-frontend/src/app/features/applications/edit-submission/proposal/naru-proposal/naru-proposal.component.html +++ b/portal-frontend/src/app/features/applications/edit-submission/proposal/naru-proposal/naru-proposal.component.html @@ -555,8 +555,9 @@

Soil & Fill Components

diff --git a/portal-frontend/src/app/features/applications/edit-submission/proposal/nfu-proposal/nfu-proposal.component.html b/portal-frontend/src/app/features/applications/edit-submission/proposal/nfu-proposal/nfu-proposal.component.html index 45a39b296a..3d1f77e8a8 100644 --- a/portal-frontend/src/app/features/applications/edit-submission/proposal/nfu-proposal/nfu-proposal.component.html +++ b/portal-frontend/src/app/features/applications/edit-submission/proposal/nfu-proposal/nfu-proposal.component.html @@ -217,8 +217,9 @@

Soil & Fill Components

diff --git a/portal-frontend/src/app/features/applications/edit-submission/proposal/pfrs-proposal/pfrs-proposal.component.html b/portal-frontend/src/app/features/applications/edit-submission/proposal/pfrs-proposal/pfrs-proposal.component.html index b0c2855a7f..b9fdf04b5a 100644 --- a/portal-frontend/src/app/features/applications/edit-submission/proposal/pfrs-proposal/pfrs-proposal.component.html +++ b/portal-frontend/src/app/features/applications/edit-submission/proposal/pfrs-proposal/pfrs-proposal.component.html @@ -155,6 +155,7 @@

Proposal

*ngIf="!isMobile" tableHeader="Soil to be Removed" tableHeader2="Fill to be Placed" + [touchAll]="showErrors" [(data)]="removalTableData" [(data2)]="fillTableData" (dataChange)="markDirty()" @@ -163,12 +164,14 @@

Proposal

@@ -182,6 +185,7 @@

Proposal

*ngIf="!isMobile" tableHeader="Soil already Removed" tableHeader2="Fill already Placed" + [touchAll]="showErrors" [(data)]="alreadyRemovedTableData" [(data2)]="alreadyFilledTableData" (dataChange)="markDirty()" @@ -190,12 +194,14 @@

Proposal

diff --git a/portal-frontend/src/app/features/applications/edit-submission/proposal/pofo-proposal/pofo-proposal.component.html b/portal-frontend/src/app/features/applications/edit-submission/proposal/pofo-proposal/pofo-proposal.component.html index ed2e8b026d..b946ad6f53 100644 --- a/portal-frontend/src/app/features/applications/edit-submission/proposal/pofo-proposal/pofo-proposal.component.html +++ b/portal-frontend/src/app/features/applications/edit-submission/proposal/pofo-proposal/pofo-proposal.component.html @@ -121,6 +121,7 @@

Proposal

@@ -132,6 +133,7 @@

Proposal

> @@ -178,11 +180,11 @@

Proposal

>
warning -
This field is required
+
This field is required
Example: Project phasing, providing landscape screening, fencing, buffering, erosion and sediment control, diff --git a/portal-frontend/src/app/features/applications/edit-submission/proposal/roso-proposal/roso-proposal.component.html b/portal-frontend/src/app/features/applications/edit-submission/proposal/roso-proposal/roso-proposal.component.html index b81692a4d1..ac56aa73e8 100644 --- a/portal-frontend/src/app/features/applications/edit-submission/proposal/roso-proposal/roso-proposal.component.html +++ b/portal-frontend/src/app/features/applications/edit-submission/proposal/roso-proposal/roso-proposal.component.html @@ -122,6 +122,7 @@

Proposal

@@ -133,6 +134,7 @@

Proposal

> diff --git a/portal-frontend/src/app/features/applications/review-submission/review-submit-fng/review-submit-fng.component.html b/portal-frontend/src/app/features/applications/review-submission/review-submit-fng/review-submit-fng.component.html index ed76f16450..b39216223a 100644 --- a/portal-frontend/src/app/features/applications/review-submission/review-submit-fng/review-submit-fng.component.html +++ b/portal-frontend/src/app/features/applications/review-submission/review-submit-fng/review-submit-fng.component.html @@ -46,7 +46,7 @@

1. Contact Information

Phone Number
- {{ _applicationReview.phoneNumber }} + {{ _applicationReview.phoneNumber ?? '' | mask : '(000) 000-0000' }}
@@ -153,7 +153,7 @@

1. Contact Information

Phone Number
- {{ _applicationReview.phoneNumber }} + {{ _applicationReview.phoneNumber ?? '' | mask : '(000) 000-0000' }}
diff --git a/portal-frontend/src/app/features/applications/review-submission/review-submit/review-submit.component.html b/portal-frontend/src/app/features/applications/review-submission/review-submit/review-submit.component.html index 5a06728df8..464bdc22db 100644 --- a/portal-frontend/src/app/features/applications/review-submission/review-submit/review-submit.component.html +++ b/portal-frontend/src/app/features/applications/review-submission/review-submit/review-submit.component.html @@ -46,7 +46,7 @@

1. Contact Information

Phone Number
- {{ _applicationReview.phoneNumber }} + {{ _applicationReview.phoneNumber ?? '' | mask : '(000) 000-0000' }}
@@ -297,7 +297,7 @@

1. Contact Information

Phone Number
- {{ _applicationReview.phoneNumber }} + {{ _applicationReview.phoneNumber ?? '' | mask : '(000) 000-0000' }}
diff --git a/portal-frontend/src/app/features/applications/view-submission/lfng-review/lfng-review.component.html b/portal-frontend/src/app/features/applications/view-submission/lfng-review/lfng-review.component.html index d6054e8245..4b275a4502 100644 --- a/portal-frontend/src/app/features/applications/view-submission/lfng-review/lfng-review.component.html +++ b/portal-frontend/src/app/features/applications/view-submission/lfng-review/lfng-review.component.html @@ -13,7 +13,7 @@

Local/First Nation Gov Review

> Download PDF -
Phone
- {{ notificationSubmission.contactPhone }} + {{ notificationSubmission.contactPhone ?? '' | mask : '(000) 000-0000' }} Invalid Format { if (user) { if (this.interval) { + console.log('Refresh Interval Cleared'); clearInterval(this.interval); } this.interval = window.setInterval(() => { + console.log('Refresh Interval Fired'); this.authenticationService.refreshTokens(); }, refreshTokenTime); } diff --git a/portal-frontend/src/app/shared/soil-table/soil-table.component.ts b/portal-frontend/src/app/shared/soil-table/soil-table.component.ts index 91365a6251..cc6895e9dd 100644 --- a/portal-frontend/src/app/shared/soil-table/soil-table.component.ts +++ b/portal-frontend/src/app/shared/soil-table/soil-table.component.ts @@ -19,6 +19,7 @@ export class SoilTableComponent implements OnInit, OnChanges { @Input() tableHeader2?: string | undefined; @Input() data2?: SoilTableData; @Input() disabled = false; + @Input() touchAll = false; @Output() dataChange = new EventEmitter(); @Output() data2Change = new EventEmitter(); @@ -78,6 +79,10 @@ export class SoilTableComponent implements OnInit, OnChanges { }); }); + if (this.touchAll) { + this.form.markAllAsTouched(); + } + this.idSuffix = '-' + this.tableHeader.replace(/\s/g, '-').toLowerCase(); this.idSuffix2 = '-' + this.tableHeader2?.replace(/\s/g, '-').toLowerCase(); } diff --git a/services/apps/alcs/src/alcs/notice-of-intent/notice-of-intent.entity.ts b/services/apps/alcs/src/alcs/notice-of-intent/notice-of-intent.entity.ts index c399a24e97..7ba5440fe5 100644 --- a/services/apps/alcs/src/alcs/notice-of-intent/notice-of-intent.entity.ts +++ b/services/apps/alcs/src/alcs/notice-of-intent/notice-of-intent.entity.ts @@ -227,6 +227,13 @@ export class NoticeOfIntent extends Base { }) proposalEndDate2?: Date | null; + @Column({ + type: 'timestamptz', + comment: 'The date at which the noi was created in OATS', + nullable: true, + }) + createdAt?: Date | null; + @ManyToOne(() => NoticeOfIntentType, { nullable: false, }) diff --git a/services/apps/alcs/src/providers/typeorm/migrations/1706132206829-add_noi_created_at.ts b/services/apps/alcs/src/providers/typeorm/migrations/1706132206829-add_noi_created_at.ts new file mode 100644 index 0000000000..fbccd25620 --- /dev/null +++ b/services/apps/alcs/src/providers/typeorm/migrations/1706132206829-add_noi_created_at.ts @@ -0,0 +1,15 @@ +import { MigrationInterface, QueryRunner } from 'typeorm'; + +export class AddNoiCreatedAt1706132206829 implements MigrationInterface { + public async up(queryRunner: QueryRunner): Promise { + await queryRunner.query( + `ALTER TABLE "alcs"."notice_of_intent" ADD "created_at" TIMESTAMP WITH TIME ZONE`, + ); + } + + public async down(queryRunner: QueryRunner): Promise { + await queryRunner.query( + `ALTER TABLE "alcs"."notice_of_intent" DROP COLUMN "created_at"`, + ); + } +}