mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 12:37:53 +00:00
fix
This commit is contained in:
@@ -284,6 +284,10 @@ const routes = [
|
||||
},
|
||||
{
|
||||
path: 'task-detail-header',
|
||||
loadChildren: () => import('./shared/gabinete-digital/generic/task-detail-header/task-detail-header.module').then( m => m.TaskDetailHeaderPageModule)
|
||||
},
|
||||
{
|
||||
path: 'ask-modal',
|
||||
loadChildren: () => import('./modals/ask-modal/ask-modal.module').then( m => m.AskModalPageModule)
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { Routes, RouterModule } from '@angular/router';
|
||||
|
||||
import { AskModalPage } from './ask-modal.page';
|
||||
|
||||
const routes: Routes = [
|
||||
{
|
||||
path: '',
|
||||
component: AskModalPage
|
||||
}
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
imports: [RouterModule.forChild(routes)],
|
||||
exports: [RouterModule],
|
||||
})
|
||||
export class AskModalPageRoutingModule {}
|
||||
@@ -0,0 +1,20 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
|
||||
import { IonicModule } from '@ionic/angular';
|
||||
|
||||
import { AskModalPageRoutingModule } from './ask-modal-routing.module';
|
||||
|
||||
import { AskModalPage } from './ask-modal.page';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule,
|
||||
FormsModule,
|
||||
IonicModule,
|
||||
AskModalPageRoutingModule
|
||||
],
|
||||
declarations: [AskModalPage]
|
||||
})
|
||||
export class AskModalPageModule {}
|
||||
@@ -0,0 +1,20 @@
|
||||
<ion-header class="ion-no-border">
|
||||
</ion-header>
|
||||
|
||||
<ion-content>
|
||||
<div class="header-content width-100">
|
||||
<div class="header-title d-flex width-100">
|
||||
<h3>{{ title }}</h3>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="header-body width-100">
|
||||
<p>{{ description }}</p>
|
||||
</div>
|
||||
</ion-content>
|
||||
<ion-footer>
|
||||
<div class="buttons width-100">
|
||||
<button class="btn-ok-medium" shape="round" (click)="close()">Não</button>
|
||||
<button class="btn-delete-medium" shape="round" (click)="save()">Sim</button>
|
||||
</div>
|
||||
</ion-footer>
|
||||
@@ -0,0 +1,29 @@
|
||||
@import '~src/function.scss';
|
||||
|
||||
ion-content{
|
||||
--padding-top:15px;
|
||||
--padding-start: 15px;
|
||||
--padding-end: 15px;
|
||||
}
|
||||
.header-content{
|
||||
overflow: hidden;
|
||||
margin: 0 auto;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.header-title{
|
||||
font-family: Roboto;
|
||||
font-size: rem(20);
|
||||
color:#000;
|
||||
margin: 0 5px 0 5px;
|
||||
}
|
||||
.header-body{
|
||||
margin: 0 5px 0 5px;
|
||||
}
|
||||
|
||||
.buttons{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding: 15px 0 15px 0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
|
||||
import { IonicModule } from '@ionic/angular';
|
||||
|
||||
import { AskModalPage } from './ask-modal.page';
|
||||
|
||||
describe('AskModalPage', () => {
|
||||
let component: AskModalPage;
|
||||
let fixture: ComponentFixture<AskModalPage>;
|
||||
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ AskModalPage ],
|
||||
imports: [IonicModule.forRoot()]
|
||||
}).compileComponents();
|
||||
|
||||
fixture = TestBed.createComponent(AskModalPage);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
}));
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,33 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { ModalController, NavParams } from '@ionic/angular';
|
||||
|
||||
@Component({
|
||||
selector: 'app-ask-modal',
|
||||
templateUrl: './ask-modal.page.html',
|
||||
styleUrls: ['./ask-modal.page.scss'],
|
||||
})
|
||||
export class AskModalPage implements OnInit {
|
||||
|
||||
title = ''
|
||||
description = ''
|
||||
|
||||
constructor(
|
||||
private modalController: ModalController,
|
||||
private navParams: NavParams
|
||||
) {
|
||||
|
||||
this.title = this.navParams.get('title');
|
||||
this.description = this.navParams.get('description');
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
}
|
||||
|
||||
close() {
|
||||
this.modalController.dismiss('No');
|
||||
}
|
||||
|
||||
save() {
|
||||
this.modalController.dismiss('Yes');
|
||||
}
|
||||
}
|
||||
@@ -8,16 +8,16 @@ import { ModalController } from '@ionic/angular';
|
||||
})
|
||||
export class EliminateEventPage implements OnInit {
|
||||
|
||||
constructor(private modalController: ModalController,) { }
|
||||
constructor(private modalController: ModalController) { }
|
||||
|
||||
ngOnInit() {
|
||||
}
|
||||
|
||||
close(){
|
||||
close() {
|
||||
this.modalController.dismiss('No');
|
||||
}
|
||||
|
||||
save(){
|
||||
save() {
|
||||
this.modalController.dismiss('Yes');
|
||||
}
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="btn-close d-flex cursor-pointer" (click)="close()">
|
||||
<div class="btn-close d-flex cursor-pointer pr-20" (click)="close()">
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="icon"
|
||||
src="assets/images/icons-search-close.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="icon"
|
||||
@@ -93,7 +93,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="profile-title d-flex justify-space-between align-center width-100">
|
||||
<!-- <div class="profile-title d-flex justify-space-between align-center width-100">
|
||||
<div class="d-flex align-center">
|
||||
<div>Tema</div>
|
||||
</div>
|
||||
@@ -109,13 +109,8 @@
|
||||
<img style="width: 40px;" src="assets/images/logo-removebg-preview.png" />
|
||||
</div>
|
||||
|
||||
<!-- <div class="btn-close d-flex cursor-pointer pr-10" (click)="changeTheme('doneIt')" >
|
||||
<img *ngIf="ThemeService.currentTheme == 'gov'" style="width: 40px;" src="assets/images/theme/doneIt/governoangola_A.png"/>
|
||||
<img *ngIf="ThemeService.currentTheme != 'gov'" style="width: 40px;" src="assets/images/theme/doneIt/governoangola_A1.png"/>
|
||||
</div> -->
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="btn-close d-flex cursor-pointer" *ngIf="hideImage" (click)="close()">
|
||||
<div class="btn-close d-flex cursor-pointer pr-20" *ngIf="hideImage" (click)="close()">
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="icon"
|
||||
src="assets/images/icons-search-close.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="icon"
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<!-- Toolbar -->
|
||||
<ion-progress-bar type="indeterminate" *ngIf="showLoader"></ion-progress-bar>
|
||||
|
||||
<div>
|
||||
<div [class]="weeksToShow" >
|
||||
<!-- Calendar is here -->
|
||||
|
||||
<div class="calendar-segment-{{profile}}" [class.calendar-segment-pr-force]="SessionStore.user.Profile =='PR'">
|
||||
|
||||
@@ -1009,29 +1009,60 @@ $font-size: rem(15);
|
||||
|
||||
@media only screen and (min-width: 100px) {
|
||||
|
||||
.calendar-title-container {
|
||||
font-size: 14px;
|
||||
.week-5 {
|
||||
.calendar-title-container {
|
||||
font-size: 14px;
|
||||
}
|
||||
.height-75 {
|
||||
height: 75px;
|
||||
}
|
||||
|
||||
.height-356 {
|
||||
height: 324px;
|
||||
}
|
||||
}
|
||||
.height-75 {
|
||||
height: 75px;
|
||||
}
|
||||
|
||||
.height-356 {
|
||||
height: 324px;
|
||||
|
||||
.week-6 {
|
||||
.calendar-title-container {
|
||||
font-size: 14px;
|
||||
}
|
||||
.height-75 {
|
||||
height: 75px;
|
||||
}
|
||||
|
||||
.height-356 {
|
||||
height: 360px;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@media only screen and (min-width: 500px) {
|
||||
|
||||
.calendar-title-container {
|
||||
font-size: 16px;
|
||||
.week-5 {
|
||||
.calendar-title-container {
|
||||
font-size: 16px;
|
||||
}
|
||||
.height-75 {
|
||||
height: 75px;
|
||||
}
|
||||
|
||||
.height-356 {
|
||||
height: 356px;
|
||||
}
|
||||
}
|
||||
.height-75 {
|
||||
height: 75px;
|
||||
|
||||
.week-6 {
|
||||
.calendar-title-container {
|
||||
font-size: 16px;
|
||||
}
|
||||
.height-75 {
|
||||
height: 75px;
|
||||
}
|
||||
|
||||
.height-356 {
|
||||
height: 395px;
|
||||
}
|
||||
}
|
||||
|
||||
.height-356 {
|
||||
height: 356px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -287,6 +287,34 @@ export class AgendaPage implements OnInit {
|
||||
}, 1000)
|
||||
}
|
||||
|
||||
weeksToShow = []
|
||||
|
||||
weekToShow() {
|
||||
let num = 0;
|
||||
|
||||
function Week(a) {
|
||||
for(let b of a.querySelectorAll('td')) {
|
||||
if(!b.className.includes('text-muted')) {
|
||||
num++;
|
||||
return true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (let a of document.querySelectorAll('.monthview-container .swiper-container .swiper-slide-active table tbody tr') as any ){
|
||||
Week(a)
|
||||
}
|
||||
|
||||
if(num <= 5) {
|
||||
|
||||
this.weeksToShow = ["week-5"]
|
||||
} else {
|
||||
|
||||
this.weeksToShow = ["week-6"]
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
setCalendarByDefault() {
|
||||
if(!this.CalendarName) {
|
||||
@@ -514,6 +542,8 @@ export class AgendaPage implements OnInit {
|
||||
loadRequestHistory: any = {}
|
||||
|
||||
loadRangeEvents(startTime: Date, endTime: Date) {
|
||||
this.weekToShow()
|
||||
|
||||
if(!this.eventService.hasAnyCalendar) {
|
||||
return false
|
||||
}
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
|
||||
<!-- Aside left -->
|
||||
<div class="aside-wrapper d-flex flex-column width-md-40 flex-grow-1">
|
||||
{{ TaskService.showLoaderNum }}
|
||||
<ion-progress-bar type="indeterminate" *ngIf="TaskService.showLoaderNum != 0"></ion-progress-bar>
|
||||
<div class="title-container">
|
||||
<div class="title d-flex justify-center">
|
||||
|
||||
@@ -17,6 +17,7 @@ import { Storage } from '@ionic/storage';
|
||||
// import { ActionModel } from 'src/app/models/beast-orm';
|
||||
|
||||
|
||||
|
||||
@Component({
|
||||
selector: 'app-publications',
|
||||
templateUrl: './publications.page.html',
|
||||
|
||||
+15
-2
@@ -10,6 +10,9 @@ import { ViewMediaPage } from 'src/app/modals/view-media/view-media.page';
|
||||
import { RouteService } from 'src/app/services/route.service';
|
||||
import { PermissionService } from 'src/app/services/permission.service';
|
||||
import { HttpErrorHandle } from 'src/app/services/http-error-handle.service';
|
||||
import { PublicationFolderService } from 'src/app/store/publication-folder.service';
|
||||
|
||||
|
||||
|
||||
@Component({
|
||||
selector: 'app-publication-detail',
|
||||
@@ -31,7 +34,8 @@ export class PublicationDetailPage implements OnInit {
|
||||
private RouteService: RouteService,
|
||||
public ThemeService: ThemeService,
|
||||
public p:PermissionService,
|
||||
private httpErrorHandle: HttpErrorHandle
|
||||
private httpErrorHandle: HttpErrorHandle,
|
||||
public publicationFolderService: PublicationFolderService
|
||||
) {
|
||||
|
||||
this.activatedRoute.paramMap.subscribe(params => {
|
||||
@@ -90,8 +94,13 @@ export class PublicationDetailPage implements OnInit {
|
||||
}
|
||||
this.showLoader = false;
|
||||
}, (error) => {
|
||||
this.httpErrorHandle.httpStatusHandle(error)
|
||||
|
||||
if(error.status == 404) {
|
||||
this.publicationFolderService.deletePost(this.folderId, this.publicationId)
|
||||
}
|
||||
|
||||
this.goBack();
|
||||
this.httpErrorHandle.httpStatusHandle(error)
|
||||
});
|
||||
}
|
||||
|
||||
@@ -120,8 +129,12 @@ export class PublicationDetailPage implements OnInit {
|
||||
window['app-view-publications-page-doRefresh']()
|
||||
}
|
||||
|
||||
this.publicationFolderService.deletePost(this.folderId, this.publicationId)
|
||||
this.goBack();
|
||||
} catch (error) {
|
||||
if(error.status == 404) {
|
||||
this.publicationFolderService.deletePost(this.folderId, this.publicationId)
|
||||
}
|
||||
this.httpErrorHandle.httpStatusHandle(error)
|
||||
} finally {
|
||||
loader.remove()
|
||||
|
||||
@@ -7,12 +7,12 @@
|
||||
<ion-icon class="font-35-em" *ngIf="ThemeService.currentTheme == 'doneIt' " src="assets/images/theme/doneIt/icons-calendar-arrow-left.svg"></ion-icon>
|
||||
<ion-icon class="font-35-em" *ngIf="ThemeService.currentTheme == 'gov' " slot="end" src='assets/images/theme/gov/icons-calendar-arrow-left.svg'></ion-icon>
|
||||
</div>
|
||||
<div *ngIf="publicationItem[folderId]?.DateBegin != null" class="div-title flex-grow-1">
|
||||
<p class="title font-25-em mb-10-em">{{publicationItem[folderId].Description}}</p>
|
||||
<p class="item-content-detail font-14-em">{{publicationItem[folderId].Detail}}</p>
|
||||
<p class="item-content-date font-13-em" >{{publicationItem[folderId].DateBegin | date: 'dd-MM-yy HH:mm'}}</p>
|
||||
<div *ngIf="publicationFolderService.FolderDetails[folderId]?.DateBegin != null" class="div-title flex-grow-1">
|
||||
<p class="title font-25-em mb-10-em">{{publicationFolderService.FolderDetails[folderId].Description}}</p>
|
||||
<p class="item-content-detail font-14-em">{{publicationFolderService.FolderDetails[folderId].Detail}}</p>
|
||||
<p class="item-content-date font-13-em" >{{publicationFolderService.FolderDetails[folderId].DateBegin | date: 'dd-MM-yy HH:mm'}}</p>
|
||||
</div>
|
||||
<div *ngIf="p.userPermission([p.permissionList.Actions.createPost]) && publicationItem[folderId]" class="cursor-pointer font-35-em" (click)="AddPublication('2',publicationItem[folderId].ProcessId)">
|
||||
<div *ngIf="p.userPermission([p.permissionList.Actions.createPost]) && publicationFolderService.FolderDetails[folderId]" class="cursor-pointer font-35-em" (click)="AddPublication('2',publicationFolderService.FolderDetails[folderId].ProcessId)">
|
||||
<!-- <ion-icon (click)="AddPublication('1',item.ProcessId)" slot="end" src='assets/images/icons-add-photo.svg'></ion-icon> -->
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="end" src='assets/images/icons-add.svg'></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="end" src='assets/images/theme/gov/icons-add.svg'></ion-icon>
|
||||
@@ -29,8 +29,8 @@
|
||||
</ion-refresher-content>
|
||||
</ion-refresher>
|
||||
<div class="main-container background-white height-100 overflow-y-auto viewport-font-size">
|
||||
<ion-content *ngIf="publicationItem[folderId]">
|
||||
<ion-card *ngFor="let publication of publicationList[folderId] let i = index"
|
||||
<ion-content *ngIf="publicationFolderService.FolderDetails[folderId]">
|
||||
<ion-card *ngFor="let publication of publicationFolderService.publicationList[folderId] let i = index"
|
||||
(click)="goToPublicationDetail(publication.DocumentId)"
|
||||
>
|
||||
<ion-card-content>
|
||||
|
||||
@@ -7,14 +7,15 @@ import { PublicationPipe } from 'src/app/pipes/publication.pipe';
|
||||
import { PublicationsService } from 'src/app/services/publications.service';
|
||||
import { NewPublicationPage } from '../new-publication/new-publication.page';
|
||||
import { PublicationDetailPage } from './publication-detail/publication-detail.page';
|
||||
import { SqliteService } from 'src/app/services/sqlite.service';
|
||||
import { BackgroundService } from 'src/app/services/background.service';
|
||||
import { ThemeService } from 'src/app/services/theme.service'
|
||||
import { forkJoin } from 'rxjs';
|
||||
import { ToastService } from 'src/app/services/toast.service';
|
||||
import { PermissionService } from 'src/app/services/permission.service';
|
||||
import { HttpErrorHandle } from 'src/app/services/http-error-handle.service';
|
||||
import { Storage } from '@ionic/storage';
|
||||
import { PublicationFolderService } from 'src/app/store/publication-folder.service';
|
||||
|
||||
|
||||
@Component({
|
||||
selector: 'app-view-publications',
|
||||
templateUrl: './view-publications.page.html',
|
||||
@@ -24,8 +25,6 @@ export class ViewPublicationsPage implements OnInit {
|
||||
showLoader = true;
|
||||
loading: any;
|
||||
|
||||
publicationList: {[key: string]: Publication[] } = {};
|
||||
publicationItem: {[key: string]: PublicationFolder } = {};
|
||||
|
||||
defaultImage = "/assets/icon/icon-no-image.svg";
|
||||
folderId: string;
|
||||
@@ -47,7 +46,8 @@ export class ViewPublicationsPage implements OnInit {
|
||||
private toastService: ToastService,
|
||||
public p: PermissionService,
|
||||
private httpErroHandle: HttpErrorHandle,
|
||||
private storage: Storage,) {
|
||||
private storage: Storage,
|
||||
public publicationFolderService: PublicationFolderService,) {
|
||||
|
||||
this.createPublicationList()
|
||||
|
||||
@@ -100,11 +100,11 @@ export class ViewPublicationsPage implements OnInit {
|
||||
|
||||
|
||||
createPublicationList(folderId = this.folderId) {
|
||||
if(!this.publicationList[folderId]) {
|
||||
this.publicationList[folderId] = []
|
||||
if(!this.publicationFolderService.publicationList[folderId]) {
|
||||
this.publicationFolderService.publicationList[folderId] = []
|
||||
}
|
||||
if(!this.publicationItem[folderId]) {
|
||||
this.publicationItem[folderId] = new PublicationFolder();
|
||||
if(!this.publicationFolderService.FolderDetails[folderId]) {
|
||||
this.publicationFolderService.FolderDetails[folderId] = new PublicationFolder();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -133,7 +133,7 @@ export class ViewPublicationsPage implements OnInit {
|
||||
const folderId = this.folderId
|
||||
this.publications.GetPresidentialAction(folderId).subscribe(res =>{
|
||||
|
||||
this.publicationItem[folderId] = res
|
||||
this.publicationFolderService.FolderDetails[folderId] = res
|
||||
this.storage.set(folderId+"name", res)
|
||||
}, (error) => {
|
||||
this.showLoader = false;
|
||||
@@ -143,12 +143,7 @@ export class ViewPublicationsPage implements OnInit {
|
||||
|
||||
getFromDB() {
|
||||
const folderId = this.folderId
|
||||
this.storage.get(folderId).then((viewPublications) => {
|
||||
this.publicationList[folderId] = viewPublications
|
||||
})
|
||||
this.storage.get(folderId+"name").then((viewPublications) => {
|
||||
this.publicationItem[folderId] = viewPublications
|
||||
})
|
||||
this.publicationFolderService.getFromDB(folderId)
|
||||
}
|
||||
|
||||
async getPublicationsIds() {
|
||||
@@ -177,8 +172,8 @@ export class ViewPublicationsPage implements OnInit {
|
||||
|
||||
this.showLoader = false;
|
||||
|
||||
this.storage.set(folderId, this.publicationList[folderId]);
|
||||
this.getpublication = this.publicationList[folderId];
|
||||
this.storage.set(folderId, this.publicationFolderService.publicationList[folderId]);
|
||||
this.getpublication = this.publicationFolderService.publicationList[folderId];
|
||||
} catch(error) {
|
||||
this.showLoader = false;
|
||||
}
|
||||
@@ -186,13 +181,13 @@ export class ViewPublicationsPage implements OnInit {
|
||||
}
|
||||
|
||||
publicationIsPresent(publicationId, folderId) {
|
||||
return this.publicationList[folderId].find( e => e.DocumentId == publicationId )
|
||||
return this.publicationFolderService.publicationList[folderId].find( e => e.DocumentId == publicationId )
|
||||
}
|
||||
publicationFind(publicationId, folderId) {
|
||||
return this.publicationList[folderId].find( e => e.DocumentId == publicationId )
|
||||
return this.publicationFolderService.publicationList[folderId].find( e => e.DocumentId == publicationId )
|
||||
}
|
||||
publicationFindIndex(publicationId, folderId) {
|
||||
return this.publicationList[folderId].findIndex( e => e.DocumentId == publicationId )
|
||||
return this.publicationFolderService.publicationList[folderId].findIndex( e => e.DocumentId == publicationId )
|
||||
}
|
||||
|
||||
async loadPublication(publicationId, folderId) {
|
||||
@@ -202,9 +197,9 @@ export class ViewPublicationsPage implements OnInit {
|
||||
const findIndex = this.publicationFindIndex(publicationId, folderId)
|
||||
const found = this.publicationIsPresent(publicationId, folderId)
|
||||
if(!found) {
|
||||
this.publicationList[folderId].push(publicationDetails)
|
||||
this.publicationFolderService.publicationList[folderId].push(publicationDetails)
|
||||
} else {
|
||||
this.publicationList[folderId][findIndex] = publicationDetails
|
||||
this.publicationFolderService.publicationList[folderId][findIndex] = publicationDetails
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -107,6 +107,11 @@ export class TaskService {
|
||||
if(!isoDateString) {
|
||||
return false
|
||||
}
|
||||
|
||||
const deadline = new Date(isoDateString)
|
||||
const plusOneDeadline = deadline.getDate() + 1
|
||||
deadline.setDate(plusOneDeadline)
|
||||
|
||||
return momentG(new Date(), 'dd MMMM yyyy') == momentG(new Date(isoDateString), 'dd MMMM yyyy')
|
||||
}
|
||||
|
||||
|
||||
@@ -28,7 +28,10 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="picture d-flex pb-5 hide-desktop" *ngIf="publication.FileBase64 && capturedImage ==''">
|
||||
{{ capturedImage }}
|
||||
{{ publication | json }}
|
||||
|
||||
<div class="picture d-flex pb-5 hide-desktop" *ngIf="publication.FileBase64 != 'data:image/jpg;base64,null' ">
|
||||
<div class="post-img">
|
||||
<img src="{{publication.FileBase64}}" alt="image" >
|
||||
</div>
|
||||
@@ -41,9 +44,9 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div *ngIf="capturedImage != ''" class="ion-item-container-no-border">
|
||||
<div *ngIf="capturedImage && capturedImageTitle" class="ion-item-container-no-border">
|
||||
<ion-label class="attached-title">Fotografia Anexada</ion-label>
|
||||
<ion-item lines="none">
|
||||
<ion-item lines="none" *ngIf="capturedImage">
|
||||
<ion-thumbnail slot="start">
|
||||
<ion-img [(ngModel)]="capturedImage" name="image" ngDefaultControl [src]="capturedImage"></ion-img>
|
||||
</ion-thumbnail>
|
||||
|
||||
+18
-10
@@ -8,7 +8,8 @@ import { ThemeService } from 'src/app/services/theme.service'
|
||||
import { ViewMediaPage } from 'src/app/modals/view-media/view-media.page';
|
||||
import { PermissionService } from 'src/app/services/permission.service';
|
||||
import { HttpErrorHandle } from 'src/app/services/http-error-handle.service';
|
||||
|
||||
import { PublicationFolderService } from 'src/app/store/publication-folder.service';
|
||||
import { AskModalPage } from 'src/app/modals/ask-modal/ask-modal.page'
|
||||
@Component({
|
||||
selector: 'app-publication-detail-shared',
|
||||
templateUrl: './publication-detail.page.html',
|
||||
@@ -31,7 +32,9 @@ export class PublicationDetailPage implements OnInit {
|
||||
private toastService: ToastService,
|
||||
public ThemeService: ThemeService,
|
||||
public p:PermissionService,
|
||||
private httpErrorHandle: HttpErrorHandle
|
||||
private httpErrorHandle: HttpErrorHandle,
|
||||
public publicationFolderService: PublicationFolderService,
|
||||
public AskModalPage: AskModalPage
|
||||
) {
|
||||
|
||||
/* this.folderId = this.navParams.get('folderIdId'); */
|
||||
@@ -62,9 +65,9 @@ export class PublicationDetailPage implements OnInit {
|
||||
}, 2000);
|
||||
}
|
||||
|
||||
getPublicationDetail(){
|
||||
getPublicationDetail() {
|
||||
this.showLoader = true;
|
||||
this.publications.GetPublicationById(this.publicationId).subscribe(res=>{
|
||||
this.publications.GetPublicationById(this.publicationId).subscribe(res => {
|
||||
|
||||
this.publication = {
|
||||
DateIndex: res.DateIndex,
|
||||
@@ -78,10 +81,12 @@ export class PublicationDetailPage implements OnInit {
|
||||
FileExtension: 'jpeg',
|
||||
}
|
||||
this.showLoader = false;
|
||||
},(error) => {
|
||||
if(window['_deletePublication']) {
|
||||
window['_deletePublication'](this.folderId, this.publicationId)
|
||||
}, (error) => {
|
||||
|
||||
if(error.status == 404) {
|
||||
this.publicationFolderService.deletePost(this.folderId, this.publicationId)
|
||||
}
|
||||
|
||||
this.goBack();
|
||||
this.httpErrorHandle.httpStatusHandle(error)
|
||||
});
|
||||
@@ -99,9 +104,7 @@ export class PublicationDetailPage implements OnInit {
|
||||
await this.publications.DeletePublication(this.folderId, this.publicationId).toPromise();
|
||||
this.httpErrorHandle.httpsSucessMessagge('Eliminar publicação')
|
||||
|
||||
if(window['_deletePublication']) {
|
||||
window['_deletePublication'](this.folderId, this.publicationId)
|
||||
}
|
||||
this.publicationFolderService.deletePost(this.folderId, this.publicationId)
|
||||
|
||||
if(window['app-view-publications-page-doRefresh']) {
|
||||
window['app-view-publications-page-doRefresh']()
|
||||
@@ -109,6 +112,11 @@ export class PublicationDetailPage implements OnInit {
|
||||
|
||||
this.goBackToViewPublications.emit();
|
||||
} catch (error) {
|
||||
|
||||
if(error.status == 404) {
|
||||
this.publicationFolderService.deletePost(this.folderId, this.publicationId)
|
||||
}
|
||||
|
||||
this.httpErrorHandle.httpStatusHandle(error)
|
||||
} finally {
|
||||
laoder.remove()
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
<ion-header class="ion-no-border">
|
||||
<div class="main-header">
|
||||
<div class="title-content">
|
||||
<div *ngIf="publicationItem[folderId]" class="div-title width-100 flex-grow-1">
|
||||
<div *ngIf="publicationFolderService.FolderDetails[folderId]" class="div-title width-100 flex-grow-1">
|
||||
<div class="title">
|
||||
<ion-label>{{publicationItem[folderId].Description}}</ion-label>
|
||||
<ion-label>{{publicationFolderService.FolderDetails[folderId].Description}}</ion-label>
|
||||
</div>
|
||||
|
||||
<div class="actions-icon">
|
||||
<!-- <ion-icon (click)="AddPublication('1',item.ProcessId)" slot="end" src='assets/images/icons-add-photo.svg'></ion-icon> -->
|
||||
<button *ngIf="p.userPermission([p.permissionList.Actions.editPost])" class="btn-no-color" (click)="openEditPublication(publicationItem[folderId].ProcessId)">
|
||||
<button *ngIf="p.userPermission([p.permissionList.Actions.editPost])" class="btn-no-color" (click)="openEditPublication(publicationFolderService.FolderDetails[folderId].ProcessId)">
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="edit" slot="end" src="assets/images/icons-edit.svg" ></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="edit" slot="end" src="assets/images/theme/gov/icons-edit.svg" ></ion-icon>
|
||||
</button>
|
||||
<button *ngIf="p.userPermission([p.permissionList.Actions.deletePost])" class="btn-no-color" (click)="deletePublication(publicationItem[folderId].ProcessId)">
|
||||
<button *ngIf="p.userPermission([p.permissionList.Actions.deletePost])" class="btn-no-color" (click)="deletePublication(publicationFolderService.FolderDetails[folderId].ProcessId)">
|
||||
<ion-icon class="delete" src='assets/images/theme/gov/icons-delete.svg'></ion-icon>
|
||||
</button>
|
||||
<button class="btn-no-color cursor-pointer" (click)="doRefresh($event)">
|
||||
@@ -20,9 +20,9 @@
|
||||
</button >
|
||||
</div>
|
||||
</div>
|
||||
<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">{{ publicationItem[folderId].DateBegin | date: 'dd-MM-yy HH:mm'}}</p>
|
||||
<div class="div-body width-100" *ngIf="publicationFolderService.FolderDetails[folderId]?.DateBegin != null">
|
||||
<p class="item-content-detail">{{publicationFolderService.FolderDetails[folderId].Detail}}</p>
|
||||
<p class="item-content-date">{{ publicationFolderService.FolderDetails[folderId].DateBegin | date: 'dd-MM-yy HH:mm'}}</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -35,8 +35,8 @@
|
||||
<ion-refresher-content>
|
||||
</ion-refresher-content>
|
||||
</ion-refresher>
|
||||
<div class="main-container px-20" *ngIf="publicationItem[folderId]">
|
||||
<ion-card *ngFor="let publication of publicationList[folderId] let i = index"
|
||||
<div class="main-container px-20" *ngIf="publicationFolderService.FolderDetails[folderId]">
|
||||
<ion-card *ngFor="let publication of publicationFolderService.publicationList[folderId] let i = index"
|
||||
(click)="viewPublicationDetail(publication.DocumentId)">
|
||||
<ion-card-content>
|
||||
<div class="post-img">
|
||||
@@ -57,7 +57,7 @@
|
||||
</ion-card>
|
||||
<!-- <ion-list>
|
||||
<div class="post-item d-md-block mb-10 cursor-pointer"
|
||||
*ngFor="let publication of publicationList"
|
||||
*ngFor="let publication of publicationFolderService.publicationList"
|
||||
(click)="viewPublicationDetail(publication.DocumentId)">
|
||||
<div *ngIf="publication.FileBase64.length > 30" class="mb-10 post-img width-md-100">
|
||||
<img src="{{publication.FileBase64}}" alt="image">
|
||||
@@ -78,14 +78,14 @@
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="center height-100" *ngIf="!publicationList">
|
||||
<div class="center height-100" *ngIf="!publicationFolderService.publicationList">
|
||||
<p>{{error}}</p>
|
||||
</div>
|
||||
</ion-list> -->
|
||||
</div>
|
||||
<!-- fab placed to the bottom end -->
|
||||
<ion-fab *ngIf="p.userPermission([p.permissionList.Actions.create]) && publicationItem[folderId]" vertical="bottom" horizontal="end">
|
||||
<ion-fab-button title="Nova Publicação" (click)="AddPublication('2',publicationItem[folderId].ProcessId)">
|
||||
<ion-fab *ngIf="p.userPermission([p.permissionList.Actions.create]) && publicationFolderService.FolderDetails[folderId]" vertical="bottom" horizontal="end">
|
||||
<ion-fab-button title="Nova Publicação" (click)="AddPublication('2',publicationFolderService.FolderDetails[folderId].ProcessId)">
|
||||
<ion-icon name="add"></ion-icon>
|
||||
</ion-fab-button>
|
||||
</ion-fab>
|
||||
|
||||
@@ -12,7 +12,8 @@ import { EditActionPage } from 'src/app/pages/publications/edit-action/edit-acti
|
||||
import { Storage } from '@ionic/storage';
|
||||
import { PermissionService } from 'src/app/services/permission.service';
|
||||
import { HttpErrorHandle } from 'src/app/services/http-error-handle.service';
|
||||
// import { PublicationDetailsModel } from 'src/app/models/beast-orm';
|
||||
import { PublicationFolderService } from 'src/app/store/publication-folder.service';
|
||||
import { AskModalPage } from 'src/app/modals/ask-modal/ask-modal.page';
|
||||
|
||||
@Component({
|
||||
selector: 'app-view-publications',
|
||||
@@ -23,8 +24,6 @@ export class ViewPublicationsPage implements OnInit {
|
||||
showLoader: boolean;
|
||||
loading: any;
|
||||
|
||||
publicationList: {[key: string]: Publication[] } = {};
|
||||
publicationItem: {[key: string]: PublicationFolder } = {};
|
||||
error: any;
|
||||
oldpublicationIds = []
|
||||
|
||||
@@ -46,10 +45,11 @@ export class ViewPublicationsPage implements OnInit {
|
||||
private toastService: ToastService,
|
||||
private storage: Storage,
|
||||
public p:PermissionService,
|
||||
private httpErrorHandle: HttpErrorHandle
|
||||
private httpErrorHandle: HttpErrorHandle,
|
||||
public publicationFolderService: PublicationFolderService
|
||||
) {
|
||||
this.createPublicationList()
|
||||
}
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
if(typeof(this.folderId) == 'object') {
|
||||
@@ -64,6 +64,7 @@ export class ViewPublicationsPage implements OnInit {
|
||||
}
|
||||
|
||||
this.getFromDB();
|
||||
|
||||
}
|
||||
|
||||
ngOnChanges(changes: any): void {
|
||||
@@ -72,8 +73,8 @@ export class ViewPublicationsPage implements OnInit {
|
||||
this.folderId = this.folderId['ProcessId']
|
||||
}
|
||||
|
||||
if(!this.publicationList[this.folderId]) {
|
||||
this.publicationItem[this.folderId] = new PublicationFolder();
|
||||
if(!this.publicationFolderService.publicationList[this.folderId]) {
|
||||
this.publicationFolderService.FolderDetails[this.folderId] = new PublicationFolder();
|
||||
}
|
||||
|
||||
this.createPublicationList()
|
||||
@@ -88,11 +89,11 @@ export class ViewPublicationsPage implements OnInit {
|
||||
|
||||
|
||||
createPublicationList(folderId = this.folderId) {
|
||||
if(!this.publicationList[this.folderId]) {
|
||||
this.publicationList[this.folderId] = []
|
||||
if(!this.publicationFolderService.publicationList[this.folderId]) {
|
||||
this.publicationFolderService.publicationList[this.folderId] = []
|
||||
}
|
||||
if(!this.publicationItem[this.folderId]) {
|
||||
this.publicationItem[this.folderId] = new PublicationFolder();
|
||||
if(!this.publicationFolderService.FolderDetails[this.folderId]) {
|
||||
this.publicationFolderService.FolderDetails[this.folderId] = new PublicationFolder();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -112,7 +113,7 @@ export class ViewPublicationsPage implements OnInit {
|
||||
this.publications.GetPresidentialAction(folderId).subscribe(res=>{
|
||||
|
||||
// PublicationDetailsModel.create(res)
|
||||
this.publicationItem[folderId] = res
|
||||
this.publicationFolderService.FolderDetails[folderId] = res
|
||||
this.storage.set(folderId+"name", res)
|
||||
}, (error) => {
|
||||
this.showLoader = false;
|
||||
@@ -127,7 +128,6 @@ export class ViewPublicationsPage implements OnInit {
|
||||
|
||||
try {
|
||||
const publicationIds = await this.publications.GetPublicationsList(folderId).toPromise();
|
||||
this.publicationList[folderId] = []
|
||||
|
||||
this.createPublicationList(folderId)
|
||||
let loadLater = []
|
||||
@@ -147,7 +147,7 @@ export class ViewPublicationsPage implements OnInit {
|
||||
|
||||
this.showLoader = false;
|
||||
|
||||
this.storage.set(folderId, this.publicationList[folderId]);
|
||||
this.storage.set(folderId, this.publicationFolderService.publicationList[folderId]);
|
||||
|
||||
this.oldpublicationIds = publicationIds
|
||||
} catch(error) {
|
||||
@@ -158,20 +158,20 @@ export class ViewPublicationsPage implements OnInit {
|
||||
|
||||
_deletePublication = (folderId, publicationId) => {
|
||||
|
||||
this.publicationList[folderId] = this.publicationList[folderId].filter( e => e.DocumentId != publicationId)
|
||||
this.publicationFolderService.publicationList[folderId] = this.publicationFolderService.publicationList[folderId].filter( e => e.DocumentId != publicationId)
|
||||
|
||||
console.log('this.publicationList[folderId]', this.publicationList[folderId].length)
|
||||
console.log('this.publicationFolderService.publicationList[folderId]', this.publicationFolderService.publicationList[folderId].length)
|
||||
|
||||
}
|
||||
|
||||
publicationIsPresent(publicationId, folderId) {
|
||||
return this.publicationList[folderId].find( e => e.DocumentId == publicationId )
|
||||
return this.publicationFolderService.publicationList[folderId].find( e => e.DocumentId == publicationId )
|
||||
}
|
||||
publicationFind(publicationId, folderId) {
|
||||
return this.publicationList[folderId].find( e => e.DocumentId == publicationId )
|
||||
return this.publicationFolderService.publicationList[folderId].find( e => e.DocumentId == publicationId )
|
||||
}
|
||||
publicationFindIndex(publicationId, folderId) {
|
||||
return this.publicationList[folderId].findIndex( e => e.DocumentId == publicationId )
|
||||
return this.publicationFolderService.publicationList[folderId].findIndex( e => e.DocumentId == publicationId )
|
||||
}
|
||||
|
||||
async loadPublication(publicationId, folderId) {
|
||||
@@ -181,52 +181,20 @@ export class ViewPublicationsPage implements OnInit {
|
||||
const findIndex = this.publicationFindIndex(publicationId, folderId)
|
||||
const found = this.publicationIsPresent(publicationId, folderId)
|
||||
if(!found) {
|
||||
this.publicationList[folderId].push(publicationDetails)
|
||||
this.publicationFolderService.publicationList[folderId].push(publicationDetails)
|
||||
// PublicationModel.create(publicationDetails)
|
||||
} else {
|
||||
this.publicationList[folderId][findIndex] = publicationDetails
|
||||
this.publicationFolderService.publicationList[folderId][findIndex] = publicationDetails
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
getFromDB() {
|
||||
const folderId = this.folderId
|
||||
this.storage.get(folderId).then((viewPublications) => {
|
||||
this.publicationList[folderId] = viewPublications
|
||||
})
|
||||
this.storage.get(folderId+"name").then((viewPublications) => {
|
||||
this.publicationItem[folderId] = viewPublications
|
||||
})
|
||||
|
||||
this.publicationFolderService.getFromDB(folderId)
|
||||
}
|
||||
|
||||
// getPublications() {
|
||||
// this.showLoader = true;
|
||||
// const folderId = this.folderId
|
||||
// this.publicationList = new Array();
|
||||
// this.publications.GetPublications(folderId).subscribe(async res=> {
|
||||
|
||||
// res.forEach(element => {
|
||||
// let item: Publication = this.publicationPipe.itemList(element)
|
||||
// this.publicationList.push(item);
|
||||
// });
|
||||
|
||||
// this.showLoader = false;
|
||||
// await this.storage.remove(folderId);
|
||||
// await this.storage.set(folderId, this.publicationList);
|
||||
// //this.getFromDB();
|
||||
|
||||
// },
|
||||
// (error)=>{
|
||||
// if(error.status == '404') {
|
||||
// this.error = 'Sem publicações disponíveis!';
|
||||
// this.publicationList= [];
|
||||
// }
|
||||
|
||||
// this.showLoader = false;
|
||||
|
||||
// })
|
||||
|
||||
// }
|
||||
|
||||
async AddPublication(publicationType:any, folderId:any) {
|
||||
|
||||
@@ -278,41 +246,40 @@ export class ViewPublicationsPage implements OnInit {
|
||||
}
|
||||
|
||||
async deletePublication(folderId?:any) {
|
||||
const loader = this.toastService.loading();
|
||||
try {
|
||||
await this.publications.DeletePresidentialAction(folderId).toPromise();
|
||||
this.httpErrorHandle.httpsSucessMessagge('Eliminar Acção')
|
||||
} catch (error) {
|
||||
this.httpErrorHandle.httpStatusHandle(error)
|
||||
}
|
||||
finally {
|
||||
loader.remove()
|
||||
}
|
||||
this.close();
|
||||
this.getActions.emit();
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
component: AskModalPage,
|
||||
cssClass: 'discart-expedient-modal',
|
||||
backdropDismiss: true,
|
||||
componentProps: {
|
||||
title: 'Deseja arquivar este acção?',
|
||||
description: 'Nota: Ao Efetuar esta operação, o tratamento deste acção não poderá ser realizado a partir da lista de acções'
|
||||
},
|
||||
});
|
||||
|
||||
modal.onDidDismiss().then((res) => {
|
||||
if(res.data == 'Yes') {
|
||||
const loader = this.toastService.loading();
|
||||
try {
|
||||
this.publications.DeletePresidentialAction(folderId).toPromise();
|
||||
this.httpErrorHandle.httpsSucessMessagge('Eliminar Acção')
|
||||
} catch (error) {
|
||||
this.httpErrorHandle.httpStatusHandle(error)
|
||||
}
|
||||
finally {
|
||||
loader.remove()
|
||||
}
|
||||
this.close();
|
||||
this.getActions.emit();
|
||||
}
|
||||
// Do nothing
|
||||
});
|
||||
await modal.present();
|
||||
|
||||
}
|
||||
|
||||
async viewPublicationDetail(publicationId:string) {
|
||||
|
||||
|
||||
// if( window.innerWidth <= 1024) {
|
||||
// const modal = await this.modalController.create({
|
||||
// component: PublicationDetailPage,
|
||||
// componentProps:{
|
||||
// publicationId: publicationId,
|
||||
// },
|
||||
// cssClass: 'publication-detail modal modal-desktop',
|
||||
// //backdropDismiss: false
|
||||
// });
|
||||
// await modal.present();
|
||||
// modal.onDidDismiss().then(()=>{
|
||||
// this.doRefresh(event);
|
||||
// });
|
||||
// } else {
|
||||
// // open publication details
|
||||
// this.openPublicationDetails.emit(publicationId);
|
||||
// }
|
||||
|
||||
this.openPublicationDetails.emit(publicationId);
|
||||
|
||||
}
|
||||
|
||||
@@ -11,6 +11,8 @@ export class PublicationFolderService {
|
||||
publicationList: {[key: string]: Publication[] } = {};
|
||||
FolderDetails: {[key: string]: PublicationFolder } = {};
|
||||
|
||||
restoreFolder: {} = {}
|
||||
|
||||
keyName: string
|
||||
|
||||
constructor(
|
||||
@@ -18,21 +20,29 @@ export class PublicationFolderService {
|
||||
) {}
|
||||
|
||||
|
||||
getFromDB(folderId: any) {
|
||||
|
||||
createPublicationList(folderId) {
|
||||
if(!this.publicationList[folderId]) {
|
||||
this.publicationList[folderId] = []
|
||||
}
|
||||
if(!this.FolderDetails[folderId]) {
|
||||
this.FolderDetails[folderId] = new PublicationFolder();
|
||||
}
|
||||
}
|
||||
|
||||
this.storage.get(folderId).then((viewPublications) => {
|
||||
this.publicationList[folderId] = viewPublications
|
||||
})
|
||||
this.storage.get(folderId+"name").then((viewPublications) => {
|
||||
this.FolderDetails[folderId] = viewPublications
|
||||
})
|
||||
getFromDB(folderId: any) {
|
||||
|
||||
if(!this.restoreFolder[folderId]) {
|
||||
|
||||
this.storage.get(folderId).then((viewPublications) => {
|
||||
this.publicationList[folderId] = viewPublications
|
||||
})
|
||||
|
||||
this.storage.get(folderId+"name").then((viewPublications) => {
|
||||
this.FolderDetails[folderId] = viewPublications
|
||||
})
|
||||
}
|
||||
|
||||
this.restoreFolder[folderId] = true
|
||||
}
|
||||
|
||||
updateFolderDetails(folderId, res) {
|
||||
@@ -68,15 +78,16 @@ export class PublicationFolderService {
|
||||
}
|
||||
}
|
||||
|
||||
deletePost(publicationId: any, folderId) {
|
||||
|
||||
for (let i = 0; i <= this.publicationList[folderId].length; i++) {
|
||||
if(this.publicationList[folderId][i].DocumentId == publicationId) {
|
||||
this.publicationList[folderId].splice(i, 1)
|
||||
}
|
||||
}
|
||||
deletePost(folderId: any, publicationId: any) {
|
||||
|
||||
if(this.publicationList[folderId]) {
|
||||
|
||||
this.publicationList[folderId] = this.publicationList[folderId].filter( e => e.DocumentId != publicationId)
|
||||
|
||||
this.save(folderId)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
export let versionData = {
|
||||
"shortSHA": "8b3989de3",
|
||||
"SHA": "8b3989de3beea56ec3168c107af73145f41aba8b",
|
||||
"shortSHA": "19ddb1814",
|
||||
"SHA": "19ddb18148a87d4cb7cd755d8c05190a2b0031e9",
|
||||
"branch": "developer-bug",
|
||||
"lastCommitAuthor": "'Peter Maquiran'",
|
||||
"lastCommitTime": "'Wed Aug 9 10:00:39 2023 +0100'",
|
||||
"lastCommitTime": "'Thu Aug 10 16:46:55 2023 +0100'",
|
||||
"lastCommitMessage": "fix",
|
||||
"lastCommitNumber": "5144",
|
||||
"change": "",
|
||||
"changeStatus": "On branch developer-bug\nChanges to be committed:\n (use \"git restore --staged <file>...\" to unstage)\n\tmodified: angular.json\n\tdeleted: firebase-messaging-sw.js\n\tmodified: src/app/home/home.page.ts\n\tmodified: src/app/models/beast-orm.ts\n\tmodified: src/app/pages/chat/messages/messages.page.scss\n\tmodified: src/app/pages/events/events.page.html\n\tmodified: src/app/pages/events/events.page.ts\n\tmodified: src/app/pages/gabinete-digital/gabinete-digital.page.html\n\tmodified: src/app/pages/gabinete-digital/gabinete-digital.page.ts\n\tmodified: src/app/pages/login/login.page.ts\n\tmodified: src/app/pages/publications/edit-action/edit-action.page.scss\n\tmodified: src/app/services/chat/message.service.ts\n\tmodified: src/app/services/notifications.service.ts\n\tmodified: src/app/services/task.service.ts\n\tmodified: src/app/shared/agenda/edit-event/edit-event.page.ts\n\tmodified: src/app/shared/chat/group-messages/group-messages.page.ts\n\tmodified: src/app/shared/event/attendee-modal/attendee-modal.page.ts\n\tmodified: src/app/shared/gabinete-digital/all-processes/all-processes.page.html\n\tmodified: src/app/shared/gabinete-digital/all-processes/all-processes.page.ts\n\tmodified: src/app/shared/gabinete-digital/despachos/despachos.page.ts\n\tmodified: src/app/shared/publication/edit-action/edit-action.page.scss\n\tmodified: src/app/shared/publication/view-publications/publication-detail/publication-detail.page.ts\n\tmodified: src/app/shared/publication/view-publications/view-publications.page.ts\n\tnew file: src/app/store/publication-folder.service.spec.ts\n\tnew file: src/app/store/publication-folder.service.ts\n\tmodified: src/combined-sw.js\n\tmodified: src/plugin/src/models/model.d.ts\n\tmodified: src/plugin/src/models/model.js\n\tmodified: src/plugin/src/models/model.reader.d.ts\n\tmodified: src/plugin/src/models/register-model.d.ts\n\tmodified: src/plugin/src/models/register-model.js\n\tmodified: src/plugin/src/tsconfig.tsbuildinfo",
|
||||
"lastCommitNumber": "5145",
|
||||
"change": "diff --git a/src/app/pages/chat/group-messages/group-contacts/group-contacts.page.html b/src/app/pages/chat/group-messages/group-contacts/group-contacts.page.html\nindex 18ad65e3a..d0f7f1af9 100644\n--- a/src/app/pages/chat/group-messages/group-contacts/group-contacts.page.html\n+++ b/src/app/pages/chat/group-messages/group-contacts/group-contacts.page.html\n@@ -47,7 +47,7 @@\n </ion-list>\n </div>\n \n- <ion-virtual-scroll [items]=\"users | filter:textSearch: 'name'\" approxItemHeight=\"70px\" [headerFn]=\"separateLetter\">\n+ <ion-virtual-scroll [items]=\"users\" approxItemHeight=\"70px\" [headerFn]=\"separateLetter\">\n \n <div class=\"item-divider\" *virtualHeader=\"let header\">\n <ion-label>{{header}}</ion-label>\ndiff --git a/src/app/pages/chat/group-messages/group-contacts/group-contacts.page.ts b/src/app/pages/chat/group-messages/group-contacts/group-contacts.page.ts\nindex 373b5c612..a53da800b 100644\n--- a/src/app/pages/chat/group-messages/group-contacts/group-contacts.page.ts\n+++ b/src/app/pages/chat/group-messages/group-contacts/group-contacts.page.ts\n@@ -66,7 +66,7 @@ export class GroupContactsPage implements OnInit {\n headers: this.headers,\n };\n this.chatService.getAllUsers().subscribe((res:any)=>{\n- if(this.members){\n+ if(this.members) {\n this.contacts = res.users.filter(f => !this.members.some(item => item._id === f._id));\n }\n else{\n@@ -149,6 +149,18 @@ export class GroupContactsPage implements OnInit {\n \n onChange(event){\n this.textSearch = event.detail.value;\n+\n+ this.users = this.contacts.filter( e => e.name.toLowerCase().includes(this.textSearch.toLowerCase())).sort((a,b) => {\n+ if(a.name < b.name){\n+ return -1;\n+ }\n+ if(a.name > b.name){\n+ return 1;\n+ }\n+ return 0;\n+ });\n+ \n+\n }\n clicked(){\n \ndiff --git a/src/app/shared/chat/group-messages/group-contacts/group-contacts.page.html b/src/app/shared/chat/group-messages/group-contacts/group-contacts.page.html\nindex d582861b3..6e820fa0b 100644\n--- a/src/app/shared/chat/group-messages/group-contacts/group-contacts.page.html\n+++ b/src/app/shared/chat/group-messages/group-contacts/group-contacts.page.html\n@@ -49,7 +49,7 @@\n </ion-list>\n </div>\n \n- <ion-virtual-scroll [items]=\"ChatSystemService.users | filter:textSearch: 'name'\" approxItemHeight=\"70px\" [headerFn]=\"separateLetter\">\n+ <ion-virtual-scroll [items]=\"users \" approxItemHeight=\"70px\" [headerFn]=\"separateLetter\">\n \n <div class=\"item-divider\" *virtualHeader=\"let header\">\n <ion-label>{{header}}</ion-label>\ndiff --git a/src/app/shared/chat/group-messages/group-contacts/group-contacts.page.ts b/src/app/shared/chat/group-messages/group-contacts/group-contacts.page.ts\nindex 436b4eccf..77e4c4d77 100644\n--- a/src/app/shared/chat/group-messages/group-contacts/group-contacts.page.ts\n+++ b/src/app/shared/chat/group-messages/group-contacts/group-contacts.page.ts\n@@ -237,6 +237,18 @@ export class GroupContactsPage implements OnInit {\n \n onChange(event){\n this.textSearch = event.detail.value;\n+\n+ this.users = this.contacts.filter( e => e.name.toLowerCase().includes(this.textSearch.toLowerCase())).sort((a,b) => {\n+ if(a.name < b.name){\n+ return -1;\n+ }\n+ if(a.name > b.name){\n+ return 1;\n+ }\n+ return 0;\n+ });\n+\n+ \n }\n \n clicked(){\ndiff --git a/src/app/shared/popover/chat-popover/chat-popover.page.ts b/src/app/shared/popover/chat-popover/chat-popover.page.ts\nindex 3a0f85821..72362b081 100644\n--- a/src/app/shared/popover/chat-popover/chat-popover.page.ts\n+++ b/src/app/shared/popover/chat-popover/chat-popover.page.ts\n@@ -116,12 +116,12 @@ export class ChatPopoverPage implements OnInit {\n \n if(this.room.t === 'p') {\n this.chatService.deleteGroup(body).subscribe(res=>{\n- // this.ChatSystemService.deleteRoom(this.roomId)\n+ this.ChatSystemService.deleteRoom(this.roomId)\n });\n }\n else {\n this.chatService.deleteChannel(body).subscribe(res=>{\n- // this.ChatSystemService.deleteRoom(this.roomId)\n+ this.ChatSystemService.deleteRoom(this.roomId)\n });\n }\n });",
|
||||
"changeStatus": "On branch developer-bug\nChanges to be committed:\n (use \"git restore --staged <file>...\" to unstage)\n\tmodified: src/app/app-routing.module.ts\n\tnew file: src/app/modals/ask-modal/ask-modal-routing.module.ts\n\tnew file: src/app/modals/ask-modal/ask-modal.module.ts\n\tnew file: src/app/modals/ask-modal/ask-modal.page.html\n\tnew file: src/app/modals/ask-modal/ask-modal.page.scss\n\tnew file: src/app/modals/ask-modal/ask-modal.page.spec.ts\n\tnew file: src/app/modals/ask-modal/ask-modal.page.ts\n\tmodified: src/app/modals/eliminate-event/eliminate-event.page.ts\n\tmodified: src/app/modals/profile/edit-profile/edit-profile.page.html\n\tmodified: src/app/modals/profile/profile.page.html\n\tmodified: src/app/pages/agenda/agenda.page.html\n\tmodified: src/app/pages/agenda/agenda.page.scss\n\tmodified: src/app/pages/agenda/agenda.page.ts\n\tmodified: src/app/pages/gabinete-digital/gabinete-digital.page.html\n\tmodified: src/app/pages/publications/publications.page.ts\n\tmodified: src/app/pages/publications/view-publications/publication-detail/publication-detail.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/services/task.service.ts\n\tmodified: src/app/shared/publication/new-publication/new-publication.page.html\n\tmodified: src/app/shared/publication/view-publications/publication-detail/publication-detail.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\n\tmodified: src/app/store/publication-folder.service.ts\n\nChanges not staged for commit:\n (use \"git add <file>...\" to update what will be committed)\n (use \"git restore <file>...\" to discard changes in working directory)\n\tmodified: src/app/pages/chat/group-messages/group-contacts/group-contacts.page.html\n\tmodified: src/app/pages/chat/group-messages/group-contacts/group-contacts.page.ts\n\tmodified: src/app/shared/chat/group-messages/group-contacts/group-contacts.page.html\n\tmodified: src/app/shared/chat/group-messages/group-contacts/group-contacts.page.ts\n\tmodified: src/app/shared/popover/chat-popover/chat-popover.page.ts",
|
||||
"changeAuthor": "peter.maquiran"
|
||||
}
|
||||
Reference in New Issue
Block a user