<ng-template #defaultDisplayTemplate let-r="result">
- <span id="{{domId}}-{{r.id}}">{{r.label}}</span>
+ <span id="{{domId}}-{{r.id}}" [ngClass]="classNames.join(' ')">{{r.label}}</span>
</ng-template>
<ng-template #acqfTemplate egIdlClass="acqf" let-r="result">
- <span id="{{domId}}-{{r.id}}">{{r.fm.code()}} ({{r.fm.year()}}) ({{getOrgShortname(r.fm.org())}})</span>
+ <span id="{{domId}}-{{r.id}}" [ngClass]="classNames.join(' ')">{{r.fm.code()}} ({{r.fm.year()}}) ({{getOrgShortname(r.fm.org())}})</span>
</ng-template>
<ng-template #acplTemplate egIdlClass="acpl" let-r="result">
- <span id="{{domId}}-{{r.id}}">
+ <span id="{{domId}}-{{r.id}}" [ngClass]="classNames.join(' ')">
{{r.fm.name()}} ({{getOrgShortname(r.fm.owning_lib())}})
</span>
</ng-template>
autoId = -1;
poSubscription: Subscription;
owners: number[];
+ classNames: string[];
@ViewChild('disencumberChargeDialog') disencumberChargeDialog: DisencumberChargeDialogComponent;
});
this.owners = this.org.ancestors(this.auth.user().ws_ou(), true);
+ if (this.po().activationEvent)
+ this.classNames.push('text-bg-danger');
+ if (this.po().activationWarnings.length)
+ this.classNames.push('text-bg-warning');
}
ngOnDestroy() {
-.text-danger {
- background-color: #f8d7da;
- color: #58151c !important;
- font-weight: 600;
- padding: 0 .25rem;
-}
-
-.text-danger::before {
- content: "\e160";
- font-family: "Material Icons";
- font-weight: normal;
- vertical-align: sub;
-}
-
-.bg-warning {
- background-color: #ffe69c !important;
- color: #723809;
- font-weight: 600;
-}
-
-.bg-warning::before {
- content: "\e002";
- font-family: "Material Icons";
- font-weight: normal;
+.text-bg-danger .material-icons,
+.text-bg-warning .material-icons {
+ font-size: 1rem;
+ line-height: inherit;
+ margin-inline-start: .25ch;
vertical-align: sub;
}
<span *ngIf="po().state() === 'received'" i18n>Received</span>
<ng-container *ngIf="canActivate">
<span *ngIf="!activationEvent" i18n>Pending / Activatable</span>
- <span *ngIf="activationEvent" i18n>
- Activation Error: {{activationEvent.textcode}} {{activationEvent.desc}}
+ <span *ngIf="activationEvent">
+ <span class="text-bg-danger">
+ <span class="material-icons" aria-label="danger" title="danger" i18n-aria-label i18n-title>report</span>
+ <span i18n>Activation Error: {{activationEvent.textcode}} {{activationEvent.desc}}</span>
+ </span>
</span>
</ng-container>
<!-- canceled -->
<ng-container *ngIf="po().cancel_reason()">
- <span class="text-danger" i18n>
- {{po().cancel_reason().label()}} => {{po().cancel_reason().description()}}
+ <span class="text-bg-danger">
+ <span class="material-icons" aria-label="danger" title="danger" i18n-aria-label i18n-title>report</span>
+ <span i18n>{{po().cancel_reason().label()}} => {{po().cancel_reason().description()}}</span>
</span>
</ng-container>
<!-- activation warnings -->
<ng-container *ngIf='activationWarnings.length'>
- <span i18n> (Warning: </span>
- <ng-container *ngFor="let evt of activationWarnings">
- <ng-container
- *ngIf="evt.textcode === 'ACQ_FUND_EXCEEDS_WARN_PERCENT'">
- <span class="bg-warning" i18n>
- Fund exceeds warning percent:
- {{evt.payload.fund.code()}} ({{evt.payload.fund.year()}}).
- </span>
+ <span class="text-bg-warning">
+ <span class="material-icons" aria-label="warning" title="warning" i18n-aria-label i18n-title>warning</span>
+ <span i18n> (Warning: </span>
+ <ng-container *ngFor="let evt of activationWarnings">
+ <ng-container
+ *ngIf="evt.textcode === 'ACQ_FUND_EXCEEDS_WARN_PERCENT'">
+ <span i18n>
+ Fund exceeds warning percent:
+ {{evt.payload.fund.code()}} ({{evt.payload.fund.year()}}).
+ </span>
+ </ng-container>
</ng-container>
- </ng-container>
- <span i18n>)</span>
+ <span i18n>)</span>
+ </span>
</ng-container>
<!-- activation blocks -->
- <div class="text-danger" *ngFor="let evt of activationBlocks">
+ <div class="text-bg-danger" *ngFor="let evt of activationBlocks">
+ <span class="material-icons" aria-label="danger" title="danger" i18n-aria-label i18n-title>report</span>
<ng-container
*ngIf="evt.textcode === 'ACQ_FUND_EXCEEDS_STOP_PERCENT'; else noPrice">
<span i18n>