-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rename commissioner decision component and Add to commissioner's appl…
…ication page
- Loading branch information
Showing
10 changed files
with
122 additions
and
20 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
45 changes: 45 additions & 0 deletions
45
...res/commissioner/application/commissioner-decisions/commissioner-decisions.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,45 @@ | ||
<div *ngFor="let decision of applicationDecisions; let index = index"> | ||
<h4>Decision #{{ applicationDecisions.length - index }}</h4> | ||
<div class="decision-table"> | ||
<div> | ||
<div class="subheading2">Decision Date</div> | ||
{{ decision.date | momentFormat }} | ||
</div> | ||
|
||
<div> | ||
<div class="subheading2">Resolution Number</div> | ||
#{{ decision.resolutionNumber }}/{{ decision.resolutionYear }} | ||
</div> | ||
|
||
<div class="full-width"> | ||
<div class="subheading2">Decision Summary</div> | ||
{{ decision.decisionDescription }} | ||
</div> | ||
|
||
<div class="full-width"> | ||
<div class="subheading2">Decision Document</div> | ||
<div class="document split" *ngFor="let document of decision.documents"> | ||
<div> | ||
<a (click)="openFile(decision, document)">{{ document.fileName }}</a> | ||
({{ document.fileSize! | filesize }}) | ||
</div> | ||
<button class="center" mat-button (click)="openFile(decision, document)"> | ||
<mat-icon>file_download</mat-icon> | ||
Download | ||
</button> | ||
</div> | ||
<div class="document responsive left" *ngFor="let document of decision.documents"> | ||
<div class="document-name"> | ||
<a (click)="openFile(decision, document)">{{ document.fileName }}</a> | ||
</div> | ||
<div class="split"> | ||
<div>{{ document.fileSize! | filesize }}</div> | ||
<button class="center" mat-button (click)="openFile(decision, document)"> | ||
<mat-icon>file_download</mat-icon> | ||
Download | ||
</button> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> |
49 changes: 49 additions & 0 deletions
49
...res/commissioner/application/commissioner-decisions/commissioner-decisions.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,49 @@ | ||
@use '../../../../../styles/functions.scss' as *; | ||
@use '../../../../../styles/colors.scss'; | ||
|
||
.decision-table { | ||
padding: rem(8); | ||
margin: rem(12) 0 rem(20) 0; | ||
background-color: colors.$grey-light; | ||
display: grid; | ||
grid-row-gap: rem(24); | ||
grid-column-gap: rem(16); | ||
grid-template-columns: 100%; | ||
word-wrap: break-word; | ||
hyphens: auto; | ||
|
||
@media screen and (min-width: $tabletBreakpoint) { | ||
padding: rem(16); | ||
margin: rem(24) 0 rem(40) 0; | ||
grid-template-columns: 49% 49%; | ||
|
||
.full-width { | ||
grid-column: 1/3; | ||
} | ||
} | ||
} | ||
|
||
.document { | ||
display: none; | ||
padding: rem(9) rem(16); | ||
border-radius: rem(4); | ||
border: rem(1) solid colors.$grey; | ||
background: colors.$white; | ||
margin: rem(8) 0; | ||
|
||
@media screen and (min-width: $tabletBreakpoint) { | ||
display: flex; | ||
} | ||
} | ||
|
||
.responsive { | ||
display: block; | ||
|
||
@media screen and (min-width: $tabletBreakpoint) { | ||
display: none; | ||
} | ||
} | ||
|
||
.document-name { | ||
padding: rem(6) 0; | ||
} |
19 changes: 19 additions & 0 deletions
19
...tures/commissioner/application/commissioner-decisions/commissioner-decisions.component.ts
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,19 @@ | ||
import { Component, Input, type OnInit } from '@angular/core'; | ||
import { CommissionerDecisionDto } from '../../../../services/commissioner/commissioner.dto'; | ||
import { ApplicationDocumentService } from '../../../../services/application/application-document/application-document.service'; | ||
import { ApplicationDecisionV2Service } from '../../../../services/application/decision/application-decision-v2/application-decision-v2.service'; | ||
import { ApplicationDocumentDto } from '../../../../services/application/application-document/application-document.dto'; | ||
|
||
@Component({ | ||
selector: 'app-commissioner-decisions', | ||
templateUrl: './commissioner-decisions.component.html', | ||
styleUrl: './commissioner-decisions.component.scss', | ||
}) | ||
export class CommissionerDecisionsComponent { | ||
@Input() applicationDecisions: CommissionerDecisionDto[] = []; | ||
constructor(private decisionService: ApplicationDecisionV2Service) {} | ||
|
||
async openFile(decision: CommissionerDecisionDto, file: ApplicationDocumentDto) { | ||
const res = await this.decisionService.downloadFile(decision.uuid, file.uuid, file.fileName); | ||
} | ||
} |
1 change: 0 additions & 1 deletion
1
alcs-frontend/src/app/features/commissioner/application/decisions/decisions.component.html
This file was deleted.
Oops, something went wrong.
3 changes: 0 additions & 3 deletions
3
alcs-frontend/src/app/features/commissioner/application/decisions/decisions.component.scss
This file was deleted.
Oops, something went wrong.
14 changes: 0 additions & 14 deletions
14
alcs-frontend/src/app/features/commissioner/application/decisions/decisions.component.ts
This file was deleted.
Oops, something went wrong.
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
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