mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 13:02:56 +00:00
Fix
This commit is contained in:
@@ -19,7 +19,7 @@
|
||||
.middle{
|
||||
padding: 0!important;
|
||||
float: left;
|
||||
width: 280px;
|
||||
width:calc(100% - 77px);
|
||||
margin: 2.5px 0 0 5px;
|
||||
}
|
||||
.right{
|
||||
@@ -55,6 +55,10 @@
|
||||
|
||||
.title{
|
||||
font-size: 25px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden !important;
|
||||
text-overflow: ellipsis !important;
|
||||
float: left;
|
||||
}
|
||||
.div-icon{
|
||||
width: 40px;
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
.middle{
|
||||
//padding: 0!important;
|
||||
float: left;
|
||||
width: 280px;
|
||||
width:calc(100% - 77px);
|
||||
margin: 2px 0 0 5px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@@ -63,7 +63,9 @@
|
||||
|
||||
.title{
|
||||
font-size: 25px;
|
||||
overflow: auto;
|
||||
white-space: nowrap;
|
||||
overflow: hidden !important;
|
||||
text-overflow: ellipsis !important;
|
||||
float: left;
|
||||
}
|
||||
.div-icon{
|
||||
|
||||
@@ -11,6 +11,7 @@ import { ProfileComponent } from '../../headers/header-no-search/profile/profile
|
||||
import { ContactsPage } from '../new-group/contacts/contacts.page';
|
||||
import { Router } from '@angular/router';
|
||||
import { connection } from 'src/app/services/socket/synchro.service';
|
||||
import { ChatOptionsFeaturesPage } from 'src/app/modals/chat-options-features/chat-options-features.page';
|
||||
|
||||
@Component({
|
||||
selector: 'app-messages',
|
||||
@@ -50,20 +51,7 @@ export class MessagesPage implements OnInit, AfterViewChecked, OnChanges {
|
||||
) {
|
||||
this.loggedUser = authService.ValidatedUserChat['data'];
|
||||
|
||||
|
||||
|
||||
this.connection.callback = function() {
|
||||
this.chatService.getRoomMessages(this.roomId).subscribe(async res => {
|
||||
|
||||
if (res == 502) {
|
||||
|
||||
} else if (res != 200) {
|
||||
this.messages = res['messages'].reverse();
|
||||
console.log(this.messages);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
this.connection.callback = this.load
|
||||
|
||||
/* this.dm = this.navParams.get('dm'); */
|
||||
}
|
||||
@@ -71,6 +59,17 @@ export class MessagesPage implements OnInit, AfterViewChecked, OnChanges {
|
||||
this.load();
|
||||
|
||||
//throw new Error('Method not implemented.');
|
||||
|
||||
|
||||
this.chatService.getRoomMessages(this.roomId).subscribe(async res => {
|
||||
|
||||
if (res == 502) {
|
||||
|
||||
} else if (res != 200) {
|
||||
this.messages = res['messages'].reverse();
|
||||
console.log(this.messages);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
@@ -98,7 +97,7 @@ export class MessagesPage implements OnInit, AfterViewChecked, OnChanges {
|
||||
this.alertService.presentAlert('Funcionalidade em desenvolvimento');
|
||||
}
|
||||
|
||||
load(){
|
||||
load = ()=>{
|
||||
this.checktimeOut = true;
|
||||
this.serverLongPull();
|
||||
this.getChatMembers();
|
||||
@@ -191,7 +190,7 @@ export class MessagesPage implements OnInit, AfterViewChecked, OnChanges {
|
||||
}
|
||||
|
||||
openSendMessageOptions(ev?:any){
|
||||
if(window.innerWidth <= 1024){
|
||||
if(window.innerWidth < 701){
|
||||
console.log('mobile');
|
||||
this.openChatOptions(ev);
|
||||
}
|
||||
@@ -289,22 +288,10 @@ export class MessagesPage implements OnInit, AfterViewChecked, OnChanges {
|
||||
return enterAnimation(baseEl).direction('reverse');
|
||||
}
|
||||
|
||||
|
||||
/* const popover = await this.popoverController.create({
|
||||
component: MessagesOptionsPage,
|
||||
componentProps: {
|
||||
roomId: this.dm._id,
|
||||
},
|
||||
cssClass: 'messages-options',
|
||||
event: ev,
|
||||
translucent: true,
|
||||
});
|
||||
return await popover.present(); */
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
enterAnimation,
|
||||
leaveAnimation,
|
||||
component: ChatOptionsPopoverPage,
|
||||
component: ChatOptionsFeaturesPage,
|
||||
cssClass: 'model profile-modal search-submodal',
|
||||
componentProps: {
|
||||
roomId: this.roomId,
|
||||
@@ -314,36 +301,35 @@ export class MessagesPage implements OnInit, AfterViewChecked, OnChanges {
|
||||
}
|
||||
|
||||
async serverLongPull() {
|
||||
|
||||
this.chatService.getRoomMessages(this.roomId).subscribe(async res => {
|
||||
|
||||
if (res == 502) {
|
||||
// Connection timeout
|
||||
// happens when the connection was pending for too long
|
||||
// let's reconnect
|
||||
await this.serverLongPull();
|
||||
} else if (res != 200) {
|
||||
// Show Error
|
||||
//showMessage(response.statusText);
|
||||
//this.loadMessages()
|
||||
this.messages = res['messages'].reverse();
|
||||
console.log(this.messages);
|
||||
// Reconnect in one second
|
||||
if(this.route.url != "/home/chat"){
|
||||
console.log("Timer message stop")
|
||||
if (res == 502) {
|
||||
// Connection timeout
|
||||
// happens when the connection was pending for too long
|
||||
// let's reconnect
|
||||
// await this.serverLongPull();
|
||||
} else if (res != 200) {
|
||||
// Show Error
|
||||
//showMessage(response.statusText);
|
||||
//this.loadMessages()
|
||||
this.messages = res['messages'].reverse();
|
||||
console.log(this.messages);
|
||||
// Reconnect in one second
|
||||
if(this.route.url != "/home/chat"){
|
||||
console.log("Timer message stop")
|
||||
} else {
|
||||
//await new Promise(resolve => setTimeout(resolve, 1000));
|
||||
// await this.serverLongPull();
|
||||
console.log('Timer message running')
|
||||
}
|
||||
|
||||
} else {
|
||||
await new Promise(resolve => setTimeout(resolve, 1000));
|
||||
await this.serverLongPull();
|
||||
console.log('Timer message running')
|
||||
// Got message
|
||||
//let message = await response.text();
|
||||
//this.loadMessages()
|
||||
//await this.serverLongPull();
|
||||
}
|
||||
|
||||
} else {
|
||||
// Got message
|
||||
//let message = await response.text();
|
||||
//this.loadMessages()
|
||||
await this.serverLongPull();
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Component, OnInit} from '@angular/core';
|
||||
|
||||
import { customTaskList} from '../../../models/dailyworktask.model';
|
||||
import { customTask} from '../../../models/dailyworktask.model';
|
||||
import { ProcessesService } from 'src/app/services/processes.service';
|
||||
|
||||
import { AuthService } from 'src/app/services/auth.service';
|
||||
@@ -69,7 +69,7 @@ constructor (
|
||||
|
||||
despachosPr.forEach( (element, index) => {
|
||||
|
||||
let task: customTaskList = this.customTaskPipe.transform(element);
|
||||
let task: customTask = this.customTaskPipe.transform(element);
|
||||
|
||||
despachoList.push(task);
|
||||
});
|
||||
@@ -100,7 +100,7 @@ constructor (
|
||||
}, 1000);
|
||||
}
|
||||
|
||||
goToDespacho({ SerialNumber } :customTaskList) {
|
||||
goToDespacho({ SerialNumber } :customTask) {
|
||||
this.router.navigate(['/home/gabinete-digital/despachos-pr',SerialNumber,'gabinete-digital']);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
|
||||
import { customTaskList, DailyWorkTask, fullTask, tasksList } from '../../../models/dailyworktask.model';
|
||||
import { customTask, DailyWorkTask, fullTask } from '../../../models/dailyworktask.model';
|
||||
import { ProcessesService } from 'src/app/services/processes.service';
|
||||
import { NavigationStart, Router } from '@angular/router';
|
||||
import { DespachoStore } from 'src/app/store/despacho-store.service';
|
||||
@@ -39,7 +39,7 @@ export class DespachosPage implements OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
goToDespacho({ SerialNumber } :customTaskList) {
|
||||
goToDespacho({ SerialNumber } : customTask) {
|
||||
this.router.navigate(['/home/gabinete-digital/despachos',SerialNumber,'gabinete-digital']);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Component, EventEmitter, Input, OnInit, Output, ViewChild } from '@angular/core';
|
||||
import { ActivatedRoute, NavigationEnd, NavigationExtras, NavigationStart, Router } from '@angular/router';
|
||||
import { DailyWorkTask, tasksList } from '../../../models/dailyworktask.model';
|
||||
import { DailyWorkTask } from '../../../models/dailyworktask.model';
|
||||
import { ProcessesService } from 'src/app/services/processes.service';
|
||||
import { ModalController, NavParams } from '@ionic/angular';
|
||||
import { AlertService } from 'src/app/services/alert.service';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Component, EventEmitter, OnInit, Output } from '@angular/core';
|
||||
import { NavigationStart, Router } from '@angular/router';
|
||||
import { customTaskList, DailyWorkTask } from '../../../models/dailyworktask.model';
|
||||
import { customTask, DailyWorkTask } from '../../../models/dailyworktask.model';
|
||||
import { ProcessesService } from 'src/app/services/processes.service';
|
||||
import { ModalController } from '@ionic/angular';
|
||||
import { AlertService } from 'src/app/services/alert.service';
|
||||
@@ -67,7 +67,7 @@ export class ExpedientesPrPage implements OnInit {
|
||||
this.taskslist = [];
|
||||
let res = result.reverse().filter(data => data.workflowInstanceDataFields.Status == "Active");
|
||||
res.forEach(element => {
|
||||
let task: customTaskList = this.customTaskPipe.transform(element);
|
||||
let task: customTask = this.customTaskPipe.transform(element);
|
||||
this.taskslist.push(task);
|
||||
});
|
||||
this.expedienteprstore.reset(this.taskslist);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';
|
||||
import { customTaskList } from 'src/app/models/dailyworktask.model';
|
||||
import { customTask } from 'src/app/models/dailyworktask.model';
|
||||
|
||||
@Component({
|
||||
selector: 'app-task-list',
|
||||
@@ -8,9 +8,9 @@ import { customTaskList } from 'src/app/models/dailyworktask.model';
|
||||
})
|
||||
export class TaskListPage implements OnInit {
|
||||
|
||||
@Input() taskList: customTaskList[] = [];
|
||||
@Input() taskList: customTask[] = [];
|
||||
@Input() skeletonLoader: boolean = false
|
||||
@Output() viewTaskDetail = new EventEmitter<customTaskList>();
|
||||
@Output() viewTaskDetail = new EventEmitter<customTask>();
|
||||
|
||||
constructor() {
|
||||
console.log('taskList', this.taskList)
|
||||
|
||||
@@ -2,7 +2,7 @@ import { Component, EventEmitter, Input, OnInit, Output, ViewChild } from '@angu
|
||||
import { NavigationStart, Router } from '@angular/router';
|
||||
import { CalendarComponent } from 'ionic2-calendar';
|
||||
|
||||
import { customTaskList, DailyWorkTask, tasksList } from '../../../models/dailyworktask.model';
|
||||
import { customTask, DailyWorkTask } from '../../../models/dailyworktask.model';
|
||||
import { ProcessesService } from 'src/app/services/processes.service';
|
||||
import { ModalController } from '@ionic/angular';
|
||||
import { AlertService } from 'src/app/services/alert.service';
|
||||
@@ -24,8 +24,8 @@ export class PedidosPage implements OnInit {
|
||||
parecerList:any[] = [];
|
||||
fulltask:any;
|
||||
|
||||
parecerListResult:tasksList[] = [];
|
||||
deferimentoListResult:tasksList[] = [];
|
||||
parecerListResult:customTask[] = [];
|
||||
deferimentoListResult:customTask[] = [];
|
||||
|
||||
deferimentoList:any[] = [];
|
||||
taskType: string;
|
||||
@@ -90,7 +90,7 @@ export class PedidosPage implements OnInit {
|
||||
|
||||
allParecer.filter(data => data.workflowInstanceDataFields.Status == "Active").forEach(element => {
|
||||
|
||||
let task: customTaskList = this.customTaskPipe.transform(element);
|
||||
let task: customTask = this.customTaskPipe.transform(element);
|
||||
this.parecerList.push(task);
|
||||
});
|
||||
this.pedidosstore.resetparecer(this.parecerList);
|
||||
@@ -107,7 +107,7 @@ export class PedidosPage implements OnInit {
|
||||
let res = result.reverse().filter(data => data.workflowInstanceDataFields.Status == "Active")
|
||||
|
||||
res.forEach(element => {
|
||||
let task: customTaskList = this.customTaskPipe.transform(element);
|
||||
let task: customTask = this.customTaskPipe.transform(element);
|
||||
this.deferimentoList.push(task);
|
||||
});
|
||||
this.pedidosstore.resetdeferimento(this.deferimentoList);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
|
||||
import { NavigationStart, Router } from '@angular/router';
|
||||
import { removeDuplicate } from 'src/plugin/removeDuplicate.js'
|
||||
import { customTaskList} from '../../../models/dailyworktask.model';
|
||||
import { customTask} from '../../../models/dailyworktask.model';
|
||||
import { ProcessesService } from 'src/app/services/processes.service';
|
||||
import { AuthService } from 'src/app/services/auth.service';
|
||||
import { PendentesStore } from 'src/app/store/pendestes-store.service';
|
||||
@@ -55,7 +55,7 @@ export class PendentesPage implements OnInit {
|
||||
let pendentesList = [];
|
||||
|
||||
pendentes.forEach(element => {
|
||||
let task: customTaskList = this.customTaskPipe.transform(element);
|
||||
let task: customTask = this.customTaskPipe.transform(element);
|
||||
pendentesList.push(task);
|
||||
});
|
||||
|
||||
@@ -79,7 +79,7 @@ export class PendentesPage implements OnInit {
|
||||
|
||||
}
|
||||
|
||||
async viewTaskDetails({ SerialNumber, WorkflowName, activityInstanceName }:customTaskList) {
|
||||
async viewTaskDetails({ SerialNumber, WorkflowName, activityInstanceName }:customTask) {
|
||||
if(WorkflowName == 'Despacho') {
|
||||
this.router.navigate(['/home/gabinete-digital/despachos',SerialNumber,'gabinete-digital']);
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@ import { AddNotePage } from 'src/app/modals/add-note/add-note.page';
|
||||
import { BookMeetingModalPage } from 'src/app/pages/gabinete-digital/expediente/book-meeting-modal/book-meeting-modal.page';
|
||||
import { DiscartExpedientModalPage } from 'src/app/pages/gabinete-digital/discart-expedient-modal/discart-expedient-modal.page';
|
||||
import { ToastService } from 'src/app/services/toast.service';
|
||||
import { customTask, fullTask } from 'src/app/models/dailyworktask.model';
|
||||
|
||||
|
||||
@Component({
|
||||
@@ -17,9 +18,9 @@ import { ToastService } from 'src/app/services/toast.service';
|
||||
})
|
||||
export class DespachosOptionsPage implements OnInit {
|
||||
|
||||
task: any;
|
||||
fulltask: any;
|
||||
serialnumber: string;
|
||||
task: customTask
|
||||
fulltask: fullTask;
|
||||
serialNumber: string;
|
||||
|
||||
constructor(private activateRoute: ActivatedRoute,
|
||||
private processes: ProcessesService,
|
||||
@@ -31,6 +32,9 @@ export class DespachosOptionsPage implements OnInit {
|
||||
) {
|
||||
this.task = this.navParams.get('task')
|
||||
this.fulltask = this.navParams.get('fulltask')
|
||||
|
||||
|
||||
this.serialNumber = this.task.SerialNumber
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
@@ -141,7 +145,7 @@ export class DespachosOptionsPage implements OnInit {
|
||||
|
||||
async generateDiploma(note:string, documents:any){
|
||||
let body = {
|
||||
"serialNumber": this.serialnumber,
|
||||
"serialNumber": this.serialNumber,
|
||||
"action": "Reencaminhar",
|
||||
"ActionTypeId": 99999839,
|
||||
"dataFields": {
|
||||
@@ -165,6 +169,8 @@ export class DespachosOptionsPage implements OnInit {
|
||||
}
|
||||
|
||||
async openAddNoteModal(actionName:string) {
|
||||
|
||||
alert('AddNotePage')
|
||||
this.popoverController.dismiss();
|
||||
let classs;
|
||||
if( window.innerWidth <= 800){
|
||||
@@ -174,7 +180,8 @@ export class DespachosOptionsPage implements OnInit {
|
||||
}
|
||||
const modal = await this.modalController.create({
|
||||
component: AddNotePage,
|
||||
componentProps:{
|
||||
componentProps: {
|
||||
showAttachmentBtn: true
|
||||
},
|
||||
cssClass: classs,
|
||||
backdropDismiss: true
|
||||
@@ -220,7 +227,7 @@ export class DespachosOptionsPage implements OnInit {
|
||||
|
||||
async arquivar(note:string, documents:any) {
|
||||
let body = {
|
||||
"serialNumber": this.serialnumber,
|
||||
"serialNumber": this.serialNumber,
|
||||
"action": "Arquivo",
|
||||
"ActionTypeId": 95,
|
||||
"dataFields": {
|
||||
@@ -247,7 +254,7 @@ export class DespachosOptionsPage implements OnInit {
|
||||
|
||||
async executado(note:string, documents:any){
|
||||
let body = {
|
||||
"serialNumber": this.serialnumber,
|
||||
"serialNumber": this.serialNumber,
|
||||
"action": "Conhecimento",
|
||||
"ActionTypeId": 104,
|
||||
"dataFields": {
|
||||
@@ -274,7 +281,7 @@ export class DespachosOptionsPage implements OnInit {
|
||||
|
||||
async reexecutar(note:string, documents:any){
|
||||
let body = {
|
||||
"serialNumber": this.serialnumber,
|
||||
"serialNumber": this.serialNumber,
|
||||
"action": "Reexecutar",
|
||||
"ActionTypeId": 100000010,
|
||||
"dataFields": {
|
||||
|
||||
Reference in New Issue
Block a user