This commit is contained in:
Peter Maquiran
2021-07-26 15:19:03 +01:00
parent 3f007be25e
commit 85f6df2f0e
16 changed files with 852 additions and 197 deletions
@@ -130,7 +130,7 @@ export class NewPublicationPage implements OnInit {
this.Form = new FormGroup({
Subject: new FormControl(this.pub.Title, [
Validators.required,
//Validators.required,
// Validators.minLength(4)
]),
capturedImage: new FormControl(this.capturedImage, [
@@ -215,6 +215,34 @@ export class NewPublicationPage implements OnInit {
loader.remove()
}
} else {
this.publication = {
DateIndex: this.publication.DateIndex,
DocumentId:this.publication.DocumentId,
ProcessId:this.publication.ProcessId,
Title: this.pub.Title,
Message: this.pub.Message,
DatePublication: this.publication.DatePublication,
OriginalFileName: this.capturedImageTitle,
FileBase64: this.capturedImage,
FileExtension: 'jpeg',
}
console.log('Edit change image');
console.log(this.publication);
const loader = this.toastService.loading()
try {
await this.publications.UpdatePublication(this.publication.ProcessId, this.publication).toPromise()
this.toastService.successMessage("Publicação criado")
this.close();
} catch (error) {
this.toastService.badRequest("Publicação não criado")
} finally {
loader.remove()
}
}
}
else {