Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deployment PR - 1337 #1901

Open
wants to merge 232 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
232 commits
Select commit Hold shift + click to select a range
1ac0b57
ALCS-2254 DTO and map change
fbarreta Oct 8, 2024
e9656de
Merge pull request #1900 from bcgov/bugfix/ALCS-2254-incoming-file-dt…
fbarreta Oct 8, 2024
cdb41e4
ALCS-2138 Change component properties
fbarreta Oct 9, 2024
469f85f
Merge pull request #1902 from bcgov/feature/ALCS-2138-inline-text-are…
fbarreta Oct 9, 2024
16a0761
Add greyscale on paused files in commissioner view
Abradat Oct 9, 2024
08ce80c
Fix CI tests failing
Abradat Oct 9, 2024
c988a90
ALCS-2138 Padding and font adjustment
fbarreta Oct 9, 2024
de4b0c6
Merge pull request #1905 from bcgov/feature/ALCS-2138-inline-text-are…
fbarreta Oct 9, 2024
b09ef68
Add commissioner goto button for commissioner detail view
trslater Oct 9, 2024
8adb802
Merge pull request #1903 from bcgov/feature/ALCS-2271
Abradat Oct 9, 2024
96781e5
Rename structure types
trslater Oct 9, 2024
1b0f3fc
Fix tests
trslater Oct 9, 2024
2028237
Relabel questions
trslater Oct 10, 2024
8e6682e
Add links to ALC policy
trslater Oct 10, 2024
8f4971e
Merge pull request #1907 from bcgov/feature/ALCS-2149
trslater Oct 10, 2024
2d88d25
Merge pull request #1906 from bcgov/feature/ALCS-2247
trslater Oct 10, 2024
d1c7e48
Update question wording on portal view, public view, alcs app info
trslater Oct 10, 2024
092b03b
Update structure types on ALCS
trslater Oct 10, 2024
6c5f812
Update question wording for PDF's
trslater Oct 10, 2024
b520d8b
Rename *all* occurences of structure type in ALCS
trslater Oct 10, 2024
88a54d5
Update tests with new structure type names
trslater Oct 10, 2024
2d6efba
Revert all renaming of structure types
trslater Oct 10, 2024
99bc96b
Add new label mapping to shared constants
trslater Oct 10, 2024
ca36319
ALCS-2262 Evidentiary table tweaks
fbarreta Oct 10, 2024
fc0e97f
Map all existing NOI structure types to new labels
trslater Oct 10, 2024
82ae722
Merge pull request #1908 from bcgov/feature/ALCS-2262-evidentiary-rec…
fbarreta Oct 10, 2024
a5acf04
Move label map to avoid cyclic import
trslater Oct 10, 2024
de09317
ALC-2262 Remove truncate clause
fbarreta Oct 10, 2024
7aefa74
Merge pull request #1911 from bcgov/feature/ALCS-2262-evidentiary-rec…
fbarreta Oct 10, 2024
a5f192a
Fix API test
trslater Oct 10, 2024
69d0e4e
Merge pull request #1909 from bcgov/feature/ALCS-2149-2
trslater Oct 11, 2024
15a08e9
Add reconsiderations with recent review date before the request submi…
Abradat Oct 15, 2024
9611c46
Merge pull request #1913 from bcgov/feature/ALCS-2258
Abradat Oct 15, 2024
72785eb
Change mobile cards' meatballs menu to kebab menu
Abradat Oct 16, 2024
0d30147
Merge pull request #1915 from bcgov/bugfix/ALCS-2306
Abradat Oct 16, 2024
7f72894
ALCS-2229 Mobile structures implementation
fbarreta Oct 17, 2024
03e0d08
ALCS-2229 Review session
fbarreta Oct 17, 2024
3935249
ALCS-2229 Test fix
fbarreta Oct 17, 2024
5904dd9
ALCS-2229 Added space
fbarreta Oct 17, 2024
2463b92
ALCS-2229 Added type verification
fbarreta Oct 17, 2024
9f3ee6c
ALCS-2229 Sanity check on type variables
fbarreta Oct 17, 2024
0dd57f4
ALCS-2229 Comment cleanup
fbarreta Oct 17, 2024
7d2c088
ALCS-2229 Css changes
fbarreta Oct 17, 2024
4feee3a
ALCS-2229 Remove isReviewStep property
fbarreta Oct 17, 2024
49a2e00
ALCS-2229 Re-use app-structure-mobile-card component
fbarreta Oct 17, 2024
83af83d
ALCS-2229 Component re-structure
fbarreta Oct 17, 2024
002223d
Merge pull request #1916 from bcgov/feature/ALCS-2229-mobile-structur…
fbarreta Oct 17, 2024
66acd82
ALCS-2229 QA Fixes
fbarreta Oct 18, 2024
7b4907f
ALCS-2229 Changes button text
fbarreta Oct 18, 2024
75c3983
Merge pull request #1917 from bcgov/feature/ALCS-2229-qa-fixes
fbarreta Oct 18, 2024
a2718f5
ALCS-2229 CSS adjust
fbarreta Oct 18, 2024
90adc05
ALCS-2229 css typo
fbarreta Oct 18, 2024
f5c49dc
Merge pull request #1919 from bcgov/feature/ALCS-2229-card-css
fbarreta Oct 18, 2024
f141a26
Add "No Data" to NARU existing and proposed residences with missing f…
Abradat Oct 18, 2024
9a83b9a
Merge pull request #1920 from bcgov/bugfix/ALCS-2313
Abradat Oct 18, 2024
23cd6bd
ALCS-2229 Added validation
fbarreta Oct 19, 2024
0db7dad
Always show building plans w/ no data if empty
trslater Oct 21, 2024
2c0df0a
Merge pull request #1922 from bcgov/bugfix/ALCS-2315
trslater Oct 21, 2024
74548eb
Merge pull request #1923 from bcgov/feature/ALCS-2229-validation
fbarreta Oct 21, 2024
b366041
Add mobile design for NARU residences to public view
Abradat Oct 21, 2024
a8cb8ed
Fix ROSO residence question wording
trslater Oct 21, 2024
ca04eb4
Add index hashtag to NARU residences on portal and ALCS
Abradat Oct 21, 2024
c260974
Merge pull request #1924 from bcgov/bugfix/ALCS-2318
trslater Oct 21, 2024
390c701
Add "no data" to empty attachments table
trslater Oct 21, 2024
9ecef18
Merge pull request #1925 from bcgov/bugfix/ALCS-2316-2317
Abradat Oct 21, 2024
1583705
Merge branch 'develop' into bugfix/ALCS-2314
trslater Oct 21, 2024
6cd9f59
Fix NARU proposed residence button having error state if other fields…
Abradat Oct 21, 2024
5bbe6ec
Merge pull request #1927 from bcgov/bugfix/ALCS-2320
Abradat Oct 21, 2024
e1ab41a
ALCS-2224 Added warning to residential types
fbarreta Oct 21, 2024
4c0bf7d
ALCS-2224 Added line height
fbarreta Oct 21, 2024
7dcb49c
Merge pull request #1926 from bcgov/bugfix/ALCS-2314
trslater Oct 21, 2024
a407357
Merge pull request #1928 from bcgov/feature/ALCS-2224-residential-str…
fbarreta Oct 21, 2024
5e0b07f
Merge pull request #1918 from bcgov/backport/2024-10-18
Abradat Oct 21, 2024
4452205
ALCS-2229 validation fixes
fbarreta Oct 21, 2024
fe4d172
Merge pull request #1929 from bcgov/feature/ALCS-2229-validation-fixes
fbarreta Oct 21, 2024
c3ee3e8
ALCS-2229 Layout adjustments
fbarreta Oct 22, 2024
41c821f
Merge pull request #1930 from bcgov/feature/ALCS-2229-layout-adjustments
fbarreta Oct 22, 2024
0b778e0
ALCS-2229 Div tweak
fbarreta Oct 22, 2024
b4e3cf2
Merge pull request #1931 from bcgov/feature/ALCS-2229-layout-adjustments
fbarreta Oct 22, 2024
a335536
ALCS-2229 added padding bottom on type
fbarreta Oct 22, 2024
c0b806c
Merge pull request #1932 from bcgov/feature/ALCS-2229-layout-adjustments
fbarreta Oct 22, 2024
1578637
Move structure type options to module constant for use by other modules
trslater Oct 16, 2024
0a7812f
Rename NOI structure label map to make general for all soil
trslater Oct 16, 2024
cf945f2
Add new structures question to DB
trslater Oct 16, 2024
4ecbaa0
Git add new structure question to all services and DTO's
trslater Oct 16, 2024
6c50f45
Add new structure question to UI
trslater Oct 16, 2024
8e26b88
Show/hide old questions based on answer to new structure question
trslater Oct 16, 2024
981e73c
Add all new questions to DB
trslater Oct 16, 2024
52888ed
Add new conditional structure questions to all services and DTO's
trslater Oct 16, 2024
c5600ab
Add missed DTO field
trslater Oct 16, 2024
7c12b67
Add structures to all DTO's and services
trslater Oct 17, 2024
d46bfab
Expose structure form type for use by other modules
trslater Oct 17, 2024
736d832
Add structures table and conditional questions to UI
trslater Oct 17, 2024
fd655b8
Remove unused imports
trslater Oct 17, 2024
1b1334a
Add is new structure confirmation dialog
trslater Oct 17, 2024
d8f3c7f
Remove conditional app type text
trslater Oct 22, 2024
4e085f0
Fix NOI structure dialog return type issue
trslater Oct 23, 2024
3796ebf
Add wanting when changing structure type on mobile
trslater Oct 23, 2024
76f0b32
Implement mobile UI for soil apps
trslater Oct 23, 2024
7db21ad
ALCS-2325 Tag/Category entities and cruds
fbarreta Oct 24, 2024
bd4aec4
Update POFO/ROSO with changes from PFRS
trslater Oct 24, 2024
546e50e
ALCS-2325 Added Tag service tests
fbarreta Oct 24, 2024
a2dfd3e
Add building plans
trslater Oct 24, 2024
3b1763c
Fix clearing file uploads
trslater Oct 24, 2024
9bdfad6
Update POFO/ROSO styles
trslater Oct 24, 2024
26365c0
Fix structure add button layout
trslater Oct 24, 2024
4b49360
Fix POFO/ROSO wording
trslater Oct 24, 2024
8df9cff
ALCS-2325 Added unit tests
fbarreta Oct 24, 2024
ba57f1c
ALCS-2325 Change to patch method
fbarreta Oct 24, 2024
2539cb5
Merge pull request #1937 from bcgov/feature/ALCS-2325-create-tags-entity
fbarreta Oct 24, 2024
0a9dc55
Add updates to portal view
trslater Oct 25, 2024
1a1cb9d
Fix missing saved submission fields
trslater Oct 25, 2024
ce2c4dd
Fix submission validation
trslater Oct 25, 2024
5147bef
Fix structures type in DTO
trslater Oct 25, 2024
05ca07a
Add app soil updates to app info
trslater Oct 25, 2024
0d2e56b
ALCS-2325 Tag Category frontend implementation
fbarreta Oct 26, 2024
7652461
ALCS-2325 Tag UI implementation
fbarreta Oct 28, 2024
9ac7375
ALCS-2325 Test fixes
fbarreta Oct 28, 2024
5480165
Merge branch 'develop' into feature/ALCS-1156
trslater Oct 28, 2024
51d1973
ALCS-2325 Creation of tag module
fbarreta Oct 28, 2024
6ee815b
ALCS-2325 More test fixes
fbarreta Oct 29, 2024
deaa1a6
ALCS-2325 Fix mock entities path
fbarreta Oct 29, 2024
0fb17cb
ALCS-2325 More test paths fixed
fbarreta Oct 29, 2024
0c164dd
ALCS-2325 Added MatAutocompleteModule import
fbarreta Oct 29, 2024
167f66a
ALCS-2325 Cleanup
fbarreta Oct 29, 2024
d45fc41
ALCS-2325 Error handling, css fixes, controller Queries
fbarreta Oct 29, 2024
3f15613
ALCS-2327 Added Host Listener detect mobile
fbarreta Oct 29, 2024
0f9778e
Update public view with soil changes
trslater Oct 29, 2024
6845307
Merge pull request #1939 from bcgov/feature/ALCS-2325-create-tags-entity
fbarreta Oct 29, 2024
1464808
Merge pull request #1941 from bcgov/bugfix/ALCS-2327-switch-to-mobile…
fbarreta Oct 29, 2024
37b2710
Fix app info building plans
trslater Oct 29, 2024
0183164
Fix building plans being deleting for wrong action
trslater Oct 29, 2024
c21544e
Fix PFRS validation
trslater Oct 29, 2024
e960e98
Fix POFO reduce impact visibility
trslater Oct 29, 2024
7dc12b7
Fix ROSO sctructure table layout
trslater Oct 29, 2024
d1003dd
Display POFO reduce impact field
trslater Oct 29, 2024
773c0fb
ALCS-644 Tags/Categories seed and nullable categories
fbarreta Oct 30, 2024
343a51e
ALCS-644 Cleanup
fbarreta Oct 30, 2024
6710852
ALCS-644 Test fixes
fbarreta Oct 30, 2024
0f11b51
Merge pull request #1942 from bcgov/feature/ALCS-644-tags-adjustments
fbarreta Oct 30, 2024
70f10df
Pipe new structures data to PDF templates
trslater Oct 30, 2024
9a006d4
Add structure changes to PDF's
trslater Oct 30, 2024
9671bc4
Fix m2 -> m^2
trslater Oct 30, 2024
a1ab7f1
Fix API tests
trslater Oct 30, 2024
887492d
ALCS-2327 Persist area changes on FormProposedStructure array
fbarreta Oct 30, 2024
ca0f39d
ALCS-2327 remove return value
fbarreta Oct 30, 2024
01c2503
Merge pull request #1944 from bcgov/bugfix/ALCS-2327-persist-area-bet…
fbarreta Oct 30, 2024
45e949b
Fix ALCS tests
trslater Oct 30, 2024
258fbd9
Fix portal tests
trslater Oct 30, 2024
7c457a1
Fix mobile/desktop area mirroring issue
trslater Oct 30, 2024
5760bef
add application_tag entity, DTO, controller, and service
Abradat Oct 30, 2024
bf4164f
fix tags not being fetched when querying applications and changed con…
Abradat Oct 30, 2024
ff6926c
ALCS-2345 Backend implementation
fbarreta Oct 30, 2024
cca19c9
ALCS-2345 Fix failed tests
fbarreta Oct 30, 2024
a5fa410
remove logger and cleanup
Abradat Oct 31, 2024
c6144d0
add unit tests
Abradat Oct 31, 2024
c1b6cca
ALCS-2345 Remove logger
fbarreta Oct 31, 2024
afde00e
ALCS-2345 Database sort
fbarreta Oct 31, 2024
e18bc6b
fix sorting
Abradat Oct 31, 2024
718a10e
Merge pull request #1946 from bcgov/feature/ALCS-2345-tags-on-nois-ba…
fbarreta Oct 31, 2024
edcae3d
Merge branch 'develop' into feature/ALCS-472-backend
Abradat Oct 31, 2024
8588367
Merge pull request #1945 from bcgov/feature/ALCS-472-backend
Abradat Oct 31, 2024
d22c9c7
ALCS-2345 Added unit tests
fbarreta Oct 31, 2024
2c4e085
Restructure files details header
Abradat Oct 28, 2024
f0fcf9a
add tags header basics
Abradat Oct 29, 2024
c7788a7
add customized tag chip and restructured tag header component
Abradat Oct 30, 2024
eda9de0
ALCS-2345 Typo fixes
fbarreta Oct 31, 2024
19427e0
Merge pull request #1948 from bcgov/feature/2345-add-unit-tests
fbarreta Oct 31, 2024
3829eb4
Move structure types to enum with label map
trslater Oct 31, 2024
caadcad
Fix API tests
trslater Oct 31, 2024
d298e4c
Merge pull request #1943 from bcgov/feature/ALCS-1156
trslater Oct 31, 2024
685dbb3
update application and NOI tag service to return tag entity when addi…
Abradat Oct 31, 2024
95567ac
add tags functionality to applications
Abradat Nov 1, 2024
70bc49b
add tags to NOIs, resize pills, and make tag section conditional on f…
Abradat Nov 1, 2024
c003541
check if files and tags are associated when deleting tags and categories
Abradat Nov 1, 2024
1e46682
ALCS-1874 Backend implementation
fbarreta Nov 1, 2024
19f1a4e
fix tag autocomplete component
Abradat Nov 1, 2024
4282efe
add todo item
Abradat Nov 1, 2024
0255ebf
Merge branch 'develop' into feature/ALCS-472-2213-2
Abradat Nov 1, 2024
94767f5
fix tag autocomplete bug
Abradat Nov 1, 2024
c1c11ec
fix unit tests failing
Abradat Nov 1, 2024
023cb6b
Merge pull request #1949 from bcgov/feature/ALCS-472-2213-2
Abradat Nov 1, 2024
0f2e958
ALCS-1874 Frontend implementation
fbarreta Nov 1, 2024
c48d9a6
Merge branch 'develop' into feature/ALCS-1874-tags-on-advanced-search
fbarreta Nov 1, 2024
1ff1b89
Fix various structures form state issues
trslater Nov 4, 2024
a12556b
Show warning as soon as type changes
trslater Nov 4, 2024
dcb90b1
Fix structures table padding
trslater Nov 4, 2024
3ae8fde
Show residential warning for accessory structures
trslater Nov 4, 2024
2d88d5f
Remove building plans from public view
trslater Nov 4, 2024
a317df4
fix tags header border behaviour, hide inactive tags, make tags bold …
Abradat Nov 4, 2024
e7bb351
fix tags header border behaviour
Abradat Nov 4, 2024
5434bdd
Merge pull request #1950 from bcgov/feature/ALCS-1156-QA-1
trslater Nov 5, 2024
a04abca
remove redundant value
Abradat Nov 5, 2024
4c8803e
Merge pull request #1951 from bcgov/feature/ALCS-472-2213-3
Abradat Nov 5, 2024
bcf88f0
Add app tag check function
trslater Nov 5, 2024
217308f
Conditionally add tags based on NARU answers
trslater Nov 5, 2024
83dec45
ALCS-1874 Tags UI implementation
fbarreta Nov 5, 2024
c6d1f6b
ALCS-1874 Fix tests
fbarreta Nov 5, 2024
f51b01a
Fix API tests
trslater Nov 5, 2024
329bf54
ALCS-1874 remove console logs
fbarreta Nov 5, 2024
c6fa3fd
Merge pull request #1952 from bcgov/feature/ALCS-2146
trslater Nov 5, 2024
3978241
Remove '[object object]' from bottom of empty attachments table
trslater Nov 5, 2024
0076649
Merge pull request #1954 from bcgov/bugfix/ALCS-2355
trslater Nov 5, 2024
b6b0884
Merge pull request #1953 from bcgov/feature/ALCS-1874-tags-on-advance…
fbarreta Nov 5, 2024
6fc8373
ALCS-1874 Review fixes
fbarreta Nov 5, 2024
50be39c
Merge pull request #1955 from bcgov/feature/ALCS-1874-review-fixes
fbarreta Nov 5, 2024
de00ecc
add tags to NOIs once submitted instead of subtypes
Abradat Nov 6, 2024
9c0038c
ALCS-2353 Constraints end error handling
fbarreta Nov 6, 2024
05bee2d
ALCS-2353 Test fixes
fbarreta Nov 6, 2024
42c3e4d
ALCS-2353 Typo fix
fbarreta Nov 6, 2024
84852e8
ALCS-1874 QA fixes
fbarreta Nov 6, 2024
877f8e2
Merge pull request #1956 from bcgov/feature/ALCS-2134
Abradat Nov 6, 2024
e2a99b8
Merge pull request #1958 from bcgov/feature/ALCS-1874-qa-fixes
fbarreta Nov 6, 2024
6cbce6b
Undo previous fix adding warning to accessory structures
trslater Nov 6, 2024
8954c4b
Fix type mobile switching not updating conditional fields properly
trslater Nov 6, 2024
665d376
Merge pull request #1957 from bcgov/bugfix/ALCS-2353-tag-and-categori…
fbarreta Nov 6, 2024
3a2ba2b
ALCS-1874 Refresh tags params correctly
fbarreta Nov 6, 2024
ef2e5e3
Fix various field state issues
trslater Nov 6, 2024
b76b2bc
Merge pull request #1959 from bcgov/feature/ALCS-1874-rebuild-tags-pa…
fbarreta Nov 6, 2024
fc85c01
Make structure type counts more reliable
trslater Nov 6, 2024
dc0cb0e
Fix issue with mobile structure type not reflecting on desktop
trslater Nov 6, 2024
9c99542
fix subdivision proposed lots total area error not showing in review …
Abradat Nov 6, 2024
fd0cdfe
fix noi tags not being saved correctly
Abradat Nov 6, 2024
6930ffd
Merge pull request #1960 from bcgov/features/ALCS-1156-QA-2
trslater Nov 6, 2024
0f54acd
ALCS-2350 Remove borders when there is a residential warning
fbarreta Nov 6, 2024
01791a8
Merge pull request #1962 from bcgov/feature/ALCS-2134-2
Abradat Nov 6, 2024
4ed64bb
Merge pull request #1963 from bcgov/bugfix/ALCS-2350-remove-table-bor…
fbarreta Nov 6, 2024
ca24469
Merge pull request #1961 from bcgov/bugfix/ALCS-2333
Abradat Nov 6, 2024
bb5178f
Migrate decision NARU subtypes to tags
trslater Nov 6, 2024
935fa4a
Merge pull request #1964 from bcgov/feature/ALCS-2147
trslater Nov 6, 2024
46bcca8
Fix possibly adding deleted tags
trslater Nov 6, 2024
a2c7ceb
Merge pull request #1965 from bcgov/feature/ALCS-2147-fix
trslater Nov 6, 2024
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
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ playwright-report/
playwright/.cache/
.~lock.*

/ora2pg_data
/ora2pg_data
7 changes: 7 additions & 0 deletions alcs-frontend/src/app/features/admin/admin.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { HolidayComponent } from './holiday/holiday.component';
import { LocalGovernmentComponent } from './local-government/local-government.component';
import { NoiSubtypeComponent } from './noi-subtype/noi-subtype.component';
import { UnarchiveComponent } from './unarchive/unarchive.component';
import { TagContainerComponent } from './tag/tag-container.component';

export const childRoutes = [
{
Expand Down Expand Up @@ -72,6 +73,12 @@ export const childRoutes = [
icon: 'settings_applications',
component: ConfigurationComponent,
},
{
path: 'tag',
menuTitle: 'Tags/Categories',
icon: 'sell',
component: TagContainerComponent,
},
];

@Component({
Expand Down
12 changes: 12 additions & 0 deletions alcs-frontend/src/app/features/admin/admin.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { MatChipsModule } from '@angular/material/chips';
import { MatPaginatorModule } from '@angular/material/paginator';
import { MatTabsModule } from '@angular/material/tabs';
import { RouterModule, Routes } from '@angular/router';
import { SharedModule } from '../../shared/shared.module';
import { AdminComponent, childRoutes } from './admin.component';
Expand All @@ -25,6 +26,11 @@ import { LocalGovernmentComponent } from './local-government/local-government.co
import { NoiSubtypeDialogComponent } from './noi-subtype/noi-subtype-dialog/noi-subtype-dialog.component';
import { NoiSubtypeComponent } from './noi-subtype/noi-subtype.component';
import { UnarchiveComponent } from './unarchive/unarchive.component';
import { TagCategoryComponent } from './tag/tag-category/tag-category.component';
import { TagCategoryDialogComponent } from './tag/tag-category/tag-category-dialog/tag-category-dialog.component';
import { TagComponent } from './tag/tag.component';
import { TagDialogComponent } from './tag/tag-dialog/tag-dialog.component';
import { TagContainerComponent } from './tag/tag-container.component';

const routes: Routes = [
{
Expand Down Expand Up @@ -56,6 +62,11 @@ const routes: Routes = [
BoardManagementDialogComponent,
ConfigurationComponent,
MaintenanceBannerConfirmationDialogComponent,
TagCategoryComponent,
TagCategoryDialogComponent,
TagComponent,
TagDialogComponent,
TagContainerComponent,
],
imports: [
CommonModule,
Expand All @@ -64,6 +75,7 @@ const routes: Routes = [
MatPaginatorModule,
DragDropModule,
MatChipsModule,
MatTabsModule,
],
})
export class AdminModule {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<div mat-dialog-title>
<h4>{{ isEdit ? 'Edit' : 'Create New' }} Category</h4>
</div>
<div mat-dialog-content class="dialog">
<form (ngSubmit)="onSubmit()" #form="ngForm">

<div class="full-width">
<mat-form-field class="description" appearance="outline">
<mat-label>Name</mat-label>
<input required matInput id="name" [(ngModel)]="name" name="name" (ngModelChange)="onChange()" [formControl]="nameControl" />
</mat-form-field>
<div class="warning-section">
<div class="warning" *ngIf="showNameWarning">
<mat-icon>info</mat-icon> <b>Warning: </b>&nbsp; Category already exists. Choose a different category name.
</div>
</div>
</div>

</form>

<mat-dialog-actions align="end">
<div class="button-container">
<button mat-stroked-button color="primary" mat-dialog-close="false">Close</button>
<button
[loading]="isLoading"
(click)="onSubmit()"
mat-flat-button
color="primary"
type="submit"
[disabled]="!form.form.valid"
>
Save
</button>
</div>
</mat-dialog-actions>
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
@use '../../../../../../styles/colors';

mat-dialog-title {
margin-bottom: 24px;
}

.warning-banner {
margin-top: 8px;
background-color: green;
padding: 16px;

.display-none {
display: none !important;
}
}

.warning {
padding: 16px;
font-size: 14px;
background-color: rgba(colors.$field-warning-bg-color, 0.5);
border-radius: 8px;
display: flex;
align-items: center;
color: colors.$dark-contrast-text;
margin-top: 8px;

mat-icon {
color: colors.$dark-contrast-text;
margin-right: 16px;
}
}

.dialog {
padding: 24px;

form {
display: grid;
grid-template-columns: 1fr 1fr;
row-gap: 24px;
column-gap: 24px;
margin-bottom: 12px;

.description {
margin-top: 20px;
}

.full-width {
grid-column: 1/3;
}

.mat-mdc-form-field {
width: 100%;
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import { NO_ERRORS_SCHEMA } from '@angular/core';
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
import { TagCategoryService } from '../../../../../services/tag/tag-category/tag-category.service';

import { TagCategoryDialogComponent } from './tag-category-dialog.component';

describe('TagCategoryDialogComponent', () => {
let component: TagCategoryDialogComponent;
let fixture: ComponentFixture<TagCategoryDialogComponent>;

beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [ReactiveFormsModule, FormsModule],
declarations: [TagCategoryDialogComponent],
providers: [
{ provide: MAT_DIALOG_DATA, useValue: undefined },
{ provide: MatDialogRef, useValue: {} },
{
provide: TagCategoryService,
useValue: {},
},
],
schemas: [NO_ERRORS_SCHEMA],
}).compileComponents();

fixture = TestBed.createComponent(TagCategoryDialogComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});

it('should create', () => {
expect(component).toBeTruthy();
});
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
import { Component, Inject } from '@angular/core';
import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
import { TagCategoryDto } from '../../../../../services/tag/tag-category/tag-category.dto';
import { TagCategoryService } from '../../../../../services/tag/tag-category/tag-category.service';
import { FormControl } from '@angular/forms';

@Component({
selector: 'app-tag-category-dialog',
templateUrl: './tag-category-dialog.component.html',
styleUrls: ['./tag-category-dialog.component.scss'],
})
export class TagCategoryDialogComponent {
name = '';
uuid = '';

isLoading = false;
isEdit = false;
showNameWarning = false;
nameControl = new FormControl();

constructor(
@Inject(MAT_DIALOG_DATA) public data: TagCategoryDto | undefined,
private dialogRef: MatDialogRef<TagCategoryDialogComponent>,
private tagCategoryService: TagCategoryService,
) {
if (data) {
this.uuid = data.uuid;
this.name = data.name;
}
this.isEdit = !!data;
}

async onSubmit() {
this.isLoading = true;

const dto: TagCategoryDto = {
uuid: this.uuid,
name: this.name,
};

if (this.isEdit) {
try {
await this.tagCategoryService.update(this.uuid, dto);
} catch (e) {
this.showWarning();
this.isLoading = false;
return;
}
} else {
try {
await this.tagCategoryService.create(dto);
} catch (e) {
this.showWarning();
this.isLoading = false;
return;
}
}
this.isLoading = false;
this.dialogRef.close(true);
}

onChange() {
this.showNameWarning = false;
}

private showWarning() {
this.showNameWarning = true;
this.nameControl.setErrors({"invalid": true});
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
<div class="container">
<div class="actions-bar">
<div>
<div class="search-control">
<mat-form-field>
<mat-label>Enter category</mat-label>
<input matInput placeholder="Category Name" type="text" [(ngModel)]="search" [matAutocomplete]="auto" (ngModelChange)='updateFilter($event)'>
<mat-autocomplete autoActiveFirstOption #auto="matAutocomplete">
<mat-option *ngFor="let option of filteredOptions" [value]="option">
{{option}}
</mat-option>
</mat-autocomplete>
</mat-form-field>
</div>
<div class="search-control">
<button mat-flat-button color="primary" (click)="fetch()">Search</button>
</div>
</div>
<div class="right">
<button mat-flat-button color="primary" (click)="onCreate()">Create</button>
</div>
</div>

<table mat-table [dataSource]="categories">
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
<tr mat-row *matRowDef="let row; columns: displayedColumns"></tr>

<ng-container matColumnDef="number">
<th mat-header-cell *matHeaderCellDef>Number</th>
<td mat-cell *matCellDef="let row">{{ row.number }}</td>
</ng-container>

<ng-container matColumnDef="name">
<th mat-header-cell *matHeaderCellDef>Name</th>
<td mat-cell *matCellDef="let row">{{ row.name }}</td>
</ng-container>

<ng-container matColumnDef="actions">
<th mat-header-cell *matHeaderCellDef>Actions</th>
<td mat-cell *matCellDef="let row">
<button class="edit-btn" mat-flat-button (click)="onEdit(row)">
<mat-icon>edit</mat-icon>
</button>
<button class="delete-btn" mat-flat-button (click)="onDelete(row)">
<mat-icon>delete</mat-icon>
</button>
</td>
</ng-container>
</table>

<mat-paginator
[length]="total"
[pageSize]="20"
[pageSizeOptions]="[20, 50, 100]"
(page)="onPageChange($event)"
aria-label="Select page of categories"
></mat-paginator>
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
@use '../../../../../styles/colors';

.container {
.actions-bar {
margin-top: 30px;
display: flex;
justify-content: space-between;
}

.search-control {
margin-right: 30px;
display: inline-block;
}

table {
margin: 35px 2px 30px 2px;
box-shadow: 2px 2px 8px 2px #00000040;
}

.mdc-data-table__table {
min-width: unset!important;
width: 99%;
}

.delete-btn {
color: colors.$error-color;
width: 48px!important;
min-width: unset!important;
}

.mat-icon {
margin-right: 1px;
}

.edit-btn {
color: colors.$primary-color-dark;
width: 48px!important;
min-width: unset!important;
}

.mat-column-name {
width: 70%;
}

.mat-column-actions {
width: 30%;
}
}
Loading
Loading