pull made

This commit is contained in:
Eudes Inácio
2023-03-10 16:31:12 +01:00
6 changed files with 29 additions and 64 deletions
@@ -90,7 +90,6 @@ export class PublicationsPage implements OnInit {
this.hideRefreshButton();
}
@@ -148,40 +147,22 @@ export class PublicationsPage implements OnInit {
this.showLoader = false;
const folders: PublicationFolder[] = this.getPublicationFolderMap(res)
// let publications = await ActionModel.create(folders)
// console.log('publications', publications)
this.publicationsEventFolderList = folders.filter((e)=>e.ActionType == 'Evento')
this.publicationsTravelFolderList = folders.filter((e)=>e.ActionType != 'Evento')
if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
await this.storage.set('actionsEvents', this.publicationsEventFolderList);
await this.storage.set('actionsViagens', this.publicationsTravelFolderList);
} else {
folders.forEach((folder)=> {
this.addActionToDB(folder);
})
}
this.showLoader = false;
}, (error) => {
this.showLoader = false;
this.getFromDB()
});
}
// addActionToStorage(events, viagens) {
// if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
// this.storage.set('actionsEvents', events);
// this.storage.set('actionsViagens', viagens);
// }
// }
addActionToDB(folder) {
if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
} else {
@@ -204,8 +185,6 @@ export class PublicationsPage implements OnInit {
}
getFromDB() {
if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
this.storage.get('actionsEvents').then((events = []) => {
if(Array.isArray(events)) {
@@ -226,17 +205,6 @@ export class PublicationsPage implements OnInit {
}
});
} else {
this.sqliteservice.getAllActions().then((actions: any[] = []) => {
const folders: PublicationFolder[] = this.getPublicationFolderMap(actions)
this.publicationsEventFolderList = folders.filter((e)=>e.ActionType == 'Evento')
this.publicationsTravelFolderList = folders.filter((e)=>e.ActionType != 'Evento')
this.showLoader = false;
})
}
}
async editAction(folderId?: string) {
@@ -7,10 +7,10 @@
<ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " src="assets/images/theme/doneIt/icons-calendar-arrow-left.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="end" src='assets/images/theme/gov/icons-calendar-arrow-left.svg'></ion-icon>
</div>
<div *ngIf="publicationItem[folderId]" class="div-title flex-grow-1">
<div *ngIf="publicationItem[folderId]?.DateBegin != null" class="div-title flex-grow-1">
<ion-label class="title">{{publicationItem[folderId].Description}}</ion-label>
<p class="item-content-detail">{{publicationItem[folderId].Detail}}</p>
<p class="item-content-date" *ngIf="publicationItem[folderId].DateBegin != null">{{publicationItem[folderId].DateBegin | date: 'dd-MM-yy HH:mm'}}</p>
<p class="item-content-date" >{{publicationItem[folderId].DateBegin | date: 'dd-MM-yy HH:mm'}}</p>
</div>
<div *ngIf="p.userPermission([p.permissionList.Actions.createPost]) && publicationItem[folderId]" class="actions-icon cursor-pointer" (click)="AddPublication('2',publicationItem[folderId].ProcessId)">
<!-- <ion-icon (click)="AddPublication('1',item.ProcessId)" slot="end" src='assets/images/icons-add-photo.svg'></ion-icon> -->
@@ -133,10 +133,9 @@ export class ViewPublicationsPage implements OnInit {
}
getPublicationDetail() {
this.showLoader = true;
const folderId = this.folderId
this.publications.GetPresidentialAction(folderId).subscribe(res =>{
this.showLoader = false;
this.publicationItem[folderId] = res
this.storage.set(folderId+"name", res)
}, (error) => {
@@ -20,9 +20,9 @@
</button >
</div>
</div>
<div class="div-body width-100" *ngIf="publicationItem[folderId].DateBegin">
<div class="div-body width-100" *ngIf="publicationItem[folderId]?.DateBegin != null">
<p class="item-content-detail">{{publicationItem[folderId].Detail}}</p>
<p class="item-content-date" *ngIf="publicationItem[folderId].DateBegin != null">{{ publicationItem[folderId].DateBegin | date: 'dd-MM-yy HH:mm'}}</p>
<p class="item-content-date">{{ publicationItem[folderId].DateBegin | date: 'dd-MM-yy HH:mm'}}</p>
</div>
</div>
@@ -105,10 +105,8 @@ export class ViewPublicationsPage implements OnInit {
}
getPublicationDetail() {
this.showLoader = true;
const folderId = this.folderId
this.publications.GetPresidentialAction(folderId).subscribe(res=>{
this.showLoader = false;
this.publicationItem[folderId] = res
this.storage.set(folderId+"name", res)
}, (error) => {
+6 -6
View File
@@ -1,12 +1,12 @@
export let versionData = {
"shortSHA": "2a4a22c1d",
"SHA": "2a4a22c1d59ec83d01d2fe500140cbc6dffd5dfc",
"shortSHA": "54e1f9bee",
"SHA": "54e1f9bee3acfcd0ab352b45affb0d84a503b69a",
"branch": "no_bug_movemente",
"lastCommitAuthor": "'Eudes Inácio'",
"lastCommitTime": "'Fri Mar 10 14:45:12 2023 +0100'",
"lastCommitMessage": "enviroment changed",
"lastCommitNumber": "4864",
"lastCommitTime": "'Fri Mar 10 16:26:42 2023 +0100'",
"lastCommitMessage": "publcation moved getfromDB",
"lastCommitNumber": "4868",
"change": "",
"changeStatus": "On branch no_bug_movemente\nYour branch and 'origin/no_bug_movemente' have diverged,\nand have 1 and 5 different commits each, respectively.\n (use \"git pull\" to merge the remote branch into yours)\n\nAll conflicts fixed but you are still merging.\n (use \"git commit\" to conclude merge)\n\nChanges to be committed:\n\tmodified: src/app/pages/chat/chat.page.ts\n\tmodified: src/app/pages/chat/group-messages/group-messages.page.ts\n\tmodified: src/app/pages/publications/publications.page.ts\n\tmodified: src/app/pages/publications/view-publications/view-publications.page.ts\n\tmodified: src/app/shared/chat/group-messages/group-messages.page.ts\n\tmodified: src/app/shared/popover/chat-popover/chat-popover.page.ts\n\tmodified: src/app/shared/publication/view-publications/view-publications.page.ts\n\tmodified: src/environments/environment.prod.ts\n\tmodified: src/environments/environment.ts\n\tmodified: src/theme/variables.scss",
"changeStatus": "On branch no_bug_movemente\nYour branch and 'origin/no_bug_movemente' have diverged,\nand have 2 and 2 different commits each, respectively.\n (use \"git pull\" to merge the remote branch into yours)\n\nAll conflicts fixed but you are still merging.\n (use \"git commit\" to conclude merge)\n\nChanges to be committed:\n\tmodified: src/app/pages/publications/publications.page.ts\n\tmodified: src/app/pages/publications/view-publications/view-publications.page.html\n\tmodified: src/app/pages/publications/view-publications/view-publications.page.ts\n\tmodified: src/app/shared/publication/view-publications/view-publications.page.html\n\tmodified: src/app/shared/publication/view-publications/view-publications.page.ts",
"changeAuthor": "eudes.inacio"
}