Skip to content

Commit

Permalink
Merge pull request #1454 from bcgov/develop
Browse files Browse the repository at this point in the history
Deployment PR - 981
  • Loading branch information
dhaselhan authored Mar 6, 2024
2 parents b5512e8 + 6635d63 commit b749b51
Show file tree
Hide file tree
Showing 125 changed files with 2,981 additions and 646 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,19 +69,59 @@ <h4 [id]="parcel.uuid">Parcel #{{ parcelInd + 1 }}: Parcel and Owner Information
<a (click)="openFile(parcel.certificateOfTitle)">{{ parcel.certificateOfTitle.fileName }}</a>
</div>
</div>
<div
class="full-width owner-information"
[ngClass]="{ 'crown-owner-information': parcel.ownershipTypeCode === PARCEL_OWNERSHIP_TYPES.CROWN }"
>
<div class="subheading2" *ngIf="parcel.ownershipTypeCode !== PARCEL_OWNERSHIP_TYPES.CROWN">Land Owner(s)</div>
<div class="subheading2" *ngIf="parcel.ownershipTypeCode === PARCEL_OWNERSHIP_TYPES.CROWN">Crown Contact(s)</div>
<div class="subheading2" *ngIf="parcel.ownershipTypeCode !== PARCEL_OWNERSHIP_TYPES.CROWN">Organization</div>
<div class="subheading2" *ngIf="parcel.ownershipTypeCode === PARCEL_OWNERSHIP_TYPES.CROWN">
Ministry/Department
</div>
<ng-container *ngIf="parcel.ownershipTypeCode === PARCEL_OWNERSHIP_TYPES.CROWN">
<h5>Government Parcel Contact</h5>
<ng-container *ngIf="parcel.owners[0]">
<div class="subheading2 grid-1">First Name</div>
<div class="grid-double">
{{ parcel.owners[0].firstName }}
<app-no-data *ngIf="!parcel.owners[0].firstName"></app-no-data>
</div>
<div class="subheading2 grid-1">
Last Name
</div>
<div class="grid-double">
{{ parcel.owners[0].lastName }}
<app-no-data *ngIf="!parcel.owners[0].lastName"></app-no-data>
</div>
<div class="subheading2 grid-1">
Ministry or Department
</div>
<div class="grid-double">
{{ parcel.owners[0].organizationName }}
<app-no-data *ngIf="!parcel.owners[0].organizationName"></app-no-data>
</div>
<div class="subheading2 grid-1">
Phone
</div>
<div class="grid-double">
{{ parcel.owners[0].phoneNumber }}
<app-no-data *ngIf="!parcel.owners[0].phoneNumber"></app-no-data>
</div>
<div class="subheading2 grid-1">
Email
</div>
<div class="grid-double">
{{ parcel.owners[0].email }}
<app-no-data *ngIf="!parcel.owners[0].email"></app-no-data>
</div>
<div class="subheading2 grid-1">
Crown Type
</div>
<div class="grid-double">
{{ parcel.owners[0].crownLandOwnerType === 'provincial' ? 'Provincial Crown' : '' }}
{{ parcel.owners[0].crownLandOwnerType === 'federal' ? 'Federal Crown' : '' }}
<app-no-data *ngIf="!parcel.owners[0].crownLandOwnerType"></app-no-data>
</div>
</ng-container>
<app-no-data *ngIf="!parcel.owners[0]"></app-no-data>
</ng-container>
<div class="full-width owner-information" *ngIf="parcel.ownershipTypeCode !== PARCEL_OWNERSHIP_TYPES.CROWN">
<div class="subheading2">Land Owner(s)</div>
<div class="subheading2">Organization</div>
<div class="subheading2">Phone</div>
<div class="subheading2">Email</div>
<div class="subheading2" *ngIf="parcel.ownershipTypeCode !== PARCEL_OWNERSHIP_TYPES.CROWN">Corporate Summary</div>
<div class="subheading2">Corporate Summary</div>
<ng-container *ngFor="let owner of parcel.owners">
<div>{{ owner.displayName }}</div>
<div>
Expand All @@ -90,7 +130,7 @@ <h4 [id]="parcel.uuid">Parcel #{{ parcelInd + 1 }}: Parcel and Owner Information
</div>
<div>{{ owner.phoneNumber }}</div>
<div>{{ owner.email }}</div>
<div *ngIf="parcel.ownershipTypeCode !== PARCEL_OWNERSHIP_TYPES.CROWN">
<div>
<a *ngIf="owner.corporateSummary" (click)="openFile(owner.corporateSummary)">{{
owner.corporateSummary.fileName
}}</a>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
<textarea
class="soil-text-area"
formControlName="soilTypeRemoved"
#fillTypeToPlaceText
maxlength="4000"
matInput
placeholder="Type of soil approved to be removed*"
Expand All @@ -55,7 +54,6 @@
<textarea
class="soil-text-area"
formControlName="fillTypeToPlace"
#fillTypeToPlaceText
maxlength="4000"
matInput
placeholder="Type, origin and quality of fill approved to be placed*"
Expand All @@ -66,13 +64,13 @@
<div class="soil-table">
<div></div>
<div>
<label for="volume">Soil to be Removed</label>
<label>Soil to be Removed</label>
</div>
<div>
<label for="volume">Fill to be placed</label>
<label>Fill to be placed</label>
</div>
<div class="label">
<label for="volumeToRemove">Volume*</label>
<label>Volume*</label>
</div>
<div>
<mat-form-field appearance="outline" class="full-width">
Expand Down Expand Up @@ -101,7 +99,7 @@
</mat-form-field>
</div>
<div class="label">
<label for="areaToRemove">Area*</label>
<label>Area*</label>
</div>
<div>
<mat-form-field appearance="outline" class="full-width">
Expand Down Expand Up @@ -130,7 +128,7 @@
</mat-form-field>
</div>
<div class="label">
<label for="maximumDepthToRemove">Maximum Depth*</label>
<label>Maximum Depth*</label>
</div>
<div>
<mat-form-field appearance="outline" class="full-width">
Expand Down Expand Up @@ -159,7 +157,7 @@
</mat-form-field>
</div>
<div class="label">
<label for="averageDepthToRemove">Average Depth*</label>
<label>Average Depth*</label>
</div>
<div>
<mat-form-field appearance="outline" class="full-width">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
thousandSeparator=","
separatorLimit="9999999999"
formControlName="averageDepthToPlace"
placeholder="Volume*"
placeholder="Average Depth*"
/>
<span matTextSuffix>m</span>
</mat-form-field>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
<textarea
class="soil-text-area"
formControlName="soilTypeRemoved"
#fillTypeToPlaceText
maxlength="4000"
matInput
placeholder="Type of soil approved to be removed*"
Expand Down Expand Up @@ -62,7 +61,7 @@
formControlName="areaToRemove"
placeholder="Area*"
/>
<span matTextSuffix>ha</span>
<span matTextSuffix>m<sup>2</sup></span>
</mat-form-field>

<mat-form-field appearance="outline">
Expand All @@ -86,7 +85,7 @@
thousandSeparator=","
separatorLimit="9999999999"
formControlName="averageDepthToRemove"
placeholder="Volume*"
placeholder="Average Depth*"
/>
<span matTextSuffix>m</span>
</mat-form-field>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,28 +21,11 @@ export interface AssignedToMeFile {
})
export class AssignedTableComponent {
@Input() assignedFiles: AssignedToMeFile[] = [];
displayedColumns = ['highPriority', 'title', 'type', 'activeDays', 'stage'];

constructor(private router: Router) {}

async onSelectCard(card: CardDto) {
await this.router.navigateByUrl(`/board/${card.boardCode}?card=${card.uuid}&type=${card.type}`);
}

get displayedColumns(): string[] {
// Include all default columns
const columns = ['highPriority', 'title', 'type', 'activeDays', 'stage'];

// Check if any file has type 'NOTI'
const hasNoti = this.assignedFiles.some(file => file.type === 'NOTI');

// If 'NOTI' type exists, remove 'activeDays' column
if (hasNoti) {
const index = columns.indexOf('activeDays');
if (index !== -1) {
columns.splice(index, 1);
}
}

return columns;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ export class SubtaskTableComponent {
@Input() subtasks: HomepageSubtaskDto[] = [];
@Input() users: AssigneeDto[] = [];

displayedColumns = ['highPriority', 'title', 'type', 'activeDays', 'stage', 'assignee', 'action'];

MODIFICATION_TYPE_LABEL = MODIFICATION_TYPE_LABEL;
PLANNING_TYPE_LABEL = PLANNING_TYPE_LABEL;
Expand All @@ -39,6 +38,23 @@ export class SubtaskTableComponent {
private cardSubtaskService: CardSubtaskService,
) {}

get displayedColumns(): string[] {
// Include all default columns
const columns = ['highPriority', 'title', 'type', 'activeDays', 'stage', 'assignee', 'action'];

// Check if any file has type 'NOTI'
const hasNoti = this.subtasks.some(task => task.parentType === 'notification');
// If 'NOTI' type exists, remove 'activeDays' column
if (hasNoti) {
const index = columns.indexOf('activeDays');
if (index !== -1) {
columns.splice(index, 1);
}
}

return columns;
}

filterAssigneeList(term: string, item: AssigneeDto) {
const termLower = term.toLocaleLowerCase();
return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,20 +68,62 @@ <h4 [id]="parcel.uuid">Parcel #{{ parcelInd + 1 }}: Parcel and Owner Information
<a (click)="onOpenFile(parcel.certificateOfTitle)">{{ parcel.certificateOfTitle.fileName }}</a>
</div>
</div>

<ng-container *ngIf="parcel.ownershipTypeCode === PARCEL_OWNERSHIP_TYPES.CROWN">
<h5>Government Parcel Contact</h5>
<ng-container *ngIf="parcel.owners[0]">
<div class="subheading2 grid-1">First Name</div>
<div class="grid-double">
{{ parcel.owners[0].firstName }}
<app-no-data *ngIf="!parcel.owners[0].firstName"></app-no-data>
</div>
<div class="subheading2 grid-1">
Last Name
</div>
<div class="grid-double">
{{ parcel.owners[0].lastName }}
<app-no-data *ngIf="!parcel.owners[0].lastName"></app-no-data>
</div>
<div class="subheading2 grid-1">
Ministry or Department
</div>
<div class="grid-double">
{{ parcel.owners[0].organizationName }}
<app-no-data *ngIf="!parcel.owners[0].organizationName"></app-no-data>
</div>
<div class="subheading2 grid-1">
Phone
</div>
<div class="grid-double">
{{ parcel.owners[0].phoneNumber }}
<app-no-data *ngIf="!parcel.owners[0].phoneNumber"></app-no-data>
</div>
<div class="subheading2 grid-1">
Email
</div>
<div class="grid-double">
{{ parcel.owners[0].email }}
<app-no-data *ngIf="!parcel.owners[0].email"></app-no-data>
</div>
<div class="subheading2 grid-1">
Crown Type
</div>
<div class="grid-double">
{{ parcel.owners[0].crownLandOwnerType === 'provincial' ? 'Provincial Crown' : '' }}
{{ parcel.owners[0].crownLandOwnerType === 'federal' ? 'Federal Crown' : '' }}
<app-no-data *ngIf="!parcel.owners[0].crownLandOwnerType"></app-no-data>
</div>
</ng-container>
<app-no-data *ngIf="!parcel.owners[0]"></app-no-data>
</ng-container>
<div
class="full-width owner-information"
[ngClass]="{ 'crown-owner-information': parcel.ownershipTypeCode === PARCEL_OWNERSHIP_TYPES.CROWN }"
*ngIf="parcel.ownershipTypeCode !== PARCEL_OWNERSHIP_TYPES.CROWN"
>
<div class="subheading2" *ngIf="parcel.ownershipTypeCode !== PARCEL_OWNERSHIP_TYPES.CROWN">Land Owner(s)</div>
<div class="subheading2" *ngIf="parcel.ownershipTypeCode === PARCEL_OWNERSHIP_TYPES.CROWN">Crown Contact</div>
<div class="subheading2" *ngIf="parcel.ownershipTypeCode !== PARCEL_OWNERSHIP_TYPES.CROWN">Organization</div>
<div class="subheading2" *ngIf="parcel.ownershipTypeCode === PARCEL_OWNERSHIP_TYPES.CROWN">
Ministry/Department
</div>
<div class="subheading2">Land Owner(s)</div>
<div class="subheading2">Organization</div>
<div class="subheading2">Phone</div>
<div class="subheading2">Email</div>
<div *ngIf="parcel.ownershipTypeCode !== PARCEL_OWNERSHIP_TYPES.CROWN" class="subheading2">Corporate Summary</div>
<div class="subheading2">Corporate Summary</div>
<ng-container *ngFor="let owner of parcel.owners">
<div>{{ owner.displayName }}</div>
<div>
Expand All @@ -90,7 +132,7 @@ <h4 [id]="parcel.uuid">Parcel #{{ parcelInd + 1 }}: Parcel and Owner Information
</div>
<div>{{ owner.phoneNumber }}</div>
<div>{{ owner.email }}</div>
<div *ngIf="parcel.ownershipTypeCode !== PARCEL_OWNERSHIP_TYPES.CROWN">
<div>
<a *ngIf="owner.corporateSummary" (click)="onOpenFile(owner.corporateSummary)">{{
owner.corporateSummary.fileName
}}</a>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
<textarea
class="soil-text-area"
formControlName="soilTypeRemoved"
#fillTypeToPlaceText
maxlength="4000"
matInput
placeholder="Type of soil approved to be removed*"
Expand All @@ -54,7 +53,6 @@
<textarea
class="soil-text-area"
formControlName="fillTypeToPlace"
#fillTypeToPlaceText
maxlength="4000"
matInput
placeholder="Type, origin and quality of fill approved to be placed*"
Expand All @@ -64,13 +62,13 @@
<div class="soil-table">
<div></div>
<div>
<label for="volume">Soil to be Removed</label>
<label>Soil to be Removed</label>
</div>
<div>
<label for="volume">Fill to be placed</label>
<label>Fill to be placed</label>
</div>
<div class="label">
<label for="volumeToRemove">Volume*</label>
<label>Volume*</label>
</div>
<div>
<mat-form-field appearance="outline" class="full-width">
Expand Down Expand Up @@ -99,7 +97,7 @@
</mat-form-field>
</div>
<div class="label">
<label for="areaToRemove">Area*</label>
<label>Area*</label>
</div>
<div>
<mat-form-field appearance="outline" class="full-width">
Expand All @@ -124,11 +122,11 @@
matInput
formControlName="areaToPlace"
/>
<span matTextSuffix>ha</span>
<span matTextSuffix>m<sup>2</sup></span>
</mat-form-field>
</div>
<div class="label">
<label for="maximumDepthToRemove">Maximum Depth*</label>
<label>Maximum Depth*</label>
</div>
<div>
<mat-form-field appearance="outline" class="full-width">
Expand Down Expand Up @@ -157,7 +155,7 @@
</mat-form-field>
</div>
<div class="label">
<label for="averageDepthToRemove">Average Depth*</label>
<label>Average Depth*</label>
</div>
<div>
<mat-form-field appearance="outline" class="full-width">
Expand Down
Loading

0 comments on commit b749b51

Please sign in to comment.