Skip to content

Commit

Permalink
cwdoe-1103 msel-info css (#98)
Browse files Browse the repository at this point in the history
  • Loading branch information
sei-tspencer committed Sep 27, 2023
1 parent 651d834 commit a4e5354
Show file tree
Hide file tree
Showing 4 changed files with 81 additions and 54 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "blueprint-ui",
"version": "0.3.10",
"version": "0.3.11",
"scripts": {
"ng": "ng",
"start": "ng serve",
Expand Down
109 changes: 60 additions & 49 deletions src/app/components/msel-info/msel-info.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
</div>
<div *ngIf="msel" class="scrolling-region">
<div class="info-detail">
<div class="single-detail">
<div class="single-detail center-self">
<mat-form-field class="full-width">
<input
type="text"
Expand All @@ -48,7 +48,7 @@
/>
</mat-form-field>
</div>
<div class="single-detail">
<div class="single-detail center-self">
<mat-form-field class="full-width">
<input
type="text"
Expand All @@ -62,18 +62,20 @@
/>
</mat-form-field>
</div>
<div class="single-detail">
<mat-checkbox
[(ngModel)]="msel.isTemplate"
(cut)="isChanged = true"
(change)="isChanged = true"
(paste)="isChanged = true"
(keypress)="isChanged = true"
>Is a Template</mat-checkbox>
<div class="single-detail center-self">
<div class="sub-detail center-self">
<mat-checkbox
[(ngModel)]="msel.isTemplate"
(cut)="isChanged = true"
(change)="isChanged = true"
(paste)="isChanged = true"
(keypress)="isChanged = true"
>Is a Template</mat-checkbox>
</div>
</div>
<!-- Gallery Integration -->
<div class="single-detail">
<div class="sub-detail two-cell">
<div class="single-detail center-self">
<div class="sub-detail center-self three-cell">
<mat-checkbox
[(ngModel)]="msel.useGallery"
(cut)="isChanged = true"
Expand All @@ -82,15 +84,14 @@
(keypress)="isChanged = true"
>Integrate Gallery</mat-checkbox>
</div>
<div class="sub-detail five-cell" *ngIf="msel.useGallery">
<div class="sub-detail center-self one-cell" *ngIf="msel.useGallery">
<button
(click)="pushToGallery()"
title="Push to Gallery"
class="thin-button"
*ngIf="!msel.galleryCollectionId"
[disabled]="!(isContentDeveloper || msel.hasRole(loggedInUserId, null).owner) || galleryToDo() || isChanged"
><span *ngIf="isBusy">Pushing to Gallery ...</span><span *ngIf="!isBusy">Push to Gallery</span></button>
<span *ngIf="!msel.galleryCollectionId && galleryToDo()" class="gallery-warning">** Unassigned Gallery Article Parameters in Data Fields</span>
<button
(click)="pullFromGallery()"
title="Remove from Gallery"
Expand All @@ -100,9 +101,12 @@
>Remove from Gallery</button>
</div>
</div>
<div *ngIf="!msel.isTemplate && msel.useGallery && msel.galleryExhibitId" class="single-detail">
<div class="sub-detail one-cell">&nbsp;</div>
<div class="sub-detail four-cell" *ngIf="msel.useGallery && msel.galleryCollectionId">
<div *ngIf="galleryWarningMessage()" class="single-detail center-self">
<span class="gallery-warning">{{ galleryWarningMessage() }}</span>
</div>
<div *ngIf="!msel.isTemplate && msel.useGallery && msel.galleryExhibitId" class="single-detail center-self">
<div class="sub-detail center-self one-cell">&nbsp;</div>
<div class="sub-detail center-self four-cell" *ngIf="msel.useGallery && msel.galleryCollectionId">
<mat-form-field class="guid-field">
<input
type="text"
Expand All @@ -113,7 +117,7 @@
/>
</mat-form-field>
</div>
<div class="sub-detail four-cell">
<div class="sub-detail center-self four-cell">
<mat-form-field class="guid-field">
<input
type="text"
Expand All @@ -126,8 +130,8 @@
</div>
</div>
<!-- CITE Integration -->
<div class="single-detail">
<div class="sub-detail center-self two-cell">
<div class="single-detail center-self">
<div class="sub-detail center-self one-cell">
<mat-checkbox
[(ngModel)]="msel.useCite"
(cut)="isChanged = true"
Expand All @@ -136,7 +140,7 @@
(keypress)="isChanged = true"
>Integrate CITE</mat-checkbox>
</div>
<div class="sub-detail center-self" *ngIf="msel.useCite">
<div class="sub-detail center-self two-cell" *ngIf="msel.useCite">
<mat-form-field class="half-width" *ngIf="scoringModelList.length > 0">
<mat-label>Select Scoring Model</mat-label>
<mat-select
Expand Down Expand Up @@ -165,7 +169,7 @@
/>
</mat-form-field>
</div>
<div class="sub-detail center-self" *ngIf="msel.useCite">
<div class="sub-detail center-self one-cell" *ngIf="msel.useCite">
<button
(click)="pushToCite()"
title="Push to CITE"
Expand All @@ -182,11 +186,14 @@
>Remove from CITE</button>
</div>
</div>
<div *ngIf="!msel.isTemplate && msel.useCite && msel.citeEvaluationId" class="single-detail">
<div class="sub-detail center-self two-cell">
<div *ngIf="citeWarningMessage()" class="single-detail center-self">
<span class="gallery-warning">{{ citeWarningMessage() }}</span>
</div>
<div *ngIf="!msel.isTemplate && msel.useCite && msel.citeEvaluationId" class="single-detail center-self">
<div class="sub-detail center-self five-cell">
&nbsp;
</div>
<div class="sub-detail center-self">
<div class="sub-detail center-self four-cell">
<mat-form-field *ngIf="msel.useCite && msel.citeEvaluationId" class="half-width guid-field">
<input
type="text"
Expand All @@ -199,28 +206,32 @@
</div>
</div>
<!-- Player Integration -->
<div class="single-detail">
<mat-checkbox
[disabled]="true"
[(ngModel)]="msel.useSteamfitter"
(cut)="isChanged = true"
(change)="isChanged = true"
(paste)="isChanged = true"
(keypress)="isChanged = true"
>Integrate Player</mat-checkbox>
<div class="single-detail center-self">
<div class="sub-detail center-self">
<mat-checkbox
[disabled]="true"
[(ngModel)]="msel.useSteamfitter"
(cut)="isChanged = true"
(change)="isChanged = true"
(paste)="isChanged = true"
(keypress)="isChanged = true"
>Integrate Player</mat-checkbox>
</div>
</div>
<!-- Steamfitter Integration -->
<div class="single-detail">
<mat-checkbox
[disabled]="true"
[(ngModel)]="msel.useSteamfitter"
(cut)="isChanged = true"
(change)="isChanged = true"
(paste)="isChanged = true"
(keypress)="isChanged = true"
>Integrate Steamfitter</mat-checkbox>
<div class="single-detail center-self">
<div class="sub-detail center-self">
<mat-checkbox
[disabled]="true"
[(ngModel)]="msel.useSteamfitter"
(cut)="isChanged = true"
(change)="isChanged = true"
(paste)="isChanged = true"
(keypress)="isChanged = true"
>Integrate Steamfitter</mat-checkbox>
</div>
</div>
<div class="sub-detail">
<div class="sub-detail center-self">
<mat-form-field *ngIf="msel.useSteamfitter" class="full-width">
<input
type="text"
Expand All @@ -232,7 +243,7 @@
</mat-form-field>
</div>

<div class="single-detail top-margin">
<div class="single-detail center-self">
<mat-form-field class="full-width">
<mat-label>MSEL Status</mat-label>
<mat-select
Expand All @@ -250,7 +261,7 @@
</div>

<div
class="single-detail"
class="single-detail center-self"
*ngIf="isContentDeveloper || msel.hasRole(loggedInUserId, null).owner"
>
<mat-form-field class="full-width">
Expand All @@ -266,7 +277,7 @@
/>
</mat-form-field>
</div>
<div class="single-detail">
<div class="single-detail center-self">
<mat-form-field class="full-width">
<input
type="text"
Expand All @@ -277,7 +288,7 @@
/>
</mat-form-field>
</div>
<div class="single-detail">
<div class="single-detail center-self">
<mat-form-field class="full-width">
<input
type="text"
Expand All @@ -288,7 +299,7 @@
/>
</mat-form-field>
</div>
<div class="single-detail">
<div class="single-detail center-self">
<mat-form-field class="full-width">
<input
type="text"
Expand Down
2 changes: 1 addition & 1 deletion src/app/components/msel-info/msel-info.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
}

.info-detail {
width: 80%;
width: 90%;
margin-left: 20px;
}

Expand Down
22 changes: 19 additions & 3 deletions src/app/components/msel-info/msel-info.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,13 +144,29 @@ export class MselInfoComponent implements OnDestroy {
this.playerService.addViewTeamsToMsel(this.msel.id).subscribe();
}

galleryWarningMessage() {
let warningMessage = '';
if (this.msel.useGallery && !this.msel.galleryExhibitId) {
warningMessage = this.galleryToDo() ?
'** There are unassigned Gallery Article Parameters in Data Fields **' : '';
}
return warningMessage;
}

citeWarningMessage() {
let warningMessage = '';
if (this.msel.useCite && !this.msel.citeEvaluationId) {
warningMessage = this.mselTeamList.some(t => t.citeTeamTypeId) ?
'' : '** WARNING: No teams have a CITE Team Type selected, so no teams will be pushed to CITE! ** ';
}
return warningMessage;
}

pushToCite() {
const warningMessage = this.mselTeamList.some(t => t.citeTeamTypeId) ?
'' : '** WARNING: No teams have a CITE Team Type selected, so no teams will be pushed to CITE! ** ';
this.dialogService
.confirm(
'Push to CITE',
warningMessage + 'Are you sure that you want to push this MSEL to CITE?'
this.citeWarningMessage() + 'Are you sure that you want to push this MSEL to CITE?'
)
.subscribe((result) => {
if (result['confirm']) {
Expand Down

0 comments on commit a4e5354

Please sign in to comment.