From 7dd9b1cac07f571dd35b362544e4fe0226c4b817 Mon Sep 17 00:00:00 2001 From: Jamie Date: Fri, 3 Jun 2022 22:08:15 +0100 Subject: [PATCH] fix: :bug: Fixed the Request on Behalf of having blanks (#4667) --- .../components/movie/movie-details.component.ts | 3 +-- .../request-behalf/request-behalf.component.ts | 14 ++++++-------- .../admin-request-dialog.component.ts | 2 +- 3 files changed, 8 insertions(+), 11 deletions(-) diff --git a/src/Ombi/ClientApp/src/app/media-details/components/movie/movie-details.component.ts b/src/Ombi/ClientApp/src/app/media-details/components/movie/movie-details.component.ts index 88956e706..8d1e5976b 100644 --- a/src/Ombi/ClientApp/src/app/media-details/components/movie/movie-details.component.ts +++ b/src/Ombi/ClientApp/src/app/media-details/components/movie/movie-details.component.ts @@ -1,4 +1,4 @@ -import { AfterViewInit, Component, OnInit, ViewChild, ViewEncapsulation } from "@angular/core"; +import { Component, OnInit, ViewEncapsulation } from "@angular/core"; import { ImageService, SearchV2Service, RequestService, MessageService, RadarrService, SettingsStateService } from "../../../services"; import { ActivatedRoute, Router } from "@angular/router"; import { DomSanitizer } from "@angular/platform-browser"; @@ -12,7 +12,6 @@ import { NewIssueComponent } from "../shared/new-issue/new-issue.component"; import { TranslateService } from "@ngx-translate/core"; import { MovieAdvancedOptionsComponent } from "./panels/movie-advanced-options/movie-advanced-options.component"; import { RequestServiceV2 } from "../../../services/requestV2.service"; -import { RequestBehalfComponent } from "../shared/request-behalf/request-behalf.component"; import { firstValueFrom, forkJoin } from "rxjs"; import { AdminRequestDialogComponent } from "../../../shared/admin-request-dialog/admin-request-dialog.component"; import { FeaturesFacade } from "../../../state/features/features.facade"; diff --git a/src/Ombi/ClientApp/src/app/media-details/components/shared/request-behalf/request-behalf.component.ts b/src/Ombi/ClientApp/src/app/media-details/components/shared/request-behalf/request-behalf.component.ts index 454ad3ee4..bf11ed9f8 100644 --- a/src/Ombi/ClientApp/src/app/media-details/components/shared/request-behalf/request-behalf.component.ts +++ b/src/Ombi/ClientApp/src/app/media-details/components/shared/request-behalf/request-behalf.component.ts @@ -1,13 +1,11 @@ -import { Component, Inject, OnInit } from "@angular/core"; -import { IDenyDialogData } from "../interfaces/interfaces"; -import { MatDialogRef, MAT_DIALOG_DATA } from "@angular/material/dialog"; -import { RequestService, MessageService, IdentityService } from "../../../../services"; -import { RequestType, IRequestEngineResult, IUserDropdown } from "../../../../interfaces"; +import { Component, OnInit } from "@angular/core"; +import { map, startWith } from "rxjs/operators"; + import { FormControl } from "@angular/forms"; +import { IUserDropdown } from "../../../../interfaces"; +import { IdentityService } from "../../../../services"; +import { MatDialogRef } from "@angular/material/dialog"; import { Observable } from "rxjs"; -import { filter, map, startWith } from "rxjs/operators"; - - @Component({ selector: "request-behalf", diff --git a/src/Ombi/ClientApp/src/app/shared/admin-request-dialog/admin-request-dialog.component.ts b/src/Ombi/ClientApp/src/app/shared/admin-request-dialog/admin-request-dialog.component.ts index d495a88e7..8e538fc5b 100644 --- a/src/Ombi/ClientApp/src/app/shared/admin-request-dialog/admin-request-dialog.component.ts +++ b/src/Ombi/ClientApp/src/app/shared/admin-request-dialog/admin-request-dialog.component.ts @@ -96,7 +96,7 @@ export class AdminRequestDialogComponent implements OnInit { public displayFn(user: IUserDropdown): string { const username = user?.username ? user.username : ""; const email = user?.email ? `(${user.email})` : ""; - if (username && email) { + if (username || email) { return `${username} ${email}`; } return '';