Files
doneit-web/.angular/cache/14.2.12/babel-webpack/5e222307301ebe285958efd596f3900f.json
T

1 line
24 KiB
JSON
Raw Normal View History

2023-06-30 09:54:21 +01:00
{"ast":null,"code":"import _asyncToGenerator from \"C:/Users/eudes.inacio/GabineteDigital/gabinete-digital-fo/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js\";\nimport { __decorate } from \"tslib\";\nimport __NG_CLI_RESOURCE__0 from \"./view-publications.page.html?ngResource\";\nimport __NG_CLI_RESOURCE__1 from \"./view-publications.page.scss?ngResource\";\nimport { Component } from '@angular/core';\nimport { ActivatedRoute, Router } from '@angular/router';\nimport { ModalController } from '@ionic/angular';\nimport { PublicationFolder } from 'src/app/models/publicationfolder';\nimport { PublicationPipe } from 'src/app/pipes/publication.pipe';\nimport { PublicationsService } from 'src/app/services/publications.service';\nimport { NewPublicationPage } from '../new-publication/new-publication.page';\nimport { PublicationDetailPage } from './publication-detail/publication-detail.page';\nimport { SqliteService } from 'src/app/services/sqlite.service';\nimport { BackgroundService } from 'src/app/services/background.service';\nimport { ThemeService } from 'src/app/services/theme.service';\nimport { ToastService } from 'src/app/services/toast.service';\nimport { PermissionService } from 'src/app/services/permission.service';\nimport { HttpErrorHandle } from 'src/app/services/http-error-handle.service';\nimport { Storage } from '@ionic/storage';\nlet ViewPublicationsPage = class ViewPublicationsPage {\n constructor(modalController, publications, activatedRoute, router, sqliteservice, backgroundservice, ThemeService, toastService, p, httpErroHandle, storage) {\n this.modalController = modalController;\n this.publications = publications;\n this.activatedRoute = activatedRoute;\n this.router = router;\n this.sqliteservice = sqliteservice;\n this.backgroundservice = backgroundservice;\n this.ThemeService = ThemeService;\n this.toastService = toastService;\n this.p = p;\n this.httpErroHandle = httpErroHandle;\n this.storage = storage;\n this.showLoader = true;\n this.publicationList = {};\n this.publicationItem = {};\n this.defaultImage = \"/assets/icon/icon-no-image.svg\";\n this.publicationPipe = new PublicationPipe();\n this.getpublication = [];\n this.doRefresh = event => {\n //setTimeout(() => {\n //this.testForkJoin()\n this.getPublicationDetail();\n this.getPublicationsIds();\n try {\n event?.target?.complete();\n } catch (error) {}\n //}, 3000);\n };\n\n this.createPublicationList();\n this.getFromDB();\n this.activatedRoute.paramMap.subscribe(params => {\n if (params[\"params\"]) {\n this.folderId = params[\"params\"].folderId;\n // \n }\n\n window['app-view-publications-page-doRefresh'] = this.doRefresh;\n });\n }\n ngOnInit() {\n if (typeof this.folderId == 'object') {\n this.folderId = this.folderId['ProcessId'];\n }\n this.createPublicationList();\n this.getFromDB();\n //this.testForkJoin()\n this.getPublicationDetail();\n this.getPublicationsIds();\n /* setTimeout(() => {\r\n this.getPublications();\r\n }, 1000); */\n this.backgroundservice.registerBackService('Online', () => {\n this.getPublicationDetail();\n //this.testForkJoin()\n });\n }\n\n ngOnChanges() {\n if (typeof this.folderId == 'object') {\n this.folderId = this.folderId['ProcessId'];\n }\n this.createPublicationList();\n this.getFromDB();\n }\n createPublicationList(folderId = this.folderId) {\n if (!this.publicationList[folderId]) {\n this.publicationList[folderId] = [];\n }\n if (!this.publicationItem[folderId]) {\n this.publicationItem[folderId] = new PublicationFolder();\n }\n }\n close() {\n this.modalController.dismiss();\n this.router.navigate(['/home/publications']);\n }\n goBack() {\n this.router.navigate(['/home/publications']);\n }\n getPublicationDetail() {\n const folderId = this.folderId;\n this.publications.GetPresidentialAction(folderId).subscribe(res => {\n this.publ