[DEBUG] update the edition error

This commit is contained in:
Edouard DUPIN 2020-10-26 22:54:19 +01:00
parent d0616858dc
commit 8914fdc8d9
2 changed files with 10 additions and 7 deletions

View File

@ -9,6 +9,7 @@ import { NgModule, CUSTOM_ELEMENTS_SCHEMA, NO_ERRORS_SCHEMA } from '@angular/cor
import { RouterModule } from '@angular/router';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { HttpClientModule } from '@angular/common/http';
import { FormsModule, ReactiveFormsModule } from '@angular/forms'; // this is needed for dynamic selection of the select
import { AppRoutingModule } from './app-routing.module';
import { UploadFileComponent } from './component/upload-file/upload-file';
@ -97,7 +98,9 @@ import { AppComponent } from './app.component';
RouterModule,
AppRoutingModule,
BrowserAnimationsModule,
HttpClientModule
HttpClientModule,
FormsModule,
ReactiveFormsModule,
],
providers: [
PopInService,

View File

@ -230,13 +230,7 @@ export class VideoEditScene implements OnInit {
self.data.time = response.time;
self.data.generated_name = response.generated_name;
self.onChangeType(response.type_id);
if (self.data.type_id === undefined) {
self.data.type_id = null;
}
self.onChangeSeries(response.series_id);
if (self.data.series_id === undefined) {
self.data.series_id = null;
}
self.data.season_id = response.season_id;
if (self.data.season_id === undefined) {
self.data.season_id = null;
@ -260,6 +254,9 @@ export class VideoEditScene implements OnInit {
onChangeType(_value:any):void {
console.log("Change requested of type ... " + _value);
this.data.type_id = _value;
if (this.data.type_id == undefined) {
this.data.type_id = null;
}
//this.data.series_id = null;
//this.data.season_id = null;
//this.listSeries = [{value: undefined, label: '---'}];
@ -287,6 +284,9 @@ export class VideoEditScene implements OnInit {
onChangeSeries(_value:any):void {
this.data.series_id = _value;
if (this.data.series_id === undefined) {
this.data.series_id = null;
}
this.data.season_id = null;
this.listSeason = [{value: undefined, label: '---'}];
let self = this;