mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 21:35:50 +00:00
change publication like instagram and add time zone to agenda
This commit is contained in:
@@ -125,10 +125,10 @@ export class ViewPublicationsPage implements OnInit {
|
||||
|
||||
this.showLoader = true;
|
||||
const folderId = this.folderId
|
||||
|
||||
|
||||
try {
|
||||
const publicationIds = await this.publications.GetPublicationsList(folderId).toPromise();
|
||||
|
||||
|
||||
this.createPublicationList(folderId)
|
||||
let loadLater = []
|
||||
for (let publicationId of publicationIds) {
|
||||
@@ -147,17 +147,17 @@ export class ViewPublicationsPage implements OnInit {
|
||||
|
||||
|
||||
for(let localPublication of this.publicationFolderService.publicationList[folderId]) {
|
||||
|
||||
|
||||
const apiPublication = publicationIds.includes(localPublication.DocumentId)
|
||||
if(!apiPublication) {
|
||||
this.publicationFolderService.deletePost(folderId, localPublication.DocumentId)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
this.showLoader = false;
|
||||
|
||||
|
||||
this.storage.set(folderId, this.publicationFolderService.publicationList[folderId]);
|
||||
|
||||
|
||||
this.oldpublicationIds = publicationIds
|
||||
} catch(error) {
|
||||
this.showLoader = false;
|
||||
@@ -166,10 +166,8 @@ export class ViewPublicationsPage implements OnInit {
|
||||
}
|
||||
|
||||
_deletePublication = (folderId, publicationId) => {
|
||||
|
||||
|
||||
this.publicationFolderService.publicationList[folderId] = this.publicationFolderService.publicationList[folderId].filter( e => e.DocumentId != publicationId)
|
||||
|
||||
console.log('this.publicationFolderService.publicationList[folderId]', this.publicationFolderService.publicationList[folderId].length)
|
||||
|
||||
}
|
||||
|
||||
@@ -186,7 +184,7 @@ export class ViewPublicationsPage implements OnInit {
|
||||
async loadPublication(publicationId, folderId) {
|
||||
let Publication = await this.publications.GetPublicationById(publicationId).toPromise();
|
||||
let publicationDetails: Publication = this.publicationPipe.itemList(Publication)
|
||||
|
||||
|
||||
const findIndex = this.publicationFindIndex(publicationId, folderId)
|
||||
const found = this.publicationIsPresent(publicationId, folderId)
|
||||
if(!found) {
|
||||
@@ -194,7 +192,7 @@ export class ViewPublicationsPage implements OnInit {
|
||||
} else {
|
||||
this.publicationFolderService.publicationList[folderId][findIndex] = publicationDetails
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
getFromDB() {
|
||||
@@ -242,7 +240,7 @@ export class ViewPublicationsPage implements OnInit {
|
||||
cssClass: 'new-action modal modal-desktop',
|
||||
backdropDismiss: true
|
||||
});
|
||||
|
||||
|
||||
modal.onDidDismiss().then(() => {
|
||||
// Do nothing
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user