From 9bf2fc3084ae226c1dca3badae0180efb1cd767c Mon Sep 17 00:00:00 2001 From: Mekhti Date: Wed, 21 Jun 2023 11:38:41 -0700 Subject: [PATCH 1/3] decision ui changes and performance fixes for home page --- .../pfrs/pfrs.component.html | 5 ++- .../pofo/pofo.component.html | 5 ++- .../decision-component.component.html | 4 +- .../pfrs-input/pfrs-input.component.html | 44 +++++++++---------- .../pofo-input/pofo-input.component.html | 24 +++++----- .../roso-input/roso-input.component.html | 24 +++++----- .../turp-input/turp-input.component.html | 2 +- .../decision-components.component.ts | 6 +++ .../application-modification.service.ts | 18 +++++--- .../application-reconsideration.service.ts | 14 +++--- .../alcs/application/application.service.ts | 23 ++++++---- .../src/alcs/covenant/covenant.service.ts | 21 ++++++--- .../alcs/src/alcs/home/home.controller.ts | 26 ++++++----- .../notice-of-intent-modification.service.ts | 2 +- .../notice-of-intent.service.ts | 14 +++++- .../planning-review.service.ts | 19 +++++--- 16 files changed, 151 insertions(+), 100 deletions(-) diff --git a/alcs-frontend/src/app/features/application/decision/decision-v2/decision-component/pfrs/pfrs.component.html b/alcs-frontend/src/app/features/application/decision/decision-v2/decision-component/pfrs/pfrs.component.html index 41eba63d63..a56a213626 100644 --- a/alcs-frontend/src/app/features/application/decision/decision-v2/decision-component/pfrs/pfrs.component.html +++ b/alcs-frontend/src/app/features/application/decision/decision-v2/decision-component/pfrs/pfrs.component.html @@ -24,7 +24,10 @@ {{ component.soilToPlaceVolume }} m3 - Area + + Area +
Note: 0.01 ha is 100m2
+ {{ component.soilToRemoveArea }} ha {{ component.soilToPlaceArea }} ha diff --git a/alcs-frontend/src/app/features/application/decision/decision-v2/decision-component/pofo/pofo.component.html b/alcs-frontend/src/app/features/application/decision/decision-v2/decision-component/pofo/pofo.component.html index 097e78287b..6d4d915862 100644 --- a/alcs-frontend/src/app/features/application/decision/decision-v2/decision-component/pofo/pofo.component.html +++ b/alcs-frontend/src/app/features/application/decision/decision-v2/decision-component/pofo/pofo.component.html @@ -18,7 +18,10 @@ {{ component.soilToPlaceVolume }} m3 - Area + + Area +
Note: 0.01 ha is 100m2
+ {{ component.soilToPlaceArea }} ha diff --git a/alcs-frontend/src/app/features/application/decision/decision-v2/decision-input/decision-components/decision-component/decision-component.component.html b/alcs-frontend/src/app/features/application/decision/decision-v2/decision-input/decision-components/decision-component/decision-component.component.html index 40747a5a49..9f8361f4a1 100644 --- a/alcs-frontend/src/app/features/application/decision/decision-v2/decision-input/decision-components/decision-component/decision-component.component.html +++ b/alcs-frontend/src/app/features/application/decision/decision-v2/decision-input/decision-components/decision-component/decision-component.component.html @@ -24,7 +24,7 @@ bindLabel="label" bindValue="value" required - placeholder="AG Cap*" + placeholder="Ag Cap*" [clearable]="false" > @@ -38,7 +38,7 @@ bindLabel="label" bindValue="value" required - placeholder="AG Cap Source*" + placeholder="Ag Cap Source*" [clearable]="false" > diff --git a/alcs-frontend/src/app/features/application/decision/decision-v2/decision-input/decision-components/decision-component/pfrs-input/pfrs-input.component.html b/alcs-frontend/src/app/features/application/decision/decision-v2/decision-input/decision-components/decision-component/pfrs-input/pfrs-input.component.html index b4f176dec6..5c32a19078 100644 --- a/alcs-frontend/src/app/features/application/decision/decision-v2/decision-input/decision-components/decision-component/pfrs-input/pfrs-input.component.html +++ b/alcs-frontend/src/app/features/application/decision/decision-v2/decision-input/decision-components/decision-component/pfrs-input/pfrs-input.component.html @@ -1,5 +1,5 @@
-
+
Use End Date +
- - - + + + - - - -
+ + +
diff --git a/alcs-frontend/src/app/features/application/decision/decision-v2/decision-input/decision-components/decision-component/pofo-input/pofo-input.component.html b/alcs-frontend/src/app/features/application/decision/decision-v2/decision-input/decision-components/decision-component/pofo-input/pofo-input.component.html index 557da4c674..5a4496a71f 100644 --- a/alcs-frontend/src/app/features/application/decision/decision-v2/decision-input/decision-components/decision-component/pofo-input/pofo-input.component.html +++ b/alcs-frontend/src/app/features/application/decision/decision-v2/decision-input/decision-components/decision-component/pofo-input/pofo-input.component.html @@ -1,5 +1,5 @@ -
+
Use End Date - - - -
+ + + +
diff --git a/alcs-frontend/src/app/features/application/decision/decision-v2/decision-input/decision-components/decision-component/roso-input/roso-input.component.html b/alcs-frontend/src/app/features/application/decision/decision-v2/decision-input/decision-components/decision-component/roso-input/roso-input.component.html index c5fed4442f..9ebd0e5249 100644 --- a/alcs-frontend/src/app/features/application/decision/decision-v2/decision-input/decision-components/decision-component/roso-input/roso-input.component.html +++ b/alcs-frontend/src/app/features/application/decision/decision-v2/decision-input/decision-components/decision-component/roso-input/roso-input.component.html @@ -1,5 +1,5 @@ -
+
Use End Date - - - -
+ + + +
diff --git a/alcs-frontend/src/app/features/application/decision/decision-v2/decision-input/decision-components/decision-component/turp-input/turp-input.component.html b/alcs-frontend/src/app/features/application/decision/decision-v2/decision-input/decision-components/decision-component/turp-input/turp-input.component.html index 8e10db30c0..1421b99ab5 100644 --- a/alcs-frontend/src/app/features/application/decision/decision-v2/decision-input/decision-components/decision-component/turp-input/turp-input.component.html +++ b/alcs-frontend/src/app/features/application/decision/decision-v2/decision-input/decision-components/decision-component/turp-input/turp-input.component.html @@ -1,5 +1,5 @@ -
+
Expiry Date e.code === typeCode && e.uiCode !== 'COPY' + ), }; if (typeCode === APPLICATION_DECISION_COMPONENT_TYPE.NFUP) { @@ -123,6 +126,9 @@ export class DecisionComponentsComponent implements OnInit, OnDestroy { case APPLICATION_DECISION_COMPONENT_TYPE.PFRS: this.components.push({ applicationDecisionComponentTypeCode: typeCode, + applicationDecisionComponentType: this.decisionComponentTypes.find( + (e) => e.code === typeCode && e.uiCode !== 'COPY' + ), } as DecisionComponentDto); break; default: diff --git a/services/apps/alcs/src/alcs/application-decision/application-modification/application-modification.service.ts b/services/apps/alcs/src/alcs/application-decision/application-modification/application-modification.service.ts index 935c3ec76f..fd4859469b 100644 --- a/services/apps/alcs/src/alcs/application-decision/application-modification/application-modification.service.ts +++ b/services/apps/alcs/src/alcs/application-decision/application-modification/application-modification.service.ts @@ -13,6 +13,7 @@ import { import { ApplicationService } from '../../application/application.service'; import { Board } from '../../board/board.entity'; import { CARD_TYPE } from '../../card/card-type/card-type.entity'; +import { Card } from '../../card/card.entity'; import { CardService } from '../../card/card.service'; import { ApplicationDecisionV1Service } from '../application-decision-v1/application-decision/application-decision-v1.service'; import { @@ -33,7 +34,14 @@ export class ApplicationModificationService { private cardService: CardService, ) {} - private BOARD_RECONSIDERATION_RELATIONS: FindOptionsRelations = + private CARD_RELATIONS: FindOptionsRelations = { + board: true, + type: true, + status: true, + assignee: true, + }; + + private BOARD_MODIFICATION_RELATIONS: FindOptionsRelations = { application: { type: true, @@ -42,10 +50,8 @@ export class ApplicationModificationService { decisionMeetings: true, }, card: { - board: true, - type: true, - status: true, - assignee: true, + ...this.CARD_RELATIONS, + board: false, }, }; @@ -70,7 +76,7 @@ export class ApplicationModificationService { getByBoard(boardUuid: string) { return this.modificationRepository.find({ where: { card: { boardUuid } }, - relations: this.BOARD_RECONSIDERATION_RELATIONS, + relations: this.BOARD_MODIFICATION_RELATIONS, }); } diff --git a/services/apps/alcs/src/alcs/application-decision/application-reconsideration/application-reconsideration.service.ts b/services/apps/alcs/src/alcs/application-decision/application-reconsideration/application-reconsideration.service.ts index 306075499b..cb16345a2d 100644 --- a/services/apps/alcs/src/alcs/application-decision/application-reconsideration/application-reconsideration.service.ts +++ b/services/apps/alcs/src/alcs/application-decision/application-reconsideration/application-reconsideration.service.ts @@ -43,6 +43,13 @@ export class ApplicationReconsiderationService { private applicationDecisionService: ApplicationDecisionV1Service, ) {} + private DEFAULT_CARD_RELATIONS = { + board: true, + type: true, + status: true, + assignee: true, + }; + private BOARD_RECONSIDERATION_RELATIONS: FindOptionsRelations = { application: { @@ -51,12 +58,7 @@ export class ApplicationReconsiderationService { localGovernment: true, decisionMeetings: true, }, - card: { - board: true, - type: true, - status: true, - assignee: true, - }, + card: { ...this.DEFAULT_CARD_RELATIONS, board: false }, type: true, }; diff --git a/services/apps/alcs/src/alcs/application/application.service.ts b/services/apps/alcs/src/alcs/application/application.service.ts index f8022a97cd..3f623e66bf 100644 --- a/services/apps/alcs/src/alcs/application/application.service.ts +++ b/services/apps/alcs/src/alcs/application/application.service.ts @@ -46,12 +46,11 @@ export class ApplicationService { status: true, assignee: true, type: true, + board: true, }; private BOARD_RELATIONS: FindOptionsRelations = { type: true, - card: { - ...this.DEFAULT_CARD_RELATIONS, - }, + card: this.DEFAULT_CARD_RELATIONS, region: true, decisionMeetings: true, localGovernment: true, @@ -59,10 +58,7 @@ export class ApplicationService { private DEFAULT_RELATIONS: FindOptionsRelations = { type: true, - card: { - ...this.DEFAULT_CARD_RELATIONS, - board: true, - }, + card: this.DEFAULT_CARD_RELATIONS, region: true, decisionMeetings: true, localGovernment: true, @@ -224,7 +220,13 @@ export class ApplicationService { ): Promise { return await this.applicationRepository.find({ where: findOptions, - relations: this.DEFAULT_RELATIONS, + relations: { + ...this.DEFAULT_RELATIONS, + card: { + ...this.DEFAULT_CARD_RELATIONS, + board: true, + }, + }, order: sortOptions, }); } @@ -236,7 +238,10 @@ export class ApplicationService { boardUuid, }, }, - relations: this.BOARD_RELATIONS, + relations: { + ...this.BOARD_RELATIONS, + card: { ...this.DEFAULT_CARD_RELATIONS, board: false }, + }, }); } diff --git a/services/apps/alcs/src/alcs/covenant/covenant.service.ts b/services/apps/alcs/src/alcs/covenant/covenant.service.ts index 7f6bc23d27..c19167d1ce 100644 --- a/services/apps/alcs/src/alcs/covenant/covenant.service.ts +++ b/services/apps/alcs/src/alcs/covenant/covenant.service.ts @@ -19,13 +19,14 @@ import { Covenant } from './covenant.entity'; @Injectable() export class CovenantService { + private CARD_RELATIONS = { + board: true, + type: true, + status: true, + assignee: true, + }; private DEFAULT_RELATIONS: FindOptionsRelations = { - card: { - board: true, - type: true, - status: true, - assignee: true, - }, + card: this.CARD_RELATIONS, localGovernment: true, region: true, }; @@ -116,7 +117,13 @@ export class CovenantService { async getByBoard(boardUuid: string) { return this.repository.find({ where: { card: { boardUuid } }, - relations: this.DEFAULT_RELATIONS, + relations: { + ...this.DEFAULT_RELATIONS, + card: { + ...this.CARD_RELATIONS, + board: false, + }, + }, }); } diff --git a/services/apps/alcs/src/alcs/home/home.controller.ts b/services/apps/alcs/src/alcs/home/home.controller.ts index c40bc87f2a..4fec6f8175 100644 --- a/services/apps/alcs/src/alcs/home/home.controller.ts +++ b/services/apps/alcs/src/alcs/home/home.controller.ts @@ -4,6 +4,17 @@ import { Controller, Get, Param, Req, UseGuards } from '@nestjs/common'; import { ApiOAuth2 } from '@nestjs/swagger'; import * as config from 'config'; import { In, Not } from 'typeorm'; +import { ANY_AUTH_ROLE } from '../../common/authorization/roles'; +import { RolesGuard } from '../../common/authorization/roles-guard.service'; +import { UserRoles } from '../../common/authorization/roles.decorator'; +import { AssigneeDto } from '../../user/user.dto'; +import { User } from '../../user/user.entity'; +import { ApplicationModificationDto } from '../application-decision/application-modification/application-modification.dto'; +import { ApplicationModification } from '../application-decision/application-modification/application-modification.entity'; +import { ApplicationModificationService } from '../application-decision/application-modification/application-modification.service'; +import { ApplicationReconsiderationDto } from '../application-decision/application-reconsideration/application-reconsideration.dto'; +import { ApplicationReconsideration } from '../application-decision/application-reconsideration/application-reconsideration.entity'; +import { ApplicationReconsiderationService } from '../application-decision/application-reconsideration/application-reconsideration.service'; import { ApplicationTimeTrackingService } from '../application/application-time-tracking.service'; import { ApplicationDto } from '../application/application.dto'; import { Application } from '../application/application.entity'; @@ -15,18 +26,9 @@ import { } from '../card/card-subtask/card-subtask.dto'; import { CardDto } from '../card/card.dto'; import { Card } from '../card/card.entity'; -import { ANY_AUTH_ROLE } from '../../common/authorization/roles'; -import { RolesGuard } from '../../common/authorization/roles-guard.service'; -import { UserRoles } from '../../common/authorization/roles.decorator'; import { CovenantDto } from '../covenant/covenant.dto'; import { Covenant } from '../covenant/covenant.entity'; import { CovenantService } from '../covenant/covenant.service'; -import { ApplicationModificationDto } from '../application-decision/application-modification/application-modification.dto'; -import { ApplicationModification } from '../application-decision/application-modification/application-modification.entity'; -import { ApplicationModificationService } from '../application-decision/application-modification/application-modification.service'; -import { ApplicationReconsiderationDto } from '../application-decision/application-reconsideration/application-reconsideration.dto'; -import { ApplicationReconsideration } from '../application-decision/application-reconsideration/application-reconsideration.entity'; -import { ApplicationReconsiderationService } from '../application-decision/application-reconsideration/application-reconsideration.service'; import { NoticeOfIntentModificationDto } from '../notice-of-intent-decision/notice-of-intent-modification/notice-of-intent-modification.dto'; import { NoticeOfIntentModificationService } from '../notice-of-intent-decision/notice-of-intent-modification/notice-of-intent-modification.service'; import { NoticeOfIntentDto } from '../notice-of-intent/notice-of-intent.dto'; @@ -35,8 +37,6 @@ import { NoticeOfIntentService } from '../notice-of-intent/notice-of-intent.serv import { PlanningReviewDto } from '../planning-review/planning-review.dto'; import { PlanningReview } from '../planning-review/planning-review.entity'; import { PlanningReviewService } from '../planning-review/planning-review.service'; -import { AssigneeDto } from '../../user/user.dto'; -import { User } from '../../user/user.entity'; const HIDDEN_CARD_STATUSES = [ CARD_STATUS.CANCELLED, @@ -105,7 +105,7 @@ export class HomeController { const noticeOfIntentModifications = await this.noticeOfIntentModificationService.getBy(assignedFindOptions); - return { + const result = { noticeOfIntents: await this.noticeOfIntentService.mapToDtos( noticeOfIntents, ), @@ -123,6 +123,8 @@ export class HomeController { modifications: await this.modificationService.mapToDtos(modifications), covenants: await this.covenantService.mapToDtos(covenants), }; + + return result; } else { return { noticeOfIntents: [], diff --git a/services/apps/alcs/src/alcs/notice-of-intent-decision/notice-of-intent-modification/notice-of-intent-modification.service.ts b/services/apps/alcs/src/alcs/notice-of-intent-decision/notice-of-intent-modification/notice-of-intent-modification.service.ts index cd4d3e7a2b..ff8c210b4f 100644 --- a/services/apps/alcs/src/alcs/notice-of-intent-decision/notice-of-intent-modification/notice-of-intent-modification.service.ts +++ b/services/apps/alcs/src/alcs/notice-of-intent-decision/notice-of-intent-modification/notice-of-intent-modification.service.ts @@ -40,7 +40,7 @@ export class NoticeOfIntentModificationService { localGovernment: true, }, card: { - board: true, + board: false, type: true, status: true, assignee: true, diff --git a/services/apps/alcs/src/alcs/notice-of-intent/notice-of-intent.service.ts b/services/apps/alcs/src/alcs/notice-of-intent/notice-of-intent.service.ts index 7fc5653f8a..e7e76967df 100644 --- a/services/apps/alcs/src/alcs/notice-of-intent/notice-of-intent.service.ts +++ b/services/apps/alcs/src/alcs/notice-of-intent/notice-of-intent.service.ts @@ -28,6 +28,15 @@ import { NoticeOfIntent } from './notice-of-intent.entity'; @Injectable() export class NoticeOfIntentService { + private CARD_RELATIONS = { + card: { + board: true, + type: true, + status: true, + assignee: true, + }, + }; + private DEFAULT_RELATIONS: FindOptionsRelations = { card: { board: true, @@ -134,7 +143,10 @@ export class NoticeOfIntentService { where: { uuid, }, - relations: this.DEFAULT_RELATIONS, + relations: { + ...this.DEFAULT_RELATIONS, + card: { ...this.CARD_RELATIONS, board: false }, + }, }); } diff --git a/services/apps/alcs/src/alcs/planning-review/planning-review.service.ts b/services/apps/alcs/src/alcs/planning-review/planning-review.service.ts index 9a2113243c..a7f759c470 100644 --- a/services/apps/alcs/src/alcs/planning-review/planning-review.service.ts +++ b/services/apps/alcs/src/alcs/planning-review/planning-review.service.ts @@ -31,13 +31,15 @@ export class PlanningReviewService { @InjectMapper() private mapper: Mapper, ) {} + private CARD_RELATION = { + board: true, + type: true, + status: true, + assignee: true, + }; + private DEFAULT_RELATIONS: FindOptionsRelations = { - card: { - board: true, - type: true, - status: true, - assignee: true, - }, + card: this.CARD_RELATION, localGovernment: true, region: true, }; @@ -136,7 +138,10 @@ export class PlanningReviewService { async getByBoard(boardUuid: string) { const res = await this.repository.find({ - relations: this.DEFAULT_RELATIONS, + relations: { + ...this.DEFAULT_RELATIONS, + card: { ...this.CARD_RELATION, board: false }, + }, where: { card: { boardUuid, From c409e3d97dff5a93ef8671c050b0a8c4814e8494 Mon Sep 17 00:00:00 2001 From: Mekhti Date: Wed, 21 Jun 2023 11:56:32 -0700 Subject: [PATCH 2/3] unit tests --- .../decision/decision-v2/decision-v2.component.scss | 5 +++++ .../application-modification.service.spec.ts | 2 +- .../application-reconsideration.service.spec.ts | 2 +- .../alcs/src/alcs/application/application.service.spec.ts | 1 + .../notice-of-intent-modification.service.spec.ts | 2 +- 5 files changed, 9 insertions(+), 3 deletions(-) diff --git a/alcs-frontend/src/app/features/application/decision/decision-v2/decision-v2.component.scss b/alcs-frontend/src/app/features/application/decision/decision-v2/decision-v2.component.scss index 33e175c722..f60d89faf5 100644 --- a/alcs-frontend/src/app/features/application/decision/decision-v2/decision-v2.component.scss +++ b/alcs-frontend/src/app/features/application/decision/decision-v2/decision-v2.component.scss @@ -1,4 +1,5 @@ @use '../../../../../styles/colors'; + :host ::ng-deep { section { margin-bottom: 64px; @@ -122,6 +123,10 @@ color: #565656 !important; } + .subheading1 { + color: colors.$grey-dark !important; + } + .application-pill-wrapper, .application-pill { margin-right: 0 !important; diff --git a/services/apps/alcs/src/alcs/application-decision/application-modification/application-modification.service.spec.ts b/services/apps/alcs/src/alcs/application-decision/application-modification/application-modification.service.spec.ts index edfb4514a8..bafd50b224 100644 --- a/services/apps/alcs/src/alcs/application-decision/application-modification/application-modification.service.spec.ts +++ b/services/apps/alcs/src/alcs/application-decision/application-modification/application-modification.service.spec.ts @@ -42,7 +42,7 @@ describe('ApplicationModificationService', () => { decisionMeetings: true, }, card: { - board: true, + board: false, type: true, status: true, assignee: true, diff --git a/services/apps/alcs/src/alcs/application-decision/application-reconsideration/application-reconsideration.service.spec.ts b/services/apps/alcs/src/alcs/application-decision/application-reconsideration/application-reconsideration.service.spec.ts index 3ad3727275..74fcc2e3aa 100644 --- a/services/apps/alcs/src/alcs/application-decision/application-reconsideration/application-reconsideration.service.spec.ts +++ b/services/apps/alcs/src/alcs/application-decision/application-reconsideration/application-reconsideration.service.spec.ts @@ -51,7 +51,7 @@ describe('ReconsiderationService', () => { decisionMeetings: true, }, card: { - board: true, + board: false, type: true, status: true, assignee: true, diff --git a/services/apps/alcs/src/alcs/application/application.service.spec.ts b/services/apps/alcs/src/alcs/application/application.service.spec.ts index 379307ec8a..fb93becfa2 100644 --- a/services/apps/alcs/src/alcs/application/application.service.spec.ts +++ b/services/apps/alcs/src/alcs/application/application.service.spec.ts @@ -42,6 +42,7 @@ describe('ApplicationService', () => { type: true, card: { ...DEFAULT_CARD_RELATIONS, + board: false, }, region: true, decisionMeetings: true, diff --git a/services/apps/alcs/src/alcs/notice-of-intent-decision/notice-of-intent-modification/notice-of-intent-modification.service.spec.ts b/services/apps/alcs/src/alcs/notice-of-intent-decision/notice-of-intent-modification/notice-of-intent-modification.service.spec.ts index 539a4f6ed5..80ce3c69a0 100644 --- a/services/apps/alcs/src/alcs/notice-of-intent-decision/notice-of-intent-modification/notice-of-intent-modification.service.spec.ts +++ b/services/apps/alcs/src/alcs/notice-of-intent-decision/notice-of-intent-modification/notice-of-intent-modification.service.spec.ts @@ -37,7 +37,7 @@ describe('NoticeOfIntentModificationService', () => { localGovernment: true, }, card: { - board: true, + board: false, type: true, status: true, assignee: true, From eeec60faa75769ad701f7321e2ed19b1d3276f47 Mon Sep 17 00:00:00 2001 From: Mekhti Date: Wed, 21 Jun 2023 12:11:05 -0700 Subject: [PATCH 3/3] fix typo --- .../notice-of-intent.service.ts | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/services/apps/alcs/src/alcs/notice-of-intent/notice-of-intent.service.ts b/services/apps/alcs/src/alcs/notice-of-intent/notice-of-intent.service.ts index e7e76967df..19d9533ec3 100644 --- a/services/apps/alcs/src/alcs/notice-of-intent/notice-of-intent.service.ts +++ b/services/apps/alcs/src/alcs/notice-of-intent/notice-of-intent.service.ts @@ -29,21 +29,14 @@ import { NoticeOfIntent } from './notice-of-intent.entity'; @Injectable() export class NoticeOfIntentService { private CARD_RELATIONS = { - card: { - board: true, - type: true, - status: true, - assignee: true, - }, + board: true, + type: true, + status: true, + assignee: true, }; private DEFAULT_RELATIONS: FindOptionsRelations = { - card: { - board: true, - type: true, - status: true, - assignee: true, - }, + card: this.CARD_RELATIONS, localGovernment: true, region: true, subtype: true,