This commit is contained in:
tiago.kayaya
2021-07-30 11:45:18 +01:00
parent 9fc2ea9ce6
commit c77c845490
3 changed files with 17 additions and 15 deletions
@@ -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;
})
}
+6 -6
View File
@@ -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
});
});
}); */