Fix editing publication

This commit is contained in:
Peter Maquiran
2021-07-14 16:57:06 +01:00
parent a968538234
commit 6590224447
3 changed files with 16 additions and 10 deletions
+2 -2
View File
@@ -1,12 +1,12 @@
/* import { Image } from './image'; */
export class Publication{
DateIndex: Date;
DateIndex: Date | string;
DocumentId:string;
ProcessId:string;
Title: string;
Message: string;
DatePublication: Date;
DatePublication: Date | string;
OriginalFileName?: string;
FileBase64?:string;
FileExtension?: string;
@@ -215,6 +215,8 @@ export class NewPublicationPage implements OnInit {
}
}
else {
alert('create !!! 312')
this.publication = {
DateIndex: new Date(),
DocumentId:null,
@@ -188,8 +188,8 @@ export class NewPublicationPage implements OnInit {
}
}
else{
else if (!this.publication.OriginalFileName) {
this.publication = {
DateIndex: this.publication.DateIndex,
DocumentId:this.publication.DocumentId,
@@ -197,9 +197,9 @@ export class NewPublicationPage implements OnInit {
Title: this.pub.Title,
Message: this.pub.Message,
DatePublication: this.publication.DatePublication,
OriginalFileName: this.publication.OriginalFileName,
FileBase64: this.publication.FileBase64,
FileExtension: 'jpeg',
// OriginalFileName: this.publication.OriginalFileName,
// FileBase64: this.publication.FileBase64,
// FileExtension: 'jpeg',
}
const loader = this.toastService.loading()
@@ -218,14 +218,18 @@ export class NewPublicationPage implements OnInit {
}
}
else {
alert('create !!! 123')
let time = new Date()
alert(time)
this.publication = {
DateIndex: new Date(),
DateIndex: time,
DocumentId:null,
ProcessId:this.folderId,
Title: this.pub.Title,
Message: this.pub.Message,
DatePublication: new Date(),
DatePublication: time,
OriginalFileName: this.capturedImageTitle,
FileBase64: this.capturedImage,
FileExtension: 'jpeg',