|
@@ -30,6 +30,7 @@ interface author {
|
|
|
work: string;
|
|
|
signature?: string;
|
|
|
examine?: string;
|
|
|
+ otherEditor?:string
|
|
|
}
|
|
|
@Component({
|
|
|
selector: 'app-author-file',
|
|
@@ -68,6 +69,7 @@ export class AuthorFileComponent implements OnInit {
|
|
|
work: '',
|
|
|
signature: '',
|
|
|
examine: '',
|
|
|
+ otherEditor:''
|
|
|
},
|
|
|
];
|
|
|
constructor(
|
|
@@ -89,14 +91,14 @@ export class AuthorFileComponent implements OnInit {
|
|
|
}
|
|
|
upload(e: any, type: string, index?: any) {
|
|
|
let file = e[e?.length - 1 || 0];
|
|
|
- if (type == 'signature' || type == 'examine') {
|
|
|
+ if (type == 'signature' || type == 'examine' || type == 'otherEditor') {
|
|
|
this.authorList[index][type] = file?.url;
|
|
|
}
|
|
|
console.log(this.authorList);
|
|
|
}
|
|
|
async submitForm(): Promise<boolean> {
|
|
|
- let coursesVrifly = !this.authorList.some((item) =>
|
|
|
- Object.values(item).some((val) => val == '' || val == undefined)
|
|
|
+ let coursesVrifly = !this.authorList.some((item:any) =>
|
|
|
+ Object.keys(item).some((key) => key != 'otherEditor' && (item[key] == '' || item[key] == undefined))
|
|
|
);
|
|
|
this.eduTextbookVolume?.set('authorList', this.authorList);
|
|
|
await this.eduTextbookVolume?.save();
|