mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 12:37:53 +00:00
remove console logs
This commit is contained in:
@@ -43,7 +43,7 @@ export class SendLocalMessagesUseCaseService {
|
|||||||
} else {
|
} else {
|
||||||
//const removeLocalRooms = allRooms.value.filter((e)=> e.local == IDBoolean.false)
|
//const removeLocalRooms = allRooms.value.filter((e)=> e.local == IDBoolean.false)
|
||||||
|
|
||||||
console.log({localM: messages});
|
// console.log({localM: messages});
|
||||||
|
|
||||||
for(const message of messages) {
|
for(const message of messages) {
|
||||||
const room = allRooms.value.find(e => e.id == message.roomId || e.$id == message.roomId)
|
const room = allRooms.value.find(e => e.id == message.roomId || e.$id == message.roomId)
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ export class GetRoomListUseCaseService {
|
|||||||
|
|
||||||
@captureAndReraiseAsync('RoomRepositoryService/list')
|
@captureAndReraiseAsync('RoomRepositoryService/list')
|
||||||
async execute() {
|
async execute() {
|
||||||
console.log('update===============')
|
// console.log('update===============')
|
||||||
const result = await this.roomRemoteDataSourceService.getRoomList()
|
const result = await this.roomRemoteDataSourceService.getRoomList()
|
||||||
|
|
||||||
const localList = await this.roomLocalDataSourceService.findAll()
|
const localList = await this.roomLocalDataSourceService.findAll()
|
||||||
@@ -87,7 +87,7 @@ export class GetRoomListUseCaseService {
|
|||||||
|
|
||||||
const { roomsToDelete, roomsToInsert, roomsToUpdate } = roomListDetermineChanges(filterValidateRooms, localList.value)
|
const { roomsToDelete, roomsToInsert, roomsToUpdate } = roomListDetermineChanges(filterValidateRooms, localList.value)
|
||||||
|
|
||||||
console.log({roomsToDelete, roomsToInsert, roomsToUpdate})
|
// console.log({roomsToDelete, roomsToInsert, roomsToUpdate})
|
||||||
|
|
||||||
// sometime api return duplicated rooms
|
// sometime api return duplicated rooms
|
||||||
const insertedIds = []
|
const insertedIds = []
|
||||||
|
|||||||
@@ -152,8 +152,8 @@ export class HomePage implements OnInit {
|
|||||||
|
|
||||||
SendIntent.checkSendIntentReceived().then((result: any) => {
|
SendIntent.checkSendIntentReceived().then((result: any) => {
|
||||||
if (result) {
|
if (result) {
|
||||||
console.log('SendIntent received');
|
//console.log('SendIntent received');
|
||||||
console.log(JSON.stringify(result));
|
//console.log(JSON.stringify(result));
|
||||||
}
|
}
|
||||||
if (result.url) {
|
if (result.url) {
|
||||||
window["sharedContent"] = result;
|
window["sharedContent"] = result;
|
||||||
@@ -236,7 +236,7 @@ export class HomePage implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (this.p.userPermission([this.p.permissionList.Agenda.access]) && !this.eventService.hasAnyCalendar) {
|
if (this.p.userPermission([this.p.permissionList.Agenda.access]) && !this.eventService.hasAnyCalendar) {
|
||||||
throw ('User ' + SessionStore.user.FullName + 'has No calendar');
|
// throw ('User ' + SessionStore.user.FullName + 'has No calendar');
|
||||||
}
|
}
|
||||||
if (this.p.userPermission([this.p.permissionList.Gabinete.pr_tasks]) && SessionStore.user.RoleID != this.RoleIdService.PRES) {
|
if (this.p.userPermission([this.p.permissionList.Gabinete.pr_tasks]) && SessionStore.user.RoleID != this.RoleIdService.PRES) {
|
||||||
throw ('User has PRES permission but not roleId');
|
throw ('User has PRES permission but not roleId');
|
||||||
@@ -338,7 +338,7 @@ export class HomePage implements OnInit {
|
|||||||
|
|
||||||
logDeviceInfo = async () => {
|
logDeviceInfo = async () => {
|
||||||
const info = await Device.getInfo();
|
const info = await Device.getInfo();
|
||||||
console.log('DEVICE INFO ',info);
|
// console.log('DEVICE INFO ',info);
|
||||||
}
|
}
|
||||||
|
|
||||||
updateList() {
|
updateList() {
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ export class SignalRService {
|
|||||||
const attempConnection = await connection.establishConnection()
|
const attempConnection = await connection.establishConnection()
|
||||||
|
|
||||||
if(attempConnection.isOk()) {
|
if(attempConnection.isOk()) {
|
||||||
console.log('connect')
|
// console.log('connect')
|
||||||
this.connection?.closeConnection()
|
this.connection?.closeConnection()
|
||||||
this.connection = connection
|
this.connection = connection
|
||||||
|
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ export class SignalRConnection {
|
|||||||
.then(() => {
|
.then(() => {
|
||||||
this.hubConnection = hubConnection
|
this.hubConnection = hubConnection
|
||||||
this.hasConnectOnce = true
|
this.hasConnectOnce = true
|
||||||
console.log('Connection started');
|
// console.log('Connection started');
|
||||||
this.connectionStateSubject.next(true);
|
this.connectionStateSubject.next(true);
|
||||||
this.join()
|
this.join()
|
||||||
this.addMessageListener()
|
this.addMessageListener()
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="edit" slot="end" src="assets/images/theme/gov/icons-edit.svg" ></ion-icon>
|
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="edit" slot="end" src="assets/images/theme/gov/icons-edit.svg" ></ion-icon>
|
||||||
<ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " class="edit" slot="end" src="assets/images/theme/{{ThemeService.currentTheme}}/icons-edit.svg" ></ion-icon>
|
<ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " class="edit" slot="end" src="assets/images/theme/{{ThemeService.currentTheme}}/icons-edit.svg" ></ion-icon>
|
||||||
</button>
|
</button>
|
||||||
<button class="btn-no-color" (click)="deleteEvent()">
|
<button class="btn-no-color" (click)="deleteYesOrNo()">
|
||||||
<ion-icon class="delete" name="trash-sharp"></ion-icon>
|
<ion-icon class="delete" name="trash-sharp"></ion-icon>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
@@ -124,7 +124,7 @@
|
|||||||
<div class="buttons">
|
<div class="buttons">
|
||||||
<button (click)="editEvent()" full class="btn-ok" shape="round" >Editar</button>
|
<button (click)="editEvent()" full class="btn-ok" shape="round" >Editar</button>
|
||||||
<div class="solid"></div>
|
<div class="solid"></div>
|
||||||
<button (click)="deleteEvent()" full class="btn-delete" shape="round" >Eliminar</button>
|
<button (click)="deleteYesOrNo()" full class="btn-delete" shape="round" >Eliminar</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ import { AgendaDataRepositoryService } from 'src/app/module/agenda/data/reposito
|
|||||||
import { TracingType, XTracerAsync } from 'src/app/services/monitoring/opentelemetry/tracer';
|
import { TracingType, XTracerAsync } from 'src/app/services/monitoring/opentelemetry/tracer';
|
||||||
import { isHttpError } from 'src/app/services/http.service';
|
import { isHttpError } from 'src/app/services/http.service';
|
||||||
import { PermissionService } from 'src/app/services/permission.service';
|
import { PermissionService } from 'src/app/services/permission.service';
|
||||||
|
import { DeleteEventRecurrencePage, EventDeleteRecurrenceComponentReturn } from '../delete-event-recurrence/delete-event-recurrence.page';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-view-event',
|
selector: 'app-view-event',
|
||||||
@@ -151,11 +152,66 @@ export class ViewEventPage implements OnInit {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
deleteEvent() {
|
async deleteYesOrNo() {
|
||||||
|
if (this.loadedEvent.IsRecurring) {
|
||||||
|
|
||||||
|
const modal = await this.modalController.create({
|
||||||
|
component: DeleteEventRecurrencePage,
|
||||||
|
componentProps: {},
|
||||||
|
cssClass: 'event-recurrence-modal',
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
modal.onDidDismiss().then((res) => {
|
||||||
|
|
||||||
|
const data: EventDeleteRecurrenceComponentReturn = res.data
|
||||||
|
if(data =='DeleteAll') {
|
||||||
|
this.deleteEvent(true);
|
||||||
|
|
||||||
|
} else if (data == 'DeleteOne') {
|
||||||
|
this.deleteEvent(false);
|
||||||
|
} else if(data == 'Cancel') {
|
||||||
|
this.close()
|
||||||
|
} else {
|
||||||
|
this.close()
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
await modal.present();
|
||||||
|
|
||||||
|
} else {
|
||||||
|
this.alertController.create({
|
||||||
|
header: 'Eliminar evento?',
|
||||||
|
message: '',
|
||||||
|
buttons: [
|
||||||
|
{
|
||||||
|
text: 'Sim',
|
||||||
|
handler: (data) => {
|
||||||
|
this.deleteEvent(false);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: 'Não',
|
||||||
|
handler: () => {
|
||||||
|
// sconsole.log('Let me think');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}).then(res => {
|
||||||
|
res.present();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
async deleteEvent(deleteAll) {
|
||||||
|
|
||||||
const loader = this.toastService.loading()
|
const loader = this.toastService.loading()
|
||||||
|
|
||||||
this.eventsService.deleteEvent(this.loadedEvent.EventId, 0, this.loadedEvent.CalendarName).subscribe(async () => {
|
|
||||||
|
console.log(this.loadedEvent.EventId)
|
||||||
|
const result = await this.agendaDataRepository.deleteEvent(this.loadedEvent.EventId,deleteAll)//.subscribe(async () => {
|
||||||
|
if(result.isOk()) {
|
||||||
const alert = await this.alertController.create({
|
const alert = await this.alertController.create({
|
||||||
cssClass: 'my-custom-class',
|
cssClass: 'my-custom-class',
|
||||||
header: 'Evento removido',
|
header: 'Evento removido',
|
||||||
@@ -166,15 +222,15 @@ export class ViewEventPage implements OnInit {
|
|||||||
alert.dismiss();
|
alert.dismiss();
|
||||||
}, 1500);
|
}, 1500);
|
||||||
this.goBack();
|
this.goBack();
|
||||||
this.httpErrorHandle.httpsSucessMessagge('Evento eliminado')
|
this.httpErrorHandle.httpsSucessMessagge('delete event')
|
||||||
}, (error) => {
|
} else {
|
||||||
this.httpErrorHandle.httpStatusHandle(error)
|
|
||||||
},
|
|
||||||
() => {
|
|
||||||
loader.remove();
|
|
||||||
});
|
|
||||||
|
|
||||||
loader.remove();
|
console.log('delete event error: ', result.error)
|
||||||
|
this.httpErrorHandle.httpStatusHandle(result.error)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
loader.remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ export class AgendaLocalDataSourceService {
|
|||||||
await AgendaDataSource.shareCalendar.bulkAdd(data);
|
await AgendaDataSource.shareCalendar.bulkAdd(data);
|
||||||
|
|
||||||
});
|
});
|
||||||
console.log('Clear and add operations completed within transaction.');
|
// console.log('Clear and add operations completed within transaction.');
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('Error performing transaction:', error, data);
|
console.error('Error performing transaction:', error, data);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -335,7 +335,6 @@ export class AgendaDataRepositoryService {
|
|||||||
|
|
||||||
return this.getShareCalendarItemsLive().pipe(
|
return this.getShareCalendarItemsLive().pipe(
|
||||||
map(data => data.sort((a, b) => {
|
map(data => data.sort((a, b) => {
|
||||||
console.log('Raw data:', data); // Debug line
|
|
||||||
const priorityA = rolePriorities[a.roleId] || Infinity;
|
const priorityA = rolePriorities[a.roleId] || Infinity;
|
||||||
const priorityB = rolePriorities[b.roleId] || Infinity;
|
const priorityB = rolePriorities[b.roleId] || Infinity;
|
||||||
return priorityA - priorityB;
|
return priorityA - priorityB;
|
||||||
|
|||||||
@@ -87,7 +87,7 @@ export class LocalNotificationService {
|
|||||||
await NotificationDataSource.notification.bulkAdd(notifications);
|
await NotificationDataSource.notification.bulkAdd(notifications);
|
||||||
|
|
||||||
});
|
});
|
||||||
console.log('Clear and add operations completed within transaction.');
|
// console.log('Clear and add operations completed within transaction.');
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('Error performing transaction:', error, notifications);
|
console.error('Error performing transaction:', error, notifications);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ export class UserLocalRepositoryService {
|
|||||||
await session.profilePicture.clear();
|
await session.profilePicture.clear();
|
||||||
await session.profilePicture.add(data);
|
await session.profilePicture.add(data);
|
||||||
});
|
});
|
||||||
console.log('Clear and add operations completed within transaction.');
|
// console.log('Clear and add operations completed within transaction.');
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('Error performing transaction:', error, data);
|
console.error('Error performing transaction:', error, data);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -300,8 +300,8 @@
|
|||||||
{{ event.duration }} h
|
{{ event.duration }} h
|
||||||
</span> -->
|
</span> -->
|
||||||
</div>
|
</div>
|
||||||
<div class="font-13 calendar-owner"*ngIf="eventService.getCalendarOwnNameByCalendarId(event.event.CalendarId) == 'Meu calendario'">{{SessionStore.user.FullName}} </div>
|
<!-- <div class="font-13 calendar-owner"*ngIf="eventService.getCalendarOwnNameByCalendarId(event.event.CalendarId) == 'Meu calendario'">{{SessionStore.user.FullName}} </div>
|
||||||
<ng-template #other_content>{{eventService.getCalendarOwnNameByCalendarId(event.event.CalendarId)}}</ng-template>
|
<ng-template #other_content>{{eventService.getCalendarOwnNameByCalendarId(event.event.CalendarId)}}</ng-template> -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -73,7 +73,6 @@ export class EditEventPage implements OnInit {
|
|||||||
caller: string;
|
caller: string;
|
||||||
selectedRecurringType: any;
|
selectedRecurringType: any;
|
||||||
|
|
||||||
CalendarNameOwnerName = ''
|
|
||||||
|
|
||||||
public date: any;
|
public date: any;
|
||||||
public disabled = false;
|
public disabled = false;
|
||||||
@@ -191,7 +190,6 @@ export class EditEventPage implements OnInit {
|
|||||||
|
|
||||||
this.agendaDataRepository.getSharedCalendar()
|
this.agendaDataRepository.getSharedCalendar()
|
||||||
|
|
||||||
this.CalendarNameOwnerName = this.eventsService.detectCalendarNameByCalendarId(this.postEvent.CalendarId)
|
|
||||||
this.changeAgenda()
|
this.changeAgenda()
|
||||||
this.sharedCalendar = this.agendaDataRepository.getShareCalendarItemsLiveWithOrder()
|
this.sharedCalendar = this.agendaDataRepository.getShareCalendarItemsLiveWithOrder()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -157,7 +157,6 @@ export class NewEventPage implements OnInit {
|
|||||||
|
|
||||||
this.sharedCalendar = this.agendaDataRepository.getShareCalendarItemsLive().pipe(
|
this.sharedCalendar = this.agendaDataRepository.getShareCalendarItemsLive().pipe(
|
||||||
map(data => data.sort((a, b) => {
|
map(data => data.sort((a, b) => {
|
||||||
console.log('Raw data:', data); // Debug line
|
|
||||||
const priorityA = rolePriorities[a.roleId] || Infinity;
|
const priorityA = rolePriorities[a.roleId] || Infinity;
|
||||||
const priorityB = rolePriorities[b.roleId] || Infinity;
|
const priorityB = rolePriorities[b.roleId] || Infinity;
|
||||||
return priorityA - priorityB;
|
return priorityA - priorityB;
|
||||||
|
|||||||
@@ -31,20 +31,19 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="overflow-y-auto">
|
<div class="overflow-y-auto">
|
||||||
<div class="upper-content ml-45">
|
<div class="upper-content ml-45">
|
||||||
|
|
||||||
<div class="content-location">
|
<div class="content-location">
|
||||||
<span class="date">{{loadedEvent.Location}}</span>
|
<span class="date">{{loadedEvent.Location}}</span>
|
||||||
<div *ngIf="loadedEvent.Organizer" class="font-15-rem">
|
|
||||||
|
|
||||||
<div *ngIf="eventsService.isMyEvent(loadedEvent) == false || sesseionStora.user.Profile =='PR'">
|
<div *ngIf="loadedEvent.Organizer" class="font-15-rem">
|
||||||
|
<div *ngIf="loadedEvent.owner.wxUserId != sesseionStora.user.UserId || sesseionStora.user.Profile =='PR'">
|
||||||
<span class="label" *ngIf="loadedEvent.CalendarName == 'Oficial' " style="background-color: #99e47b;">{{loadedEvent.CalendarName}}</span>
|
<span class="label" *ngIf="loadedEvent.CalendarName == 'Oficial' " style="background-color: #99e47b;">{{loadedEvent.CalendarName}}</span>
|
||||||
<span class="label" *ngIf="loadedEvent.CalendarName == 'Pessoal' " style="background-color: #958bfc;">{{loadedEvent.CalendarName}}</span>
|
<span class="label" *ngIf="loadedEvent.CalendarName == 'Pessoal' " style="background-color: #958bfc;">{{loadedEvent.CalendarName}}</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div *ngIf="eventsService.isMyEvent(loadedEvent) == true && sesseionStora.user.Profile !='PR'">
|
<div *ngIf="loadedEvent.owner.wxUserId == sesseionStora.user.UserId && sesseionStora.user.Profile !='PR'">
|
||||||
<span class="label" *ngIf="loadedEvent.CalendarName == 'Oficial' " style="background-color: #ffb703;">{{loadedEvent.CalendarName}}</span>
|
<span class="label" *ngIf="loadedEvent.CalendarName == 'Oficial' " style="background-color: #ffb703;">{{loadedEvent.CalendarName}}</span>
|
||||||
<span class="label" *ngIf="loadedEvent.CalendarName == 'Pessoal' " style="background-color: #f05d5e;">{{loadedEvent.CalendarName}}</span>
|
<span class="label" *ngIf="loadedEvent.CalendarName == 'Pessoal' " style="background-color: #f05d5e;">{{loadedEvent.CalendarName}}</span>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,17 +0,0 @@
|
|||||||
import { NgModule } from '@angular/core';
|
|
||||||
import { Routes, RouterModule } from '@angular/router';
|
|
||||||
|
|
||||||
import { EditEventPage } from './edit-event.page';
|
|
||||||
|
|
||||||
const routes: Routes = [
|
|
||||||
{
|
|
||||||
path: '',
|
|
||||||
component: EditEventPage
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
@NgModule({
|
|
||||||
imports: [RouterModule.forChild(routes)],
|
|
||||||
exports: [RouterModule],
|
|
||||||
})
|
|
||||||
export class EditEventPageRoutingModule {}
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
import { NgModule } from '@angular/core';
|
|
||||||
import { CommonModule } from '@angular/common';
|
|
||||||
import { FormsModule } from '@angular/forms';
|
|
||||||
|
|
||||||
import { IonicModule } from '@ionic/angular';
|
|
||||||
|
|
||||||
import { EditEventPageRoutingModule } from './edit-event-routing.module';
|
|
||||||
|
|
||||||
import { EditEventPage } from './edit-event.page';
|
|
||||||
|
|
||||||
@NgModule({
|
|
||||||
imports: [
|
|
||||||
CommonModule,
|
|
||||||
FormsModule,
|
|
||||||
IonicModule,
|
|
||||||
EditEventPageRoutingModule
|
|
||||||
],
|
|
||||||
declarations: [EditEventPage],
|
|
||||||
exports: [EditEventPage]
|
|
||||||
})
|
|
||||||
export class EditEventPageModule {}
|
|
||||||
@@ -1,202 +0,0 @@
|
|||||||
<ion-header>
|
|
||||||
<ion-toolbar>
|
|
||||||
<ion-buttons slot="start">
|
|
||||||
<ion-back-button defaultHref="{{ backURL }}"></ion-back-button>
|
|
||||||
</ion-buttons>
|
|
||||||
<ion-title class="header-title">Visualizar Evento</ion-title>
|
|
||||||
<ion-buttons slot="end">
|
|
||||||
<button (click)="deleteConfirm()" class="ion-icon-delete">
|
|
||||||
<ion-icon name="trash"></ion-icon>
|
|
||||||
</button>
|
|
||||||
</ion-buttons>
|
|
||||||
</ion-toolbar>
|
|
||||||
</ion-header>
|
|
||||||
|
|
||||||
<ion-content padding>
|
|
||||||
<div *ngIf="loadedEvent">
|
|
||||||
<ion-item-group>
|
|
||||||
<ion-item-sliding>
|
|
||||||
<ion-item>
|
|
||||||
<ion-label class="capitalizeText" position="stacked">Assunto</ion-label>
|
|
||||||
<ion-input class="capitalizeText" [(ngModel)]="loadedEvent.Subject" type="text" required></ion-input>
|
|
||||||
</ion-item>
|
|
||||||
<!-- Error messages -->
|
|
||||||
<span class="error ion-padding" *ngIf="errorControl.subject.errors?.required">
|
|
||||||
Campo obrigatório
|
|
||||||
</span>
|
|
||||||
<ion-item>
|
|
||||||
<ion-label position="stacked">Descrição</ion-label>
|
|
||||||
<ion-input class="capitalizeText" [(ngModel)]='loadedEvent.Body.Text'></ion-input>
|
|
||||||
</ion-item>
|
|
||||||
<ion-item>
|
|
||||||
<ion-label position="stacked">Localização</ion-label>
|
|
||||||
<ion-input class="capitalizeText" [(ngModel)]='loadedEvent.Location'></ion-input>
|
|
||||||
</ion-item>
|
|
||||||
<ion-item>
|
|
||||||
<ion-label position="stacked">Calendário</ion-label>
|
|
||||||
<ion-select class="capitalizeText" placeholder="{{loadedEvent.CalendarName}}" [(ngModel)]="loadedEvent.CalendarName" interface="action-sheet" class="custom-options" Cancel-text="Cancelar">
|
|
||||||
<ion-select-option Pessoal="Reunião">Pessoal</ion-select-option>
|
|
||||||
<ion-select-option Oficial="Viagem">Oficial</ion-select-option>
|
|
||||||
</ion-select>
|
|
||||||
</ion-item>
|
|
||||||
<ion-item>
|
|
||||||
<ion-label position="stacked">Tipo do evento</ion-label>
|
|
||||||
<ion-select placeholder="{{loadedEvent.EventType}}" [(ngModel)]="loadedEvent.EventType" interface="action-sheet" class="custom-options" Cancel-text="Cancelar">
|
|
||||||
<ion-select-option value="Reunião">Reunião</ion-select-option>
|
|
||||||
<ion-select-option value="Viagem">Viagem</ion-select-option>
|
|
||||||
<ion-select-option value="Conferência">Conferência</ion-select-option>
|
|
||||||
<ion-select-option value="Encontro">Encontro</ion-select-option>
|
|
||||||
</ion-select>
|
|
||||||
</ion-item>
|
|
||||||
<ion-item>
|
|
||||||
<ion-label position="stacked">Data Início</ion-label>
|
|
||||||
<ion-datetime value="{{loadedEvent.StartDate}}" [(ngModel)]="loadedEvent.StartDate" min="2020" max="2100"
|
|
||||||
displayFormat="D MMM YYYY H:mm" minuteValues="0,5,10,15,20,25,30,35,40,45,50,55"
|
|
||||||
monthShortNames="Jan, Fev, Mar, Abr, Mai, Jun, Jul, Aug, Sep, Out, Nov, Dez"></ion-datetime>
|
|
||||||
</ion-item>
|
|
||||||
<ion-item>
|
|
||||||
<ion-label position="stacked">Data Fim</ion-label>
|
|
||||||
<ion-datetime value="{{loadedEvent.EndDate}}" [(ngModel)]="loadedEvent.EndDate" min="2020" max="2100"
|
|
||||||
displayFormat="D MMM YYYY HH:mm" minuteValues="0,5,10,15,20,25,30,35,40,45,50,55"
|
|
||||||
monthShortNames="Jan, Fev, Mar, Abr, Mai, Jun, Jul, Aug, Sep, Out, Nov, Dez"></ion-datetime>
|
|
||||||
</ion-item>
|
|
||||||
|
|
||||||
<div class="div-attach" >
|
|
||||||
<ion-item>
|
|
||||||
<ion-buttons slot="end" (click)="openAttendees()">
|
|
||||||
<ion-label color="secondary">Editar</ion-label>
|
|
||||||
</ion-buttons>
|
|
||||||
<ion-label class="attach-label">Intervenientes</ion-label>
|
|
||||||
</ion-item>
|
|
||||||
<div *ngIf="loadedEvent.Attendees">
|
|
||||||
<div *ngFor="let attendee of loadedEvent.Attendees; let i=index">
|
|
||||||
<div *ngIf="i<1">
|
|
||||||
<ion-list >
|
|
||||||
<ion-item class="attendees" lines="none" >
|
|
||||||
<ion-icon class="attendees-icon" name="person" slot="start"></ion-icon>
|
|
||||||
<ion-label class="capitalizeText" class="attendees-list">{{attendee.Name}}</ion-label>
|
|
||||||
</ion-item>
|
|
||||||
</ion-list>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div *ngIf="loadedEvent.Attendees.length > 1">
|
|
||||||
<button class="see-more-button" fill="none" shape="round" (click)="openAttendees()">
|
|
||||||
<ion-label color="secondary">Ver mais...</ion-label>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="div-attach">
|
|
||||||
<ion-item>
|
|
||||||
<ion-buttons slot="end" (click)="showAlert()">
|
|
||||||
<ion-label color="secondary">Editar</ion-label>
|
|
||||||
</ion-buttons>
|
|
||||||
<ion-label class="attach-label">Anexos</ion-label>
|
|
||||||
</ion-item>
|
|
||||||
<div *ngIf="loadedEventAttachments">
|
|
||||||
<div *ngFor="let att of loadedEventAttachments; let j=index">
|
|
||||||
<div *ngIf="j<2">
|
|
||||||
<ion-list *ngIf="loadedEvent.HasAttachments">
|
|
||||||
<ion-progress-bar type="indeterminate" *ngIf="showLoader"></ion-progress-bar>
|
|
||||||
<ion-item lines="none" (click)="viewDocument(att.Link)">
|
|
||||||
<ion-icon name="attach" slot="start"></ion-icon>
|
|
||||||
<ion-label>
|
|
||||||
<p>{{ att.Description }}</p>
|
|
||||||
<p>{{ att.CreateDate }}</p>
|
|
||||||
</ion-label>
|
|
||||||
</ion-item>
|
|
||||||
</ion-list>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div *ngIf="loadedEventAttachments.length > 1">
|
|
||||||
<button class="see-more-button" fill="none" shape="round" (click)="openAttachments()"><!-- [routerLink]="['/home/attachments', loadedEvent.EventId]" -->
|
|
||||||
<ion-label color="secondary">Ver mais...</ion-label>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<ion-list *ngIf="!loadedEvent.HasAttachments">
|
|
||||||
<ion-item lines="none" >
|
|
||||||
<ion-label>
|
|
||||||
Sem anexos
|
|
||||||
</ion-label>
|
|
||||||
</ion-item>
|
|
||||||
</ion-list>
|
|
||||||
</div>
|
|
||||||
</ion-item-sliding>
|
|
||||||
</ion-item-group>
|
|
||||||
</div>
|
|
||||||
<!-- Skeleton screen -->
|
|
||||||
<div *ngIf="!loadedEvent">
|
|
||||||
<div class="ion-padding custom-skeleton">
|
|
||||||
<ion-skeleton-text animated style="width: 60%"></ion-skeleton-text>
|
|
||||||
<ion-skeleton-text animated></ion-skeleton-text>
|
|
||||||
<ion-skeleton-text animated style="width: 88%"></ion-skeleton-text>
|
|
||||||
<ion-skeleton-text animated style="width: 70%"></ion-skeleton-text>
|
|
||||||
<ion-skeleton-text animated style="width: 60%"></ion-skeleton-text>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<ion-list>
|
|
||||||
<ion-list-header>
|
|
||||||
<ion-label>
|
|
||||||
<ion-skeleton-text animated style="width: 20%"></ion-skeleton-text>
|
|
||||||
</ion-label>
|
|
||||||
</ion-list-header>
|
|
||||||
<ion-item>
|
|
||||||
<ion-avatar slot="start">
|
|
||||||
<ion-skeleton-text animated></ion-skeleton-text>
|
|
||||||
</ion-avatar>
|
|
||||||
<ion-label>
|
|
||||||
<h3>
|
|
||||||
<ion-skeleton-text animated style="width: 50%"></ion-skeleton-text>
|
|
||||||
</h3>
|
|
||||||
<p>
|
|
||||||
<ion-skeleton-text animated style="width: 80%"></ion-skeleton-text>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<ion-skeleton-text animated style="width: 60%"></ion-skeleton-text>
|
|
||||||
</p>
|
|
||||||
</ion-label>
|
|
||||||
</ion-item>
|
|
||||||
<ion-item>
|
|
||||||
<ion-thumbnail slot="start">
|
|
||||||
<ion-skeleton-text animated></ion-skeleton-text>
|
|
||||||
</ion-thumbnail>
|
|
||||||
<ion-label>
|
|
||||||
<h3>
|
|
||||||
<ion-skeleton-text animated style="width: 50%"></ion-skeleton-text>
|
|
||||||
</h3>
|
|
||||||
<p>
|
|
||||||
<ion-skeleton-text animated style="width: 80%"></ion-skeleton-text>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<ion-skeleton-text animated style="width: 60%"></ion-skeleton-text>
|
|
||||||
</p>
|
|
||||||
</ion-label>
|
|
||||||
</ion-item>
|
|
||||||
<ion-item>
|
|
||||||
<ion-skeleton-text animated style="width: 27px; height: 27px" slot="start"></ion-skeleton-text>
|
|
||||||
<ion-label>
|
|
||||||
<h3>
|
|
||||||
<ion-skeleton-text animated style="width: 50%"></ion-skeleton-text>
|
|
||||||
</h3>
|
|
||||||
<p>
|
|
||||||
<ion-skeleton-text animated style="width: 80%"></ion-skeleton-text>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<ion-skeleton-text animated style="width: 60%"></ion-skeleton-text>
|
|
||||||
</p>
|
|
||||||
</ion-label>
|
|
||||||
</ion-item>
|
|
||||||
</ion-list>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</ion-content>
|
|
||||||
<ion-footer>
|
|
||||||
<ion-toolbar>
|
|
||||||
<div class="event-detail-buttons">
|
|
||||||
<button class="btn-ok" fill="clear" color="#fff" shape="round" (click)="Save()">Enviar</button>
|
|
||||||
</div>
|
|
||||||
</ion-toolbar>
|
|
||||||
</ion-footer>
|
|
||||||
|
|
||||||
@@ -1,167 +0,0 @@
|
|||||||
@import '~src/function.scss';
|
|
||||||
|
|
||||||
.content{
|
|
||||||
padding: 30px 20px 0 20px !important;
|
|
||||||
margin: 0;
|
|
||||||
float: left;
|
|
||||||
border-left: 1px solid #d8d8d8 !important;
|
|
||||||
}
|
|
||||||
.main-header{
|
|
||||||
font-family: Roboto;
|
|
||||||
background-color: #fff;
|
|
||||||
overflow:hidden;
|
|
||||||
color:#000;
|
|
||||||
transform: translate3d(0, 1px, 0);
|
|
||||||
|
|
||||||
.title-content{
|
|
||||||
margin: 0px auto;
|
|
||||||
overflow: auto;
|
|
||||||
padding: 0 !important;
|
|
||||||
background: #fff;
|
|
||||||
.middle{
|
|
||||||
padding: 0!important;
|
|
||||||
float: left;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.title{
|
|
||||||
font-size: rem(25);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
.ion-item-container{
|
|
||||||
margin: rem(15) auto;
|
|
||||||
border: 1px solid #ebebeb;
|
|
||||||
border-radius: 5px;
|
|
||||||
padding-left: 10px;
|
|
||||||
}
|
|
||||||
.ion-item-container-no-border{
|
|
||||||
width: 100%;
|
|
||||||
margin: 0px auto;
|
|
||||||
padding: 0 !important;
|
|
||||||
overflow: auto;
|
|
||||||
}
|
|
||||||
.container-div{
|
|
||||||
margin-bottom: 15px;
|
|
||||||
float: left;
|
|
||||||
overflow: auto;
|
|
||||||
}
|
|
||||||
.ion-item-class-2{
|
|
||||||
margin: 0px auto;
|
|
||||||
}
|
|
||||||
.ion-icon-class{
|
|
||||||
width: rem(45);
|
|
||||||
height: rem(45);
|
|
||||||
float: left;
|
|
||||||
padding: 10px;
|
|
||||||
font-size: rem(25);
|
|
||||||
}
|
|
||||||
ion-select{
|
|
||||||
padding-left: 5px;
|
|
||||||
margin-left: 0;
|
|
||||||
}
|
|
||||||
.ion-input-class{
|
|
||||||
width: calc(100% - 45px);
|
|
||||||
height: rem(45);
|
|
||||||
border: 1px solid #ebebeb;
|
|
||||||
border-radius: 5px;
|
|
||||||
padding-left: 5px;
|
|
||||||
padding-right: 10px;
|
|
||||||
float: left;
|
|
||||||
}
|
|
||||||
.ion-input-class-no-height{
|
|
||||||
border: 1px solid #ebebeb;
|
|
||||||
border-radius: 5px;
|
|
||||||
overflow: auto;
|
|
||||||
}
|
|
||||||
.list-people{
|
|
||||||
//width: 256px;
|
|
||||||
float: left;
|
|
||||||
|
|
||||||
}
|
|
||||||
.add-people{
|
|
||||||
width: rem(45);
|
|
||||||
float: right;
|
|
||||||
overflow: auto;
|
|
||||||
font-size: rem(25);
|
|
||||||
height: rem(45);
|
|
||||||
display: flex;
|
|
||||||
}
|
|
||||||
.list-people-title{
|
|
||||||
/* font-size: rem(13); */
|
|
||||||
color: #797979;
|
|
||||||
}
|
|
||||||
.attach-document{
|
|
||||||
font-size: rem(15);
|
|
||||||
color: var(--title-text-color);
|
|
||||||
margin: 5px 5px 5px 10px;
|
|
||||||
padding: 5px;
|
|
||||||
float: left;
|
|
||||||
}
|
|
||||||
.attach-icon{
|
|
||||||
width: 37px;
|
|
||||||
font-size: rem(35);
|
|
||||||
float: left;
|
|
||||||
}
|
|
||||||
.attach-title-item{
|
|
||||||
width: 100%;
|
|
||||||
font-size: rem(15);
|
|
||||||
color:var(--title-text-color);
|
|
||||||
}
|
|
||||||
/* SPAN */
|
|
||||||
.span-left{
|
|
||||||
float: left;
|
|
||||||
font-size: rem(15);
|
|
||||||
}
|
|
||||||
.span-right{
|
|
||||||
text-align: right;
|
|
||||||
float: right;
|
|
||||||
font-size: rem(13);
|
|
||||||
}
|
|
||||||
.container-footer{
|
|
||||||
margin:0 auto;
|
|
||||||
overflow: auto;
|
|
||||||
}
|
|
||||||
.button-cancel {
|
|
||||||
width: rem(170);
|
|
||||||
height: rem(44);
|
|
||||||
border-radius: 22.5px;
|
|
||||||
--background: #e0e9ee;
|
|
||||||
--color: #061b52;
|
|
||||||
margin:10px;
|
|
||||||
}
|
|
||||||
.button-save {
|
|
||||||
width: rem(170);
|
|
||||||
height: rem(44);
|
|
||||||
border-radius: 22.5px;
|
|
||||||
--background: #42b9fe;
|
|
||||||
--color:#ffffff;
|
|
||||||
margin:10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.text-input{
|
|
||||||
width: 100%;
|
|
||||||
border: 1px solid #ebebeb;
|
|
||||||
margin: 0px 15px 15px 0px;
|
|
||||||
padding: 0 !important;
|
|
||||||
border-radius: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Error Messages */
|
|
||||||
.error{
|
|
||||||
color:red;
|
|
||||||
font-size: rem(12);
|
|
||||||
font-weight: bold;
|
|
||||||
padding-bottom: 20px;
|
|
||||||
}
|
|
||||||
.span-color{
|
|
||||||
color:red;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.buttons{
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
padding: 20px;
|
|
||||||
overflow: auto;
|
|
||||||
}
|
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
import { HttpClientModule } from '@angular/common/http';
|
|
||||||
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
|
|
||||||
import { IonicModule } from '@ionic/angular';
|
|
||||||
|
|
||||||
import { EditEventPage } from './edit-event.page';
|
|
||||||
|
|
||||||
describe('EditEventPage', () => {
|
|
||||||
let component: EditEventPage;
|
|
||||||
let fixture: ComponentFixture<EditEventPage>;
|
|
||||||
|
|
||||||
beforeEach(waitForAsync(() => {
|
|
||||||
TestBed.configureTestingModule({
|
|
||||||
declarations: [ EditEventPage ],
|
|
||||||
imports: [
|
|
||||||
IonicModule.forRoot(),
|
|
||||||
HttpClientModule
|
|
||||||
]
|
|
||||||
}).compileComponents();
|
|
||||||
|
|
||||||
fixture = TestBed.createComponent(EditEventPage);
|
|
||||||
component = fixture.componentInstance;
|
|
||||||
fixture.detectChanges();
|
|
||||||
}));
|
|
||||||
|
|
||||||
it('should create', () => {
|
|
||||||
expect(component).toBeTruthy();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
@@ -1,251 +0,0 @@
|
|||||||
import { Component, OnInit } from '@angular/core';
|
|
||||||
import { ActivatedRoute } from '@angular/router';
|
|
||||||
import { EventsService } from 'src/app/services/events.service';
|
|
||||||
import { Router } from '@angular/router';
|
|
||||||
import { Event } from '../../../models/event.model';
|
|
||||||
import { EventBody } from 'src/app/models/eventbody.model';
|
|
||||||
import { AlertController, ModalController } from '@ionic/angular';
|
|
||||||
import { EventPerson } from 'src/app/models/eventperson.model';
|
|
||||||
import { AttendeesPageModal } from 'src/app/pages/events/attendees/attendees.page';
|
|
||||||
import { AlertService } from 'src/app/services/alert.service';
|
|
||||||
import { Attachment } from 'src/app/models/attachment.model';
|
|
||||||
import { AttachmentsService } from 'src/app/services/attachments.service';
|
|
||||||
import { FormGroup, FormBuilder, Validators } from "@angular/forms";
|
|
||||||
import { InAppBrowser } from '@ionic-native/in-app-browser/ngx';
|
|
||||||
import { AttachmentsPage } from '../attachments/attachments.page';
|
|
||||||
|
|
||||||
@Component({
|
|
||||||
selector: 'app-edit-event',
|
|
||||||
templateUrl: './edit-event.page.html',
|
|
||||||
styleUrls: ['./edit-event.page.scss'],
|
|
||||||
})
|
|
||||||
|
|
||||||
export class EditEventPage implements OnInit {
|
|
||||||
|
|
||||||
loadedEvent: Event;
|
|
||||||
loadedEventAttachments: Attachment[];
|
|
||||||
pageId: string;
|
|
||||||
showLoader: boolean;
|
|
||||||
backURL: string;
|
|
||||||
ionicForm: FormGroup;
|
|
||||||
isSubmitted = false;
|
|
||||||
|
|
||||||
minDate: Date;
|
|
||||||
|
|
||||||
profile:string;
|
|
||||||
|
|
||||||
constructor(
|
|
||||||
public formBuilder: FormBuilder,
|
|
||||||
public alertController: AlertController,
|
|
||||||
private router: Router,
|
|
||||||
private activatedRoute: ActivatedRoute,
|
|
||||||
private eventsService: EventsService,
|
|
||||||
private modalCtrl: ModalController,
|
|
||||||
private alertService: AlertService,
|
|
||||||
private attachamentsService: AttachmentsService,
|
|
||||||
private route: Router,
|
|
||||||
private iab: InAppBrowser) {
|
|
||||||
this.loadedEvent = new Event();
|
|
||||||
this.loadedEvent.Body = new EventBody();
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
ngOnInit() {
|
|
||||||
this.loadEvent();
|
|
||||||
this.loadAttachments();
|
|
||||||
this.ionicForm = this.formBuilder.group({
|
|
||||||
subject: ['', [Validators.required]]
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
get errorControl() {
|
|
||||||
return this.ionicForm.controls;
|
|
||||||
}
|
|
||||||
|
|
||||||
loadEvent(){
|
|
||||||
let eventid: string;
|
|
||||||
this.activatedRoute.paramMap.subscribe(paramMap =>
|
|
||||||
{
|
|
||||||
if (!paramMap.has("eventId")){
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
this.pageId = paramMap.get('eventId');
|
|
||||||
eventid = paramMap.get('eventId');
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
if (paramMap.has("caller")){
|
|
||||||
this.backURL = "/home/" + paramMap.get('caller');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
);
|
|
||||||
this.eventsService.getEvent(eventid).subscribe(response => {
|
|
||||||
this.loadedEvent = response;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
async openAttendees(){
|
|
||||||
const modal = await this.modalCtrl.create({
|
|
||||||
component: AttendeesPageModal,
|
|
||||||
componentProps: {
|
|
||||||
hideExternalDomain: false,
|
|
||||||
eventAttendees: this.loadedEvent.Attendees
|
|
||||||
},
|
|
||||||
cssClass: 'attendee modal-desktop',
|
|
||||||
backdropDismiss: false
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
modal.onDidDismiss().then((data) => {
|
|
||||||
if (data['data'] != null)
|
|
||||||
{
|
|
||||||
let newattendees: EventPerson[] = data['data'];
|
|
||||||
this.loadedEvent.Attendees = newattendees;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
await modal.present();
|
|
||||||
}
|
|
||||||
|
|
||||||
getEventAttendees(): EventPerson[]
|
|
||||||
{
|
|
||||||
return this.loadedEvent.Attendees;
|
|
||||||
}
|
|
||||||
|
|
||||||
setEventAttendees(newattendes: EventPerson[])
|
|
||||||
{
|
|
||||||
this.loadedEvent.Attendees = newattendes;
|
|
||||||
}
|
|
||||||
|
|
||||||
async deleteConfirm()
|
|
||||||
{
|
|
||||||
const alert = await this.alertController.create({
|
|
||||||
cssClass: 'my-custom-class',
|
|
||||||
header: 'Apagar evento!',
|
|
||||||
message: 'Deseja <strong>apagar</strong> o evento da agenda ' + this.loadedEvent.CalendarName + '?',
|
|
||||||
buttons: [
|
|
||||||
{
|
|
||||||
text: 'Não',
|
|
||||||
role: 'cancel',
|
|
||||||
cssClass: 'secondary',
|
|
||||||
handler: () => { }
|
|
||||||
}, {
|
|
||||||
text: 'Sim',
|
|
||||||
handler: () => {
|
|
||||||
this.Delete();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
});
|
|
||||||
|
|
||||||
await alert.present();
|
|
||||||
}
|
|
||||||
|
|
||||||
Delete()
|
|
||||||
{
|
|
||||||
this.eventsService.deleteEvent(this.loadedEvent.EventId, 0, this.loadedEvent.CalendarName).subscribe(async () =>
|
|
||||||
{
|
|
||||||
const alert = await this.alertController.create({
|
|
||||||
cssClass: 'my-custom-class',
|
|
||||||
header: 'Evento removido',
|
|
||||||
buttons: ['OK']
|
|
||||||
});
|
|
||||||
|
|
||||||
setTimeout(()=>{
|
|
||||||
alert.dismiss();
|
|
||||||
}, 1500);
|
|
||||||
|
|
||||||
this.router.navigate(['/home/events']);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
Save()
|
|
||||||
{
|
|
||||||
// if (this.ionicForm.valid){
|
|
||||||
|
|
||||||
// this.activatedRoute.paramMap.subscribe(paramMap =>{
|
|
||||||
// if (paramMap.has("profile")){
|
|
||||||
|
|
||||||
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
|
|
||||||
// this.eventsService.editEvent(this.loadedEvent, 2, 3).subscribe(async () =>
|
|
||||||
// {
|
|
||||||
// const alert = await this.alertController.create({
|
|
||||||
// cssClass: 'my-custom-class',
|
|
||||||
// header: 'Evento actualizado',
|
|
||||||
// buttons: ['OK']
|
|
||||||
// });
|
|
||||||
|
|
||||||
// setTimeout(()=>{
|
|
||||||
// alert.dismiss();
|
|
||||||
// }, 1500);
|
|
||||||
// });
|
|
||||||
// }
|
|
||||||
}
|
|
||||||
|
|
||||||
showAlert(){
|
|
||||||
this.alertService.presentAlert("Funcionalidade em desenvolvimento");
|
|
||||||
}
|
|
||||||
|
|
||||||
loadAttachments()
|
|
||||||
{
|
|
||||||
this.attachamentsService.getAttachmentsById(this.pageId).subscribe(res => {
|
|
||||||
this.loadedEventAttachments = res;
|
|
||||||
|
|
||||||
|
|
||||||
},((erro) => {
|
|
||||||
console.error('loadAttchament', erro)
|
|
||||||
}));
|
|
||||||
}
|
|
||||||
async viewDocument(documenturl:string)
|
|
||||||
{
|
|
||||||
const url: string = documenturl.replace("webTRIX.Viewer","webTRIX.Viewer.Branch1");
|
|
||||||
const browser = this.iab.create(url,"_blank");
|
|
||||||
browser.show();
|
|
||||||
}
|
|
||||||
|
|
||||||
back()
|
|
||||||
{
|
|
||||||
//this.back();
|
|
||||||
}
|
|
||||||
doRefresh(event){
|
|
||||||
/* this.RefreshEvents(); */
|
|
||||||
try {
|
|
||||||
event?.target?.complete();
|
|
||||||
} catch(error) {}
|
|
||||||
setTimeout(() => {
|
|
||||||
try {
|
|
||||||
event?.target?.complete();
|
|
||||||
} catch(error) {}
|
|
||||||
}, 2000);
|
|
||||||
|
|
||||||
}
|
|
||||||
navigateTo(ev){
|
|
||||||
this.route.navigate(['/home/events',ev]);
|
|
||||||
}
|
|
||||||
async openAttachments(){
|
|
||||||
const modal = await this.modalCtrl.create({
|
|
||||||
component: AttachmentsPage,
|
|
||||||
componentProps: {
|
|
||||||
eventId: this.pageId,
|
|
||||||
attachments: this.loadedEventAttachments
|
|
||||||
},
|
|
||||||
cssClass: 'attachments',
|
|
||||||
backdropDismiss: false
|
|
||||||
});
|
|
||||||
|
|
||||||
await modal.present();
|
|
||||||
|
|
||||||
modal.onDidDismiss().then((data) => {
|
|
||||||
if (data['data'] != null)
|
|
||||||
{
|
|
||||||
let newattendees: EventPerson[] = data['data'];
|
|
||||||
this.loadedEvent.Attendees = newattendees;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -16,10 +16,6 @@ const routes: Routes = [
|
|||||||
path: 'attendees',
|
path: 'attendees',
|
||||||
loadChildren: () => import('./attendees/attendees.module').then( m => m.AttendeesPageModule)
|
loadChildren: () => import('./attendees/attendees.module').then( m => m.AttendeesPageModule)
|
||||||
},
|
},
|
||||||
{
|
|
||||||
path: 'edit-event',
|
|
||||||
loadChildren: () => import('./edit-event/edit-event.module').then( m => m.EditEventPageModule)
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|||||||
+207
-207
@@ -76,14 +76,14 @@ export class EventsService {
|
|||||||
private offlinemanager: OfflineManagerService) {
|
private offlinemanager: OfflineManagerService) {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
this.setHeader()
|
//this.setHeader()
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.log(e)
|
console.log(e)
|
||||||
}
|
}
|
||||||
|
|
||||||
this.changeProfileService.registerCallback(() => {
|
this.changeProfileService.registerCallback(() => {
|
||||||
try {
|
try {
|
||||||
this.setHeader()
|
//this.setHeader()
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.log(e)
|
console.log(e)
|
||||||
}
|
}
|
||||||
@@ -407,55 +407,55 @@ export class EventsService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
DetectCalendars(CalendarId) {
|
// DetectCalendars(CalendarId) {
|
||||||
const calendars = SessionStore.user.OwnerCalendars.concat(SessionStore.user.SharedCalendars)
|
// const calendars = SessionStore.user.OwnerCalendars.concat(SessionStore.user.SharedCalendars)
|
||||||
return calendars.find((e) => e.CalendarId == CalendarId)
|
// return calendars.find((e) => e.CalendarId == CalendarId)
|
||||||
}
|
// }
|
||||||
|
|
||||||
makeHeader(calendar: calendarInterface) {
|
// makeHeader(calendar: calendarInterface) {
|
||||||
let header = new HttpHeaders();;
|
// let header = new HttpHeaders();;
|
||||||
header = header.set('Authorization', 'Bearer ' + SessionStore.user.Authorization);
|
// header = header.set('Authorization', 'Bearer ' + SessionStore.user.Authorization);
|
||||||
header = header.set('CalendarId', calendar.CalendarId);
|
// header = header.set('CalendarId', calendar.CalendarId);
|
||||||
header = header.set('CalendarRoleId', calendar.CalendarRoleId);
|
// header = header.set('CalendarRoleId', calendar.CalendarRoleId);
|
||||||
header = header.set('CalendarName', calendar.CalendarName);
|
// header = header.set('CalendarName', calendar.CalendarName);
|
||||||
|
|
||||||
return header
|
// return header
|
||||||
}
|
// }
|
||||||
|
|
||||||
|
|
||||||
isMyCalendar(CalendarId) {
|
// isMyCalendar(CalendarId) {
|
||||||
return this.myCalendarNames[CalendarId] || ""
|
// return this.myCalendarNames[CalendarId] || ""
|
||||||
}
|
// }
|
||||||
|
|
||||||
getCalendarOwnNameByCalendarId(CalendarId) {
|
// getCalendarOwnNameByCalendarId(CalendarId) {
|
||||||
return this.calendarNames[CalendarId] || ""
|
// return this.calendarNames[CalendarId] || ""
|
||||||
}
|
// }
|
||||||
|
|
||||||
|
|
||||||
isMyEvent(event: any) {
|
// isMyEvent(event: any) {
|
||||||
|
|
||||||
const data: any = event
|
// const data: any = event
|
||||||
return data.owner.wxUserId == SessionStore.user.UserId
|
// return data.owner.wxUserId == SessionStore.user.UserId
|
||||||
|
|
||||||
}
|
// }
|
||||||
|
|
||||||
|
|
||||||
detectCalendarNameByCalendarId(calendarId) {
|
// detectCalendarNameByCalendarId(calendarId) {
|
||||||
|
|
||||||
for ( const property in this.calendarNamesType) {
|
// for ( const property in this.calendarNamesType) {
|
||||||
if(this.calendarNamesType[property]?.['Oficial']) {
|
// if(this.calendarNamesType[property]?.['Oficial']) {
|
||||||
if(this.calendarNamesType[property]['OficialId'] == calendarId) {
|
// if(this.calendarNamesType[property]['OficialId'] == calendarId) {
|
||||||
return property
|
// return property
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
if (this.calendarNamesType[property]?.['Pessoal']) {
|
// if (this.calendarNamesType[property]?.['Pessoal']) {
|
||||||
if(this.calendarNamesType[property]['PessoalId'] == calendarId) {
|
// if(this.calendarNamesType[property]['PessoalId'] == calendarId) {
|
||||||
return property
|
// return property
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
}
|
// }
|
||||||
|
|
||||||
|
|
||||||
// getAllPrOficialEvents(startdate: string, enddate: string): Observable<EventList[]> {
|
// getAllPrOficialEvents(startdate: string, enddate: string): Observable<EventList[]> {
|
||||||
@@ -854,28 +854,28 @@ export class EventsService {
|
|||||||
return this.http.get<Event>(`${geturl}`, options);
|
return this.http.get<Event>(`${geturl}`, options);
|
||||||
}
|
}
|
||||||
|
|
||||||
genericGetEvent(eventid: string, calendarId: string) {
|
// genericGetEvent(eventid: string, calendarId: string) {
|
||||||
let geturl = environment.apiURL + 'calendar/GetEvent';
|
// let geturl = environment.apiURL + 'calendar/GetEvent';
|
||||||
let params = new HttpParams();
|
// let params = new HttpParams();
|
||||||
|
|
||||||
params = params.set("EventId", eventid);
|
// params = params.set("EventId", eventid);
|
||||||
|
|
||||||
const calendar = this.DetectCalendars(calendarId)
|
// const calendar = this.DetectCalendars(calendarId)
|
||||||
const header = this.makeHeader(calendar)
|
// const header = this.makeHeader(calendar)
|
||||||
|
|
||||||
if(header) {
|
// if(header) {
|
||||||
let options = {
|
// let options = {
|
||||||
headers: header,
|
// headers: header,
|
||||||
params: params
|
// params: params
|
||||||
}
|
// }
|
||||||
|
|
||||||
return this.http.get<Event>(`${geturl}`, options);
|
// return this.http.get<Event>(`${geturl}`, options);
|
||||||
} else {
|
// } else {
|
||||||
|
|
||||||
}
|
// }
|
||||||
|
|
||||||
throw('error')
|
// throw('error')
|
||||||
}
|
// }
|
||||||
|
|
||||||
// putEvent(event: Event, conflictResolutionMode: number, sendInvitationsOrCancellationsMode: number, sharedagenda: string): Observable<Event> {
|
// putEvent(event: Event, conflictResolutionMode: number, sendInvitationsOrCancellationsMode: number, sharedagenda: string): Observable<Event> {
|
||||||
// const puturl = environment.apiURL + 'calendar/' + ((sharedagenda != '') ? sharedagenda : 'PutEvent');
|
// const puturl = environment.apiURL + 'calendar/' + ((sharedagenda != '') ? sharedagenda : 'PutEvent');
|
||||||
@@ -1019,154 +1019,154 @@ export class EventsService {
|
|||||||
// return this.http.post<any>(`${puturl}`, body, options);
|
// return this.http.post<any>(`${puturl}`, body, options);
|
||||||
// }
|
// }
|
||||||
|
|
||||||
postEventMd(event: Event, calendarName: string) {
|
// postEventMd(event: Event, calendarName: string) {
|
||||||
const puturl = environment.apiURL + 'calendar/md';
|
// const puturl = environment.apiURL + 'calendar/md';
|
||||||
let params = new HttpParams();
|
// let params = new HttpParams();
|
||||||
|
|
||||||
const now = new Date();
|
// const now = new Date();
|
||||||
event.TimeZone = now.toString().match(/([A-Z]+[\+-][0-9]+.*)/)[1]
|
// event.TimeZone = now.toString().match(/([A-Z]+[\+-][0-9]+.*)/)[1]
|
||||||
|
|
||||||
params = params.set("CalendarName", calendarName);
|
// params = params.set("CalendarName", calendarName);
|
||||||
|
|
||||||
let options: any;
|
// let options: any;
|
||||||
switch (calendarName) {
|
// switch (calendarName) {
|
||||||
case 'Oficial':
|
// case 'Oficial':
|
||||||
|
|
||||||
options = {
|
// options = {
|
||||||
headers: this.headersMdOficial,
|
// headers: this.headersMdOficial,
|
||||||
params: params
|
// params: params
|
||||||
};
|
// };
|
||||||
break;
|
// break;
|
||||||
|
|
||||||
case 'Pessoal':
|
// case 'Pessoal':
|
||||||
|
|
||||||
options = {
|
// options = {
|
||||||
headers: this.headersMdPessoal,
|
// headers: this.headersMdPessoal,
|
||||||
params: params
|
// params: params
|
||||||
};
|
// };
|
||||||
break;
|
// break;
|
||||||
}
|
// }
|
||||||
|
|
||||||
return this.http.post<string>(`${puturl}`, event, options)
|
// return this.http.post<string>(`${puturl}`, event, options)
|
||||||
}
|
// }
|
||||||
|
|
||||||
postEventPr(event: Event, calendarName: string) {
|
// postEventPr(event: Event, calendarName: string) {
|
||||||
const puturl = environment.apiURL + 'calendar/pr';
|
// const puturl = environment.apiURL + 'calendar/pr';
|
||||||
let params = new HttpParams();
|
// let params = new HttpParams();
|
||||||
|
|
||||||
const now = new Date();
|
// const now = new Date();
|
||||||
event.TimeZone = now.toString().match(/([A-Z]+[\+-][0-9]+.*)/)[1]
|
// event.TimeZone = now.toString().match(/([A-Z]+[\+-][0-9]+.*)/)[1]
|
||||||
|
|
||||||
params = params.set("CalendarName", calendarName);
|
// params = params.set("CalendarName", calendarName);
|
||||||
params = params.set("notifyUsers", true)
|
// params = params.set("notifyUsers", true)
|
||||||
|
|
||||||
let options: any;
|
// let options: any;
|
||||||
switch (calendarName) {
|
// switch (calendarName) {
|
||||||
case 'Oficial':
|
// case 'Oficial':
|
||||||
|
|
||||||
options = {
|
// options = {
|
||||||
headers: this.headersPrOficial,
|
// headers: this.headersPrOficial,
|
||||||
params: params
|
// params: params
|
||||||
};
|
// };
|
||||||
break;
|
// break;
|
||||||
|
|
||||||
case 'Pessoal':
|
// case 'Pessoal':
|
||||||
|
|
||||||
options = {
|
// options = {
|
||||||
headers: this.headersPrPessoal,
|
// headers: this.headersPrPessoal,
|
||||||
params: params
|
// params: params
|
||||||
};
|
// };
|
||||||
break;
|
// break;
|
||||||
}
|
// }
|
||||||
|
|
||||||
return this.http.post<string>(`${puturl}`, event, options)
|
// return this.http.post<string>(`${puturl}`, event, options)
|
||||||
}
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
postEventGeneric(event: Event, calendarName: string, CalendarId) {
|
// postEventGeneric(event: Event, calendarName: string, CalendarId) {
|
||||||
const puturl = environment.apiURL + 'Calendar/PostEvent';
|
// const puturl = environment.apiURL + 'Calendar/PostEvent';
|
||||||
let params = new HttpParams();
|
// let params = new HttpParams();
|
||||||
|
|
||||||
const now = new Date();
|
// const now = new Date();
|
||||||
|
|
||||||
event.TimeZone = now.toString().match(/([A-Z]+[\+-][0-9]+.*)/)[1];
|
// event.TimeZone = now.toString().match(/([A-Z]+[\+-][0-9]+.*)/)[1];
|
||||||
event.Organizer = {
|
// event.Organizer = {
|
||||||
"Id": SessionStore.user.UserId,
|
// "Id": SessionStore.user.UserId,
|
||||||
"EmailAddress": SessionStore.user.Email,
|
// "EmailAddress": SessionStore.user.Email,
|
||||||
"Name": SessionStore.user.UserName,
|
// "Name": SessionStore.user.UserName,
|
||||||
"IsRequired": true,
|
// "IsRequired": true,
|
||||||
"UserType": "GD"
|
// "UserType": "GD"
|
||||||
}
|
// }
|
||||||
|
|
||||||
params = params.set("CalendarName", calendarName);
|
// params = params.set("CalendarName", calendarName);
|
||||||
params = params.set("notifyUsers", true)
|
// params = params.set("notifyUsers", true)
|
||||||
|
|
||||||
let options: any;
|
// let options: any;
|
||||||
|
|
||||||
const calendar = this.DetectCalendars(CalendarId)
|
// const calendar = this.DetectCalendars(CalendarId)
|
||||||
const header = this.makeHeader(calendar)
|
// const header = this.makeHeader(calendar)
|
||||||
|
|
||||||
options = {
|
// options = {
|
||||||
headers: header,
|
// headers: header,
|
||||||
params: params
|
// params: params
|
||||||
};
|
// };
|
||||||
|
|
||||||
return this.http.post<string>(`${puturl}`, event, options)
|
// return this.http.post<string>(`${puturl}`, event, options)
|
||||||
}
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
deleteEvent(eventid: string, eventDeleteType: number, calendarName: string) {
|
// deleteEvent(eventid: string, eventDeleteType: number, calendarName: string) {
|
||||||
let arrayReq = [];
|
// let arrayReq = [];
|
||||||
let Object = {
|
// let Object = {
|
||||||
eventid: eventid,
|
// eventid: eventid,
|
||||||
eventDeleteType: eventDeleteType,
|
// eventDeleteType: eventDeleteType,
|
||||||
calendarName: calendarName
|
// calendarName: calendarName
|
||||||
}
|
// }
|
||||||
arrayReq.push(Object)
|
// arrayReq.push(Object)
|
||||||
const puturl = environment.apiURL + 'calendar/DeleteEvent';
|
// const puturl = environment.apiURL + 'calendar/DeleteEvent';
|
||||||
let params = new HttpParams();
|
// let params = new HttpParams();
|
||||||
|
|
||||||
params = params.set("EventId", eventid);
|
// params = params.set("EventId", eventid);
|
||||||
// 0 for occurence and 1 for serie (delete all events)
|
// // 0 for occurence and 1 for serie (delete all events)
|
||||||
params = params.set("eventDeleteType", eventDeleteType.toString());
|
// params = params.set("eventDeleteType", eventDeleteType.toString());
|
||||||
|
|
||||||
let options;
|
// let options;
|
||||||
|
|
||||||
switch (SessionStore.user.Profile) {
|
// switch (SessionStore.user.Profile) {
|
||||||
case 'MDGPR':
|
// case 'MDGPR':
|
||||||
if (calendarName == 'Pessoal') {
|
// if (calendarName == 'Pessoal') {
|
||||||
options = {
|
// options = {
|
||||||
headers: this.headersMdPessoal,
|
// headers: this.headersMdPessoal,
|
||||||
params: params
|
// params: params
|
||||||
};
|
// };
|
||||||
}
|
// }
|
||||||
else if (calendarName == 'Oficial') {
|
// else if (calendarName == 'Oficial') {
|
||||||
options = {
|
// options = {
|
||||||
headers: this.headersMdOficial,
|
// headers: this.headersMdOficial,
|
||||||
params: params
|
// params: params
|
||||||
};
|
// };
|
||||||
}
|
// }
|
||||||
break;
|
// break;
|
||||||
case 'PR':
|
// case 'PR':
|
||||||
if (calendarName == 'Pessoal') {
|
// if (calendarName == 'Pessoal') {
|
||||||
options = {
|
// options = {
|
||||||
headers: this.headersPrPessoal,
|
// headers: this.headersPrPessoal,
|
||||||
params: params
|
// params: params
|
||||||
};
|
// };
|
||||||
}
|
// }
|
||||||
else if (calendarName == 'Oficial') {
|
// else if (calendarName == 'Oficial') {
|
||||||
options = {
|
// options = {
|
||||||
headers: this.headersPrOficial,
|
// headers: this.headersPrOficial,
|
||||||
params: params
|
// params: params
|
||||||
};
|
// };
|
||||||
}
|
// }
|
||||||
break;
|
// break;
|
||||||
}
|
// }
|
||||||
|
|
||||||
return this.http.delete(`${puturl}`, options)
|
// return this.http.delete(`${puturl}`, options)
|
||||||
}
|
// }
|
||||||
|
|
||||||
|
|
||||||
// genericDeleteEvent(eventid: string, eventDeleteType: number, calendarName: string, calendarId: string) {
|
// genericDeleteEvent(eventid: string, eventDeleteType: number, calendarName: string, calendarId: string) {
|
||||||
@@ -1308,24 +1308,24 @@ export class EventsService {
|
|||||||
// return this.http.post<any>(`${geturl}`, body, options)
|
// return this.http.post<any>(`${geturl}`, body, options)
|
||||||
// }
|
// }
|
||||||
|
|
||||||
genericPostExpedientEvent(docId: any, body: any, sharedagenda: string, serialNumber: any, applicationID: any, CalendarId) {
|
// genericPostExpedientEvent(docId: any, body: any, sharedagenda: string, serialNumber: any, applicationID: any, CalendarId) {
|
||||||
const geturl = environment.apiURL + 'calendar/expediente';
|
// const geturl = environment.apiURL + 'calendar/expediente';
|
||||||
let params = new HttpParams();
|
// let params = new HttpParams();
|
||||||
let options;
|
// let options;
|
||||||
|
|
||||||
params = params.set("DocId", docId);
|
// params = params.set("DocId", docId);
|
||||||
params = params.set("SerialNumber", serialNumber);
|
// params = params.set("SerialNumber", serialNumber);
|
||||||
params = params.set("applicationID", applicationID);
|
// params = params.set("applicationID", applicationID);
|
||||||
|
|
||||||
const calendar = this.DetectCalendars(CalendarId)
|
// const calendar = this.DetectCalendars(CalendarId)
|
||||||
const header = this.makeHeader(calendar)
|
// const header = this.makeHeader(calendar)
|
||||||
|
|
||||||
options = {
|
// options = {
|
||||||
headers: header,
|
// headers: header,
|
||||||
params: params
|
// params: params
|
||||||
}
|
// }
|
||||||
return this.http.post<any>(`${geturl}`, body, options)
|
// return this.http.post<any>(`${geturl}`, body, options)
|
||||||
}
|
// }
|
||||||
|
|
||||||
// createTaskEvent(folderId: any, body: any, sharedagenda: string, serialNumber: any, applicationID: any) {
|
// createTaskEvent(folderId: any, body: any, sharedagenda: string, serialNumber: any, applicationID: any) {
|
||||||
// const geturl = environment.apiURL + 'calendar/' + ((sharedagenda != '') ? sharedagenda : 'CreateEventExpediente') + '/dispatch';
|
// const geturl = environment.apiURL + 'calendar/' + ((sharedagenda != '') ? sharedagenda : 'CreateEventExpediente') + '/dispatch';
|
||||||
@@ -1372,38 +1372,38 @@ export class EventsService {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
genericCreateTaskEvent(folderId: any, body: any, sharedagenda: string, serialNumber: any, applicationID: any, CalendarId) {
|
// genericCreateTaskEvent(folderId: any, body: any, sharedagenda: string, serialNumber: any, applicationID: any, CalendarId) {
|
||||||
const geturl = environment.apiURL + 'calendar/dispatch';
|
// const geturl = environment.apiURL + 'calendar/dispatch';
|
||||||
let params = new HttpParams();
|
// let params = new HttpParams();
|
||||||
let options;
|
// let options;
|
||||||
|
|
||||||
params = params.set("FolderId", folderId);
|
// params = params.set("FolderId", folderId);
|
||||||
params = params.set("SerialNumber", serialNumber);
|
// params = params.set("SerialNumber", serialNumber);
|
||||||
params = params.set("applicationID", applicationID);
|
// params = params.set("applicationID", applicationID);
|
||||||
params = params.set("notifyUsers", true)
|
// params = params.set("notifyUsers", true)
|
||||||
|
|
||||||
const calendar = this.DetectCalendars(CalendarId)
|
// const calendar = this.DetectCalendars(CalendarId)
|
||||||
let header;
|
// let header;
|
||||||
console.log('calendar')
|
// console.log('calendar')
|
||||||
|
|
||||||
try {
|
// try {
|
||||||
|
|
||||||
header = this.makeHeader(calendar)
|
// header = this.makeHeader(calendar)
|
||||||
|
|
||||||
|
|
||||||
} catch (error) {}
|
// } catch (error) {}
|
||||||
|
|
||||||
|
|
||||||
console.log('header')
|
// console.log('header')
|
||||||
|
|
||||||
options = {
|
// options = {
|
||||||
headers: header,
|
// headers: header,
|
||||||
params: params
|
// params: params
|
||||||
}
|
// }
|
||||||
|
|
||||||
console.log('post')
|
// console.log('post')
|
||||||
return this.http.post<any>(`${geturl}`, body, options)
|
// return this.http.post<any>(`${geturl}`, body, options)
|
||||||
}
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -17,18 +17,18 @@ export class EventService {
|
|||||||
) { }
|
) { }
|
||||||
|
|
||||||
|
|
||||||
create({body, calendar}) {
|
// create({body, calendar}) {
|
||||||
|
|
||||||
|
|
||||||
if(this.p.userRole(['PR'])) {
|
// if(this.p.userRole(['PR'])) {
|
||||||
return this.eventService.postEventPr(body, calendar)
|
// return this.eventService.postEventPr(body, calendar)
|
||||||
} else if(this.p.userRole(['MDGPR'])) {
|
// } else if(this.p.userRole(['MDGPR'])) {
|
||||||
return this.eventService.postEventMd(body, calendar)
|
// return this.eventService.postEventMd(body, calendar)
|
||||||
} else {
|
// } else {
|
||||||
return this.eventService.postEventGeneric(body, calendar, body.CalendarId)
|
// return this.eventService.postEventGeneric(body, calendar, body.CalendarId)
|
||||||
}
|
// }
|
||||||
|
|
||||||
}
|
// }
|
||||||
|
|
||||||
addAttachment(attachment: addAttachment) {
|
addAttachment(attachment: addAttachment) {
|
||||||
return this.attachmentsService.setEventAttachmentById(attachment)
|
return this.attachmentsService.setEventAttachmentById(attachment)
|
||||||
|
|||||||
@@ -13,17 +13,17 @@ export class SendIntentService {
|
|||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
) {
|
) {
|
||||||
|
|
||||||
SendIntent.checkSendIntentReceived().then((result: any) => {
|
SendIntent.checkSendIntentReceived().then((result: any) => {
|
||||||
// logger
|
// logger
|
||||||
if (result) {
|
if (result) {
|
||||||
console.log('SendIntent received');
|
//console.log('SendIntent received');
|
||||||
console.log(JSON.stringify(result));
|
//console.log(JSON.stringify(result));
|
||||||
}
|
}
|
||||||
// event handler
|
// event handler
|
||||||
if (result.url) {
|
if (result.url) {
|
||||||
this.onReceive(result)
|
this.onReceive(result)
|
||||||
|
|
||||||
}
|
}
|
||||||
}).catch(err => console.error(err));
|
}).catch(err => console.error(err));
|
||||||
}
|
}
|
||||||
@@ -43,7 +43,7 @@ export class SendIntentService {
|
|||||||
if(Platform.prototype.is('ios')) {
|
if(Platform.prototype.is('ios')) {
|
||||||
this.alertIos();
|
this.alertIos();
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
window["sharedContent"] = result;
|
window["sharedContent"] = result;
|
||||||
|
|||||||
@@ -96,7 +96,6 @@ export class EditEventPage implements OnInit {
|
|||||||
private participantsPipe = new ParticipantsPipe()
|
private participantsPipe = new ParticipantsPipe()
|
||||||
SessionStore= SessionStore
|
SessionStore= SessionStore
|
||||||
|
|
||||||
CalendarNameOwnerName = ''
|
|
||||||
allDayCheck: boolean = false;
|
allDayCheck: boolean = false;
|
||||||
addedAttachmentsList = [];
|
addedAttachmentsList = [];
|
||||||
|
|
||||||
@@ -199,7 +198,6 @@ export class EditEventPage implements OnInit {
|
|||||||
}, 500);
|
}, 500);
|
||||||
|
|
||||||
|
|
||||||
this.CalendarNameOwnerName = this.eventsService.detectCalendarNameByCalendarId(this._postEvent.CalendarId)
|
|
||||||
this.changeAgenda()
|
this.changeAgenda()
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -68,7 +68,6 @@ export class EventListPage implements OnInit {
|
|||||||
|
|
||||||
this.sharedCalendar = this.AgendaDataRepositoryService.getShareCalendarItemsLive().pipe(
|
this.sharedCalendar = this.AgendaDataRepositoryService.getShareCalendarItemsLive().pipe(
|
||||||
map(data => data.sort((a, b) => {
|
map(data => data.sort((a, b) => {
|
||||||
console.log('Raw data:', data); // Debug line
|
|
||||||
const priorityA = rolePriorities[a.roleId] || Infinity;
|
const priorityA = rolePriorities[a.roleId] || Infinity;
|
||||||
const priorityB = rolePriorities[b.roleId] || Infinity;
|
const priorityB = rolePriorities[b.roleId] || Infinity;
|
||||||
return priorityA - priorityB;
|
return priorityA - priorityB;
|
||||||
|
|||||||
@@ -55,17 +55,16 @@
|
|||||||
<div class="content-location">
|
<div class="content-location">
|
||||||
|
|
||||||
<span class="date">{{loadedEvent.Location}}</span>
|
<span class="date">{{loadedEvent.Location}}</span>
|
||||||
|
|
||||||
<div *ngIf="loadedEvent.Organizer">
|
<div *ngIf="loadedEvent.Organizer">
|
||||||
|
|
||||||
<div *ngIf="eventsService.isMyEvent(loadedEvent) == false || sesseionStora.user.Profile =='PR'">
|
<div *ngIf="loadedEvent.owner.wxUserId != sesseionStora.user.UserId || sesseionStora.user.Profile =='PR'">
|
||||||
<span class="label" *ngIf="loadedEvent.CalendarName == 'Oficial' "
|
<span class="label" *ngIf="loadedEvent.CalendarName == 'Oficial' "
|
||||||
style="background-color: #99e47b;">{{loadedEvent.CalendarName}}</span>
|
style="background-color: #99e47b;">{{loadedEvent.CalendarName}}</span>
|
||||||
<span class="label" *ngIf="loadedEvent.CalendarName == 'Pessoal' "
|
<span class="label" *ngIf="loadedEvent.CalendarName == 'Pessoal' "
|
||||||
style="background-color: #958bfc;">{{loadedEvent.CalendarName}}</span>
|
style="background-color: #958bfc;">{{loadedEvent.CalendarName}}</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div *ngIf="eventsService.isMyEvent(loadedEvent) == true && sesseionStora.user.Profile !='PR'">
|
<div *ngIf="loadedEvent.owner.wxUserId == sesseionStora.user.UserId && sesseionStora.user.Profile !='PR'">
|
||||||
<span class="label" *ngIf="loadedEvent.CalendarName == 'Oficial' "
|
<span class="label" *ngIf="loadedEvent.CalendarName == 'Oficial' "
|
||||||
style="background-color: #ffb703;">{{loadedEvent.CalendarName}}</span>
|
style="background-color: #ffb703;">{{loadedEvent.CalendarName}}</span>
|
||||||
<span class="label" *ngIf="loadedEvent.CalendarName == 'Pessoal' "
|
<span class="label" *ngIf="loadedEvent.CalendarName == 'Pessoal' "
|
||||||
|
|||||||
@@ -83,7 +83,6 @@ export class EventsToApprovePage implements OnInit {
|
|||||||
|
|
||||||
this.sharedCalendar = this.AgendaDataRepositoryService.getShareCalendarItemsLive().pipe(
|
this.sharedCalendar = this.AgendaDataRepositoryService.getShareCalendarItemsLive().pipe(
|
||||||
map(data => data.sort((a, b) => {
|
map(data => data.sort((a, b) => {
|
||||||
console.log('Raw data:', data); // Debug line
|
|
||||||
const priorityA = rolePriorities[a.roleId] || Infinity;
|
const priorityA = rolePriorities[a.roleId] || Infinity;
|
||||||
const priorityB = rolePriorities[b.roleId] || Infinity;
|
const priorityB = rolePriorities[b.roleId] || Infinity;
|
||||||
return priorityA - priorityB;
|
return priorityA - priorityB;
|
||||||
|
|||||||
@@ -113,7 +113,7 @@ export class HeaderPage implements OnInit {
|
|||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.hideSearch();
|
this.hideSearch();
|
||||||
|
|
||||||
console.log('Profile picture guid ', this.SessionStore.user.UserPhoto)
|
// console.log('Profile picture guid ', this.SessionStore.user.UserPhoto)
|
||||||
this.getProfilpicture();
|
this.getProfilpicture();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ self.addEventListener('message', function(event){
|
|||||||
// var data = JSON.parse(event.data);
|
// var data = JSON.parse(event.data);
|
||||||
|
|
||||||
// console.log("SW Received Message:");
|
// console.log("SW Received Message:");
|
||||||
console.log(event.data);
|
// console.log(event.data);
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user