diff --git a/src/app/shared/publication/view-publications/view-publications.page.ts b/src/app/shared/publication/view-publications/view-publications.page.ts index 3b7e8a522..f0a3e8a39 100644 --- a/src/app/shared/publication/view-publications/view-publications.page.ts +++ b/src/app/shared/publication/view-publications/view-publications.page.ts @@ -41,7 +41,7 @@ export class ViewPublicationsPage implements OnInit { private loadingController: LoadingService, private modalController: ModalController, private publications: PublicationsService, - ) { + ) { this.item = new PublicationFolder(); } @@ -51,7 +51,7 @@ export class ViewPublicationsPage implements OnInit { if(typeof(this.folderId) == 'object') { this.folderId = this.folderId['ProcessId'] } - + this.getPublications(); this.getPublicationDetail(); } @@ -67,7 +67,7 @@ export class ViewPublicationsPage implements OnInit { this.getPublicationDetail(); }, 100) - + } doRefresh(event) { @@ -82,20 +82,22 @@ export class ViewPublicationsPage implements OnInit { close() { this.closeDesktopComponent.emit(); } - + getPublicationDetail() { let allActions = this.publicationEventFolderStorage.list.concat(this.publicationTravelFolderService.list) - this.item = allActions.find((e)=> e.ProcessId == this.folderId) + this.item = allActions.find((e)=> e.ProcessId == this.folderId); } getPublications() { this.showLoader = true; - + const folderId = this.folderId this.publications.GetPublications(folderId).subscribe(res=> { + console.log(res); + this.publicationList = new Array(); res.forEach(element => { @@ -118,7 +120,7 @@ export class ViewPublicationsPage implements OnInit { } this.publicationList.push(item); }); - + this.publicationListStorage.add(folderId, this.publicationList) this.showLoader = false; @@ -130,7 +132,7 @@ export class ViewPublicationsPage implements OnInit { } this.showLoader = false; - + }) } diff --git a/src/app/store/localstore.service.ts b/src/app/store/localstore.service.ts index fb4a9edb7..63635fad8 100644 --- a/src/app/store/localstore.service.ts +++ b/src/app/store/localstore.service.ts @@ -9,7 +9,7 @@ export class LocalstoreService { private prefix = 'v13-' constructor() { - + const key = SHA1('version').toString() this.set(key, this.prefix) } @@ -22,7 +22,7 @@ export class LocalstoreService { keyName = this.getKey(keyName) - const ciphertext = localStorage.getItem(keyName) + const ciphertext = localStorage.getItem(keyName) const hashKey = SHA1(keyName).toString() @@ -41,7 +41,7 @@ export class LocalstoreService { } set(keyName, value) { - + keyName = this.getKey(keyName) if(typeof(value) != 'string') { @@ -61,16 +61,16 @@ export const localstoreService = new LocalstoreService() -// Create WebSocket connection. +/* // Create WebSocket connection. const socket = new WebSocket('ws://localhost:8080'); // Listen for messages socket.addEventListener('message', function (event) { console.log('Message from server ', event.data); // Message from server mobile first é fraco - + var p = Promise.resolve(event.data); p.then(function(v) { console.log(v); // mobile first é fraco }); -}); \ No newline at end of file +}); */ diff --git a/src/environments/environment.prod.ts b/src/environments/environment.prod.ts index c14eff9cf..1effa3995 100644 --- a/src/environments/environment.prod.ts +++ b/src/environments/environment.prod.ts @@ -1,6 +1,6 @@ export const environment = { production: true, - apiURL: 'https://equilibrium.dyndns.info/GabineteDigital.Services/V4/api/', + apiURL: 'https://equilibrium.dyndns.info/GabineteDigital.Services/V5/api/', apiChatUrl: 'https://www.tabularium.pt/api/v1/', domain: 'gabinetedigital.local', defaultuser: '',