Skip to content

Commit

Permalink
Merge branch 'main' into renovate/migrate-config
Browse files Browse the repository at this point in the history
  • Loading branch information
ianliuwk1019 authored Aug 19, 2024
2 parents ce6176e + 98328d8 commit 08599ff
Show file tree
Hide file tree
Showing 14 changed files with 66 additions and 42 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@
<div class="container">
<div class="title-container">
<div class="title-container__title">
<h1 class="text-muted">FSP ID: {{project.fspId}}</h1>
<h1 class="text-muted">{{project.projectPlanCode == projectPlanCodeEnum.Fsp
? "FSP ID: " + project.fspId
: "Woodlot Licence: "+ project.woodlotLicenseNumber
}}</h1>
</div>
<div class="title-container__actions">
<button
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { DatePipe, NgFor, NgIf } from '@angular/common';
import { AfterViewInit, Component, OnDestroy, OnInit } from '@angular/core';
import { MatSnackBar, MatSnackBarRef, SimpleSnackBar } from '@angular/material/snack-bar';
import { ActivatedRoute, Router } from '@angular/router';
import { ProjectResponse, ProjectService, SpatialObjectCodeEnum, SubmissionDetailResponse, SubmissionRequest, SubmissionService, SubmissionTypeCodeEnum, WorkflowStateEnum } from '@api-client';
import { ProjectPlanCodeEnum, ProjectResponse, ProjectService, SpatialObjectCodeEnum, SubmissionDetailResponse, SubmissionRequest, SubmissionService, SubmissionTypeCodeEnum, WorkflowStateEnum } from '@api-client';
import { NgbDropdown, NgbDropdownMenu, NgbDropdownToggle } from '@ng-bootstrap/ng-bootstrap';
import { RxFormBuilder, RxFormGroup } from '@rxweb/reactive-form-validators';
import { User } from '@utility/security/user';
Expand Down Expand Up @@ -51,6 +51,7 @@ export class FomSubmissionComponent implements OnInit, AfterViewInit, OnDestroy
public maxSpatialFileSize: number = MAX_FILEUPLOAD_SIZE.SPATIAL;
public isSubmitting = false;
readonly SpatialObjectCodeEnum = SpatialObjectCodeEnum;
readonly projectPlanCodeEnum = ProjectPlanCodeEnum;
private scrollToFragment: string = null;
private snackBarRef: MatSnackBarRef<SimpleSnackBar> = null;
private ngUnsubscribe: Subject<boolean> = new Subject<boolean>();
Expand Down
7 changes: 6 additions & 1 deletion admin/src/app/foms/summary/summary.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,12 @@ <h4>Attachments</h4>
</section>

<section *ngIf="!selectedScope?.commentScopeCode">
<small>This FOM can be relied upon by the FOM holder for the purpose of a cutting permit or road permit application, until the date three years after commencement of the public review and commenting period. FOMs published by BC Timber Sales can be relied upon for the purpose of a cutting permit or road permit application, or the issuance of a Timber Sales License until the date three years after conclusion of the public review and commenting period.</small>
<small>
{{project.projectPlanCode == projectPlanCodeEnum.Fsp
? periodOperationsTxt
: woodlotOperationsTxt
}}
</small>
</section>

</section>
Expand Down
10 changes: 6 additions & 4 deletions admin/src/app/foms/summary/summary.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ import { MatFormFieldModule } from '@angular/material/form-field';
import { MatSelectModule } from '@angular/material/select';
import { ActivatedRoute, RouterLink } from '@angular/router';
import {
AttachmentResponse, AttachmentService, InteractionResponse, InteractionService,
ProjectPlanCodeEnum,
ProjectResponse, ProjectService, PublicCommentAdminResponse, PublicCommentService,
SpatialFeaturePublicResponse, SpatialFeatureService
AttachmentResponse, AttachmentService, InteractionResponse, InteractionService,
ProjectPlanCodeEnum,
ProjectResponse, ProjectService, PublicCommentAdminResponse, PublicCommentService,
SpatialFeaturePublicResponse, SpatialFeatureService
} from '@api-client';
import { ConfigService } from '@utility/services/config.service';
import * as _ from 'lodash';
Expand Down Expand Up @@ -46,6 +46,8 @@ import { InteractionsSummaryComponent } from './interactions-summary/interaction
})
export class SummaryComponent implements OnInit, OnDestroy {
readonly projectPlanCodeEnum = ProjectPlanCodeEnum;
readonly periodOperationsTxt = "This FOM can be relied upon by the FOM holder for the purpose of a cutting permit or road permit application, until the date three years after commencement of the public review and commenting period. FOMs published by BC Timber Sales can be relied upon for the purpose of a cutting permit or road permit application, or the issuance of a Timber Sales License until the date three years after conclusion of the public review and commenting period.";
readonly woodlotOperationsTxt = "Woodlots are not legally required to publish FOMs for public review and comment prior to cutting permit or road permit application. However, woodlot licensees may choose to publish FOMs on a voluntary basis to facilitate public engagement.";
projectId: number;
project: ProjectResponse;
projectReqError: boolean;
Expand Down
2 changes: 1 addition & 1 deletion api/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -189,4 +189,4 @@ if (process.argv.length > 2 &&
standaloneRunTestDataMigrations();
} else {
startApi();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,10 @@ <h3 class="title">No public notices found.</h3>
</div>

<div class="validity-txt" *ngIf="isFomAvailable">
This FOM can be relied upon by the FOM holder for the purpose of a cutting permit or road permit application, until the date three years after commencement of the public review and commenting period. FOMs published by BC Timber Sales can be relied upon for the purpose of a cutting permit or road permit application, or the issuance of a Timber Sales License until the date three years after conclusion of the public review and commenting period.
{{pn.project.projectPlanCode == projectPlanCodeEnum.Fsp
? periodOperationsTxt
: woodlotOperationsTxt
}}
</div>

</ng-template>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { MatCardModule } from '@angular/material/card';
import { MatAccordion, MatExpansionModule } from '@angular/material/expansion';
import { MatTooltipModule } from '@angular/material/tooltip';
import { ProjectPlanCodeEnum, ProjectResponse, PublicNoticePublicFrontEndResponse, PublicNoticeService } from '@api-client';
import { periodOperationsTxt, woodlotOperationsTxt } from '@public-core/constants/appConstants';
import { ShortenPipe } from '@public-core/pipes/shorten.pipe';
import { UrlService } from '@public-core/services/url.service';
import * as _ from 'lodash';
Expand All @@ -31,6 +32,8 @@ export class PublicNoticesPanelComponent implements OnInit {
@Output() update = new EventEmitter<IUpdateEvent>();
@ViewChild(MatAccordion) accordion: MatAccordion;
readonly projectPlanCodeEnum = ProjectPlanCodeEnum;
readonly periodOperationsTxt = periodOperationsTxt;
readonly woodlotOperationsTxt = woodlotOperationsTxt;
isLoading = false;
pNotices: Array<PublicNoticePublicFrontEndResponse>;
initialPNotices: Array<PublicNoticePublicFrontEndResponse>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,10 @@ <h3>FOM Details</h3>
matTooltipShowDelay="300"
></span>
<div class="text-muted--margin-top">
{{periodOperationsTxt}}
{{project.projectPlanCode == projectPlanCodeEnum.Fsp
? periodOperationsTxt
: woodlotOperationsTxt
}}
</div>
</li>
</ul>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@ import { CommonModule } from '@angular/common';
import { Component, ElementRef, EventEmitter, OnDestroy, OnInit, Output, ViewChild } from '@angular/core';
import { MatTooltipModule } from '@angular/material/tooltip';
import {
AttachmentResponse, AttachmentService, ProjectPlanCodeEnum, ProjectResponse, ProjectService,
SpatialFeaturePublicResponse, SpatialFeatureService, WorkflowStateCode
AttachmentResponse, AttachmentService, ProjectPlanCodeEnum, ProjectResponse, ProjectService,
SpatialFeaturePublicResponse, SpatialFeatureService, WorkflowStateCode
} from '@api-client';
import { FontAwesomeModule } from '@fortawesome/angular-fontawesome';
import { faArrowUpRightFromSquare } from '@fortawesome/free-solid-svg-icons';
import { NgbModal, NgbModalRef } from '@ng-bootstrap/ng-bootstrap';
import { periodOperationsTxt, woodlotOperationsTxt } from '@public-core/constants/appConstants';
import { UrlService } from '@public-core/services/url.service';
import { getCommentingClosingDate } from '@public-core/utils/constants/appUtils';
import { getCommentingClosingDate } from '@public-core/utils/appUtils';
import { ConfigService } from '@utility/services/config.service';
import { FeatureSelectService } from '@utility/services/featureSelect.service';
import { DetailsMapComponent } from 'app/applications/details-panel/details-map/details-map.component';
Expand Down Expand Up @@ -59,10 +60,10 @@ export class DetailsPanelComponent implements OnDestroy, OnInit {
public attachments: AttachmentResponse[];
public faArrowUpRightFromSquare = faArrowUpRightFromSquare;
public getCommentingClosingDate = getCommentingClosingDate;

public periodOperationsTxt = "This FOM can be relied upon by the FOM holder for the purpose of a cutting permit or road permit application, until the date three years after commencement of the public review and commenting period. FOMs published by BC Timber Sales can be relied upon for the purpose of a cutting permit or road permit application, or the issuance of a Timber Sales License until the date three years after conclusion of the public review and commenting period."
public periodOperationsTooltipTxt = "An FSP holder has three years to apply for a cutting permit or road permit for cutblocks and roads displayed on a FOM. This is called the validity period, it starts on the day commenting opens on a FOM. For BC Timber Sales the validity period starts on the day commenting closes."
public periodOperationsTooltipTxt = "An FSP holder has three years to apply for a cutting permit or road permit for cutblocks and roads displayed on a FOM. This is called the validity period, it starts on the day commenting opens on a FOM. For BC Timber Sales the validity period starts on the day commenting closes.";
readonly projectPlanCodeEnum = ProjectPlanCodeEnum;
readonly periodOperationsTxt = periodOperationsTxt;
readonly woodlotOperationsTxt = woodlotOperationsTxt;

constructor(
public modalService: NgbModal,
Expand Down
2 changes: 1 addition & 1 deletion public/src/app/applications/utils/filter.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { DELIMITER } from '@public-core/utils/constants/appUtils';
import { DELIMITER } from '@public-core/constants/appConstants';
import * as hash from 'object-hash';

/**
Expand Down
2 changes: 1 addition & 1 deletion public/src/app/comment-modal/comment-modal.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { MatProgressBarModule } from '@angular/material/progress-bar';
import { MatSelectModule } from '@angular/material/select';
import { PublicCommentCreateRequest, PublicCommentService, SpatialFeaturePublicResponse, SpatialObjectCodeEnum } from '@api-client';
import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
import { SpatialTypeMap } from '@public-core/utils/constants/appUtils';
import { SpatialTypeMap } from '@public-core/constants/appConstants';

enum COMMENT_SCOPE_CODE {
OVERALL = 'OVERALL',
Expand Down
26 changes: 26 additions & 0 deletions public/src/core/constants/appConstants.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import { SpatialObjectCodeEnum } from "@api-client";

export const periodOperationsTxt = "This FOM can be relied upon by the FOM holder for the purpose of a cutting permit or road permit application, until the date three years after commencement of the public review and commenting period. FOMs published by BC Timber Sales can be relied upon for the purpose of a cutting permit or road permit application, or the issuance of a Timber Sales License until the date three years after conclusion of the public review and commenting period.";
export const woodlotOperationsTxt = "Woodlots are not legally required to publish FOMs for public review and comment prior to cutting permit or road permit application. However, woodlot licensees may choose to publish FOMs on a voluntary basis to facilitate public engagement.";

export const SpatialTypeMap = new Map<SpatialObjectCodeEnum, object>([
[SpatialObjectCodeEnum.CutBlock, {
source: 'cut_block',
type: 'Polygon',
desc: 'Cut Block'
}],
[SpatialObjectCodeEnum.RoadSection, {
source: 'road_section',
type: 'LineString',
desc: 'Road Section'
}],
[SpatialObjectCodeEnum.Wtra, {
source: 'retention_area',
type: 'Polygon',
desc: 'Retention Area'
}],
]);

export const DELIMITER = {
PIPE: '|'
}
2 changes: 1 addition & 1 deletion public/src/core/services/fomFilters.service.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Injectable } from '@angular/core';
import { AppUtils } from '@public-core/utils/constants/appUtils';
import { AppUtils } from '@public-core/utils/appUtils';
import { BehaviorSubject, Observable } from 'rxjs';
import { Filter, IFilter, IMultiFilter, IMultiFilterFields, MultiFilter } from '../../app/applications/utils/filter';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,28 +1,5 @@
import { SpatialObjectCodeEnum } from '@api-client';
import moment = require('moment');

export const DELIMITER = {
PIPE: '|'
}

export const SpatialTypeMap = new Map<SpatialObjectCodeEnum, object>([
[SpatialObjectCodeEnum.CutBlock, {
source: 'cut_block',
type: 'Polygon',
desc: 'Cut Block'
}],
[SpatialObjectCodeEnum.RoadSection, {
source: 'road_section',
type: 'LineString',
desc: 'Road Section'
}],
[SpatialObjectCodeEnum.Wtra, {
source: 'retention_area',
type: 'Polygon',
desc: 'Retention Area'
}],
]);

/**
* @class AppUtils
*/
Expand Down

0 comments on commit 08599ff

Please sign in to comment.