mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
improve
This commit is contained in:
@@ -167,6 +167,10 @@ const routes = [
|
||||
{
|
||||
path: 'all-processes',
|
||||
loadChildren: () => import('./shared/gabinete-digital/all-processes/all-processes.module').then( m => m.AllProcessesPageModule)
|
||||
},
|
||||
{
|
||||
path: 'searched-document-options',
|
||||
loadChildren: () => import('./shared/popover/searched-document-options/searched-document-options.module').then( m => m.SearchedDocumentOptionsPageModule)
|
||||
},
|
||||
|
||||
|
||||
|
||||
@@ -3,15 +3,13 @@
|
||||
<div class="main-content d-flex height-100">
|
||||
<div *ngIf="LoadedDocument" class="content d-flex flex-column">
|
||||
<div class="main-header">
|
||||
<div class="title-content width-100 d-flex">
|
||||
<div class="title-content width-100 d-flex align-center">
|
||||
<app-btn-modal-dismiss></app-btn-modal-dismiss>
|
||||
<div class="middle">
|
||||
<div class="middle flex-grow-1">
|
||||
<ion-label class="title">{{LoadedDocument.Assunto}}</ion-label>
|
||||
</div>
|
||||
<div class="div-icon">
|
||||
<ion-menu-button >
|
||||
<ion-icon name="ellipsis-vertical-outline"></ion-icon>
|
||||
</ion-menu-button>
|
||||
<div class="div-icon" (click)="openOptions()">
|
||||
<ion-icon class="font-25 cursor-pointer" src="assets/images/icons-menu.svg"></ion-icon>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -106,5 +104,4 @@
|
||||
</ion-list>
|
||||
</div>
|
||||
</div>
|
||||
</ion-content>
|
||||
|
||||
</ion-content>
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { MenuController, ModalController, NavParams } from '@ionic/angular';
|
||||
import { MenuController, ModalController, NavParams, PopoverController } from '@ionic/angular';
|
||||
import { AlertService } from 'src/app/services/alert.service';
|
||||
import { ProcessesService } from 'src/app/services/processes.service';
|
||||
import { InAppBrowser } from '@ionic-native/in-app-browser/ngx';
|
||||
@@ -8,6 +8,7 @@ import { DocumentSetUpMeetingPage } from '../document-set-up-meeting/document-se
|
||||
import { FromSearchDocument, SearchFolder } from 'src/app/models/search-document';
|
||||
import { ExpedientTaskModalPageNavParamsTask } from 'src/app/models/ExpedientTaskModalPage';
|
||||
import { PermissionService } from 'src/app/OtherService/permission.service';
|
||||
import { SearchedDocumentOptionsPage } from 'src/app/shared/popover/searched-document-options/searched-document-options.page';
|
||||
|
||||
@Component({
|
||||
selector: 'app-document-detail',
|
||||
@@ -28,6 +29,8 @@ export class DocumentDetailPage implements OnInit {
|
||||
folder: SearchFolder
|
||||
document: FromSearchDocument
|
||||
|
||||
task: any = {}
|
||||
|
||||
constructor(
|
||||
private navParams: NavParams,
|
||||
private modalController: ModalController,
|
||||
@@ -36,13 +39,13 @@ export class DocumentDetailPage implements OnInit {
|
||||
private menu: MenuController,
|
||||
private iab: InAppBrowser,
|
||||
public p: PermissionService,
|
||||
private popoverController: PopoverController,
|
||||
) {
|
||||
this.docId = this.navParams.get('docId');
|
||||
this.applicationId = this.navParams.get('applicationId');
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
this.LoadDocumentDetails();
|
||||
}
|
||||
|
||||
@@ -57,32 +60,7 @@ export class DocumentDetailPage implements OnInit {
|
||||
console.log(res)
|
||||
this.customDate = this.days[thedate.getDay()]+ ", " + thedate.getDate() +" de " + ( this.months[thedate.getMonth()]);
|
||||
});
|
||||
}
|
||||
|
||||
viewDocument() {
|
||||
this.processes.GetDocumentUrl(this.docId, '8').subscribe(res=>{
|
||||
console.log(res);
|
||||
const url: string = res.replace("webTRIX.Viewer","webTRIX.Viewer.Branch1");
|
||||
const browser = this.iab.create(url,"_blank");
|
||||
browser.show();
|
||||
});
|
||||
}
|
||||
|
||||
openMenu() {
|
||||
this.menu.open();
|
||||
this.modalController.dismiss();
|
||||
}
|
||||
|
||||
close() {
|
||||
this.modalController.dismiss();
|
||||
}
|
||||
|
||||
notImplemented() {
|
||||
this.alertService.presentAlert('Funcionalidade em desenvolvimento');
|
||||
}
|
||||
|
||||
// efetuar despacho
|
||||
async openExpedientActionsModal( taskAction: any) {
|
||||
|
||||
let task: ExpedientTaskModalPageNavParamsTask
|
||||
|
||||
@@ -115,6 +93,35 @@ export class DocumentDetailPage implements OnInit {
|
||||
}
|
||||
}
|
||||
|
||||
this.task = task
|
||||
|
||||
}
|
||||
|
||||
viewDocument() {
|
||||
this.processes.GetDocumentUrl(this.docId, '8').subscribe(res=>{
|
||||
console.log(res);
|
||||
const url: string = res.replace("webTRIX.Viewer","webTRIX.Viewer.Branch1");
|
||||
const browser = this.iab.create(url,"_blank");
|
||||
browser.show();
|
||||
});
|
||||
}
|
||||
|
||||
openMenu() {
|
||||
this.menu.open();
|
||||
this.modalController.dismiss();
|
||||
}
|
||||
|
||||
close() {
|
||||
this.modalController.dismiss();
|
||||
}
|
||||
|
||||
notImplemented() {
|
||||
this.alertService.presentAlert('Funcionalidade em desenvolvimento');
|
||||
}
|
||||
|
||||
// efetuar despacho
|
||||
async openExpedientActionsModal( taskAction: any) {
|
||||
|
||||
let classs;
|
||||
if( window.innerWidth <= 800) {
|
||||
classs = 'modal modal-desktop'
|
||||
@@ -125,7 +132,7 @@ export class DocumentDetailPage implements OnInit {
|
||||
component: ExpedientTaskModalPage,
|
||||
componentProps: {
|
||||
taskAction: taskAction,
|
||||
task: task,
|
||||
task: this.task,
|
||||
},
|
||||
cssClass: classs,
|
||||
});
|
||||
@@ -136,39 +143,6 @@ export class DocumentDetailPage implements OnInit {
|
||||
|
||||
async openBookMeetingModal() {
|
||||
|
||||
let document: FromSearchDocument = this.LoadedDocument
|
||||
let folder: SearchFolder = this.LoadedDocument
|
||||
let task;
|
||||
|
||||
if(folder.ApplicationID == 361) {
|
||||
task = {
|
||||
serialNumber: folder.DispatchNumber,
|
||||
taskStartDate: folder.DateDispatch,
|
||||
isEvent: true,
|
||||
Folio: folder.Assunto,
|
||||
FsId: folder.ApplicationID,
|
||||
workflowInstanceDataFields: {
|
||||
FsId: folder.ApplicationID,
|
||||
FolderID: null,
|
||||
DocId: folder.DispatchNumber,
|
||||
Subject: folder.Assunto
|
||||
},
|
||||
}
|
||||
} else if (document.ApplicationID == 8 || document.ApplicationId == 8) {
|
||||
task = {
|
||||
taskStartDate: document.DocDate,
|
||||
isEvent: true,
|
||||
Folio: document.Assunto,
|
||||
FsId: document.ApplicationID,
|
||||
workflowInstanceDataFields: {
|
||||
FsId: document.ApplicationID || document.ApplicationId,
|
||||
FolderID: null,
|
||||
DocId: document.DocID || document.DocId,
|
||||
Subject: document.Assunto
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
let classs;
|
||||
if( window.innerWidth <= 800) {
|
||||
classs = 'book-meeting-modal modal modal-desktop'
|
||||
@@ -178,7 +152,7 @@ export class DocumentDetailPage implements OnInit {
|
||||
const modal = await this.modalController.create({
|
||||
component: DocumentSetUpMeetingPage,
|
||||
componentProps: {
|
||||
task: task,
|
||||
task: this.task,
|
||||
document: this.LoadedDocument
|
||||
},
|
||||
cssClass: classs,
|
||||
@@ -188,4 +162,15 @@ export class DocumentDetailPage implements OnInit {
|
||||
modal.onDidDismiss();
|
||||
}
|
||||
|
||||
async openOptions() {
|
||||
const popover = await this.popoverController.create({
|
||||
component: SearchedDocumentOptionsPage,
|
||||
cssClass: 'exp-options',
|
||||
componentProps: {
|
||||
},
|
||||
translucent: true
|
||||
});
|
||||
return await popover.present();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -263,8 +263,8 @@ export class DocumentSetUpMeetingPage implements OnInit {
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
const loader = this.toastService.loading()
|
||||
|
||||
try {
|
||||
await this.documentService.setUpMeeting(data).toPromise()
|
||||
this.toastService.successMessage('Processo criado')
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="line"></div>
|
||||
<div class="middle-content">
|
||||
<div class="middle-content" >
|
||||
<div *ngIf="intervenientes.length > 0">
|
||||
<h5 >Intervenientes</h5>
|
||||
<ion-item class="ion-no-margin ion-no-padding">
|
||||
@@ -40,9 +40,11 @@
|
||||
</ion-label>
|
||||
</ion-item>
|
||||
</div>
|
||||
<div *ngIf="cc.length > 0">
|
||||
<h5>Com conhecimento</h5>
|
||||
<ion-item class="ion-no-margin ion-no-padding">
|
||||
<div *ngIf="cc!='' && cc!=' ' ">
|
||||
.. {{ cc | json }} ..
|
||||
|
||||
<h5 *ngIf="cc.length > 0">Com conhecimento</h5>
|
||||
<ion-item *ngIf="cc.length > 0" class="ion-no-margin ion-no-padding">
|
||||
<ion-label>
|
||||
<div *ngFor="let c of cc">
|
||||
<p>{{c.Name}}</p>
|
||||
|
||||
@@ -5,7 +5,7 @@ import { EventsService } from 'src/app/services/events.service';
|
||||
import { InAppBrowser } from '@ionic-native/in-app-browser/ngx';
|
||||
import { DailyWorkTask } from '../../../../models/dailyworktask.model';
|
||||
import { ActivatedRoute, NavigationExtras, Router } from '@angular/router';
|
||||
import { formatDate } from '@angular/common';
|
||||
|
||||
import { Event } from '../../../../models/event.model';
|
||||
import { AnimationController, MenuController, ModalController, PopoverController } from '@ionic/angular';
|
||||
import { AlertService } from 'src/app/services/alert.service';
|
||||
@@ -17,9 +17,6 @@ import { BookMeetingModalPage } from '../../expediente/book-meeting-modal/book-m
|
||||
import { CreateProcessPage } from 'src/app/modals/create-process/create-process.page';
|
||||
import { DelegarPage } from 'src/app/modals/delegar/delegar.page';
|
||||
import { AddNotePage } from 'src/app/modals/add-note/add-note.page';
|
||||
import { OptsExpedientePage } from 'src/app/shared/popover/opts-expediente/opts-expediente.page';
|
||||
import { BadRequestPage } from 'src/app/shared/popover/bad-request/bad-request.page';
|
||||
import { SuccessMessagePage } from 'src/app/shared/popover/success-message/success-message.page';
|
||||
import { DespachosPrOptionsPage } from 'src/app/shared/popover/despachos-pr-options/despachos-pr-options.page';
|
||||
import { ToastService } from 'src/app/services/toast.service';
|
||||
import { Location } from '@angular/common'
|
||||
@@ -128,7 +125,10 @@ export class DespachoPrPage implements OnInit {
|
||||
this.cc = users.filter(user=>{
|
||||
return user.Type == 'CC';
|
||||
}) || []
|
||||
console.log(users);
|
||||
|
||||
if(!this.cc) {
|
||||
this.cc = []
|
||||
}
|
||||
|
||||
});
|
||||
this.getDocumentDetails(this.task.FolderId, '361');
|
||||
|
||||
@@ -4,8 +4,9 @@ import { EventPerson } from 'src/app/models/eventperson.model';
|
||||
import { ProcessesService } from 'src/app/services/processes.service';
|
||||
import { ModalController } from '@ionic/angular';
|
||||
import { ApproveEventModalPage } from './approve-event-modal/approve-event-modal.page';
|
||||
import { NavigationEnd, NavigationStart, Router } from '@angular/router';
|
||||
import { NavigationStart, Router } from '@angular/router';
|
||||
import { EventoAprovacaoStore } from 'src/app/store/eventoaprovacao-store.service';
|
||||
import { Location } from '@angular/common';
|
||||
|
||||
@Component({
|
||||
selector: 'app-event-list',
|
||||
@@ -32,7 +33,8 @@ export class EventListPage implements OnInit {
|
||||
constructor(
|
||||
private processes:ProcessesService,
|
||||
private modalController: ModalController,
|
||||
private router: Router
|
||||
private router: Router,
|
||||
private location: Location
|
||||
) { }
|
||||
|
||||
ngOnInit() {
|
||||
@@ -138,12 +140,14 @@ export class EventListPage implements OnInit {
|
||||
this.modalController.dismiss(null);
|
||||
}
|
||||
goBack() {
|
||||
if(this.router.url == '/home/agenda/event-list') {
|
||||
this.router.navigate(['/home/agenda']);
|
||||
}
|
||||
else if(this.router.url == '/home/gabinete-digital/event-list'){
|
||||
this.router.navigate(['/home/gabinete-digital']);
|
||||
}
|
||||
// if(this.router.url == '/home/agenda/event-list') {
|
||||
// this.router.navigate(['/home/agenda']);
|
||||
// }
|
||||
// else if(this.router.url == '/home/gabinete-digital/event-list'){
|
||||
// this.router.navigate(['/home/gabinete-digital']);
|
||||
// }
|
||||
|
||||
this.location.back()
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -158,7 +158,7 @@ export class ExpedientePrPage implements OnInit {
|
||||
"CreateDate":taskDate,
|
||||
"DocumentURL": res.workflowInstanceDataFields.ViewerRequest,
|
||||
"Remetente": res.workflowInstanceDataFields.Sender,
|
||||
"Note": res.workflowInstanceDataFields.Note,
|
||||
"Note": res.workflowInstanceDataFields.TaskMessage || res.workflowInstanceDataFields.Note,
|
||||
"FolderId": res.workflowInstanceDataFields.FolderID,
|
||||
"FsId": res.workflowInstanceDataFields.FsId,
|
||||
"DocId": res.workflowInstanceDataFields.DocId || res.workflowInstanceDataFields.DocID,
|
||||
|
||||
@@ -59,12 +59,12 @@ export class HeaderPage implements OnInit {
|
||||
|
||||
|
||||
|
||||
if(window.location.pathname == '/home/agenda') {
|
||||
if(window.location.pathname.startsWith('/home/agenda')) {
|
||||
type = "Agenda"
|
||||
} else if (window.location.pathname =='/home/gabinete-digital') {
|
||||
} else if (window.location.pathname.startsWith('/home/gabinete-digital')) {
|
||||
type = "AccoesPresidenciais & ArquivoDespachoElect"
|
||||
|
||||
} else if (window.location.pathname == '/home/publications') {
|
||||
} else if (window.location.pathname.startsWith('/home/publications')) {
|
||||
type = "AccoesPresidenciais"
|
||||
}
|
||||
|
||||
|
||||
@@ -8,14 +8,10 @@ import { DiscartExpedientModalPage } from 'src/app/pages/gabinete-digital/discar
|
||||
import { BookMeetingModalPage } from 'src/app/pages/gabinete-digital/expediente/book-meeting-modal/book-meeting-modal.page';
|
||||
import { ExpedientTaskModalPage } from 'src/app/pages/gabinete-digital/expediente/expedient-task-modal/expedient-task-modal.page';
|
||||
import { SearchPage } from 'src/app/pages/search/search.page';
|
||||
import { AlertService } from 'src/app/services/alert.service';
|
||||
import { AttachmentsService } from 'src/app/services/attachments.service';
|
||||
import { AuthService } from 'src/app/services/auth.service';
|
||||
import { EventsService } from 'src/app/services/events.service';
|
||||
import { ProcessesService } from 'src/app/services/processes.service';
|
||||
import { ToastService } from 'src/app/services/toast.service';
|
||||
import { BadRequestPage } from '../bad-request/bad-request.page';
|
||||
import { SuccessMessagePage } from '../success-message/success-message.page';
|
||||
|
||||
@Component({
|
||||
selector: 'app-opts-expediente-pr',
|
||||
@@ -68,7 +64,7 @@ export class OptsExpedientePrPage implements OnInit {
|
||||
ngOnInit() {
|
||||
}
|
||||
|
||||
close(){
|
||||
close() {
|
||||
if( window.innerWidth <= 1024){
|
||||
this.popoverController.dismiss();
|
||||
}
|
||||
@@ -121,7 +117,7 @@ export class OptsExpedientePrPage implements OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
async approve(note:string, documents:any){
|
||||
async approve(note:string, documents:any) {
|
||||
this.popoverController.dismiss();
|
||||
let body = {
|
||||
"serialNumber": this.task.SerialNumber,
|
||||
@@ -160,7 +156,7 @@ export class OptsExpedientePrPage implements OnInit {
|
||||
modal.onDidDismiss().then( async (res)=>{
|
||||
console.log(res['data']);
|
||||
|
||||
if(body == 'descartar'){
|
||||
if(body == 'descartar') {
|
||||
if(res['data']== 'Yes'){
|
||||
let otherbody = {
|
||||
"serialNumber": this.task.SerialNumber,
|
||||
@@ -188,17 +184,17 @@ export class OptsExpedientePrPage implements OnInit {
|
||||
//Do nothing
|
||||
}
|
||||
}
|
||||
else{
|
||||
if(res['data']== 'Yes'){
|
||||
else {
|
||||
if(res['data']== 'Yes') {
|
||||
const loader = this.toastService.loading()
|
||||
|
||||
try {
|
||||
await this.processes.CompleteTask(body).toPromise();
|
||||
this.toastService.successMessage('Processo descartado');
|
||||
// this.toastService.successMessage('Processo descartado');
|
||||
this.goBack();
|
||||
} catch (error) {
|
||||
this.toastService.badRequest('Processo não descartado');
|
||||
} finally {
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
this.goBack();
|
||||
@@ -222,7 +218,7 @@ export class OptsExpedientePrPage implements OnInit {
|
||||
}
|
||||
|
||||
|
||||
async sendToReview(note:string, documents:any){
|
||||
async sendToReview(note:string, documents:any) {
|
||||
let body = {
|
||||
"serialNumber": this.task.SerialNumber,
|
||||
"action": "Retificar",
|
||||
@@ -276,14 +272,25 @@ export class OptsExpedientePrPage implements OnInit {
|
||||
cssClass: classs,
|
||||
});
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then(res=>{
|
||||
modal.onDidDismiss().then( async (res)=>{
|
||||
console.log(res['data']);
|
||||
let body = res['data'];
|
||||
// alert('close '+ res['data'])
|
||||
if(res['data']){
|
||||
console.log('open discart');
|
||||
|
||||
this.distartExpedientModal(body);
|
||||
const loader = this.toastService.loading()
|
||||
|
||||
try {
|
||||
await this.processes.CompleteTask(body).toPromise();
|
||||
// this.toastService.successMessage('Processo descartado');
|
||||
this.goBack();
|
||||
} catch (error) {
|
||||
this.toastService.badRequest('Processo não descartado');
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
this.goBack();
|
||||
|
||||
}
|
||||
else{
|
||||
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { Routes, RouterModule } from '@angular/router';
|
||||
|
||||
import { SearchedDocumentOptionsPage } from './searched-document-options.page';
|
||||
|
||||
const routes: Routes = [
|
||||
{
|
||||
path: '',
|
||||
component: SearchedDocumentOptionsPage
|
||||
}
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
imports: [RouterModule.forChild(routes)],
|
||||
exports: [RouterModule],
|
||||
})
|
||||
export class SearchedDocumentOptionsPageRoutingModule {}
|
||||
@@ -0,0 +1,20 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
|
||||
import { IonicModule } from '@ionic/angular';
|
||||
|
||||
import { SearchedDocumentOptionsPageRoutingModule } from './searched-document-options-routing.module';
|
||||
|
||||
import { SearchedDocumentOptionsPage } from './searched-document-options.page';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule,
|
||||
FormsModule,
|
||||
IonicModule,
|
||||
SearchedDocumentOptionsPageRoutingModule
|
||||
],
|
||||
declarations: [SearchedDocumentOptionsPage]
|
||||
})
|
||||
export class SearchedDocumentOptionsPageModule {}
|
||||
@@ -0,0 +1,10 @@
|
||||
<ion-content class="container width-100 ">
|
||||
<div class="buttons">
|
||||
<button *ngIf="p.userRole(['PR'])" (click)="openExpedientActionsModal('0')" class="btn-ok" shape="round" >Marcar para Despacho</button>
|
||||
<button *ngIf="!p.userRole(['PR'])" (click)="openExpedientActionsModal('0')" class="btn-ok" 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>
|
||||
<button (click)="openBookMeetingModal()" class="btn-cancel" shape="round" >Marcar Reunião</button>
|
||||
</div>
|
||||
</ion-content>
|
||||
@@ -0,0 +1,63 @@
|
||||
.container{
|
||||
--padding-top:20px !important;
|
||||
--padding-bottom:20px !important;
|
||||
--padding-start:20px !important;
|
||||
--padding-end:20px !important;
|
||||
width: 100%;
|
||||
}
|
||||
.arrow-right{
|
||||
display: none;
|
||||
margin-bottom: 20px;
|
||||
.arrow-right-icon{
|
||||
width: 37px;
|
||||
float: right;
|
||||
font-size: 35px;
|
||||
overflow: hidden;
|
||||
}
|
||||
}
|
||||
.buttons{
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-around;
|
||||
}
|
||||
.solid {
|
||||
display: none;
|
||||
width: 90%;
|
||||
border-top: 1px solid #bbb;
|
||||
margin: 0 auto !important;
|
||||
}
|
||||
.btn-ok, .btn-cancel{
|
||||
//width: 50% !important;
|
||||
margin-bottom: 5px !important;
|
||||
margin-top: 5px !important;
|
||||
}
|
||||
@media only screen and (max-width: 800px) {
|
||||
.btn-ok, .btn-cancel, .btn-delete{
|
||||
width: 100% !important;
|
||||
}
|
||||
}
|
||||
@media only screen and (min-width: 1024px) {
|
||||
.arrow-right{
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
.btn-cancel{
|
||||
display: none;
|
||||
width: 100% !important;
|
||||
margin-bottom: 10px !important;
|
||||
}
|
||||
.btn-delete, .btn-ok{
|
||||
width: 100% !important;
|
||||
margin-bottom: 10px !important;
|
||||
margin-top: 10px !important;
|
||||
}
|
||||
/* .solid{
|
||||
display: block;
|
||||
} */
|
||||
}
|
||||
|
||||
|
||||
.desk{
|
||||
text-align: left;
|
||||
background-color: white;
|
||||
}
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
|
||||
import { IonicModule } from '@ionic/angular';
|
||||
|
||||
import { SearchedDocumentOptionsPage } from './searched-document-options.page';
|
||||
|
||||
describe('SearchedDocumentOptionsPage', () => {
|
||||
let component: SearchedDocumentOptionsPage;
|
||||
let fixture: ComponentFixture<SearchedDocumentOptionsPage>;
|
||||
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ SearchedDocumentOptionsPage ],
|
||||
imports: [IonicModule.forRoot()]
|
||||
}).compileComponents();
|
||||
|
||||
fixture = TestBed.createComponent(SearchedDocumentOptionsPage);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
}));
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,137 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { ModalController, NavParams, PopoverController } from '@ionic/angular';
|
||||
import { DocumentSetUpMeetingPage } from 'src/app/modals/document-set-up-meeting/document-set-up-meeting.page';
|
||||
import { ExpedientTaskModalPageNavParamsTask } from 'src/app/models/ExpedientTaskModalPage';
|
||||
import { FromSearchDocument, SearchFolder } from 'src/app/models/search-document';
|
||||
import { PermissionService } from 'src/app/OtherService/permission.service';
|
||||
import { ExpedientTaskModalPage } from 'src/app/pages/gabinete-digital/expediente/expedient-task-modal/expedient-task-modal.page';
|
||||
import { ProcessesService } from 'src/app/services/processes.service';
|
||||
import { ToastService } from 'src/app/services/toast.service';
|
||||
|
||||
|
||||
@Component({
|
||||
selector: 'app-searched-document-options',
|
||||
templateUrl: './searched-document-options.page.html',
|
||||
styleUrls: ['./searched-document-options.page.scss'],
|
||||
})
|
||||
export class SearchedDocumentOptionsPage implements OnInit {
|
||||
|
||||
task: any
|
||||
LoadedDocument: any
|
||||
|
||||
constructor(
|
||||
private popoverController: PopoverController,
|
||||
private modalController: ModalController,
|
||||
private navParams: NavParams,
|
||||
private processes: ProcessesService,
|
||||
private toastService: ToastService,
|
||||
private router: Router,
|
||||
private activatedRoute: ActivatedRoute,
|
||||
public p: PermissionService
|
||||
) { }
|
||||
|
||||
ngOnInit() {
|
||||
this.task = this.navParams.get('task');
|
||||
this.LoadedDocument = this.navParams.get('LoadedDocument')
|
||||
}
|
||||
|
||||
close() {
|
||||
this.modalController.dismiss();
|
||||
|
||||
let document: FromSearchDocument = this.LoadedDocument
|
||||
let folder: SearchFolder = this.LoadedDocument
|
||||
let task;
|
||||
|
||||
if(folder.ApplicationID == 361) {
|
||||
task = {
|
||||
serialNumber: folder.DispatchNumber,
|
||||
taskStartDate: folder.DateDispatch,
|
||||
isEvent: true,
|
||||
Folio: folder.Assunto,
|
||||
FsId: folder.ApplicationID,
|
||||
workflowInstanceDataFields: {
|
||||
FsId: folder.ApplicationID,
|
||||
FolderID: null,
|
||||
DocId: folder.DispatchNumber,
|
||||
Subject: folder.Assunto
|
||||
},
|
||||
}
|
||||
} else if (document.ApplicationID == 8 || document.ApplicationId == 8) {
|
||||
task = {
|
||||
taskStartDate: document.DocDate,
|
||||
isEvent: true,
|
||||
Folio: document.Assunto,
|
||||
FsId: document.ApplicationID,
|
||||
workflowInstanceDataFields: {
|
||||
FsId: document.ApplicationID || document.ApplicationId,
|
||||
FolderID: null,
|
||||
DocId: document.DocID || document.DocId,
|
||||
Subject: document.Assunto
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
goBack() {
|
||||
this.modalController.dismiss();
|
||||
}
|
||||
|
||||
|
||||
async openBookMeetingModal() {
|
||||
|
||||
const task: ExpedientTaskModalPageNavParamsTask = this.task
|
||||
|
||||
let classs;
|
||||
if( window.innerWidth <= 800) {
|
||||
classs = 'book-meeting-modal modal modal-desktop'
|
||||
} else {
|
||||
classs = 'modal modal-desktop showAsideOptions'
|
||||
}
|
||||
const modal = await this.modalController.create({
|
||||
component: DocumentSetUpMeetingPage,
|
||||
componentProps: {
|
||||
task: task,
|
||||
document: this.LoadedDocument
|
||||
},
|
||||
cssClass: classs,
|
||||
backdropDismiss: false
|
||||
});
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then( async(res)=>{
|
||||
this.modalController.dismiss();
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
async openExpedientActionsModal( taskAction: any) {
|
||||
|
||||
const task: ExpedientTaskModalPageNavParamsTask = this.task
|
||||
|
||||
let classs;
|
||||
if( window.innerWidth <= 800) {
|
||||
classs = 'modal modal-desktop'
|
||||
} else {
|
||||
classs = 'modal modal-desktop showAsideOptions'
|
||||
}
|
||||
const modal = await this.modalController.create({
|
||||
component: ExpedientTaskModalPage,
|
||||
componentProps: {
|
||||
taskAction: taskAction,
|
||||
task: task,
|
||||
},
|
||||
cssClass: classs,
|
||||
});
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then( async(res)=>{
|
||||
this.modalController.dismiss();
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
async distartExpedientModal(body:any){}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user