mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-21 13:55:51 +00:00
improve
This commit is contained in:
@@ -46,7 +46,6 @@ export class ViewDocumentPage implements OnInit {
|
||||
|
||||
this.processes.GetViewer(this.docId, this.applicationId).subscribe(res=> {
|
||||
const link: string = res;
|
||||
console.log(res,' link!!!')
|
||||
this.trustedUrl = this.sanitazer.bypassSecurityTrustResourceUrl(link);
|
||||
}, ()=>{
|
||||
this.close();
|
||||
|
||||
@@ -224,8 +224,8 @@
|
||||
</app-group-contacts>
|
||||
|
||||
<app-group-messages
|
||||
*ngIf="showGroupMessages"
|
||||
[style.display]="showEmptyComponent ? 'flex' : 'none'"
|
||||
*ngIf="showGroupMessages && wsChatMethodsService.deleteRecently(roomId) == false"
|
||||
[style.display]="showEmptyComponent ? 'flex' : 'none'"
|
||||
(closeAllDesktopComponents)="closeAllDesktopComponents()"
|
||||
(showEmptyContainer)="showEmptyContainer()"
|
||||
(openGroupContacts)="openGroupContactsPage($event)"
|
||||
|
||||
@@ -129,16 +129,6 @@ export class ChatPage implements OnInit {
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
/* let data = {
|
||||
status: "success",
|
||||
data: {
|
||||
userId: "CqYSKR5hrAumZihs7",
|
||||
authToken: "bvh5BH98Av5ShMnEW94Cwm1Hf-yHEHbl121ijq5Odc_sdvs"
|
||||
}
|
||||
}
|
||||
SessionStore.user.ChatData = data
|
||||
SessionStore.save() */
|
||||
// console.log(SessionStore.user.ChatData.data.authToken)
|
||||
this.chatService.refreshtoken();
|
||||
|
||||
this.segment = "Contactos";
|
||||
|
||||
@@ -149,19 +149,6 @@ export class GabineteDigitalPage implements OnInit {
|
||||
public p: PermissionService
|
||||
) {
|
||||
|
||||
this.loggeduser = authService.ValidatedUser;
|
||||
window.onresize = (event) => {
|
||||
// if not mobile remove all component
|
||||
if (window.innerWidth < 701) {
|
||||
this.modalController.dismiss();
|
||||
this.segmentVista = "listview";
|
||||
}
|
||||
else {
|
||||
this.segmentVista = "boxview";
|
||||
}
|
||||
};
|
||||
this.checkRoutes();
|
||||
|
||||
}
|
||||
closeAllDesktopComponent() {
|
||||
this.desktopComponent = {
|
||||
@@ -173,42 +160,6 @@ export class GabineteDigitalPage implements OnInit {
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
if (window.innerWidth < 701) {
|
||||
this.segmentVista = "listview";
|
||||
}
|
||||
else {
|
||||
this.segmentVista = "boxview"
|
||||
}
|
||||
|
||||
const pathname = window.location.pathname
|
||||
this.router.events.forEach((event) => {
|
||||
if (event instanceof NavigationEnd && event.url == pathname) {
|
||||
|
||||
this.waitForDomService.selector({
|
||||
selector: 'app-gabinete-digital ion-content .aside-wrapper',
|
||||
callback: () => {
|
||||
this.checkRoutes();
|
||||
// console.log('FIRST CALL')
|
||||
this.LoadCounts();
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
|
||||
this.hideRefreshButton();
|
||||
|
||||
this.waitForDomService.selector({
|
||||
selector: 'app-gabinete-digital ion-content .aside-wrapper',
|
||||
callback: () => {
|
||||
// console.log('SECOND CALL')
|
||||
this.loadAllProcesses();
|
||||
}
|
||||
})
|
||||
|
||||
this.backgroundservice.registerBackService('Online', () => {
|
||||
this.loadAllProcesses();
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -44,3 +44,5 @@
|
||||
</div>
|
||||
|
||||
</ion-content>
|
||||
|
||||
|
||||
|
||||
@@ -42,6 +42,8 @@ export class WsChatMethodsService {
|
||||
sessionStore = SessionStore
|
||||
|
||||
loggedUser: any;
|
||||
|
||||
delete = []
|
||||
|
||||
constructor(
|
||||
private WsChatService: WsChatService,
|
||||
@@ -68,7 +70,7 @@ export class WsChatMethodsService {
|
||||
|
||||
this.WsChatService.registerCallback({
|
||||
type: 'reConnect',
|
||||
funx: ()=>{
|
||||
funx: () => {
|
||||
/**
|
||||
* @description when the phone is in the background for a long time it could disconnects from the socket then the socket reconnects automatically,
|
||||
* when the connection is lost the subscribe is also lost, so we have to subscribe again when reconnection is establish.
|
||||
@@ -363,10 +365,16 @@ export class WsChatMethodsService {
|
||||
|
||||
|
||||
deleteRoom(roomId) {
|
||||
|
||||
this.delete.push(roomId)
|
||||
delete this.group[roomId];
|
||||
this._group = this._group.filter((e)=> e.id != roomId);
|
||||
}
|
||||
|
||||
deleteRecently(roomId) {
|
||||
return this.delete.includes(roomId)
|
||||
}
|
||||
|
||||
roomExist(roomId) {
|
||||
return this.dm[roomId]?.id || this.group[roomId]?.id
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user