fix reported bugs 02/03/2024

This commit is contained in:
Peter Maquiran
2024-03-03 10:27:18 +01:00
parent 8585962629
commit e3d08c27b8
15 changed files with 86 additions and 28 deletions
+26 -8
View File
@@ -131,6 +131,10 @@ export class ListBoxService {
if (this.dateService.notSameDate(startDate, endDate)) {
const cloneSelectedDate = new Date(selectedDate)
cloneSelectedDate.setHours(0)
cloneSelectedDate.setMinutes(0)
cloneSelectedDate.setSeconds(0)
if (diffDays <= 150 ) {
@@ -138,7 +142,9 @@ export class ListBoxService {
const StartEvent = this.transForm(event, {startMany: true, endMany: false, middle: false})
if(this.CanPush(event, selectedDate)) {days[day].push(StartEvent); this.push(StartEvent, year)}
if(this.CanPush(event, selectedDate) && (new Date(event.start)).getTime() >= cloneSelectedDate.getTime()) {
days[day].push(StartEvent); this.push(StartEvent, year)
}
let i = 1;
@@ -150,11 +156,12 @@ export class ListBoxService {
const newDate = startDate.setDate(startDate.getDate()+ i)
let otherDays = this.dateService.getDay(newDate)
event['other'] = true
const cloneEvent = {...event}
cloneEvent['other'] = true
cloneEvent.start = new Date(startDate)
event.start = newDate
if(!days.hasOwnProperty(otherDays)) {
days[otherDays] = []
}
@@ -162,13 +169,18 @@ export class ListBoxService {
startDate.getMonth() != endDate.getMonth() ||
startDate.getDate() != endDate.getDate())) {
// last push
const EndEvent = this.transForm(event, {startMany: false, endMany: true, middle: false})
if(this.CanPush(event, selectedDate)) {days[otherDays].push(EndEvent) ; this.push(event, year)}
const EndEvent = this.transForm(cloneEvent, {startMany: false, endMany: true, middle: false})
if(this.CanPush(cloneEvent, selectedDate) && cloneEvent.start.getTime() >= cloneSelectedDate.getTime()) {
days[otherDays].push(EndEvent) ; this.push(cloneEvent, year)
}
} else {
const EndEvent = this.transForm(event, {startMany: false,endMany: true, middle: true})
if(this.CanPush(event, selectedDate)) {days[otherDays].push(EndEvent) ; this.push(event, year)}
const EndEvent = this.transForm(cloneEvent, {startMany: false,endMany: true, middle: true})
if(this.CanPush(cloneEvent, selectedDate) && cloneEvent.start.getTime() >= cloneSelectedDate.getTime()) {
days[otherDays].push(EndEvent) ; this.push(cloneEvent, year)
}
}
days[otherDays] = days[otherDays].reverse()
@@ -256,6 +268,12 @@ export class ListBoxService {
CanPush(event: any, selectedDate: Date) {
const cloneSelectedDate = new Date(selectedDate);
cloneSelectedDate.setHours(0)
cloneSelectedDate.setMinutes(0)
cloneSelectedDate.setSeconds(0)
const limite = this.endOfMonth(selectedDate)
limite.setDate(limite.getDate() + 10)
limite.setHours(0)
+12
View File
@@ -245,6 +245,12 @@ export class RoomService {
this.ChatSystemService.deleteRoom(this.id);
this.ChatSystemService.getAllRooms();
this.chatServiceDeleteRoom(this.id);
}, (error)=> {
if(error.status != 0) {
this.ChatSystemService.deleteRoom(this.id);
this.ChatSystemService.getAllRooms();
this.chatServiceDeleteRoom(this.id);
}
});
}
else {
@@ -252,6 +258,12 @@ export class RoomService {
this.ChatSystemService.deleteRoom(this.id);
this.ChatSystemService.getAllRooms();
this.chatServiceDeleteRoom(this.id);
}, (error)=> {
if(error.status != 0) {
this.ChatSystemService.deleteRoom(this.id);
this.ChatSystemService.getAllRooms();
this.chatServiceDeleteRoom(this.id);
}
});
}
}