mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
Merge branch 'consoleCle' of bitbucket.org:equilibriumito/gabinete-digital-fo into develop_bitOut-fix
This commit is contained in:
@@ -16,6 +16,7 @@ export class AgendaPermission{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
get access () {
|
get access () {
|
||||||
|
return 530
|
||||||
|
|
||||||
if(this.hasOwnCalendar || this.hasSharedCalendar) {
|
if(this.hasOwnCalendar || this.hasSharedCalendar) {
|
||||||
return 530
|
return 530
|
||||||
|
|||||||
@@ -64,7 +64,7 @@
|
|||||||
<ion-item class="item-hover cursor-pointer" lines="none" *ngFor="let event of listToPresent"
|
<ion-item class="item-hover cursor-pointer" lines="none" *ngFor="let event of listToPresent"
|
||||||
(click)="goToEvent(event)"
|
(click)="goToEvent(event)"
|
||||||
>
|
>
|
||||||
<div class="d-flex content-{{loggeduser.Profile}}-{{event.CalendarName}}">
|
<div class="d-flex content-{{sessoStore.user.Profile}}-{{event.CalendarName}}">
|
||||||
|
|
||||||
<div class="schedule-time">
|
<div class="schedule-time">
|
||||||
<div *ngIf="!event.IsAllDayEvent" class="time-start">{{event.StartDate | date: 'HH:mm'}}</div>
|
<div *ngIf="!event.IsAllDayEvent" class="time-start">{{event.StartDate | date: 'HH:mm'}}</div>
|
||||||
|
|||||||
@@ -63,6 +63,7 @@ export class EventsPage implements OnInit {
|
|||||||
@Output() openExpedientListPage: EventEmitter<any> = new EventEmitter<any>();
|
@Output() openExpedientListPage: EventEmitter<any> = new EventEmitter<any>();
|
||||||
|
|
||||||
loggeduser: LoginUserRespose;
|
loggeduser: LoginUserRespose;
|
||||||
|
sessoStore = SessionStore;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private eventService: EventsService,
|
private eventService: EventsService,
|
||||||
@@ -148,6 +149,7 @@ export class EventsPage implements OnInit {
|
|||||||
|
|
||||||
|
|
||||||
async RefreshEvents() {
|
async RefreshEvents() {
|
||||||
|
|
||||||
this.currentEvent = "";
|
this.currentEvent = "";
|
||||||
this.showLoader = true;
|
this.showLoader = true;
|
||||||
|
|
||||||
@@ -155,50 +157,8 @@ export class EventsPage implements OnInit {
|
|||||||
let month = date.getMonth() + 1;
|
let month = date.getMonth() + 1;
|
||||||
let start = date.getFullYear() + "-" + month + "-" + date.getDate() + " " + date.getHours() + ":" + date.getMinutes() + ":" + date.getSeconds();
|
let start = date.getFullYear() + "-" + month + "-" + date.getDate() + " " + date.getHours() + ":" + date.getMinutes() + ":" + date.getSeconds();
|
||||||
let end = date.getFullYear() + "-" + month + "-" + date.getDate() + " 23:59:59";
|
let end = date.getFullYear() + "-" + month + "-" + date.getDate() + " 23:59:59";
|
||||||
|
if(SessionStore.user) {
|
||||||
if (this.loggeduser.Profile == 'MDGPR') {
|
console.log('im here')
|
||||||
|
|
||||||
let mdOficialEvents = await this.eventService.getAllMdOficialEvents(start, end).toPromise();
|
|
||||||
let mdPessoalEvents = await this.eventService.getAllMdPessoalEvents(start, end).toPromise();
|
|
||||||
|
|
||||||
const list = mdOficialEvents.concat(mdPessoalEvents);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
this.addEventToDb(list);
|
|
||||||
this.listToPresent = list
|
|
||||||
|
|
||||||
if (list.length > 0) {
|
|
||||||
this.currentEvent = list[0].Subject;
|
|
||||||
this.currentHoursMinutes = list[0].StartDate;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.totalEvent = list.length;
|
|
||||||
this.showLoader = false;
|
|
||||||
|
|
||||||
}
|
|
||||||
else if (this.loggeduser.Profile == 'PR') {
|
|
||||||
|
|
||||||
let prOficialEvents = await this.eventService.getAllPrOficialEvents(start, end).toPromise();
|
|
||||||
let prPessoalEvents = await this.eventService.getAllPrPessoalEvents(start, end).toPromise();
|
|
||||||
|
|
||||||
|
|
||||||
const list = prOficialEvents.concat(prPessoalEvents);
|
|
||||||
|
|
||||||
this.addEventToDb(list);
|
|
||||||
if (list.length > 0) {
|
|
||||||
this.currentEvent = list[0].Subject;
|
|
||||||
this.currentHoursMinutes = list[0].StartDate;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.listToPresent = list;
|
|
||||||
this.totalEvent = list.length;
|
|
||||||
this.showLoader = false;
|
|
||||||
|
|
||||||
} else {
|
|
||||||
|
|
||||||
if(this.loggeduser.OwnerCalendars.length >= 1) {
|
|
||||||
|
|
||||||
let onwEvent:any = await this.eventService.getAllOwnEvents(start, end).catch((error) => {
|
let onwEvent:any = await this.eventService.getAllOwnEvents(start, end).catch((error) => {
|
||||||
console.error(error)
|
console.error(error)
|
||||||
})
|
})
|
||||||
@@ -211,8 +171,6 @@ export class EventsPage implements OnInit {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
addEventToDb(list) {
|
addEventToDb(list) {
|
||||||
|
|
||||||
if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
|
if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
|
||||||
|
|||||||
@@ -143,7 +143,7 @@ export class LoginPage implements OnInit {
|
|||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
this.sqliteservice.deleteAllTables();
|
|
||||||
this.RochetChatConnectorService.logout();
|
this.RochetChatConnectorService.logout();
|
||||||
this.clearStoreService.clear();
|
this.clearStoreService.clear();
|
||||||
this.ChatSystemService.clearChat();
|
this.ChatSystemService.clearChat();
|
||||||
|
|||||||
@@ -119,7 +119,7 @@ export class AttendeePage implements OnInit {
|
|||||||
|
|
||||||
const result = this.LtaskParticipants.concat(this.LtaskParticipantsCc).find((contact, index)=>{
|
const result = this.LtaskParticipants.concat(this.LtaskParticipantsCc).find((contact, index)=>{
|
||||||
|
|
||||||
if(contact.Name.toLowerCase() == itm.Name.toLowerCase() && contact.EmailAddress.toLowerCase() == itm.EmailAddress.toLowerCase()){
|
if(this.checkStringNull(contact.Name) == this.checkStringNull(itm.Name) && this.checkStringNull(contact.EmailAddress) == this.checkStringNull(itm.EmailAddress)){
|
||||||
index = index;
|
index = index;
|
||||||
return contact;
|
return contact;
|
||||||
}
|
}
|
||||||
@@ -133,7 +133,7 @@ export class AttendeePage implements OnInit {
|
|||||||
|
|
||||||
const result2 = this.LtaskParticipantsCc.find((contact, index)=>{
|
const result2 = this.LtaskParticipantsCc.find((contact, index)=>{
|
||||||
|
|
||||||
if(contact.Name.toLowerCase() == itm.Name && contact.EmailAddress.toLowerCase() == itm.EmailAddress.toLowerCase()){
|
if(this.checkStringNull(contact.Name) == itm.Name && this.checkStringNull(contact.EmailAddress) == this.checkStringNull(itm.EmailAddress)){
|
||||||
index = index;
|
index = index;
|
||||||
return contact;
|
return contact;
|
||||||
}
|
}
|
||||||
@@ -199,7 +199,7 @@ export class AttendeePage implements OnInit {
|
|||||||
{
|
{
|
||||||
this.eventPersons.forEach(attendee => {
|
this.eventPersons.forEach(attendee => {
|
||||||
const index: number = result.findIndex((cont) => {
|
const index: number = result.findIndex((cont) => {
|
||||||
return cont.EmailAddress.toLowerCase() == attendee.EmailAddress.toLowerCase()
|
return this.checkStringNull(cont.EmailAddress) == this.checkStringNull(attendee.EmailAddress)
|
||||||
});
|
});
|
||||||
|
|
||||||
result.splice(index, 1);
|
result.splice(index, 1);
|
||||||
@@ -212,4 +212,12 @@ export class AttendeePage implements OnInit {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
checkStringNull(value: string) {
|
||||||
|
if(value) {
|
||||||
|
return value.toLowerCase();
|
||||||
|
} else {
|
||||||
|
return value
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user