mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 12:37:53 +00:00
fix update bug
This commit is contained in:
@@ -90,6 +90,10 @@ export class PublicationsPage implements OnInit {
|
|||||||
|
|
||||||
window['goToPublicationsList'] = this.goToPublicationsList
|
window['goToPublicationsList'] = this.goToPublicationsList
|
||||||
|
|
||||||
|
window['updateAction'] = () => {
|
||||||
|
this.getActions()
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -180,7 +184,7 @@ export class PublicationsPage implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
getActions() {
|
getActions = () => {
|
||||||
this.showLoader = true
|
this.showLoader = true
|
||||||
|
|
||||||
this.publications.GetPublicationFolderList().subscribe(async res => {
|
this.publications.GetPublicationFolderList().subscribe(async res => {
|
||||||
@@ -193,24 +197,6 @@ export class PublicationsPage implements OnInit {
|
|||||||
|
|
||||||
this.showLoader = false;
|
this.showLoader = false;
|
||||||
|
|
||||||
// (async ()=> {
|
|
||||||
|
|
||||||
// const created = await ActionModel.create(folders)
|
|
||||||
// const stored = await ActionModel.all()
|
|
||||||
|
|
||||||
// const notPresentOnTheRequest: ActionModel[] = stored.filter(e => {
|
|
||||||
// return !folders.find(b => e.ProcessId == b.ProcessId)
|
|
||||||
// })
|
|
||||||
|
|
||||||
// for (let ActionModelToDelete of notPresentOnTheRequest) {
|
|
||||||
// ActionModelToDelete.delete()
|
|
||||||
// }
|
|
||||||
|
|
||||||
// // console.log({created, stored, folders, toDeletes})
|
|
||||||
|
|
||||||
// })()
|
|
||||||
|
|
||||||
|
|
||||||
}, (error) => {
|
}, (error) => {
|
||||||
this.showLoader = false;
|
this.showLoader = false;
|
||||||
this.getFromDB()
|
this.getFromDB()
|
||||||
|
|||||||
@@ -284,10 +284,15 @@ export class ViewPublicationsPage implements OnInit {
|
|||||||
|
|
||||||
modal.onDidDismiss().then((res) => {
|
modal.onDidDismiss().then((res) => {
|
||||||
if (res.data == 'Yes') {
|
if (res.data == 'Yes') {
|
||||||
|
|
||||||
const loader = this.toastService.loading();
|
const loader = this.toastService.loading();
|
||||||
try {
|
try {
|
||||||
this.publications.DeletePresidentialAction(folderId).toPromise();
|
this.publications.DeletePresidentialAction(folderId).toPromise();
|
||||||
this.httpErrorHandle.httpsSucessMessagge('Eliminar Acção')
|
this.httpErrorHandle.httpsSucessMessagge('Eliminar Acção')
|
||||||
|
setTimeout(()=> {
|
||||||
|
window['updateAction']()
|
||||||
|
}, 1500)
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this.httpErrorHandle.httpStatusHandle(error)
|
this.httpErrorHandle.httpStatusHandle(error)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,4 +4,4 @@ import { environment as oaprProd } from './suport/oapr'
|
|||||||
import { DevDev } from './suport/dev'
|
import { DevDev } from './suport/dev'
|
||||||
|
|
||||||
|
|
||||||
export const environment: Environment = DevDev;
|
export const environment: Environment = oaprProd;
|
||||||
|
|||||||
Reference in New Issue
Block a user