diff --git a/alcs-frontend/src/app/features/search/search.component.ts b/alcs-frontend/src/app/features/search/search.component.ts index 2ee63e26c..c620cda8b 100644 --- a/alcs-frontend/src/app/features/search/search.component.ts +++ b/alcs-frontend/src/app/features/search/search.component.ts @@ -293,6 +293,8 @@ export class SearchComponent implements OnInit, OnDestroy { if (this.portalStatusFilterDropDownComponent) { this.portalStatusFilterDropDownComponent.reset(); } + + this.clearTags(); } getSearchParams(): SearchRequestDto { diff --git a/portal-frontend/src/app/features/applications/application-details/subd-details/subd-details.component.ts b/portal-frontend/src/app/features/applications/application-details/subd-details/subd-details.component.ts index cce01e8d5..3b141a58b 100644 --- a/portal-frontend/src/app/features/applications/application-details/subd-details/subd-details.component.ts +++ b/portal-frontend/src/app/features/applications/application-details/subd-details/subd-details.component.ts @@ -28,7 +28,7 @@ export class SubdDetailsComponent { this.totalAcres = applicationSubmission.subdProposedLots .reduce((total, lot) => total + (lot.size !== null ? lot.size : 0), 0) - .toFixed(2); + .toFixed(5); } } diff --git a/services/apps/alcs/src/alcs/tag/tag-category/tag-category.controller.ts b/services/apps/alcs/src/alcs/tag/tag-category/tag-category.controller.ts index cf9a887f2..a4631ca6a 100644 --- a/services/apps/alcs/src/alcs/tag/tag-category/tag-category.controller.ts +++ b/services/apps/alcs/src/alcs/tag/tag-category/tag-category.controller.ts @@ -3,7 +3,7 @@ import { ApiOAuth2 } from '@nestjs/swagger'; import * as config from 'config'; import { RolesGuard } from '../../../common/authorization/roles-guard.service'; import { UserRoles } from '../../../common/authorization/roles.decorator'; -import { AUTH_ROLE } from '../../../common/authorization/roles'; +import { ANY_ROLE_BUT_COMMISSIONER, AUTH_ROLE } from '../../../common/authorization/roles'; import { TagCategoryDto } from './tag-category.dto'; import { TagCategoryService } from './tag-category.service'; @@ -14,7 +14,7 @@ export class TagCategoryController { constructor(private service: TagCategoryService) {} @Get('') - @UserRoles(AUTH_ROLE.ADMIN) + @UserRoles(...ANY_ROLE_BUT_COMMISSIONER) async fetch( @Query('pageIndex') pageIndex: number, @Query('itemsPerPage') itemsPerPage: number, diff --git a/services/apps/alcs/src/alcs/tag/tag.controller.ts b/services/apps/alcs/src/alcs/tag/tag.controller.ts index a29446a9b..8d9df46e3 100644 --- a/services/apps/alcs/src/alcs/tag/tag.controller.ts +++ b/services/apps/alcs/src/alcs/tag/tag.controller.ts @@ -4,7 +4,7 @@ import * as config from 'config'; import { RolesGuard } from '../../common/authorization/roles-guard.service'; import { UserRoles } from '../../common/authorization/roles.decorator'; import { TagService } from './tag.service'; -import { AUTH_ROLE } from '../../common/authorization/roles'; +import { ANY_ROLE_BUT_COMMISSIONER, AUTH_ROLE } from '../../common/authorization/roles'; import { TagDto } from './tag.dto'; @Controller('tag') @@ -14,7 +14,7 @@ export class TagController { constructor(private service: TagService) {} @Get('') - @UserRoles(AUTH_ROLE.ADMIN) + @UserRoles(...ANY_ROLE_BUT_COMMISSIONER) async fetch( @Query('pageIndex') pageIndex: number, @Query('itemsPerPage') itemsPerPage: number, diff --git a/services/apps/alcs/src/common/authorization/roles.ts b/services/apps/alcs/src/common/authorization/roles.ts index 1eeb21cb3..b42e74478 100644 --- a/services/apps/alcs/src/common/authorization/roles.ts +++ b/services/apps/alcs/src/common/authorization/roles.ts @@ -18,12 +18,7 @@ export const ROLES_ALLOWED_APPLICATIONS = [ ]; export const ROLES_ALLOWED_BOARDS = ROLES_ALLOWED_APPLICATIONS; -export const ROLES_ALLOWED_ARCHIVE = [ - AUTH_ROLE.ADMIN, - AUTH_ROLE.APP_SPECIALIST, -]; +export const ROLES_ALLOWED_ARCHIVE = [AUTH_ROLE.ADMIN, AUTH_ROLE.APP_SPECIALIST]; export const ANY_AUTH_ROLE = Object.values(AUTH_ROLE); -export const ROLES_ALLOWED_SEARCH = [ - ...ROLES_ALLOWED_APPLICATIONS, - AUTH_ROLE.COMMISSIONER, -]; +export const ROLES_ALLOWED_SEARCH = [...ROLES_ALLOWED_APPLICATIONS, AUTH_ROLE.COMMISSIONER]; +export const ANY_ROLE_BUT_COMMISSIONER = Object.values(AUTH_ROLE).filter((role) => role !== AUTH_ROLE.COMMISSIONER);