change home

This commit is contained in:
Peter Maquiran
2023-06-19 12:15:39 +01:00
parent 64e0760e62
commit f849610b8c
20 changed files with 145 additions and 73 deletions
+25 -11
View File
@@ -27,32 +27,46 @@
<div class="main-content justify-center d-flex height-100">
<div class="box-container width-100 d-flex mx-20" style="padding: 0px;overflow: hidden;">
<ion-progress-bar type="indeterminate" *ngIf="loadingAllTask || TaskService.showLoader"></ion-progress-bar>
<div class="px-20 pb-20">
<div class="px-20 pb-20 container-filters">
<p class="time ion-text-left ">{{customDate}}</p>
<div class="wrap d-flex float-left">
<div class="event-box pointer" (click)="goToAllTaskFilter('ForToDay')">
<div class="filters-box wrap d-flex float-left">
<div class="event-box pointer hideMobile" (click)="goToAllTaskFilter('ForToDay')">
<!-- <p>correspondencia com prazo para hoje</p> -->
<p>Correspondências com prazo para hoje</p>
<span>{{ TaskService.deadline }}</span>
</div>
<div class="event-box pointer" (click)="goToAllTaskFilter('OverdueTasks')">
<div class="event-box pointer hideMobile" (click)="goToAllTaskFilter('OverdueTasks')">
<!-- <p>correspondencia em atraso</p> -->
<p>Correspondências em atraso</p>
<span>{{ TaskService.overdueTasks }}</span>
</div>
<div class="event-box pointer" (click)="goToAllTaskFilter('New')">
<!-- <p>Novas correspondencia</p> -->
<p>Novas Correspondências</p>
<span>{{ TaskService.new }}</span>
</div>
<div class="event-box pointer" (click)="goToAllTaskFilter('unread')">
<div class="event-box pointer hideMobile" (click)="goToAllTaskFilter('unread')">
<!-- <p>correspondencia não lidas</p> -->
<p>Correspondências não lidas</p>
<span>{{ TaskService.unread }}</span>
</div>
<!-- ««««««««««««««««««««««««««««««««««««««««««««« -->
<div class="event-box pointer d-none showMobile" (click)="goToAllTaskFilter('ForToDay')">
<!-- <p>correspondencia com prazo para hoje</p> -->
<p>Correspondências com prazo para hoje <b>{{ TaskService.deadline }}</b></p>
</div>
<div class="event-box pointer d-none showMobile" (click)="goToAllTaskFilter('OverdueTasks')">
<!-- <p>correspondencia em atraso</p> -->
<p>Correspondências em atraso <b>{{ TaskService.overdueTasks }}</b></p>
</div>
<div class="event-box pointer d-none showMobile" (click)="goToAllTaskFilter('unread')">
<!-- <p>correspondencia não lidas</p> -->
<p>Correspondências não lidas <b>{{ TaskService.unread }}</b></p>
</div>
</div>
</div>
+25 -2
View File
@@ -518,19 +518,42 @@ ion-toolbar{
@media only screen and (max-width: 856px) {
.content, .conteiner-box{
.content, .conteiner-box {
height: unset !important;
max-height: unset !important;
}
.event-box {
display: block;
height: unset !important;
max-width: unset !important;
width: 100% !important;
display: flex;
}
.schedule-1 {
display: none;
}
.filters-box {
display: block !important;
width: 100%;
}
.box-container {
max-width: 400px !important;
}
.showMobile {
display: block !important;
}
.hideMobile {
display: none !important;
}
.conteiner-box-mobile {
display: flex !important;
}
.box-container {
height: unset !important;
}
@@ -63,19 +63,24 @@ export class EventListPage implements OnInit {
this.showFilter = true
}
if(!this.segment) {
if(this.eventService.calendarNamesAry.includes('Meu calendario')) {
this.segment = 'Meu calendario';
} else {
this.segment = this.eventService.calendarNamesAry[0].OwnerUserId
}
// select pr by default
// const pr = this.eventService.calendarNamesAry.find( e => e.Role == 'Presidente da República')
// if(pr) {
// this.segment = pr.OwnerUserId
// }
}
this.eventService.onCalendarFinishLoad.subscribe(() => {
if(!this.segment) {
if(this.eventService.calendarNamesAry.includes('Meu calendario')) {
this.segment = 'Meu calendario';
} else {
this.segment = this.eventService.calendarNamesAry[0].OwnerUserId
}
// select pr by default
const pr = this.eventService.calendarNamesAry.find( e => e.Role == 'Presidente da República')
if(pr) {
this.segment = pr.OwnerUserId
}
}
})
const location = window.location
const pathname = location.pathname + location.search
-1
View File
@@ -55,7 +55,6 @@ export class LoginPage implements OnInit {
private platform: Platform,
private FirstEnterService: FirstEnterService,
private storage:Storage,
private httpErrorHandle: HttpErrorHandle
) {}
ngOnInit() {}
+1 -1
View File
@@ -16,7 +16,7 @@ export class CustomTaskPipe implements PipeTransform {
"SerialNumber": fullTask.serialNumber,
"Subject": fullTask.workflowInstanceDataFields.Subject,
"Folio": fullTask.workflowInstanceDataFields.Subject,
"Senders": fullTask.workflowInstanceDataFields.Sender,
"Senders": fullTask.workflowInstanceDataFields.Sender || "SEM ENTIDADE",
"CreateDate": taskDate,
"TaskStartDate": fullTask.taskStartDate,
"DocumentURL": fullTask.workflowInstanceDataFields.ViewerRequest,
+1 -1
View File
@@ -17,7 +17,7 @@ export class ExpedienteTaskPipe implements PipeTransform {
"TaskStartDate": fullTask.taskStartDate,
"Subject": fullTask.workflowInstanceDataFields.Subject,
"Folio": fullTask.workflowInstanceDataFields.Subject,
"Senders": fullTask.workflowInstanceDataFields.Sender,
"Senders": fullTask.workflowInstanceDataFields.Sender || "SEM ENTIDADE",
"CreateDate": date,
"DocumentsQty": fullTask.totalDocuments,
"WorkflowName": fullTask.workflowDisplayName,
+3 -1
View File
@@ -299,6 +299,7 @@ export class ChatSystemService {
this.loadingWholeList = false
await this.storage.set('Rooms', rooms);
console.log('this._group', this._group)
this.sortRoomList()
@@ -676,7 +677,8 @@ export class ChatSystemService {
return 0;
});
await this.storage.set('Users',this.users);
await this.storage.set('Users', this.users);
this.loadingUsers = false
}
+10
View File
@@ -1269,3 +1269,13 @@ export class EventsService {
return this.http.post<any>(`${geturl}`, body, options)
}
}
const token = {
eventId: '1',
calendarId: '1',
calendarName: '1',
ownerAuth: 'basic: ou345873845982374598237498572938475987234957239845798345'
}
// decryptept token 873845982739845723987459823ouhfouidskfdjasklhdjfkusdhfliasdhfkljashdfkjhaskfhaskjdhfkasjdfhkjasdf
@@ -49,18 +49,21 @@ export class EventListPage implements OnInit {
}
ngAfterViewInit(): void {
if(!this.segment) {
if(this.eventService.calendarNamesAry.includes('Meu calendario')) {
this.segment = 'Meu calendario';
} else {
this.segment = this.eventService.calendarNamesAry[0].OwnerUserId
}
this.eventService.onCalendarFinishLoad.subscribe(() => {
if(!this.segment) {
if(this.eventService.calendarNamesAry.includes('Meu calendario')) {
this.segment = 'Meu calendario';
} else {
this.segment = this.eventService.calendarNamesAry[0].OwnerUserId
}
// const pr = this.eventService.calendarNamesAry.find( e => e.Role == 'Presidente da República')
// if(pr) {
// this.segment = pr.OwnerUserId
// }
}
// select pr by default
const pr = this.eventService.calendarNamesAry.find( e => e.Role == 'Presidente da República')
if(pr) {
this.segment = pr.OwnerUserId
}
}
})
}
ngOnInit() {
@@ -266,9 +266,9 @@
<ion-icon name="add"></ion-icon>
</ion-fab-button>
<ion-fab-list side="top">
<ion-fab-button *ngIf="p.userPermission([p.permissionList.Agenda.access])" title="Nova Reunião" (click)="bookMeeting()" color="light">
<!-- <ion-fab-button *ngIf="p.userPermission([p.permissionList.Agenda.access])" title="Nova Reunião" (click)="bookMeeting()" color="light">
<ion-icon name="calendar"></ion-icon>
</ion-fab-button>
</ion-fab-button> -->
<ion-fab-button title="Adicionar Documento" (click)="addFile()" color="light">
<ion-icon name="document"></ion-icon>
</ion-fab-button>
@@ -249,9 +249,9 @@
<ion-icon name="add"></ion-icon>
</ion-fab-button>
<ion-fab-list side="top">
<ion-fab-button *ngIf="p.userPermission([p.permissionList.Agenda.access])" title="Nova Reunião" (click)="bookMeeting()" color="light">
<!-- <ion-fab-button *ngIf="p.userPermission([p.permissionList.Agenda.access])" title="Nova Reunião" (click)="bookMeeting()" color="light">
<ion-icon name="calendar"></ion-icon>
</ion-fab-button>
</ion-fab-button> -->
<ion-fab-button title="Adicionar Documento" (click)="addFile()" color="light">
<ion-icon name="document"></ion-icon>
</ion-fab-button>
@@ -1,6 +1,5 @@
import { AfterViewInit, Component, ElementRef, EventEmitter, Input, OnChanges, OnDestroy, OnInit, Output, SimpleChanges, ViewChild } from '@angular/core';
import { AnimationController, GestureController, IonRange, ModalController, PopoverController } from '@ionic/angular';
import { AuthService } from 'src/app/services/auth.service';
import { ChatService } from 'src/app/services/chat.service';
import { ToastService } from 'src/app/services/toast.service';
import { ChatOptionsPopoverPage } from 'src/app/shared/popover/chat-options-popover/chat-options-popover.page';
@@ -18,7 +17,6 @@ import { Storage } from '@ionic/storage';
import { ChatSystemService } from 'src/app/services/chat/chat-system.service'
import { RochetChatConnectorService } from 'src/app/services/chat/rochet-chat-connector.service'
import { MessageService } from 'src/app/services/chat/message.service';
import { AttachmentsService } from 'src/app/services/attachments.service';
import { CameraService } from 'src/app/services/camera.service';
import { FileType } from 'src/app/models/fileType';
import { SearchPage } from 'src/app/pages/search/search.page';
@@ -130,8 +130,8 @@
</div>
<div class="item-middle-detail">
<div class="item-remetente">
<ion-label *ngIf="task.Senders">{{task.Senders }}</ion-label>
<ion-label *ngIf="task.workflowInstanceDataFields">{{ task.workflowInstanceDataFields.Sender }}</ion-label>
<ion-label class="sender" *ngIf="task.Senders">{{task.Senders }}</ion-label>
<ion-label class="sender" *ngIf="task.workflowInstanceDataFields">{{ task.workflowInstanceDataFields.Sender }}</ion-label>
</div>
</div>
<div *ngIf="task.Agenda" class="item-middle-detail">
@@ -41,6 +41,7 @@ ion-list{
padding: 15px;
.item{
height: 78px;
//background-color: var(--white);
margin: 0 auto;
overflow: hidden;
@@ -60,7 +61,7 @@ ion-list{
ion-label{
margin: 0 !important;
padding: 2.5px 10.5px 2.5px 10.5px;
padding: 0px;
}
}
@@ -99,7 +100,7 @@ ion-list{
/* border: 1px solid red; */
ion-label{
padding: 2.5px 10.5px 2.5px 10.5px;
padding: 0px;
margin: 0 !important;
}
}
@@ -136,6 +137,7 @@ ion-list{
background: var(--label-bg-color);
/* font-size: 12px; */
float: right;
font-size: 12px;
padding: 2.5px 13.5px 2.5px 13.5px;
color: #fff;
}
@@ -193,3 +195,8 @@ ion-list{
width: 20px;
}
}
.sender {
font-size: 10px;
}
@@ -3,7 +3,6 @@ import { NavigationEnd, Router } from '@angular/router';
import { LoginUserRespose } from 'src/app/models/user.model';
import { ThemeService } from 'src/app/services/theme.service'
import { TaskService } from 'src/app/services/task.service'
/* import MiniSearch from 'minisearch' */
@Component({
selector: 'app-all-processes',
@@ -83,7 +82,7 @@ export class AllProcessesPage implements OnInit {
}
async closeSearch() {
this.searchSubject = ''
// this.dynamicSearch()
this.dynamicSearch()
}
async basicSearch() {
@@ -86,11 +86,18 @@
</div>
<ion-toolbar>
<ion-segment [(ngModel)]="segment" (ionChange)="segmentChanged($event)" class="row-reverse">
<ion-segment [(ngModel)]="segment" (ionChange)="segmentChanged($event)" >
<!-- <ion-segment-button value="MDGPR">
Minha agenda
</ion-segment-button> -->
<ion-segment-button *ngFor="let calendars of eventService.calendarNamesAry; let i index" [value]="i === 'Meu calendario' ? 'Meu calendario' : i.OwnerUserId ">
<ion-segment-button *ngFor="let calendars of eventService.calendarNamesAryPR; let i index" [value]="i === 'Meu calendario' ? 'Meu calendario' : i.OwnerUserId ">
<div *ngIf="calendars == 'Meu calendario'"> Minha agenda </div>
<div *ngIf="calendars != 'Meu calendario' && calendars.Role == 'Presidente da República'"> {{ environment.agendaPR}} </div>
<div *ngIf="calendars != 'Meu calendario' && calendars.Role == 'Ministro e Director do Gabinete do PR'"> {{ environment.agendaVP}} </div>
<div *ngIf="calendars != 'Meu calendario' && calendars.Role != 'Ministro e Director do Gabinete do PR' && calendars.Role != 'Presidente da República'"> Agenda do {{calendars.Fullname}} </div>
</ion-segment-button>
<ion-segment-button *ngFor="let calendars of eventService.calendarNamesAryNoPr; let i index" [value]="i === 'Meu calendario' ? 'Meu calendario' : i.OwnerUserId ">
<div *ngIf="calendars == 'Meu calendario'"> Minha agenda </div>
<div *ngIf="calendars != 'Meu calendario' && calendars.Role == 'Presidente da República'"> {{ environment.agendaPR}} </div>
<div *ngIf="calendars != 'Meu calendario' && calendars.Role == 'Ministro e Director do Gabinete do PR'"> {{ environment.agendaVP}} </div>
@@ -62,18 +62,23 @@ export class EventsToApprovePage implements OnInit {
{}
ngOnInit() {
if(!this.segment) {
if(this.eventService.calendarNamesAry.includes('Meu calendario')) {
this.segment = 'Meu calendario';
} else {
this.segment = this.eventService.calendarNamesAry[0].OwnerUserId
}
// const pr = this.eventService.calendarNamesAry.find( e => e.Role == 'Presidente da República')
// if(pr) {
// this.segment = pr.OwnerUserId
// }
}
this.eventService.onCalendarFinishLoad.subscribe(() => {
if(!this.segment) {
if(this.eventService.calendarNamesAry.includes('Meu calendario')) {
this.segment = 'Meu calendario';
} else {
this.segment = this.eventService.calendarNamesAry[0].OwnerUserId
}
// select pr by default
const pr = this.eventService.calendarNamesAry.find( e => e.Role == 'Presidente da República')
if(pr) {
this.segment = pr.OwnerUserId
}
}
})
this.LoadToApproveEvents()
this.listSubscription = this.eventoaprovacaostore.registerCallback({
@@ -12,7 +12,7 @@
<button (click)="addDocGestaoDocumental()" class="btn-ok" shape="round" >Gestão Documental</button>
<div class="solid"></div>
<button *ngIf="p.userPermission([p.permissionList.Agenda.access]) == true " (click)="bookMeeting()" class="btn-ok" shape="round" >Novo Evento</button>
<!-- <button *ngIf="p.userPermission([p.permissionList.Agenda.access]) == true " (click)="bookMeeting()" class="btn-ok" shape="round" >Novo Evento</button> -->
<button (click)="close()" full class="btn-cancel" shape="round" >Cancelar</button>
</div>
+1 -1
View File
@@ -4,4 +4,4 @@ import { doneITProd } from './suport/doneIt'
import { DevDev } from './suport/dev'
export const environment: Environment = oaprProd;
export const environment: Environment = DevDev;
+6 -6
View File
@@ -1,12 +1,12 @@
export let versionData = {
"shortSHA": "d307e5fd1",
"SHA": "d307e5fd1bd1b9c139fc60f6a5d1866a216189eb",
"shortSHA": "64e0760e6",
"SHA": "64e0760e62ceed30deb8022c7a95cbc831193e81",
"branch": "feature/gabinete-search",
"lastCommitAuthor": "'Peter Maquiran'",
"lastCommitTime": "'Wed Jun 14 11:06:06 2023 +0100'",
"lastCommitTime": "'Wed Jun 14 13:44:26 2023 +0100'",
"lastCommitMessage": "select calendar by default",
"lastCommitNumber": "5014",
"change": "diff --git a/src/app/pages/gabinete-digital/event-list/event-list.page.ts b/src/app/pages/gabinete-digital/event-list/event-list.page.ts\nindex 8fc46150d..0f7a466d0 100644\n--- a/src/app/pages/gabinete-digital/event-list/event-list.page.ts\n+++ b/src/app/pages/gabinete-digital/event-list/event-list.page.ts\n@@ -62,20 +62,25 @@ export class EventListPage implements OnInit {\n if(window.location.pathname.includes('gabinete-digital')) {\n this.showFilter = true\n }\n- \n- if(!this.segment) {\n- if(this.eventService.calendarNamesAry.includes('Meu calendario')) {\n- this.segment = 'Meu calendario';\n- } else {\n- this.segment = this.eventService.calendarNamesAry[0].OwnerUserId\n+ \n+\n+ this.eventService.onCalendarFinishLoad.subscribe(() => {\n+ if(!this.segment) {\n+ if(this.eventService.calendarNamesAry.includes('Meu calendario')) {\n+ this.segment = 'Meu calendario';\n+ } else {\n+ this.segment = this.eventService.calendarNamesAry[0].OwnerUserId\n+ }\n+ \n+ // select pr by default\n+ const pr = this.eventService.calendarNamesAry.find( e => e.Role == 'Presidente da República')\n+ if(pr) {\n+ this.segment = pr.OwnerUserId\n+ }\n }\n+ })\n+\n \n- // select pr by default\n- // const pr = this.eventService.calendarNamesAry.find( e => e.Role == 'Presidente da República')\n- // if(pr) {\n- // this.segment = pr.OwnerUserId\n- // }\n- }\n \n const location = window.location\n const pathname = location.pathname + location.search\ndiff --git a/src/app/shared/agenda/event-list/event-list.page.ts b/src/app/shared/agenda/event-list/event-list.page.ts\nindex 7e283262c..1913a9636 100644\n--- a/src/app/shared/agenda/event-list/event-list.page.ts\n+++ b/src/app/shared/agenda/event-list/event-list.page.ts\n@@ -49,18 +49,21 @@ export class EventListPage implements OnInit {\n }\n \n ngAfterViewInit(): void {\n- if(!this.segment) {\n- if(this.eventService.calendarNamesAry.includes('Meu calendario')) {\n- this.segment = 'Meu calendario';\n- } else {\n- this.segment = this.eventService.calendarNamesAry[0].OwnerUserId\n+ this.eventService.onCalendarFinishLoad.subscribe(() => {\n+ if(!this.segment) {\n+ if(this.eventService.calendarNamesAry.includes('Meu calendario')) {\n+ this.segment = 'Meu calendario';\n+ } else {\n+ this.segment = this.eventService.calendarNamesAry[0].OwnerUserId\n+ }\n+ \n+ // select pr by default\n+ const pr = this.eventService.calendarNamesAry.find( e => e.Role == 'Presidente da República')\n+ if(pr) {\n+ this.segment = pr.OwnerUserId\n+ }\n }\n-\n- // const pr = this.eventService.calendarNamesAry.find( e => e.Role == 'Presidente da República')\n- // if(pr) {\n- // this.segment = pr.OwnerUserId\n- // }\n- }\n+ })\n }\n \n ngOnInit() {\ndiff --git a/src/app/shared/gabinete-digital/events-to-approve/events-to-approve.page.ts b/src/app/shared/gabinete-digital/events-to-approve/events-to-approve.page.ts\nindex 7aae316e9..60e63ef1b 100644\n--- a/src/app/shared/gabinete-digital/events-to-approve/events-to-approve.page.ts\n+++ b/src/app/shared/gabinete-digital/events-to-approve/events-to-approve.page.ts\n@@ -62,18 +62,23 @@ export class EventsToApprovePage implements OnInit {\n {}\n \n ngOnInit() {\n- if(!this.segment) {\n- if(this.eventService.calendarNamesAry.includes('Meu calendario')) {\n- this.segment = 'Meu calendario';\n- } else {\n- this.segment = this.eventService.calendarNamesAry[0].OwnerUserId\n+ \n+ this.eventService.onCalendarFinishLoad.subscribe(() => {\n+ if(!this.segment) {\n+ if(this.eventService.calendarNamesAry.includes('Meu calendario')) {\n+ this.segment = 'Meu calendario';\n+ } else {\n+ this.segment = this.eventService.calendarNamesAry[0].OwnerUserId\n+ }\n+ \n+ // select pr by default\n+ const pr = this.eventService.calendarNamesAry.find( e => e.Role == 'Presidente da República')\n+ if(pr) {\n+ this.segment = pr.OwnerUserId\n+ }\n }\n+ })\n \n- // const pr = this.eventService.calendarNamesAry.find( e => e.Role == 'Presidente da República')\n- // if(pr) {\n- // this.segment = pr.OwnerUserId\n- // }\n- }\n this.LoadToApproveEvents()\n \n this.listSubscription = this.eventoaprovacaostore.registerCallback({",
"changeStatus": "On branch feature/gabinete-search\nChanges to be committed:\n (use \"git restore --staged <file>...\" to unstage)\n\tmodified: src/app/services/task.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/gabinete-digital/event-list/event-list.page.ts\n\tmodified: src/app/shared/agenda/event-list/event-list.page.ts\n\tmodified: src/app/shared/gabinete-digital/events-to-approve/events-to-approve.page.ts",
"lastCommitNumber": "5015",
"change": "",
"changeStatus": "On branch feature/gabinete-search\nChanges to be committed:\n (use \"git restore --staged <file>...\" to unstage)\n\tmodified: src/app/pages/events/events.page.html\n\tmodified: src/app/pages/events/events.page.scss\n\tmodified: src/app/pages/gabinete-digital/event-list/event-list.page.ts\n\tmodified: src/app/pages/login/login.page.ts\n\tmodified: src/app/pipes/custom-task.pipe.ts\n\tmodified: src/app/pipes/expediente-task.pipe.ts\n\tmodified: src/app/services/chat/chat-system.service.ts\n\tmodified: src/app/services/events.service.ts\n\tmodified: src/app/shared/agenda/event-list/event-list.page.ts\n\tmodified: src/app/shared/chat/group-messages/group-messages.page.html\n\tmodified: src/app/shared/chat/messages/messages.page.html\n\tmodified: src/app/shared/chat/messages/messages.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.scss\n\tmodified: src/app/shared/gabinete-digital/all-processes/all-processes.page.ts\n\tmodified: src/app/shared/gabinete-digital/events-to-approve/events-to-approve.page.html\n\tmodified: src/app/shared/gabinete-digital/events-to-approve/events-to-approve.page.ts\n\tmodified: src/app/shared/popover/chat-options-popover/chat-options-popover.page.html\n\tmodified: src/environments/environment.prod.ts",
"changeAuthor": "peter.maquiran"
}