mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 05:16:07 +00:00
Merge branch 'developer' of https://bitbucket.org/equilibriumito/gabinete-digital into developer
This commit is contained in:
@@ -79,8 +79,8 @@
|
||||
|
||||
<div *ngIf="LoadedDocument" class="aside-right flex-column height-100">
|
||||
<div class="buttons">
|
||||
<button *ngIf="p.userRole(['PR'])" (click)="openExpedientActionsModal('0')" class="btn-ok" shape="round" >Efetuar Despacho</button>
|
||||
<button *ngIf="!p.userRole(['PR'])" (click)="openExpedientActionsModal('0')" class="btn-ok" shape="round" >Efetuar Despacho</button>
|
||||
<button *ngIf="p.userRole(['PR'])" (click)="openExpedientActionsModal('0')" class="btn-cancel" shape="round" >Efetuar Despacho</button>
|
||||
<button *ngIf="!p.userRole(['PR'])" (click)="openExpedientActionsModal('0')" class="btn-cancel" shape="round" >Efetuar Despacho</button>
|
||||
<div class="solid"></div>
|
||||
<button (click)="openExpedientActionsModal('1')" class="btn-cancel" shape="round" >Solicitar Parecer</button>
|
||||
<button *ngIf="!p.userRole(['PR'])" (click)="openExpedientActionsModal('2')" class="btn-cancel" shape="round" >Pedido de Deferimento</button>
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
export let FileType:
|
||||
"image/apng" |
|
||||
"image/bmp" |
|
||||
"image/gif" |
|
||||
"image/jpeg" |
|
||||
"image/pjpeg" |
|
||||
"image/png" |
|
||||
"image/svg+xml" |
|
||||
"image/tiff" |
|
||||
"image/webp" |
|
||||
"image/x-icon"
|
||||
@@ -0,0 +1,12 @@
|
||||
export interface wss{
|
||||
|
||||
url: string,
|
||||
type: 'reflect' | 'emit'
|
||||
header: {
|
||||
id: string
|
||||
bluePrint: string,
|
||||
jwt: string
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
</div>
|
||||
<div class="buttons">
|
||||
<button class="btn-cancel" shape="round" (click)="emendarTask()">Adicionar Nota</button>
|
||||
<button class="btn-ok" shape="round" (click)="approveTask()">Aprovar</button>
|
||||
<button class="btn-cancel" shape="round" (click)="approveTask()">Aprovar</button>
|
||||
<div class="solid"></div>
|
||||
<button class="btn-cancel" shape="round" (click)="editTask()">Editar</button>
|
||||
<button class="btn-delete" shape="round" (click)="rejeitar()">Rejeitar</button>
|
||||
|
||||
@@ -130,7 +130,7 @@ export class ViewEventPage implements OnInit {
|
||||
}, (error)=>{
|
||||
|
||||
if(error.status == 0) {
|
||||
this.toastService.badRequest('não é possível vizualizar este event no modo offline')
|
||||
this.toastService.badRequest('Não é possível vizualizar este evento no modo offline')
|
||||
} else {
|
||||
this.toastService.badRequest('Este evento já não existe na sua agenda')
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ import { EditGroupPage } from 'src/app/shared/chat/edit-group/edit-group.page';
|
||||
import * as Rx from "rxjs/Rx";
|
||||
import { Message } from 'src/app/models/message.model';
|
||||
import { Observable, Subject } from "rxjs/Rx";
|
||||
import { Router } from '@angular/router';
|
||||
import { NavigationStart, NavigationEnd, Router } from '@angular/router';
|
||||
import { EventPerson } from 'src/app/models/eventperson.model';
|
||||
import { removeDuplicate } from 'src/plugin/removeDuplicate.js'
|
||||
import { environment } from 'src/environments/environment';
|
||||
@@ -119,6 +119,7 @@ export class ChatPage implements OnInit {
|
||||
){
|
||||
this.loggedUserChat = authService.ValidatedUserChat['data'];
|
||||
this.headers = new HttpHeaders();
|
||||
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
@@ -142,6 +143,23 @@ export class ChatPage implements OnInit {
|
||||
//Teste
|
||||
let t = this.showDateDuration(new Date());
|
||||
console.log(t);
|
||||
|
||||
this.setStatus('away');
|
||||
}
|
||||
|
||||
ngOnDestroy(){
|
||||
this.setStatus('offline');
|
||||
console.log('On Destroy')
|
||||
}
|
||||
|
||||
setStatus(status:string){
|
||||
let body = {
|
||||
message: '',
|
||||
status: status,
|
||||
}
|
||||
this.chatService.setUserStatus(body).subscribe(res => {
|
||||
console.log(res);
|
||||
})
|
||||
}
|
||||
|
||||
hideRefreshButton(){
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
<ion-label>Esta conversa passou a grupo</ion-label><br />
|
||||
<ion-label>A conversa original mantêm-se como chat individual</ion-label>
|
||||
</div>
|
||||
<div *ngFor="let msg of messages" >
|
||||
<div *ngFor="let msg of messages; let last = last" >
|
||||
<div *ngIf="msg.t != 'r'" class='incoming-{{msg.u.username!=loggedUser.me.username}}'>
|
||||
<div class="title">
|
||||
<ion-label>{{msg.u.name}}</ion-label>
|
||||
@@ -47,6 +47,7 @@
|
||||
</div>
|
||||
<div>
|
||||
<ion-label>{{msg.msg}}</ion-label>
|
||||
{{last ? scrollToBottom() : ''}}
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="msg.t == 'r'" class="info-text">
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Component, ElementRef, OnInit, ViewChild, AfterViewChecked } from '@angular/core';
|
||||
import { Component, ElementRef, OnInit, ViewChild, AfterViewChecked, AfterViewInit, OnDestroy } from '@angular/core';
|
||||
import { ActionSheetController, MenuController, ModalController, NavParams, PopoverController } from '@ionic/angular';
|
||||
import { AlertService } from 'src/app/services/alert.service';
|
||||
import { AuthService } from 'src/app/services/auth.service';
|
||||
@@ -16,7 +16,7 @@ import { EditGroupPage } from '../edit-group/edit-group.page';
|
||||
templateUrl: './group-messages.page.html',
|
||||
styleUrls: ['./group-messages.page.scss'],
|
||||
})
|
||||
export class GroupMessagesPage implements OnInit, AfterViewChecked {
|
||||
export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
showLoader: boolean;
|
||||
isGroupCreated:boolean;
|
||||
loggedUser: any;
|
||||
@@ -33,6 +33,11 @@ export class GroupMessagesPage implements OnInit, AfterViewChecked {
|
||||
loggedUserChat:any;
|
||||
eventSelectedDate: Date = new Date();
|
||||
|
||||
scrollingOnce:boolean = true;
|
||||
private scrollChangeCallback: () => void;
|
||||
currentPosition: any;
|
||||
startPosition: number;
|
||||
|
||||
@ViewChild('scrollMe') private myScrollContainer: ElementRef;
|
||||
|
||||
constructor(
|
||||
@@ -57,15 +62,48 @@ export class GroupMessagesPage implements OnInit, AfterViewChecked {
|
||||
this.getRoomInfo();
|
||||
this.scrollToBottom();
|
||||
this.serverLongPull();
|
||||
this.setStatus('online');
|
||||
}
|
||||
|
||||
ngAfterViewChecked() {
|
||||
//this.scrollToBottom();
|
||||
setStatus(status:string){
|
||||
let body = {
|
||||
message: '',
|
||||
status: status,
|
||||
}
|
||||
this.chatService.setUserStatus(body).subscribe(res => {
|
||||
console.log(res);
|
||||
})
|
||||
}
|
||||
|
||||
ngAfterViewInit() {
|
||||
this.scrollChangeCallback = () => this.onContentScrolled(event);
|
||||
window.addEventListener('scroll', this.scrollChangeCallback, true);
|
||||
}
|
||||
|
||||
onContentScrolled(e) {
|
||||
this.startPosition = e.srcElement.scrollTop;
|
||||
let scroll = e.srcElement.scrollTop;
|
||||
if (scroll > this.currentPosition) {
|
||||
//this.showButton = false;
|
||||
//alert('BOTTOM');
|
||||
} else {
|
||||
//this.showButton = true;
|
||||
//alert('UP');
|
||||
this.scrollingOnce = false;
|
||||
}
|
||||
this.currentPosition = scroll;
|
||||
}
|
||||
|
||||
ngOnDestroy() {
|
||||
window.removeEventListener('scroll', this.scrollChangeCallback, true);
|
||||
}
|
||||
|
||||
scrollToBottom(): void {
|
||||
try {
|
||||
this.myScrollContainer.nativeElement.scrollTop = this.myScrollContainer.nativeElement.scrollHeight;
|
||||
if(this.scrollingOnce){
|
||||
this.myScrollContainer.nativeElement.scrollTop = this.myScrollContainer.nativeElement.scrollHeight;
|
||||
//this.scrollingOnce = false;
|
||||
}
|
||||
} catch(err) { }
|
||||
}
|
||||
|
||||
@@ -181,6 +219,7 @@ export class GroupMessagesPage implements OnInit, AfterViewChecked {
|
||||
|
||||
this.chatService.sendMessage(body).subscribe(res=> {
|
||||
this.getRoomInfo();
|
||||
this.scrollingOnce = true;
|
||||
|
||||
},(error) => {
|
||||
|
||||
@@ -302,7 +341,8 @@ export class GroupMessagesPage implements OnInit, AfterViewChecked {
|
||||
// Show Error
|
||||
//showMessage(response.statusText);
|
||||
//this.loadMessages()
|
||||
this.messages = res['messages'].filter(data => data.t != 'au');
|
||||
let msgOnly = res['messages'].filter(data => data.t != 'au');
|
||||
this.messages = msgOnly.reverse();
|
||||
console.log(this.messages);
|
||||
// Reconnect in one second
|
||||
if(this.route.url != "/home/chat"){
|
||||
|
||||
@@ -36,13 +36,14 @@
|
||||
</ion-refresher-content>
|
||||
</ion-refresher>
|
||||
<div class="messages" #scrollMe>
|
||||
<div *ngFor="let msg of messages" class='incoming-{{msg.u.username!=loggedUser.me.username}}'>
|
||||
<div *ngFor="let msg of messages; let last = last" class='incoming-{{msg.u.username!=loggedUser.me.username}}'>
|
||||
<div class="title">
|
||||
<ion-label>{{msg.u.name}}</ion-label>
|
||||
<span class="time">{{showDateDuration(msg._updatedAt)}}</span>
|
||||
</div>
|
||||
<div>
|
||||
<ion-label>{{msg.msg}}</ion-label>
|
||||
{{last ? scrollToBottom() : ''}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { AfterViewChecked, Component, ElementRef, OnInit, ViewChild } from '@angular/core';
|
||||
import { AfterViewChecked, AfterViewInit, Component, ElementRef, OnDestroy, OnInit, ViewChild } from '@angular/core';
|
||||
import {ActivatedRoute, Router} from '@angular/router'
|
||||
import { ModalController, NavParams, PopoverController } from '@ionic/angular';
|
||||
import { ContactsPage } from 'src/app/pages/chat/messages/contacts/contacts.page';
|
||||
@@ -15,7 +15,7 @@ import { MessagesOptionsPage } from 'src/app/shared/popover/messages-options/mes
|
||||
templateUrl: './messages.page.html',
|
||||
styleUrls: ['./messages.page.scss'],
|
||||
})
|
||||
export class MessagesPage implements OnInit, AfterViewChecked {
|
||||
export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
showLoader: boolean;
|
||||
|
||||
@ViewChild('scrollMe') private myScrollContainer: ElementRef;
|
||||
@@ -29,8 +29,13 @@ export class MessagesPage implements OnInit, AfterViewChecked {
|
||||
roomId:string;
|
||||
el:any;
|
||||
members:any;
|
||||
scrollingOnce:boolean = true;
|
||||
|
||||
connection = connection
|
||||
connection = connection;
|
||||
|
||||
private scrollChangeCallback: () => void;
|
||||
currentPosition: any;
|
||||
startPosition: number;
|
||||
|
||||
constructor(
|
||||
public popoverController: PopoverController,
|
||||
@@ -54,14 +59,23 @@ export class MessagesPage implements OnInit, AfterViewChecked {
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
this.scrollToBottom();
|
||||
|
||||
/* setInterval(()=>{ */
|
||||
this.load();
|
||||
/* }, 9000); */
|
||||
/* this.el = document.getElementById("scrollToBottom");
|
||||
this.el.scrollTop = this.el.scrollHeight - this.el.scrollTop; */
|
||||
|
||||
this.setStatus('online');
|
||||
}
|
||||
|
||||
setStatus(status:string){
|
||||
let body = {
|
||||
message: '',
|
||||
status: status,
|
||||
}
|
||||
this.chatService.setUserStatus(body).subscribe(res => {
|
||||
console.log(res);
|
||||
})
|
||||
}
|
||||
|
||||
notImplemented(){
|
||||
@@ -82,16 +96,40 @@ export class MessagesPage implements OnInit, AfterViewChecked {
|
||||
ev.target.complete();
|
||||
}
|
||||
|
||||
ngAfterViewChecked() {
|
||||
//this.scrollToBottom();
|
||||
}
|
||||
|
||||
scrollToBottom(): void {
|
||||
try {
|
||||
this.myScrollContainer.nativeElement.scrollTop = this.myScrollContainer.nativeElement.scrollHeight;
|
||||
if(this.scrollingOnce){
|
||||
this.myScrollContainer.nativeElement.scrollTop = this.myScrollContainer.nativeElement.scrollHeight;
|
||||
//this.scrollingOnce = false;
|
||||
}
|
||||
} catch(err) { }
|
||||
}
|
||||
|
||||
ngAfterViewInit() {
|
||||
this.scrollChangeCallback = () => this.onContentScrolled(event);
|
||||
window.addEventListener('scroll', this.scrollChangeCallback, true);
|
||||
}
|
||||
|
||||
onContentScrolled(e) {
|
||||
this.startPosition = e.srcElement.scrollTop;
|
||||
let scroll = e.srcElement.scrollTop;
|
||||
if (scroll > this.currentPosition) {
|
||||
//this.showButton = false;
|
||||
//alert('BOTTOM');
|
||||
} else {
|
||||
//this.showButton = true;
|
||||
//alert('UP');
|
||||
this.scrollingOnce = false;
|
||||
}
|
||||
this.currentPosition = scroll;
|
||||
}
|
||||
|
||||
ngOnDestroy() {
|
||||
window.removeEventListener('scroll', this.scrollChangeCallback, true);
|
||||
}
|
||||
|
||||
|
||||
|
||||
sendMessage() {
|
||||
let body = {
|
||||
"message":
|
||||
@@ -100,7 +138,8 @@ export class MessagesPage implements OnInit, AfterViewChecked {
|
||||
}
|
||||
}
|
||||
this.chatService.sendMessage(body).subscribe(res=> {
|
||||
this.loadMessages();
|
||||
//this.loadMessages();
|
||||
this.scrollingOnce = true;
|
||||
});
|
||||
this.message = "";
|
||||
}
|
||||
|
||||
@@ -85,7 +85,7 @@
|
||||
<button (click)="openAddNoteModal('Gerar Diploma')" class="btn-cancel" style="margin-bottom: 0px !important;" shape="round" >Gerar Diploma </button>
|
||||
<!-- <div class="solid"></div> -->
|
||||
<div class="option-desc">Outras opções</div>
|
||||
<button (click)="openExpedientActionsModal('0',fulltask)" class="btn-ok" shape="round" >Efetuar Despacho</button>
|
||||
<button (click)="openExpedientActionsModal('0',fulltask)" class="btn-cancel" shape="round" >Efetuar Despacho</button>
|
||||
<button (click)="openExpedientActionsModal('1',fulltask)" class="btn-cancel" shape="round" >Solicitar Parecer</button>
|
||||
<button (click)="openDelegarModal(task)" class="btn-cancel" shape="round" >Delegar</button>
|
||||
<button (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button>
|
||||
|
||||
@@ -3,8 +3,8 @@ import { ProcessesService } from 'src/app/services/processes.service';
|
||||
import { AttachmentsService } from 'src/app/services/attachments.service';
|
||||
import { EventsService } from 'src/app/services/events.service';
|
||||
import { InAppBrowser } from '@ionic-native/in-app-browser/ngx';
|
||||
import { DailyWorkTask, fullTask } from '../../../../models/dailyworktask.model';
|
||||
import { ActivatedRoute, NavigationExtras, Router } from '@angular/router';
|
||||
import { fullTask } from '../../../../models/dailyworktask.model';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
|
||||
import { Event } from '../../../../models/event.model';
|
||||
import { MenuController, ModalController, PopoverController } from '@ionic/angular';
|
||||
@@ -293,8 +293,9 @@ export class DespachoPrPage implements OnInit {
|
||||
|
||||
sendExpedienteToPending(){
|
||||
this.processes.SetTaskToPending(this.serialNumber).subscribe(res=>{
|
||||
this.goBack();
|
||||
this.popoverController.dismiss('close')
|
||||
this.toastService.successMessage('Processo enviado para pendentes')
|
||||
this.goBack()
|
||||
},()=>{
|
||||
|
||||
this.toastService.badRequest('Processo não encontrado')
|
||||
@@ -486,8 +487,6 @@ export class DespachoPrPage implements OnInit {
|
||||
|
||||
}
|
||||
|
||||
console.log('alert ...'+ JSON.stringify(res))
|
||||
|
||||
}))
|
||||
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="line"></div>
|
||||
|
||||
|
||||
<div class="overflow-y-auto" style="margin-right: -20px; margin-right: -20px;">
|
||||
<div class="middle-content">
|
||||
<h5 *ngIf="intervenientes">Intervenientes</h5>
|
||||
@@ -88,7 +88,7 @@
|
||||
<button (click)="openAddNoteModal('Executado')" class="btn-cancel" shape="round" >Executado</button>
|
||||
<button (click)="openDelegarModal(task)" class="btn-cancel" shape="round" >Delegar</button>
|
||||
<div class="solid"></div>
|
||||
<button (click)="openExpedientActionsModal('0',fulltask)" class="btn-ok" shape="round" >Efetuar Despacho</button>
|
||||
<button (click)="openExpedientActionsModal('0',fulltask)" class="btn-cancel" shape="round" >Efetuar Despacho</button>
|
||||
<button (click)="openExpedientActionsModal('1',fulltask)" class="btn-cancel" shape="round" >Solicitar Parecer</button>
|
||||
<button (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button>
|
||||
<div class="solid"></div>
|
||||
@@ -98,7 +98,7 @@
|
||||
<button (click)="openAddNoteModal('Executado')" class="btn-cancel" shape="round" >Executado</button>
|
||||
<button (click)="openDelegarModal(task)" class="btn-cancel" shape="round" >Delegar</button>
|
||||
<div class="solid"></div>
|
||||
<button (click)="openExpedientActionsModal('0',fulltask)" class="btn-ok" shape="round" >Efetuar Despacho</button>
|
||||
<button (click)="openExpedientActionsModal('0',fulltask)" class="btn-cancel" shape="round" >Efetuar Despacho</button>
|
||||
<button (click)="openExpedientActionsModal('1',fulltask)" class="btn-cancel" shape="round" >Solicitar Parecer</button>
|
||||
<button (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button>
|
||||
<div class="solid"></div>
|
||||
@@ -107,7 +107,7 @@
|
||||
<div class="buttons" *ngIf="task.activityInstanceName == 'Concluir Despacho'">
|
||||
<button (click)="openAddNoteModal('Arquivar')" class="btn-cancel" shape="round" >Arquivar</button>
|
||||
<div class="solid"></div>
|
||||
<button (click)="openExpedientActionsModal('0',fulltask)" class="btn-ok" shape="round" >Efetuar Despacho</button>
|
||||
<button (click)="openExpedientActionsModal('0',fulltask)" class="btn-cancel" shape="round" >Efetuar Despacho</button>
|
||||
<button (click)="openExpedientActionsModal('1',fulltask)" class="btn-cancel" shape="round" >Solicitar Parecer</button>
|
||||
<button (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button>
|
||||
<div class="solid"></div>
|
||||
|
||||
@@ -239,7 +239,7 @@ export class DespachoPage implements OnInit {
|
||||
|
||||
this.despachoService.sendExpedienteToPending(this.serialnumber).subscribe(res=>{
|
||||
this.goBack();
|
||||
this.toastService.successMessage('Processo enviado para despacho')
|
||||
this.toastService.successMessage()
|
||||
},
|
||||
error => {
|
||||
this.toastService.badRequest("Processo não enviado para despacho")
|
||||
|
||||
+1
-1
@@ -124,6 +124,6 @@
|
||||
<div class="buttons width-100">
|
||||
<button class="btn-cancel cursor-pointer" shape="round" (click)="emendTask(loadedEvent.serialNumber)">Adicionar Nota</button>
|
||||
<button class="btn-no-color cursor-pointer" shape="round" (click)="openMenu()"> <ion-icon name="ellipsis-vertical-outline"></ion-icon></button>
|
||||
<button class="btn-ok cursor-pointer" shape="round" (click)="approveTask(loadedEvent.serialNumber)">Aprovar</button>
|
||||
<button class="btn-cancel cursor-pointer" shape="round" (click)="approveTask(loadedEvent.serialNumber)">Aprovar</button>
|
||||
</div>
|
||||
</ion-footer>
|
||||
|
||||
@@ -26,18 +26,18 @@
|
||||
<p>
|
||||
<span class="location">{{loadedEvent.workflowInstanceDataFields.Location}}</span>
|
||||
|
||||
<span class="event-type-{{loadedEvent.workflowInstanceDataFields.Agenda}}" *ngIf="loadedEvent.workflowDisplayName == 'Agenda Oficial MDGPR' " style="background-color: #ffb703;">
|
||||
<span class="event-type-{{loadedEvent.workflowInstanceDataFields.Agenda}}" *ngIf="loadedEvent.workflowDisplayName == 'Agenda Oficial MDGPR' " style="background-color: #ffb703;">
|
||||
{{loadedEvent.workflowInstanceDataFields.Agenda}}
|
||||
</span>
|
||||
<span class="event-type-{{loadedEvent.workflowInstanceDataFields.Agenda}}" *ngIf="loadedEvent.workflowDisplayName == 'Agenda Pessoal MDGPR' " style="background-color: #f05d5e;">
|
||||
<span class="event-type-{{loadedEvent.workflowInstanceDataFields.Agenda}}" *ngIf="loadedEvent.workflowDisplayName == 'Agenda Pessoal MDGPR' " style="background-color: #f05d5e;">
|
||||
{{loadedEvent.workflowInstanceDataFields.Agenda}}
|
||||
</span>
|
||||
|
||||
|
||||
<span class="event-type-{{loadedEvent.workflowInstanceDataFields.Agenda}}" *ngIf="loadedEvent.workflowDisplayName == 'Agenda Oficial PR' " style="background-color: #99e47b;">
|
||||
<span class="event-type-{{loadedEvent.workflowInstanceDataFields.Agenda}}" *ngIf="loadedEvent.workflowDisplayName == 'Agenda Oficial PR' " style="background-color: #99e47b;">
|
||||
{{loadedEvent.workflowInstanceDataFields.Agenda}}
|
||||
</span>
|
||||
<span class="event-type-{{loadedEvent.workflowInstanceDataFields.Agenda}}" *ngIf="loadedEvent.workflowDisplayName == 'Agenda Pessoal PR' " style="background-color: #958bfc;">
|
||||
<span class="event-type-{{loadedEvent.workflowInstanceDataFields.Agenda}}" *ngIf="loadedEvent.workflowDisplayName == 'Agenda Pessoal PR' " style="background-color: #958bfc;">
|
||||
{{loadedEvent.workflowInstanceDataFields.Agenda}}
|
||||
</span>
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="line"></div>
|
||||
|
||||
|
||||
<div class="overflow-y-auto">
|
||||
<div class="middle-content">
|
||||
<div *ngIf="loadedEvent.workflowInstanceDataFields.ParticipantsList">
|
||||
@@ -72,12 +72,12 @@
|
||||
<div class="line"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div *ngIf="loadedAttachments" class="bottom-content width-100">
|
||||
<ion-list>
|
||||
<h5>Documentos Anexados</h5>
|
||||
<ion-item class="ion-no-margin ion-no-padding cursor-pointer"
|
||||
*ngFor="let attach of loadedAttachments"
|
||||
*ngFor="let attach of loadedAttachments"
|
||||
(click)="viewDocument(attach.SourceId)">
|
||||
<ion-label>
|
||||
<p class="attach-title-item d-block">{{attach.SourceName}}</p>
|
||||
@@ -91,8 +91,8 @@
|
||||
|
||||
<div *ngIf="loadedEvent" class="aside-right flex-column height-100">
|
||||
<div class="aside-buttons">
|
||||
<button hidden full class="btn-ok" shape="round" >Editar evento</button>
|
||||
<button (click)="approveTask(loadedEvent.serialNumber)" full class="btn-ok" shape="round" >Aprovar</button>
|
||||
<button hidden full class="btn-cancel" shape="round" >Editar evento</button>
|
||||
<button (click)="approveTask(loadedEvent.serialNumber)" full class="btn-cancel" shape="round" >Aprovar</button>
|
||||
<button (click)="emendTask(loadedEvent.serialNumber)" class="btn-cancel" shape="round" >Adicionar Nota</button>
|
||||
<div class="solid"></div>
|
||||
<button full class="btn-cancel" shape="round" (click)="editar(loadedEvent.serialNumber)" >Editar</button>
|
||||
|
||||
+3
-3
@@ -93,13 +93,13 @@
|
||||
<div class="option-desc"> <div>Solicitar revisão</div> </div>
|
||||
<button (click)="openAddNoteModal('Revisão')" class="btn-cancel" shape="round" >Mandar para Revisão</button>
|
||||
<div class="option-desc"> <div>Outras opções</div> </div>
|
||||
<button (click)="openExpedientActionsModal('0',fulltask)" class="btn-ok" shape="round" >Efetuar Despacho</button>
|
||||
<button (click)="openExpedientActionsModal('0',fulltask)" class="btn-cancel" shape="round" >Efetuar Despacho</button>
|
||||
<button (click)="openExpedientActionsModal('1',fulltask)" class="btn-cancel" shape="round" >Solicitar Parecer</button>
|
||||
<button (click)="openExpedientActionsModal('2',fulltask)" class="btn-cancel" shape="round" >Pedido de Deferimento</button>
|
||||
<button (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button>
|
||||
<button *ngIf="!p.userRole(['PR'])" (click)="attachDocument()" class="btn-cancel" shape="round" >Anexar Documentos</button>
|
||||
<button (click)="distartExpedientModal('descartar')" class="btn-cancel" shape="round" >Descartar</button>
|
||||
<button (click)="sendExpedienteToPending()" *ngIf="task.Status != 'Pending'" full class="btn-ok" shape="round" >Enviar para pendentes</button>
|
||||
<button (click)="sendExpedienteToPending()" *ngIf="task.Status != 'Pending'" full class="btn-cancel" shape="round" >Enviar para pendentes</button>
|
||||
<div class="solid"></div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -107,7 +107,7 @@
|
||||
<div *ngIf="task && p.userRole(['PR'])" class="aside-right flex-column height-100 overflow-y-auto">
|
||||
|
||||
<div class="buttons">
|
||||
<button (click)="openExpedientActionsModal('0', fulltask)" class="btn-ok" shape="round" >Efetuar Despacho</button>
|
||||
<button (click)="openExpedientActionsModal('0', fulltask)" class="btn-cancel" shape="round" >Efetuar Despacho</button>
|
||||
<button (click)="distartExpedientModal('descartar')" class="btn-cancel" shape="round" >Descartar</button>
|
||||
<div class="solid"></div>
|
||||
<button (click)="openExpedientActionsModal('1',fulltask)" class="btn-cancel" shape="round" >Solicitar Parecer</button>
|
||||
|
||||
@@ -116,7 +116,7 @@
|
||||
<button (click)="attachDocument()" class="btn-cancel" shape="round" >Anexar Documento <br />(Gestão Documental)</button>
|
||||
</div>
|
||||
<div *ngIf="loggeduser.Profile =='PR' " class="buttons">
|
||||
<button (click)="openExpedientActionsModal('0', fulltask)" class="btn-ok" shape="round" >Efetuar Despacho</button>
|
||||
<button (click)="openExpedientActionsModal('0', fulltask)" class="btn-cancel" shape="round" >Efetuar Despacho</button>
|
||||
<button (click)="distartExpedientModal('descartar')" class="btn-cancel" shape="round" >Descartar</button>
|
||||
<div class="solid"></div>
|
||||
<button (click)="openExpedientActionsModal('1',fulltask)" class="btn-cancel" shape="round" >Solicitar Parecer</button>
|
||||
|
||||
@@ -4,7 +4,6 @@ ion-content{
|
||||
--padding-start:15px; */
|
||||
/* --padding-bottom:15px; */
|
||||
/* --background:#ecf8ff; */
|
||||
--background: #ecf8ff;
|
||||
}
|
||||
ion-segment{
|
||||
overflow: auto;
|
||||
@@ -121,6 +120,8 @@ ion-segment-button{
|
||||
background:#ecf8ff;
|
||||
overflow:hidden;
|
||||
padding: 0 !important;
|
||||
border-top-left-radius: 25px;
|
||||
border-top-right-radius: 25px;
|
||||
|
||||
.aside-wrapper{
|
||||
overflow: hidden;
|
||||
|
||||
@@ -84,8 +84,8 @@
|
||||
<button (click)="openAddNoteModal('Arquivar')" class="btn-cancel" shape="round" >Arquivar</button>
|
||||
<button (click)="openDelegarModal(task)" class="btn-cancel" shape="round" >Delegar</button>
|
||||
<div class="solid"></div>
|
||||
<button *ngIf="p.userRole(['MDGPR'])" (click)="openExpedientActionsModal('0',fulltask)" class="btn-ok" shape="round" >Efetuar Despacho</button>
|
||||
<button *ngIf="p.userRole(['PR'])" (click)="openExpedientActionsModal('0',fulltask)" class="btn-ok" shape="round" >Efetuar Despacho</button>
|
||||
<button *ngIf="p.userRole(['MDGPR'])" (click)="openExpedientActionsModal('0',fulltask)" class="btn-cancel" shape="round" >Efetuar Despacho</button>
|
||||
<button *ngIf="p.userRole(['PR'])" (click)="openExpedientActionsModal('0',fulltask)" class="btn-cancel" shape="round" >Efetuar Despacho</button>
|
||||
<button *ngIf="loggeduser.Profile == 'MDGPR'" (click)="openExpedientActionsModal('2',fulltask)" class="btn-cancel" shape="round" >Pedido de Deferimento</button>
|
||||
<button (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button>
|
||||
<button (click)="sendExpedienteToPending()" *ngIf="task.Status != 'Pending'" class="btn-cancel" shape="round" >Enviar para Pendentes</button>
|
||||
@@ -94,8 +94,8 @@
|
||||
<button (click)="openAddNoteModal('Arquivar')" class="btn-cancel" shape="round" >Arquivar</button>
|
||||
<button (click)="openDelegarModal(task)" class="btn-cancel" shape="round" >Delegar</button>
|
||||
<div class="solid"></div>
|
||||
<button *ngIf="p.userRole(['MDGPR'])" (click)="openExpedientActionsModal('0',fulltask)" class="btn-ok" shape="round" >Efetuar Despacho</button>
|
||||
<button *ngIf="p.userRole(['PR'])" (click)="openExpedientActionsModal('0',fulltask)" class="btn-ok" shape="round" >Efetuar Despacho</button>
|
||||
<button *ngIf="p.userRole(['MDGPR'])" (click)="openExpedientActionsModal('0',fulltask)" class="btn-cancel" shape="round" >Efetuar Despacho</button>
|
||||
<button *ngIf="p.userRole(['PR'])" (click)="openExpedientActionsModal('0',fulltask)" class="btn-cancel" shape="round" >Efetuar Despacho</button>
|
||||
<button *ngIf="loggeduser.Profile == 'MDGPR'" (click)="openExpedientActionsModal('2',fulltask)" class="btn-cancel" shape="round" >Pedido de Deferimento</button>
|
||||
<button (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button>
|
||||
<button (click)="sendExpedienteToPending()" *ngIf="task.Status != 'Pending'" class="btn-cancel" shape="round" >Enviar para Pendentes</button>
|
||||
@@ -104,8 +104,8 @@
|
||||
<button (click)="openAddNoteModal('Arquivar')" class="btn-cancel" shape="round" >Arquivar</button>
|
||||
<button (click)="openDelegarModal(task)" class="btn-cancel" shape="round" >Delegar</button>
|
||||
<div class="solid"></div>
|
||||
<button *ngIf="p.userRole(['MDGPR'])" (click)="openExpedientActionsModal('0',fulltask)" class="btn-ok" shape="round" >Efetuar Despacho</button>
|
||||
<button *ngIf="p.userRole(['PR'])" (click)="openExpedientActionsModal('0',fulltask)" class="btn-ok" shape="round" >Efetuar Despacho</button>
|
||||
<button *ngIf="p.userRole(['MDGPR'])" (click)="openExpedientActionsModal('0',fulltask)" class="btn-cancel" shape="round" >Efetuar Despacho</button>
|
||||
<button *ngIf="p.userRole(['PR'])" (click)="openExpedientActionsModal('0',fulltask)" class="btn-cancel" shape="round" >Efetuar Despacho</button>
|
||||
<button hidden (click)="openExpedientActionsModal('1',fulltask)" class="btn-cancel" shape="round" >Solicitar Parecer</button>
|
||||
<button (click)="openAddNoteModal('Solicitar Reapreciação')" class="btn-cancel" shape="round" >Solicitar Reapreciação</button>
|
||||
<button (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button>
|
||||
@@ -121,8 +121,8 @@
|
||||
</div>
|
||||
<div class="buttons" *ngIf="task.activityInstanceName == 'Concluir Parecer'">
|
||||
<button (click)="openAddNoteModal('Arquivar')" class="btn-cancel" shape="round" >Arquivar</button>
|
||||
<button *ngIf="p.userRole(['MDGPR'])" (click)="openExpedientActionsModal('0',fulltask)" class="btn-ok" shape="round" >Efetuar Despacho</button>
|
||||
<button *ngIf="p.userRole(['PR'])" (click)="openExpedientActionsModal('0',fulltask)" class="btn-ok" shape="round" >Efetuar Despacho</button>
|
||||
<button *ngIf="p.userRole(['MDGPR'])" (click)="openExpedientActionsModal('0',fulltask)" class="btn-cancel" shape="round" >Efetuar Despacho</button>
|
||||
<button *ngIf="p.userRole(['PR'])" (click)="openExpedientActionsModal('0',fulltask)" class="btn-cancel" shape="round" >Efetuar Despacho</button>
|
||||
<button (click)="openExpedientActionsModal('1',fulltask)" class="btn-cancel" shape="round" >Solicitar Parecer</button>
|
||||
<button *ngIf="loggeduser.Profile == 'MDGPR'" (click)="openExpedientActionsModal('2',fulltask)" class="btn-cancel" shape="round" >Pedido de Deferimento</button>
|
||||
<button (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Component, EventEmitter, Input, OnInit, Output, ViewChild } from '@angular/core';
|
||||
import { ActivatedRoute, NavigationEnd, NavigationExtras, NavigationStart, Router } from '@angular/router';
|
||||
import { ActivatedRoute, NavigationStart, Router } from '@angular/router';
|
||||
import { CalendarComponent } from 'ionic2-calendar';
|
||||
import { customTask, DailyWorkTask } from '../../../models/dailyworktask.model';
|
||||
import { ProcessesService } from 'src/app/services/processes.service';
|
||||
@@ -88,15 +88,15 @@ export class PedidosPage implements OnInit {
|
||||
// this.LoadList();
|
||||
} */
|
||||
|
||||
goToPedido(serialNumber:any){
|
||||
goToPedido(serialNumber:any) {
|
||||
this.router.navigate(['/home/gabinete-digital/pedidos',serialNumber,'gabinete-digital']);
|
||||
}
|
||||
|
||||
notImplemented(){
|
||||
notImplemented() {
|
||||
this.alertService.presentAlert('Funcionalidade em desenvolvimento');
|
||||
}
|
||||
|
||||
openExpedientDetailPage(data){
|
||||
openExpedientDetailPage(data) {
|
||||
console.log(data);
|
||||
this.openExpedientDetail.emit(data);
|
||||
}
|
||||
|
||||
@@ -42,6 +42,20 @@
|
||||
</ion-thumbnail> -->
|
||||
</div>
|
||||
|
||||
<div class="picture d-flex pb-5 hide-desktop" *ngIf="publication.FileBase64 && capturedImage ==''">
|
||||
<div class="post-img">
|
||||
<img src="{{publication.FileBase64}}" alt="image" >
|
||||
</div>
|
||||
<div class="d-flex flex-column pl-10">
|
||||
<div class="picture-file-name">{{publication.OriginalFileName}}.{{publication.FileExtension}}</div>
|
||||
<div class="size">75 Kb</div>
|
||||
</div>
|
||||
<div class="flex-grow-1 d-flex align-center justify-end">
|
||||
<div style="color: red;">X</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="ion-item-container-no-border">
|
||||
<ion-label (click)="takePicture()">
|
||||
<div class="attach-icon">
|
||||
@@ -53,8 +67,8 @@
|
||||
</ion-label>
|
||||
</div>
|
||||
|
||||
<div class="ion-item-container-no-border">
|
||||
<ion-label (click)="getPicture()">
|
||||
<!-- <div class="ion-item-container-no-border">
|
||||
<ion-label (click)="laodPicture()">
|
||||
<div class="attach-icon">
|
||||
<ion-icon src="assets/images/icons-add-photos.svg"></ion-icon>
|
||||
</div>
|
||||
@@ -62,8 +76,8 @@
|
||||
<ion-label>Anexar Fotografia</ion-label>
|
||||
</div>
|
||||
</ion-label>
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</ion-content>
|
||||
|
||||
|
||||
@@ -134,4 +134,32 @@ font-size: 25px;
|
||||
line-height: normal;
|
||||
letter-spacing: normal;
|
||||
color: #000;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.picture{
|
||||
.post-img{
|
||||
width: 60px;
|
||||
}
|
||||
.picture-file-name{
|
||||
font-size: 15px;
|
||||
color: #0d89d1;
|
||||
}
|
||||
.size{
|
||||
color: #cecece;
|
||||
font-size: 13px;
|
||||
}
|
||||
}
|
||||
|
||||
.container-title{
|
||||
font-size: 15px;
|
||||
font-weight: bold;
|
||||
}
|
||||
.hide-desktop{
|
||||
display: block;
|
||||
}
|
||||
|
||||
|
||||
@@ -15,6 +15,8 @@ import { ToastService } from 'src/app/services/toast.service';
|
||||
import { FormControl, FormGroup, Validators } from '@angular/forms';
|
||||
import { ThemePalette } from '@angular/material/core';
|
||||
import { formatDate } from 'src/plugin/momentG.js'
|
||||
import { FileLoaderService } from 'src/app/services/file/file-loader.service';
|
||||
import { FileToBase64Service } from 'src/app/services/file/file-to-base64.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-new-publication',
|
||||
@@ -66,6 +68,8 @@ export class NewPublicationPage implements OnInit {
|
||||
private publications: PublicationsService,
|
||||
private camera: Camera,
|
||||
private toastService: ToastService,
|
||||
private fileLoaderService: FileLoaderService,
|
||||
private fileToBase64Service: FileToBase64Service
|
||||
) {
|
||||
|
||||
this.publicationType = this.navParams.get('publicationType');
|
||||
@@ -100,6 +104,22 @@ export class NewPublicationPage implements OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
laodPicture() {
|
||||
const input = this.fileLoaderService.createInput({
|
||||
accept: ['image/apng', 'image/jpeg', 'image/png']
|
||||
})
|
||||
|
||||
input.onchange = async () => {
|
||||
const file = this.fileLoaderService.getFirstFile(input)
|
||||
|
||||
const imageData = await this.fileToBase64Service.convert(file)
|
||||
this.capturedImage = imageData;
|
||||
this.capturedImageTitle = file.name
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
getPicture() {
|
||||
const options: CameraOptions = {
|
||||
quality: 90,
|
||||
|
||||
@@ -30,13 +30,13 @@ export class ViewPublicationsPage implements OnInit {
|
||||
publicationEventFolderStorage = PublicationEventFolderStorage
|
||||
publicationTravelFolderService = PublicationTravelFolderStore
|
||||
|
||||
publicationPipe = new PublicationPipe()
|
||||
|
||||
constructor(
|
||||
private modalController: ModalController,
|
||||
private publications: PublicationsService,
|
||||
private activatedRoute: ActivatedRoute,
|
||||
private router: Router,
|
||||
private publicationPipe: PublicationPipe )
|
||||
{
|
||||
private router: Router) {
|
||||
|
||||
this.item = new PublicationFolder();
|
||||
this.activatedRoute.paramMap.subscribe(params => {
|
||||
|
||||
@@ -140,12 +140,20 @@ export class ChatService {
|
||||
return this.http.get(environment.apiChatUrl+'users.info', opts);
|
||||
}
|
||||
|
||||
setUserStatus(body:any){
|
||||
let opts = {
|
||||
headers: this.headers,
|
||||
}
|
||||
return this.http.post(environment.apiChatUrl+'users.setStatus', body, this.options);
|
||||
}
|
||||
|
||||
removeChatRoom(body:any){
|
||||
let opts = {
|
||||
headers: this.headers,
|
||||
}
|
||||
return this.http.post(environment.apiChatUrl+'im.close', body, this.options);
|
||||
}
|
||||
|
||||
createRoom(body:any){
|
||||
return this.http.post(environment.apiChatUrl+'im.create', body, this.options);
|
||||
}
|
||||
@@ -164,6 +172,7 @@ export class ChatService {
|
||||
addGroup(body:any){
|
||||
return this.http.post(environment.apiChatUrl+'groups.create', body, this.options);
|
||||
}
|
||||
|
||||
getGroupMembers(roomId:string){
|
||||
let params = new HttpParams();
|
||||
let url=environment.apiChatUrl+'groups.members';
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
import { TestBed } from '@angular/core/testing';
|
||||
|
||||
import { FileLoaderService } from './file-loader.service';
|
||||
|
||||
describe('FileLoaderService', () => {
|
||||
let service: FileLoaderService;
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({});
|
||||
service = TestBed.inject(FileLoaderService);
|
||||
});
|
||||
|
||||
it('should be created', () => {
|
||||
expect(service).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,43 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { FileType } from 'src/app/models/fileType';
|
||||
|
||||
|
||||
interface createInput {
|
||||
type?: string
|
||||
accept: typeof FileType[]
|
||||
}
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class FileLoaderService {
|
||||
|
||||
nice : typeof FileType
|
||||
constructor() { }
|
||||
|
||||
|
||||
createInput(param:createInput): HTMLInputElement {
|
||||
|
||||
let input = document.createElement('input');
|
||||
input.type = param.type || 'file';
|
||||
input.accept = param.accept.join(', ')
|
||||
|
||||
|
||||
// input.onchange = () => {
|
||||
// // you can use this method to get file and perform respective operations
|
||||
// let files = Array.from(input.files);
|
||||
// console.log(files);
|
||||
// };
|
||||
|
||||
input.click();
|
||||
|
||||
return input
|
||||
|
||||
}
|
||||
|
||||
getFirstFile(input: HTMLInputElement) {
|
||||
let files = Array.from(input.files);
|
||||
return files[0]
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
import { TestBed } from '@angular/core/testing';
|
||||
|
||||
import { FileToBase64Service } from './file-to-base64.service';
|
||||
|
||||
describe('FileToBase64Service', () => {
|
||||
let service: FileToBase64Service;
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({});
|
||||
service = TestBed.inject(FileToBase64Service);
|
||||
});
|
||||
|
||||
it('should be created', () => {
|
||||
expect(service).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,19 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class FileToBase64Service {
|
||||
|
||||
constructor() { }
|
||||
|
||||
convert(file) {
|
||||
return new Promise((resolve, reject) => {
|
||||
const reader = new FileReader();
|
||||
reader.readAsDataURL(file);
|
||||
reader.onload = () => resolve(reader.result);
|
||||
reader.onerror = error => reject(error);
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
import { TestBed } from '@angular/core/testing';
|
||||
|
||||
import { PublicationService } from './publication.service';
|
||||
|
||||
describe('PublicationService', () => {
|
||||
let service: PublicationService;
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({});
|
||||
service = TestBed.inject(PublicationService);
|
||||
});
|
||||
|
||||
it('should be created', () => {
|
||||
expect(service).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,9 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class PublicationService {
|
||||
|
||||
constructor() { }
|
||||
}
|
||||
@@ -24,9 +24,14 @@ export class SynchroService {
|
||||
public conected = false
|
||||
private url: string = ''
|
||||
callback = function(){}
|
||||
private _connected = false;
|
||||
|
||||
constructor(){}
|
||||
|
||||
get connected() {
|
||||
return this._connected
|
||||
}
|
||||
|
||||
setUrl() {
|
||||
|
||||
let header ={
|
||||
@@ -61,6 +66,7 @@ export class SynchroService {
|
||||
document.body.style.setProperty(`--color4`, "#0782c9f0");
|
||||
document.body.style.setProperty(`--color5`, "#45BAFF");
|
||||
console.log('open ======================= welcome to socket server')
|
||||
this._connected = true
|
||||
|
||||
}
|
||||
|
||||
@@ -95,7 +101,9 @@ export class SynchroService {
|
||||
document.body.style.setProperty(`--color3`, "#ffb703");
|
||||
document.body.style.setProperty(`--color4`, "#ffb703");
|
||||
document.body.style.setProperty(`--color5`, "#ffb703");
|
||||
this._connected = false
|
||||
this.connect()
|
||||
|
||||
}
|
||||
}, 100);
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
<ion-label> Esta conversa passou a grupo</ion-label><br />
|
||||
<ion-label>A conversa original mantêm-se como chat individual</ion-label>
|
||||
</div>
|
||||
<div class="container-width-100" *ngFor="let msg of messages" #scrollMe>
|
||||
<div class="container-width-100" *ngFor="let msg of messages; let last = last" #scrollMe>
|
||||
<div *ngIf="msg.t != 'r'" class='incoming-{{msg.u.username!=loggedUser.me.username}} max-width-45'>
|
||||
<div class="title">
|
||||
<ion-label>{{msg.u.name}}</ion-label>
|
||||
@@ -46,6 +46,7 @@
|
||||
</div>
|
||||
<div>
|
||||
<ion-label>{{msg.msg}}</ion-label>
|
||||
{{last ? scrollToBottom() : ''}}
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="msg.t == 'r'" class="info-text">
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Component, OnChanges, OnInit, Input, SimpleChanges, Output, EventEmitter, ViewChild, ElementRef, AfterViewChecked} from '@angular/core';
|
||||
import { Component, OnChanges, OnInit, Input, SimpleChanges, Output, EventEmitter, ViewChild, ElementRef, AfterViewChecked, AfterViewInit, OnDestroy} from '@angular/core';
|
||||
import { ActionSheetController, AnimationController, MenuController, ModalController, PopoverController } from '@ionic/angular';
|
||||
import { AlertService } from 'src/app/services/alert.service';
|
||||
import { AuthService } from 'src/app/services/auth.service';
|
||||
@@ -16,7 +16,7 @@ import { ChatOptionsFeaturesPage } from 'src/app/modals/chat-options-features/ch
|
||||
templateUrl: './group-messages.page.html',
|
||||
styleUrls: ['./group-messages.page.scss'],
|
||||
})
|
||||
export class GroupMessagesPage implements OnInit, OnChanges, AfterViewChecked {
|
||||
export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy {
|
||||
showLoader: boolean;
|
||||
isGroupCreated:boolean;
|
||||
loggedUser: any;
|
||||
@@ -30,6 +30,11 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewChecked {
|
||||
members:any;
|
||||
|
||||
loggedUserChat:any;
|
||||
scrollingOnce:boolean = true;
|
||||
private scrollChangeCallback: () => void;
|
||||
currentPosition: any;
|
||||
startPosition: number;
|
||||
|
||||
@Input() roomId:string;
|
||||
@Output() closeAllDesktopComponents:EventEmitter<any> = new EventEmitter<any>();
|
||||
@Output() showEmptyContainer:EventEmitter<any> = new EventEmitter<any>();
|
||||
@@ -54,8 +59,8 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewChecked {
|
||||
this.isGroupCreated = true;
|
||||
}
|
||||
ngOnChanges(changes: SimpleChanges): void {
|
||||
this.getRoomInfo();
|
||||
this.scrollToBottom();
|
||||
//this.getRoomInfo();
|
||||
//this.scrollToBottom();
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
@@ -63,18 +68,49 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewChecked {
|
||||
this.getRoomInfo();
|
||||
this.serverLongPull();
|
||||
console.log(this.roomId);
|
||||
this.setStatus('online');
|
||||
}
|
||||
|
||||
ngAfterViewChecked() {
|
||||
//this.scrollToBottom();
|
||||
setStatus(status:string){
|
||||
let body = {
|
||||
message: '',
|
||||
status: status,
|
||||
}
|
||||
this.chatService.setUserStatus(body).subscribe(res => {
|
||||
console.log(res);
|
||||
})
|
||||
}
|
||||
|
||||
scrollToBottom(): void {
|
||||
try {
|
||||
this.myScrollContainer.nativeElement.scrollTop = this.myScrollContainer.nativeElement.scrollHeight;
|
||||
if(this.scrollingOnce){
|
||||
this.myScrollContainer.nativeElement.scrollTop = this.myScrollContainer.nativeElement.scrollHeight;
|
||||
}
|
||||
} catch(err) { }
|
||||
finally {
|
||||
}
|
||||
|
||||
ngAfterViewInit() {
|
||||
this.scrollChangeCallback = () => this.onContentScrolled(event);
|
||||
window.addEventListener('scroll', this.scrollChangeCallback, true);
|
||||
}
|
||||
|
||||
onContentScrolled(e) {
|
||||
this.startPosition = e.srcElement.scrollTop;
|
||||
let scroll = e.srcElement.scrollTop;
|
||||
if (scroll > this.currentPosition) {
|
||||
//this.showButton = false;
|
||||
//alert('BOTTOM');
|
||||
} else {
|
||||
//this.showButton = true;
|
||||
//alert('UP');
|
||||
this.scrollingOnce = false;
|
||||
}
|
||||
this.currentPosition = scroll;
|
||||
}
|
||||
|
||||
ngOnDestroy() {
|
||||
this.setStatus('away');
|
||||
window.removeEventListener('scroll', this.scrollChangeCallback, true);
|
||||
}
|
||||
|
||||
openGroupContactsPage(){
|
||||
@@ -101,9 +137,9 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewChecked {
|
||||
get watch(){
|
||||
this.getRoomInfo();
|
||||
console.log('here watching');
|
||||
|
||||
return this.roomId;
|
||||
}
|
||||
|
||||
getRoomInfo(){
|
||||
this.showLoader = true;
|
||||
this.chatService.getRoomInfo(this.roomId).subscribe(room=>{
|
||||
@@ -112,7 +148,7 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewChecked {
|
||||
this.roomName = this.room.name.split('-').join(' ');
|
||||
}
|
||||
this.getGroupContacts(this.room);
|
||||
this.loadGroupMessages(this.room);
|
||||
//this.loadGroupMessages(this.room);
|
||||
this.showLoader = false;
|
||||
});
|
||||
}
|
||||
@@ -136,13 +172,14 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewChecked {
|
||||
});
|
||||
}
|
||||
}
|
||||
loadGroupMessages(room:any){
|
||||
console.log('here'+room.t);
|
||||
|
||||
loadGroupMessages(roomId){
|
||||
//console.log('here'+room.t);
|
||||
|
||||
this.showLoader = true;
|
||||
//If group is private call getGroupMembers
|
||||
if(room.t === 'p'){
|
||||
console.log('private');
|
||||
/* if(room.t === 'p'){
|
||||
console.log('private'); */
|
||||
|
||||
this.chatService.getPrivateGroupMessages(this.roomId).subscribe(res=>{
|
||||
console.log(res);
|
||||
@@ -152,15 +189,16 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewChecked {
|
||||
|
||||
this.showLoader = false;
|
||||
});
|
||||
}
|
||||
/* } */
|
||||
//Otherwise call getChannelMembers for públic groups
|
||||
else{
|
||||
/* else{
|
||||
this.chatService.getPublicGroupMessages(this.roomId).subscribe(res=>{
|
||||
console.log(res);
|
||||
this.messages = res['messages'].reverse();
|
||||
});
|
||||
}
|
||||
} */
|
||||
}
|
||||
|
||||
sendMessage(){
|
||||
|
||||
let body = {
|
||||
@@ -172,7 +210,8 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewChecked {
|
||||
|
||||
this.chatService.sendMessage(body).subscribe(res=> {
|
||||
/* this.loadGroupMessages(); */
|
||||
this.getRoomInfo();
|
||||
//this.getRoomInfo();
|
||||
this.scrollingOnce = true;
|
||||
});
|
||||
this.message = "";
|
||||
}
|
||||
@@ -244,7 +283,8 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewChecked {
|
||||
this.roomName = res.data.name.split('-').join(' ');
|
||||
console.log(this.roomName);
|
||||
|
||||
this.getRoomInfo();
|
||||
//this.getRoomInfo();
|
||||
this.loadGroupMessages(this.roomId);
|
||||
//this.modalController.dismiss();
|
||||
};
|
||||
|
||||
@@ -277,7 +317,8 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewChecked {
|
||||
popover.onDidDismiss().then(res=>{
|
||||
console.log(res);
|
||||
if(res.data){
|
||||
this.getRoomInfo();
|
||||
this.loadGroupMessages(this.roomId);
|
||||
//this.getRoomInfo();
|
||||
//this.modalController.dismiss();
|
||||
};
|
||||
|
||||
@@ -314,7 +355,8 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewChecked {
|
||||
await modal.present();
|
||||
|
||||
modal.onDidDismiss().then(()=>{
|
||||
this.getRoomInfo();
|
||||
//this.getRoomInfo();
|
||||
this.loadGroupMessages(this.roomId)
|
||||
});
|
||||
}
|
||||
|
||||
@@ -407,7 +449,8 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewChecked {
|
||||
// Show Error
|
||||
//showMessage(response.statusText);
|
||||
//this.loadMessages()
|
||||
this.messages = res['messages'].filter(data => data.t != 'au');
|
||||
let msgOnly = res['messages'].filter(data => data.t != 'au');
|
||||
this.messages = msgOnly.reverse();
|
||||
console.log(this.messages);
|
||||
// Reconnect in one second
|
||||
if(this.route.url != "/home/chat"){
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
</ion-refresher-content>
|
||||
</ion-refresher>
|
||||
<div class="messages" #scrollMe>
|
||||
<div class="container-width-100" *ngFor="let msg of messages">
|
||||
<div class="container-width-100" *ngFor="let msg of messages; let last = last">
|
||||
<div class='incoming-{{msg.u.username!=loggedUser.me.username}} max-width-45'>
|
||||
<div class="title">
|
||||
<ion-label>{{msg.u.name}}</ion-label>
|
||||
@@ -39,6 +39,7 @@
|
||||
</div>
|
||||
<div>
|
||||
<ion-label>{{msg.msg}}</ion-label>
|
||||
{{last ? scrollToBottom() : ''}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { AfterViewChecked, Component, ElementRef, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChanges, ViewChild } from '@angular/core';
|
||||
import { AfterViewChecked, AfterViewInit, Component, ElementRef, EventEmitter, Input, OnChanges, OnDestroy, OnInit, Output, SimpleChanges, ViewChild } from '@angular/core';
|
||||
import { AnimationController, ModalController, PopoverController } from '@ionic/angular';
|
||||
import { AlertService } from 'src/app/services/alert.service';
|
||||
import { AuthService } from 'src/app/services/auth.service';
|
||||
@@ -16,7 +16,7 @@ import { ChatOptionsFeaturesPage } from 'src/app/modals/chat-options-features/ch
|
||||
templateUrl: './messages.page.html',
|
||||
styleUrls: ['./messages.page.scss'],
|
||||
})
|
||||
export class MessagesPage implements OnInit, AfterViewChecked, OnChanges {
|
||||
export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy {
|
||||
showLoader: boolean;
|
||||
|
||||
@ViewChild('scrollMe') private myScrollContainer: ElementRef;
|
||||
@@ -37,7 +37,11 @@ export class MessagesPage implements OnInit, AfterViewChecked, OnChanges {
|
||||
@Output() openNewEventPage:EventEmitter<any> = new EventEmitter<any>();
|
||||
|
||||
|
||||
connection = connection
|
||||
connection = connection;
|
||||
scrollingOnce:boolean = true;
|
||||
private scrollChangeCallback: () => void;
|
||||
currentPosition: any;
|
||||
startPosition: number;
|
||||
|
||||
constructor(
|
||||
public popoverController: PopoverController,
|
||||
@@ -70,11 +74,17 @@ export class MessagesPage implements OnInit, AfterViewChecked, OnChanges {
|
||||
console.log(this.roomId);
|
||||
console.log("Chat route", this.route.url)
|
||||
|
||||
this.setStatus('online');
|
||||
}
|
||||
|
||||
ngOnDestroy(){
|
||||
this.checktimeOut = false;
|
||||
console.log('On Destroy')
|
||||
setStatus(status:string){
|
||||
let body = {
|
||||
message: '',
|
||||
status: status,
|
||||
}
|
||||
this.chatService.setUserStatus(body).subscribe(res => {
|
||||
console.log(res);
|
||||
})
|
||||
}
|
||||
|
||||
notImplemented(){
|
||||
@@ -93,16 +103,38 @@ export class MessagesPage implements OnInit, AfterViewChecked, OnChanges {
|
||||
ev.target.complete();
|
||||
}
|
||||
|
||||
ngAfterViewChecked() {
|
||||
//this.scrollToBottom();
|
||||
}
|
||||
|
||||
scrollToBottom(): void {
|
||||
try {
|
||||
this.myScrollContainer.nativeElement.scrollTop = this.myScrollContainer.nativeElement.scrollHeight;
|
||||
if(this.scrollingOnce){
|
||||
this.myScrollContainer.nativeElement.scrollTop = this.myScrollContainer.nativeElement.scrollHeight;
|
||||
//this.scrollingOnce = false;
|
||||
}
|
||||
} catch(err) { }
|
||||
finally {
|
||||
}
|
||||
|
||||
ngAfterViewInit() {
|
||||
this.scrollChangeCallback = () => this.onContentScrolled(event);
|
||||
window.addEventListener('scroll', this.scrollChangeCallback, true);
|
||||
}
|
||||
|
||||
onContentScrolled(e) {
|
||||
this.startPosition = e.srcElement.scrollTop;
|
||||
let scroll = e.srcElement.scrollTop;
|
||||
if (scroll > this.currentPosition) {
|
||||
//this.showButton = false;
|
||||
//alert('BOTTOM');
|
||||
} else {
|
||||
//this.showButton = true;
|
||||
//alert('UP');
|
||||
this.scrollingOnce = false;
|
||||
}
|
||||
this.currentPosition = scroll;
|
||||
}
|
||||
|
||||
ngOnDestroy() {
|
||||
this.checktimeOut = false;
|
||||
this.setStatus('away');
|
||||
window.removeEventListener('scroll', this.scrollChangeCallback, true);
|
||||
}
|
||||
|
||||
openBookMeetingComponent(){
|
||||
@@ -125,6 +157,7 @@ export class MessagesPage implements OnInit, AfterViewChecked, OnChanges {
|
||||
}
|
||||
|
||||
this.chatService.sendMessage(body).subscribe(res=> {
|
||||
this.scrollingOnce = true;
|
||||
});
|
||||
this.message = "";
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<button (click)="openAddNoteModal('Executado')" class="btn-cancel" shape="round" >Executado</button>
|
||||
<button (click)="openDelegarModal(task)" class="btn-cancel" shape="round" >Delegar</button>
|
||||
<div class="solid"></div>
|
||||
<button (click)="openTaskProcessModal('0',fulltask)" class="btn-ok" shape="round" >Efetuar Despacho</button>
|
||||
<button (click)="openTaskProcessModal('0',fulltask)" class="btn-cancel" shape="round" >Efetuar Despacho</button>
|
||||
<button (click)="openTaskProcessModal('1',fulltask)" class="btn-cancel" shape="round" >Solicitar Parecer</button>
|
||||
<button (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button>
|
||||
<div class="solid"></div>
|
||||
@@ -19,7 +19,7 @@
|
||||
<button (click)="openAddNoteModal('Executado')" class="btn-cancel" shape="round" >Executado</button>
|
||||
<button (click)="openDelegarModal(task)" *ngIf="task.Status != 'Pending'" class="btn-cancel" shape="round" >Delegar</button>
|
||||
<div class="solid"></div>
|
||||
<button (click)="openTaskProcessModal('0',fulltask)" class="btn-ok" shape="round" >Efetuar Despacho</button>
|
||||
<button (click)="openTaskProcessModal('0',fulltask)" class="btn-cancel" shape="round" >Efetuar Despacho</button>
|
||||
<button (click)="openTaskProcessModal('1',fulltask)" class="btn-cancel" shape="round" >Solicitar Parecer</button>
|
||||
<button (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button>
|
||||
<div class="solid"></div>
|
||||
@@ -28,7 +28,7 @@
|
||||
<div class="buttons" *ngIf="task.activityInstanceName == 'Concluir Despacho'">
|
||||
<button (click)="openAddNoteModal('Arquivar')" class="btn-cancel" shape="round" >Arquivar</button>
|
||||
<div class="solid"></div>
|
||||
<button (click)="openTaskProcessModal('0',fulltask)" class="btn-ok" shape="round" >Efetuar Despacho</button>
|
||||
<button (click)="openTaskProcessModal('0',fulltask)" class="btn-cancel" shape="round" >Efetuar Despacho</button>
|
||||
<button (click)="openTaskProcessModal('1',fulltask)" class="btn-cancel" shape="round" >Solicitar Parecer</button>
|
||||
<button (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button>
|
||||
<div class="solid"></div>
|
||||
|
||||
@@ -62,7 +62,7 @@ export class DespachosOptionsPage implements OnInit {
|
||||
cssClass: classs,
|
||||
});
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then(res=>{
|
||||
modal.onDidDismiss().then( res => {
|
||||
this.goBack();
|
||||
});
|
||||
}
|
||||
@@ -70,6 +70,7 @@ export class DespachosOptionsPage implements OnInit {
|
||||
sendExpedienteToPending(){
|
||||
this.popoverController.dismiss();
|
||||
this.processes.SetTaskToPending(this.task.SerialNumber).subscribe(res=>{
|
||||
this.toastService.successMessage()
|
||||
console.log(res);
|
||||
this.close();
|
||||
},()=>{
|
||||
|
||||
@@ -13,13 +13,13 @@
|
||||
<button class="btn-cancel desk" shape="round"> Reencaminhar para Área jurídica </button>
|
||||
<button (click)="openAddNoteModal('Gerar Diploma')" class="btn-cancel" shape="round" >Gerar Diploma</button>
|
||||
<button class="btn-cancel desk" shape="round"> Outras opções </button>
|
||||
<button (click)="openExpedientActionsModal('0',fulltask)" class="btn-ok" shape="round" >Efetuar Despacho</button>
|
||||
<button (click)="openExpedientActionsModal('0',fulltask)" class="btn-cancel" shape="round" >Efetuar Despacho</button>
|
||||
</div>
|
||||
<div class="flex-grow-1 width-50 pl-10">
|
||||
<button (click)="openExpedientActionsModal('1',fulltask)" class="btn-cancel" shape="round" >Solicitar Parecer</button>
|
||||
<button (click)="openExpedientActionsModal('2',fulltask)" class="btn-cancel" shape="round" >Pedido de Deferimento</button>
|
||||
<button (click)="openDelegarModal(task)" class="btn-cancel" shape="round" >Delegar</button>
|
||||
<button (click)="sendExpedienteToPending()" *ngIf="task.Status != 'Pending'" full class="btn-ok" shape="round" >Enviar para pendentes</button>
|
||||
<button (click)="sendExpedienteToPending()" *ngIf="task.Status != 'Pending'" full class="btn-cancel" shape="round" >Enviar para pendentes</button>
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="task && p.userRole(['PR'])" class="d-flex width-100">
|
||||
|
||||
@@ -97,7 +97,8 @@ export class DespachosPrOptionsPage implements OnInit {
|
||||
sendExpedienteToPending() {
|
||||
this.processes.SetTaskToPending(this.serialNumber).subscribe(res=>{
|
||||
console.log(res);
|
||||
this.close();
|
||||
this.toastService.successMessage()
|
||||
this.popoverController.dismiss('close')
|
||||
},()=>{
|
||||
|
||||
this.toastService.badRequest('Processo não encontrado')
|
||||
|
||||
@@ -11,14 +11,14 @@
|
||||
<button (click)="openAddNoteModal('Aprovar')" class="btn-cancel" shape="round" >Aprovar</button>
|
||||
<button (click)="openAddNoteModal('Revisão')" class="btn-cancel" shape="round" >Mandar para Revisão</button>
|
||||
<div class="solid"></div>
|
||||
<button (click)="distartExpedientModal('descartar')" full class="btn-ok" shape="round" >Descartar</button>
|
||||
<button (click)="distartExpedientModal('descartar')" full class="btn-cancel" shape="round" >Descartar</button>
|
||||
<div hidden class="solid"></div>
|
||||
<button hidden class="btn-cancel" shape="round" >Delegar</button>
|
||||
<button (click)="attachDocument()" class="btn-cancel" shape="round" >Anexar Documento</button>
|
||||
</div>
|
||||
<div *ngIf="loggeduser.Profile =='PR' " class="buttons">
|
||||
<button (click)="openExpedientActionsModal('0', fulltask)" class="btn-ok" shape="round" >Efetuar Despacho</button>
|
||||
<button (click)="distartExpedientModal('descartar')" full class="btn-ok" shape="round" >Descartar</button>
|
||||
<button (click)="openExpedientActionsModal('0', fulltask)" class="btn-cancel" shape="round" >Efetuar Despacho</button>
|
||||
<button (click)="distartExpedientModal('descartar')" full class="btn-cancel" shape="round" >Descartar</button>
|
||||
<div class="solid"></div>
|
||||
<button (click)="openExpedientActionsModal('1',fulltask)" class="btn-cancel" shape="round" >Solicitar Parecer</button>
|
||||
<button (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button>
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<button class="btn-cancel desk" shape="round"> Solicitar revisão </button>
|
||||
<button (click)="openAddNoteModal('Revisão')" class="btn-cancel" shape="round" >Mandar para Revisão</button>
|
||||
<button class="btn-cancel desk" shape="round">Outras opções </button>
|
||||
<button (click)="openExpedientActionsModal('0',fulltask)" class="btn-ok" shape="round" >Efetuar Despacho</button>
|
||||
<button (click)="openExpedientActionsModal('0',fulltask)" class="btn-cancel" shape="round" >Efetuar Despacho</button>
|
||||
</div>
|
||||
<div class="flex-grow-1">
|
||||
<button (click)="openExpedientActionsModal('1',fulltask)" class="btn-cancel" shape="round" >Solicitar Parecer</button>
|
||||
@@ -20,12 +20,12 @@
|
||||
<button (click)="openBookMeetingModal()" class="btn-cancel" shape="round" >Marcar Reunião</button>
|
||||
<button *ngIf="!p.userRole(['PR'])" (click)="attachDocument()" class="btn-cancel" shape="round" >Anexar Documentos</button>
|
||||
<button (click)="distartExpedientModal('descartar')" class="btn-cancel" shape="round" >Descartar</button>
|
||||
<button (click)="sendExpedienteToPending()" *ngIf="task.Status != 'Pending'" full class="btn-ok" shape="round" >Enviar para pendentes</button>
|
||||
<button (click)="sendExpedienteToPending()" *ngIf="task.Status != 'Pending'" full class="btn-cancel" shape="round" >Enviar para pendentes</button>
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="task && p.userRole(['PR'])" class="d-flex width-100">
|
||||
<div class="flex-grow-1">
|
||||
<button (click)="openExpedientActionsModal('0', fulltask)" class="btn-ok" shape="round" >Efetuar Despacho</button>
|
||||
<button (click)="openExpedientActionsModal('0', fulltask)" class="btn-cancel" shape="round" >Efetuar Despacho</button>
|
||||
<button (click)="distartExpedientModal('descartar')" class="btn-cancel" shape="round" >Descartar</button>
|
||||
<div class="solid"></div>
|
||||
<button (click)="openExpedientActionsModal('1',fulltask)" class="btn-cancel" shape="round" >Solicitar Parecer</button>
|
||||
|
||||
@@ -10,8 +10,8 @@
|
||||
<button (click)="openAddNoteModal('Arquivar')" class="btn-cancel" shape="round" >Arquivar</button>
|
||||
<button (click)="openDelegarModal(task)" class="btn-cancel" shape="round" >Delegar</button>
|
||||
<div class="solid"></div>
|
||||
<button *ngIf="!p.userRole(['PR'])" (click)="openExpedientActionsModal('0',fulltask)" class="btn-ok" shape="round" >Efetuar Despacho</button>
|
||||
<button *ngIf="p.userRole(['PR'])" (click)="openExpedientActionsModal('0',fulltask)" class="btn-ok" shape="round" >Efetuar Despacho</button>
|
||||
<button *ngIf="!p.userRole(['PR'])" (click)="openExpedientActionsModal('0',fulltask)" class="btn-cancel" shape="round" >Efetuar Despacho</button>
|
||||
<button *ngIf="p.userRole(['PR'])" (click)="openExpedientActionsModal('0',fulltask)" class="btn-cancel" shape="round" >Efetuar Despacho</button>
|
||||
<button (click)="openExpedientActionsModal('2',fulltask)" class="btn-cancel" shape="round" >Pedido de Deferimento</button>
|
||||
<button (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button>
|
||||
<button (click)="sendExpedienteToPending()" *ngIf="task.Status != 'Pending'" class="btn-cancel" shape="round" >Enviar para Pendentes</button>
|
||||
@@ -20,8 +20,8 @@
|
||||
<button (click)="openAddNoteModal('Arquivar')" class="btn-cancel" shape="round" >Arquivar</button>
|
||||
<button (click)="openDelegarModal(task)" class="btn-cancel" shape="round" >Delegar</button>
|
||||
<div class="solid"></div>
|
||||
<button *ngIf="!p.userRole(['PR'])" (click)="openExpedientActionsModal('0',fulltask)" class="btn-ok" shape="round" >Efetuar Despacho</button>
|
||||
<button *ngIf="p.userRole(['PR'])" (click)="openExpedientActionsModal('0',fulltask)" class="btn-ok" shape="round" >Efetuar Despacho</button>
|
||||
<button *ngIf="!p.userRole(['PR'])" (click)="openExpedientActionsModal('0',fulltask)" class="btn-cancel" shape="round" >Efetuar Despacho</button>
|
||||
<button *ngIf="p.userRole(['PR'])" (click)="openExpedientActionsModal('0',fulltask)" class="btn-cancel" shape="round" >Efetuar Despacho</button>
|
||||
<button (click)="openExpedientActionsModal('2',fulltask)" class="btn-cancel" shape="round" >Pedido de Deferimento</button>
|
||||
<button (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button>
|
||||
<button (click)="sendExpedienteToPending()" *ngIf="task.Status != 'Pending'" class="btn-cancel" shape="round" >Enviar para Pendentes</button>
|
||||
@@ -30,8 +30,8 @@
|
||||
<button (click)="openAddNoteModal('Arquivar')" class="btn-cancel" shape="round" >Arquivar</button>
|
||||
<button (click)="openDelegarModal(task)" class="btn-cancel" shape="round" >Delegar</button>
|
||||
<div class="solid"></div>
|
||||
<button *ngIf="!p.userRole(['PR'])" (click)="openExpedientActionsModal('0',fulltask)" class="btn-ok" shape="round" >Efetuar Despacho</button>
|
||||
<button *ngIf="p.userRole(['PR'])" (click)="openExpedientActionsModal('0',fulltask)" class="btn-ok" shape="round" >Efetuar Despacho</button>
|
||||
<button *ngIf="!p.userRole(['PR'])" (click)="openExpedientActionsModal('0',fulltask)" class="btn-cancel" shape="round" >Efetuar Despacho</button>
|
||||
<button *ngIf="p.userRole(['PR'])" (click)="openExpedientActionsModal('0',fulltask)" class="btn-cancel" shape="round" >Efetuar Despacho</button>
|
||||
<!-- <button (click)="openExpedientActionsModal('1',fulltask)" class="btn-cancel" shape="round" >Solicitar Parecer</button> -->
|
||||
<button (click)="openAddNoteModal('Solicitar Reapreciação')" class="btn-cancel" shape="round" >Solicitar Reapreciação</button>
|
||||
<button (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button>
|
||||
@@ -48,8 +48,8 @@
|
||||
</div>
|
||||
<div class="buttons" *ngIf="task.activityInstanceName == 'Concluir Parecer'">
|
||||
<button (click)="openAddNoteModal('Arquivar')" class="btn-cancel" shape="round" >Arquivar</button>
|
||||
<button *ngIf="!p.userRole(['PR'])" (click)="openExpedientActionsModal('0',fulltask)" class="btn-ok" shape="round" >Efetuar Despacho</button>
|
||||
<button *ngIf="p.userRole(['PR'])" (click)="openExpedientActionsModal('0',fulltask)" class="btn-ok" shape="round" >Efetuar Despacho</button>
|
||||
<button *ngIf="!p.userRole(['PR'])" (click)="openExpedientActionsModal('0',fulltask)" class="btn-cancel" shape="round" >Efetuar Despacho</button>
|
||||
<button *ngIf="p.userRole(['PR'])" (click)="openExpedientActionsModal('0',fulltask)" class="btn-cancel" shape="round" >Efetuar Despacho</button>
|
||||
<button (click)="openExpedientActionsModal('1',fulltask)" class="btn-cancel" shape="round" >Solicitar Parecer</button>
|
||||
<button (click)="openExpedientActionsModal('2',fulltask)" class="btn-cancel" shape="round" >Pedido de Deferimento</button>
|
||||
<button (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button>
|
||||
|
||||
@@ -31,7 +31,6 @@ export class RequestOptionsPage implements OnInit {
|
||||
private navParams: NavParams,
|
||||
private processes: ProcessesService,
|
||||
private activatedRoute: ActivatedRoute,
|
||||
private animationController: AnimationController,
|
||||
private toastService: ToastService,
|
||||
private router: Router,
|
||||
public p: PermissionService,
|
||||
@@ -78,6 +77,7 @@ export class RequestOptionsPage implements OnInit {
|
||||
sendExpedienteToPending() {
|
||||
this.processes.SetTaskToPending(this.task.SerialNumber).subscribe(res=>{
|
||||
console.log(res);
|
||||
this.toastService.successMessage()
|
||||
this.close();
|
||||
},()=>{
|
||||
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
<ion-content class="container width-100 ">
|
||||
<div class="buttons">
|
||||
<button *ngIf="p.userRole(['PR'])" (click)="openExpedientActionsModal('0')" class="btn-ok" shape="round" >Efetuar Despacho</button>
|
||||
<button *ngIf="!p.userRole(['PR'])" (click)="openExpedientActionsModal('0')" class="btn-ok" shape="round" >Efetuar Despacho</button>
|
||||
<button *ngIf="p.userRole(['PR'])" (click)="openExpedientActionsModal('0')" class="btn-cancel" shape="round" >Efetuar Despacho</button>
|
||||
<button *ngIf="!p.userRole(['PR'])" (click)="openExpedientActionsModal('0')" class="btn-cancel" shape="round" >Efetuar Despacho</button>
|
||||
<div class="solid"></div>
|
||||
<button (click)="openExpedientActionsModal('0')" class="btn-cancel" shape="round" >Solicitar Parecer</button>
|
||||
<button *ngIf="!p.userRole(['PR'])" (click)="openExpedientActionsModal('2')" class="btn-cancel" shape="round" >Pedido de Deferimento</button>
|
||||
|
||||
@@ -31,13 +31,12 @@
|
||||
</div>
|
||||
<div class="ion-input-class flex-grow-1">
|
||||
<ion-datetime
|
||||
class="d-block d-md-none"
|
||||
class="d-block d-md-none"
|
||||
[(ngModel)]="folder.DateBegin"
|
||||
placeholder="Início"
|
||||
displayFormat="D MMM YYYY H:mm"
|
||||
minuteValues="0,15,30,45"
|
||||
monthShortNames="Jan, Fev, Mar, Abr, Mai, Jun, Jul, Aug, Sep, Out, Nov, Dez"
|
||||
min="{{minDate}}"
|
||||
max="2025">
|
||||
</ion-datetime>
|
||||
|
||||
@@ -46,7 +45,6 @@
|
||||
<input matInput [ngxMatDatetimePicker]="picker1"
|
||||
placeholder="Choose a date*"
|
||||
[(ngModel)]="folder.DateBegin"
|
||||
[min]="minDate"
|
||||
[disabled]="disabled"
|
||||
>
|
||||
<mat-datepicker-toggle id="new-inicio" matSuffix [for]="picker1"></mat-datepicker-toggle>
|
||||
@@ -76,7 +74,6 @@
|
||||
displayFormat="D MMM YYYY H:mm"
|
||||
minuteValues="0,15,30,45"
|
||||
monthShortNames="Jan, Fev, Mar, Abr, Mai, Jun, Jul, Aug, Sep, Out, Nov, Dez"
|
||||
min="{{minDate}}"
|
||||
max="2025">
|
||||
</ion-datetime>
|
||||
|
||||
@@ -84,7 +81,6 @@
|
||||
<input matInput [ngxMatDatetimePicker]="picker2"
|
||||
placeholder="Choose a date*"
|
||||
[(ngModel)]="folder.DateEnd"
|
||||
[min]="minDate"
|
||||
[disabled]="disabled"
|
||||
>
|
||||
<mat-datepicker-toggle id="new-inicio" matSuffix [for]="picker2"></mat-datepicker-toggle>
|
||||
|
||||
@@ -24,8 +24,6 @@ export class NewActionPage implements OnInit {
|
||||
public showSeconds = false;
|
||||
public touchUi = false;
|
||||
public enableMeridian = false;
|
||||
public minDate = new Date().toISOString().slice(0,10)
|
||||
public maxDate: any;
|
||||
public stepHour = 1;
|
||||
public stepMinute = 5;
|
||||
public stepSecond = 5;
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<ion-icon class="font-35" (click)="goBack()" slot="end" src='assets/images/icons-arrow-arrow-left.svg'></ion-icon>
|
||||
</div> -->
|
||||
<div class="div-title">
|
||||
<ion-label class="title">{{publicationTitle}}</ion-label>
|
||||
<ion-label class="title">{{ publicationTitle }}</ion-label>
|
||||
</div>
|
||||
</div>
|
||||
</ion-header>
|
||||
@@ -16,7 +16,7 @@
|
||||
<ion-input [(ngModel)]="pub.Title" name="title" placeholder="Título" ></ion-input>
|
||||
</div>
|
||||
|
||||
<div *ngIf="publicationType!='1'" class="container-div pb-20">
|
||||
<div *ngIf="publicationType!='1' " class="container-div pb-20">
|
||||
<div class="ion-item-class-2 d-flex">
|
||||
<div class="ion-icon-class" >
|
||||
<ion-icon slot="start" src="assets/images/icons-description.svg"></ion-icon>
|
||||
@@ -29,7 +29,7 @@
|
||||
|
||||
<div class="container-title py-10 hide-desktop">Fotografia Anexada</div>
|
||||
|
||||
<div class="picture d-flex pb-5 hide-desktop" *ngIf="publication.FileBase64">
|
||||
<div class="picture d-flex pb-5 hide-desktop" *ngIf="publication.FileBase64 && capturedImage ==''">
|
||||
<div class="post-img">
|
||||
<img src="{{publication.FileBase64}}" alt="image" >
|
||||
</div>
|
||||
@@ -43,26 +43,32 @@
|
||||
|
||||
</div>
|
||||
|
||||
<!-- <div *ngIf="capturedImage != ''" class="ion-item-container-no-border hide-desktop">
|
||||
<div class="ion-item-container-no-border">
|
||||
<ion-label (click)="laodPicture()">
|
||||
<div class="attach-icon">
|
||||
<ion-icon src="assets/images/icons-add-photos.svg"></ion-icon>
|
||||
</div>
|
||||
<div class="attach-document">
|
||||
<ion-label>Anexar Fotografia</ion-label>
|
||||
</div>
|
||||
</ion-label>
|
||||
</div>
|
||||
|
||||
<div *ngIf="capturedImage != ''" class="ion-item-container-no-border">
|
||||
<ion-label class="attached-title">Fotografia Anexada</ion-label>
|
||||
<ion-item lines="none">
|
||||
<ion-thumbnail slot="start">
|
||||
<ion-img [(ngModel)]="capturedImage" name="image" ngDefaultControl [src]="'data:image/png;base64,'+capturedImage"></ion-img>
|
||||
</ion-thumbnail> -->
|
||||
<!-- <ion-thumbnail *ngIf="!publication" slot="start">
|
||||
<ion-img [(ngModel)]="publication.imageUrl" [src]="guestPicture"></ion-img>
|
||||
</ion-thumbnail> -->
|
||||
<!-- <ion-label>
|
||||
<ion-img [(ngModel)]="capturedImage" name="image" ngDefaultControl [src]="capturedImage"></ion-img>
|
||||
</ion-thumbnail>
|
||||
|
||||
<ion-label>
|
||||
<p>{{capturedImageTitle}}</p>
|
||||
<p hidden>size</p>
|
||||
</ion-label>
|
||||
<ion-icon (click)="clear()" name="close"></ion-icon>
|
||||
</ion-item> -->
|
||||
</ion-item>
|
||||
|
||||
<!-- <ion-thumbnail>
|
||||
<ion-img src="{{imgUrl}}"></ion-img>
|
||||
</ion-thumbnail> -->
|
||||
<!-- </div> -->
|
||||
</div>
|
||||
|
||||
<div class="ion-item-container-no-border hide-desktop">
|
||||
<ion-label (click)="takePicture()">
|
||||
|
||||
@@ -8,7 +8,8 @@ import { PhotoService } from 'src/app/services/photo.service';
|
||||
import { Camera, CameraOptions } from '@ionic-native/camera/ngx';
|
||||
import { ToastService } from 'src/app/services/toast.service';
|
||||
import { FormControl, FormGroup, Validators } from '@angular/forms';
|
||||
|
||||
import { FileLoaderService } from 'src/app/services/file/file-loader.service'
|
||||
import { FileToBase64Service } from 'src/app/services/file/file-to-base64.service';
|
||||
@Component({
|
||||
selector: 'app-new-publication',
|
||||
templateUrl: './new-publication.page.html',
|
||||
@@ -45,15 +46,15 @@ export class NewPublicationPage implements OnInit {
|
||||
capturedImageTitle:any;
|
||||
|
||||
constructor(
|
||||
private modalController: ModalController,
|
||||
public photoService: PhotoService,
|
||||
private publications: PublicationsService,
|
||||
private camera: Camera,
|
||||
private animationController: AnimationController,
|
||||
private toastService: ToastService,
|
||||
) {
|
||||
this.publicationTitle = 'Nova Publicação';
|
||||
}
|
||||
private fileLoaderService: FileLoaderService,
|
||||
private fileToBase64Service: FileToBase64Service
|
||||
) {
|
||||
this.publicationTitle = 'Nova Publicação';
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
if(this.publicationType == '3'){
|
||||
@@ -68,7 +69,7 @@ export class NewPublicationPage implements OnInit {
|
||||
this.showLoader = true;
|
||||
//console.log(this.publicationId);
|
||||
/* console.log(this.folderId); */
|
||||
this.publications.GetPublicationById(this.publicationId).subscribe(res=>{
|
||||
this.publications.GetPublicationById(this.publicationId).subscribe( res =>{
|
||||
//console.log(res);
|
||||
/* this.publication = res; */
|
||||
this.publication = {
|
||||
@@ -88,7 +89,7 @@ export class NewPublicationPage implements OnInit {
|
||||
}
|
||||
|
||||
|
||||
takePicture(){
|
||||
takePicture() {
|
||||
const options: CameraOptions = {
|
||||
quality: 90,
|
||||
destinationType: this.camera.DestinationType.DATA_URL,
|
||||
@@ -99,9 +100,7 @@ export class NewPublicationPage implements OnInit {
|
||||
}
|
||||
|
||||
this.camera.getPicture(options).then((imageData) => {
|
||||
// imageData is either a base64 encoded string or a file URI
|
||||
// If it's base64 (DATA_URL):
|
||||
let base64Image = 'data:image/jpeg;base64,' + imageData;
|
||||
|
||||
this.capturedImage = imageData;
|
||||
this.capturedImageTitle = new Date().getTime() + '.jpeg';
|
||||
}, (err) => {
|
||||
@@ -109,27 +108,20 @@ export class NewPublicationPage implements OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
getPicture(){
|
||||
const options: CameraOptions = {
|
||||
quality: 90,
|
||||
sourceType: this.camera.PictureSourceType.PHOTOLIBRARY,
|
||||
destinationType: this.camera.DestinationType.DATA_URL,
|
||||
encodingType: this.camera.EncodingType.JPEG,
|
||||
mediaType: this.camera.MediaType.PICTURE,
|
||||
targetWidth: 720,
|
||||
targetHeight: 720,
|
||||
}
|
||||
this.camera.getPicture(options).then((imageData) => {
|
||||
// imageData is either a base64 encoded string or a file URI
|
||||
// If it's base64 (DATA_URL):
|
||||
let base64Image = 'data:image/jpeg;base64,' + imageData;
|
||||
this.capturedImage = imageData;
|
||||
this.capturedImageTitle = new Date().getTime() + '.jpeg';
|
||||
}, (err) => {
|
||||
console.log(err);
|
||||
});
|
||||
}
|
||||
laodPicture() {
|
||||
const input = this.fileLoaderService.createInput({
|
||||
accept: ['image/apng', 'image/jpeg', 'image/png']
|
||||
})
|
||||
|
||||
input.onchange = async () => {
|
||||
const file = this.fileLoaderService.getFirstFile(input)
|
||||
|
||||
const imageData = await this.fileToBase64Service.convert(file)
|
||||
this.capturedImage = imageData;
|
||||
this.capturedImageTitle = file.name
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
|
||||
runValidation() {
|
||||
@@ -190,7 +182,7 @@ export class NewPublicationPage implements OnInit {
|
||||
}
|
||||
|
||||
}
|
||||
else if (!this.publication.OriginalFileName) {
|
||||
else if (!this.publication.OriginalFileName) { //
|
||||
this.publication = {
|
||||
DateIndex: this.publication.DateIndex,
|
||||
DocumentId:this.publication.DocumentId,
|
||||
@@ -198,6 +190,7 @@ export class NewPublicationPage implements OnInit {
|
||||
Title: this.pub.Title,
|
||||
Message: this.pub.Message,
|
||||
DatePublication: this.publication.DatePublication,
|
||||
OriginalFileName: this.capturedImageTitle,
|
||||
// OriginalFileName: this.publication.OriginalFileName,
|
||||
// FileBase64: this.publication.FileBase64,
|
||||
// FileExtension: 'jpeg',
|
||||
@@ -278,6 +271,27 @@ export class NewPublicationPage implements OnInit {
|
||||
}
|
||||
}
|
||||
|
||||
getPicture() {
|
||||
const options: CameraOptions = {
|
||||
quality: 90,
|
||||
sourceType: this.camera.PictureSourceType.PHOTOLIBRARY,
|
||||
destinationType: this.camera.DestinationType.DATA_URL,
|
||||
encodingType: this.camera.EncodingType.JPEG,
|
||||
mediaType: this.camera.MediaType.PICTURE,
|
||||
targetWidth: 720,
|
||||
targetHeight: 720,
|
||||
}
|
||||
|
||||
this.camera.getPicture(options).then((imageData) => {
|
||||
// imageData is either a base64 encoded string or a file URI
|
||||
// If it's base64 (DATA_URL):
|
||||
let base64Image = 'data:image/jpeg;base64,' + imageData;
|
||||
this.capturedImage = imageData;
|
||||
this.capturedImageTitle = new Date().getTime() + '.jpeg';
|
||||
}, (err) => {
|
||||
/* console.log(err); */
|
||||
});
|
||||
}
|
||||
|
||||
close(){
|
||||
this.goBack();
|
||||
@@ -286,10 +300,10 @@ export class NewPublicationPage implements OnInit {
|
||||
this.capturedImage = '';
|
||||
}
|
||||
setTitle(){
|
||||
if(this.publicationType == '1'){
|
||||
if(this.publicationType == '1') {
|
||||
this.publicationTitle = 'Nova Publicação Rápida';
|
||||
}
|
||||
else if(this.publicationType == '2'){
|
||||
else if(this.publicationType == '2') {
|
||||
this.publicationTitle = 'Nova Publicação';
|
||||
}
|
||||
else if(this.publicationType == '3') {
|
||||
@@ -309,33 +323,4 @@ export class NewPublicationPage implements OnInit {
|
||||
|
||||
}
|
||||
|
||||
/* async openGallery() {
|
||||
const modal = await this.modalController.create({
|
||||
component: GalleryPage,
|
||||
componentProps:{
|
||||
},
|
||||
cssClass: 'new-publication',
|
||||
backdropDismiss: false
|
||||
});
|
||||
await modal.present();
|
||||
modal.onDidDismiss();
|
||||
} */
|
||||
|
||||
/* async takePicture(){
|
||||
const image = await Plugins.Camera.getPhoto({
|
||||
quality: 100,
|
||||
allowEditing: false,
|
||||
resultType: CameraResultType.DataUrl,
|
||||
source: CameraSource.Camera
|
||||
});
|
||||
console.log(image);
|
||||
|
||||
this.photo = this.sanitizer.bypassSecurityTrustResourceUrl(image && (image.dataUrl));
|
||||
} */
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -37,11 +37,12 @@ export class ViewPublicationsPage implements OnInit {
|
||||
publicationEventFolderStorage = PublicationEventFolderStorage
|
||||
publicationTravelFolderService = PublicationTravelFolderStore
|
||||
|
||||
publicationPipe = new PublicationPipe()
|
||||
|
||||
constructor(
|
||||
private loadingController: LoadingService,
|
||||
private modalController: ModalController,
|
||||
private publications: PublicationsService,
|
||||
private publicationPipe: PublicationPipe
|
||||
private publications: PublicationsService
|
||||
) {
|
||||
this.item = new PublicationFolder();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user