mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 21:35:50 +00:00
fix
This commit is contained in:
+41
-40
@@ -96,39 +96,40 @@ export class HomePage implements OnInit {
|
||||
this.user = SessionStore.user;
|
||||
}
|
||||
|
||||
this.NativeNotificationService.askForPermission()
|
||||
this.NativeNotificationService.askForPermission();
|
||||
this.NativeNotificationService.foregroundNotification();
|
||||
|
||||
this.router.events.subscribe((val) => {
|
||||
document.querySelectorAll('ion-modal').forEach((e: any) => e.remove())
|
||||
document.querySelectorAll('popover-viewport').forEach((e: any) => e.remove())
|
||||
document.querySelectorAll('.loading-blocker').forEach((e: any) => e.remove())
|
||||
document.querySelectorAll('ion-popover').forEach((e: any) => e.remove())
|
||||
});
|
||||
this.router.events.subscribe((val) => {
|
||||
document.querySelectorAll('ion-modal').forEach((e: any) => e.remove())
|
||||
document.querySelectorAll('popover-viewport').forEach((e: any) => e.remove())
|
||||
document.querySelectorAll('.loading-blocker').forEach((e: any) => e.remove())
|
||||
document.querySelectorAll('ion-popover').forEach((e: any) => e.remove())
|
||||
});
|
||||
|
||||
window['platform'] = platform
|
||||
window['platform'] = platform
|
||||
|
||||
window['inactivity/function'] = () => {
|
||||
window['inactivity/function'] = () => {
|
||||
|
||||
if (window.location.pathname != '/inactivity' && window.location.pathname != '/') {
|
||||
if (window.location.pathname != '/inactivity' && window.location.pathname != '/') {
|
||||
|
||||
document.querySelectorAll('ion-modal').forEach((e: any) => e.remove());
|
||||
document.querySelectorAll('.popover-viewport').forEach((e: any) => e.remove());
|
||||
document.querySelectorAll('.loading-blocker').forEach((e: any) => e.remove());
|
||||
document.querySelectorAll('ion-modal').forEach((e: any) => e.remove());
|
||||
document.querySelectorAll('.popover-viewport').forEach((e: any) => e.remove());
|
||||
document.querySelectorAll('.loading-blocker').forEach((e: any) => e.remove());
|
||||
|
||||
const pathname = window.location.pathname
|
||||
SessionStore.setUrlBeforeInactivity(pathname)
|
||||
|
||||
if (this.platform.is('mobileweb')) {
|
||||
// this.router.navigate(['/inactivity']);
|
||||
window.location.pathname = '/inactivity'
|
||||
} else {
|
||||
// this.router.navigate(['/']);
|
||||
window.location.pathname = '/'
|
||||
}
|
||||
const pathname = window.location.pathname
|
||||
SessionStore.setUrlBeforeInactivity(pathname)
|
||||
|
||||
if (this.platform.is('mobileweb')) {
|
||||
// this.router.navigate(['/inactivity']);
|
||||
window.location.pathname = '/inactivity'
|
||||
} else {
|
||||
// this.router.navigate(['/']);
|
||||
window.location.pathname = '/'
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
goto(url) {
|
||||
@@ -161,7 +162,7 @@ export class HomePage implements OnInit {
|
||||
})
|
||||
|
||||
this.NetworkServiceService.onNetworkChange().subscribe((status) => {
|
||||
if(status == ConnectionStatus.Online) {
|
||||
if (status == ConnectionStatus.Online) {
|
||||
this.backgroundservice.online()
|
||||
}
|
||||
})
|
||||
@@ -176,16 +177,16 @@ export class HomePage implements OnInit {
|
||||
this.clearTabButtonSelection();
|
||||
|
||||
setTimeout(() => {
|
||||
if(this.p.userPermission([this.p.permissionList.Gabinete.md_tasks]) && this.p.userPermission([this.p.permissionList.Gabinete.pr_tasks])) {
|
||||
throw(SessionStore.user.FullName + 'cant have MD and PR authorization at same time');
|
||||
}
|
||||
|
||||
if(this.p.userPermission([this.p.permissionList.Chat.access]) && !SessionStore.user?.ChatData?.data) {
|
||||
throw('Chat temporarily unavailable for '+SessionStore.user.FullName + '. No ChatData');
|
||||
if (this.p.userPermission([this.p.permissionList.Gabinete.md_tasks]) && this.p.userPermission([this.p.permissionList.Gabinete.pr_tasks])) {
|
||||
throw (SessionStore.user.FullName + 'cant have MD and PR authorization at same time');
|
||||
}
|
||||
|
||||
if(this.p.userPermission([this.p.permissionList.Agenda.access]) && !this.eventService.hasAnyCalendar) {
|
||||
throw('User '+SessionStore.user.FullName + 'has No calendar');
|
||||
if (this.p.userPermission([this.p.permissionList.Chat.access]) && !SessionStore.user?.ChatData?.data) {
|
||||
throw ('Chat temporarily unavailable for ' + SessionStore.user.FullName + '. No ChatData');
|
||||
}
|
||||
|
||||
if (this.p.userPermission([this.p.permissionList.Agenda.access]) && !this.eventService.hasAnyCalendar) {
|
||||
throw ('User ' + SessionStore.user.FullName + 'has No calendar');
|
||||
}
|
||||
}, 1000)
|
||||
|
||||
@@ -199,24 +200,24 @@ export class HomePage implements OnInit {
|
||||
this.tabButton.chat = false;
|
||||
}
|
||||
|
||||
selectedTab(url?:string) {
|
||||
selectedTab(url?: string) {
|
||||
this.clearTabButtonSelection();
|
||||
if(url =='/home/events'){
|
||||
if (url == '/home/events') {
|
||||
this.tabButton.home = true;
|
||||
}
|
||||
else if(url == '/home/agenda'){
|
||||
else if (url == '/home/agenda') {
|
||||
this.tabButton.agenda = true;
|
||||
}
|
||||
else if(url =='/home/gabinete-digital') {
|
||||
else if (url == '/home/gabinete-digital') {
|
||||
this.tabButton.gabinete = true;
|
||||
}
|
||||
else if(url =='/home/publications') {
|
||||
else if (url == '/home/publications') {
|
||||
this.tabButton.actions = true;
|
||||
}
|
||||
else if(url == '/home/chat') {
|
||||
else if (url == '/home/chat') {
|
||||
this.tabButton.chat = true;
|
||||
}
|
||||
else{
|
||||
else {
|
||||
this.clearTabButtonSelection();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
<div class="main-content d-flex height-100">
|
||||
<div class="content d-flex flex-column width-100">
|
||||
<div class="title" lines="none">
|
||||
{{modalTitle[taskType]}}
|
||||
{{modalTitle[taskType]}} <br>
|
||||
<i style="margin-top: 10px; font-size: 15px;" > Campos marcados com * são obrigatórios</i>
|
||||
</div>
|
||||
<div class="ion-item-container width-100" [class.input-error]="Form?.get('Subject')?.invalid && validateFrom ">
|
||||
<ion-input autocomplete="on" autocorrect="on" spellcheck="true" placeholder="Assunto*" [(ngModel)]="postData.DispatchFolder.Subject"></ion-input>
|
||||
|
||||
@@ -8,7 +8,8 @@
|
||||
<!-- *ngIf="p.userRole('PR')" -->
|
||||
<!-- *ngIf="p.role(['PR','MD']).permissionAnyOf(['view','edit'])" -->
|
||||
|
||||
<label >Convocar Reunião</label>
|
||||
<label >Convocar Reunião</label><br>
|
||||
<i style="margin-top: -3px; font-size: 15px;" > Campos marcados com * são obrigatórios</i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="overflow-y-auto content-default-padding">
|
||||
@@ -60,9 +61,17 @@
|
||||
<mat-form-field appearance="none" class="width-100" color="ion-color-secondary" placeholder="Selecione agenda">
|
||||
<mat-select [(value)]="CalendarName" (selectionChange)="changeAgenda()">
|
||||
|
||||
<mat-option *ngFor="let calendars of _eventService.calendarNamesAry" value="{{calendars}}">
|
||||
<div *ngIf="calendars != 'Meu calendario' "> Agenda de {{calendars}} </div>
|
||||
<div *ngIf="calendars == 'Meu calendario'"> Agenda de {{loggeduser.FullName}} </div>
|
||||
<!-- <mat-option *ngFor="let calendars of _eventService.calendarNamesAry; let i = index" value="{{calendars}}">
|
||||
<div *ngIf="calendars != 'Meu calendario' && calendars == 'Presidente da República'"> Agenda do PR </div>
|
||||
<div *ngIf="calendars != 'Meu calendario' && calendars == 'Ministro e Director do Gabinete do PR'"> Agenda do MD </div>
|
||||
<div *ngIf="calendars != 'Meu calendario' && calendars != 'Ministro e Director do Gabinete do PR' && calendars != 'Presidente da República'"> Agenda do {{calendars}} </div>
|
||||
|
||||
<div *ngIf="calendars == 'Meu calendario'"> Minha agenda </div> -->
|
||||
<mat-option *ngFor="let calendars of _eventService.calendarNamesAry" value="{{calendars.Fullname || calendars}}">
|
||||
<div *ngIf="calendars != 'Meu calendario' && calendars.Role == 'Presidente da República'"> Agenda do PR </div>
|
||||
<div *ngIf="calendars != 'Meu calendario' && calendars.Role == 'Ministro e Director do Gabinete do PR'"> Agenda do MD </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>
|
||||
<div *ngIf="calendars == 'Meu calendario'"> Minha agenda </div>
|
||||
</mat-option>
|
||||
|
||||
</mat-select>
|
||||
|
||||
@@ -94,6 +94,7 @@ export class DocumentSetUpMeetingPage implements OnInit {
|
||||
CalendarName;
|
||||
CalendarNameShow = true
|
||||
CalendarNamesOptions
|
||||
testeFormDefaul = "Eudes"
|
||||
|
||||
constructor(
|
||||
private modalController: ModalController,
|
||||
@@ -130,7 +131,7 @@ export class DocumentSetUpMeetingPage implements OnInit {
|
||||
this.taskParticipants = [{
|
||||
EmailAddress: SessionStore.user.Email,
|
||||
IsRequired: true,
|
||||
Name: SessionStore.user.UserName
|
||||
Name: SessionStore.user.FullName
|
||||
}]
|
||||
}
|
||||
|
||||
@@ -462,5 +463,9 @@ export class DocumentSetUpMeetingPage implements OnInit {
|
||||
return date
|
||||
}
|
||||
|
||||
checkRoleInArray(str) {
|
||||
return this._eventService.calendarRole.includes(str);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -218,8 +218,8 @@
|
||||
<!-- List -->
|
||||
<ul *ngIf="showTimelineFilterState">
|
||||
<li class="changeText" [class.active]="segment == 'Combinado' " (click)="changeSegment('Combinado')" class="cursor-pointer">Todos</li>
|
||||
<li class="changeText" [class.active]="segment == 'Oficial' " (click)="changeSegment('Oficial')" class="cursor-pointer">Calendário Oficial</li>
|
||||
<li class="changeText" [class.active]="segment == 'Pessoal' " (click)="changeSegment('Pessoal')" class="cursor-pointer">Calendário Pessoal</li>
|
||||
<li class="changeText" [class.active]="segment == 'Oficial' " (click)="changeSegment('Oficial')" class="cursor-pointer">Agenda Oficial</li>
|
||||
<li class="changeText" [class.active]="segment == 'Pessoal' " (click)="changeSegment('Pessoal')" class="cursor-pointer">Agenda Pessoal</li>
|
||||
</ul>
|
||||
|
||||
</ion-row>
|
||||
@@ -227,13 +227,17 @@
|
||||
|
||||
<div class="calendar-title-container px-20 d-none d-md-flex">
|
||||
<div class="calendar-title-description flex-grow-1 text-grey d-flex justify-center align-center" *ngIf="eventService.hasOwnCalendar">
|
||||
<div >Agenda de {{SessionStore.user.FullName}}</div>
|
||||
<!-- <div >Agenda de {{SessionStore.user.FullName}}</div> -->
|
||||
<div >Minha agenda</div>
|
||||
</div>
|
||||
<div class="calendar-title-description text-black align-center" *ngIf="eventService.hasSharedCalendar">
|
||||
<div class="flex-grow-1 text-grey d-flex justify-center align-center">
|
||||
|
||||
<mat-option *ngFor="let calendars of eventService.calendarNamesAry" value="{{calendars}}">
|
||||
<div *ngIf="calendars != 'Meu calendario' "> Agenda de {{calendars}} </div>
|
||||
<mat-option *ngFor="let calendars of eventService.calendarNamesAry" value="{{calendars.Fullname || calendars}}">
|
||||
<div *ngIf="calendars != 'Meu calendario' && calendars.Role == 'Presidente da República'"> Agenda do PR </div>
|
||||
<div *ngIf="calendars != 'Meu calendario' && calendars.Role == 'Ministro e Director do Gabinete do PR'"> Agenda do MD </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>
|
||||
|
||||
</mat-option>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1232,7 +1232,7 @@ export class AgendaPage implements OnInit {
|
||||
let taskParticipants = [{
|
||||
EmailAddress: SessionStore.user.Email,
|
||||
IsRequired: true,
|
||||
Name: SessionStore.user.UserName
|
||||
Name: SessionStore.user.FullName
|
||||
}]
|
||||
const modal = await this.modalCtrl.create({
|
||||
component: NewEventPage,
|
||||
@@ -1258,7 +1258,7 @@ export class AgendaPage implements OnInit {
|
||||
this.taskParticipants = [{
|
||||
EmailAddress: SessionStore.user.Email,
|
||||
IsRequired: true,
|
||||
Name: SessionStore.user.UserName
|
||||
Name: SessionStore.user.FullName
|
||||
}]
|
||||
}
|
||||
}
|
||||
@@ -1542,4 +1542,9 @@ export class AgendaPage implements OnInit {
|
||||
return reuslt.length != 0
|
||||
}
|
||||
|
||||
|
||||
checkRoleInArray(str) {
|
||||
return this.eventService.calendarRole.includes(str);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -64,10 +64,10 @@
|
||||
<mat-form-field appearance="none" floatLabel="never" class="width-100 " >
|
||||
<mat-select placeholder="Selecione agenda*" [(ngModel)]="postEvent.CalendarName" >
|
||||
<mat-option value="Oficial">
|
||||
Calendário Oficial
|
||||
Agenda Oficial
|
||||
</mat-option>
|
||||
<mat-option value="Pessoal">
|
||||
Calendário Pessoal
|
||||
Agenda Pessoal
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
<div class="main-header">
|
||||
<div class="title-content width-100">
|
||||
<div class="middle">
|
||||
<ion-label class="title">Novo Evento</ion-label>
|
||||
<ion-label class="title">Novo Evento</ion-label> <br>
|
||||
<i style="margin-top: -3px; font-size: 15px;" > Campos marcados com * são obrigatórios</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -27,11 +28,18 @@
|
||||
|
||||
<mat-form-field appearance="none" class="width-100" color="ion-color-secondary" placeholder="Selecione agenda">
|
||||
<mat-select [(value)]="CalendarName" (selectionChange)="changeAgenda()">
|
||||
|
||||
<mat-option *ngFor="let calendars of eventService.calendarNamesAry" value="{{calendars}}">
|
||||
<div *ngIf="calendars != 'Meu calendario' "> Agenda de {{calendars}} </div>
|
||||
<div *ngIf="calendars == 'Meu calendario'"> Agenda de {{loggeduser.FullName}} </div>
|
||||
|
||||
|
||||
<!-- <mat-option *ngFor="let calendars of _eventService.calendarNamesAry; let i = index" value="{{calendars}}">
|
||||
<div *ngIf="calendars != 'Meu calendario' && calendars == 'Presidente da República'"> Agenda do PR </div>
|
||||
<div *ngIf="calendars != 'Meu calendario' && calendars == 'Ministro e Director do Gabinete do PR'"> Agenda do MD </div>
|
||||
<div *ngIf="calendars != 'Meu calendario' && calendars != 'Ministro e Director do Gabinete do PR' && calendars != 'Presidente da República'"> Agenda do {{calendars}} </div>
|
||||
|
||||
<div *ngIf="calendars == 'Meu calendario'"> Minha agenda </div> -->
|
||||
<mat-option *ngFor="let calendars of eventService.calendarNamesAry" value="{{calendars.Fullname || calendars}}">
|
||||
<div *ngIf="calendars != 'Meu calendario' && calendars.Role == 'Presidente da República'"> Agenda do PR </div>
|
||||
<div *ngIf="calendars != 'Meu calendario' && calendars.Role == 'Ministro e Director do Gabinete do PR'"> Agenda do MD </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>
|
||||
<div *ngIf="calendars == 'Meu calendario'"> Minha agenda </div>
|
||||
</mat-option>
|
||||
|
||||
</mat-select>
|
||||
@@ -40,7 +48,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container-div">
|
||||
<div class="ion-item-class-2">
|
||||
<div class="ion-icon-class">
|
||||
@@ -62,7 +69,7 @@
|
||||
<mat-form-field appearance="none" class="width-100" color="ion-color-secondary" placeholder="Selecione agenda">
|
||||
<mat-select [(value)]="postEvent.CalendarName" >
|
||||
<mat-option *ngFor="let calendars of CalendarNamesOptions" value="{{calendars}}">
|
||||
Calendário {{ calendars }}
|
||||
Agenda {{ calendars }}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
@@ -24,7 +24,7 @@ ion-content{
|
||||
.middle{
|
||||
padding: 0!important;
|
||||
float: left;
|
||||
width: 221px;
|
||||
width: max-content;
|
||||
margin: 2.5px 0 0 5px;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -117,6 +117,7 @@ export class NewEventPage implements OnInit {
|
||||
}
|
||||
|
||||
if(!this.CalendarName) {
|
||||
console.log('true', this.eventService.calendarNamesAry.includes('Meu calendario'))
|
||||
if(this.eventService.calendarNamesAry.includes('Meu calendario')) {
|
||||
this.CalendarName = 'Meu calendario';
|
||||
console.log(this.eventService.calendarNamesAry)
|
||||
@@ -183,6 +184,7 @@ export class NewEventPage implements OnInit {
|
||||
|
||||
this.setDefaultTime()
|
||||
|
||||
this.checkRoleInArray()
|
||||
}
|
||||
|
||||
setDefaultTime() {
|
||||
@@ -566,4 +568,16 @@ export class NewEventPage implements OnInit {
|
||||
this.documents = this.documents.filter( (e, i) => index != i);
|
||||
|
||||
}
|
||||
|
||||
checkRoleInArray() {
|
||||
for (let index = 0; index < this.eventService.calendarNamesAry.length; index++) {
|
||||
console.log('ROLE1', this.eventService.calendarNamesAry[index])
|
||||
|
||||
}
|
||||
|
||||
for (let index = 0; index < this.eventService.calendarRole.length; index++) {
|
||||
console.log('ROLE2',this.eventService.calendarRole[index])
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,10 +17,12 @@
|
||||
<ion-toolbar>
|
||||
<ion-segment [(ngModel)]="segment" (ionChange)="segmentChanged($event)">
|
||||
<ion-segment-button value="MDGPR">
|
||||
Meu Calendário
|
||||
Minha agenda
|
||||
</ion-segment-button>
|
||||
<ion-segment-button value="PR">
|
||||
Calendário Partilhado
|
||||
<ion-segment-button *ngFor="let calendars of eventService.calendarNamesAry" value="PR">
|
||||
<div *ngIf="calendars != 'Meu calendario' && calendars.Role == 'Presidente da República'"> Agenda do PR </div>
|
||||
<div *ngIf="calendars != 'Meu calendario' && calendars.Role == 'Ministro e Director do Gabinete do PR'"> Agenda do MD </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>
|
||||
</ion-toolbar>
|
||||
|
||||
@@ -15,6 +15,7 @@ import { SortService } from 'src/app/services/functions/sort.service';
|
||||
import { ThemeService } from 'src/app/services/theme.service'
|
||||
import { RouteService } from 'src/app/services/route.service';
|
||||
import { Storage } from '@ionic/storage';
|
||||
import { EventsService } from 'src/app/services/events.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-event-list',
|
||||
@@ -49,7 +50,8 @@ export class EventListPage implements OnInit {
|
||||
private backgroundservice: BackgroundService,
|
||||
public ThemeService: ThemeService,
|
||||
private RouteService: RouteService,
|
||||
private storage: Storage
|
||||
private storage: Storage,
|
||||
public eventService: EventsService,
|
||||
) { }
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
+16
-8
@@ -4,7 +4,8 @@
|
||||
<div class="content d-flex flex-column width-100 height-100 ">
|
||||
<div class="header-content header-default-padding">
|
||||
<div class="header-title">
|
||||
<label>Convocar Reunião</label>
|
||||
<label>Convocar Reunião</label> <br>
|
||||
<i style="margin-top: -3px; font-size: 15px;" > Campos marcados com * são obrigatórios</i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="overflow-y-auto content-default-padding">
|
||||
@@ -32,14 +33,21 @@
|
||||
<div class="ion-input-class flex-grow-1 justify-center align-center material-inputs " [class.input-error]="Form?.get('CalendarName')?.invalid && validateFrom ">
|
||||
|
||||
<mat-form-field appearance="none" class="width-100" color="ion-color-secondary" placeholder="Selecione agenda">
|
||||
<mat-select [(value)]="CalendarOwnerName" (selectionChange)="changeAgenda()">
|
||||
|
||||
<mat-option *ngFor="let calendars of calendarService.calendarNamesAry" value="{{calendars}}">
|
||||
<div *ngIf="calendars != 'Meu calendario' "> Agenda de {{calendars}} </div>
|
||||
<div *ngIf="calendars == 'Meu calendario'"> Agenda de {{loggeduser.FullName}} </div>
|
||||
|
||||
<mat-select [(value)]="CalendarName" (selectionChange)="changeAgenda()">
|
||||
|
||||
<!-- <mat-option *ngFor="let calendars of _eventService.calendarNamesAry; let i = index" value="{{calendars}}">
|
||||
<div *ngIf="calendars != 'Meu calendario' && calendars == 'Presidente da República'"> Agenda do PR </div>
|
||||
<div *ngIf="calendars != 'Meu calendario' && calendars == 'Ministro e Director do Gabinete do PR'"> Agenda do MD </div>
|
||||
<div *ngIf="calendars != 'Meu calendario' && calendars != 'Ministro e Director do Gabinete do PR' && calendars != 'Presidente da República'"> Agenda do {{calendars}} </div>
|
||||
|
||||
<div *ngIf="calendars == 'Meu calendario'"> Minha agenda </div> -->
|
||||
<mat-option *ngFor="let calendars of eventService.calendarNamesAry" value="{{calendars.Fullname || calendars}}">
|
||||
<div *ngIf="calendars != 'Meu calendario' && calendars.Role == 'Presidente da República'"> Agenda do PR </div>
|
||||
<div *ngIf="calendars != 'Meu calendario' && calendars.Role == 'Ministro e Director do Gabinete do PR'"> Agenda do MD </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>
|
||||
<div *ngIf="calendars == 'Meu calendario'"> Minha agenda </div>
|
||||
</mat-option>
|
||||
|
||||
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
|
||||
+1
-1
@@ -153,7 +153,7 @@ export class BookMeetingModalPage implements OnInit {
|
||||
this.taskParticipants = [{
|
||||
EmailAddress: SessionStore.user.Email,
|
||||
IsRequired: true,
|
||||
Name: SessionStore.user.UserName
|
||||
Name: SessionStore.user.FullName
|
||||
}]
|
||||
}
|
||||
|
||||
|
||||
+4
-1
@@ -2,7 +2,10 @@
|
||||
<div class="main-content d-flex height-100">
|
||||
<div class="content d-flex flex-column width-100">
|
||||
<ion-item lines="none">
|
||||
<ion-label class="title">{{modalTitle[taskType]}}</ion-label>
|
||||
<ion-label class="title">{{modalTitle[taskType]}}</ion-label> <br>
|
||||
</ion-item>
|
||||
<ion-item lines="none">
|
||||
<i style="margin-top: -3px; font-size: 15px;" > Campos marcados com * são obrigatórios</i>
|
||||
</ion-item>
|
||||
|
||||
<div class="ion-item-container width-100" [class.input-error]="Form?.get('Subject')?.invalid && validateFrom ">
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
<ion-header class="ion-no-border pt-20 px-20">
|
||||
<div class="title-content width-100 d-flex align-center justify-space-between ">
|
||||
<div class="div-title">
|
||||
<ion-label class="title">Editar acção presidencial</ion-label>
|
||||
<ion-label class="title">Editar acção presidencial</ion-label> <br>
|
||||
<i style="margin-top: -3px; font-size: 15px;" > Campos marcados com * são obrigatórios</i>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
<div class="content-container">
|
||||
<div class="title-content width-100">
|
||||
<div class="div-title">
|
||||
<ion-label class="title"> Nova Acção</ion-label>
|
||||
<ion-label class="title"> Nova Acção</ion-label> <br>
|
||||
<i style="margin-top: -3px; font-size: 15px;" > Campos marcados com * são obrigatórios</i>
|
||||
</div>
|
||||
<!-- <div class="actionType">
|
||||
<ion-segment [(ngModel)]="segment" (ionChange)="segmentChanged($event)">
|
||||
@@ -19,7 +20,7 @@
|
||||
</div>
|
||||
|
||||
<div class="ion-item-container" [class.input-error]="Form?.get('Subject')?.invalid && validateFrom ">
|
||||
<ion-input autocomplete="on" autocorrect="on" spellcheck="true" [(ngModel)]="folder.Description" placeholder="Assunto" ></ion-input>
|
||||
<ion-input autocomplete="on" autocorrect="on" spellcheck="true" [(ngModel)]="folder.Description" placeholder="Assunto*" ></ion-input>
|
||||
</div>
|
||||
|
||||
<div class="container-div">
|
||||
|
||||
@@ -63,7 +63,7 @@ ion-toolbar{
|
||||
padding: 0 !important;
|
||||
}
|
||||
.div-title{
|
||||
width: 180px;
|
||||
width: 250;
|
||||
/* padding: 0!important; */
|
||||
float: left;
|
||||
margin: 2.5px 0 0 5px;
|
||||
|
||||
@@ -3,7 +3,9 @@
|
||||
<div class="content-container d-flex flex-column">
|
||||
<div class="title-content width-100">
|
||||
<div class="div-title">
|
||||
<ion-label class="title">{{publicationTitle}}</ion-label>
|
||||
<ion-label class="title">{{publicationTitle}}</ion-label> <br>
|
||||
<i style="margin-top: -3px; font-size: 15px;" > Campos marcados com * são obrigatórios</i>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@ ion-toolbar{
|
||||
padding: 0 !important;
|
||||
}
|
||||
.div-title{
|
||||
width: 270px;
|
||||
width: 300px;
|
||||
/* padding: 0!important; */
|
||||
float: left;
|
||||
margin: 2.5px 0 0 5px;
|
||||
|
||||
@@ -51,6 +51,8 @@ export class EventsService {
|
||||
|
||||
calendarNamesAry = []
|
||||
calendarNamesType = {}
|
||||
calendarRole = []
|
||||
calendrFullName = []
|
||||
|
||||
myCalendarNames = {}
|
||||
hasAnyCalendar = false
|
||||
@@ -93,6 +95,8 @@ export class EventsService {
|
||||
|
||||
this.usersCalendarIds = [];
|
||||
this.calendarNames = {}
|
||||
this.calendarRole = []
|
||||
this.calendrFullName = [];
|
||||
this.calendarIds = []
|
||||
|
||||
this.calendarNamesAry = []
|
||||
@@ -249,17 +253,39 @@ export class EventsService {
|
||||
this.hasAnyCalendar = true
|
||||
if(sharedCalendar?.OwnerUserId) {
|
||||
this.GetCalendarName(sharedCalendar.OwnerUserId).subscribe((e)=> {
|
||||
console.log('sharedCalendar.OwnerUserId',e)
|
||||
this.calendarNames[sharedCalendar.CalendarId] = e.FullName
|
||||
this.myCalendarNames[sharedCalendar.CalendarId] = e.FullName
|
||||
|
||||
if(!this.calendarNamesAry.includes(e.FullName)) {
|
||||
this.calendarNamesAry.push(e.FullName)
|
||||
console.log('ROLE',e.Role, e.FullName)
|
||||
|
||||
if(!this.calendarNamesAry.find(x => x.Role == e.Role)) {
|
||||
/* if(e.Role == "Presidente da República") {
|
||||
this.calendarNamesAry.push(e.Role)
|
||||
console.log('PR ROLE',this.calendarNamesAry)
|
||||
} else if (e.Role == "Ministro e Director do Gabinete do PR"){
|
||||
this.calendarNamesAry.push(e.Role)
|
||||
console.log('MD ROLE',this.calendarNamesAry)
|
||||
} else {
|
||||
this.calendarNamesAry.push(e.FullName)
|
||||
console.log('NORMAL ROLE',this.calendarNamesAry)
|
||||
} */
|
||||
//this.calendarRole.push(e.Role)
|
||||
let objectShared = {
|
||||
"Fullname": e.FullName,
|
||||
"Role": e.Role
|
||||
}
|
||||
|
||||
this.calendarNamesAry.push(objectShared)
|
||||
|
||||
|
||||
console.log('objectShared',this.calendarNamesAry)
|
||||
this.calendarNamesType[e.FullName] = {}
|
||||
}
|
||||
|
||||
this.calendarNamesType[e.FullName][sharedCalendar.CalendarName] = true
|
||||
this.calendarNamesType[e.FullName][sharedCalendar.CalendarName+'Id'] = sharedCalendar.CalendarId
|
||||
this.calendarNamesType[e.FullName][sharedCalendar.CalendarName+'RoleId'] = sharedCalendar.CalendarRoleId
|
||||
this.calendarNamesType[e.FullName]['RoleId'] = sharedCalendar.CalendarRoleId
|
||||
})
|
||||
}
|
||||
|
||||
@@ -272,12 +298,13 @@ export class EventsService {
|
||||
|
||||
if(!this.calendarNamesAry.includes('Meu calendario')) {
|
||||
this.calendarNamesAry.push('Meu calendario')
|
||||
console.log(this.calendarNamesAry)
|
||||
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+'RoleId'] = sharedCalendar.CalendarRoleId
|
||||
this.calendarNamesType['Meu calendario']['RoleId'] = sharedCalendar.CalendarRoleId
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Platform } from '@ionic/angular';
|
||||
import { CapacitorConfig } from '@capacitor/cli';
|
||||
import { LocalNotifications } from '@capacitor/local-notifications';
|
||||
import { LocalNotifications, LocalNotificationSchema } from '@capacitor/local-notifications';
|
||||
|
||||
|
||||
@Injectable({
|
||||
@@ -25,6 +25,13 @@ export class NativeNotificationService {
|
||||
|
||||
}
|
||||
|
||||
foregroundNotification() {
|
||||
console.log('Local notification foreground')
|
||||
LocalNotifications.addListener('localNotificationReceived', (notification) => {
|
||||
console.log('Local Notification',notification)
|
||||
})
|
||||
}
|
||||
|
||||
sendNotificationChat({title = 'User', icon = '', message = 'hello'}) {
|
||||
|
||||
LocalNotifications.schedule({
|
||||
|
||||
@@ -8,7 +8,8 @@
|
||||
<ion-header>
|
||||
<div class="title-content">
|
||||
<div class="middle">
|
||||
<ion-label class="title">Editar evento por aprovar</ion-label>
|
||||
<ion-label class="title">Editar evento por aprovar</ion-label> <br>
|
||||
<i style="margin-top: -3px; font-size: 15px;" > Campos marcados com * são obrigatórios</i>
|
||||
</div>
|
||||
</div>
|
||||
</ion-header>
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
<div class="main-header">
|
||||
<div class="title-content">
|
||||
<div class="middle">
|
||||
<ion-label class="title">Editar Evento</ion-label>
|
||||
<ion-label class="title">Editar Evento</ion-label> <br>
|
||||
<i style="margin-top: -3px; font-size: 15px;" > Campos marcados com * são obrigatórios</i>
|
||||
</div>
|
||||
</div>
|
||||
<ion-progress-bar class="calendar-progress-bar" type="indeterminate" *ngIf="showLoader"></ion-progress-bar>
|
||||
|
||||
@@ -11,10 +11,12 @@
|
||||
<ion-toolbar>
|
||||
<ion-segment [(ngModel)]="segment" (ionChange)="segmentChanged($event)">
|
||||
<ion-segment-button value="MDGPR">
|
||||
Meu Calendário
|
||||
Minha agenda
|
||||
</ion-segment-button>
|
||||
<ion-segment-button value="PR">
|
||||
Calendário Partilhado
|
||||
<ion-segment-button *ngFor="let calendars of eventService.calendarNamesAry" value="PR">
|
||||
<div *ngIf="calendars != 'Meu calendario' && calendars.Role == 'Presidente da República'"> Agenda do PR </div>
|
||||
<div *ngIf="calendars != 'Meu calendario' && calendars.Role == 'Ministro e Director do Gabinete do PR'"> Agenda do MD </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>
|
||||
</ion-toolbar>
|
||||
|
||||
@@ -6,6 +6,7 @@ import { NavigationEnd, Router } from '@angular/router';
|
||||
import { LoginUserRespose } from 'src/app/models/user.model';
|
||||
import { SortService } from 'src/app/services/functions/sort.service';
|
||||
import { SessionStore } from 'src/app/store/session.service';
|
||||
import { EventsService } from 'src/app/services/events.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-event-list',
|
||||
@@ -36,6 +37,7 @@ export class EventListPage implements OnInit {
|
||||
private processes:ProcessesService,
|
||||
private router: Router,
|
||||
private sortService: SortService,
|
||||
public eventService: EventsService,
|
||||
) {
|
||||
this.loggeduser = SessionStore.user;
|
||||
}
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
<div class="main-header">
|
||||
<div class="title-content">
|
||||
<div class="middle">
|
||||
<ion-label class="title">Novo Evento</ion-label>
|
||||
<ion-label class="title">Novo Evento</ion-label> <br>
|
||||
<i style="margin-top: -3px; font-size: 15px;" > Campos marcados com * são obrigatórios</i>
|
||||
</div>
|
||||
</div>
|
||||
<ion-progress-bar class="calendar-progress-bar" type="indeterminate" *ngIf="showLoader"></ion-progress-bar>
|
||||
@@ -39,9 +40,17 @@
|
||||
<mat-form-field appearance="none" class="width-100" color="ion-color-secondary" placeholder="Selecione agenda">
|
||||
<mat-select [(value)]="CalendarName" (selectionChange)="changeAgenda()">
|
||||
|
||||
<mat-option *ngFor="let calendars of eventService.calendarNamesAry" value="{{calendars}}">
|
||||
<div *ngIf="calendars != 'Meu calendario' "> Agenda de {{calendars}} </div>
|
||||
<div *ngIf="calendars == 'Meu calendario'"> Agenda de {{loggeduser.FullName}} </div>
|
||||
<!-- <mat-option *ngFor="let calendars of _eventService.calendarNamesAry; let i = index" value="{{calendars}}">
|
||||
<div *ngIf="calendars != 'Meu calendario' && calendars == 'Presidente da República'"> Agenda do PR </div>
|
||||
<div *ngIf="calendars != 'Meu calendario' && calendars == 'Ministro e Director do Gabinete do PR'"> Agenda do MD </div>
|
||||
<div *ngIf="calendars != 'Meu calendario' && calendars != 'Ministro e Director do Gabinete do PR' && calendars != 'Presidente da República'"> Agenda do {{calendars}} </div>
|
||||
|
||||
<div *ngIf="calendars == 'Meu calendario'"> Minha agenda </div> -->
|
||||
<mat-option *ngFor="let calendars of eventService.calendarNamesAry" value="{{calendars.Fullname || calendars}}">
|
||||
<div *ngIf="calendars != 'Meu calendario' && calendars.Role == 'Presidente da República'"> Agenda do PR </div>
|
||||
<div *ngIf="calendars != 'Meu calendario' && calendars.Role == 'Ministro e Director do Gabinete do PR'"> Agenda do MD </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>
|
||||
<div *ngIf="calendars == 'Meu calendario'"> Minha agenda </div>
|
||||
</mat-option>
|
||||
|
||||
</mat-select>
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
.middle{
|
||||
padding: 0!important;
|
||||
float: left;
|
||||
width: 221px;
|
||||
width: 300px;
|
||||
margin: 2.5px 0 0 5px;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,7 +8,9 @@
|
||||
<ion-header>
|
||||
<div class="title-content">
|
||||
<div class="middle">
|
||||
<ion-label class="title">Editar evento por aprovar</ion-label>
|
||||
<ion-label class="title">Editar evento por aprovar</ion-label> <br>
|
||||
<i style="margin-top: -5px; font-size: 15px;" > Campos marcados com * são obrigatórios</i>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</ion-header>
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
border-right: 1px solid #d8d8d8 !important;
|
||||
}
|
||||
.main-header{
|
||||
margin-bottom: 20px;
|
||||
font-family: Roboto;
|
||||
background-color: #fff;
|
||||
|
||||
|
||||
@@ -10,10 +10,12 @@
|
||||
<ion-toolbar>
|
||||
<ion-segment [(ngModel)]="segment" (ionChange)="segmentChanged($event)">
|
||||
<ion-segment-button value="MDGPR">
|
||||
Meu Calendário
|
||||
Minha agenda
|
||||
</ion-segment-button>
|
||||
<ion-segment-button value="PR">
|
||||
Calendário Partilhado
|
||||
<ion-segment-button *ngFor="let calendars of eventService.calendarNamesAry" value="PR">
|
||||
<div *ngIf="calendars != 'Meu calendario' && calendars.Role == 'Presidente da República'"> Agenda do PR </div>
|
||||
<div *ngIf="calendars != 'Meu calendario' && calendars.Role == 'Ministro e Director do Gabinete do PR'"> Agenda do MD </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>
|
||||
</ion-toolbar>
|
||||
|
||||
@@ -10,6 +10,8 @@ import { EventoAprovacaoStore } from 'src/app/store/eventoaprovacao-store.servic
|
||||
import { SortService } from 'src/app/services/functions/sort.service';
|
||||
import { Storage } from '@ionic/storage';
|
||||
import { SessionStore } from 'src/app/store/session.service';
|
||||
import { EventsService } from 'src/app/services/events.service';
|
||||
|
||||
|
||||
@Component({
|
||||
selector: 'app-events-to-approve',
|
||||
@@ -35,7 +37,8 @@ export class EventsToApprovePage implements OnInit {
|
||||
private router: Router,
|
||||
private userAuth: AuthService,
|
||||
private sortService: SortService,
|
||||
private storage: Storage
|
||||
private storage: Storage,
|
||||
public eventService: EventsService,
|
||||
)
|
||||
{
|
||||
this.loggeduser = SessionStore.user;
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
<ion-header class="ion-no-border pt-20 px-20">
|
||||
<div class="title-content d-flex align-center justify-space-between ">
|
||||
<div class="div-title">
|
||||
<ion-label class="title">Editar acção presidencial</ion-label>
|
||||
<ion-label class="title">Editar acção presidencial</ion-label> <br>
|
||||
<i style="margin-top: -3px; font-size: 15px;" > Campos marcados com * são obrigatórios</i>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
<ion-header class="ion-no-border pt-20 px-20">
|
||||
<div class="title-content d-flex align-center justify-space-between ">
|
||||
<div class="div-title">
|
||||
<ion-label class="title"> Nova Acção</ion-label>
|
||||
<ion-label class="title"> Nova Acção</ion-label> <br>
|
||||
<i style="margin-top: -3px; font-size: 15px;" > Campos marcados com * são obrigatórios</i>
|
||||
</div>
|
||||
<!-- <div class="actionType">
|
||||
<ion-segment [(ngModel)]="segment" (ionChange)="segmentChanged($event)">
|
||||
|
||||
@@ -62,7 +62,7 @@ ion-toolbar{
|
||||
padding: 0 !important;
|
||||
}
|
||||
.div-title{
|
||||
width: 180px;
|
||||
width: 300px;
|
||||
/* padding: 0!important; */
|
||||
float: left;
|
||||
margin: 2.5px 0 0 5px;
|
||||
|
||||
@@ -4,7 +4,8 @@
|
||||
<ion-icon class="font-35" (click)="goBack()" slot="end" src='assets/images/icons-arrow-arrow-left.svg'></ion-icon>
|
||||
</div> -->
|
||||
<div class="div-title">
|
||||
<ion-label class="title">{{ publicationTitle }}</ion-label>
|
||||
<ion-label class="title">{{ publicationTitle }}</ion-label> <br>
|
||||
<i style="margin-top: -3px; font-size: 15px;" > Campos marcados com * são obrigatórios</i>
|
||||
</div>
|
||||
</div>
|
||||
</ion-header>
|
||||
@@ -13,7 +14,7 @@
|
||||
<div class="content-container">
|
||||
|
||||
<div *ngIf="publicationType!='1'" class="ion-item-container" [class.input-error]="Form?.get('Subject')?.invalid && validateFrom ">
|
||||
<ion-input autocomplete="on" autocorrect="on" spellcheck="true" [(ngModel)]="pub.Title" name="title" placeholder="Título" ></ion-input>
|
||||
<ion-input autocomplete="on" autocorrect="on" spellcheck="true" [(ngModel)]="pub.Title" name="title" placeholder="Título*" ></ion-input>
|
||||
</div>
|
||||
|
||||
<div *ngIf="publicationType!='1' " class="container-div pb-20">
|
||||
|
||||
@@ -62,7 +62,7 @@ ion-toolbar{
|
||||
padding: 0 !important;
|
||||
}
|
||||
.div-title{
|
||||
width: 270px;
|
||||
width: 300px;
|
||||
/* padding: 0!important; */
|
||||
float: left;
|
||||
margin: 2.5px 0 0 5px;
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 9.5 KiB |
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
|
||||
<svg fill="#ed1b18" version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
width="800px" height="800px" viewBox="0 0 512 512" enable-background="new 0 0 512 512" xml:space="preserve">
|
||||
<g>
|
||||
<path d="M256,0C114.609,0,0,114.609,0,256s114.609,256,256,256s256-114.609,256-256S397.391,0,256,0z M256,472
|
||||
c-119.297,0-216-96.703-216-216S136.703,40,256,40s216,96.703,216,216S375.297,472,256,472z"/>
|
||||
<polygon points="240,234.656 246.234,320 265.781,320 272,233.875 272,128 240,128 "/>
|
||||
<rect x="240" y="352" width="32" height="32"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 810 B |
Reference in New Issue
Block a user