This commit is contained in:
Evandre Da Silva
2022-07-04 19:50:56 +01:00
18 changed files with 213 additions and 212 deletions
@@ -16,8 +16,5 @@
"sound"
]
}
},
"server": {
"url": "http://192.168.0.60:8100"
}
}
+1 -1
View File
@@ -18,7 +18,7 @@ export class LoginGuard implements CanActivate {
canActivate(
route: ActivatedRouteSnapshot,
state: RouterStateSnapshot): Observable<boolean | UrlTree> | Promise<boolean | UrlTree> | boolean | UrlTree {
if(SessionStore.exist && SessionStore.user.Inactivity && SessionStore.user.LoginPreference != 'Pin' ) {
this.router.navigate(['/home/events']);
return false
@@ -46,7 +46,6 @@ export class ViewDocumentPage implements OnInit {
this.processes.GetViewer(this.docId, this.applicationId).subscribe(res=> {
const link: string = res;
console.log(res,' link!!!')
this.trustedUrl = this.sanitazer.bypassSecurityTrustResourceUrl(link);
}, ()=>{
this.close();
+1 -1
View File
@@ -76,7 +76,7 @@ export class UserSession {
UserName: string
Password: string
RochetChatUserId: string
Profile: 'PR' | 'MDGPR' | 'Consultant' | 'Department boss' | 'Assistant' | 'Director' | 'Deputy Director' | 'Secretariat' | 'Deputy Director' | 'General secretary' ;
Profile: 'PR' | 'MDGPR' | 'Consultant' | 'Department boss' | 'Assistant' | 'Director' | 'Deputy Director' | 'Secretariat' | 'Deputy Director' | 'General secretary' | 'Administrador';
LoginPreference: 'None' | 'Password' | 'Pin' | null;
PIN: string
Inactivity: boolean
+3 -3
View File
@@ -293,7 +293,7 @@
</div>
</div>
<div class="fs-timeline flex-grow-1 d-none d-md-block d-md-block text-black pr-20 width-100 height-100 overflow-y-auto" *ngIf="eventService.calendarIds.length >= 2">
<div class="fs-timeline flex-grow-1 d-none d-md-block d-md-block text-black pr-20 width-100 height-100 overflow-y-auto" *ngIf="loggeduser.OwnerCalendars.length">
<div *ngFor="let events of TimelineMDList | keyvalue;" >
<div class="EventListBox-container" >
@@ -333,8 +333,8 @@
</div>
</div>
<div class="sd-timeline flex-grow-1 d-none d-md-block timeline-md text-black pl-20 pr-20 width-100 height-100 overflow-y-auto" >
<div class="sd-timeline flex-grow-1 d-none d-md-block timeline-md text-black pl-20 pr-20 width-100 height-100 overflow-y-auto" *ngIf="loggeduser.SharedCalendars.length != 0" >
<div *ngFor="let events of TimelinePRList | keyvalue;">
<div class="EventListBox-container" >
+6 -2
View File
@@ -212,7 +212,7 @@ export class AgendaPage implements OnInit {
} else if (this.loggeduser.Profile == 'PR') {
this.profile = "pr";
} else {
if(this.eventService.calendarIds.length >= 2) {
if(this.eventService.usersCalendarIds.length >= 2) {
this.profile = "mdgpr";
} else if (this.eventService.hasOwnCalendar) {
this.profile = "mdgpr";
@@ -804,6 +804,8 @@ export class AgendaPage implements OnInit {
this.addEventToDB(response, "md");
let eventsList = response;
console.log('response', response);
this.CalendarStore.removeRange(startTime, endTime, 'md')
@@ -813,7 +815,9 @@ export class AgendaPage implements OnInit {
this.listToPresent = this.CalendarStore.eventSource
this.TimelineMDList = this.listBoxService.list(this.listToPresent, 'md', this.rangeStartDate, this.rangeEndDate, { segment: this.segment, selectedDate: this.eventSelectedDate })
console.log('this.TimelineMDList', this.TimelineMDList);
this.myCal.update();
this.myCal.loadEvents();
+2 -2
View File
@@ -224,8 +224,8 @@
</app-group-contacts>
<app-group-messages
*ngIf="showGroupMessages"
[style.display]="showEmptyComponent ? 'flex' : 'none'"
*ngIf="showGroupMessages && wsChatMethodsService.deleteRecently(roomId) == false"
[style.display]="showEmptyComponent ? 'flex' : 'none'"
(closeAllDesktopComponents)="closeAllDesktopComponents()"
(showEmptyContainer)="showEmptyContainer()"
(openGroupContacts)="openGroupContactsPage($event)"
-10
View File
@@ -129,16 +129,6 @@ export class ChatPage implements OnInit {
ngOnInit() {
/* let data = {
status: "success",
data: {
userId: "CqYSKR5hrAumZihs7",
authToken: "bvh5BH98Av5ShMnEW94Cwm1Hf-yHEHbl121ijq5Odc_sdvs"
}
}
SessionStore.user.ChatData = data
SessionStore.save() */
// console.log(SessionStore.user.ChatData.data.authToken)
this.chatService.refreshtoken();
this.segment = "Contactos";
+7 -33
View File
@@ -1,8 +1,5 @@
<ion-header class="ion-no-border">
<ion-toolbar class="header-toolbar">
<!-- <div #rectangle class="rectangle" (press)="handlePress()">
Double click me to change the color
</div> -->
<div class="main-header">
<div class="header-top">
<div class="left">
@@ -46,8 +43,8 @@
<ion-content>
<div (click)="handleClick()" class="messages" #scrollMe>
<ion-list>
<div class="messages-list-item-wrapper container-width-100"
<div class="messages-list-item-wrapper container-width-100"
*ngFor="let msg of wsChatMethodsService.getDmRoom(this.roomId).messages; let last = last"
[class.messages-list-item-wrapper-active]="msg._id == selectedMsgId">
<div (press)="handlePress(msg._id)" class='message-container incoming-{{msg.u.username!=sessionStore.user.UserName}}'
@@ -114,7 +111,7 @@
</ion-item>
</div>
<div *ngIf="msg.attachments[0].image_url">
<div *ngIf="msg.attachments[0].image_url">
<span *ngIf="msg.file.type">
<fa-icon *ngIf="msg.file.type == 'application/pdf'" icon="file-pdf" class="pdf-icon"></fa-icon>
<fa-icon *ngIf="msg.file.type == 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'" icon="file-word" class="word-icon"></fa-icon>
@@ -127,8 +124,8 @@
</ion-icon>
</span>
<ion-label class="file-title">{{file.title}}</ion-label>
</div>
<!-- <ion-progress-bar [type]="'indeterminate'" *ngIf="downloadLoader"></ion-progress-bar> -->
</div>
<!-- <ion-progress-bar [type]="'indeterminate'" *ngIf="downloadLoader"></ion-progress-bar> -->
</div>
</div>
<div (click)="audioPreview(msg)" class="audio-contentainer" *ngIf="msg.file.type == 'application/audio' && !file.title_link">
@@ -147,7 +144,7 @@
<ion-label *ngIf="msg.file && msg.file != ''">
<span *ngIf="file.description">{{file.description}}</span>
<span *ngIf="file.description && msg.file.type != 'application/webtrix'"></span>
</ion-label>
<ion-label class="float-status-all float-status" *ngIf="msg.u.username==sessionStore.user.UserName">
@@ -204,7 +201,7 @@
Apagou a mensagem
</div>
</div>
</ion-list>
</div>
<ion-fab horizontal="end" vertical="bottom" slot="fixed">
<ion-fab-button *ngIf="scrollToBottomBtn" (click)="scrollToBottomClicked()" color="light" size="small">
@@ -214,29 +211,6 @@
</ion-content>
<!-- <ion-footer>
<ion-toolbar>
<ion-row align-items-center class="row">
<ion-col size="1">
<ion-label class="ion-no-padding" lines="none">
<ion-icon (click)="openChatOptions()" class="chat-icon-options" src="assets/icon/icons-chat-options.svg"></ion-icon>
</ion-label>
</ion-col>
<ion-col size="9">
<ion-item class="ion-no-padding type-message" lines="none">
<ion-textarea clearOnEdit="true" placeholder="Escrever uma mensagem" auto-grow class="message-input" rows="1" [(ngModel)]="message"></ion-textarea>
<ion-icon slot="end" src="assets/icon/icons-chat-mic.svg"></ion-icon>
</ion-item>
</ion-col>
<ion-col size="2">
<ion-label>
<ion-icon (click)="sendMessage()" class="chat-icon-send" src="assets/icon/icons-chat-send.svg"></ion-icon>
</ion-label>
</ion-col>
</ion-row>
</ion-toolbar>
</ion-footer> -->
<ion-footer >
@@ -30,12 +30,14 @@
</ion-segment-button>
</ion-segment>
</div>
</div>
</div>
<div [ngSwitch]="segmentVista" class="overflow-y-auto">
<!-- This is the list view -->
<div *ngSwitchCase="'listview'">
<ion-item-sliding *ngIf="loadCount">
<div class="listview" >
<ion-list *ngIf="AllProcess">
@@ -96,41 +98,45 @@
<ion-item-sliding *ngIf="!loadCount" class="width-100">
<ion-item lines="none"
class="item-skeleton width-100 d-flex ion-no-border ion-no-margin ion-no-padding">
<div class="item-content flex-grow-1 cursor-pointer">
<p class="item-content-date my-5"><ion-skeleton-text animated style="width: 90%"></ion-skeleton-text></p>
<p class="item-content-title my-10"><ion-skeleton-text animated style="width: 50%"></ion-skeleton-text></p>
<p class="item-content-detail my-5"><ion-skeleton-text animated style="width: 100%"></ion-skeleton-text></p>
</div>
</ion-item>
<ion-item lines="none"
class="item-skeleton width-100 d-flex ion-no-border ion-no-margin ion-no-padding">
<div class="item-content flex-grow-1 cursor-pointer">
<p class="item-content-date my-5"><ion-skeleton-text animated style="width: 90%"></ion-skeleton-text></p>
<p class="item-content-title my-10"><ion-skeleton-text animated style="width: 50%"></ion-skeleton-text></p>
<p class="item-content-detail my-5"><ion-skeleton-text animated style="width: 100%"></ion-skeleton-text></p>
</div>
</ion-item>
<ion-item lines="none"
class="item-skeleton width-100 d-flex ion-no-border ion-no-margin ion-no-padding">
<div class="item-content flex-grow-1 cursor-pointer">
<p class="item-content-date my-5"><ion-skeleton-text animated style="width: 90%"></ion-skeleton-text></p>
<p class="item-content-title my-10"><ion-skeleton-text animated style="width: 50%"></ion-skeleton-text></p>
<p class="item-content-detail my-5"><ion-skeleton-text animated style="width: 100%"></ion-skeleton-text></p>
</div>
</ion-item>
<ion-item lines="none"
class="item-skeleton width-100 d-flex ion-no-border ion-no-margin ion-no-padding">
<div class="item-content flex-grow-1 cursor-pointer">
<p class="item-content-date my-5"><ion-skeleton-text animated style="width: 90%"></ion-skeleton-text></p>
<p class="item-content-title my-10"><ion-skeleton-text animated style="width: 50%"></ion-skeleton-text></p>
<p class="item-content-detail my-5"><ion-skeleton-text animated style="width: 100%"></ion-skeleton-text></p>
</div>
</ion-item>
class="item-skeleton width-100 d-flex ion-no-border ion-no-margin ion-no-padding">
<div class="item-content flex-grow-1 cursor-pointer">
<div class="my-2"><div style="width: 90%; background-color: #eeeeee; height: 10px;"></div></div>
<div class="my-2"><div style="width: 50%; background-color: #eeeeee; height: 10px;"></div></div>
<div class="my-2"><div style="width: 100%; background-color: #eeeeee; height: 10px;"></div></div>
</div>
</ion-item>
<ion-item lines="none"
class="item-skeleton width-100 d-flex ion-no-border ion-no-margin ion-no-padding">
<div class="item-content flex-grow-1 cursor-pointer">
<div class="my-2"><div style="width: 90%; background-color: #eeeeee; height: 10px;"></div></div>
<div class="my-2"><div style="width: 50%; background-color: #eeeeee; height: 10px;"></div></div>
<div class="my-2"><div style="width: 100%; background-color: #eeeeee; height: 10px;"></div></div>
</div>
</ion-item>
<ion-item lines="none"
class="item-skeleton width-100 d-flex ion-no-border ion-no-margin ion-no-padding">
<div class="item-content flex-grow-1 cursor-pointer">
<div class="my-2"><div style="width: 90%; background-color: #eeeeee; height: 10px;"></div></div>
<div class="my-2"><div style="width: 50%; background-color: #eeeeee; height: 10px;"></div></div>
<div class="my-2"><div style="width: 100%; background-color: #eeeeee; height: 10px;"></div></div>
</div>
</ion-item>
<ion-item lines="none"
class="item-skeleton width-100 d-flex ion-no-border ion-no-margin ion-no-padding">
<div class="item-content flex-grow-1 cursor-pointer">
<div class="my-2"><div style="width: 90%; background-color: #eeeeee; height: 10px;"></div></div>
<div class="my-2"><div style="width: 50%; background-color: #eeeeee; height: 10px;"></div></div>
<div class="my-2"><div style="width: 100%; background-color: #eeeeee; height: 10px;"></div></div>
</div>
</ion-item>
</ion-item-sliding>
</div>
@@ -280,79 +286,87 @@
<ion-item-sliding class="width-100">
<ion-item lines="none"
class="item-skeleton width-100 d-flex ion-no-border ion-no-margin ion-no-padding">
<div class="item-content flex-grow-1 cursor-pointer">
<p class="item-content-date my-5"><ion-skeleton-text animated style="width: 90%"></ion-skeleton-text></p>
<p class="item-content-title my-10"><ion-skeleton-text animated style="width: 50%"></ion-skeleton-text></p>
<p class="item-content-detail my-5"><ion-skeleton-text animated style="width: 100%"></ion-skeleton-text></p>
</div>
</ion-item>
<ion-item lines="none"
class="item-skeleton width-100 d-flex ion-no-border ion-no-margin ion-no-padding">
<div class="item-content flex-grow-1 cursor-pointer">
<p class="item-content-date my-5"><ion-skeleton-text animated style="width: 90%"></ion-skeleton-text></p>
<p class="item-content-title my-10"><ion-skeleton-text animated style="width: 50%"></ion-skeleton-text></p>
<p class="item-content-detail my-5"><ion-skeleton-text animated style="width: 100%"></ion-skeleton-text></p>
</div>
</ion-item>
<ion-item lines="none"
class="item-skeleton width-100 d-flex ion-no-border ion-no-margin ion-no-padding">
<div class="item-content flex-grow-1 cursor-pointer">
<p class="item-content-date my-5"><ion-skeleton-text animated style="width: 90%"></ion-skeleton-text></p>
<p class="item-content-title my-10"><ion-skeleton-text animated style="width: 50%"></ion-skeleton-text></p>
<p class="item-content-detail my-5"><ion-skeleton-text animated style="width: 100%"></ion-skeleton-text></p>
</div>
</ion-item>
<ion-item lines="none"
class="item-skeleton width-100 d-flex ion-no-border ion-no-margin ion-no-padding">
<div class="item-content flex-grow-1 cursor-pointer">
<p class="item-content-date my-5"><ion-skeleton-text animated style="width: 90%"></ion-skeleton-text></p>
<p class="item-content-title my-10"><ion-skeleton-text animated style="width: 50%"></ion-skeleton-text></p>
<p class="item-content-detail my-5"><ion-skeleton-text animated style="width: 100%"></ion-skeleton-text></p>
</div>
</ion-item>
class="item-skeleton width-100 d-flex ion-no-border ion-no-margin ion-no-padding">
<div class="item-content flex-grow-1 cursor-pointer">
<div class="my-2"><div style="width: 90%; background-color: #eeeeee; height: 10px;"></div></div>
<div class="my-2"><div style="width: 50%; background-color: #eeeeee; height: 10px;"></div></div>
<div class="my-2"><div style="width: 100%; background-color: #eeeeee; height: 10px;"></div></div>
</div>
</ion-item>
<ion-item lines="none"
class="item-skeleton width-100 d-flex ion-no-border ion-no-margin ion-no-padding">
<div class="item-content flex-grow-1 cursor-pointer">
<div class="my-2"><div style="width: 90%; background-color: #eeeeee; height: 10px;"></div></div>
<div class="my-2"><div style="width: 50%; background-color: #eeeeee; height: 10px;"></div></div>
<div class="my-2"><div style="width: 100%; background-color: #eeeeee; height: 10px;"></div></div>
</div>
</ion-item>
<ion-item lines="none"
class="item-skeleton width-100 d-flex ion-no-border ion-no-margin ion-no-padding">
<div class="item-content flex-grow-1 cursor-pointer">
<div class="my-2"><div style="width: 90%; background-color: #eeeeee; height: 10px;"></div></div>
<div class="my-2"><div style="width: 50%; background-color: #eeeeee; height: 10px;"></div></div>
<div class="my-2"><div style="width: 100%; background-color: #eeeeee; height: 10px;"></div></div>
</div>
</ion-item>
<ion-item lines="none"
class="item-skeleton width-100 d-flex ion-no-border ion-no-margin ion-no-padding">
<div class="item-content flex-grow-1 cursor-pointer">
<div class="my-2"><div style="width: 90%; background-color: #eeeeee; height: 10px;"></div></div>
<div class="my-2"><div style="width: 50%; background-color: #eeeeee; height: 10px;"></div></div>
<div class="my-2"><div style="width: 100%; background-color: #eeeeee; height: 10px;"></div></div>
</div>
</ion-item>
</ion-item-sliding>
<ion-item-sliding class="width-100">
<ion-item lines="none"
class="item-skeleton width-100 d-flex ion-no-border ion-no-margin ion-no-padding">
<div class="item-content flex-grow-1 cursor-pointer">
<p class="item-content-date my-5"><ion-skeleton-text animated style="width: 90%"></ion-skeleton-text></p>
<p class="item-content-title my-10"><ion-skeleton-text animated style="width: 50%"></ion-skeleton-text></p>
<p class="item-content-detail my-5"><ion-skeleton-text animated style="width: 100%"></ion-skeleton-text></p>
</div>
</ion-item>
<ion-item lines="none"
class="item-skeleton width-100 d-flex ion-no-border ion-no-margin ion-no-padding">
<div class="item-content flex-grow-1 cursor-pointer">
<p class="item-content-date my-5"><ion-skeleton-text animated style="width: 90%"></ion-skeleton-text></p>
<p class="item-content-title my-10"><ion-skeleton-text animated style="width: 50%"></ion-skeleton-text></p>
<p class="item-content-detail my-5"><ion-skeleton-text animated style="width: 100%"></ion-skeleton-text></p>
</div>
</ion-item>
<ion-item lines="none"
class="item-skeleton width-100 d-flex ion-no-border ion-no-margin ion-no-padding">
<div class="item-content flex-grow-1 cursor-pointer">
<p class="item-content-date my-5"><ion-skeleton-text animated style="width: 90%"></ion-skeleton-text></p>
<p class="item-content-title my-10"><ion-skeleton-text animated style="width: 50%"></ion-skeleton-text></p>
<p class="item-content-detail my-5"><ion-skeleton-text animated style="width: 100%"></ion-skeleton-text></p>
</div>
</ion-item>
<ion-item lines="none"
class="item-skeleton width-100 d-flex ion-no-border ion-no-margin ion-no-padding">
<div class="item-content flex-grow-1 cursor-pointer">
<p class="item-content-date my-5"><ion-skeleton-text animated style="width: 90%"></ion-skeleton-text></p>
<p class="item-content-title my-10"><ion-skeleton-text animated style="width: 50%"></ion-skeleton-text></p>
<p class="item-content-detail my-5"><ion-skeleton-text animated style="width: 100%"></ion-skeleton-text></p>
</div>
</ion-item>
class="item-skeleton width-100 d-flex ion-no-border ion-no-margin ion-no-padding">
<div class="item-content flex-grow-1 cursor-pointer">
<div class="my-2"><div style="width: 90%; background-color: #eeeeee; height: 10px;"></div></div>
<div class="my-2"><div style="width: 50%; background-color: #eeeeee; height: 10px;"></div></div>
<div class="my-2"><div style="width: 100%; background-color: #eeeeee; height: 10px;"></div></div>
</div>
</ion-item>
<ion-item lines="none"
class="item-skeleton width-100 d-flex ion-no-border ion-no-margin ion-no-padding">
<div class="item-content flex-grow-1 cursor-pointer">
<div class="my-2"><div style="width: 90%; background-color: #eeeeee; height: 10px;"></div></div>
<div class="my-2"><div style="width: 50%; background-color: #eeeeee; height: 10px;"></div></div>
<div class="my-2"><div style="width: 100%; background-color: #eeeeee; height: 10px;"></div></div>
</div>
</ion-item>
<ion-item lines="none"
class="item-skeleton width-100 d-flex ion-no-border ion-no-margin ion-no-padding">
<div class="item-content flex-grow-1 cursor-pointer">
<div class="my-2"><div style="width: 90%; background-color: #eeeeee; height: 10px;"></div></div>
<div class="my-2"><div style="width: 50%; background-color: #eeeeee; height: 10px;"></div></div>
<div class="my-2"><div style="width: 100%; background-color: #eeeeee; height: 10px;"></div></div>
</div>
</ion-item>
<ion-item lines="none"
class="item-skeleton width-100 d-flex ion-no-border ion-no-margin ion-no-padding">
<div class="item-content flex-grow-1 cursor-pointer">
<div class="my-2"><div style="width: 90%; background-color: #eeeeee; height: 10px;"></div></div>
<div class="my-2"><div style="width: 50%; background-color: #eeeeee; height: 10px;"></div></div>
<div class="my-2"><div style="width: 100%; background-color: #eeeeee; height: 10px;"></div></div>
</div>
</ion-item>
</ion-item-sliding>
</div>
@@ -159,9 +159,9 @@ export class GabineteDigitalPage implements OnInit {
else {
this.segmentVista = "boxview";
}
};
this.checkRoutes();
}
this.checkRoutes();
}
closeAllDesktopComponent() {
this.desktopComponent = {
@@ -208,8 +208,6 @@ export class GabineteDigitalPage implements OnInit {
this.backgroundservice.registerBackService('Online', () => {
this.loadAllProcesses();
});
}
async loadAllProcesses() {
@@ -257,7 +255,6 @@ export class GabineteDigitalPage implements OnInit {
allprocess.forEach(element => {
let date = new Date(element.taskStartDate);
date.setMonth(date.getMonth() + 1);
let taskDate = date.getFullYear() + "-" + date.getMonth() + "-" + date.getDate() + " " + date.getHours() + ":" + date.getMinutes() + ":" + date.getSeconds();
let task = {
"SerialNumber": element.serialNumber,
+2
View File
@@ -44,3 +44,5 @@
</div>
</ion-content>
+2
View File
@@ -125,6 +125,8 @@ export class AuthService {
}
else if(session.RoleID == 99999886) {
session.Profile = 'General secretary'
} else if (session.RoleID == 100000015) {
session.Profile = 'Administrador'
}
session.Password = user.password
@@ -42,6 +42,8 @@ export class WsChatMethodsService {
sessionStore = SessionStore
loggedUser: any;
delete = []
constructor(
private WsChatService: WsChatService,
@@ -68,7 +70,7 @@ export class WsChatMethodsService {
this.WsChatService.registerCallback({
type: 'reConnect',
funx: ()=>{
funx: () => {
/**
* @description when the phone is in the background for a long time it could disconnects from the socket then the socket reconnects automatically,
* when the connection is lost the subscribe is also lost, so we have to subscribe again when reconnection is establish.
@@ -363,10 +365,16 @@ export class WsChatMethodsService {
deleteRoom(roomId) {
this.delete.push(roomId)
delete this.group[roomId];
this._group = this._group.filter((e)=> e.id != roomId);
}
deleteRecently(roomId) {
return this.delete.includes(roomId)
}
roomExist(roomId) {
return this.dm[roomId]?.id || this.group[roomId]?.id
}
+44 -33
View File
@@ -42,6 +42,8 @@ export class EventsService {
calendarIds = []
usersCalendarIds = []
hasSharedOficial: boolean = false;
hasSharedPessoal: boolean = false;
hasOwnOficial: boolean = false;
@@ -122,7 +124,7 @@ export class EventsService {
this.userCalendarNameOwnOficial = '';
this.userCalendarNameOwnPessoal = '';
this.calendarIds = [];
this.usersCalendarIds = [];
this.calendarNames = {}
this.calendarNamesAry = []
@@ -200,9 +202,14 @@ export class EventsService {
this.loggeduser.OwnerCalendars.forEach(calendar => {
if(!this.calendarIds.includes(calendar.OwnerUserId)) {
this.calendarIds.push(calendar.OwnerUserId)
if(!this.usersCalendarIds.includes(calendar.OwnerUserId)) {
this.usersCalendarIds.push(calendar.OwnerUserId)
}
if(!this.calendarIds.includes(calendar.CalendarId)) {
this.calendarIds.push(calendar.CalendarId)
}
this.hasOwnCalendar = true
if (calendar.CalendarName == 'Oficial') {
@@ -225,12 +232,15 @@ export class EventsService {
}
});
for (let sharedCalendar of this.loggeduser.SharedCalendars) {
if(!this.calendarIds.includes(sharedCalendar.OwnerUserId)) {
this.calendarIds.push(sharedCalendar.OwnerUserId)
if(!this.usersCalendarIds.includes(sharedCalendar.OwnerUserId)) {
this.usersCalendarIds.push(sharedCalendar.OwnerUserId)
}
if(!this.calendarIds.includes(sharedCalendar.CalendarId)) {
this.calendarIds.push(sharedCalendar.CalendarId)
}
this.hasSharedCalendar = true
@@ -252,38 +262,39 @@ export class EventsService {
this.headerSharedPessoal = this.headerSharedPessoal.set('CalendarRoleId', sharedCalendar.CalendarRoleId);
this.headerSharedPessoal = this.headerSharedPessoal.set('CalendarName', sharedCalendar.CalendarName);
}
}
for (let sharedCalendar of this.loggeduser.SharedCalendars) {
if(sharedCalendar?.OwnerUserId) {
this.GetCalendarName(sharedCalendar.OwnerUserId).subscribe((e)=> {
this.calendarNames[sharedCalendar.CalendarId] = e.FullName
this.myCalendarNames[sharedCalendar.CalendarId] = e.FullName
if(!this.calendarNamesAry.includes(e.FullName)) {
this.calendarNamesAry.push(e.FullName)
this.calendarNamesType[e.FullName] = {}
}
for (let sharedCalendar of this.loggeduser.SharedCalendars) {
if(sharedCalendar?.OwnerUserId) {
this.GetCalendarName(sharedCalendar.OwnerUserId).subscribe((e)=> {
this.calendarNames[sharedCalendar.CalendarId] = e.FullName
this.myCalendarNames[sharedCalendar.CalendarId] = e.FullName
this.calendarNamesType[e.FullName][sharedCalendar.CalendarName] = true
this.calendarNamesType[e.FullName][sharedCalendar.CalendarName+'Id'] = sharedCalendar.CalendarId
})
}
if(!this.calendarNamesAry.includes(e.FullName)) {
this.calendarNamesAry.push(e.FullName)
this.calendarNamesType[e.FullName] = {}
}
this.calendarNamesType[e.FullName][sharedCalendar.CalendarName] = true
this.calendarNamesType[e.FullName][sharedCalendar.CalendarName+'Id'] = sharedCalendar.CalendarId
})
}
}
for (let sharedCalendar of this.loggeduser.OwnerCalendars) {
this.calendarNames[sharedCalendar.CalendarId] = 'Meu calendario'
if(!this.calendarNamesAry.includes('Meu calendario')) {
this.calendarNamesAry.push('Meu calendario')
this.calendarNamesType['Meu calendario'] = {}
}
for (let sharedCalendar of this.loggeduser.OwnerCalendars) {
this.calendarNames[sharedCalendar.CalendarId] = 'Meu calendario'
if(!this.calendarNamesAry.includes('Meu calendario')) {
this.calendarNamesAry.push('Meu calendario')
this.calendarNamesType['Meu calendario'] = {}
}
this.calendarNamesType['Meu calendario'][sharedCalendar.CalendarName] = true
this.calendarNamesType['Meu calendario'][sharedCalendar.CalendarName+'Id'] = sharedCalendar.CalendarId
}
this.calendarNamesType['Meu calendario'][sharedCalendar.CalendarName] = true
this.calendarNamesType['Meu calendario'][sharedCalendar.CalendarName+'Id'] = sharedCalendar.CalendarId
}
}
}
@@ -165,7 +165,7 @@ export class NewEventPage implements OnInit {
this.eventBody = { BodyType : "1", Text : ""};
this.postEvent.Body = this.eventBody;
if(this.selectedSegment != "Combinada"){
if(this.selectedSegment != "Combinada") {
this.postEvent ={
EventId: '',
Subject: '',
@@ -188,7 +188,7 @@ export class NewEventPage implements OnInit {
};
}
else{
this.postEvent ={
this.postEvent = {
EventId: '',
Subject: '',
Body: this.eventBody,
@@ -207,11 +207,11 @@ export class NewEventPage implements OnInit {
Category: 'Reunião',
HasAttachments: false,
EventRecurrence: {Type:'-1',LastOccurrence:this.autoEndTime},
};
}
}
if(this.postEvent.Attendees != null) {
this.postEvent.Attendees.forEach(e =>{
this.postEvent.Attendees.forEach(e => {
if(e.IsRequired) {
this.taskParticipants.push(e);
} else {
@@ -65,9 +65,12 @@ export class ViewEventPage implements OnInit {
this.loadedEvent = new Event();
this.eventBody = { BodyType : "1", Text : ""};
this.loadedEvent.Body = this.eventBody;
}
ngOnInit() {
this.loadEvent();
}
@@ -35,7 +35,7 @@ export class PendentesPage implements OnInit {
private storage: Storage
) {
this.loggeduser = authService.ValidatedUser;
}
}
ngOnInit() {
@@ -80,13 +80,13 @@ export class PendentesPage implements OnInit {
}
})
}
}
getFromDb() {
this.storage.get('pendente-list').then((pendentes) => {
this.listToPresent =pendentes
})
}
getFromDb() {
this.storage.get('pendente-list').then((pendentes) => {
this.listToPresent =pendentes
})
}
doRefresh() {
setTimeout(()=>{