This commit is contained in:
tiago.kayaya
2021-08-23 16:40:45 +01:00
58 changed files with 502 additions and 237 deletions
+3 -3
View File
@@ -10584,9 +10584,9 @@
} }
}, },
"cordova-plugin-camera": { "cordova-plugin-camera": {
"version": "5.0.1", "version": "git+https://github.com/PieterVanPoyer/cordova-plugin-camera.git#3911ae8a5a7a21a7bef8c80acd7dc4bb65a2163a",
"resolved": "https://registry.npmjs.org/cordova-plugin-camera/-/cordova-plugin-camera-5.0.1.tgz", "from": "git+https://github.com/PieterVanPoyer/cordova-plugin-camera.git#bugfix/issue-665-save-instance-restore-bug",
"integrity": "sha512-9gXyZvI8u9KzsZuqmB8Yw+uheF+7f+usMAwvOMw7L7pqbykg+bm9US5zjhJbwit3A1cSblgZkpBafe5cFiMcTA==" "dev": true
}, },
"cordova-plugin-compat": { "cordova-plugin-compat": {
"version": "1.2.0", "version": "1.2.0",
+5 -5
View File
@@ -70,7 +70,6 @@
"build": "0.1.4", "build": "0.1.4",
"ci": "^2.1.1", "ci": "^2.1.1",
"cordova": "^10.0.0", "cordova": "^10.0.0",
"cordova-plugin-camera": "^5.0.1",
"cordova-plugin-filepath": "^1.5.8", "cordova-plugin-filepath": "^1.5.8",
"cordova-plugin-okhttp": "^2.0.0", "cordova-plugin-okhttp": "^2.0.0",
"cordova-res": "^0.15.3", "cordova-res": "^0.15.3",
@@ -125,6 +124,7 @@
"cordova-ios": "^6.2.0", "cordova-ios": "^6.2.0",
"cordova-plugin-androidx": "^3.0.0", "cordova-plugin-androidx": "^3.0.0",
"cordova-plugin-androidx-adapter": "^1.1.3", "cordova-plugin-androidx-adapter": "^1.1.3",
"cordova-plugin-camera": "git+https://github.com/PieterVanPoyer/cordova-plugin-camera.git#bugfix/issue-665-save-instance-restore-bug",
"cordova-plugin-compat": "^1.2.0", "cordova-plugin-compat": "^1.2.0",
"cordova-plugin-device": "^2.0.2", "cordova-plugin-device": "^2.0.2",
"cordova-plugin-dialogs": "^2.0.2", "cordova-plugin-dialogs": "^2.0.2",
@@ -165,9 +165,6 @@
"cordova-plugin-splashscreen": {}, "cordova-plugin-splashscreen": {},
"cordova-plugin-ionic-keyboard": {}, "cordova-plugin-ionic-keyboard": {},
"cordova-plugin-inappbrowser": {}, "cordova-plugin-inappbrowser": {},
"cordova-plugin-camera": {
"ANDROID_SUPPORT_V4_VERSION": "27.+"
},
"cordova-sqlite-storage": {}, "cordova-sqlite-storage": {},
"cordova-plugin-compat": {}, "cordova-plugin-compat": {},
"cordova-plugin-mfp": {}, "cordova-plugin-mfp": {},
@@ -178,7 +175,10 @@
"cordova-plugin-mfp-jsonstore": {}, "cordova-plugin-mfp-jsonstore": {},
"cordova-plugin-ionic-webview": {}, "cordova-plugin-ionic-webview": {},
"cordova-plugin-screen-orientation": {}, "cordova-plugin-screen-orientation": {},
"cordova-plugin-network-information": {} "cordova-plugin-network-information": {},
"cordova-plugin-camera": {
"ANDROID_SUPPORT_V4_VERSION": "27.+"
}
}, },
"platforms": [ "platforms": [
"browser", "browser",
+14
View File
@@ -20,11 +20,25 @@ npm install -g cordova-res
## Mobile first dependencies ## Mobile first dependencies
cordova plugin add cordova-plugin-mfp-jsonstore cordova plugin add cordova-plugin-mfp-jsonstore
cordova plugin add cordova-plugin-mfp cordova plugin add cordova-plugin-mfp
ionic cordova plugin add cordova-plugin-network-information
## memory leak ## memory leak
set NODE_OPTIONS=--max_old_space_size=10096 set NODE_OPTIONS=--max_old_space_size=10096
``` ```
## BUG
Fix cordova-plugin-camera crash
```bash
## uninstall
npx cordova plugin remove cordova-plugin-camera
## install
npx cordova plugin add https://github.com/PieterVanPoyer/cordova-plugin-camera/#bugfix/issue-665-save-instance-restore-bug
```
## Start the development server ## Start the development server
```bash ```bash
+2
View File
@@ -34,6 +34,7 @@ import {MatDatepickerModule} from '@angular/material/datepicker';
// import { FCM } from 'cordova-plugin-fcm-with-dependecy-updated/ionic/ngx'; // import { FCM } from 'cordova-plugin-fcm-with-dependecy-updated/ionic/ngx';
import {MAT_DATE_FORMATS, MAT_DATE_LOCALE} from '@angular/material/core'; import {MAT_DATE_FORMATS, MAT_DATE_LOCALE} from '@angular/material/core';
import { NgxMatDateFormats, NGX_MAT_DATE_FORMATS } from '@angular-material-components/datetime-picker'; import { NgxMatDateFormats, NGX_MAT_DATE_FORMATS } from '@angular-material-components/datetime-picker';
import { Network } from '@ionic-native/network/ngx';
import { import {
@@ -100,6 +101,7 @@ import { ScreenOrientation } from '@ionic-native/screen-orientation/ngx';
WebsocketService, WebsocketService,
ChatService, ChatService,
ScreenOrientation, ScreenOrientation,
Network
], ],
bootstrap: [AppComponent], bootstrap: [AppComponent],
schemas: [CUSTOM_ELEMENTS_SCHEMA] schemas: [CUSTOM_ELEMENTS_SCHEMA]
+7 -3
View File
@@ -8,12 +8,12 @@ import { Event } from '../models/event.model';
import { ProcessesService } from '../services/processes.service'; import { ProcessesService } from '../services/processes.service';
import { NotificationsService } from '../services/notifications.service'; import { NotificationsService } from '../services/notifications.service';
import { ModalController, AlertController, AnimationController, Platform } from '@ionic/angular'; import { ModalController, AlertController, AnimationController, Platform } from '@ionic/angular';
import { NavigationExtras, Router, ActivatedRoute } from '@angular/router'; import { Router, ActivatedRoute } from '@angular/router';
import { ToastService } from '../services/toast.service';
import { ToDayEventStorage } from '../store/to-day-event-storage.service'; import { ToDayEventStorage } from '../store/to-day-event-storage.service';
import { DocumentCounterService } from 'src/app/OtherService/document-counter.service' import { DocumentCounterService } from 'src/app/OtherService/document-counter.service'
import { PermissionService } from '../OtherService/permission.service'; import { PermissionService } from '../OtherService/permission.service';
import { TotalDocumentService, TotalDocumentStore } from '../store/total-document.service'; import { TotalDocumentService, TotalDocumentStore } from '../store/total-document.service';
// import { NetworkService } from '../services/network.service';
// import * as Sentry from "@sentry/browser"; // import * as Sentry from "@sentry/browser";
@@ -74,6 +74,7 @@ export class HomePage implements OnInit {
private platform: Platform, private platform: Platform,
private activeroute: ActivatedRoute, private activeroute: ActivatedRoute,
public documentCounterService: DocumentCounterService, public documentCounterService: DocumentCounterService,
// private network: NetworkService,
public p: PermissionService) { public p: PermissionService) {
this.router.events.subscribe((val) => { this.router.events.subscribe((val) => {
@@ -87,7 +88,8 @@ export class HomePage implements OnInit {
} }
ngOnInit() { ngOnInit() {
/* this.network.checkNetworkConnection;
this.network.checkNetworkDisconnection; */
console.log('Active route ', this.router.url) console.log('Active route ', this.router.url)
if (this.platform.is('desktop') || this.platform.is('mobileweb')) { if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
console.log('Notifications not supported') console.log('Notifications not supported')
@@ -99,6 +101,8 @@ export class HomePage implements OnInit {
} }
mobilefirstConnect() { mobilefirstConnect() {
if(window['WLAuthorizationManager']) { if(window['WLAuthorizationManager']) {
@@ -79,8 +79,8 @@
<div *ngIf="LoadedDocument" class="aside-right flex-column height-100"> <div *ngIf="LoadedDocument" class="aside-right flex-column height-100">
<div class="buttons"> <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-cancel" 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>
<div class="solid"></div> <div class="solid"></div>
<button (click)="openExpedientActionsModal('1')" class="btn-cancel" shape="round" >Solicitar Parecer</button> <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> <button *ngIf="!p.userRole(['PR'])" (click)="openExpedientActionsModal('2')" class="btn-cancel" shape="round" >Pedido de Deferimento</button>
+11
View File
@@ -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"
+1
View File
@@ -10,4 +10,5 @@ export class Publication{
OriginalFileName?: string; OriginalFileName?: string;
FileBase64?:string; FileBase64?:string;
FileExtension?: string; FileExtension?: string;
OrganicEntityId?: number;
} }
+12
View File
@@ -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>
<div class="buttons"> <div class="buttons">
<button class="btn-cancel" shape="round" (click)="emendarTask()">Adicionar Nota</button> <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> <div class="solid"></div>
<button class="btn-cancel" shape="round" (click)="editTask()">Editar</button> <button class="btn-cancel" shape="round" (click)="editTask()">Editar</button>
<button class="btn-delete" shape="round" (click)="rejeitar()">Rejeitar</button> <button class="btn-delete" shape="round" (click)="rejeitar()">Rejeitar</button>
@@ -1,7 +1,6 @@
import { AfterViewChecked, AfterViewInit, Component, ElementRef, OnDestroy, OnInit, ViewChild } from '@angular/core'; import { AfterViewChecked, AfterViewInit, Component, ElementRef, OnDestroy, OnInit, ViewChild } from '@angular/core';
import {ActivatedRoute, Router} from '@angular/router' import {ActivatedRoute, Router} from '@angular/router'
import { ModalController, NavParams, PopoverController } from '@ionic/angular'; import { ModalController, NavParams, PopoverController } from '@ionic/angular';
import { Status } from 'src/app/models/chat/status.model';
import { ContactsPage } from 'src/app/pages/chat/messages/contacts/contacts.page'; import { ContactsPage } from 'src/app/pages/chat/messages/contacts/contacts.page';
import { AlertService } from 'src/app/services/alert.service'; import { AlertService } from 'src/app/services/alert.service';
import { AuthService } from 'src/app/services/auth.service'; import { AuthService } from 'src/app/services/auth.service';
@@ -85,7 +85,7 @@
<button (click)="openAddNoteModal('Gerar Diploma')" class="btn-cancel" style="margin-bottom: 0px !important;" shape="round" >Gerar Diploma </button> <button (click)="openAddNoteModal('Gerar Diploma')" class="btn-cancel" style="margin-bottom: 0px !important;" shape="round" >Gerar Diploma </button>
<!-- <div class="solid"></div> --> <!-- <div class="solid"></div> -->
<div class="option-desc">Outras opções</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)="openExpedientActionsModal('1',fulltask)" class="btn-cancel" shape="round" >Solicitar Parecer</button>
<button (click)="openDelegarModal(task)" class="btn-cancel" shape="round" >Delegar</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> <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 { AttachmentsService } from 'src/app/services/attachments.service';
import { EventsService } from 'src/app/services/events.service'; import { EventsService } from 'src/app/services/events.service';
import { InAppBrowser } from '@ionic-native/in-app-browser/ngx'; import { InAppBrowser } from '@ionic-native/in-app-browser/ngx';
import { DailyWorkTask, fullTask } from '../../../../models/dailyworktask.model'; import { fullTask } from '../../../../models/dailyworktask.model';
import { ActivatedRoute, NavigationExtras, Router } from '@angular/router'; import { ActivatedRoute, Router } from '@angular/router';
import { Event } from '../../../../models/event.model'; import { Event } from '../../../../models/event.model';
import { MenuController, ModalController, PopoverController } from '@ionic/angular'; import { MenuController, ModalController, PopoverController } from '@ionic/angular';
@@ -293,8 +293,9 @@ export class DespachoPrPage implements OnInit {
sendExpedienteToPending(){ sendExpedienteToPending(){
this.processes.SetTaskToPending(this.serialNumber).subscribe(res=>{ this.processes.SetTaskToPending(this.serialNumber).subscribe(res=>{
this.goBack(); this.popoverController.dismiss('close')
this.toastService.successMessage('Processo enviado para pendentes') this.toastService.successMessage('Processo enviado para pendentes')
this.goBack()
},()=>{ },()=>{
this.toastService.badRequest('Processo não encontrado') this.toastService.badRequest('Processo não encontrado')
@@ -486,8 +487,6 @@ export class DespachoPrPage implements OnInit {
} }
console.log('alert ...'+ JSON.stringify(res))
})) }))
} }
@@ -70,7 +70,7 @@
</div> </div>
<app-task-details class="content d-flex flex-column" <!-- <app-task-details class="content d-flex flex-column"
[task]="task" [task]="task"
[intervenientes]="intervenientes" [intervenientes]="intervenientes"
[cc]="cc" [cc]="cc"
@@ -79,7 +79,7 @@
(openOptions)="openOptions($event)" (openOptions)="openOptions($event)"
(goBack)="goBack()" (goBack)="goBack()"
(viewDocument)="viewDocument($event)" (viewDocument)="viewDocument($event)"
></app-task-details> > </app-task-details> -->
@@ -88,7 +88,7 @@
<button (click)="openAddNoteModal('Executado')" class="btn-cancel" shape="round" >Executado</button> <button (click)="openAddNoteModal('Executado')" class="btn-cancel" shape="round" >Executado</button>
<button (click)="openDelegarModal(task)" class="btn-cancel" shape="round" >Delegar</button> <button (click)="openDelegarModal(task)" class="btn-cancel" shape="round" >Delegar</button>
<div class="solid"></div> <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)="openExpedientActionsModal('1',fulltask)" class="btn-cancel" shape="round" >Solicitar Parecer</button>
<button (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button> <button (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button>
<div class="solid"></div> <div class="solid"></div>
@@ -98,7 +98,7 @@
<button (click)="openAddNoteModal('Executado')" class="btn-cancel" shape="round" >Executado</button> <button (click)="openAddNoteModal('Executado')" class="btn-cancel" shape="round" >Executado</button>
<button (click)="openDelegarModal(task)" class="btn-cancel" shape="round" >Delegar</button> <button (click)="openDelegarModal(task)" class="btn-cancel" shape="round" >Delegar</button>
<div class="solid"></div> <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)="openExpedientActionsModal('1',fulltask)" class="btn-cancel" shape="round" >Solicitar Parecer</button>
<button (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button> <button (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button>
<div class="solid"></div> <div class="solid"></div>
@@ -107,7 +107,7 @@
<div class="buttons" *ngIf="task.activityInstanceName == 'Concluir Despacho'"> <div class="buttons" *ngIf="task.activityInstanceName == 'Concluir Despacho'">
<button (click)="openAddNoteModal('Arquivar')" class="btn-cancel" shape="round" >Arquivar</button> <button (click)="openAddNoteModal('Arquivar')" class="btn-cancel" shape="round" >Arquivar</button>
<div class="solid"></div> <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)="openExpedientActionsModal('1',fulltask)" class="btn-cancel" shape="round" >Solicitar Parecer</button>
<button (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button> <button (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button>
<div class="solid"></div> <div class="solid"></div>
@@ -239,7 +239,7 @@ export class DespachoPage implements OnInit {
this.despachoService.sendExpedienteToPending(this.serialnumber).subscribe(res=>{ this.despachoService.sendExpedienteToPending(this.serialnumber).subscribe(res=>{
this.goBack(); this.goBack();
this.toastService.successMessage('Processo enviado para despacho') this.toastService.successMessage()
}, },
error => { error => {
this.toastService.badRequest("Processo não enviado para despacho") this.toastService.badRequest("Processo não enviado para despacho")
@@ -1,7 +1,5 @@
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import { Router } from '@angular/router'; import { ModalController } from '@ionic/angular';
import { ModalController, NavParams } from '@ionic/angular';
import { ProcessesService } from 'src/app/services/processes.service';
@Component({ @Component({
selector: 'app-discart-expedient-modal', selector: 'app-discart-expedient-modal',
@@ -9,18 +7,17 @@ import { ProcessesService } from 'src/app/services/processes.service';
styleUrls: ['./discart-expedient-modal.page.scss'], styleUrls: ['./discart-expedient-modal.page.scss'],
}) })
export class DiscartExpedientModalPage implements OnInit { export class DiscartExpedientModalPage implements OnInit {
serialNumber:string; serialNumber:string;
folderId:string; folderId:string;
action:string; action:string;
constructor(
private modalController: ModalController,
private processes:ProcessesService,
private router:Router,
) {
}
ngOnInit() { constructor(
} private modalController: ModalController
) { }
ngOnInit() {}
close() { close() {
this.modalController.dismiss('No'); this.modalController.dismiss('No');
} }
@@ -124,6 +124,6 @@
<div class="buttons width-100"> <div class="buttons width-100">
<button class="btn-cancel cursor-pointer" shape="round" (click)="emendTask(loadedEvent.serialNumber)">Adicionar Nota</button> <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-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> </div>
</ion-footer> </ion-footer>
@@ -93,13 +93,13 @@
<div class="option-desc"> <div>Solicitar revisão</div> </div> <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> <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> <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('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)="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)="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 *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)="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 class="solid"></div>
</div> </div>
</div> </div>
@@ -107,7 +107,7 @@
<div *ngIf="task && p.userRole(['PR'])" class="aside-right flex-column height-100 overflow-y-auto"> <div *ngIf="task && p.userRole(['PR'])" class="aside-right flex-column height-100 overflow-y-auto">
<div class="buttons"> <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> <button (click)="distartExpedientModal('descartar')" class="btn-cancel" shape="round" >Descartar</button>
<div class="solid"></div> <div class="solid"></div>
<button (click)="openExpedientActionsModal('1',fulltask)" class="btn-cancel" shape="round" >Solicitar Parecer</button> <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> <button (click)="attachDocument()" class="btn-cancel" shape="round" >Anexar Documento <br />(Gestão Documental)</button>
</div> </div>
<div *ngIf="loggeduser.Profile =='PR' " class="buttons"> <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> <button (click)="distartExpedientModal('descartar')" class="btn-cancel" shape="round" >Descartar</button>
<div class="solid"></div> <div class="solid"></div>
<button (click)="openExpedientActionsModal('1',fulltask)" class="btn-cancel" shape="round" >Solicitar Parecer</button> <button (click)="openExpedientActionsModal('1',fulltask)" class="btn-cancel" shape="round" >Solicitar Parecer</button>
@@ -4,7 +4,6 @@ ion-content{
--padding-start:15px; */ --padding-start:15px; */
/* --padding-bottom:15px; */ /* --padding-bottom:15px; */
/* --background:#ecf8ff; */ /* --background:#ecf8ff; */
--background: #ecf8ff;
} }
ion-segment{ ion-segment{
overflow: auto; overflow: auto;
@@ -121,6 +120,8 @@ ion-segment-button{
background:#ecf8ff; background:#ecf8ff;
overflow:hidden; overflow:hidden;
padding: 0 !important; padding: 0 !important;
border-top-left-radius: 25px;
border-top-right-radius: 25px;
.aside-wrapper{ .aside-wrapper{
overflow: hidden; overflow: hidden;
@@ -84,8 +84,8 @@
<button (click)="openAddNoteModal('Arquivar')" class="btn-cancel" shape="round" >Arquivar</button> <button (click)="openAddNoteModal('Arquivar')" class="btn-cancel" shape="round" >Arquivar</button>
<button (click)="openDelegarModal(task)" class="btn-cancel" shape="round" >Delegar</button> <button (click)="openDelegarModal(task)" class="btn-cancel" shape="round" >Delegar</button>
<div class="solid"></div> <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(['MDGPR'])" (click)="openExpedientActionsModal('0',fulltask)" class="btn-cancel" 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="loggeduser.Profile == 'MDGPR'" (click)="openExpedientActionsModal('2',fulltask)" class="btn-cancel" shape="round" >Pedido de Deferimento</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)="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> <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)="openAddNoteModal('Arquivar')" class="btn-cancel" shape="round" >Arquivar</button>
<button (click)="openDelegarModal(task)" class="btn-cancel" shape="round" >Delegar</button> <button (click)="openDelegarModal(task)" class="btn-cancel" shape="round" >Delegar</button>
<div class="solid"></div> <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(['MDGPR'])" (click)="openExpedientActionsModal('0',fulltask)" class="btn-cancel" 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="loggeduser.Profile == 'MDGPR'" (click)="openExpedientActionsModal('2',fulltask)" class="btn-cancel" shape="round" >Pedido de Deferimento</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)="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> <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)="openAddNoteModal('Arquivar')" class="btn-cancel" shape="round" >Arquivar</button>
<button (click)="openDelegarModal(task)" class="btn-cancel" shape="round" >Delegar</button> <button (click)="openDelegarModal(task)" class="btn-cancel" shape="round" >Delegar</button>
<div class="solid"></div> <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(['MDGPR'])" (click)="openExpedientActionsModal('0',fulltask)" class="btn-cancel" 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 hidden (click)="openExpedientActionsModal('1',fulltask)" class="btn-cancel" shape="round" >Solicitar Parecer</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)="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> <button (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button>
@@ -121,8 +121,8 @@
</div> </div>
<div class="buttons" *ngIf="task.activityInstanceName == 'Concluir Parecer'"> <div class="buttons" *ngIf="task.activityInstanceName == 'Concluir Parecer'">
<button (click)="openAddNoteModal('Arquivar')" class="btn-cancel" shape="round" >Arquivar</button> <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(['MDGPR'])" (click)="openExpedientActionsModal('0',fulltask)" class="btn-cancel" 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 (click)="openExpedientActionsModal('1',fulltask)" class="btn-cancel" shape="round" >Solicitar Parecer</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 *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)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button>
@@ -212,7 +212,7 @@ export class PedidoPage implements OnInit {
this.goBack() this.goBack()
} }
alert(JSON.stringify(res)+' nada') // alert(JSON.stringify(res)+' nada')
})) }))
} }
@@ -42,6 +42,20 @@
</ion-thumbnail> --> </ion-thumbnail> -->
</div> </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"> <div class="ion-item-container-no-border">
<ion-label (click)="takePicture()"> <ion-label (click)="takePicture()">
<div class="attach-icon"> <div class="attach-icon">
@@ -54,7 +68,7 @@
</div> </div>
<div class="ion-item-container-no-border"> <div class="ion-item-container-no-border">
<ion-label (click)="getPicture()"> <ion-label (click)="laodPicture()">
<div class="attach-icon"> <div class="attach-icon">
<ion-icon src="assets/images/icons-add-photos.svg"></ion-icon> <ion-icon src="assets/images/icons-add-photos.svg"></ion-icon>
</div> </div>
@@ -135,3 +135,31 @@ font-size: 25px;
letter-spacing: normal; letter-spacing: normal;
color: #000; 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 { FormControl, FormGroup, Validators } from '@angular/forms';
import { ThemePalette } from '@angular/material/core'; import { ThemePalette } from '@angular/material/core';
import { formatDate } from 'src/plugin/momentG.js' 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({ @Component({
selector: 'app-new-publication', selector: 'app-new-publication',
@@ -66,6 +68,8 @@ export class NewPublicationPage implements OnInit {
private publications: PublicationsService, private publications: PublicationsService,
private camera: Camera, private camera: Camera,
private toastService: ToastService, private toastService: ToastService,
private fileLoaderService: FileLoaderService,
private fileToBase64Service: FileToBase64Service
) { ) {
this.publicationType = this.navParams.get('publicationType'); 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() { getPicture() {
const options: CameraOptions = { const options: CameraOptions = {
quality: 90, quality: 90,
@@ -1,6 +1,6 @@
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import { Router, NavigationEnd } from '@angular/router'; import { Router, NavigationEnd } from '@angular/router';
import { ModalController, PopoverController } from '@ionic/angular'; import { ModalController } from '@ionic/angular';
import { PublicationFolder } from 'src/app/models/publicationfolder'; import { PublicationFolder } from 'src/app/models/publicationfolder';
import { PublicationsService } from 'src/app/services/publications.service'; import { PublicationsService } from 'src/app/services/publications.service';
import { NewActionPage } from './new-action/new-action.page'; import { NewActionPage } from './new-action/new-action.page';
@@ -3,6 +3,7 @@ import { ActivatedRoute, Router } from '@angular/router';
import { ModalController } from '@ionic/angular'; import { ModalController } from '@ionic/angular';
import { Publication } from 'src/app/models/publication'; import { Publication } from 'src/app/models/publication';
import { PublicationFolder } from 'src/app/models/publicationfolder'; import { PublicationFolder } from 'src/app/models/publicationfolder';
import { PublicationPipe } from 'src/app/pipes/publication.pipe';
import { PublicationsService } from 'src/app/services/publications.service'; import { PublicationsService } from 'src/app/services/publications.service';
import { PublicationEventFolderStorage } from 'src/app/store/publication-event-folder.service'; import { PublicationEventFolderStorage } from 'src/app/store/publication-event-folder.service';
import { PublicationListStorage } from 'src/app/store/publication-list.service'; import { PublicationListStorage } from 'src/app/store/publication-list.service';
@@ -29,12 +30,13 @@ export class ViewPublicationsPage implements OnInit {
publicationEventFolderStorage = PublicationEventFolderStorage publicationEventFolderStorage = PublicationEventFolderStorage
publicationTravelFolderService = PublicationTravelFolderStore publicationTravelFolderService = PublicationTravelFolderStore
publicationPipe = new PublicationPipe()
constructor( constructor(
private modalController: ModalController, private modalController: ModalController,
private publications: PublicationsService, private publications: PublicationsService,
private activatedRoute: ActivatedRoute, private activatedRoute: ActivatedRoute,
private router: Router ) private router: Router) {
{
this.item = new PublicationFolder(); this.item = new PublicationFolder();
this.activatedRoute.paramMap.subscribe(params => { this.activatedRoute.paramMap.subscribe(params => {
@@ -58,6 +60,7 @@ export class ViewPublicationsPage implements OnInit {
setTimeout(() => { setTimeout(() => {
this.getPublications(); this.getPublications();
}, 3000); }, 3000);
} }
ngOnChanges() { ngOnChanges() {
@@ -101,35 +104,15 @@ export class ViewPublicationsPage implements OnInit {
this.showLoader = true; this.showLoader = true;
const folderId = this.folderId const folderId = this.folderId
this.publications.GetPublications(this.folderId).subscribe(res=>{ this.publications.GetPublications(this.folderId).subscribe(res=>{
console.log(res);
let data = [];
this.publicationList = new Array();
res.forEach(element => { res.forEach(element => {
let itemImage = { let item: Publication = this.publicationPipe.itemList(element)
title: 'Title',
url: "data:image/jpg;base64," + element.FileBase64,
format: 'png'
}
let item: Publication = {
"DateIndex": element.DateIndex,
"DocumentId":element.DocumentId,
"ProcessId":element.ProcessId,
"Title":element.Title,
"Message": element.Message,
"DatePublication": element.DatePublication,
/* image:itemImage, */
"FileBase64": "data:image/jpg;base64," + element.FileBase64,
"OriginalFileName": '',
"FileExtension": '',
}
this.publicationList.push(item); this.publicationList.push(item);
data.push(item)
}); });
console.log(folderId);
this.publicationListStorage.add(folderId, this.publicationList) this.publicationListStorage.add(folderId, this.publicationList)
this.showLoader = false; this.showLoader = false;
+2 -1
View File
@@ -3,10 +3,11 @@ import { FilterPipe } from './filter.pipe';
import { SearchDocumentPipe } from './search-document.pipe'; import { SearchDocumentPipe } from './search-document.pipe';
import { CustomTaskPipe } from './custom-task.pipe'; import { CustomTaskPipe } from './custom-task.pipe';
import { EventPipe } from './event.pipe'; import { EventPipe } from './event.pipe';
import { PublicationPipe } from './publication.pipe';
@NgModule({ @NgModule({
declarations: [FilterPipe, SearchDocumentPipe, CustomTaskPipe, EventPipe], declarations: [FilterPipe, SearchDocumentPipe, CustomTaskPipe, EventPipe, PublicationPipe],
exports: [FilterPipe], exports: [FilterPipe],
imports: [] imports: []
}) })
+8
View File
@@ -0,0 +1,8 @@
import { PublicationPipe } from './publication.pipe';
describe('PublicationPipe', () => {
it('create an instance', () => {
const pipe = new PublicationPipe();
expect(pipe).toBeTruthy();
});
});
+29
View File
@@ -0,0 +1,29 @@
import { Pipe, PipeTransform } from '@angular/core';
import { Publication } from 'src/app/models/publication';
@Pipe({
name: 'publication'
})
export class PublicationPipe implements PipeTransform {
transform(value: unknown, ...args: unknown[]): unknown {
return null;
}
itemList(element ): Publication {
return {
"DateIndex": element.DateIndex,
"DocumentId":element.DocumentId,
"ProcessId":element.ProcessId,
"Title":element.Title,
"Message": element.Message,
"DatePublication": element.DatePublication,
/* image:itemImage, */
"FileBase64": "data:image/jpg;base64," + element.FileBase64,
"OriginalFileName": '',
"FileExtension": '',
"OrganicEntityId": element.OrganicEntityId
}
}
}
@@ -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);
});
}
}
+16
View File
@@ -0,0 +1,16 @@
import { TestBed } from '@angular/core/testing';
import { NetworkService } from './network.service';
describe('NavigationService', () => {
let service: NetworkService;
beforeEach(() => {
TestBed.configureTestingModule({});
service = TestBed.inject(NetworkService);
});
it('should be created', () => {
expect(service).toBeTruthy();
});
});
+31
View File
@@ -0,0 +1,31 @@
import { Injectable } from '@angular/core';
import { Network } from '@ionic-native/network/ngx';
import { Platform } from '@ionic/angular';
import { fromEvent, merge, of, Observable } from 'rxjs';
import { mapTo } from 'rxjs/operators';
@Injectable({
providedIn: 'root'
})
export class NetworkService {
constructor(
private network: Network) { }
checkNetworkConnection(){
this.network.onConnect().subscribe((value) => {
document.body.style.setProperty(`--color`, "#0782C9");
console.log('network connected!',value);
});
}
checkNetworkDisconnection(){
this.network.onDisconnect().subscribe((value) => {
document.body.style.setProperty(`--color`, "#eeeb30");
console.log('network was disconnected :-('),value;
});
}
}
+2 -1
View File
@@ -5,6 +5,7 @@ import { AuthService } from '../services/auth.service';
import { User } from '../models/user.model'; import { User } from '../models/user.model';
import { Observable, throwError } from 'rxjs'; import { Observable, throwError } from 'rxjs';
import { catchError } from 'rxjs/operators' import { catchError } from 'rxjs/operators'
import { Publication } from '../models/publication';
@Injectable({ @Injectable({
providedIn: 'root' providedIn: 'root'
@@ -86,7 +87,7 @@ export class PublicationsService {
headers: this.headers, headers: this.headers,
params: params params: params
}; };
return this.http.get<any>(`${geturl}`, options) return this.http.get<Publication[]>(`${geturl}`, options)
} }
GetPublicationById( publicationId:any){ GetPublicationById( publicationId:any){
@@ -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 public conected = false
private url: string = '' private url: string = ''
callback = function(){} callback = function(){}
private _connected = false;
constructor(){} constructor(){}
get connected() {
return this._connected
}
setUrl() { setUrl() {
let header ={ let header ={
@@ -55,7 +60,13 @@ export class SynchroService {
} }
private onopen = () =>{ private onopen = () =>{
document.body.style.setProperty(`--color`, "#0782C9");
document.body.style.setProperty(`--color2`, "#45BAFF");
document.body.style.setProperty(`--color3`, "#0782C9");
document.body.style.setProperty(`--color4`, "#0782c9f0");
document.body.style.setProperty(`--color5`, "#45BAFF");
console.log('open ======================= welcome to socket server') console.log('open ======================= welcome to socket server')
this._connected = true
} }
@@ -85,7 +96,14 @@ export class SynchroService {
// event.code is usually 1006 in this case // event.code is usually 1006 in this case
console.log('[close] Connection died'); console.log('[close] Connection died');
console.log('Reconnect') console.log('Reconnect')
document.body.style.setProperty(`--color`, "#ffb703");
document.body.style.setProperty(`--color2`, "#ffb703");
document.body.style.setProperty(`--color3`, "#ffb703");
document.body.style.setProperty(`--color4`, "#ffb703");
document.body.style.setProperty(`--color5`, "#ffb703");
this._connected = false
this.connect() this.connect()
} }
}, 100); }, 100);
} }
@@ -17,7 +17,6 @@
refreshingSpinner="circles" refreshingSpinner="circles"
refreshingText="A actualizar..."> refreshingText="A actualizar...">
</ion-refresher-content> </ion-refresher-content>
</ion-refresher> </ion-refresher>
<app-task-list <app-task-list
@@ -10,6 +10,7 @@
(click)="viewTaskDetail.emit(task)" (click)="viewTaskDetail.emit(task)"
> >
<!-- [routerLink]="['/home/gabinete-digital/expediente',task.SerialNumber]" --> <!-- [routerLink]="['/home/gabinete-digital/expediente',task.SerialNumber]" -->
<div class="item width-100"> <div class="item width-100">
<div class="exp-top-detail"> <div class="exp-top-detail">
<div class="subject"> <div class="subject">
@@ -80,6 +80,9 @@ export class PendentesPage implements OnInit {
} }
async viewTaskDetails({ SerialNumber, WorkflowName, activityInstanceName }:customTask) { async viewTaskDetails({ SerialNumber, WorkflowName, activityInstanceName }:customTask) {
console.log(SerialNumber, WorkflowName, activityInstanceName)
if(WorkflowName == 'Despacho') { if(WorkflowName == 'Despacho') {
this.router.navigate(['/home/gabinete-digital/despachos',SerialNumber,'gabinete-digital']); this.router.navigate(['/home/gabinete-digital/despachos',SerialNumber,'gabinete-digital']);
} }
@@ -9,7 +9,7 @@
<button (click)="openAddNoteModal('Executado')" class="btn-cancel" shape="round" >Executado</button> <button (click)="openAddNoteModal('Executado')" class="btn-cancel" shape="round" >Executado</button>
<button (click)="openDelegarModal(task)" class="btn-cancel" shape="round" >Delegar</button> <button (click)="openDelegarModal(task)" class="btn-cancel" shape="round" >Delegar</button>
<div class="solid"></div> <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)="openTaskProcessModal('1',fulltask)" class="btn-cancel" shape="round" >Solicitar Parecer</button>
<button (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button> <button (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button>
<div class="solid"></div> <div class="solid"></div>
@@ -19,7 +19,7 @@
<button (click)="openAddNoteModal('Executado')" class="btn-cancel" shape="round" >Executado</button> <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> <button (click)="openDelegarModal(task)" *ngIf="task.Status != 'Pending'" class="btn-cancel" shape="round" >Delegar</button>
<div class="solid"></div> <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)="openTaskProcessModal('1',fulltask)" class="btn-cancel" shape="round" >Solicitar Parecer</button>
<button (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button> <button (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button>
<div class="solid"></div> <div class="solid"></div>
@@ -28,7 +28,7 @@
<div class="buttons" *ngIf="task.activityInstanceName == 'Concluir Despacho'"> <div class="buttons" *ngIf="task.activityInstanceName == 'Concluir Despacho'">
<button (click)="openAddNoteModal('Arquivar')" class="btn-cancel" shape="round" >Arquivar</button> <button (click)="openAddNoteModal('Arquivar')" class="btn-cancel" shape="round" >Arquivar</button>
<div class="solid"></div> <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)="openTaskProcessModal('1',fulltask)" class="btn-cancel" shape="round" >Solicitar Parecer</button>
<button (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button> <button (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button>
<div class="solid"></div> <div class="solid"></div>
@@ -70,6 +70,7 @@ export class DespachosOptionsPage implements OnInit {
sendExpedienteToPending(){ sendExpedienteToPending(){
this.popoverController.dismiss(); this.popoverController.dismiss();
this.processes.SetTaskToPending(this.task.SerialNumber).subscribe(res=>{ this.processes.SetTaskToPending(this.task.SerialNumber).subscribe(res=>{
this.toastService.successMessage()
console.log(res); console.log(res);
this.close(); this.close();
},()=>{ },()=>{
@@ -13,13 +13,13 @@
<button class="btn-cancel desk" shape="round"> Reencaminhar para Área jurídica </button> <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 (click)="openAddNoteModal('Gerar Diploma')" class="btn-cancel" shape="round" >Gerar Diploma</button>
<button class="btn-cancel desk" shape="round"> Outras opções </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>
<div class="flex-grow-1 width-50 pl-10"> <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('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)="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)="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> </div>
<div *ngIf="task && p.userRole(['PR'])" class="d-flex width-100"> <div *ngIf="task && p.userRole(['PR'])" class="d-flex width-100">
@@ -97,7 +97,8 @@ export class DespachosPrOptionsPage implements OnInit {
sendExpedienteToPending() { sendExpedienteToPending() {
this.processes.SetTaskToPending(this.serialNumber).subscribe(res=>{ this.processes.SetTaskToPending(this.serialNumber).subscribe(res=>{
console.log(res); console.log(res);
this.close(); this.toastService.successMessage()
this.popoverController.dismiss('close')
},()=>{ },()=>{
this.toastService.badRequest('Processo não encontrado') 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('Aprovar')" class="btn-cancel" shape="round" >Aprovar</button>
<button (click)="openAddNoteModal('Revisão')" class="btn-cancel" shape="round" >Mandar para Revisão</button> <button (click)="openAddNoteModal('Revisão')" class="btn-cancel" shape="round" >Mandar para Revisão</button>
<div class="solid"></div> <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> <div hidden class="solid"></div>
<button hidden class="btn-cancel" shape="round" >Delegar</button> <button hidden class="btn-cancel" shape="round" >Delegar</button>
<button (click)="attachDocument()" class="btn-cancel" shape="round" >Anexar Documento</button> <button (click)="attachDocument()" class="btn-cancel" shape="round" >Anexar Documento</button>
</div> </div>
<div *ngIf="loggeduser.Profile =='PR' " class="buttons"> <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')" full class="btn-ok" shape="round" >Descartar</button> <button (click)="distartExpedientModal('descartar')" full class="btn-cancel" shape="round" >Descartar</button>
<div class="solid"></div> <div class="solid"></div>
<button (click)="openExpedientActionsModal('1',fulltask)" class="btn-cancel" shape="round" >Solicitar Parecer</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> <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 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 (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 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>
<div class="flex-grow-1"> <div class="flex-grow-1">
<button (click)="openExpedientActionsModal('1',fulltask)" class="btn-cancel" shape="round" >Solicitar Parecer</button> <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 (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 *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)="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> </div>
<div *ngIf="task && p.userRole(['PR'])" class="d-flex width-100"> <div *ngIf="task && p.userRole(['PR'])" class="d-flex width-100">
<div class="flex-grow-1"> <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> <button (click)="distartExpedientModal('descartar')" class="btn-cancel" shape="round" >Descartar</button>
<div class="solid"></div> <div class="solid"></div>
<button (click)="openExpedientActionsModal('1',fulltask)" class="btn-cancel" shape="round" >Solicitar Parecer</button> <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)="openAddNoteModal('Arquivar')" class="btn-cancel" shape="round" >Arquivar</button>
<button (click)="openDelegarModal(task)" class="btn-cancel" shape="round" >Delegar</button> <button (click)="openDelegarModal(task)" class="btn-cancel" shape="round" >Delegar</button>
<div class="solid"></div> <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-cancel" 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 (click)="openExpedientActionsModal('2',fulltask)" class="btn-cancel" shape="round" >Pedido de Deferimento</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)="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> <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)="openAddNoteModal('Arquivar')" class="btn-cancel" shape="round" >Arquivar</button>
<button (click)="openDelegarModal(task)" class="btn-cancel" shape="round" >Delegar</button> <button (click)="openDelegarModal(task)" class="btn-cancel" shape="round" >Delegar</button>
<div class="solid"></div> <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-cancel" 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 (click)="openExpedientActionsModal('2',fulltask)" class="btn-cancel" shape="round" >Pedido de Deferimento</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)="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> <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)="openAddNoteModal('Arquivar')" class="btn-cancel" shape="round" >Arquivar</button>
<button (click)="openDelegarModal(task)" class="btn-cancel" shape="round" >Delegar</button> <button (click)="openDelegarModal(task)" class="btn-cancel" shape="round" >Delegar</button>
<div class="solid"></div> <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-cancel" 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 (click)="openExpedientActionsModal('1',fulltask)" class="btn-cancel" shape="round" >Solicitar Parecer</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)="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> <button (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button>
@@ -48,8 +48,8 @@
</div> </div>
<div class="buttons" *ngIf="task.activityInstanceName == 'Concluir Parecer'"> <div class="buttons" *ngIf="task.activityInstanceName == 'Concluir Parecer'">
<button (click)="openAddNoteModal('Arquivar')" class="btn-cancel" shape="round" >Arquivar</button> <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-cancel" 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 (click)="openExpedientActionsModal('1',fulltask)" class="btn-cancel" shape="round" >Solicitar Parecer</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)="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)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button>
@@ -31,7 +31,6 @@ export class RequestOptionsPage implements OnInit {
private navParams: NavParams, private navParams: NavParams,
private processes: ProcessesService, private processes: ProcessesService,
private activatedRoute: ActivatedRoute, private activatedRoute: ActivatedRoute,
private animationController: AnimationController,
private toastService: ToastService, private toastService: ToastService,
private router: Router, private router: Router,
public p: PermissionService, public p: PermissionService,
@@ -72,18 +71,13 @@ export class RequestOptionsPage implements OnInit {
} }
close() { close() {
if( window.innerWidth < 801) { this.popoverController.dismiss('close')
this.modalController.dismiss('close');
} else {
this.modalController.dismiss('close');
}
// this.router.navigate(['/home/gabinete-digital/pedidos']);
} }
sendExpedienteToPending() { sendExpedienteToPending() {
this.processes.SetTaskToPending(this.task.SerialNumber).subscribe(res=>{ this.processes.SetTaskToPending(this.task.SerialNumber).subscribe(res=>{
console.log(res); console.log(res);
this.toastService.successMessage()
this.close(); this.close();
},()=>{ },()=>{
@@ -1,7 +1,7 @@
<ion-content class="container width-100 "> <ion-content class="container width-100 ">
<div class="buttons"> <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-cancel" 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>
<div class="solid"></div> <div class="solid"></div>
<button (click)="openExpedientActionsModal('0')" class="btn-cancel" shape="round" >Solicitar Parecer</button> <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> <button *ngIf="!p.userRole(['PR'])" (click)="openExpedientActionsModal('2')" class="btn-cancel" shape="round" >Pedido de Deferimento</button>
@@ -37,7 +37,6 @@
displayFormat="D MMM YYYY H:mm" displayFormat="D MMM YYYY H:mm"
minuteValues="0,15,30,45" minuteValues="0,15,30,45"
monthShortNames="Jan, Fev, Mar, Abr, Mai, Jun, Jul, Aug, Sep, Out, Nov, Dez" monthShortNames="Jan, Fev, Mar, Abr, Mai, Jun, Jul, Aug, Sep, Out, Nov, Dez"
min="{{minDate}}"
max="2025"> max="2025">
</ion-datetime> </ion-datetime>
@@ -46,7 +45,6 @@
<input matInput [ngxMatDatetimePicker]="picker1" <input matInput [ngxMatDatetimePicker]="picker1"
placeholder="Choose a date*" placeholder="Choose a date*"
[(ngModel)]="folder.DateBegin" [(ngModel)]="folder.DateBegin"
[min]="minDate"
[disabled]="disabled" [disabled]="disabled"
> >
<mat-datepicker-toggle id="new-inicio" matSuffix [for]="picker1"></mat-datepicker-toggle> <mat-datepicker-toggle id="new-inicio" matSuffix [for]="picker1"></mat-datepicker-toggle>
@@ -76,7 +74,6 @@
displayFormat="D MMM YYYY H:mm" displayFormat="D MMM YYYY H:mm"
minuteValues="0,15,30,45" minuteValues="0,15,30,45"
monthShortNames="Jan, Fev, Mar, Abr, Mai, Jun, Jul, Aug, Sep, Out, Nov, Dez" monthShortNames="Jan, Fev, Mar, Abr, Mai, Jun, Jul, Aug, Sep, Out, Nov, Dez"
min="{{minDate}}"
max="2025"> max="2025">
</ion-datetime> </ion-datetime>
@@ -84,7 +81,6 @@
<input matInput [ngxMatDatetimePicker]="picker2" <input matInput [ngxMatDatetimePicker]="picker2"
placeholder="Choose a date*" placeholder="Choose a date*"
[(ngModel)]="folder.DateEnd" [(ngModel)]="folder.DateEnd"
[min]="minDate"
[disabled]="disabled" [disabled]="disabled"
> >
<mat-datepicker-toggle id="new-inicio" matSuffix [for]="picker2"></mat-datepicker-toggle> <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 showSeconds = false;
public touchUi = false; public touchUi = false;
public enableMeridian = false; public enableMeridian = false;
public minDate = new Date().toISOString().slice(0,10)
public maxDate: any;
public stepHour = 1; public stepHour = 1;
public stepMinute = 5; public stepMinute = 5;
public stepSecond = 5; public stepSecond = 5;
@@ -29,7 +29,7 @@
<div class="container-title py-10 hide-desktop">Fotografia Anexada</div> <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"> <div class="post-img">
<img src="{{publication.FileBase64}}" alt="image" > <img src="{{publication.FileBase64}}" alt="image" >
</div> </div>
@@ -43,26 +43,32 @@
</div> </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-label class="attached-title">Fotografia Anexada</ion-label>
<ion-item lines="none"> <ion-item lines="none">
<ion-thumbnail slot="start"> <ion-thumbnail slot="start">
<ion-img [(ngModel)]="capturedImage" name="image" ngDefaultControl [src]="'data:image/png;base64,'+capturedImage"></ion-img> <ion-img [(ngModel)]="capturedImage" name="image" ngDefaultControl [src]="capturedImage"></ion-img>
</ion-thumbnail> --> </ion-thumbnail>
<!-- <ion-thumbnail *ngIf="!publication" slot="start">
<ion-img [(ngModel)]="publication.imageUrl" [src]="guestPicture"></ion-img> <ion-label>
</ion-thumbnail> -->
<!-- <ion-label>
<p>{{capturedImageTitle}}</p> <p>{{capturedImageTitle}}</p>
<p hidden>size</p> <p hidden>size</p>
</ion-label> </ion-label>
<ion-icon (click)="clear()" name="close"></ion-icon> <ion-icon (click)="clear()" name="close"></ion-icon>
</ion-item> --> </ion-item>
<!-- <ion-thumbnail> </div>
<ion-img src="{{imgUrl}}"></ion-img>
</ion-thumbnail> -->
<!-- </div> -->
<div class="ion-item-container-no-border hide-desktop"> <div class="ion-item-container-no-border hide-desktop">
<ion-label (click)="takePicture()"> <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 { Camera, CameraOptions } from '@ionic-native/camera/ngx';
import { ToastService } from 'src/app/services/toast.service'; import { ToastService } from 'src/app/services/toast.service';
import { FormControl, FormGroup, Validators } from '@angular/forms'; 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({ @Component({
selector: 'app-new-publication', selector: 'app-new-publication',
templateUrl: './new-publication.page.html', templateUrl: './new-publication.page.html',
@@ -45,12 +46,12 @@ export class NewPublicationPage implements OnInit {
capturedImageTitle:any; capturedImageTitle:any;
constructor( constructor(
private modalController: ModalController,
public photoService: PhotoService, public photoService: PhotoService,
private publications: PublicationsService, private publications: PublicationsService,
private camera: Camera, private camera: Camera,
private animationController: AnimationController,
private toastService: ToastService, private toastService: ToastService,
private fileLoaderService: FileLoaderService,
private fileToBase64Service: FileToBase64Service
) { ) {
this.publicationTitle = 'Nova Publicação'; this.publicationTitle = 'Nova Publicação';
} }
@@ -99,9 +100,7 @@ export class NewPublicationPage implements OnInit {
} }
this.camera.getPicture(options).then((imageData) => { 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.capturedImage = imageData;
this.capturedImageTitle = new Date().getTime() + '.jpeg'; this.capturedImageTitle = new Date().getTime() + '.jpeg';
}, (err) => { }, (err) => {
@@ -109,27 +108,20 @@ export class NewPublicationPage implements OnInit {
}); });
} }
getPicture(){ laodPicture() {
const options: CameraOptions = { const input = this.fileLoaderService.createInput({
quality: 90, accept: ['image/apng', 'image/jpeg', 'image/png']
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);
});
}
input.onchange = async () => {
const file = this.fileLoaderService.getFirstFile(input)
const imageData = await this.fileToBase64Service.convert(file)
this.capturedImage = imageData;
this.capturedImageTitle = file.name
};
}
runValidation() { runValidation() {
@@ -190,7 +182,7 @@ export class NewPublicationPage implements OnInit {
} }
} }
else if (!this.publication.OriginalFileName) { else if (!this.publication.OriginalFileName) { //
this.publication = { this.publication = {
DateIndex: this.publication.DateIndex, DateIndex: this.publication.DateIndex,
DocumentId:this.publication.DocumentId, DocumentId:this.publication.DocumentId,
@@ -198,6 +190,7 @@ export class NewPublicationPage implements OnInit {
Title: this.pub.Title, Title: this.pub.Title,
Message: this.pub.Message, Message: this.pub.Message,
DatePublication: this.publication.DatePublication, DatePublication: this.publication.DatePublication,
OriginalFileName: this.capturedImageTitle,
// OriginalFileName: this.publication.OriginalFileName, // OriginalFileName: this.publication.OriginalFileName,
// FileBase64: this.publication.FileBase64, // FileBase64: this.publication.FileBase64,
// FileExtension: 'jpeg', // FileExtension: 'jpeg',
@@ -309,33 +302,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));
} */
} }
@@ -9,6 +9,7 @@ import { NewPublicationPage } from 'src/app/pages/publications/new-publication/n
import { PublicationListStorage } from 'src/app/store/publication-list.service' import { PublicationListStorage } from 'src/app/store/publication-list.service'
import { PublicationEventFolderStorage } from 'src/app/store/publication-event-folder.service'; import { PublicationEventFolderStorage } from 'src/app/store/publication-event-folder.service';
import { PublicationTravelFolderStore } from 'src/app/store/publication-travel-folder.service'; import { PublicationTravelFolderStore } from 'src/app/store/publication-travel-folder.service';
import { PublicationPipe } from 'src/app/pipes/publication.pipe';
@Component({ @Component({
selector: 'app-view-publications', selector: 'app-view-publications',
templateUrl: './view-publications.page.html', templateUrl: './view-publications.page.html',
@@ -31,16 +32,17 @@ export class ViewPublicationsPage implements OnInit {
@Output() goBacktoPublicationDetails = new EventEmitter<any>(); @Output() goBacktoPublicationDetails = new EventEmitter<any>();
publicationListStorage = PublicationListStorage publicationListStorage = PublicationListStorage
// //
publicationEventFolderStorage = PublicationEventFolderStorage publicationEventFolderStorage = PublicationEventFolderStorage
publicationTravelFolderService = PublicationTravelFolderStore publicationTravelFolderService = PublicationTravelFolderStore
publicationPipe = new PublicationPipe()
constructor( constructor(
private loadingController: LoadingService, private loadingController: LoadingService,
private modalController: ModalController, private modalController: ModalController,
private publications: PublicationsService, private publications: PublicationsService
) { ) {
this.item = new PublicationFolder(); this.item = new PublicationFolder();
} }
@@ -82,38 +84,23 @@ export class ViewPublicationsPage implements OnInit {
} }
getPublicationDetail() { getPublicationDetail() {
setTimeout(() => {
let allActions = this.publicationEventFolderStorage.list.concat(this.publicationTravelFolderService.list) let allActions = this.publicationEventFolderStorage.list.concat(this.publicationTravelFolderService.list)
this.item = allActions.find((e)=> e.ProcessId == this.folderId); this.item = allActions.find((e)=> e.ProcessId == this.folderId);
},100);
} }
getPublications() { getPublications() {
this.showLoader = true; this.showLoader = true;
const folderId = this.folderId const folderId = this.folderId
this.publications.GetPublications(folderId).subscribe(res=> { this.publications.GetPublications(folderId).subscribe(res=> {
this.publicationList = new Array(); this.publicationList = new Array();
res.forEach(element => { res.forEach(element => {
let itemImage = { let item: Publication = this.publicationPipe.itemList(element)
title: 'Title',
url: "data:image/jpg;base64," + element.FileBase64,
format: 'png'
}
let item: Publication = {
"DateIndex": element.DateIndex,
"DocumentId":element.DocumentId,
"ProcessId":element.ProcessId,
"Title":element.Title,
"Message": element.Message,
"DatePublication": element.DatePublication,
/* image:itemImage, */
"FileBase64": "data:image/jpg;base64," + element.FileBase64,
"OriginalFileName": '',
"FileExtension": '',
}
this.publicationList.push(item); this.publicationList.push(item);
}); });
+9 -2
View File
@@ -730,13 +730,20 @@ app-header-no-search .ion-toolbar{
overflow-y: auto !important; overflow-y: auto !important;
} */ } */
:root {
--color : hsl(202, 93%, 41%);
--color2: #45BAFF;
--color3: #0782C9;
--color4: #0782c9f0;
--color5: #45BAFF;
}
body, .blue-background{ background: #0782C9 !important;} body, .blue-background{ background: var(--color) !important;}
@media only screen and (min-width: 1365px) { @media only screen and (min-width: 1365px) {
body{ body{
background: linear-gradient(270deg, #45BAFF 0%, #0782C9 23.44%, rgba(7, 130, 201, 0.9425) 78.13%, #45BAFF 100%) !important; background: linear-gradient(270deg, var(--color2) 0%, var(--color3) 23.44%, var(--color4) 78.13%, var(--color5) 100%) !important;
} }
.blue-background { .blue-background {
background: linear-gradient(270deg, #45BAFF 0%, #0782C9 23.44%, rgba(7, 130, 201, 0.9425) 78.13%, #45BAFF 100%) !important; background: linear-gradient(270deg, #45BAFF 0%, #0782C9 23.44%, rgba(7, 130, 201, 0.9425) 78.13%, #45BAFF 100%) !important;