mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
fix agenda and publication
This commit is contained in:
@@ -886,7 +886,7 @@ export class EventsService {
|
||||
return this.http.put<Event>(`${puturl}`, event, options)
|
||||
}
|
||||
|
||||
editEvent(event: Event, conflictResolutionMode: number, sendInvitationsOrCancellationsMode: number, CalendarId? ): Observable<Event> {
|
||||
editEvent(event: Event, conflictResolutionMode: number, sendInvitationsOrCancellationsMode: number, CalendarId ): Observable<Event> {
|
||||
let arrayReq = [];
|
||||
arrayReq.push(event);
|
||||
const puturl = environment.apiURL + 'calendar/PutEvent';
|
||||
@@ -917,18 +917,35 @@ export class EventsService {
|
||||
this.headers = this.headersPrOficial;
|
||||
} else {
|
||||
|
||||
const headers = [
|
||||
this.headerSharedOficial,
|
||||
this.headerSharedPessoal,
|
||||
this.headerOwnPessoal,
|
||||
this.headerOwnOficial
|
||||
]
|
||||
|
||||
const header = headers.find((header)=> {
|
||||
return header?.get('CalendarId')?.includes(CalendarId)
|
||||
})
|
||||
if(CalendarId) {
|
||||
|
||||
const headers = [
|
||||
this.headerSharedOficial,
|
||||
this.headerSharedPessoal,
|
||||
this.headerOwnPessoal,
|
||||
this.headerOwnOficial
|
||||
]
|
||||
|
||||
const calendar = this.DetectCalendars(CalendarId)
|
||||
const header = this.makeHeader(calendar)
|
||||
|
||||
this.headers = header
|
||||
} else {
|
||||
const headers = [
|
||||
this.headerSharedOficial,
|
||||
this.headerSharedPessoal,
|
||||
this.headerOwnPessoal,
|
||||
this.headerOwnOficial
|
||||
]
|
||||
|
||||
const header = headers.find((header)=> {
|
||||
return header?.get('CalendarId')?.includes(CalendarId)
|
||||
})
|
||||
|
||||
this.headers = header
|
||||
}
|
||||
|
||||
this.headers = header
|
||||
}
|
||||
}
|
||||
else {
|
||||
@@ -939,18 +956,36 @@ export class EventsService {
|
||||
this.headers = this.headersPrPessoal;
|
||||
}
|
||||
else {
|
||||
const headers = [
|
||||
this.headerSharedOficial,
|
||||
this.headerSharedPessoal,
|
||||
this.headerOwnPessoal,
|
||||
this.headerOwnOficial
|
||||
]
|
||||
|
||||
const header = headers.find((header)=> {
|
||||
return header?.get('CalendarId')?.includes(CalendarId)
|
||||
})
|
||||
|
||||
this.headers = header
|
||||
|
||||
if(CalendarId) {
|
||||
|
||||
const headers = [
|
||||
this.headerSharedOficial,
|
||||
this.headerSharedPessoal,
|
||||
this.headerOwnPessoal,
|
||||
this.headerOwnOficial
|
||||
]
|
||||
|
||||
const calendar = this.DetectCalendars(CalendarId)
|
||||
const header = this.makeHeader(calendar)
|
||||
|
||||
this.headers = header
|
||||
} else {
|
||||
const headers = [
|
||||
this.headerSharedOficial,
|
||||
this.headerSharedPessoal,
|
||||
this.headerOwnPessoal,
|
||||
this.headerOwnOficial
|
||||
]
|
||||
|
||||
const header = headers.find((header)=> {
|
||||
return header?.get('CalendarId')?.includes(CalendarId)
|
||||
})
|
||||
|
||||
this.headers = header
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+21
-21
@@ -70,7 +70,7 @@ export class EditEventPage implements OnInit {
|
||||
else{
|
||||
this.pageId = paramMap.get('eventId');
|
||||
eventid = paramMap.get('eventId');
|
||||
|
||||
|
||||
|
||||
}
|
||||
if (paramMap.has("caller")){
|
||||
@@ -158,28 +158,28 @@ export class EditEventPage implements OnInit {
|
||||
|
||||
Save()
|
||||
{
|
||||
if (this.ionicForm.valid){
|
||||
// if (this.ionicForm.valid){
|
||||
|
||||
this.activatedRoute.paramMap.subscribe(paramMap =>{
|
||||
if (paramMap.has("profile")){
|
||||
|
||||
// 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);
|
||||
});
|
||||
}
|
||||
// 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);
|
||||
// });
|
||||
// }
|
||||
}
|
||||
|
||||
loadAttachments()
|
||||
@@ -187,7 +187,7 @@ export class EditEventPage implements OnInit {
|
||||
|
||||
this.attachamentsService.getAttachmentsById(this.pageId).subscribe(res => {
|
||||
this.loadedEventAttachments = res;
|
||||
|
||||
|
||||
|
||||
},((erro) => {
|
||||
console.error('loadAttchament', erro)
|
||||
@@ -230,7 +230,7 @@ export class EditEventPage implements OnInit {
|
||||
backdropDismiss: false
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
modal.onDidDismiss().then((data) => {
|
||||
if (data['data'] != null)
|
||||
+21
-21
@@ -70,7 +70,7 @@ export class EventDetailPage implements OnInit {
|
||||
else{
|
||||
this.pageId = paramMap.get('eventId');
|
||||
eventid = paramMap.get('eventId');
|
||||
|
||||
|
||||
|
||||
}
|
||||
if (paramMap.has("caller")){
|
||||
@@ -93,7 +93,7 @@ export class EventDetailPage implements OnInit {
|
||||
backdropDismiss: false
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
modal.onDidDismiss().then((data) => {
|
||||
if (data['data'] != null)
|
||||
@@ -158,28 +158,28 @@ export class EventDetailPage implements OnInit {
|
||||
|
||||
Save()
|
||||
{
|
||||
if (this.ionicForm.valid){
|
||||
// if (this.ionicForm.valid){
|
||||
|
||||
this.activatedRoute.paramMap.subscribe(paramMap =>{
|
||||
if (paramMap.has("profile")){
|
||||
|
||||
// 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);
|
||||
});
|
||||
}
|
||||
// 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);
|
||||
// });
|
||||
// }
|
||||
}
|
||||
|
||||
loadAttachments()
|
||||
@@ -187,7 +187,7 @@ export class EventDetailPage implements OnInit {
|
||||
|
||||
this.attachamentsService.getAttachmentsById(this.pageId).subscribe(res => {
|
||||
this.loadedEventAttachments = res;
|
||||
|
||||
|
||||
|
||||
},((erro) => {
|
||||
console.error('loadAttchament', erro)
|
||||
@@ -8,10 +8,10 @@ const routes: Routes = [
|
||||
path: '',
|
||||
component: EventsPage
|
||||
},
|
||||
{
|
||||
path: 'event-detail',
|
||||
loadChildren: () => import('./event-detail/event-detail.module').then( m => m.EventDetailPageModule)
|
||||
},
|
||||
// {
|
||||
// path: 'event-detail',
|
||||
// loadChildren: () => import('./event-detail/event-detail.module').then( m => m.EventDetailPageModule)
|
||||
// },
|
||||
{
|
||||
path: 'attachments',
|
||||
loadChildren: () => import('./attachments/attachments.module').then( m => m.AttachmentsPageModule)
|
||||
@@ -24,10 +24,10 @@ const routes: Routes = [
|
||||
path: 'event-detail-modal',
|
||||
loadChildren: () => import('./event-detail-modal/event-detail-modal.module').then( m => m.EventDetailModalPageModule)
|
||||
},
|
||||
{
|
||||
path: 'edit-event',
|
||||
loadChildren: () => import('./edit-event/edit-event.module').then( m => m.EditEventPageModule)
|
||||
}
|
||||
// {
|
||||
// path: 'edit-event',
|
||||
// loadChildren: () => import('./edit-event/edit-event.module').then( m => m.EditEventPageModule)
|
||||
// }
|
||||
|
||||
|
||||
];
|
||||
|
||||
@@ -5,7 +5,7 @@ import { EventsService } from 'src/app/services/events.service';
|
||||
import { NavigationExtras, Router } from '@angular/router';
|
||||
import { ActivatedRoute, NavigationEnd } from '@angular/router';
|
||||
import { ModalController, Platform } from '@ionic/angular';
|
||||
import { EventDetailPage } from './event-detail/event-detail.page';
|
||||
// import { EventDetailPage } from './event-detail/event-detail.page';
|
||||
import { ProcessesService } from '../../services/processes.service';
|
||||
import { DailyWorkTask } from '../../models/dailyworktask.model';
|
||||
import { LoginUserRespose } from 'src/app/models/user.model';
|
||||
@@ -84,7 +84,7 @@ export class EventsPage implements OnInit {
|
||||
public ThemeService: ThemeService,
|
||||
) {
|
||||
this.existingScreenOrientation = this.screenOrientation.type;
|
||||
|
||||
|
||||
|
||||
this.loggeduser = SessionStore.user;
|
||||
|
||||
@@ -92,7 +92,7 @@ export class EventsPage implements OnInit {
|
||||
|
||||
this.platform.resize.subscribe(async () => {
|
||||
//
|
||||
//
|
||||
//
|
||||
|
||||
});
|
||||
|
||||
@@ -137,7 +137,7 @@ export class EventsPage implements OnInit {
|
||||
// Lock to portrait
|
||||
lockToPortrait(){
|
||||
this.screenOrientation.lock(this.screenOrientation.ORIENTATIONS.PORTRAIT);
|
||||
|
||||
|
||||
}
|
||||
|
||||
// Lock to landscape
|
||||
@@ -153,7 +153,7 @@ export class EventsPage implements OnInit {
|
||||
checkScreenOrientation(){
|
||||
if( window.innerWidth < 701) {
|
||||
this.lockToPortrait();
|
||||
|
||||
|
||||
|
||||
}
|
||||
else{
|
||||
@@ -233,8 +233,8 @@ export class EventsPage implements OnInit {
|
||||
let prOficialEvents= await this.eventService.getAllPrOficialEvents(start, end).toPromise();
|
||||
let prPessoalEvents= await this.eventService.getAllPrPessoalEvents(start, end).toPromise();
|
||||
this.eventsList = prOficialEvents.concat(prPessoalEvents);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if(this.eventsList.length > 0){
|
||||
this.currentEvent = this.eventsList[0].Subject;
|
||||
@@ -297,12 +297,12 @@ export class EventsPage implements OnInit {
|
||||
|
||||
changeProfile(){
|
||||
if(this.profile == "mdgpr"){
|
||||
|
||||
|
||||
this.profile ="pr";
|
||||
this.RefreshEvents();
|
||||
}
|
||||
else{
|
||||
|
||||
|
||||
this.profile ="mdgpr";
|
||||
this.RefreshEvents();
|
||||
}
|
||||
@@ -315,26 +315,11 @@ export class EventsPage implements OnInit {
|
||||
this.router.navigate(['/home/login']);
|
||||
}
|
||||
|
||||
async openEventDetail1(id:any){
|
||||
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
component: EventDetailPage,
|
||||
componentProps: {
|
||||
eventId: id,
|
||||
},
|
||||
cssClass: 'event-detail',
|
||||
backdropDismiss: false
|
||||
});
|
||||
|
||||
modal.onDidDismiss();
|
||||
await modal.present();
|
||||
|
||||
}
|
||||
|
||||
LoadList() {
|
||||
this.processes.GetTaskListExpediente(false).subscribe(result => {
|
||||
|
||||
|
||||
|
||||
const ExpedienteTask = result.map( e=> this.expedienteTaskPipe.transform(e))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user