feat(frontend): buttonWithDropdown component added (no hookups yet)

This commit is contained in:
sct
2020-10-24 07:03:28 +00:00
parent 1f9cbbfdf1
commit 4975841b5d
8 changed files with 202 additions and 25 deletions

View File

@@ -9,6 +9,7 @@ import {
AfterInsert,
getRepository,
OneToMany,
AfterRemove,
} from 'typeorm';
import { User } from './User';
import Media from './Media';
@@ -67,6 +68,15 @@ export class MediaRequest {
}
}
@AfterRemove()
private async handleRemoveParentUpdate() {
const mediaRepository = getRepository(Media);
if (!this.media.requests || this.media.requests.length === 0) {
this.media.status = MediaStatus.UNKNOWN;
mediaRepository.save(this.media);
}
}
@AfterUpdate()
@AfterInsert()
private async sendToRadarr() {