1
0

Fix null/undefined incosistencies

- Introduced pipes for combined null/undefined checks: dsHasValue & dsHasNoValue
- Safer to async !== true than async === false
- Went over other instances of async === to confirm that they should be fine
This commit is contained in:
Yury Bondarenko
2024-03-06 17:04:54 +01:00
parent ebbbd64bae
commit 5edc689bc1
92 changed files with 210 additions and 154 deletions

View File

@@ -3,12 +3,12 @@
<!-- Default switch -->
<div class="col-md-2 d-flex justify-content-center align-items-center" >
<div class="custom-control custom-switch">
<input
type="checkbox"
class="custom-control-input"
id="primaryBitstream{{fileIndex}}"
<input
type="checkbox"
class="custom-control-input"
id="primaryBitstream{{fileIndex}}"
[disabled]="processingSaveStatus$ | async"
[checked]="isPrimary"
[checked]="isPrimary"
(change)="togglePrimaryBitstream($event)">
<label class="custom-control-label" for="primaryBitstream{{fileIndex}}">
<span class="sr-only" *ngIf="!isPrimary">{{'submission.sections.upload.primary.make' | translate:{ fileName: fileName } }}</span>
@@ -38,7 +38,7 @@
[disabled]="(processingDelete$ | async)"
(click)="$event.preventDefault();confirmDelete(content);">
<i *ngIf="(processingDelete$ | async)" class="fas fa-circle-notch fa-spin fa-2x text-danger"></i>
<i *ngIf="(processingDelete$ | async) === false" class="fa fa-trash fa-2x text-danger"></i>
<i *ngIf="(processingDelete$ | async) !== true" class="fa fa-trash fa-2x text-danger"></i>
</button>
</ng-container>
</div>