mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-13 00:32:57 -07:00
Small fix when denying a request with a reason, we wasn't updating the ui
This commit is contained in:
parent
1f59693c7e
commit
3e4b2a8e9f
3 changed files with 7 additions and 4 deletions
|
@ -326,6 +326,7 @@ namespace Ombi.Core.Engine
|
||||||
|
|
||||||
return new RequestEngineResult
|
return new RequestEngineResult
|
||||||
{
|
{
|
||||||
|
Result = true,
|
||||||
Message = "Request successfully deleted",
|
Message = "Request successfully deleted",
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -87,9 +87,6 @@
|
||||||
<span *ngIf="request.approved && !request.available" id="processingRequestLabel" class="label label-info"
|
<span *ngIf="request.approved && !request.available" id="processingRequestLabel" class="label label-info"
|
||||||
[translate]="'Common.ProcessingRequest'"></span>
|
[translate]="'Common.ProcessingRequest'"></span>
|
||||||
<span *ngIf="request.denied" class="label label-danger" id="requestDeclinedLabel" [translate]="'Common.RequestDenied'"></span>
|
<span *ngIf="request.denied" class="label label-danger" id="requestDeclinedLabel" [translate]="'Common.RequestDenied'"></span>
|
||||||
<span *ngIf="request.deniedReason" title="{{request.deniedReason}}">
|
|
||||||
<i class="fa fa-info-circle"></i>
|
|
||||||
</span>
|
|
||||||
<span *ngIf="!request.approved && !request.availble && !request.denied" id="pendingApprovalLabel"
|
<span *ngIf="!request.approved && !request.availble && !request.denied" id="pendingApprovalLabel"
|
||||||
class="label label-warning" [translate]="'Common.PendingApproval'"></span>
|
class="label label-warning" [translate]="'Common.PendingApproval'"></span>
|
||||||
|
|
||||||
|
|
|
@ -140,10 +140,15 @@ export class MovieRequestsComponent implements OnInit {
|
||||||
public denyRequest() {
|
public denyRequest() {
|
||||||
this.requestService.denyMovie({ id: this.requestToDeny.id, reason: this.rejectionReason })
|
this.requestService.denyMovie({ id: this.requestToDeny.id, reason: this.rejectionReason })
|
||||||
.subscribe(x => {
|
.subscribe(x => {
|
||||||
|
debugger;
|
||||||
this.denyDisplay = false;
|
this.denyDisplay = false;
|
||||||
if (x.result) {
|
if (x.result) {
|
||||||
this.notificationService.success(
|
this.notificationService.success(
|
||||||
`Request for ${this.requestToDeny.title} has been denied successfully`);
|
`Request for ${this.requestToDeny.title} has been denied successfully`);
|
||||||
|
const index = this.movieRequests.indexOf(this.requestToDeny, 0);
|
||||||
|
if (index > -1) {
|
||||||
|
this.movieRequests[index].denied = true;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
this.notificationService.warning("Request Denied", x.message ? x.message : x.errorMessage);
|
this.notificationService.warning("Request Denied", x.message ? x.message : x.errorMessage);
|
||||||
this.requestToDeny.denied = false;
|
this.requestToDeny.denied = false;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue