mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 21:35:50 +00:00
fix change timeline, publication wont load list
This commit is contained in:
@@ -16,6 +16,8 @@ export class ActiveTabService {
|
||||
gabineteDetails: false
|
||||
}
|
||||
|
||||
updatePublications = () => {}
|
||||
|
||||
constructor(
|
||||
private router: Router,
|
||||
public HeaderSettingsService: HeaderSettingsService) {
|
||||
@@ -47,6 +49,13 @@ export class ActiveTabService {
|
||||
|
||||
} else if (pathName.startsWith('/home/publications')) {
|
||||
this.pages.publication = true
|
||||
if(pathName.includes("/publications/")) {
|
||||
if(this.updatePublications) {
|
||||
this.updatePublications()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
} else if (pathName.startsWith('/home/chat')) {
|
||||
this.pages.chat = true
|
||||
}
|
||||
|
||||
@@ -67,8 +67,6 @@ export class ListBoxService {
|
||||
// object[momentG(new Date(e.start), 'MMMM yyyy')].push(e)
|
||||
// }
|
||||
|
||||
// console.log({object})
|
||||
|
||||
// const daysStringNum = Object.keys(object).reverse()
|
||||
|
||||
// const daysObject = {}
|
||||
@@ -77,13 +75,8 @@ export class ListBoxService {
|
||||
// daysObject[day] = object[day]
|
||||
// }
|
||||
|
||||
// console.log({daysObject})
|
||||
|
||||
|
||||
return this.display(newStracture, selectedDate).year
|
||||
|
||||
// console.log({daysObject})
|
||||
|
||||
// const daysStringNum = Object.keys(daysObject)
|
||||
|
||||
// for(const day of daysStringNum) {
|
||||
@@ -105,6 +98,8 @@ export class ListBoxService {
|
||||
}
|
||||
|
||||
display(list: CustomCalendarEvent[], selectedDate) {
|
||||
|
||||
|
||||
let days = {};
|
||||
const year: Year[] = []
|
||||
|
||||
@@ -171,14 +166,14 @@ export class ListBoxService {
|
||||
// last push
|
||||
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)
|
||||
days[otherDays].push(EndEvent) ; this.push(EndEvent, year)
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
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].push(EndEvent) ; this.push(EndEvent, year)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -190,6 +190,7 @@ export class AuthService {
|
||||
SessionStore.user.RochetChatUserId = message.result.id
|
||||
SessionStore.save()
|
||||
|
||||
this.ChatSystemService.loadChat()
|
||||
this.RochetChatConnectorService.setStatus('online')
|
||||
window['RochetChatConnectorService'] = this.RochetChatConnectorService
|
||||
setTimeout(() => {
|
||||
@@ -199,7 +200,14 @@ export class AuthService {
|
||||
|
||||
|
||||
}).catch((error) => {
|
||||
// console.error(SessionStore.user.ChatData, 'web socket login',error)
|
||||
console.error(SessionStore.user.ChatData, 'web socket login', error)
|
||||
|
||||
if(window.location.pathname.includes('/home/')) {
|
||||
setTimeout(() => {
|
||||
this.loginToChatWs();
|
||||
}, 4000)
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
@@ -333,7 +341,7 @@ export class AuthService {
|
||||
}
|
||||
|
||||
refreshToken() {
|
||||
|
||||
|
||||
return this.http
|
||||
.put<any>(environment.apiURL + "UserAuthentication/RefreshToken", {
|
||||
refreshToken: SessionStore.user.RefreshToken,
|
||||
|
||||
@@ -390,32 +390,32 @@ export class ObjectMergeNotification{
|
||||
watchCount = 0
|
||||
|
||||
constructor() {
|
||||
this.socket.onDisconnectCallback(()=> {
|
||||
console.log("run watch")
|
||||
this.runWatch = true
|
||||
this.watch()
|
||||
})
|
||||
// this.socket.onDisconnectCallback(()=> {
|
||||
// console.log("run watch")
|
||||
// this.runWatch = true
|
||||
// this.watch()
|
||||
// })
|
||||
|
||||
this.socket.onConnectCallback(()=> {
|
||||
// this.socket.onConnectCallback(()=> {
|
||||
|
||||
console.log("open trigger")
|
||||
this.runWatch = false
|
||||
})
|
||||
// console.log("open trigger")
|
||||
// this.runWatch = false
|
||||
// })
|
||||
|
||||
this.socket.subscribe((data: socketResponse) => {
|
||||
if(data.IsCompleted == true) {
|
||||
console.log("==================!!!====================")
|
||||
try {
|
||||
this.callbacks[data.Guid](data)
|
||||
delete this.callbacks[data.Guid]
|
||||
} catch (error) {}
|
||||
} else {
|
||||
console.log("else", data)
|
||||
}
|
||||
})
|
||||
// this.socket.subscribe((data: socketResponse) => {
|
||||
// if(data.IsCompleted == true) {
|
||||
// console.log("==================!!!====================")
|
||||
// try {
|
||||
// this.callbacks[data.Guid](data)
|
||||
// delete this.callbacks[data.Guid]
|
||||
// } catch (error) {}
|
||||
// } else {
|
||||
// console.log("else", data)
|
||||
// }
|
||||
// })
|
||||
|
||||
this.socket.connect();
|
||||
this.watch()
|
||||
// this.socket.connect();
|
||||
// this.watch()
|
||||
}
|
||||
|
||||
connect() {
|
||||
|
||||
Reference in New Issue
Block a user