mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-21 05:45:50 +00:00
Fix missing loader
This commit is contained in:
+137
-110
@@ -184,25 +184,27 @@ export class AgendaPage implements OnInit {
|
|||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
|
||||||
// const loader = this.toastService.loading()
|
|
||||||
|
|
||||||
this.profile = "mdgpr";
|
this.profile = "mdgpr";
|
||||||
|
|
||||||
const pathname = window.location.pathname
|
const pathname = window.location.pathname
|
||||||
|
|
||||||
let rrealoadCounter = 0
|
let realoadCounter = 0
|
||||||
|
|
||||||
this.router.events.forEach((event) => {
|
this.router.events.forEach((event) => {
|
||||||
|
|
||||||
if(event instanceof NavigationEnd && event.url == pathname ) {
|
if(event instanceof NavigationEnd && event.url == pathname ) {
|
||||||
if (this.segment == null){
|
|
||||||
|
if (this.segment == null) {
|
||||||
this.segment = "Combinado";
|
this.segment = "Combinado";
|
||||||
}
|
}
|
||||||
else if ( rrealoadCounter != 0) {
|
if ( realoadCounter != 0) {
|
||||||
|
|
||||||
this.loadRangeEvents(this.rangeStartDate, this.rangeEndDate);
|
this.loadRangeEvents(this.rangeStartDate, this.rangeEndDate);
|
||||||
rrealoadCounter++;
|
|
||||||
}
|
}
|
||||||
|
realoadCounter++;
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
window.onresize = (event) => {
|
window.onresize = (event) => {
|
||||||
@@ -463,8 +465,6 @@ export class AgendaPage implements OnInit {
|
|||||||
|
|
||||||
loadRangeEvents(startTime: Date, endTime: Date){
|
loadRangeEvents(startTime: Date, endTime: Date){
|
||||||
|
|
||||||
console.log('==========================================================')
|
|
||||||
|
|
||||||
this.eventSelectedDate = new Date(startTime);
|
this.eventSelectedDate = new Date(startTime);
|
||||||
|
|
||||||
this.showLoader = true;
|
this.showLoader = true;
|
||||||
@@ -835,6 +835,11 @@ export class AgendaPage implements OnInit {
|
|||||||
this.showLoader = false;
|
this.showLoader = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}).finally(()=>{
|
||||||
|
counter++;
|
||||||
|
if(counter==2) {
|
||||||
|
this.showLoader = false;
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
this.eventService.getAllSharedEvents(momentG(new Date(startTime),'yyyy-MM-dd HH:mm:ss'), momentG(new Date(endTime),'yyyy-MM-dd 23:59:59')).then((response:any) => {
|
this.eventService.getAllSharedEvents(momentG(new Date(startTime),'yyyy-MM-dd HH:mm:ss'), momentG(new Date(endTime),'yyyy-MM-dd 23:59:59')).then((response:any) => {
|
||||||
@@ -882,6 +887,11 @@ export class AgendaPage implements OnInit {
|
|||||||
this.showLoader = false;
|
this.showLoader = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}).finally(()=>{
|
||||||
|
counter++;
|
||||||
|
if(counter==2) {
|
||||||
|
this.showLoader = false;
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
@@ -955,131 +965,148 @@ export class AgendaPage implements OnInit {
|
|||||||
startTime: startDate,
|
startTime: startDate,
|
||||||
endTime: event.end
|
endTime: event.end
|
||||||
})
|
})
|
||||||
|
|
||||||
|
// console.log(event.end.toISOString() == endDate.toISOString())
|
||||||
|
|
||||||
const day = (((new Date (event.start)).getDate())).toString().padStart(2,'0')
|
const day = (((new Date (event.start)).getDate())).toString().padStart(2,'0')
|
||||||
|
|
||||||
event.manyDays = false
|
event.manyDays = false
|
||||||
|
|
||||||
|
|
||||||
|
event.todayOnly = new Date(event.start).toLocaleDateString() == new Date(event.end).toLocaleDateString()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if(!days.hasOwnProperty(day)) {
|
if(!days.hasOwnProperty(day)) {
|
||||||
days[day] = []
|
days[day] = []
|
||||||
}
|
}
|
||||||
|
|
||||||
// difference
|
if (new Date(startDate).toLocaleDateString() != new Date(endDate).toLocaleDateString()) {
|
||||||
const diffTime = Math.abs(endDate - startDate);
|
|
||||||
const diffDays = Math.ceil(diffTime / (1000 * 60 * 60 * 24));
|
console.log(new Date(startDate).toLocaleDateString(),'!=' , new Date(endDate).toLocaleDateString())
|
||||||
|
|
||||||
|
// difference
|
||||||
|
const diffTime = Math.abs(endDate - startDate);
|
||||||
|
const diffDays = Math.ceil(diffTime / (1000 * 60 * 60 * 24));
|
||||||
|
|
||||||
if (diffDays <= 150 && !event.event.IsAllDayEvent ) {
|
if (diffDays <= 150 && !event.event.IsAllDayEvent ) {
|
||||||
|
|
||||||
if (diffDays >= 1) {
|
console.log(event)
|
||||||
|
|
||||||
const StartEvent = Object.assign({}, {
|
|
||||||
title: event.title,
|
|
||||||
start: event.start,
|
|
||||||
end: event.end,
|
|
||||||
color: event.color,
|
|
||||||
id: event.id,
|
|
||||||
index: event.index,
|
|
||||||
profile: event.profile,
|
|
||||||
CalendarName: event.CalendarName,
|
|
||||||
event: {
|
|
||||||
Subject: event.event.Subject,
|
|
||||||
StartDate: event.event.StartDate,
|
|
||||||
EndDate: event.event.EndDate,
|
|
||||||
Location: event.event.Location,
|
|
||||||
EventId: event.event.EventId,
|
|
||||||
CalendarName: event.event.CalendarName
|
|
||||||
},
|
|
||||||
startMany: true,
|
|
||||||
endMany: false,
|
|
||||||
middle: false
|
|
||||||
})
|
|
||||||
|
|
||||||
days[day].push(StartEvent)
|
|
||||||
|
|
||||||
let i = 1;
|
|
||||||
|
|
||||||
while (startDate.getFullYear() != endDate.getFullYear() ||
|
|
||||||
startDate.getMonth() != endDate.getMonth() ||
|
|
||||||
startDate.getDate() != endDate.getDate()) {
|
|
||||||
|
|
||||||
const newDate = startDate.setDate(startDate.getDate()+ i)
|
if (diffDays >= 1) {
|
||||||
|
|
||||||
|
const StartEvent = Object.assign({}, {
|
||||||
|
title: event.title,
|
||||||
|
start: event.start,
|
||||||
|
end: event.end,
|
||||||
|
color: event.color,
|
||||||
|
id: event.id,
|
||||||
|
index: event.index,
|
||||||
|
profile: event.profile,
|
||||||
|
CalendarName: event.CalendarName,
|
||||||
|
event: {
|
||||||
|
Subject: event.event.Subject,
|
||||||
|
StartDate: event.event.StartDate,
|
||||||
|
EndDate: event.event.EndDate,
|
||||||
|
Location: event.event.Location,
|
||||||
|
EventId: event.event.EventId,
|
||||||
|
CalendarName: event.event.CalendarName
|
||||||
|
},
|
||||||
|
startMany: true,
|
||||||
|
endMany: false,
|
||||||
|
middle: false
|
||||||
|
})
|
||||||
|
|
||||||
|
days[day].push(StartEvent)
|
||||||
|
|
||||||
|
let i = 1;
|
||||||
|
|
||||||
|
while (startDate.getFullYear() != endDate.getFullYear() ||
|
||||||
|
startDate.getMonth() != endDate.getMonth() ||
|
||||||
|
startDate.getDate() != endDate.getDate()) {
|
||||||
|
|
||||||
let otherDays = (((new Date (newDate)).getDate())).toString().padStart(2,'0')
|
const newDate = startDate.setDate(startDate.getDate()+ i)
|
||||||
|
|
||||||
|
let otherDays = (((new Date (newDate)).getDate())).toString().padStart(2,'0')
|
||||||
|
|
||||||
|
event.other = true
|
||||||
|
|
||||||
event.other = true
|
event.start = newDate
|
||||||
|
if(!days.hasOwnProperty(otherDays)) {
|
||||||
event.start = newDate
|
|
||||||
if(!days.hasOwnProperty(otherDays)) {
|
|
||||||
|
|
||||||
days[otherDays] = []
|
days[otherDays] = []
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!(startDate.getFullYear() != endDate.getFullYear() ||
|
||||||
|
startDate.getMonth() != endDate.getMonth() ||
|
||||||
|
startDate.getDate() != endDate.getDate())) {
|
||||||
|
// last push
|
||||||
|
|
||||||
|
const EndEvent = Object.assign({}, {
|
||||||
|
title: event.title,
|
||||||
|
start: event.start,
|
||||||
|
end: event.end,
|
||||||
|
color: event.color,
|
||||||
|
id: event.id,
|
||||||
|
index: event.index,
|
||||||
|
profile: event.profile,
|
||||||
|
CalendarName: event.CalendarName,
|
||||||
|
event: {
|
||||||
|
Subject: event.event.Subject,
|
||||||
|
StartDate: event.event.StartDate,
|
||||||
|
EndDate: event.event.EndDate,
|
||||||
|
Location: event.event.Location,
|
||||||
|
EventId: event.event.EventId,
|
||||||
|
CalendarName: event.event.CalendarName
|
||||||
|
},
|
||||||
|
Subject: event.Subject,
|
||||||
|
startMany: false,
|
||||||
|
endMany: true,
|
||||||
|
middle: false
|
||||||
|
})
|
||||||
|
|
||||||
|
days[otherDays].push(EndEvent)
|
||||||
|
|
||||||
|
} else {
|
||||||
|
const EndEvent = Object.assign({}, {
|
||||||
|
title: event.title,
|
||||||
|
start: event.start,
|
||||||
|
end: event.end,
|
||||||
|
color: event.color,
|
||||||
|
id: event.id,
|
||||||
|
index: event.index,
|
||||||
|
profile: event.profile,
|
||||||
|
CalendarName: event.CalendarName,
|
||||||
|
event: {
|
||||||
|
Subject: event.event.Subject,
|
||||||
|
StartDate: event.event.StartDate,
|
||||||
|
EndDate: event.event.EndDate,
|
||||||
|
Location: event.event.Location,
|
||||||
|
EventId: event.event.EventId,
|
||||||
|
CalendarName: event.event.CalendarName
|
||||||
|
},
|
||||||
|
Subject: event.Subject,
|
||||||
|
startMany: false,
|
||||||
|
endMany: true,
|
||||||
|
middle: true
|
||||||
|
})
|
||||||
|
days[otherDays].push(EndEvent)
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(startDate.getFullYear() != endDate.getFullYear() ||
|
|
||||||
startDate.getMonth() != endDate.getMonth() ||
|
|
||||||
startDate.getDate() != endDate.getDate())) {
|
|
||||||
// last push
|
|
||||||
|
|
||||||
const EndEvent = Object.assign({}, {
|
} else {
|
||||||
title: event.title,
|
days[day].push(event)
|
||||||
start: event.start,
|
|
||||||
end: event.end,
|
|
||||||
color: event.color,
|
|
||||||
id: event.id,
|
|
||||||
index: event.index,
|
|
||||||
profile: event.profile,
|
|
||||||
CalendarName: event.CalendarName,
|
|
||||||
event: {
|
|
||||||
Subject: event.event.Subject,
|
|
||||||
StartDate: event.event.StartDate,
|
|
||||||
EndDate: event.event.EndDate,
|
|
||||||
Location: event.event.Location,
|
|
||||||
EventId: event.event.EventId,
|
|
||||||
CalendarName: event.event.CalendarName
|
|
||||||
},
|
|
||||||
Subject: event.Subject,
|
|
||||||
startMany: false,
|
|
||||||
endMany: true,
|
|
||||||
middle: false
|
|
||||||
})
|
|
||||||
|
|
||||||
days[otherDays].push(EndEvent)
|
|
||||||
|
|
||||||
} else {
|
|
||||||
const EndEvent = Object.assign({}, {
|
|
||||||
title: event.title,
|
|
||||||
start: event.start,
|
|
||||||
end: event.end,
|
|
||||||
color: event.color,
|
|
||||||
id: event.id,
|
|
||||||
index: event.index,
|
|
||||||
profile: event.profile,
|
|
||||||
CalendarName: event.CalendarName,
|
|
||||||
event: {
|
|
||||||
Subject: event.event.Subject,
|
|
||||||
StartDate: event.event.StartDate,
|
|
||||||
EndDate: event.event.EndDate,
|
|
||||||
Location: event.event.Location,
|
|
||||||
EventId: event.event.EventId,
|
|
||||||
CalendarName: event.event.CalendarName
|
|
||||||
},
|
|
||||||
Subject: event.Subject,
|
|
||||||
startMany: false,
|
|
||||||
endMany: true,
|
|
||||||
middle: true
|
|
||||||
})
|
|
||||||
days[otherDays].push(EndEvent)
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
days[day].push(event)
|
days[day].push(event)
|
||||||
|
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
days[day].push(event)
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
days[day].push(event)
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -196,7 +196,7 @@
|
|||||||
<div class="ion-icon-class">
|
<div class="ion-icon-class">
|
||||||
<ion-icon slot="start" src="assets/images/icons-person.svg"></ion-icon>
|
<ion-icon slot="start" src="assets/images/icons-person.svg"></ion-icon>
|
||||||
</div>
|
</div>
|
||||||
<div class="ion-input-class-no-height">
|
<div class="ion-input-class-no-height" [class.input-error]="Form?.get('participantes')?.invalid && validateFrom ">
|
||||||
<div class="list-people">
|
<div class="list-people">
|
||||||
<ion-item lines="none">
|
<ion-item lines="none">
|
||||||
<ion-list>
|
<ion-list>
|
||||||
|
|||||||
@@ -213,9 +213,9 @@ export class NewEventPage implements OnInit {
|
|||||||
IsRecurring: new FormControl(this.postEvent.IsRecurring, [
|
IsRecurring: new FormControl(this.postEvent.IsRecurring, [
|
||||||
Validators.required
|
Validators.required
|
||||||
]),
|
]),
|
||||||
// participantes: new FormControl(this.taskParticipantsCc.concat(this.taskParticipants), [
|
participantes: new FormControl(this.taskParticipants, [
|
||||||
// Validators.required
|
Validators.required
|
||||||
// ]),
|
]),
|
||||||
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -45,7 +45,7 @@ export class ApproveEventModalPage implements OnInit {
|
|||||||
private toastService: ToastService,
|
private toastService: ToastService,
|
||||||
) {
|
) {
|
||||||
|
|
||||||
|
alert('54321')
|
||||||
this.activatedRoute.paramMap.subscribe(paramMap =>
|
this.activatedRoute.paramMap.subscribe(paramMap =>
|
||||||
{
|
{
|
||||||
if (!paramMap.has("serialNumber")){
|
if (!paramMap.has("serialNumber")){
|
||||||
|
|||||||
@@ -58,6 +58,7 @@ export class ApproveEventPage implements OnInit {
|
|||||||
this.caller = params["params"].caller;
|
this.caller = params["params"].caller;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
@@ -187,8 +188,7 @@ export class ApproveEventPage implements OnInit {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async getAttachments(instanceId:string){
|
async getAttachments(instanceId:string) {
|
||||||
const loader = this.toastService.loading()
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
this.loadedAttachments = await this.attachmentsService.getAttachmentsById(instanceId).toPromise();
|
this.loadedAttachments = await this.attachmentsService.getAttachmentsById(instanceId).toPromise();
|
||||||
|
|||||||
@@ -177,8 +177,7 @@ export class EventsService {
|
|||||||
return this.http.get<any>(`${geturl}`, options);
|
return this.http.get<any>(`${geturl}`, options);
|
||||||
}
|
}
|
||||||
|
|
||||||
async getAllMdEvents(startdate:string, enddate:string){
|
async getAllMdEvents(startdate:string, enddate:string) {
|
||||||
console.log('md once')
|
|
||||||
let prO = await this.getAllMdOficialEvents(startdate, enddate).toPromise();
|
let prO = await this.getAllMdOficialEvents(startdate, enddate).toPromise();
|
||||||
let prP = await this.getAllMdPessoalEvents(startdate, enddate).toPromise();
|
let prP = await this.getAllMdPessoalEvents(startdate, enddate).toPromise();
|
||||||
const resFinal = prO.concat(prP);
|
const resFinal = prO.concat(prP);
|
||||||
@@ -189,7 +188,6 @@ export class EventsService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async getAllSharedEvents(startdate:string, enddate:string) {
|
async getAllSharedEvents(startdate:string, enddate:string) {
|
||||||
console.log('pr once')
|
|
||||||
let prO = await this.getAllSharedOficialEvents(startdate, enddate).toPromise();
|
let prO = await this.getAllSharedOficialEvents(startdate, enddate).toPromise();
|
||||||
let prP = await this.getAllSharedPessoalEvents(startdate, enddate).toPromise();
|
let prP = await this.getAllSharedPessoalEvents(startdate, enddate).toPromise();
|
||||||
const resFinal = prO.concat(prP);
|
const resFinal = prO.concat(prP);
|
||||||
|
|||||||
@@ -48,6 +48,7 @@ export class ApproveEventPage implements OnInit {
|
|||||||
private toastService: ToastService
|
private toastService: ToastService
|
||||||
) {
|
) {
|
||||||
// Event to approve list
|
// Event to approve list
|
||||||
|
alert('123')
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user