mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +00:00
ChangeUi
This commit is contained in:
@@ -395,22 +395,13 @@ export class NewPublicationPage implements OnInit {
|
||||
this.photo = this.sanitizer.bypassSecurityTrustResourceUrl(image && (image.dataUrl));
|
||||
} */
|
||||
|
||||
|
||||
|
||||
async selectImage() {
|
||||
const image = await Camera.getPhoto({
|
||||
<<<<<<< HEAD
|
||||
quality: 50,
|
||||
width:50,
|
||||
height:50,
|
||||
=======
|
||||
quality: 20,
|
||||
>>>>>>> 6a912b740d97159664c5fe5dff07ac378b028771
|
||||
allowEditing: false,
|
||||
resultType: CameraResultType.Uri,
|
||||
source: CameraSource.Camera // Camera, Photos or Prompt!
|
||||
});
|
||||
|
||||
if (image) {
|
||||
this.saveImage(image)
|
||||
}
|
||||
|
||||
@@ -39,11 +39,7 @@
|
||||
(click)="goToPublicationDetail(publication.DocumentId)"
|
||||
>
|
||||
<div *ngIf="publication.FileBase64.length > 30" class="post-img">
|
||||
<<<<<<< HEAD
|
||||
<img [debug]= "true" [defaultImage] = "defaultImage" [lazyLoad]="publication.FileBase64" src="{{publication.FileBase64}}" alt="image">
|
||||
=======
|
||||
<ion-img src="{{publication.FileBase64}}" alt="image"></ion-img>
|
||||
>>>>>>> 6a912b740d97159664c5fe5dff07ac378b028771
|
||||
</div>
|
||||
<div *ngIf="publication.FileBase64.length < 30" class="post-img">
|
||||
<img src="/assets/icon/icon-no-image.svg" alt="image">
|
||||
|
||||
@@ -69,22 +69,10 @@ export class ViewPublicationsPage implements OnInit {
|
||||
this.folderId = this.folderId['ProcessId']
|
||||
}
|
||||
|
||||
<<<<<<< HEAD
|
||||
|
||||
if (typeof (this.id) == 'object') {
|
||||
this.id = this.id['ProcessId']
|
||||
}
|
||||
|
||||
this.getPublicationDetail();
|
||||
setTimeout(() => {
|
||||
this.testForkJoin()
|
||||
// this.getPublications();
|
||||
=======
|
||||
this.getPublicationsIds()
|
||||
this.getPublicationDetail();
|
||||
setTimeout(() => {
|
||||
this.getPublicationsIds();
|
||||
>>>>>>> 6a912b740d97159664c5fe5dff07ac378b028771
|
||||
}, 1000);
|
||||
|
||||
this.backgroundservice.registerBackService('Online', () => {
|
||||
@@ -106,23 +94,14 @@ export class ViewPublicationsPage implements OnInit {
|
||||
// }
|
||||
this.testForkJoin()
|
||||
this.getPublicationDetail();
|
||||
<<<<<<< HEAD
|
||||
// this.getPublications();
|
||||
|
||||
=======
|
||||
this.getPublicationsIds();
|
||||
>>>>>>> 6a912b740d97159664c5fe5dff07ac378b028771
|
||||
}
|
||||
|
||||
doRefresh = (event) => {
|
||||
setTimeout(() => {
|
||||
this.testForkJoin()
|
||||
this.getPublicationDetail();
|
||||
<<<<<<< HEAD
|
||||
// this.getPublications();
|
||||
=======
|
||||
this.getPublicationsIds();
|
||||
>>>>>>> 6a912b740d97159664c5fe5dff07ac378b028771
|
||||
event.target.complete();
|
||||
}, 3000);
|
||||
|
||||
@@ -161,51 +140,24 @@ export class ViewPublicationsPage implements OnInit {
|
||||
|
||||
this.publicationList = new Array();
|
||||
|
||||
<<<<<<< HEAD
|
||||
res.forEach(element => {
|
||||
console.log('getPublications', element)
|
||||
let item: Publication = this.publicationPipe.itemList(element)
|
||||
this.publicationList.push(item);
|
||||
});
|
||||
this.sqliteservice.updateactions(this.id, JSON.stringify(this.publicationList));
|
||||
// getPublicationsIds() {
|
||||
|
||||
// this.publicationListStorage.add(id, this.publicationList)
|
||||
// this.getpublication = this.publicationList;
|
||||
// this.showLoader = true;
|
||||
// const folderId = this.folderId
|
||||
|
||||
// this.showLoader = false;
|
||||
// }, (error) => {
|
||||
// this.publications.GetPublicationsID(this.folderId).subscribe(res => {
|
||||
|
||||
// if(error.status == '0') {
|
||||
// this.getFromDB();
|
||||
// }
|
||||
// if (error.status == '404') {
|
||||
// this.error = 'Sem publicações disponíveis!';
|
||||
// this.publicationList = [];
|
||||
// this.publicationListStorage.add(id, this.publicationList)
|
||||
// }
|
||||
this.showLoader = false;
|
||||
});
|
||||
}
|
||||
// goes to fork
|
||||
=======
|
||||
getPublicationsIds() {
|
||||
// console.log('publications ids', res)
|
||||
// this.publicationList = new Array();
|
||||
|
||||
this.showLoader = true;
|
||||
const folderId = this.folderId
|
||||
|
||||
this.publications.GetPublicationsID(this.folderId).subscribe(res => {
|
||||
|
||||
console.log('publications ids', res)
|
||||
this.publicationList = new Array();
|
||||
|
||||
for(let i of res) {
|
||||
this.publications.GetPublicationById(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);
|
||||
})
|
||||
}
|
||||
// for(let i of res) {
|
||||
// this.publications.GetPublicationById(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 => {
|
||||
console.log('publications elements', element)
|
||||
@@ -239,7 +191,6 @@ export class ViewPublicationsPage implements OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
>>>>>>> 6a912b740d97159664c5fe5dff07ac378b028771
|
||||
getPublications() {
|
||||
|
||||
this.showLoader = true;
|
||||
|
||||
Reference in New Issue
Block a user