mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 21:35:50 +00:00
changes
This commit is contained in:
@@ -39,12 +39,14 @@
|
||||
(click)="goToPublicationDetail(publication.DocumentId)"
|
||||
>
|
||||
<div *ngIf="publication.FileBase64 != null">
|
||||
<div *ngIf="publication.FileBase64.length > 30" class="post-img">
|
||||
<img src="{{'data:image/jpeg;base64,' + publication.FileBase64}}" alt="image">
|
||||
</div>
|
||||
<div *ngIf="publication.FileBase64.length < 30" class="post-img">
|
||||
<img src="/assets/icon/icon-no-image.svg" alt="image">
|
||||
<div *ngIf="publication.FileBase64.length < 30; else imageLoaded" class="post-img">
|
||||
<img src="/assets/icon/icon-no-image.svg">
|
||||
</div>
|
||||
<ng-template #imageLoaded>
|
||||
<div *ngIf="publication.FileBase64.length > 30" class="post-img">
|
||||
<img src="{{publication.FileBase64}}">
|
||||
</div>
|
||||
</ng-template>
|
||||
</div>
|
||||
<div class="post-content px-20">
|
||||
<div class="post-title-time">
|
||||
|
||||
@@ -70,9 +70,10 @@ export class ViewPublicationsPage implements OnInit {
|
||||
}
|
||||
//this.testForkJoin()
|
||||
this.getPublicationDetail();
|
||||
setTimeout(() => {
|
||||
this.getPublicationsIds();
|
||||
/* setTimeout(() => {
|
||||
this.getPublicationsIds();
|
||||
}, 1000);
|
||||
}, 1000); */
|
||||
|
||||
this.backgroundservice.registerBackService('Online', () => {
|
||||
this.getPublicationDetail();
|
||||
@@ -92,7 +93,7 @@ export class ViewPublicationsPage implements OnInit {
|
||||
// this.id = this.id['ProcessId']
|
||||
// }
|
||||
//this.testForkJoin()
|
||||
this.getPublicationDetail();
|
||||
//this.getPublicationDetail();
|
||||
// this.getPublicationsIds();
|
||||
}
|
||||
|
||||
@@ -119,6 +120,7 @@ export class ViewPublicationsPage implements OnInit {
|
||||
this.publications.GetPresidentialAction(this.folderId).subscribe(res => {
|
||||
console.log(res);
|
||||
this.item = res;
|
||||
this.sqliteservice.updatePublicationsDetails(this.folderId, JSON.stringify(res));
|
||||
});
|
||||
}
|
||||
|
||||
@@ -144,16 +146,16 @@ export class ViewPublicationsPage implements OnInit {
|
||||
console.log('publications ids', res)
|
||||
this.publicationList = new Array();
|
||||
|
||||
/* for(let i of res) {
|
||||
this.publications.GetPublicationById(i).subscribe(ress => {
|
||||
for(let i = 0; i < res.length; i++) {
|
||||
this.publications.GetPublicationById(res[i]).subscribe(ress => {
|
||||
console.log('publications by ids', ress)
|
||||
let item: Publication = this.publicationPipe.itemList(ress)
|
||||
console.log('publications by ids 2', item)
|
||||
this.publicationList.push(item);
|
||||
})
|
||||
} */
|
||||
}
|
||||
|
||||
res.forEach(element => {
|
||||
/* res.forEach(element => {
|
||||
console.log('publications elements', element)
|
||||
this.publications.GetPublicationById(element).subscribe(ress => {
|
||||
console.log('publications by ids', ress)
|
||||
@@ -162,9 +164,10 @@ export class ViewPublicationsPage implements OnInit {
|
||||
this.publicationList.push(ress);
|
||||
})
|
||||
|
||||
});
|
||||
|
||||
}); */
|
||||
console.log('PUBLICATIONS IMAGEs',this.publicationList)
|
||||
this.sqliteservice.updateactions(this.folderId, JSON.stringify(this.publicationList));
|
||||
console.log('PUBLICATIONS IMAGEs',this.publicationList)
|
||||
|
||||
this.publicationListStorage.add(folderId, this.publicationList)
|
||||
this.getpublication = this.publicationList;
|
||||
@@ -237,7 +240,7 @@ export class ViewPublicationsPage implements OnInit {
|
||||
|
||||
this.sqliteservice.getActionById(this.folderId).then((publications) => {
|
||||
console.log('publications', publications)
|
||||
let item = {
|
||||
/* let item = {
|
||||
ActionType: publications[0].ActionType,
|
||||
DateBegin: publications[0].DateBegin,
|
||||
DateEnd: publications[0].DateEnd,
|
||||
@@ -245,7 +248,8 @@ export class ViewPublicationsPage implements OnInit {
|
||||
Detail: publications[0].Detail,
|
||||
ProcessId: publications[0].ProcessId
|
||||
}
|
||||
this.publicationDitails = item;
|
||||
this.publicationDitails = item; */
|
||||
this.item = JSON.parse(publications[0].publicationsDetails);
|
||||
|
||||
let publicationArray = [];
|
||||
JSON.parse(publications[0].publications).forEach(element => {
|
||||
@@ -263,7 +267,7 @@ export class ViewPublicationsPage implements OnInit {
|
||||
publicationArray.push(publicationlis);
|
||||
|
||||
});
|
||||
|
||||
|
||||
this.getpublication = publicationArray;
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user