mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +00:00
git pull on developer
This commit is contained in:
@@ -290,6 +290,7 @@ export class CreateProcessPage implements OnInit {
|
||||
await this.despachoService.EfectuarDespacho({serialnumber: this.task.serialNumber, activityInstanceName: this.task.activityInstanceName}).toPromise();
|
||||
|
||||
this.modalController.dismiss();
|
||||
this.toastService._successMessage('Despacho criado');
|
||||
} catch (error) {
|
||||
this.toastService._badRequest('Processo não efectuado');
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
<div class="width-100" [ngSwitch]="segment">
|
||||
<ion-list *ngSwitchCase="'Contactos'">
|
||||
<ion-item-sliding>
|
||||
<div class="item item-hover width-100 d-flex ion-no-padding ion-no-margin"
|
||||
<div class="item item-hover width-100 d-flex ion-no-padding ion-no-margin"
|
||||
*ngFor="let dm of userDirectMessages"
|
||||
[class.item-active]="dm._id == idSelected">
|
||||
<div class="item-icon">
|
||||
@@ -72,8 +72,9 @@
|
||||
<div *ngIf="dm.lastMessage" class="item-description" [class.item-description-active]="dm._id == idSelected">
|
||||
<ion-label *ngIf="dm.lastMessage">{{dm.lastMessage.msg}}</ion-label>
|
||||
<ion-label *ngIf="dm.lastMessage.file">
|
||||
<fa-icon icon="file-alt" class="file-icon" [class.set-active-item-font-to-white]="dm._id == idSelected"></fa-icon>
|
||||
<span> {{dm.lastMessage.file.name}}</span>
|
||||
<fa-icon *ngIf="dm.lastMessage.file.type != 'application/meeting'" icon="file-alt" class="file-icon" [class.set-active-item-font-to-white]="dm._id == idSelected"></fa-icon>
|
||||
<fa-icon *ngIf="dm.lastMessage.file.type == 'application/meeting'" icon="calendar-alt" class="file-icon" [class.set-active-item-font-to-white]="dm._id == idSelected"></fa-icon>
|
||||
<span> {{dm.lastMessage.file.name || dm.lastMessage.file.subject }}</span>
|
||||
</ion-label>
|
||||
<ion-label *ngIf="dm.lastMessage.attachments">
|
||||
<div *ngIf="dm.lastMessage.attachments[0].image_url">
|
||||
@@ -85,9 +86,24 @@
|
||||
</div>
|
||||
</div>
|
||||
</ion-item-sliding>
|
||||
<ion-item-sliding *ngIf="showLoader || userDirectMessages.length < 1">
|
||||
<div *ngFor="let n of numSequence(8); let i = index;" class="item item-hover width-100 d-flex ion-no-padding ion-no-margin">
|
||||
<div class="item-icon"><ion-icon class="icon" slot="start" src="assets/icon/icons-chat-grey.svg"></ion-icon></div>
|
||||
<div class="item-content flex-grow-1 cursor-pointer">
|
||||
<div class="item-title-time">
|
||||
<div class="item-title"><ion-skeleton-text animated style="width: 50%"></ion-skeleton-text></div>
|
||||
<div class="item-date"><ion-skeleton-text animated></ion-skeleton-text></div>
|
||||
</div>
|
||||
<div class="item-description d-flex align-items-center">
|
||||
<fa-icon icon="file-alt" class="file-icon"></fa-icon>
|
||||
<ion-skeleton-text animated style="width: 95%; margin-left:5%"></ion-skeleton-text>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ion-item-sliding>
|
||||
</ion-list>
|
||||
<ion-list *ngSwitchCase="'Grupos'">
|
||||
<ion-item-sliding>
|
||||
<ion-item-sliding *ngIf="!showLoader">
|
||||
<div *ngFor="let group of allGroups"
|
||||
[class.item-active]="group._id ==idSelected"
|
||||
class="item item-hover d-flex">
|
||||
@@ -109,9 +125,10 @@
|
||||
</div>
|
||||
<div *ngIf="group.lastMessage" class="item-description d-flex align-items-center" [class.item-description-active]="group._id ==idSelected">
|
||||
<div class="item-message">{{group.lastMessage.u.name}}: {{group.lastMessage.msg}} </div>
|
||||
<div class="item-files" *ngIf="group.lastMessage.file">
|
||||
<fa-icon icon="file-alt" class="file-icon" [class.set-active-item-font-to-white]="group._id == idSelected"></fa-icon>
|
||||
<span> {{group.lastMessage.file.name}}</span>
|
||||
<div class="item-files add-ellipsis" *ngIf="group.lastMessage.file">
|
||||
<fa-icon *ngIf="group.lastMessage.file.type != 'application/meeting'" icon="file-alt" class="file-icon" [class.set-active-item-font-to-white]="group._id == idSelected"></fa-icon>
|
||||
<fa-icon *ngIf="group.lastMessage.file.type == 'application/meeting'" icon="calendar-alt" class="file-icon" [class.set-active-item-font-to-white]="group._id == idSelected"></fa-icon>
|
||||
<span class="item-files-title"> {{group.lastMessage.file.name || group.lastMessage.file.subject}}</span>
|
||||
</div>
|
||||
<div class="item-files" *ngIf="group.lastMessage.attachments">
|
||||
<div *ngIf="group.lastMessage.attachments[0].image_url">
|
||||
@@ -123,9 +140,25 @@
|
||||
</div>
|
||||
</div>
|
||||
</ion-item-sliding>
|
||||
<ion-item-sliding *ngIf="showLoader || allGroups.length < 1">
|
||||
<div *ngFor="let n of numSequence(8); let i = index;" class="item item-hover width-100 d-flex ion-no-padding ion-no-margin">
|
||||
<div class="item-icon"><ion-icon class="icon" slot="start" src="assets/icon/icons-group-chat-grey.svg"></ion-icon></div>
|
||||
<div class="item-content flex-grow-1 cursor-pointer">
|
||||
<div class="item-title-time">
|
||||
<div class="item-title"><ion-skeleton-text animated style="width: 50%"></ion-skeleton-text></div>
|
||||
<div class="item-date"><ion-skeleton-text animated></ion-skeleton-text></div>
|
||||
</div>
|
||||
<div class="item-description d-flex align-items-center">
|
||||
<fa-icon icon="file-alt" class="file-icon"></fa-icon>
|
||||
<ion-skeleton-text animated style="width: 95%; margin-left:5%"></ion-skeleton-text>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ion-item-sliding>
|
||||
|
||||
</ion-list>
|
||||
</div>
|
||||
|
||||
<!-- <button (click)="sendMsg()" style="height: 41px;">Send message</button> -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -126,6 +126,11 @@ ion-content{
|
||||
}
|
||||
.item-files{
|
||||
float: left;
|
||||
overflow: auto;
|
||||
|
||||
.item-files-title{
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
.item-description-active{
|
||||
|
||||
@@ -133,7 +133,7 @@ export class ChatPage implements OnInit {
|
||||
this.modalController.dismiss();
|
||||
}
|
||||
};
|
||||
|
||||
this.showLoader = true;
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
@@ -183,6 +183,10 @@ export class ChatPage implements OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
numSequence(n: number): Array<number> {
|
||||
return Array(n);
|
||||
}
|
||||
|
||||
ngOnDestroy() {
|
||||
this.setStatus('offline');
|
||||
this.dataService.set("newGroup", false);
|
||||
@@ -392,10 +396,12 @@ export class ChatPage implements OnInit {
|
||||
load() {
|
||||
switch (this.segment) {
|
||||
case "Contactos":
|
||||
this.showLoader = true;
|
||||
this.getDirectMessages();
|
||||
break;
|
||||
|
||||
case "Grupos":
|
||||
this.showLoader = true;
|
||||
this.getGroups();
|
||||
break;
|
||||
}
|
||||
@@ -536,14 +542,10 @@ export class ChatPage implements OnInit {
|
||||
}
|
||||
|
||||
async getDirectMessages(event?) {
|
||||
|
||||
this.chatService.getAllDirectMessages().subscribe(async (res: any) => {
|
||||
|
||||
|
||||
this.showLoader = false;
|
||||
this.transformDataRoomList(res.ims)
|
||||
|
||||
this.getDirectMessagesDB()
|
||||
|
||||
console.log('Chat list', res);
|
||||
|
||||
if (res != 200) {
|
||||
@@ -571,7 +573,6 @@ export class ChatPage implements OnInit {
|
||||
}
|
||||
else {
|
||||
//console.log('No timer!');
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -710,6 +711,7 @@ export class ChatPage implements OnInit {
|
||||
async getGroups(event?) {
|
||||
this.result = this.chatService.getAllPrivateGroups().subscribe(async (res: any) => {
|
||||
//console.log(res);
|
||||
this.showLoader = false;
|
||||
if (res.groups != 200) {
|
||||
|
||||
this.transformGroups(res.groups);
|
||||
@@ -735,15 +737,12 @@ export class ChatPage implements OnInit {
|
||||
if (this.segment == "Grupos" && this.showGroupMessages != true) {
|
||||
await new Promise(resolve => setTimeout(resolve, 1000));
|
||||
await this.getGroups();
|
||||
//console.log('Timer groups list running')
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
else {
|
||||
await this.getGroups();
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -164,6 +164,9 @@ export class PendentesPage implements OnInit {
|
||||
if (WorkflowName == 'Despacho') {
|
||||
this.router.navigate(['/home/gabinete-digital/despachos', SerialNumber, 'gabinete-digital']);
|
||||
}
|
||||
else if (WorkflowName == 'Despacho do Presidente da República') {
|
||||
this.router.navigate(['/home/gabinete-digital/despachos', SerialNumber, 'gabinete-digital']);
|
||||
}
|
||||
else if (WorkflowName == 'Pedido de Parecer' || WorkflowName == 'Pedido de Deferimento' || WorkflowName == 'Pedido de Parecer do Presidente') {
|
||||
this.router.navigate(['/home/gabinete-digital/pedidos', SerialNumber, 'gabinete-digital']);
|
||||
}
|
||||
|
||||
@@ -90,13 +90,13 @@ export class LoginPage implements OnInit {
|
||||
domainName: environment.domain,
|
||||
BasicAuthKey: ""
|
||||
}
|
||||
|
||||
|
||||
const loader = this.toastService.loading()
|
||||
|
||||
let attempt = await this.authService.login(this.userattempt, {saveSession: false})
|
||||
|
||||
loader.remove()
|
||||
|
||||
|
||||
if (attempt) {
|
||||
|
||||
if (attempt.UserId == SessionStore.user.UserId) {
|
||||
@@ -104,7 +104,7 @@ export class LoginPage implements OnInit {
|
||||
await this.authService.loginChat(this.userattempt);
|
||||
this.getToken();
|
||||
SessionStore.setInativity(true);
|
||||
|
||||
|
||||
this.goback()
|
||||
} else {
|
||||
|
||||
@@ -113,7 +113,7 @@ export class LoginPage implements OnInit {
|
||||
window.localStorage.clear();
|
||||
|
||||
await this.authService.SetSession(attempt, this.userattempt);
|
||||
|
||||
|
||||
this.changeProfileService.run()
|
||||
await this.authService.loginChat(this.userattempt);
|
||||
this.getToken();
|
||||
|
||||
@@ -82,6 +82,9 @@ export class PendentesPage implements OnInit {
|
||||
if(WorkflowName == 'Despacho') {
|
||||
this.router.navigate(['/home/gabinete-digital/despachos',SerialNumber,'gabinete-digital']);
|
||||
}
|
||||
else if (WorkflowName == 'Despacho do Presidente da República') {
|
||||
this.router.navigate(['/home/gabinete-digital/despachos', SerialNumber, 'gabinete-digital']);
|
||||
}
|
||||
else if(WorkflowName == 'Pedido de Parecer' || WorkflowName == 'Pedido de Deferimento' || WorkflowName == 'Pedido de Parecer do Presidente') {
|
||||
this.router.navigate(['/home/gabinete-digital/pedidos',SerialNumber,'gabinete-digital']);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user