mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
fix change timeline, publication wont load list
This commit is contained in:
@@ -242,7 +242,6 @@
|
||||
>
|
||||
|
||||
<div class="schedule-time" *ngIf="!event.event.IsAllDayEvent">
|
||||
|
||||
<div *ngIf="event.startMany && !event.middle" class="time-start labelb">Início</div>
|
||||
<div *ngIf="event.endMany && !event.middle " class="time-end labelb">Fim</div>
|
||||
|
||||
@@ -254,8 +253,12 @@
|
||||
|
||||
</div>
|
||||
<div class="schedule-time" *ngIf="event.event.IsAllDayEvent">
|
||||
<div class="time-start">Todo </div>
|
||||
<div class="time-end text-center">o dia</div>
|
||||
<div *ngIf="event.middle" class="time-start">Todo </div>
|
||||
<div *ngIf="event.middle" class="time-end text-center">o dia</div>
|
||||
|
||||
<div *ngIf="event.endMany && !event.middle" class="time-start">{{event.event.StartDate | date: 'HH:mm'}}</div>
|
||||
<div *ngIf="event.endMany && !event.middle" class="time-end"> {{event.event.EndDate | date: 'HH:mm'}} </div>
|
||||
|
||||
</div>
|
||||
<div class="schedule-details">
|
||||
<div class="description">
|
||||
|
||||
@@ -146,7 +146,6 @@ export class LoginPage implements OnInit {
|
||||
|
||||
await this.authService.loginToChatWs();
|
||||
this.ChatService.setheader()
|
||||
this.ChatSystemService.loadChat();
|
||||
|
||||
}
|
||||
|
||||
@@ -181,7 +180,6 @@ export class LoginPage implements OnInit {
|
||||
if (attempt.ChatData) {
|
||||
await this.authService.loginToChatWs();
|
||||
this.ChatService.setheader();
|
||||
this.ChatSystemService.loadChat();
|
||||
}
|
||||
this.storageService.remove("Notifications")
|
||||
this.getToken();
|
||||
|
||||
@@ -20,6 +20,7 @@ import { PublicationVideoManagerService } from "src/app/services/publication/pub
|
||||
import { StopvideoService } from "src/app/services/stopvideo.service"
|
||||
import { Result } from 'neverthrow';
|
||||
import { App } from '@capacitor/app';
|
||||
import { ActiveTabService } from 'src/app/services/active-tab.service';
|
||||
@Component({
|
||||
selector: 'app-view-publications',
|
||||
templateUrl: './view-publications.page.html',
|
||||
@@ -69,7 +70,8 @@ export class ViewPublicationsPage implements OnInit {
|
||||
public checkFileType: checkFileTypeService,
|
||||
private publicationVideoManagerService: PublicationVideoManagerService,
|
||||
public stopvideoService: StopvideoService,
|
||||
private platform: Platform,) {
|
||||
private platform: Platform,
|
||||
public activeTabService: ActiveTabService) {
|
||||
|
||||
|
||||
/* this.publicationVideoManagerService.setContainer(this.VideoManager.nativeElement) */
|
||||
@@ -118,6 +120,13 @@ export class ViewPublicationsPage implements OnInit {
|
||||
})
|
||||
|
||||
// console.log(this.publicationFolderService.publicationList[this.folderId])
|
||||
|
||||
setTimeout(()=> {
|
||||
|
||||
this.doRefresh({})
|
||||
|
||||
}, 1500)
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -46,7 +46,6 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
|
||||
documents: SearchList[] = [];
|
||||
|
||||
room: any = new Array();
|
||||
roomName: any;
|
||||
members: any;
|
||||
|
||||
capturedImage: any;
|
||||
@@ -58,8 +57,6 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
|
||||
currentPosition: any;
|
||||
startPosition: number;
|
||||
scrollToBottomBtn = false;
|
||||
roomCountDownDate: string;
|
||||
roomCountDownTime: string;
|
||||
isAdmin = false;
|
||||
|
||||
@Input() roomId: string;
|
||||
@@ -112,8 +109,6 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
|
||||
this.ChatSystemService.getUser()
|
||||
this.loggedUserChat = SessionStore.user.ChatData['data'];
|
||||
this.isGroupCreated = true;
|
||||
this.roomCountDownDate = "";
|
||||
this.roomCountDownTime = "";
|
||||
|
||||
}
|
||||
ngOnChanges(changes: SimpleChanges): void {
|
||||
@@ -151,10 +146,6 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
|
||||
return this.timeService.showDateDuration(start);
|
||||
}
|
||||
|
||||
countDownDate() {
|
||||
return this.timeService.countDownDateTimer(this.roomCountDownDate, this.roomId);
|
||||
}
|
||||
|
||||
setStatus(status: string) {
|
||||
let body = {
|
||||
message: '',
|
||||
@@ -377,28 +368,6 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
|
||||
this.ChatSystemService.getGroupRoom(this.roomId).loadHistory({});
|
||||
}
|
||||
|
||||
let room = await this.chatService.getRoomInfo(this.roomId).toPromise();
|
||||
this.room = room['room'];
|
||||
if (this.room.name) {
|
||||
try {
|
||||
this.roomName = this.room.name.split('-').join(' ');
|
||||
} catch (error) {
|
||||
this.roomName = this.room.name;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
if(SessionStore.user.ChatData.data.userId == this.room.u._id){
|
||||
this.isAdmin = true
|
||||
} else {
|
||||
this.isAdmin = false
|
||||
}
|
||||
|
||||
if (this.room.customFields.countDownDate) {
|
||||
this.roomCountDownDate = this.room.customFields.countDownDate;
|
||||
}
|
||||
|
||||
this.getGroupContacts(this.room);
|
||||
}
|
||||
|
||||
@@ -536,14 +505,6 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
|
||||
}
|
||||
else {
|
||||
|
||||
if(res?.data?.name) {
|
||||
try {
|
||||
this.roomName = res.data.name.split('-').join(' ');
|
||||
} catch (error) {
|
||||
this.roomName = res.data.name
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -4,4 +4,4 @@ import { environment as doneITProd } from './suport/doneIt'
|
||||
import { DevDev } from './suport/dev'
|
||||
|
||||
|
||||
export const environment: Environment = oaprProd;
|
||||
export const environment: Environment = DevDev;
|
||||
|
||||
Reference in New Issue
Block a user