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:
@@ -377,7 +377,7 @@ export class EditEventPage implements OnInit {
|
||||
this.postEvent.EventRecurrence.Type = this.selectedRecurringType;
|
||||
|
||||
if (this.sesseionStora.user.Profile == 'MDGPR' || this.sesseionStora.user.Profile == 'PR') {
|
||||
this.eventsService.editEvent(this.postEvent, 2, 3).subscribe(async () => {
|
||||
this.eventsService.editEvent(this.postEvent, 2, 3, null).subscribe(async () => {
|
||||
|
||||
if (window['reloadCalendar']) {
|
||||
window['reloadCalendar']()
|
||||
@@ -648,24 +648,24 @@ export class EditEventPage implements OnInit {
|
||||
this.postEvent.IsAllDayEvent = this.allDayCheck;
|
||||
this.postEvent.StartDate = this.setAlldayTime(this.postEvent.StartDate)
|
||||
this.postEvent.EndDate = this.setAlldayTimeEndDate(this.postEvent.EndDate)
|
||||
|
||||
|
||||
console.log('Recurso ativado!!');
|
||||
} else {
|
||||
this.postEvent.IsAllDayEvent = this.allDayCheck;
|
||||
this.postEvent.EndDate = this.setAlldayTimeEndDateNotAlday(this.postEvent.EndDate)
|
||||
console.log('Recurso desativado');
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
setAlldayTime(timeToReturn) {
|
||||
let date: any = new Date(timeToReturn) || new Date();
|
||||
let newdate = new Date();
|
||||
date.setHours(0)
|
||||
date.setMinutes(0)
|
||||
date.setSeconds(0);
|
||||
|
||||
|
||||
|
||||
|
||||
return date
|
||||
}
|
||||
|
||||
@@ -675,8 +675,8 @@ export class EditEventPage implements OnInit {
|
||||
date.setHours(23)
|
||||
date.setMinutes(59)
|
||||
date.setSeconds(0);
|
||||
|
||||
|
||||
|
||||
|
||||
return date
|
||||
}
|
||||
|
||||
@@ -686,8 +686,8 @@ export class EditEventPage implements OnInit {
|
||||
date.setHours(23)
|
||||
date.setMinutes(0)
|
||||
date.setSeconds(0);
|
||||
|
||||
|
||||
|
||||
|
||||
return date
|
||||
}
|
||||
}
|
||||
|
||||
@@ -106,25 +106,25 @@ export class ViewEventPage implements OnInit {
|
||||
ngOnInit() {
|
||||
this.loadEvent();
|
||||
|
||||
this.backgroundservice.registerBackService('Online', () => {
|
||||
this.storage.get('eventEdit').then((req) => {
|
||||
JSON.parse(req).forEach(element => {
|
||||
this.eventsService.editEvent(element, 2, 3).subscribe((res) => {
|
||||
this.storage.remove('eventEdit')
|
||||
// this.backgroundservice.registerBackService('Online', () => {
|
||||
// this.storage.get('eventEdit').then((req) => {
|
||||
// JSON.parse(req).forEach(element => {
|
||||
// this.eventsService.editEvent(element, 2, 3).subscribe((res) => {
|
||||
// this.storage.remove('eventEdit')
|
||||
|
||||
})
|
||||
});
|
||||
})
|
||||
this.storage.get('eventDelete').then((req) => {
|
||||
JSON.parse(req).forEach(element => {
|
||||
this.eventsService.editEvent(element, 2, 3).subscribe((res) => {
|
||||
this.storage.remove('eventDelete')
|
||||
// })
|
||||
// });
|
||||
// })
|
||||
// this.storage.get('eventDelete').then((req) => {
|
||||
// JSON.parse(req).forEach(element => {
|
||||
// this.eventsService.editEvent(element, 2, 3).subscribe((res) => {
|
||||
// this.storage.remove('eventDelete')
|
||||
|
||||
})
|
||||
});
|
||||
})
|
||||
this.loadEvent();
|
||||
});
|
||||
// })
|
||||
// });
|
||||
// })
|
||||
// this.loadEvent();
|
||||
// });
|
||||
|
||||
window.onresize = (event) => {
|
||||
// if not mobile remove all component
|
||||
|
||||
@@ -243,7 +243,7 @@
|
||||
{{last ? scrollToBottom() : ''}}
|
||||
</div>
|
||||
<div *ngIf="msg.t == 'ul'" class="info-text-leave">
|
||||
<div *ngFor="let user of allUsers">
|
||||
<div *ngFor="let user of ChatSystemService.users">
|
||||
<div *ngIf="msg.msg == user.username">
|
||||
<ion-label>{{user.name}} saiu do grupo</ion-label><br />
|
||||
</div>
|
||||
@@ -251,7 +251,7 @@
|
||||
{{last ? scrollToBottom() : ''}}
|
||||
</div>
|
||||
<div *ngIf="msg.t == 'ru'" class="info-text-leave">
|
||||
<div *ngFor="let user of allUsers">
|
||||
<div *ngFor="let user of ChatSystemService.users">
|
||||
<div *ngIf="msg.msg == user.username">
|
||||
<ion-label>{{user.name}} foi removido do grupo</ion-label><br />
|
||||
</div>
|
||||
@@ -260,7 +260,7 @@
|
||||
</div>
|
||||
<div *ngIf="msg.t == 'au' && msg.msg != sessionStore.user.UserName">
|
||||
|
||||
<div *ngFor="let user of allUsers">
|
||||
<div *ngFor="let user of ChatSystemService.users">
|
||||
<div *ngIf="msg.msg == user.username" class="info-text-leave">
|
||||
<ion-label>Adicionou {{user.name}}</ion-label><br />
|
||||
</div>
|
||||
|
||||
@@ -52,7 +52,6 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
roomName: any;
|
||||
members: any = []
|
||||
contacts: string[] = [" Ana M.", "Andre F.", "Bruno G.", "Catarina T", "Tiago"];
|
||||
allUsers: any[] = [];
|
||||
|
||||
roomId: string;
|
||||
loggedUserChat: any;
|
||||
@@ -421,12 +420,9 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
}
|
||||
|
||||
async getChatMembers() {
|
||||
this.chatService.getAllUsers().subscribe(res => {
|
||||
|
||||
|
||||
this.allUsers = res['users'].filter(data => data.username != SessionStore.user.UserName);
|
||||
|
||||
});
|
||||
if(this.ChatSystemService.users.length == 0) {
|
||||
this.ChatSystemService.getUser()
|
||||
}
|
||||
}
|
||||
|
||||
/* load(){
|
||||
|
||||
@@ -162,28 +162,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']
|
||||
});
|
||||
// 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);
|
||||
});
|
||||
}
|
||||
// setTimeout(()=>{
|
||||
// alert.dismiss();
|
||||
// }, 1500);
|
||||
// });
|
||||
// }
|
||||
}
|
||||
|
||||
showAlert(){
|
||||
|
||||
@@ -163,27 +163,27 @@ 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']
|
||||
});
|
||||
// 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);
|
||||
});
|
||||
}
|
||||
// setTimeout(()=>{
|
||||
// alert.dismiss();
|
||||
// }, 1500);
|
||||
// });
|
||||
// }
|
||||
}
|
||||
|
||||
showAlert(){
|
||||
|
||||
Reference in New Issue
Block a user