mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 12:37:53 +00:00
fix edit publication on web
This commit is contained in:
@@ -98,3 +98,4 @@ src/app/domain
|
|||||||
_src/
|
_src/
|
||||||
-src
|
-src
|
||||||
plugin copy
|
plugin copy
|
||||||
|
pm2.yaml
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ export class NewPublicationPage implements OnInit {
|
|||||||
validateFrom = false
|
validateFrom = false
|
||||||
|
|
||||||
@Input() publication!: Publication;
|
@Input() publication!: Publication;
|
||||||
@Input() publicationType: string;
|
@Input() publicationType: ActionType;
|
||||||
@Input() folderId: string;
|
@Input() folderId: string;
|
||||||
@Input() documentId: string;
|
@Input() documentId: string;
|
||||||
|
|
||||||
@@ -364,6 +364,7 @@ export class NewPublicationPage implements OnInit {
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.PublicationFromMvService.setFolderId(this.folderId)
|
||||||
this.PublicationFromMvService.setFolderId(this.folderId)
|
this.PublicationFromMvService.setFolderId(this.folderId)
|
||||||
this.goBack();
|
this.goBack();
|
||||||
await this.PublicationFromMvService.save()
|
await this.PublicationFromMvService.save()
|
||||||
@@ -407,6 +408,7 @@ export class NewPublicationPage implements OnInit {
|
|||||||
else if (this.publicationType == ActionType.edit) {
|
else if (this.publicationType == ActionType.edit) {
|
||||||
this.publicationTitle = 'Editar Publicação';
|
this.publicationTitle = 'Editar Publicação';
|
||||||
}
|
}
|
||||||
|
this.PublicationFromMvService.publicationType = this.publicationType
|
||||||
}
|
}
|
||||||
|
|
||||||
async goBack() {
|
async goBack() {
|
||||||
|
|||||||
+8
-2
@@ -11,6 +11,8 @@ import { HttpErrorHandle } from 'src/app/services/http-error-handle.service';
|
|||||||
import { PublicationFolderService } from 'src/app/store/publication-folder.service';
|
import { PublicationFolderService } from 'src/app/store/publication-folder.service';
|
||||||
import { PublicationPipe } from 'src/app/pipes/publication.pipe';
|
import { PublicationPipe } from 'src/app/pipes/publication.pipe';
|
||||||
import { checkFileTypeService } from 'src/app/services/checkFileType.service';
|
import { checkFileTypeService } from 'src/app/services/checkFileType.service';
|
||||||
|
import { PublicationHolderService } from 'src/app/services/publication/publication-holder.service'
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-publication-detail-shared',
|
selector: 'app-publication-detail-shared',
|
||||||
templateUrl: './publication-detail.page.html',
|
templateUrl: './publication-detail.page.html',
|
||||||
@@ -35,7 +37,8 @@ export class PublicationDetailPage implements OnInit {
|
|||||||
public p:PermissionService,
|
public p:PermissionService,
|
||||||
private httpErrorHandle: HttpErrorHandle,
|
private httpErrorHandle: HttpErrorHandle,
|
||||||
public publicationFolderService: PublicationFolderService,
|
public publicationFolderService: PublicationFolderService,
|
||||||
public checkFileType: checkFileTypeService
|
public checkFileType: checkFileTypeService,
|
||||||
|
public PublicationHolderService: PublicationHolderService
|
||||||
) {
|
) {
|
||||||
|
|
||||||
/* this.folderId = this.navParams.get('folderIdId'); */
|
/* this.folderId = this.navParams.get('folderIdId'); */
|
||||||
@@ -138,7 +141,7 @@ export class PublicationDetailPage implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async editPost(publicationType:any) {
|
async editPost(publicationType:any) {
|
||||||
|
if(this.PublicationHolderService.PublicationFormMV.length == 0) {
|
||||||
|
|
||||||
if(window.innerWidth < 701){
|
if(window.innerWidth < 701){
|
||||||
const modal = await this.modalController.create({
|
const modal = await this.modalController.create({
|
||||||
@@ -165,6 +168,9 @@ export class PublicationDetailPage implements OnInit {
|
|||||||
publication: this.publication,
|
publication: this.publication,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
this.toastService._successMessage('já existe uma publicação a ser processado');
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user