Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
75 commits
Select commit Hold shift + click to select a range
a2bfdd0
ALCS-000: Bump the npm-minor-and-patch group in /services with 2 updates
dependabot[bot] Feb 11, 2026
838dc75
Merge pull request #2791 from bcgov/dependabot/npm_and_yarn/services/…
github-actions[bot] Feb 11, 2026
b126a3b
ALCS-000: Bump the npm-minor-and-patch group in /services with 2 updates
dependabot[bot] Feb 12, 2026
6891197
Merge pull request #2792 from bcgov/dependabot/npm_and_yarn/services/…
github-actions[bot] Feb 12, 2026
0e2d69e
ALCS-000: Bump the npm-minor-and-patch group in /services with 2 updates
dependabot[bot] Feb 13, 2026
f0e5ff8
Merge pull request #2793 from bcgov/dependabot/npm_and_yarn/services/…
github-actions[bot] Feb 13, 2026
f9db917
ALCS-000: Bump the npm-minor-and-patch group in /services with 2 updates
dependabot[bot] Feb 16, 2026
6fe21e7
Merge pull request #2796 from bcgov/dependabot/npm_and_yarn/services/…
github-actions[bot] Feb 16, 2026
52b7ad6
ALCS-000: Bump the npm-minor-and-patch group in /services with 2 updates
dependabot[bot] Feb 17, 2026
121bfcc
Merge pull request #2797 from bcgov/dependabot/npm_and_yarn/services/…
github-actions[bot] Feb 17, 2026
f3d8f8d
ALCS-000: Bump the npm-minor-and-patch group in /services with 7 updates
dependabot[bot] Feb 18, 2026
c849da1
Merge pull request #2798 from bcgov/dependabot/npm_and_yarn/services/…
github-actions[bot] Feb 18, 2026
2290d20
ALCS-000: Bump the npm-minor-and-patch group in /services with 2 updates
dependabot[bot] Feb 19, 2026
130d738
Merge pull request #2799 from bcgov/dependabot/npm_and_yarn/services/…
github-actions[bot] Feb 19, 2026
5c9e7e2
ALCS-000: Bump the npm-minor-and-patch group in /services with 2 updates
dependabot[bot] Feb 20, 2026
7919094
Merge pull request #2801 from bcgov/dependabot/npm_and_yarn/services/…
github-actions[bot] Feb 20, 2026
aa80ce5
ALCS-000: Bump the npm-minor-and-patch group in /services with 2 updates
dependabot[bot] Feb 23, 2026
baa08c9
Merge pull request #2803 from bcgov/dependabot/npm_and_yarn/services/…
github-actions[bot] Feb 23, 2026
2729394
ALCS-000: Bump the npm-minor-and-patch group
dependabot[bot] Feb 24, 2026
c2f9f59
Merge pull request #2805 from bcgov/dependabot/npm_and_yarn/portal-fr…
github-actions[bot] Feb 24, 2026
41f7790
ALCS-000: Bump the npm-minor-and-patch group in /services with 2 updates
dependabot[bot] Feb 25, 2026
634d8e6
Merge pull request #2806 from bcgov/dependabot/npm_and_yarn/services/…
github-actions[bot] Feb 25, 2026
845a765
ALCS-000: Bump the npm-minor-and-patch group across 1 directory with …
dependabot[bot] Feb 26, 2026
5f721a8
ALCS-000: Bump the npm-minor-and-patch group in /services with 5 updates
dependabot[bot] Feb 26, 2026
395a9bd
ALCS-000: Bump the npm-minor-and-patch group
dependabot[bot] Feb 26, 2026
033c3b2
Merge pull request #2810 from bcgov/dependabot/npm_and_yarn/services/…
github-actions[bot] Feb 26, 2026
8f0cda2
Merge pull request #2809 from bcgov/dependabot/npm_and_yarn/alcs-fron…
github-actions[bot] Feb 26, 2026
98fc973
Merge pull request #2811 from bcgov/dependabot/npm_and_yarn/portal-fr…
github-actions[bot] Feb 26, 2026
461b312
ALCS-000: Bump the npm-minor-and-patch group
dependabot[bot] Feb 27, 2026
4df4585
ALCS-000: Bump the npm-minor-and-patch group
dependabot[bot] Feb 27, 2026
8fc075a
Merge pull request #2812 from bcgov/dependabot/npm_and_yarn/alcs-fron…
github-actions[bot] Feb 27, 2026
c45747c
Merge pull request #2813 from bcgov/dependabot/npm_and_yarn/portal-fr…
github-actions[bot] Feb 27, 2026
631e44a
Setup NRIS ETL app and create C&E file ETL
trslater Feb 27, 2026
29b38d9
Only use default type before value is set
trslater Mar 3, 2026
baab49c
Merge pull request #2817 from bcgov/2724-editing-a-chronology-documen…
trslater Mar 3, 2026
39419d7
Merge pull request #2815 from bcgov/2516-etl-base-ce-file
trslater Mar 3, 2026
627ae37
Fix `intake_notes` field
trslater Mar 3, 2026
fcf49bc
Merge pull request #2821 from bcgov/2516-etl-base-ce-file-qa-1
trslater Mar 5, 2026
e95191b
ALCS-000: Bump the npm-minor-and-patch group
dependabot[bot] Mar 5, 2026
14764dd
ALCS-000: Bump the npm-minor-and-patch group
dependabot[bot] Mar 5, 2026
10b6f01
Merge pull request #2827 from bcgov/dependabot/npm_and_yarn/alcs-fron…
github-actions[bot] Mar 5, 2026
1acfb34
Merge pull request #2828 from bcgov/dependabot/npm_and_yarn/portal-fr…
github-actions[bot] Mar 5, 2026
1fac110
Fail on conflict
trslater Mar 5, 2026
bd8fb26
Fix num failed
trslater Mar 5, 2026
acf665f
Add import all help text
trslater Mar 5, 2026
60eeec5
Remove never used user
trslater Mar 5, 2026
ce1dab3
Add submitter ETL
trslater Mar 5, 2026
ca9ee4f
Update utils to allow obfuscation use
trslater Mar 6, 2026
8d107c8
Update faker
trslater Mar 6, 2026
aaa9c3a
Add C&E file obfuscation
trslater Mar 6, 2026
7c7c8b7
Add submitter obfuscation
trslater Mar 6, 2026
e5785f5
Uncomment submitter obfuscation
trslater Mar 6, 2026
e56645b
Merge pull request #2830 from bcgov/2518-etl-submitter-data
trslater Mar 9, 2026
7046b79
Clean up some stuff in DB module
trslater Mar 9, 2026
5a9efbf
Fix logger names
trslater Mar 9, 2026
4115ab0
Remove AI-added comment
trslater Mar 9, 2026
2e50c43
Fix submitter obfuscation function name
trslater Mar 9, 2026
bf24b78
Only obfuscate exiting values
trslater Mar 9, 2026
9aa9191
ETL responsible properties
trslater Mar 10, 2026
459cade
Fix count for C&E files/submitters
trslater Mar 10, 2026
f528e04
Auto-gen UUID for responsible parties
trslater Mar 10, 2026
a59baa9
Fix column ambiguity
trslater Mar 10, 2026
b2d0b63
Fix obfuscation
trslater Mar 10, 2026
bef09c0
Fix obfuscation
trslater Mar 10, 2026
fc75b3d
Remove unused import
trslater Mar 10, 2026
9e638a9
Merge pull request #2834 from bcgov/2518-etl-submitter-data-QA-1
trslater Mar 10, 2026
cc03d4b
Merge pull request #2832 from bcgov/2519-etl-responsible-party-proper…
trslater Mar 10, 2026
32b3e72
Make property ETL
trslater Mar 10, 2026
812f791
Merge pull request #2835 from bcgov/2517-etl-property-data
trslater Mar 11, 2026
591d90a
ALCS-000: Bump the npm-minor-and-patch group
dependabot[bot] Mar 12, 2026
f68a051
ALCS-000: Bump the npm-minor-and-patch group
dependabot[bot] Mar 12, 2026
9c71740
Merge pull request #2838 from bcgov/dependabot/npm_and_yarn/alcs-fron…
github-actions[bot] Mar 12, 2026
08ef6d3
Merge pull request #2839 from bcgov/dependabot/npm_and_yarn/portal-fr…
github-actions[bot] Mar 12, 2026
1138e9b
ALCS-000: Bump the npm-minor-and-patch group
dependabot[bot] Mar 13, 2026
a08e67d
Merge pull request #2844 from bcgov/dependabot/npm_and_yarn/alcs-fron…
github-actions[bot] Mar 13, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,430 changes: 1,115 additions & 315 deletions alcs-frontend/package-lock.json

Large diffs are not rendered by default.

22 changes: 11 additions & 11 deletions alcs-frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,18 @@
"private": true,
"dependencies": {
"@angular-builders/jest": "^20.0.0",
"@angular/animations": "^20.3.16",
"@angular/animations": "^20.3.18",
"@angular/cdk": "^20.2.14",
"@angular/common": "^20.3.16",
"@angular/compiler": "^20.3.16",
"@angular/core": "^20.3.16",
"@angular/forms": "^20.3.16",
"@angular/common": "^20.3.18",
"@angular/compiler": "^20.3.18",
"@angular/core": "^20.3.18",
"@angular/forms": "^20.3.18",
"@angular/material": "20.2.14",
"@angular/material-experimental": "^20.2.14",
"@angular/material-moment-adapter": "20.2.14",
"@angular/platform-browser": "^20.3.16",
"@angular/platform-browser-dynamic": "^20.3.16",
"@angular/router": "^20.3.16",
"@angular/platform-browser": "^20.3.18",
"@angular/platform-browser-dynamic": "^20.3.18",
"@angular/router": "^20.3.18",
"@bcgov/bc-sans": "^2.1.0",
"@ng-matero/extensions": "^20.3.1",
"@ng-select/ng-option-highlight": "^20.6.3",
Expand All @@ -50,9 +50,9 @@
"@angular-eslint/eslint-plugin-template": "18.4.3",
"@angular-eslint/schematics": "18.4.3",
"@angular-eslint/template-parser": "18.4.3",
"@angular/build": "^20.3.14",
"@angular/cli": "^20.3.14",
"@angular/compiler-cli": "^20.3.16",
"@angular/build": "^20.3.20",
"@angular/cli": "^20.3.20",
"@angular/compiler-cli": "^20.3.18",
"@golevelup/ts-jest": "^0.7.0",
"@types/jest": "^29.5.14",
"@typescript-eslint/eslint-plugin": "7.18.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ export enum VisibilityGroup {
}

@Component({
selector: 'app-document-upload-dialog',
templateUrl: './document-upload-dialog.component.html',
styleUrls: ['./document-upload-dialog.component.scss'],
selector: 'app-document-upload-dialog',
templateUrl: './document-upload-dialog.component.html',
styleUrls: ['./document-upload-dialog.component.scss'],
standalone: false
})
export class DocumentUploadDialogComponent implements OnInit, OnDestroy {
Expand Down Expand Up @@ -436,7 +436,7 @@ export class DocumentUploadDialogComponent implements OnInit, OnDestroy {
docTypes.sort((a, b) => (a.label > b.label ? 1 : -1));
this.documentTypes = docTypes.filter((type) => type.code !== DOCUMENT_TYPE.ORIGINAL_APPLICATION);

if (this.data.defaultDocumentType) {
if (this.type.value === null && this.data.defaultDocumentType) {
this.type.setValue(this.data.defaultDocumentType);
} else if (this.documentTypes.length === 1) {
this.type.setValue(this.documentTypes[0].code);
Expand Down
163 changes: 163 additions & 0 deletions bin/migrate-nris-data/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,163 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
.pybuilder/
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# poetry
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
#poetry.lock

# pdm
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
#pdm.lock
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
# in version control.
# https://pdm.fming.dev/#use-with-ide
.pdm.toml

# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# pytype static type analyzer
.pytype/

# Cython debug symbols
cython_debug/

# PyCharm
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/

# mac DS_STORE
.DS_Store
38 changes: 38 additions & 0 deletions bin/migrate-nris-data/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Overview

This script is an ETL utility that imports data from the NRIS system into the ALCS system. It can also perform a cleanup operation on previous ETL operations.

## Requirements

Python 3.14 or higher

### Mac OS

- Make sure you have homebrew installed if no install it first
- Install postgresql on local machine `brew install postgresql`. You will need this for psycopg2
- `brew install python`
- In `bin/migrate-nris-data` folder, init a virtual env: `python -m venv .venv`
- Activate virtual env `source .venv/bin/activate`

## Installation

Install the required Python packages using pip:
`pip install -r requirements.txt`

## Usage

The following environment variables are required:

- `DB_USER`: Postgres database username
- `DB_PASSWORD`: Postgres database password
- `DB_HOST`: Postgres database host
- `DB_PORT`: Postgres database port
- `DB_DATABASE`: Postgres database name

These variables can be stored in the .env file.

To run the script, navigate to the directory containing the script and run the following command:

`python migrate.py [action] [table_1] [table_2] ...`

If you want to see a detailed description of the available arguments and options, run the script with the -h or --help flag.
1 change: 1 addition & 0 deletions bin/migrate-nris-data/ce_files/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from .ce_files import *
40 changes: 40 additions & 0 deletions bin/migrate-nris-data/ce_files/ce_files.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
from common.etl_logger import setup_and_get_logger
from config import ABS_PATH
from db import batch_read_write
from faker import Faker


def etl(batch_size):
logger = setup_and_get_logger("ce-file-etl")

batch_read_write(
logger,
batch_size,
ABS_PATH / "ce_files/sql/count.sql",
ABS_PATH / "ce_files/sql/et.sql",
ABS_PATH / "ce_files/sql/l.sql",
)


def obfuscate(batch_size):
logger = setup_and_get_logger("ce-file-obfuscation")

batch_read_write(
logger,
batch_size,
ABS_PATH / "ce_files/sql/obfuscate_count.sql",
ABS_PATH / "ce_files/sql/obfuscate_get_rows.sql",
ABS_PATH / "ce_files/sql/obfuscate_update.sql",
row_processor=row_obfuscator(),
)


def row_obfuscator():
faker = Faker("la")

def obfuscate_row(row):
row["intake_notes"] = "\n\n".join(faker.paragraphs())

return row

return obfuscate_row
4 changes: 4 additions & 0 deletions bin/migrate-nris-data/ce_files/sql/count.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
select
count(*)
from
nris.complaint nc;
40 changes: 40 additions & 0 deletions bin/migrate-nris-data/ce_files/sql/et.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
select distinct
'nris_etl' as audit_created_by,
nc.record_id as file_number,
nc.date as date_submitted,
coalesce(nc.complaint_referral_processed_date, nc.date) as date_opened,
nc.type::alcs.compliance_and_enforcement_initial_submission_type_enum as initial_submission_type,
(
select
array_agg(
case
when activity = 'Residences' then 'Residence'
when activity = 'Breach of Conditions' then 'Breach of Condition'
when activity = 'Dwellings' then 'Residence'
when activity = 'Commercial Activity' then 'Non-Farm Use'
else activity
end
) as activity
from
(
select
regexp_replace(
initcap(
trim(
both '"'
from
activity
)
),
'\sOf\s',
' of '
) as activity
from
regexp_split_to_table(nc.activity, '\s*,\s*') as nc (activity)
) activities
)::alcs._compliance_and_enforcement_alleged_activity_enum as alleged_activity,
coalesce(concat_ws('; ', nc.internal_notes, nc.description_and_comments), '') as intake_notes,
au.uuid as assignee_uuid
from
nris.complaint nc
left join alcs.user au on lower(au.idir_user_name) = lower(nc.assigned_to);
12 changes: 12 additions & 0 deletions bin/migrate-nris-data/ce_files/sql/l.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
insert into
alcs.compliance_and_enforcement (
audit_created_by,
file_number,
date_submitted,
date_opened,
initial_submission_type,
alleged_activity,
intake_notes,
assignee_uuid
)
values %s;
4 changes: 4 additions & 0 deletions bin/migrate-nris-data/ce_files/sql/obfuscate_count.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
select
count(*)
from
alcs.compliance_and_enforcement ace;
4 changes: 4 additions & 0 deletions bin/migrate-nris-data/ce_files/sql/obfuscate_get_rows.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
select
ace.uuid
from
alcs.compliance_and_enforcement ace;
12 changes: 12 additions & 0 deletions bin/migrate-nris-data/ce_files/sql/obfuscate_update.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
update
alcs.compliance_and_enforcement as ace
set
intake_notes = case
when ace.intake_notes <> '' then v.intake_notes
else ace.intake_notes
end
from
(values %s) as v(uuid, intake_notes)
where
ace.uuid::text = v.uuid::text
and ace.intake_notes <> '';
Empty file.
Loading
Loading