-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
NRPT-729: add bcmi admin penalties to mine enforcement actions (#862)
* NRPT-729: add bcmi admin penalties to mine enforcement actions * sonar fixes * fixup styles for mines amp detail * fix unit tests * fix linting errors * fix write roles for bcmi records in amps post controller
- Loading branch information
Showing
44 changed files
with
1,876 additions
and
115 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
264 changes: 264 additions & 0 deletions
264
...ines-administrative-penalty-add-edit/mines-administrative-penalty-add-edit.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,264 @@ | ||
<main class="container-fluid-padding"> | ||
<form *ngIf="!loading" [formGroup]="myForm" novalidate> | ||
<section> | ||
<div class="row"> | ||
<div class="col-6"> | ||
<h4 class="blue-header">{{ componentTitle }}</h4> | ||
<span *ngIf="isEditing" class="grey-subtext ml-2">{{ lastEditedSubText }}</span> | ||
</div> | ||
<div class="col-6 right-justified-action-btn"> | ||
<div class="row mb-2"> | ||
<div class="col-12"> | ||
<button type="button" class="btn btn-link" (click)="cancel()">Cancel</button> | ||
<button class="btn btn-primary" type="submit" (click)="submit()"> | ||
<em class="material-icons"> | ||
save | ||
</em> | ||
| ||
<span *ngIf="!isEditing">Save Record</span> | ||
<span *ngIf="isEditing">Update Record</span> | ||
</button> | ||
</div> | ||
</div> | ||
<div class="row"> | ||
<div class="col-7"></div> | ||
<div class="col-5"> | ||
<span class="grey-subtext"> | ||
If content is published on any site, clicking the Save/Update Record button will update the public site | ||
immediately | ||
</span> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
<h4>Basic Information</h4> | ||
<div class="flex-container"> | ||
<div class="label-pair" *ngIf="myForm && myForm.controls.dateIssued"> | ||
<label for="dateIssued">Date Issued</label> | ||
<lib-date-picker | ||
[control]="myForm.controls.dateIssued" | ||
[isValidate]="true" | ||
[minDate]="datepickerMinDate" | ||
[maxDate]="datepickerMaxDate"> | ||
</lib-date-picker> | ||
</div> | ||
<div class="label-pair"> | ||
<label for="recordType">Type</label> | ||
<span class="grey-subtext ml-2">(This value cannot be changed)</span> | ||
<input | ||
readonly | ||
name="recordType" | ||
id="recordType" | ||
type="text" | ||
value="Administrative Penalty" | ||
class="form-control" /> | ||
</div> | ||
<div class="label-pair"> | ||
<label for="issuingAgency">Issuing Agency</label> | ||
<input | ||
readonly | ||
name="issuingAgency" | ||
id="issuingAgency" | ||
type="text" | ||
value="{{ this.convertAcronyms(defaultAgency) }}" | ||
class="form-control" /> | ||
</div> | ||
<div class="label-pair"> | ||
<label for="author">Author</label> | ||
<input | ||
readonly | ||
name="author" | ||
id="author" | ||
type="text" | ||
value="{{ defaultAuthor }}" | ||
class="form-control" /> | ||
</div> | ||
<div class="label-pair"> | ||
<label for="recordName">Record Name</label> | ||
<input name="recordName" id="recordName" type="text" formControlName="recordName" class="form-control" /> | ||
</div> | ||
</div> | ||
<record-association-edit | ||
[formGroup]="this.myForm.get('association')" | ||
[mines]="this.storeService.getItem('mines')" | ||
[epicProjects]="[]" | ||
[minesOnly]="true" | ||
(mineLocation)="mineLocation = $event" | ||
> | ||
</record-association-edit> | ||
</section> | ||
|
||
<section> | ||
<h4>Contravention</h4> | ||
<app-legislation-add-edit [formGroup]="this.myForm.get('legislation')"></app-legislation-add-edit> | ||
<div class="flex-container"> | ||
<div class="label-pair"> | ||
<label for="offence">Offence</label> | ||
<input readonly name="offence" id="offence" formControlName="offence" class="form-control" /> | ||
<span | ||
*ngIf="this.myForm.get('legislation.act').value && !this.myForm.get('offence').value" | ||
class="grey-subtext" | ||
> | ||
No description available for the selected combination of act, regulation, section, subsection and paragraph. | ||
Please double-check that you have filled out those fields correctly; if they are correct, please contact the | ||
system administrator at | ||
<a href="mailto:[email protected]">[email protected]</a> | ||
to request a new description be added to the system. | ||
</span> | ||
</div> | ||
</div> | ||
<h4>Penalties</h4> | ||
<app-penalty-add-edit [formArray]="this.myForm.controls.penalties"></app-penalty-add-edit> | ||
</section> | ||
|
||
<section> | ||
<h4>Issued To</h4> | ||
<div class="flex-container"> | ||
<div class="label-pair"> | ||
<label for="projectName">Project</label> | ||
<span class="grey-subtext ml-2">(If Applicable)</span> | ||
<div name="projectName" class="radio-group"> | ||
<div class="radio"> | ||
<input default type="radio" id="Other" value="" formControlName="projectName" name="projectName" /> | ||
<label for="Other">Other</label> | ||
</div> | ||
<div class="radio"> | ||
<input | ||
type="radio" | ||
id="coastalGaslink" | ||
value="Coastal Gaslink" | ||
formControlName="projectName" | ||
name="projectName" /> | ||
<label for="coastalGaslink">Coastal Gaslink</label> | ||
</div> | ||
<div class="radio"> | ||
<input type="radio" id="lngCanada" value="LNG Canada" formControlName="projectName" name="projectName" /> | ||
<label for="lngCanada">LNG Canada</label> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
<app-entity-add-edit [formGroup]="this.myForm.controls.issuedTo"></app-entity-add-edit> | ||
</section> | ||
|
||
<section> | ||
<h4>Location Details</h4> | ||
<div class="flex-container"> | ||
<div class="label-pair"> | ||
<label for="location">Location Description</label> | ||
<input name="location" id="location" type="text" formControlName="location" class="form-control" /> | ||
</div> | ||
<div class="label-pair xsm"> | ||
<label for="latitude">Latitude</label> | ||
<input name="latitude" id="latitude" type="number" formControlName="latitude" class="form-control" /> | ||
</div> | ||
<div class="label-pair xsm"> | ||
<label for="longitude">Longitude</label> | ||
<input name="longitude" id="longitude" type="number" formControlName="longitude" class="form-control" /> | ||
</div> | ||
</div> | ||
</section> | ||
|
||
<section> | ||
<h4>Documents</h4> | ||
<app-document-edit | ||
[documents]="currentRecord ? currentRecord.documents : []" | ||
(documentsToDelete)="documentsToDelete = $event"></app-document-edit> | ||
<app-document-link-staging | ||
(linksChanged)="links = $event" | ||
(documentsChanged)="documents = $event"></app-document-link-staging> | ||
</section> | ||
|
||
<section> | ||
<div class="row mb-4"> | ||
<div class="col-2"> | ||
<h4 class="blue-header mb-0">BMCI Site Content</h4> | ||
<span class="grey-subtext d-block">{{ bcmiPublishSubtext }}</span> | ||
</div> | ||
<div class="col-4"> | ||
<mat-slide-toggle | ||
name="publishBcmi" | ||
id="publishBcmi" | ||
formControlName="publishBcmi" | ||
(change)="togglePublish($event, 'bcmi')" | ||
[checked]="myForm.controls.publishBcmi.value" | ||
ngDefaultControl> | ||
{{ myForm.controls.publishBcmi.value ? 'Published' : 'Unpublished' }} | ||
</mat-slide-toggle> | ||
<span class="grey-subtext d-block">*Changes made will take effect once you click "Update Record"</span> | ||
</div> | ||
</div> | ||
<div class="flex-container"> | ||
<div class="label-pair med"> | ||
<label for="bcmiSummary">Summmary</label> | ||
<textarea | ||
name="bcmiSummary" | ||
id="bcmiSummary" | ||
type="text" | ||
formControlName="bcmiSummary" | ||
class="form-control" | ||
rows="5"></textarea> | ||
</div> | ||
</div> | ||
</section> | ||
<section> | ||
<div class="row mb-4"> | ||
<div class="col-2"> | ||
<h4 class="blue-header mb-0">NRCED Site Content</h4> | ||
<span class="grey-subtext d-block">{{ nrcedPublishSubtext }}</span> | ||
</div> | ||
<div class="col-4"> | ||
<mat-slide-toggle | ||
name="publishNrced" | ||
id="publishNrced" | ||
formControlName="publishNrced" | ||
(change)="togglePublish($event, 'nrced')" | ||
[checked]="myForm.controls.publishNrced.value" | ||
ngDefaultControl> | ||
{{ myForm.controls.publishNrced.value ? 'Published' : 'Unpublished' }} | ||
</mat-slide-toggle> | ||
<span class="grey-subtext d-block">*Changes made will take effect once you click "Update Record"</span> | ||
</div> | ||
</div> | ||
<div class="flex-container"> | ||
<div class="label-pair med"> | ||
<label for="nrcedSummary">Summary</label> | ||
<textarea | ||
name="nrcedSummary" | ||
id="nrcedSummary" | ||
type="text" | ||
formControlName="nrcedSummary" | ||
class="form-control" | ||
rows="5"></textarea> | ||
</div> | ||
</div> | ||
</section> | ||
</form> | ||
<div class="row mt-4"> | ||
<div class="col-6"></div> | ||
<div class="col-6 right-justified-action-btn"> | ||
<div class="row mb-2"> | ||
<div class="col-12"> | ||
<button type="button" class="btn btn-link" (click)="cancel()">Cancel</button> | ||
<button class="btn btn-primary" type="submit" (click)="submit()"> | ||
<em class="material-icons"> | ||
save | ||
</em> | ||
| ||
<span *ngIf="!isEditing">Save Record</span> | ||
<span *ngIf="isEditing">Update Record</span> | ||
</button> | ||
</div> | ||
</div> | ||
<div class="row"> | ||
<div class="col-7"></div> | ||
<div class="col-5"> | ||
<span class="grey-subtext"> | ||
If content is published on any site, clicking the Save/Update Record button will update the public site | ||
immediately | ||
</span> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</main> |
21 changes: 21 additions & 0 deletions
21
...ines-administrative-penalty-add-edit/mines-administrative-penalty-add-edit.component.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
@import "assets/styles/base/base.scss"; | ||
@import "assets/styles/components/add-edit.scss"; | ||
|
||
.grey-subtext { | ||
color: $gray6; | ||
font-size: 15px; | ||
font-style: italic; | ||
} | ||
|
||
.blue-header { | ||
display: inline-block; | ||
color: $content-header-color; | ||
} | ||
|
||
.right-justified-action-btn { | ||
text-align: right; | ||
} | ||
|
||
section { | ||
border-bottom: 1px solid lightgrey; | ||
} |
Oops, something went wrong.