mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
Merge branch 'developer' of bitbucket.org:equilibriumito/gabinete-digital into developer
This commit is contained in:
Generated
+1
-2
@@ -17290,8 +17290,7 @@
|
||||
},
|
||||
"ssri": {
|
||||
"version": "6.0.1",
|
||||
"resolved": "https://registry.npmjs.org/ssri/-/ssri-6.0.1.tgz",
|
||||
"integrity": "sha512-3Wge10hNcT1Kur4PDFwEieXSCMCJs/7WvSACcrMYrNp+b8kDL1/0wJch5Ni2WrtwEa2IO8OsVfeKIciKCDx/QA==",
|
||||
"resolved": "",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"figgy-pudding": "^3.5.1"
|
||||
|
||||
@@ -39,6 +39,18 @@ const routes: Routes = [
|
||||
{
|
||||
path: 'document-detail',
|
||||
loadChildren: () => import('./modals/document-detail/document-detail.module').then( m => m.DocumentDetailPageModule)
|
||||
},
|
||||
{
|
||||
path: 'edit-group',
|
||||
loadChildren: () => import('./shared/chat/edit-group/edit-group.module').then( m => m.EditGroupPageModule)
|
||||
},
|
||||
{
|
||||
path: 'pedidos',
|
||||
loadChildren: () => import('./shared/gabinete-digital/pedidos/pedidos.module').then( m => m.PedidosPageModule)
|
||||
},
|
||||
{
|
||||
path: 'despachos',
|
||||
loadChildren: () => import('./shared/gabinete-digital/despachos/despachos.module').then( m => m.DespachosPageModule)
|
||||
},
|
||||
|
||||
/* {
|
||||
|
||||
@@ -229,7 +229,7 @@ const routes: Routes = [
|
||||
{
|
||||
path:'',
|
||||
loadChildren: ()=> import('../modals/document-detail/document-detail.module').then(m => m.DocumentDetailPageModule)
|
||||
}
|
||||
},
|
||||
]
|
||||
},
|
||||
]
|
||||
|
||||
@@ -16,6 +16,7 @@ import { ContactsPage } from 'src/app/shared/chat/messages/contacts/contacts.pag
|
||||
import { NewGroupPage } from 'src/app/shared/chat/new-group/new-group.page';
|
||||
import { GroupContactsPage } from 'src/app/shared/chat/group-messages/group-contacts/group-contacts.page';
|
||||
import { PipesModule } from 'src/app/pipes/pipes.module';
|
||||
import { EditGroupPage } from 'src/app/shared/chat/edit-group/edit-group.page';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
@@ -33,6 +34,7 @@ import { PipesModule } from 'src/app/pipes/pipes.module';
|
||||
ContactsPage,
|
||||
GroupMessagesPage,
|
||||
NewGroupPage,
|
||||
EditGroupPage,
|
||||
GroupContactsPage,
|
||||
EmptyChatPage,
|
||||
],
|
||||
@@ -42,6 +44,7 @@ import { PipesModule } from 'src/app/pipes/pipes.module';
|
||||
ContactsPage,
|
||||
GroupMessagesPage,
|
||||
NewGroupPage,
|
||||
EditGroupPage,
|
||||
GroupContactsPage,
|
||||
EmptyChatPage,
|
||||
]
|
||||
|
||||
@@ -94,16 +94,40 @@
|
||||
</div>
|
||||
<!-- Aside right -->
|
||||
<div class="aside-content d-none flex-column height-100">
|
||||
<app-empty-chat [texto]="emptyTextDescription" class="d-flex height-100 flex-column" *ngIf="showEmptyComponent" #messagecontainer></app-empty-chat>
|
||||
<app-messages class="d-flex height-100 flex-column" [roomId]="roomId" *ngIf="showMessages" #messagecontainer></app-messages>
|
||||
<app-contacts (openMessage)="openMessagesPage($event)" *ngIf="showContacts" class="d-flex height-100 flex-column"></app-contacts>
|
||||
<app-new-group (addGroupMessage)="openGroupContactsPage($event)" *ngIf="showNewGroup" class="d-flex height-100 flex-column"></app-new-group>
|
||||
<app-group-contacts (openGroupMessage)="openGroupMessagesPage($event)" [roomId]="groupRoomId" class="d-flex height-100 flex-column" *ngIf="showGroupContacts"></app-group-contacts>
|
||||
<app-empty-chat [texto]="emptyTextDescription"
|
||||
class="d-flex height-100 flex-column"
|
||||
*ngIf="showEmptyComponent" #messagecontainer>
|
||||
</app-empty-chat>
|
||||
<app-messages class="d-flex height-100 flex-column"
|
||||
[roomId]="roomId" *ngIf="showMessages" #messagecontainer>
|
||||
</app-messages>
|
||||
<app-contacts
|
||||
(openMessage)="openMessagesPage($event)"
|
||||
*ngIf="showContacts" class="d-flex height-100 flex-column">
|
||||
</app-contacts>
|
||||
<app-new-group
|
||||
(addGroupMessage)="openGroupContactsPage($event)"
|
||||
*ngIf="showNewGroup" class="d-flex height-100 flex-column">
|
||||
</app-new-group>
|
||||
<app-edit-group [roomId]="roomId"
|
||||
(closeAllDesktopComponents)="closeAllDesktopComponents()"
|
||||
(openGroupMessage)="openGroupMessagesPage($event)"
|
||||
*ngIf="showEditGroup" class="d-flex height-100 flex-column">
|
||||
</app-edit-group>
|
||||
<app-group-contacts
|
||||
(openGroupMessage)="openGroupMessagesPage($event)"
|
||||
[roomId]="groupRoomId" class="d-flex height-100 flex-column"
|
||||
*ngIf="showGroupContacts">
|
||||
</app-group-contacts>
|
||||
<app-group-messages
|
||||
(closeAllDesktopComponents)="closeAllDesktopComponents()"
|
||||
(showEmptyContainer)="showEmptyContainer()"
|
||||
(openGroupContacts)="openGroupContactsPage($event)"
|
||||
*ngIf="showGroupMessages" class="d-flex height-100 flex-column" [roomId]="roomId" #messagecontainer></app-group-messages>
|
||||
(openEditGroupPage)="openEditGroupPage($event)"
|
||||
*ngIf="showGroupMessages"
|
||||
class="d-flex height-100 flex-column"
|
||||
[roomId]="roomId" #messagecontainer>
|
||||
</app-group-messages>
|
||||
</div>
|
||||
</div>
|
||||
</ion-content>
|
||||
|
||||
@@ -20,6 +20,7 @@ import { NewGroupPage } from './new-group/new-group.page';
|
||||
import { NewchatPage } from './newchat/newchat.page';
|
||||
import { Storage } from '@ionic/storage';
|
||||
import { AlertService } from 'src/app/services/alert.service';
|
||||
import { EditGroupPage } from 'src/app/shared/chat/edit-group/edit-group.page';
|
||||
|
||||
@Component({
|
||||
selector: 'app-chat',
|
||||
@@ -63,6 +64,7 @@ export class ChatPage implements OnInit {
|
||||
showMessages=false;
|
||||
showContacts=false;
|
||||
showNewGroup=false;
|
||||
showEditGroup=false;
|
||||
showGroupMessages=false;
|
||||
showGroupContacts=false;
|
||||
emptyTextDescription = 'Sem conversa selecionada';
|
||||
@@ -105,6 +107,7 @@ export class ChatPage implements OnInit {
|
||||
this.showMessages=false;
|
||||
this.showContacts=false;
|
||||
this.showNewGroup=false;
|
||||
this.showEditGroup=false;
|
||||
this.showGroupMessages=false;
|
||||
this.showEmptyComponent=false;
|
||||
this.showGroupContacts=false;
|
||||
@@ -157,6 +160,17 @@ export class ChatPage implements OnInit {
|
||||
this.showNewGroup=true;
|
||||
}
|
||||
}
|
||||
|
||||
openEditGroupPage(rid) {
|
||||
if( window.innerWidth <= 1024){
|
||||
this.editGroup(rid);
|
||||
}
|
||||
else{
|
||||
this.closeAllDesktopComponents();
|
||||
this.showEditGroup=true;
|
||||
}
|
||||
}
|
||||
|
||||
openGroupMessagesPage(data) {
|
||||
console.log('HERE');
|
||||
|
||||
@@ -252,7 +266,6 @@ export class ChatPage implements OnInit {
|
||||
const modal = await this.modalController.create({
|
||||
component: ContactsPage,
|
||||
cssClass: 'contacts',
|
||||
backdropDismiss: false,
|
||||
});
|
||||
await modal.present();
|
||||
modal.onDidDismiss();
|
||||
@@ -261,11 +274,26 @@ export class ChatPage implements OnInit {
|
||||
const modal = await this.modalController.create({
|
||||
component: NewGroupPage,
|
||||
cssClass: 'new-group',
|
||||
backdropDismiss: false,
|
||||
});
|
||||
await modal.present();
|
||||
modal.onDidDismiss();
|
||||
}
|
||||
|
||||
async editGroup(roomId){
|
||||
const modal = await this.modalController.create({
|
||||
component: EditGroupPage,
|
||||
cssClass: 'edit-group',
|
||||
componentProps: {
|
||||
roomId: roomId,
|
||||
},
|
||||
});
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then((res)=>{
|
||||
console.log(res.data);
|
||||
this.modalController.dismiss(res.data);
|
||||
});
|
||||
}
|
||||
|
||||
async openMessagesModal(roomId:any){
|
||||
this.closeAllDesktopComponents();
|
||||
|
||||
@@ -280,7 +308,6 @@ export class ChatPage implements OnInit {
|
||||
const modal = await this.modalController.create({
|
||||
component: MessagesPage,
|
||||
cssClass: classs,
|
||||
backdropDismiss: false,
|
||||
componentProps: {
|
||||
roomId: roomId,
|
||||
},
|
||||
@@ -301,7 +328,6 @@ export class ChatPage implements OnInit {
|
||||
const modal = await this.modalController.create({
|
||||
component: GroupMessagesPage,
|
||||
cssClass: classs,
|
||||
backdropDismiss: false,
|
||||
componentProps: {
|
||||
roomId: roomId,
|
||||
},
|
||||
|
||||
@@ -3,7 +3,9 @@
|
||||
<div class="main-header">
|
||||
<div class="title-content">
|
||||
<div class="left">
|
||||
<ion-icon (click)="close()" slot="end" src='assets/images/icons-arrow-arrow-left.svg'></ion-icon>
|
||||
<button class="btn-no-color" (click)="close()">
|
||||
<ion-icon slot="end" src='assets/images/icons-arrow-arrow-left.svg'></ion-icon>
|
||||
</button>
|
||||
</div>
|
||||
<div class="middle">
|
||||
<ion-label class="title">Alterar assunto</ion-label>
|
||||
|
||||
@@ -14,6 +14,7 @@ export class EditGroupPage implements OnInit {
|
||||
selectedDuration = ['','',''];
|
||||
groupName:string;
|
||||
room:any;
|
||||
roomId:string;
|
||||
|
||||
constructor(
|
||||
private modalController: ModalController,
|
||||
@@ -21,12 +22,19 @@ export class EditGroupPage implements OnInit {
|
||||
private chatService: ChatService,
|
||||
private navParams: NavParams,
|
||||
) {
|
||||
this.room = this.navParams.get('room');
|
||||
this.groupName = this.room.name.split('-').join(' ');
|
||||
this.roomId = this.navParams.get('roomId');
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
console.log(this.room);
|
||||
this.getRoomInfo();
|
||||
}
|
||||
|
||||
getRoomInfo(){
|
||||
this.chatService.getRoomInfo(this.roomId).subscribe(room=>{
|
||||
this.room = room['room'];
|
||||
console.log(this.room);
|
||||
this.groupName = this.room.name.split('-').join(' ');
|
||||
});
|
||||
}
|
||||
|
||||
close(){
|
||||
|
||||
@@ -3,7 +3,9 @@
|
||||
<div class="main-header">
|
||||
<div class="title-content">
|
||||
<div class="back-icon">
|
||||
<ion-icon (click)="close()" slot="end" src='assets/images/icons-arrow-arrow-left.svg'></ion-icon>
|
||||
<button class="btn-no-color" (click)="close()">
|
||||
<ion-icon slot="end" src='assets/images/icons-arrow-arrow-left.svg'></ion-icon>
|
||||
</button>
|
||||
</div>
|
||||
<div class="div-title">
|
||||
<ion-label class="title">Contactos</ion-label>
|
||||
@@ -33,11 +35,16 @@
|
||||
<div *ngIf="members">
|
||||
<ion-label class="members-label">Contactos selecção:</ion-label>
|
||||
<ion-list class="members-list" *ngFor="let user of members">
|
||||
<div class="members-checkbox">
|
||||
<ion-checkbox checked color="primary"></ion-checkbox>
|
||||
<p>{{user.name}}</p>
|
||||
<ion-icon class="{{user.status}}" name="ellipse"></ion-icon>
|
||||
</div>
|
||||
<ion-item-sliding>
|
||||
<ion-item lines="none" class="members-checkbox ion-no-border ion-no-padding">
|
||||
<ion-checkbox checked color="primary"></ion-checkbox>
|
||||
<p>{{user.name}}</p>
|
||||
<ion-icon class="{{user.status}}" name="ellipse"></ion-icon>
|
||||
</ion-item>
|
||||
<ion-item-options (click)="deleteMember(user)" class="members-options" side="end">
|
||||
<ion-item-option color="danger">Apagar</ion-item-option>
|
||||
</ion-item-options>
|
||||
</ion-item-sliding>
|
||||
</ion-list>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -93,10 +93,15 @@
|
||||
|
||||
.members-checkbox{
|
||||
display: flex;
|
||||
margin: .5px 20px .5px 20px !important;
|
||||
margin: 0px 20px 0px 20px !important;
|
||||
overflow: auto;
|
||||
align-items: center;
|
||||
border-bottom: 1px solid #ebebeb;
|
||||
}
|
||||
|
||||
.members-options{
|
||||
margin: 0px 20px 0px 19px !important;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.item-divider{
|
||||
@@ -115,7 +120,13 @@
|
||||
|
||||
}
|
||||
|
||||
.item-checkbox ion-checkbox, .members-checkbox ion-checkbox{
|
||||
.members-checkbox ion-checkbox{
|
||||
--border-color: #0d89d1;
|
||||
--background-checked:#0d89d1;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.item-checkbox ion-checkbox{
|
||||
--border-color: #0d89d1;
|
||||
--background-checked:#0d89d1;
|
||||
float: left;
|
||||
|
||||
@@ -53,10 +53,47 @@ export class GroupContactsPage implements OnInit {
|
||||
|
||||
ngOnInit() {
|
||||
this.loadUsers();
|
||||
this.getMembers();
|
||||
console.log(this.groupName);
|
||||
console.log(this.isGroupCreated);
|
||||
}
|
||||
|
||||
deleteMember(data:any){
|
||||
let body = {
|
||||
"roomId": this.room._id,
|
||||
"userId": data._id,
|
||||
}
|
||||
console.log(body);
|
||||
if(this.room.t == "p"){
|
||||
this.chatService.removeGroupMember(body).subscribe(res=>{
|
||||
console.log(res);
|
||||
this.getMembers();
|
||||
});
|
||||
}
|
||||
else if(this.room.t == "c"){
|
||||
this.chatService.removeChannelMember(body).subscribe(res=>{
|
||||
console.log(res);
|
||||
this.getMembers();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
getMembers(){
|
||||
if(this.room.t == "p"){
|
||||
this.chatService.getGroupMembers(this.room._id).subscribe(res=>{
|
||||
this.members = res['members'];
|
||||
this.loadUsers();
|
||||
});
|
||||
}
|
||||
else if(this.room.t == "c"){
|
||||
this.chatService.getChannelMembers(this.room._id).subscribe(res=>{
|
||||
this.members = res['members'];
|
||||
this.loadUsers();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
loadUsers(){
|
||||
this.options = {
|
||||
headers: this.headers,
|
||||
@@ -68,7 +105,6 @@ export class GroupContactsPage implements OnInit {
|
||||
else{
|
||||
this.contacts = res.users.filter(data => data.username != this.loggedUser.me.username);
|
||||
}
|
||||
|
||||
this.users = this.contacts.sort((a,b) => {
|
||||
if(a.name < b.name){
|
||||
return -1;
|
||||
@@ -98,8 +134,10 @@ export class GroupContactsPage implements OnInit {
|
||||
return null;
|
||||
}
|
||||
|
||||
doRefresh(event){
|
||||
|
||||
doRefresh(ev){
|
||||
this.loadUsers();
|
||||
this.getMembers();
|
||||
ev.target.complete();
|
||||
}
|
||||
|
||||
async close(){
|
||||
|
||||
@@ -48,9 +48,12 @@
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="msg.t == 'r'" class="info-text">
|
||||
<ion-label>Alterou o assunto de para "{{msg.msg.split('-').join(' ')}}"</ion-label><br />
|
||||
<ion-label>Alterou o assunto para "{{msg.msg.split('-').join(' ')}}"</ion-label><br />
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="leaveStatus" class="info-text-leave">
|
||||
<ion-label>{{leaveStatus}}</ion-label>
|
||||
</div>
|
||||
|
||||
</ion-content>
|
||||
<!--
|
||||
|
||||
@@ -103,6 +103,24 @@
|
||||
/* margin: 15px 0px 15px 0px; */
|
||||
border-radius: 8px;
|
||||
}
|
||||
.info-text-leave{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: fit-content;
|
||||
padding: 10px;
|
||||
background: #e0e9ee;
|
||||
border-radius: 8px;
|
||||
margin: 10px auto;
|
||||
color: #797979 !important;
|
||||
font-size: 13px !important;
|
||||
/* margin: 15px 0px 15px 0px; */
|
||||
|
||||
.info-text-leave ion-label{
|
||||
font-size: 13px !important;
|
||||
line-height: 1.2rem;
|
||||
}
|
||||
}
|
||||
.messages{
|
||||
font-size: 13px;
|
||||
font-family: Roboto;
|
||||
|
||||
@@ -19,9 +19,9 @@ export class GroupMessagesPage implements OnInit {
|
||||
isGroupCreated:boolean;
|
||||
loggedUser: any;
|
||||
message:any;
|
||||
leaveStatus:any;
|
||||
messages:any;
|
||||
|
||||
|
||||
room:any;
|
||||
roomName:any;
|
||||
members:any;
|
||||
@@ -66,7 +66,6 @@ export class GroupMessagesPage implements OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/* load(){
|
||||
this.getGroupContacts();
|
||||
this.loadGroupMessages();
|
||||
@@ -145,9 +144,12 @@ export class GroupMessagesPage implements OnInit {
|
||||
});
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then(res=>{
|
||||
if(res.data == 'leave'){
|
||||
this.leaveStatus = this.loggedUser.me.name + ' saiu do grupo';
|
||||
}
|
||||
console.log('OK2');
|
||||
|
||||
console.log(res);
|
||||
console.log(res.data);
|
||||
/* if(res.data ==){
|
||||
this.roomName = res.data.name.split('-').join(' ');
|
||||
console.log(this.roomName);
|
||||
|
||||
@@ -3,7 +3,9 @@
|
||||
<div class="main-header">
|
||||
<div class="title-content">
|
||||
<div class="left">
|
||||
<ion-icon (click)="close()" slot="end" src='assets/images/icons-arrow-arrow-left.svg'></ion-icon>
|
||||
<button class="btn-no-color" (click)="close()">
|
||||
<ion-icon slot="end" src='assets/images/icons-arrow-arrow-left.svg'></ion-icon>
|
||||
</button>
|
||||
</div>
|
||||
<div class="middle">
|
||||
<ion-label class="title">Novo Grupo</ion-label>
|
||||
|
||||
@@ -30,7 +30,6 @@
|
||||
</ion-list>
|
||||
<hr/>
|
||||
|
||||
|
||||
<ion-list lines="none" *ngIf="taskParticipants.length >= 1 && adding == 'intervenient' " class="flex-grow-1 overflow-y-auto height-100 pb-0" >
|
||||
<div class="px-20 font-15 pt-20" style="border-top:1px solid #ebebeb;font-weight: 500;" *ngIf="taskParticipants.length >= 1 || taskParticipantsCc.length >= 1" > Destinatário</div>
|
||||
<ion-item-sliding class="px-20">
|
||||
|
||||
+1
-1
@@ -112,7 +112,7 @@ export class BookMeetingModalPage implements OnInit {
|
||||
|
||||
this.processes.FindTaskDocId(this.task.SerialNumber).subscribe(res =>{
|
||||
if(res){
|
||||
this.calendarService.postExpedientEvent(res, this.postData, "md",this.task.SerialNumber);
|
||||
this.calendarService.postExpedientEvent(res, this.postData, "md",this.task.SerialNumber, this.task.FsId);
|
||||
}
|
||||
});
|
||||
this.distartExpedientModal();
|
||||
|
||||
@@ -14,6 +14,8 @@ import { EmptyContainerPage } from 'src/app/shared/empty-container/empty-contain
|
||||
import { EventsToApprovePage } from 'src/app/shared/gabinete-digital/events-to-approve/events-to-approve.page';
|
||||
import { ExpedientePage } from 'src/app/shared/gabinete-digital/expediente/expediente.page';
|
||||
import { ExpedientsPage } from 'src/app/shared/gabinete-digital/expedients/expedients.page';
|
||||
import { PedidosPage } from 'src/app/shared/gabinete-digital/pedidos/pedidos.page';
|
||||
import { DespachosPage } from 'src/app/shared/gabinete-digital/despachos/despachos.page';
|
||||
|
||||
/* import { ComponentsModule } from 'src/app/components/components.module'; */
|
||||
|
||||
@@ -32,12 +34,16 @@ import { ExpedientsPage } from 'src/app/shared/gabinete-digital/expedients/exped
|
||||
EventsToApprovePage,
|
||||
ExpedientePage,
|
||||
ExpedientsPage,
|
||||
PedidosPage,
|
||||
DespachosPage,
|
||||
],
|
||||
entryComponents: [
|
||||
EmptyContainerPage,
|
||||
EventsToApprovePage,
|
||||
ExpedientePage,
|
||||
ExpedientsPage,
|
||||
PedidosPage,
|
||||
DespachosPage,
|
||||
],
|
||||
schemas: [CUSTOM_ELEMENTS_SCHEMA]
|
||||
})
|
||||
|
||||
@@ -45,28 +45,28 @@
|
||||
<p class="text-center exp-card-content"><span class="number">-</span> <span class="title1">Documentos</span></p>
|
||||
</div>
|
||||
|
||||
<div [class.active]="selectedElement == 'RequestsForOpinion'" class="exp-card d-flex flex-column justify-center" (click)="notImplemented()">
|
||||
<div [class.active]="selectedElement == '£££££££'" class="exp-card d-flex flex-column justify-center" (click)="openDespachosPage()">
|
||||
<div class="d-flex justify-center">
|
||||
<ion-icon src="assets/images/icons-despachos-presidente.svg"></ion-icon>
|
||||
</div>
|
||||
<p class="text-center exp-card-title ">Despachos</p>
|
||||
<p class="text-center exp-card-content">{{count_desp_dailywork}}<span class="title1">Documentos</span> </p>
|
||||
</div>
|
||||
|
||||
<div [class.active]="selectedElement == 'RequestsForOpinion'" class="exp-card d-flex flex-column justify-center" (click)="openPedidosPage('parecer')">
|
||||
<div class="d-flex justify-center">
|
||||
<ion-icon src="assets/images/icons-expediente-parecer.svg"></ion-icon>
|
||||
</div>
|
||||
<p class="text-center exp-card-title ">Pedidos de Parecer</p>
|
||||
<p class="text-center exp-card-content"><span class="number">-</span> <span class="title1">Documentos</span></p>
|
||||
<p class="text-center exp-card-content">{{count_par_dailywork}} <span class="title1">Documentos</span></p>
|
||||
</div>
|
||||
|
||||
<div [class.active]="selectedElement == 'RequestForApproval'" class="exp-card d-flex flex-column justify-center" (click)="notImplemented()">
|
||||
<div [class.active]="selectedElement == 'RequestForApproval'" class="exp-card d-flex flex-column justify-center" (click)="openPedidosPage('deferimento')">
|
||||
<div class="d-flex justify-center">
|
||||
<ion-icon src="assets/images/icons-expediente-deferimento.svg"></ion-icon>
|
||||
</div>
|
||||
<p class="text-center exp-card-title ">Pedidos de Deferimento</p>
|
||||
<p class="text-center exp-card-content"><span class="number">-</span> <span class="title1">Documentos</span></p>
|
||||
</div>
|
||||
|
||||
<div [class.active]="selectedElement == '£££££££'" class="exp-card d-flex flex-column justify-center" (click)="notImplemented()">
|
||||
<div class="d-flex justify-center">
|
||||
<ion-icon src="assets/images/icons-expediente-diploma.svg"></ion-icon>
|
||||
</div>
|
||||
<p class="text-center exp-card-title ">Diplomas por Validar</p>
|
||||
<p class="text-center exp-card-content"><span class="number">-</span> <span class="title1">Documentos</span> </p>
|
||||
<p class="text-center exp-card-content">{{count_def_dailywork}} <span class="title1">Documentos</span></p>
|
||||
</div>
|
||||
|
||||
<div [class.active]="selectedElement == '£££££££'" class="exp-card d-flex d-none flex-column justify-center" (click)="notImplemented()">
|
||||
@@ -109,6 +109,14 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div [class.active]="selectedElement == '£££££££'" class="exp-card d-flex flex-column justify-center" (click)="notImplemented()">
|
||||
<div class="d-flex justify-center">
|
||||
<ion-icon src="assets/images/icons-expediente-diploma.svg"></ion-icon>
|
||||
</div>
|
||||
<p class="text-center exp-card-title ">Diplomas por Validar</p>
|
||||
<p class="text-center exp-card-content"><span class="number">-</span> <span class="title1">Documentos</span> </p>
|
||||
</div>
|
||||
|
||||
<div [class.active]="selectedElement == '£££££££'" class="exp-card d-flex flex-column justify-center" (click)="notImplemented()">
|
||||
<div class="d-flex justify-center">
|
||||
<ion-icon src="assets/images/icons-diplomas-assinados-presidente.svg"></ion-icon>
|
||||
@@ -130,6 +138,8 @@
|
||||
|
||||
<app-expedients (openExpedientDetail)="openExpedientPage($event)" [profile]="profile" class="d-flex height-100 flex-column" *ngIf="showExpedients"></app-expedients>
|
||||
<app-expediente (openExpedientList)="openExpedientListPage()" [profile]="profile" [serialNumber]="serialNumber" class="d-flex height-100 flex-column" *ngIf="showExpedientDetail"></app-expediente>
|
||||
<app-pedidos (openExpedientDetail)="openExpedientPage($event)" [profile]="profile" [segment]="segment" class="d-flex height-100 flex-column" *ngIf="showPedidos"></app-pedidos>
|
||||
<app-despachos (openExpedientDetail)="openExpedientPage($event)" [profile]="profile" class="d-flex height-100 flex-column" *ngIf="showDespachos"></app-despachos>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
@@ -19,6 +19,9 @@ export class GabineteDigitalPage implements OnInit {
|
||||
public profile:string;
|
||||
|
||||
count_exp_dailywork=0;
|
||||
count_desp_dailywork=0;
|
||||
count_par_dailywork=0;
|
||||
count_def_dailywork=0;
|
||||
count_exp_pp : string;
|
||||
count_exp_pd : string;
|
||||
count_dip_apr : string;
|
||||
@@ -37,6 +40,8 @@ export class GabineteDigitalPage implements OnInit {
|
||||
showEventsToApprove = false;
|
||||
showEmptyContainer = false;
|
||||
showExpedients = true;
|
||||
showPedidos = false;
|
||||
showDespachos = false;
|
||||
showExpedientDetail = false;
|
||||
emptyTextDescription = 'Sem opção selecionada';
|
||||
|
||||
@@ -111,6 +116,8 @@ export class GabineteDigitalPage implements OnInit {
|
||||
this.showEventsToApprove = false;
|
||||
this.showExpedients = false;
|
||||
this.showExpedients = false;
|
||||
this.showPedidos = false;
|
||||
this.showDespachos = false;
|
||||
this.showExpedientDetail = false;
|
||||
}
|
||||
|
||||
@@ -120,6 +127,18 @@ export class GabineteDigitalPage implements OnInit {
|
||||
this.showLoader = false;
|
||||
this.count_exp_dailywork = res;
|
||||
});
|
||||
this.processesbackend.GetTasksList("Despacho", true).subscribe(res =>{
|
||||
this.showLoader = false;
|
||||
this.count_desp_dailywork = res;
|
||||
});
|
||||
this.processesbackend.GetTasksList("Pedido de Parecer", true).subscribe(res =>{
|
||||
this.showLoader = false;
|
||||
this.count_par_dailywork = res;
|
||||
});
|
||||
this.processesbackend.GetTasksList("Pedido de Deferimento", true).subscribe(res =>{
|
||||
this.showLoader = false;
|
||||
this.count_def_dailywork = res;
|
||||
});
|
||||
this.processesbackend.GetToApprovedEvents('PR','true').subscribe(res=>{
|
||||
this.count_ev_pr = res;
|
||||
});
|
||||
@@ -204,6 +223,27 @@ export class GabineteDigitalPage implements OnInit {
|
||||
}
|
||||
}
|
||||
|
||||
openPedidosPage(segment:string){
|
||||
this.closeAllDesktopComponents();
|
||||
if( window.innerWidth <= 1024){
|
||||
this.openExpedientList();
|
||||
}
|
||||
else{
|
||||
this.segment = segment;
|
||||
this.showPedidos = true;
|
||||
}
|
||||
}
|
||||
|
||||
openDespachosPage(segment:string){
|
||||
this.closeAllDesktopComponents();
|
||||
if( window.innerWidth <= 1024){
|
||||
this.openExpedientList();
|
||||
}
|
||||
else{
|
||||
this.showDespachos = true;
|
||||
}
|
||||
}
|
||||
|
||||
async openExpedientList(){
|
||||
|
||||
this.closeAllDesktopComponent();
|
||||
|
||||
@@ -10,8 +10,8 @@ import { AuthConnstants } from 'src/app/config/auth-constants';
|
||||
import { PhotoService } from 'src/app/services/photo.service';
|
||||
import { NotificationsService } from 'src/app/services/notifications.service';
|
||||
import { HttpClient, HttpHeaders, HttpParams } from '@angular/common/http';
|
||||
import { Token } from '../../models/token.model';
|
||||
import { FCM } from 'cordova-plugin-fcm-with-dependecy-updated/ionic/ngx';
|
||||
//import { Token } from '../../models/token.model';
|
||||
//import { FCM } from 'cordova-plugin-fcm-with-dependecy-updated/ionic/ngx';
|
||||
|
||||
/* import { Plugins, PushNotification, PushNotificationToken, PushNotificationActionPerformed } from '@capacitor/core';
|
||||
|
||||
@@ -40,7 +40,8 @@ export class LoginPage implements OnInit {
|
||||
private toastService: ToastService,
|
||||
private photoService: PhotoService,
|
||||
public alertController: AlertController,
|
||||
private fcm: FCM) { }
|
||||
//private fcm: FCM
|
||||
) { }
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
@@ -98,7 +99,7 @@ export class LoginPage implements OnInit {
|
||||
}
|
||||
if (await this.authService.login(this.userattempt)) {
|
||||
this.loginRocketChat();
|
||||
this.getToken();
|
||||
//this.getToken();
|
||||
|
||||
this.router.navigate(['/home/events']);
|
||||
}
|
||||
|
||||
@@ -119,6 +119,12 @@ export class ChatService {
|
||||
}
|
||||
return this.http.post(environment.apiChatUrl+'chat.sendMessage', body, opts);
|
||||
}
|
||||
leaveRoom(body:any){
|
||||
let opts = {
|
||||
headers: this.headers,
|
||||
}
|
||||
return this.http.post(environment.apiChatUrl+'rooms.leave', body, opts);
|
||||
}
|
||||
//Load members from a chat
|
||||
getMembers(roomId:any){
|
||||
|
||||
@@ -205,6 +211,18 @@ export class ChatService {
|
||||
closeChannel(body:any){
|
||||
return this.http.post(environment.apiChatUrl+'channels.close', body, this.options);
|
||||
}
|
||||
leaveGroup(body:any){
|
||||
return this.http.post(environment.apiChatUrl+'groups.leave', body, this.options);
|
||||
}
|
||||
leaveChannel(body:any){
|
||||
return this.http.post(environment.apiChatUrl+'channels.leave', body, this.options);
|
||||
}
|
||||
removeChannelMember(body:any){
|
||||
let opts = {
|
||||
headers: this.headers,
|
||||
}
|
||||
return this.http.post(environment.apiChatUrl+'channels.kick', body, opts);
|
||||
}
|
||||
deleteGroup(body:any){
|
||||
return this.http.post(environment.apiChatUrl+'groups.delete', body, this.options);
|
||||
}
|
||||
@@ -227,5 +245,11 @@ export class ChatService {
|
||||
renameGroup(body:any){
|
||||
return this.http.post(environment.apiChatUrl+'groups.rename', body, this.options);
|
||||
}
|
||||
removeGroupMember(body:any){
|
||||
let opts = {
|
||||
headers: this.headers,
|
||||
}
|
||||
return this.http.post(environment.apiChatUrl+'groups.kick', body, opts);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -191,12 +191,13 @@ export class EventsService {
|
||||
|
||||
return this.http.delete(`${puturl}`, options)
|
||||
}
|
||||
postExpedientEvent(docId:any, body:any, sharedagenda:string, serialNumber:any){
|
||||
postExpedientEvent(docId:any, body:any, sharedagenda:string, serialNumber:any, applicationID:any){
|
||||
const geturl = environment.apiURL + 'calendar/' + ((sharedagenda != '') ? sharedagenda : 'CreateEventExpediente')+'/event';
|
||||
let params = new HttpParams();
|
||||
|
||||
params = params.set("DocId", docId);
|
||||
params = params.set("SerialNumber", serialNumber);
|
||||
params = params.set("applicationID", applicationID);
|
||||
|
||||
let options = {
|
||||
headers: this.headers,
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
<div class="right">
|
||||
<ion-label>Seguinte</ion-label>
|
||||
<div>
|
||||
<button class="btn-no-color right">
|
||||
<ion-label>Seguinte</ion-label>
|
||||
</button>
|
||||
</div>
|
||||
@@ -0,0 +1,17 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { Routes, RouterModule } from '@angular/router';
|
||||
|
||||
import { EditGroupPage } from './edit-group.page';
|
||||
|
||||
const routes: Routes = [
|
||||
{
|
||||
path: '',
|
||||
component: EditGroupPage
|
||||
}
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
imports: [RouterModule.forChild(routes)],
|
||||
exports: [RouterModule],
|
||||
})
|
||||
export class EditGroupPageRoutingModule {}
|
||||
@@ -0,0 +1,22 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
|
||||
import { IonicModule } from '@ionic/angular';
|
||||
|
||||
import { EditGroupPageRoutingModule } from './edit-group-routing.module';
|
||||
|
||||
import { EditGroupPage } from './edit-group.page';
|
||||
import { SharedModule } from '../../shared.module';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule,
|
||||
FormsModule,
|
||||
IonicModule,
|
||||
SharedModule,
|
||||
EditGroupPageRoutingModule
|
||||
],
|
||||
declarations: [EditGroupPage]
|
||||
})
|
||||
export class EditGroupPageModule {}
|
||||
@@ -0,0 +1,42 @@
|
||||
<ion-header class="ion-no-border">
|
||||
<ion-toolbar class="header-toolbar">
|
||||
<div class="main-header">
|
||||
<div class="title-content">
|
||||
<div class="left">
|
||||
<button class="btn-no-color" (click)="close()">
|
||||
<ion-icon slot="end" src='assets/images/icons-arrow-arrow-left.svg'></ion-icon>
|
||||
</button>
|
||||
</div>
|
||||
<div class="middle">
|
||||
<ion-label class="title">Alterar assunto</ion-label>
|
||||
</div>
|
||||
<app-btn-seguinte *ngIf="groupName" (click)="changeGroupName()"></app-btn-seguinte>
|
||||
</div>
|
||||
</div>
|
||||
</ion-toolbar>
|
||||
</ion-header>
|
||||
|
||||
<ion-content class="width-100">
|
||||
<div class="main-content d-flex width-100">
|
||||
<div class="item-container d-flex flex-column width-100">
|
||||
<ion-input [(ngModel)]="groupName" placeholder="Título"></ion-input>
|
||||
</div>
|
||||
<div *ngIf="false" class="item-container-no-border">
|
||||
<ion-checkbox (ionChange)="_ionChange($event)" color="primary"></ion-checkbox>
|
||||
<ion-label>Grupo Ultra-secreto</ion-label>
|
||||
</div>
|
||||
|
||||
<div *ngIf="showDuration" class="container-div width-100">
|
||||
<div class="ion-item-class-2 width-100">
|
||||
<div class="ion-icon-class">
|
||||
<ion-icon slot="start" src="assets/images/icons-duration.svg"></ion-icon>
|
||||
</div>
|
||||
<div class="ion-input-class">
|
||||
<ion-input (click)="showPicker()" [(ngModel)]="displayDuration" placeholder="Duração"></ion-input>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</ion-content>
|
||||
|
||||
@@ -0,0 +1,149 @@
|
||||
ion-content{
|
||||
--background:transparent;
|
||||
}
|
||||
.header-toolbar{
|
||||
--background:transparent;
|
||||
--opacity: 1;
|
||||
}
|
||||
.div-top-header{
|
||||
//width: 400px;
|
||||
margin: 0 auto;
|
||||
background-color: #0782c9;
|
||||
overflow: auto;
|
||||
padding-top: 15px;
|
||||
border: 0!important;
|
||||
|
||||
.div-search{
|
||||
font-size: 45px;
|
||||
float: left;
|
||||
margin: 0 0 0 10px
|
||||
}
|
||||
.div-logo{
|
||||
background: transparent;
|
||||
width: 140px;
|
||||
margin: 5px 0 0px 71px;
|
||||
float: left;
|
||||
}
|
||||
.div-logo img{
|
||||
width: 100%;
|
||||
}
|
||||
.div-profile{
|
||||
font-size: 45px;
|
||||
float: right;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
}
|
||||
.main-header{
|
||||
width: 100%; /* 400px */
|
||||
height: 100%;
|
||||
font-family: Roboto;
|
||||
border-top-left-radius: 25px;
|
||||
border-top-right-radius: 25px;
|
||||
background-color: #fff;
|
||||
overflow:hidden;
|
||||
padding: 30px 20px 0px 20px;
|
||||
color:#000;
|
||||
transform: translate3d(0, 1px, 0);
|
||||
|
||||
.title-content{
|
||||
//width: 360px;
|
||||
margin: 0px auto;
|
||||
overflow: auto;
|
||||
padding: 0 !important;
|
||||
background: #fff;
|
||||
|
||||
.left{
|
||||
width: 37px;
|
||||
float: left;
|
||||
font-size: 35px;
|
||||
overflow: auto;
|
||||
}
|
||||
.middle{
|
||||
padding: 0!important;
|
||||
float: left;
|
||||
width: 221px;
|
||||
margin: 2.5px 0 0 5px;
|
||||
}
|
||||
.right{
|
||||
padding: 0!important;
|
||||
float: right;
|
||||
font-size: 15px;
|
||||
color: #0782c9;
|
||||
margin: 8px 0 0 5px;
|
||||
}
|
||||
}
|
||||
|
||||
.title{
|
||||
font-size: 25px;
|
||||
}
|
||||
.div-icon{
|
||||
width: 40px;
|
||||
float: right;
|
||||
font-size: 35px;
|
||||
overflow: auto;
|
||||
padding: 1px;
|
||||
}
|
||||
.div-icon ion-icon{
|
||||
float: right;
|
||||
padding-left: 20px;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
.main-content{
|
||||
font-family: Roboto;
|
||||
margin: 0 auto;
|
||||
background-color: #fff;
|
||||
overflow:auto;
|
||||
padding: 15px 20px 0 20px;
|
||||
|
||||
.item-container{
|
||||
//width: 360px;
|
||||
margin: 15px auto;
|
||||
border: 1px solid #ebebeb;
|
||||
border-radius: 5px;
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
.item-container-no-border{
|
||||
display: flex;
|
||||
//width: 360px;
|
||||
margin: 25px auto;
|
||||
border-radius: 5px;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.item-container-no-border ion-label{
|
||||
padding-left: 10px;
|
||||
font-size: 12px;
|
||||
color: #000;
|
||||
}
|
||||
}
|
||||
|
||||
.container-div{
|
||||
margin-bottom: 15px;
|
||||
overflow: auto;
|
||||
|
||||
.ion-item-class-2{
|
||||
//width: 360px;
|
||||
margin: 0px auto;
|
||||
|
||||
.ion-icon-class{
|
||||
width: 45px;
|
||||
height: 45px;
|
||||
float: left;
|
||||
padding: 10px;
|
||||
font-size: 25px;
|
||||
}
|
||||
}
|
||||
.ion-input-class{
|
||||
width: calc(100% - 45px);
|
||||
height: 45px;
|
||||
border: 1px solid #ebebeb;
|
||||
border-radius: 5px;
|
||||
padding-left: 5px;
|
||||
padding-right: 10px;
|
||||
float: left;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
|
||||
import { IonicModule } from '@ionic/angular';
|
||||
|
||||
import { EditGroupPage } from './edit-group.page';
|
||||
|
||||
describe('EditGroupPage', () => {
|
||||
let component: EditGroupPage;
|
||||
let fixture: ComponentFixture<EditGroupPage>;
|
||||
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ EditGroupPage ],
|
||||
imports: [IonicModule.forRoot()]
|
||||
}).compileComponents();
|
||||
|
||||
fixture = TestBed.createComponent(EditGroupPage);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
}));
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,182 @@
|
||||
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
|
||||
import { ModalController, PickerController } from '@ionic/angular';
|
||||
import { ChatService } from 'src/app/services/chat.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-edit-group',
|
||||
templateUrl: './edit-group.page.html',
|
||||
styleUrls: ['./edit-group.page.scss'],
|
||||
})
|
||||
export class EditGroupPage implements OnInit {
|
||||
showLoader: boolean;
|
||||
displayDuration: any;
|
||||
showDuration: boolean;
|
||||
selectedDuration = ['','',''];
|
||||
groupName:string;
|
||||
room:any;
|
||||
@Input() roomId:string;
|
||||
@Output() openGroupContacts:EventEmitter<any> = new EventEmitter<any>();
|
||||
@Output() openGroupMessage:EventEmitter<any> = new EventEmitter<any>();
|
||||
@Output() closeAllDesktopComponents:EventEmitter<any> = new EventEmitter<any>();
|
||||
|
||||
constructor(
|
||||
private modalController: ModalController,
|
||||
private pickerController: PickerController,
|
||||
private chatService: ChatService,
|
||||
) {
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.getRoomInfo();
|
||||
}
|
||||
|
||||
getRoomInfo(){
|
||||
this.chatService.getRoomInfo(this.roomId).subscribe(room=>{
|
||||
this.room = room['room'];
|
||||
console.log(this.room);
|
||||
this.groupName = this.room.name.split('-').join(' ');
|
||||
});
|
||||
}
|
||||
|
||||
close(){
|
||||
//this.modalController.dismiss();
|
||||
this.closeAllDesktopComponents.emit();
|
||||
this.openGroupMessage.emit(this.roomId);
|
||||
}
|
||||
|
||||
changeGroupName(){
|
||||
if(this.groupName.trim().length > 1){
|
||||
let name = this.groupName.split(' ').join('-');
|
||||
let body = {
|
||||
"roomId": this.room._id,
|
||||
"name": name,
|
||||
}
|
||||
this.chatService.renameGroup(body).subscribe(res=>{
|
||||
this.modalController.dismiss(res['group']);
|
||||
});
|
||||
}
|
||||
else{
|
||||
console.log("Invalid name!");
|
||||
}
|
||||
this.close();
|
||||
}
|
||||
|
||||
_ionChange(event){
|
||||
this.showDuration = event.detail.checked;
|
||||
}
|
||||
async showPicker(){
|
||||
const picker = await this.pickerController.create({
|
||||
cssClass: '',
|
||||
buttons: [
|
||||
{
|
||||
text: 'Cancelar', role: 'cancel', cssClass: 'btn-cancel'
|
||||
},
|
||||
{
|
||||
text: 'Ok',
|
||||
cssClass: 'btn-cancel',
|
||||
handler:(value:any)=>{
|
||||
console.log('button done pressed');
|
||||
this.selectedDuration = [
|
||||
value.days.value,
|
||||
value.hours.value,
|
||||
value.minutes.value,
|
||||
]
|
||||
console.log(this.selectedDuration);
|
||||
if(value.days.value != null && value.hours.value != null && value.minutes.value != null){
|
||||
if(value.days.value > 0){
|
||||
if(value.days.value == 1){
|
||||
if(value.hours.value == 1){
|
||||
this.displayDuration = value.days.value + " day " +
|
||||
value.hours.value + " hora " +
|
||||
value.minutes.value + " minutos";
|
||||
}
|
||||
else{
|
||||
this.displayDuration = value.days.value + " days " +
|
||||
value.hours.value + " horas " +
|
||||
value.minutes.value + " minutos";
|
||||
}
|
||||
}
|
||||
else{
|
||||
if(value.hours.value == 1){
|
||||
this.displayDuration = value.days.value + " days " +
|
||||
value.hours.value + " hora " +
|
||||
value.minutes.value + " minutos";
|
||||
}
|
||||
else{
|
||||
this.displayDuration = value.days.value + " days " +
|
||||
value.hours.value + " horas " +
|
||||
value.minutes.value + " minutos";
|
||||
}
|
||||
}
|
||||
}
|
||||
else{
|
||||
if(value.hours.value == 1){
|
||||
this.displayDuration = value.hours.value + " hora " +
|
||||
value.minutes.value + " minutos";
|
||||
}
|
||||
else{
|
||||
this.displayDuration = value.hours.value + " horas " +
|
||||
value.minutes.value + " minutos";
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
],
|
||||
columns: [
|
||||
{
|
||||
name: 'days',
|
||||
prefix: 'Dias',
|
||||
options: [
|
||||
{ text: '0', value: 0 },
|
||||
{ text: '1', value: 1 },
|
||||
{ text: '2', value: 2 },
|
||||
{ text: '3', value: 3 },
|
||||
{ text: '4', value: 4 },
|
||||
]
|
||||
},
|
||||
{
|
||||
name: 'hours',
|
||||
prefix: 'Horas',
|
||||
options: [
|
||||
{ text: '0', value: 0 },
|
||||
{ text: '1', value: 1 },
|
||||
{ text: '2', value: 2 },
|
||||
{ text: '3', value: 3 },
|
||||
{ text: '4', value: 4 },
|
||||
{ text: '5', value: 5 },
|
||||
{ text: '6', value: 6 },
|
||||
{ text: '7', value: 7 },
|
||||
{ text: '8', value: 8 },
|
||||
]
|
||||
},
|
||||
{
|
||||
name: 'minutes',
|
||||
prefix: 'Minutos',
|
||||
selectedIndex: 3,
|
||||
options: [
|
||||
{ text: '0', value: 0 },
|
||||
{ text: '5', value: 5 },
|
||||
{ text: '10', value: 10 },
|
||||
{ text: '15', value: 15 },
|
||||
{ text: '20', value: 20 },
|
||||
{ text: '25', value: 25 },
|
||||
{ text: '30', value: 30 },
|
||||
{ text: '35', value: 35 },
|
||||
{ text: '45', value: 45 },
|
||||
{ text: '50', value: 50 },
|
||||
{ text: '55', value: 55 },
|
||||
]
|
||||
}
|
||||
]
|
||||
});
|
||||
await picker.present();
|
||||
picker.onDidDismiss().then(async data =>{
|
||||
let day = await picker.getColumn('days');
|
||||
let hour = await picker.getColumn('hours');
|
||||
let minutes = await picker.getColumn('minutes');
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -3,7 +3,9 @@
|
||||
<div class="main-header width-100">
|
||||
<div class="title-content width-100">
|
||||
<div class="back-icon">
|
||||
<ion-icon (click)="openGroupMessagesPage()" slot="end" src='assets/images/icons-arrow-arrow-left.svg'></ion-icon>
|
||||
<button class="btn-no-color" (click)="openGroupMessagesPage()">
|
||||
<ion-icon slot="end" src='assets/images/icons-arrow-arrow-left.svg'></ion-icon>
|
||||
</button>
|
||||
</div>
|
||||
<div class="div-title">
|
||||
<ion-label class="title">Contactos</ion-label>
|
||||
@@ -31,9 +33,12 @@
|
||||
<ion-label class="members-label">Contactos selecção:</ion-label>
|
||||
<ion-list class="members-list" *ngFor="let user of members">
|
||||
<div class="members-checkbox">
|
||||
<ion-checkbox checked color="primary"></ion-checkbox>
|
||||
<ion-checkbox disabled checked color="primary"></ion-checkbox>
|
||||
<p>{{user.name}}</p>
|
||||
<ion-icon class="{{user.status}}" name="ellipse"></ion-icon>
|
||||
<button (click)="deleteMember(user)" class="btn-no-color detele-item-icon">
|
||||
<ion-icon color="danger" name="close"></ion-icon>
|
||||
</button>
|
||||
</div>
|
||||
</ion-list>
|
||||
</div>
|
||||
|
||||
@@ -102,6 +102,22 @@
|
||||
overflow: auto;
|
||||
align-items: center;
|
||||
|
||||
.detele-item-icon{
|
||||
display: none;
|
||||
width: 30px;
|
||||
margin-left: 15px;
|
||||
}
|
||||
|
||||
.detele-item-icon ion-icon{
|
||||
font-size: 20px !important;
|
||||
}
|
||||
}
|
||||
|
||||
.members-checkbox:hover{
|
||||
.detele-item-icon{
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
}
|
||||
|
||||
.item-divider{
|
||||
|
||||
@@ -70,6 +70,49 @@ export class GroupContactsPage implements OnInit {
|
||||
this.getGroupContacts(room['room']);
|
||||
});
|
||||
}
|
||||
deleteMember(data:any){
|
||||
console.log(data);
|
||||
|
||||
let body = {
|
||||
"roomId": this.roomId,
|
||||
"userId": data._id,
|
||||
}
|
||||
console.log(body);
|
||||
this.chatService.getRoomInfo(this.roomId).subscribe(room=>{
|
||||
if(room['room'].t == "p"){
|
||||
this.chatService.removeGroupMember(body).subscribe(res=>{
|
||||
console.log(res);
|
||||
this.getMembers();
|
||||
this.getChatInfo();
|
||||
});
|
||||
}
|
||||
else if(room['room'].t == "c"){
|
||||
this.chatService.removeChannelMember(body).subscribe(res=>{
|
||||
console.log(res);
|
||||
this.getMembers();
|
||||
this.getChatInfo();
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
getMembers(){
|
||||
this.chatService.getRoomInfo(this.roomId).subscribe(res=>{
|
||||
console.log(res);
|
||||
let room = res['room'];
|
||||
|
||||
if(room.t == "p"){
|
||||
this.chatService.getGroupMembers(this.roomId).subscribe(res=>{
|
||||
this.members = res['members'];
|
||||
});
|
||||
}
|
||||
else if(room.t == "c"){
|
||||
this.chatService.getChannelMembers(this.roomId).subscribe(res=>{
|
||||
this.members = res['members'];
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
getGroupContacts(room:any){
|
||||
this.showLoader = true;
|
||||
@@ -178,8 +221,8 @@ export class GroupContactsPage implements OnInit {
|
||||
return null;
|
||||
}
|
||||
|
||||
doRefresh(event){
|
||||
|
||||
doRefresh(ev){
|
||||
ev.target.complete();
|
||||
}
|
||||
|
||||
async close(){
|
||||
@@ -200,10 +243,9 @@ export class GroupContactsPage implements OnInit {
|
||||
backdropDismiss: false,
|
||||
});
|
||||
await modal.present();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
onChange(event){
|
||||
this.textSearch = event.detail.value;
|
||||
}
|
||||
|
||||
@@ -52,6 +52,9 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="leaveStatus" class="info-text-leave">
|
||||
<ion-label>{{leaveStatus}}</ion-label>
|
||||
</div>
|
||||
|
||||
</ion-content>
|
||||
|
||||
|
||||
@@ -97,6 +97,24 @@
|
||||
/* margin: 15px 0px 15px 0px; */
|
||||
border-radius: 8px;
|
||||
}
|
||||
.info-text-leave{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: fit-content;
|
||||
padding: 10px;
|
||||
background: #e0e9ee;
|
||||
border-radius: 8px;
|
||||
margin: 10px auto;
|
||||
color: #797979 !important;
|
||||
font-size: 13px !important;
|
||||
/* margin: 15px 0px 15px 0px; */
|
||||
|
||||
.info-text-leave ion-label{
|
||||
font-size: 13px !important;
|
||||
line-height: 1.2rem;
|
||||
}
|
||||
}
|
||||
.messages{
|
||||
font-size: 13px;
|
||||
font-family: Roboto;
|
||||
|
||||
@@ -19,6 +19,7 @@ export class GroupMessagesPage implements OnInit, OnChanges {
|
||||
isGroupCreated:boolean;
|
||||
loggedUser: any;
|
||||
message:any;
|
||||
leaveStatus:any;
|
||||
messages:any;
|
||||
|
||||
|
||||
@@ -30,7 +31,7 @@ export class GroupMessagesPage implements OnInit, OnChanges {
|
||||
@Output() closeAllDesktopComponents:EventEmitter<any> = new EventEmitter<any>();
|
||||
@Output() showEmptyContainer:EventEmitter<any> = new EventEmitter<any>();
|
||||
@Output() openGroupContacts:EventEmitter<any> = new EventEmitter<any>();
|
||||
@Output() openEditGroup:EventEmitter<any> = new EventEmitter<any>();
|
||||
@Output() openEditGroupPage:EventEmitter<any> = new EventEmitter<any>();
|
||||
|
||||
constructor(
|
||||
private menu: MenuController,
|
||||
@@ -199,8 +200,7 @@ export class GroupMessagesPage implements OnInit, OnChanges {
|
||||
modal.onDidDismiss().then(res=>{
|
||||
console.log(res);
|
||||
if(res.data == 'leave'){
|
||||
console.log('LEAVE');
|
||||
|
||||
this.leaveStatus = this.loggedUser.me.name + ' saiu do grupo';
|
||||
}
|
||||
else if(res.data == 'delete'){
|
||||
this.closeAllDesktopComponents.emit();
|
||||
@@ -210,7 +210,9 @@ export class GroupMessagesPage implements OnInit, OnChanges {
|
||||
console.log('CANCEL');
|
||||
}
|
||||
else if(res.data == 'edit'){
|
||||
console.log('CANCEL');
|
||||
console.log(this.roomId);
|
||||
//this.closeAllDesktopComponents.emit();
|
||||
this.openEditGroupPage.emit(this.roomId);
|
||||
}
|
||||
else{
|
||||
this.roomName = res.data.name.split('-').join(' ');
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { Routes, RouterModule } from '@angular/router';
|
||||
|
||||
import { DespachosPage } from './despachos.page';
|
||||
|
||||
const routes: Routes = [
|
||||
{
|
||||
path: '',
|
||||
component: DespachosPage
|
||||
}
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
imports: [RouterModule.forChild(routes)],
|
||||
exports: [RouterModule],
|
||||
})
|
||||
export class DespachosPageRoutingModule {}
|
||||
@@ -0,0 +1,20 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
|
||||
import { IonicModule } from '@ionic/angular';
|
||||
|
||||
import { DespachosPageRoutingModule } from './despachos-routing.module';
|
||||
|
||||
import { DespachosPage } from './despachos.page';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule,
|
||||
FormsModule,
|
||||
IonicModule,
|
||||
DespachosPageRoutingModule
|
||||
],
|
||||
declarations: [DespachosPage]
|
||||
})
|
||||
export class DespachosPageModule {}
|
||||
@@ -0,0 +1,85 @@
|
||||
<ion-header class="ion-no-border">
|
||||
<div class="title">
|
||||
<div class="thetitle"><ion-label >Despacho</ion-label></div>
|
||||
<div class="theicon">
|
||||
<button class="btn-no-color" (click)="doRefresh($event)">
|
||||
<ion-icon slot="end" class="title-icon" name="reload-circle"></ion-icon>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<ion-toolbar>
|
||||
<ion-segment [(ngModel)]="segment" (ionChange)="segmentChanged($event)">
|
||||
<ion-segment-button value="despachos">
|
||||
Lista de despachos
|
||||
</ion-segment-button>
|
||||
</ion-segment>
|
||||
</ion-toolbar>
|
||||
</ion-header>
|
||||
<ion-content>
|
||||
<ion-refresher name="refresher" slot="fixed" (ionRefresh)="doRefresh($event)">
|
||||
<ion-refresher-content
|
||||
pullingIcon="chevron-down-circle-outline"
|
||||
pullingText="deslize para actualizar"
|
||||
refreshingSpinner="circles"
|
||||
refreshingText="A actualizar...">
|
||||
</ion-refresher-content>
|
||||
</ion-refresher>
|
||||
|
||||
<div class="width-100" [ngSwitch]="segment">
|
||||
<div *ngIf="despachoList">
|
||||
<ion-list *ngSwitchCase="'despachos'">
|
||||
<ion-item
|
||||
class="expediente ion-no-padding"
|
||||
*ngFor = "let task of despachoList"
|
||||
>
|
||||
<!-- (click)="viewExpedientDetail(task.SerialNumber)" -->
|
||||
<!-- [routerLink]="['/home/gabinete-digital/expediente',task.SerialNumber]" -->
|
||||
<div class="item width-100">
|
||||
<div class="exp-top-detail">
|
||||
<div class="exp-date">
|
||||
<ion-label>{{ task.CreateDate | date: 'dd-MM-yy' }}</ion-label>
|
||||
</div>
|
||||
<div class="exp-remetente">
|
||||
<ion-label>{{task.Remetente}}</ion-label>
|
||||
</div>
|
||||
<div class="exp-icon">
|
||||
<ion-icon src="assets/images/icons-expediente-attachment.svg"></ion-icon>
|
||||
<label></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="exp-bottom-detail">
|
||||
<ion-label>{{ task.Folio }}</ion-label>
|
||||
</div>
|
||||
</div>
|
||||
</ion-item>
|
||||
</ion-list>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="!despachoList">
|
||||
|
||||
<ion-list>
|
||||
<ion-item>
|
||||
<ion-thumbnail slot="end">
|
||||
<ion-skeleton-text animated></ion-skeleton-text>
|
||||
</ion-thumbnail>
|
||||
<ion-label>
|
||||
<h3><ion-skeleton-text animated style="width: 50%"></ion-skeleton-text></h3>
|
||||
<p><ion-skeleton-text animated style="width: 80%"></ion-skeleton-text></p>
|
||||
<p><ion-skeleton-text animated style="width: 60%"></ion-skeleton-text></p>
|
||||
</ion-label>
|
||||
</ion-item>
|
||||
<ion-item>
|
||||
<ion-thumbnail slot="end">
|
||||
<ion-skeleton-text animated></ion-skeleton-text>
|
||||
</ion-thumbnail>
|
||||
<ion-label>
|
||||
<h3><ion-skeleton-text animated style="width: 50%"></ion-skeleton-text></h3>
|
||||
<p><ion-skeleton-text animated style="width: 80%"></ion-skeleton-text></p>
|
||||
<p><ion-skeleton-text animated style="width: 60%"></ion-skeleton-text></p>
|
||||
</ion-label>
|
||||
</ion-item>
|
||||
</ion-list>
|
||||
</div>
|
||||
</ion-content>
|
||||
|
||||
@@ -0,0 +1,177 @@
|
||||
@import '~src/function.scss';
|
||||
/* CONTENT */
|
||||
:host{
|
||||
padding: 30px 20px 0 20px !important;
|
||||
margin: 0;
|
||||
}
|
||||
.title{
|
||||
font-family: Roboto;
|
||||
font-size: 25px;
|
||||
color:#000;
|
||||
overflow: auto;
|
||||
|
||||
.thetitle{
|
||||
width: fit-content;
|
||||
float: left;
|
||||
}
|
||||
.theicon{
|
||||
width: fit-content;
|
||||
float: right;
|
||||
}
|
||||
}
|
||||
.item-list-small{
|
||||
font-size: 11px;
|
||||
overflow: hidden;
|
||||
}
|
||||
.ion-item-class{
|
||||
padding: 0;
|
||||
|
||||
}
|
||||
.label-text{
|
||||
width: 100%;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
//DIV
|
||||
ion-item{
|
||||
--background: none;
|
||||
}
|
||||
.item {
|
||||
//border-radius: 15px;
|
||||
//box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.07);
|
||||
//Sborder: solid 1px #e9e9e9;
|
||||
background-color: var(--white);
|
||||
margin: 0 auto;
|
||||
//padding: 10px;
|
||||
margin-bottom: 10px;
|
||||
overflow: hidden;
|
||||
}
|
||||
.div-content-expediente{
|
||||
width: 100%;
|
||||
float: left;
|
||||
border-left: 3px solid #dae3f3;
|
||||
padding:5px 5px 15px 5px;
|
||||
margin: 10px 0 10px 0;
|
||||
background: #dae3f3;
|
||||
border-radius: 20px;
|
||||
}
|
||||
.div-content-pendentes{
|
||||
width: 100%;
|
||||
float: left;
|
||||
border-left: 3px solid #d9d9d9;
|
||||
padding: 5px;
|
||||
}
|
||||
.div-content-expediente h3, .div-content-pendentes h3{
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font-size: 14pt;
|
||||
width: 100%;
|
||||
}
|
||||
.div-icon{
|
||||
width: 10%;
|
||||
font-size: 20px;
|
||||
float: left;
|
||||
color: #808080;
|
||||
}
|
||||
.div-icon ion-icon{
|
||||
display: block;
|
||||
margin: 0 auto;
|
||||
|
||||
}
|
||||
.div-content-expediente p, .div-content-pendentes p{
|
||||
font-size: 14pt;
|
||||
color: rgb(94, 92, 92);
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
.span-left{
|
||||
/* border: 1px solid red; */
|
||||
float: left;
|
||||
font-size: 12px;
|
||||
padding-left: 18px;
|
||||
}
|
||||
.span-right{
|
||||
/* border: 1px solid blue; */
|
||||
text-align: right;
|
||||
float: right;
|
||||
font-size: 12px;
|
||||
padding-right: 18px;
|
||||
}
|
||||
|
||||
/* New CSS */
|
||||
.expediente{
|
||||
padding-top: 10px;
|
||||
}
|
||||
.exp-list-item{
|
||||
//width: 368px;
|
||||
overflow: auto;
|
||||
/* border-bottom: 1px solid gray; */
|
||||
margin: 10px auto;
|
||||
}
|
||||
.exp-top-detail{
|
||||
width: 100%;
|
||||
overflow: auto;
|
||||
}
|
||||
.exp-date{
|
||||
width: auto;
|
||||
font-family: Roboto;
|
||||
font-size: 13px;
|
||||
font-weight: normal;
|
||||
font-stretch: normal;
|
||||
font-style: normal;
|
||||
line-height: normal;
|
||||
letter-spacing: normal;
|
||||
color: #797979;
|
||||
float: left;
|
||||
}
|
||||
.exp-remetente{
|
||||
//width: 200px;
|
||||
font-family: Roboto;
|
||||
font-size: 13px;
|
||||
font-weight: normal;
|
||||
color: #000000;
|
||||
float: left;
|
||||
margin-left: 16px;
|
||||
|
||||
}
|
||||
.exp-icon{
|
||||
width: 45px;
|
||||
float: right;
|
||||
font-size: 13px;
|
||||
}
|
||||
.exp-icon ion-icon{
|
||||
font-size: 25px;
|
||||
color: #42b9fe;
|
||||
}
|
||||
.exp-bottom-detail{
|
||||
float: left;
|
||||
font-family: Roboto;
|
||||
font-size: 16px;
|
||||
font-weight: 700;
|
||||
color: #0d89d1;
|
||||
}
|
||||
.div-top-header{
|
||||
width: 400px;
|
||||
margin: 6px auto;
|
||||
background-color: #0782c9;
|
||||
overflow: auto;
|
||||
}
|
||||
.div-search{
|
||||
font-size: 45px;
|
||||
float: left;
|
||||
margin: 0 0 0 10px
|
||||
}
|
||||
.div-logo{
|
||||
background: transparent;
|
||||
width: 150px;
|
||||
margin: 2.5px 0 2.5px 71px;
|
||||
float: left;
|
||||
}
|
||||
.div-logo img{
|
||||
width: 100%;
|
||||
}
|
||||
.div-profile{
|
||||
font-size: 45px;
|
||||
float: right;
|
||||
margin-right: 10px;
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
|
||||
import { IonicModule } from '@ionic/angular';
|
||||
|
||||
import { DespachosPage } from './despachos.page';
|
||||
|
||||
describe('DespachosPage', () => {
|
||||
let component: DespachosPage;
|
||||
let fixture: ComponentFixture<DespachosPage>;
|
||||
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ DespachosPage ],
|
||||
imports: [IonicModule.forRoot()]
|
||||
}).compileComponents();
|
||||
|
||||
fixture = TestBed.createComponent(DespachosPage);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
}));
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,115 @@
|
||||
import { Component, EventEmitter, Input, OnInit, Output, ViewChild } from '@angular/core';
|
||||
import { Router } from '@angular/router';
|
||||
import { CalendarComponent } from 'ionic2-calendar';
|
||||
|
||||
import { DailyWorkTask } from '../../../models/dailyworktask.model';
|
||||
import { ProcessesService } from 'src/app/services/processes.service';
|
||||
import { formatDate } from '@angular/common';
|
||||
import { LoadingService } from 'src/app/services/loading.service';
|
||||
import { ModalController, NavParams } from '@ionic/angular';
|
||||
import { ExpedienteDetailPage } from 'src/app/pages/gabinete-digital/expediente/expediente-detail/expediente-detail.page';
|
||||
import { AlertService } from 'src/app/services/alert.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-despachos',
|
||||
templateUrl: './despachos.page.html',
|
||||
styleUrls: ['./despachos.page.scss'],
|
||||
})
|
||||
export class DespachosPage implements OnInit {
|
||||
//profile:string;
|
||||
|
||||
@ViewChild(CalendarComponent) myCal: CalendarComponent;
|
||||
|
||||
taskslist:DailyWorkTask[];
|
||||
despachoList:DailyWorkTask[];
|
||||
deferimentoList:DailyWorkTask[];
|
||||
taskType: string;
|
||||
serialNumber:string;
|
||||
|
||||
@Input() profile:string;
|
||||
segment:string;
|
||||
@Output() openExpedientDetail:EventEmitter<any> = new EventEmitter<any>();
|
||||
|
||||
constructor(
|
||||
private processes:ProcessesService,
|
||||
private modalController: ModalController,
|
||||
private alertService: AlertService,
|
||||
) {
|
||||
this.profile = 'mdgpr';
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
//Inicializar segment
|
||||
this.segment = "despachos";
|
||||
this.LoadList();
|
||||
}
|
||||
segmentChanged(ev: any) {
|
||||
this.LoadList();
|
||||
}
|
||||
|
||||
notImplemented(){
|
||||
this.alertService.presentAlert('Funcionalidade em desenvolvimento');
|
||||
}
|
||||
|
||||
openExpedientDetailPage(data){
|
||||
console.log(data);
|
||||
this.openExpedientDetail.emit(data);
|
||||
}
|
||||
|
||||
LoadList(){
|
||||
this.processes.GetTasksList("Despacho", false).subscribe(result => {
|
||||
console.log(result);
|
||||
|
||||
this.despachoList = new Array();
|
||||
let res = result.reverse();
|
||||
res.forEach(element => {
|
||||
let task: DailyWorkTask = {
|
||||
"SerialNumber": element.serialNumber,
|
||||
"Folio": element.workflowInstanceFolio,
|
||||
"Senders": element.originator.email,
|
||||
"CreateDate": formatDate(new Date(element.taskStartDate), 'yyyy-MM-dd HH:mm', 'pt'),
|
||||
"DocumentURL": element.workflowInstanceDataFields.ViewerRequest,
|
||||
"Remetente": element.workflowInstanceDataFields.Remetente
|
||||
}
|
||||
this.despachoList.push(task);
|
||||
});
|
||||
console.log(this.despachoList);
|
||||
});
|
||||
}
|
||||
|
||||
doRefresh(event) {
|
||||
this.LoadList();
|
||||
|
||||
setTimeout(() => {
|
||||
event.target.complete();
|
||||
}, 2000);
|
||||
}
|
||||
|
||||
async viewExpedientDetail(serialNumber:any) {
|
||||
console.log(this.profile);
|
||||
|
||||
let classs;
|
||||
if( window.innerWidth <= 800){
|
||||
classs = 'modal'
|
||||
} else {
|
||||
classs = 'modal modal-desktop'
|
||||
}
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
component: ExpedienteDetailPage,
|
||||
componentProps:{
|
||||
enterAnimation: "",
|
||||
serialNumber: serialNumber,
|
||||
profile: this.profile,
|
||||
},
|
||||
cssClass: classs,
|
||||
});
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then((res)=>{
|
||||
console.log('refresh list');
|
||||
this.LoadList();
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -52,6 +52,7 @@ export class ExpedientsPage implements OnInit {
|
||||
|
||||
LoadList(){
|
||||
this.processes.GetTasksList("Expediente", false).subscribe(result => {
|
||||
console.log(result);
|
||||
this.taskslist = new Array();
|
||||
let res = result.reverse();
|
||||
res.forEach(element => {
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { Routes, RouterModule } from '@angular/router';
|
||||
|
||||
import { PedidosPage } from './pedidos.page';
|
||||
|
||||
const routes: Routes = [
|
||||
{
|
||||
path: '',
|
||||
component: PedidosPage
|
||||
}
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
imports: [RouterModule.forChild(routes)],
|
||||
exports: [RouterModule],
|
||||
})
|
||||
export class PedidosPageRoutingModule {}
|
||||
@@ -0,0 +1,20 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
|
||||
import { IonicModule } from '@ionic/angular';
|
||||
|
||||
import { PedidosPageRoutingModule } from './pedidos-routing.module';
|
||||
|
||||
import { PedidosPage } from './pedidos.page';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule,
|
||||
FormsModule,
|
||||
IonicModule,
|
||||
PedidosPageRoutingModule
|
||||
],
|
||||
declarations: [PedidosPage]
|
||||
})
|
||||
export class PedidosPageModule {}
|
||||
@@ -0,0 +1,116 @@
|
||||
<ion-header class="ion-no-border">
|
||||
<div class="title">
|
||||
<div class="thetitle"><ion-label >Pedidos</ion-label></div>
|
||||
<div class="theicon">
|
||||
<button class="btn-no-color" (click)="doRefresh($event)">
|
||||
<ion-icon slot="end" class="title-icon" name="reload-circle"></ion-icon>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<ion-toolbar>
|
||||
<ion-segment [(ngModel)]="segment" (ionChange)="segmentChanged($event)">
|
||||
<ion-segment-button value="parecer">
|
||||
Pedidos de Parecer
|
||||
</ion-segment-button>
|
||||
<ion-segment-button value="deferimento">
|
||||
Pedidos de Defereimento
|
||||
</ion-segment-button>
|
||||
</ion-segment>
|
||||
</ion-toolbar>
|
||||
</ion-header>
|
||||
<ion-content>
|
||||
<ion-refresher name="refresher" slot="fixed" (ionRefresh)="doRefresh($event)">
|
||||
<ion-refresher-content
|
||||
pullingIcon="chevron-down-circle-outline"
|
||||
pullingText="deslize para actualizar"
|
||||
refreshingSpinner="circles"
|
||||
refreshingText="A actualizar...">
|
||||
</ion-refresher-content>
|
||||
</ion-refresher>
|
||||
|
||||
<div class="width-100" [ngSwitch]="segment">
|
||||
<div *ngIf="parecerList">
|
||||
<ion-list *ngSwitchCase="'parecer'">
|
||||
<ion-item
|
||||
class="expediente ion-no-padding"
|
||||
*ngFor = "let task of parecerList"
|
||||
>
|
||||
<!-- (click)="viewExpedientDetail(task.SerialNumber)" -->
|
||||
<!-- [routerLink]="['/home/gabinete-digital/expediente',task.SerialNumber]" -->
|
||||
<div class="item width-100">
|
||||
<div class="exp-top-detail">
|
||||
<div class="exp-date">
|
||||
<ion-label>{{ task.CreateDate | date: 'dd-MM-yy' }}</ion-label>
|
||||
</div>
|
||||
<div class="exp-remetente">
|
||||
<ion-label>{{task.Remetente}}</ion-label>
|
||||
</div>
|
||||
<div class="exp-icon">
|
||||
<ion-icon src="assets/images/icons-expediente-attachment.svg"></ion-icon>
|
||||
<label></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="exp-bottom-detail">
|
||||
<ion-label>{{ task.Folio }}</ion-label>
|
||||
</div>
|
||||
</div>
|
||||
</ion-item>
|
||||
</ion-list>
|
||||
|
||||
</div>
|
||||
<div *ngIf="deferimentoList">
|
||||
<ion-list *ngSwitchCase="'deferimento'">
|
||||
<ion-item
|
||||
class="expediente ion-no-padding"
|
||||
*ngFor = "let task of deferimentoList"
|
||||
>
|
||||
<!-- (click)="viewExpedientDetail(task.SerialNumber)" -->
|
||||
<!-- [routerLink]="['/home/gabinete-digital/expediente',task.SerialNumber]" -->
|
||||
<div class="item width-100">
|
||||
<div class="exp-top-detail">
|
||||
<div class="exp-date">
|
||||
<ion-label>{{ task.CreateDate | date: 'dd-MM-yy' }}</ion-label>
|
||||
</div>
|
||||
<div class="exp-remetente">
|
||||
<ion-label>{{task.Remetente}}</ion-label>
|
||||
</div>
|
||||
<div class="exp-icon">
|
||||
<ion-icon src="assets/images/icons-expediente-attachment.svg"></ion-icon>
|
||||
<label></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="exp-bottom-detail">
|
||||
<ion-label>{{ task.Folio }}</ion-label>
|
||||
</div>
|
||||
</div>
|
||||
</ion-item>
|
||||
</ion-list>
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="!parecerList && !deferimentoList">
|
||||
|
||||
<ion-list>
|
||||
<ion-item>
|
||||
<ion-thumbnail slot="end">
|
||||
<ion-skeleton-text animated></ion-skeleton-text>
|
||||
</ion-thumbnail>
|
||||
<ion-label>
|
||||
<h3><ion-skeleton-text animated style="width: 50%"></ion-skeleton-text></h3>
|
||||
<p><ion-skeleton-text animated style="width: 80%"></ion-skeleton-text></p>
|
||||
<p><ion-skeleton-text animated style="width: 60%"></ion-skeleton-text></p>
|
||||
</ion-label>
|
||||
</ion-item>
|
||||
<ion-item>
|
||||
<ion-thumbnail slot="end">
|
||||
<ion-skeleton-text animated></ion-skeleton-text>
|
||||
</ion-thumbnail>
|
||||
<ion-label>
|
||||
<h3><ion-skeleton-text animated style="width: 50%"></ion-skeleton-text></h3>
|
||||
<p><ion-skeleton-text animated style="width: 80%"></ion-skeleton-text></p>
|
||||
<p><ion-skeleton-text animated style="width: 60%"></ion-skeleton-text></p>
|
||||
</ion-label>
|
||||
</ion-item>
|
||||
</ion-list>
|
||||
</div>
|
||||
</ion-content>
|
||||
|
||||
@@ -0,0 +1,177 @@
|
||||
@import '~src/function.scss';
|
||||
/* CONTENT */
|
||||
:host{
|
||||
padding: 30px 20px 0 20px !important;
|
||||
margin: 0;
|
||||
}
|
||||
.title{
|
||||
font-family: Roboto;
|
||||
font-size: 25px;
|
||||
color:#000;
|
||||
overflow: auto;
|
||||
|
||||
.thetitle{
|
||||
width: fit-content;
|
||||
float: left;
|
||||
}
|
||||
.theicon{
|
||||
width: fit-content;
|
||||
float: right;
|
||||
}
|
||||
}
|
||||
.item-list-small{
|
||||
font-size: 11px;
|
||||
overflow: hidden;
|
||||
}
|
||||
.ion-item-class{
|
||||
padding: 0;
|
||||
|
||||
}
|
||||
.label-text{
|
||||
width: 100%;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
//DIV
|
||||
ion-item{
|
||||
--background: none;
|
||||
}
|
||||
.item {
|
||||
//border-radius: 15px;
|
||||
//box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.07);
|
||||
//Sborder: solid 1px #e9e9e9;
|
||||
background-color: var(--white);
|
||||
margin: 0 auto;
|
||||
//padding: 10px;
|
||||
margin-bottom: 10px;
|
||||
overflow: hidden;
|
||||
}
|
||||
.div-content-expediente{
|
||||
width: 100%;
|
||||
float: left;
|
||||
border-left: 3px solid #dae3f3;
|
||||
padding:5px 5px 15px 5px;
|
||||
margin: 10px 0 10px 0;
|
||||
background: #dae3f3;
|
||||
border-radius: 20px;
|
||||
}
|
||||
.div-content-pendentes{
|
||||
width: 100%;
|
||||
float: left;
|
||||
border-left: 3px solid #d9d9d9;
|
||||
padding: 5px;
|
||||
}
|
||||
.div-content-expediente h3, .div-content-pendentes h3{
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font-size: 14pt;
|
||||
width: 100%;
|
||||
}
|
||||
.div-icon{
|
||||
width: 10%;
|
||||
font-size: 20px;
|
||||
float: left;
|
||||
color: #808080;
|
||||
}
|
||||
.div-icon ion-icon{
|
||||
display: block;
|
||||
margin: 0 auto;
|
||||
|
||||
}
|
||||
.div-content-expediente p, .div-content-pendentes p{
|
||||
font-size: 14pt;
|
||||
color: rgb(94, 92, 92);
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
.span-left{
|
||||
/* border: 1px solid red; */
|
||||
float: left;
|
||||
font-size: 12px;
|
||||
padding-left: 18px;
|
||||
}
|
||||
.span-right{
|
||||
/* border: 1px solid blue; */
|
||||
text-align: right;
|
||||
float: right;
|
||||
font-size: 12px;
|
||||
padding-right: 18px;
|
||||
}
|
||||
|
||||
/* New CSS */
|
||||
.expediente{
|
||||
padding-top: 10px;
|
||||
}
|
||||
.exp-list-item{
|
||||
//width: 368px;
|
||||
overflow: auto;
|
||||
/* border-bottom: 1px solid gray; */
|
||||
margin: 10px auto;
|
||||
}
|
||||
.exp-top-detail{
|
||||
width: 100%;
|
||||
overflow: auto;
|
||||
}
|
||||
.exp-date{
|
||||
width: auto;
|
||||
font-family: Roboto;
|
||||
font-size: 13px;
|
||||
font-weight: normal;
|
||||
font-stretch: normal;
|
||||
font-style: normal;
|
||||
line-height: normal;
|
||||
letter-spacing: normal;
|
||||
color: #797979;
|
||||
float: left;
|
||||
}
|
||||
.exp-remetente{
|
||||
//width: 200px;
|
||||
font-family: Roboto;
|
||||
font-size: 13px;
|
||||
font-weight: normal;
|
||||
color: #000000;
|
||||
float: left;
|
||||
margin-left: 16px;
|
||||
|
||||
}
|
||||
.exp-icon{
|
||||
width: 45px;
|
||||
float: right;
|
||||
font-size: 13px;
|
||||
}
|
||||
.exp-icon ion-icon{
|
||||
font-size: 25px;
|
||||
color: #42b9fe;
|
||||
}
|
||||
.exp-bottom-detail{
|
||||
float: left;
|
||||
font-family: Roboto;
|
||||
font-size: 16px;
|
||||
font-weight: 700;
|
||||
color: #0d89d1;
|
||||
}
|
||||
.div-top-header{
|
||||
width: 400px;
|
||||
margin: 6px auto;
|
||||
background-color: #0782c9;
|
||||
overflow: auto;
|
||||
}
|
||||
.div-search{
|
||||
font-size: 45px;
|
||||
float: left;
|
||||
margin: 0 0 0 10px
|
||||
}
|
||||
.div-logo{
|
||||
background: transparent;
|
||||
width: 150px;
|
||||
margin: 2.5px 0 2.5px 71px;
|
||||
float: left;
|
||||
}
|
||||
.div-logo img{
|
||||
width: 100%;
|
||||
}
|
||||
.div-profile{
|
||||
font-size: 45px;
|
||||
float: right;
|
||||
margin-right: 10px;
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
|
||||
import { IonicModule } from '@ionic/angular';
|
||||
|
||||
import { PedidosPage } from './pedidos.page';
|
||||
|
||||
describe('PedidosPage', () => {
|
||||
let component: PedidosPage;
|
||||
let fixture: ComponentFixture<PedidosPage>;
|
||||
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ PedidosPage ],
|
||||
imports: [IonicModule.forRoot()]
|
||||
}).compileComponents();
|
||||
|
||||
fixture = TestBed.createComponent(PedidosPage);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
}));
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,144 @@
|
||||
import { Component, EventEmitter, Input, OnInit, Output, ViewChild } from '@angular/core';
|
||||
import { Router } from '@angular/router';
|
||||
import { CalendarComponent } from 'ionic2-calendar';
|
||||
|
||||
import { DailyWorkTask } from '../../../models/dailyworktask.model';
|
||||
import { ProcessesService } from 'src/app/services/processes.service';
|
||||
import { formatDate } from '@angular/common';
|
||||
import { LoadingService } from 'src/app/services/loading.service';
|
||||
import { ModalController, NavParams } from '@ionic/angular';
|
||||
import { ExpedienteDetailPage } from 'src/app/pages/gabinete-digital/expediente/expediente-detail/expediente-detail.page';
|
||||
import { AlertService } from 'src/app/services/alert.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-pedidos',
|
||||
templateUrl: './pedidos.page.html',
|
||||
styleUrls: ['./pedidos.page.scss'],
|
||||
})
|
||||
export class PedidosPage implements OnInit {
|
||||
|
||||
//profile:string;
|
||||
|
||||
@ViewChild(CalendarComponent) myCal: CalendarComponent;
|
||||
|
||||
taskslist:DailyWorkTask[];
|
||||
parecerList:DailyWorkTask[];
|
||||
deferimentoList:DailyWorkTask[];
|
||||
taskType: string;
|
||||
serialNumber:string;
|
||||
|
||||
@Input() profile:string;
|
||||
@Input() segment:string;
|
||||
@Output() openExpedientDetail:EventEmitter<any> = new EventEmitter<any>();
|
||||
|
||||
constructor(
|
||||
private processes:ProcessesService,
|
||||
private modalController: ModalController,
|
||||
private alertService: AlertService,
|
||||
) {
|
||||
this.profile = 'mdgpr';
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
//Inicializar segment
|
||||
this.LoadList();
|
||||
}
|
||||
segmentChanged(ev: any) {
|
||||
this.LoadList();
|
||||
}
|
||||
|
||||
notImplemented(){
|
||||
this.alertService.presentAlert('Funcionalidade em desenvolvimento');
|
||||
}
|
||||
|
||||
openExpedientDetailPage(data){
|
||||
console.log(data);
|
||||
this.openExpedientDetail.emit(data);
|
||||
}
|
||||
|
||||
LoadList(){
|
||||
if(this.segment == 'parecer'){
|
||||
this.taskType = "Pedido de Parecer";
|
||||
this.processes.GetTasksList("Pedido de Parecer", false).subscribe(result => {
|
||||
console.log(result);
|
||||
|
||||
this.parecerList = new Array();
|
||||
let res = result.reverse();
|
||||
res.forEach(element => {
|
||||
let task: DailyWorkTask = {
|
||||
"SerialNumber": element.serialNumber,
|
||||
"Folio": element.workflowInstanceFolio,
|
||||
"Senders": element.originator.email,
|
||||
"CreateDate": formatDate(new Date(element.taskStartDate), 'yyyy-MM-dd HH:mm', 'pt'),
|
||||
"DocumentURL": element.workflowInstanceDataFields.ViewerRequest,
|
||||
"Remetente": element.workflowInstanceDataFields.Remetente
|
||||
}
|
||||
this.parecerList.push(task);
|
||||
});
|
||||
console.log(this.parecerList);
|
||||
|
||||
});
|
||||
}
|
||||
else if(this.segment == 'deferimento'){
|
||||
this.taskType = "Pedido de Deferimento";
|
||||
this.processes.GetTasksList("Pedido de Deferimento", false).subscribe(result => {
|
||||
console.log(result);
|
||||
|
||||
this.deferimentoList = new Array();
|
||||
let res = result.reverse();
|
||||
res.forEach(element => {
|
||||
let task: DailyWorkTask = {
|
||||
"SerialNumber": element.serialNumber,
|
||||
"Folio": element.workflowInstanceFolio,
|
||||
"Senders": element.originator.email,
|
||||
"CreateDate": formatDate(new Date(element.taskStartDate), 'yyyy-MM-dd HH:mm', 'pt'),
|
||||
"DocumentURL": element.workflowInstanceDataFields.ViewerRequest,
|
||||
"Remetente": element.workflowInstanceDataFields.Remetente
|
||||
}
|
||||
this.deferimentoList.push(task);
|
||||
});
|
||||
console.log(this.deferimentoList);
|
||||
|
||||
});
|
||||
}
|
||||
console.log(this.taskType);
|
||||
|
||||
|
||||
}
|
||||
|
||||
doRefresh(event) {
|
||||
this.LoadList();
|
||||
|
||||
setTimeout(() => {
|
||||
event.target.complete();
|
||||
}, 2000);
|
||||
}
|
||||
|
||||
async viewExpedientDetail(serialNumber:any) {
|
||||
console.log(this.profile);
|
||||
|
||||
let classs;
|
||||
if( window.innerWidth <= 800){
|
||||
classs = 'modal'
|
||||
} else {
|
||||
classs = 'modal modal-desktop'
|
||||
}
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
component: ExpedienteDetailPage,
|
||||
componentProps:{
|
||||
enterAnimation: "",
|
||||
serialNumber: serialNumber,
|
||||
profile: this.profile,
|
||||
},
|
||||
cssClass: classs,
|
||||
});
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then((res)=>{
|
||||
console.log('refresh list');
|
||||
this.LoadList();
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -46,12 +46,12 @@ export class ChatPopoverPage implements OnInit {
|
||||
this.room = room['room'];
|
||||
|
||||
if(this.room.t === 'p'){
|
||||
this.chatService.closeGroup(body).subscribe(res=>{
|
||||
this.chatService.leaveGroup(body).subscribe(res=>{
|
||||
console.log(res);
|
||||
});
|
||||
}
|
||||
else{
|
||||
this.chatService.closeChannel(body).subscribe(res=>{
|
||||
this.chatService.leaveChannel(body).subscribe(res=>{
|
||||
console.log(res);
|
||||
});
|
||||
}
|
||||
@@ -83,7 +83,7 @@ export class ChatPopoverPage implements OnInit {
|
||||
/* const modal = await this.modalController.create({
|
||||
component: EditGroupPage,
|
||||
componentProps: {
|
||||
//room: this.room,
|
||||
roomId: this.roomId,
|
||||
},
|
||||
cssClass: 'contacts',
|
||||
backdropDismiss: false
|
||||
|
||||
@@ -265,7 +265,7 @@
|
||||
background: rgba(51, 51, 51, 0.3);
|
||||
}
|
||||
.modal, .newchat, .new-group, .contacts, .group-messages, .custom-modal{
|
||||
padding-top: 75px;
|
||||
padding-top: 65px;
|
||||
--border-radius: 25px 25px 0 0;
|
||||
--border-width:0px;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user