mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
Added validation to check if user add image ou video and prevent to create publication withou it
This commit is contained in:
@@ -405,6 +405,7 @@ export class NewPublicationPage implements OnInit {
|
|||||||
if (this.Form.invalid) return false
|
if (this.Form.invalid) return false
|
||||||
|
|
||||||
|
|
||||||
|
if (this.seletedContent.length != 0) {
|
||||||
|
|
||||||
if (this.publicationType == '3') {
|
if (this.publicationType == '3') {
|
||||||
const loader = this.toastService.loading()
|
const loader = this.toastService.loading()
|
||||||
@@ -534,7 +535,6 @@ export class NewPublicationPage implements OnInit {
|
|||||||
try {
|
try {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
await this.publications.CreatePublication(this.folderId, this.publication).toPromise();
|
await this.publications.CreatePublication(this.folderId, this.publication).toPromise();
|
||||||
this.close();
|
this.close();
|
||||||
this.httpErrorHandle.httpsSucessMessagge('Criar publicação')
|
this.httpErrorHandle.httpsSucessMessagge('Criar publicação')
|
||||||
@@ -551,6 +551,10 @@ export class NewPublicationPage implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.PublicationFolderService.getPublicationsIds(this.folderId)
|
this.PublicationFolderService.getPublicationsIds(this.folderId)
|
||||||
|
|
||||||
|
} else {
|
||||||
|
this.httpErrorHandle.validationMessagge("noFileSelected")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user