mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
Close issue 507 and its subtasks
This commit is contained in:
@@ -14,6 +14,10 @@ const routes: Routes = [
|
||||
},
|
||||
{
|
||||
path: 'event-actions-popover',
|
||||
loadChildren: () => import('./event-actions-popover/event-actions-popover.module').then( m => m.EventActionsPopoverPageModule)
|
||||
},
|
||||
{
|
||||
path: 'emend-message-modal',
|
||||
loadChildren: () => import('./emend-message-modal/emend-message-modal.module').then( m => m.EmendMessageModalPageModule)
|
||||
}
|
||||
|
||||
|
||||
@@ -7,13 +7,36 @@
|
||||
<label>{{loadedEvent.workflowInstanceDataFields.Subject}}</label>
|
||||
</div>
|
||||
<div class="header-icon-right">
|
||||
<ion-icon src="assets/images/icons-edit.svg"></ion-icon>
|
||||
<ion-icon (click)="notImplemented()" src="assets/images/icons-edit.svg"></ion-icon>
|
||||
</div>
|
||||
</div>
|
||||
</ion-header>
|
||||
<ion-menu autoHide="false" side="end" content-id="main-content">
|
||||
<ion-header>
|
||||
<ion-toolbar translucent>
|
||||
<ion-title>Ações</ion-title>
|
||||
</ion-toolbar>
|
||||
</ion-header>
|
||||
<ion-content>
|
||||
<ion-list>
|
||||
<ion-item (click)="approveTask(loadedEvent.serialNumber)">
|
||||
<ion-icon name="checkmark-sharp"></ion-icon>
|
||||
<ion-label>Aprovar</ion-label>
|
||||
</ion-item>
|
||||
<ion-item (click)="emendTask(loadedEvent.serialNumber)">
|
||||
<ion-icon name="create-outline"></ion-icon>
|
||||
<ion-label>Emendar</ion-label>
|
||||
</ion-item>
|
||||
<ion-item (click)="rejectTask(loadedEvent.serialNumber)">
|
||||
<ion-icon name="close-sharp"></ion-icon>
|
||||
<ion-label>Rejeitar</ion-label>
|
||||
</ion-item>
|
||||
</ion-list>
|
||||
</ion-content>
|
||||
</ion-menu>
|
||||
|
||||
<ion-content>
|
||||
<div class="main-content">
|
||||
<ion-content id="main-content">
|
||||
<div class="upper-content">
|
||||
<div class="content-location">
|
||||
<div class="location-detail">
|
||||
<ion-label >{{loadedEvent.workflowInstanceDataFields.Location}}</ion-label>
|
||||
@@ -22,31 +45,32 @@
|
||||
<ion-button class="button-calendar-type" slot="end">{{loadedEvent.workflowInstanceDataFields.Agenda}}</ion-button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="content-details">
|
||||
<ion-label>
|
||||
<p>{{customDate}}</p>
|
||||
<p>das {{loadedEvent.workflowInstanceDataFields.StartDate | date: 'hh:mm'}} às {{loadedEvent.workflowInstanceDataFields.EndDate | date: 'hh:mm'}}</p>
|
||||
<p>(Não se repete)</p>
|
||||
</ion-label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<ion-item>
|
||||
<ion-label>
|
||||
<h3>Intervenientes</h3>
|
||||
<p>{{loadedEvent.workflowInstanceDataFields.Participants}}</p>
|
||||
</ion-label>
|
||||
</ion-item>
|
||||
<ion-item>
|
||||
<ion-label>
|
||||
<h3>Detalhes</h3>
|
||||
<p>{{loadedEvent.workflowInstanceDataFields.Body}}</p>
|
||||
</ion-label>
|
||||
</ion-item>
|
||||
|
||||
<div>
|
||||
<div class="middle-content">
|
||||
<ion-item>
|
||||
<ion-label>Documentos Anexados</ion-label>
|
||||
<ion-label>
|
||||
<h3>Intervenientes</h3>
|
||||
<p>{{loadedEvent.workflowInstanceDataFields.Participants}}</p>
|
||||
</ion-label>
|
||||
</ion-item>
|
||||
<ion-item>
|
||||
<ion-label>
|
||||
<h3>Detalhes</h3>
|
||||
<p>{{loadedEvent.workflowInstanceDataFields.Body}}</p>
|
||||
</ion-label>
|
||||
</ion-item>
|
||||
</div>
|
||||
|
||||
<div class="bottom-content">
|
||||
<ion-list>
|
||||
<h3>Documentos Anexados</h3>
|
||||
<ion-item>
|
||||
<ion-label>
|
||||
<p class="attach-title-item">Receita por Natureza</p>
|
||||
@@ -58,12 +82,15 @@
|
||||
</ion-content>
|
||||
<ion-footer>
|
||||
<ion-toolbar>
|
||||
<div class="buttons">
|
||||
<ion-item lines="none">
|
||||
<p>
|
||||
<ion-button class="button-edit-event" shape="round" (click)="emendTask(loadedEvent.serialNumber)">Emendar</ion-button>
|
||||
</p>
|
||||
<p>
|
||||
<ion-button disabled class="button-options" shape="round" fill="clear" (click)="openOptions($event)"><ion-icon slot="icon-only" name="ellipsis-vertical-outline"></ion-icon></ion-button>
|
||||
<ion-menu-button autoHide="false">
|
||||
<ion-icon (click)="openMenu()" name="ellipsis-vertical-outline"></ion-icon>
|
||||
</ion-menu-button>
|
||||
</p>
|
||||
<p>
|
||||
<ion-button class="button-approve" shape="round" (click)="approveTask(loadedEvent.serialNumber)">Aprovar</ion-button>
|
||||
@@ -74,5 +101,6 @@
|
||||
<ion-button class="button-reject" shape="round" (click)="rejectTask(loadedEvent.serialNumber)">Rejeitar</ion-button>
|
||||
</p>
|
||||
</ion-item>
|
||||
</div>
|
||||
</ion-toolbar>
|
||||
</ion-footer>
|
||||
|
||||
@@ -4,6 +4,9 @@ ion-content{
|
||||
--padding-end: 20px;
|
||||
font-size: 18px;
|
||||
}
|
||||
ion-menu{
|
||||
--height: 225px;
|
||||
}
|
||||
.header-content{
|
||||
width: 360px;
|
||||
overflow: auto;
|
||||
@@ -30,9 +33,10 @@ ion-content{
|
||||
float: left;
|
||||
overflow: auto;
|
||||
}
|
||||
.main-content{
|
||||
.upper-content{
|
||||
margin-left: 50px;
|
||||
overflow: auto;
|
||||
font-size: 18px;
|
||||
}
|
||||
.content-location{
|
||||
width: 360px;
|
||||
@@ -44,6 +48,7 @@ ion-content{
|
||||
.location-detail{
|
||||
width: 210px;
|
||||
font-weight: 700;
|
||||
font-size: 18px;
|
||||
float: left;
|
||||
margin: 5px 5px 5px 0px;
|
||||
}
|
||||
@@ -64,6 +69,20 @@ ion-content{
|
||||
--background: #e0e9ee;
|
||||
--color:#061b52;
|
||||
}
|
||||
.content-details p{
|
||||
font-size: 16px;
|
||||
}
|
||||
.middle-content h3, .middle-content p{
|
||||
font-size: 16px;
|
||||
}
|
||||
.bottom-content{
|
||||
width: 360px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.bottom-content h3{
|
||||
font-size: 16px;
|
||||
margin: 0 0 0 10px;
|
||||
}
|
||||
.attach-document{
|
||||
font-size: 15px;
|
||||
color: #0d89d1;
|
||||
@@ -91,6 +110,10 @@ ion-content{
|
||||
float: right;
|
||||
font-size: 13px;
|
||||
}
|
||||
.buttons{
|
||||
width: 360px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.button-options {
|
||||
height: 44px;
|
||||
|
||||
@@ -2,7 +2,9 @@ import { Component, OnInit } from '@angular/core';
|
||||
import { Router } from '@angular/router';
|
||||
import { MenuController, ModalController, NavParams, PopoverController } from '@ionic/angular';
|
||||
import { Event } from 'src/app/models/event.model';
|
||||
import { AlertService } from 'src/app/services/alert.service';
|
||||
import { ProcessesService } from 'src/app/services/processes.service';
|
||||
import { EmendMessageModalPage } from '../emend-message-modal/emend-message-modal.page';
|
||||
import { EventActionsPopoverPage } from '../event-actions-popover/event-actions-popover.page';
|
||||
|
||||
@Component({
|
||||
@@ -16,22 +18,19 @@ export class ApproveEventModalPage implements OnInit {
|
||||
serialNumber:string;
|
||||
customDate:any;
|
||||
today:any;
|
||||
|
||||
|
||||
|
||||
months = ["Janeiro", "Fevereiro", "Março", "Abril", "Maio", "Junho", "Julho", "Agosto", "Setembro", "Outubro", "Novembro", "Dezembro"];
|
||||
days = ["Domingo", "Segunda-feira", "Terça-feira", "Quarta-feira", "Quinta-feira", "Sexta-feira", "Sábado"];
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
constructor(
|
||||
private router:Router,
|
||||
private modalController: ModalController,
|
||||
private navParams: NavParams,
|
||||
private processes:ProcessesService,
|
||||
private popoverController: PopoverController,
|
||||
private menu: MenuController,
|
||||
private alertService: AlertService,
|
||||
)
|
||||
{
|
||||
this.serialNumber = this.navParams.get('serialNumber');
|
||||
@@ -46,6 +45,9 @@ export class ApproveEventModalPage implements OnInit {
|
||||
|
||||
|
||||
}
|
||||
notImplemented(){
|
||||
this.alertService.presentAlert('Funcionalidade em desenvolvimento');
|
||||
}
|
||||
|
||||
close(){
|
||||
this.router.navigate(['/home/gabinete-digital/event-list']);
|
||||
@@ -66,22 +68,25 @@ export class ApproveEventModalPage implements OnInit {
|
||||
let body = { "serialNumber": serialNumber, "action": "Aprovar" }
|
||||
console.log(body);
|
||||
this.processes.PostTaskAction(body);
|
||||
this.alertService.presentAlert('Operação realizada com sucesso!');
|
||||
this.router.navigate(['/home/gabinete-digital/event-list']);
|
||||
this.modalController.dismiss(null);
|
||||
}
|
||||
|
||||
emendTask(serialNumber:string){
|
||||
console.log('Emendar');
|
||||
this.menu.close();
|
||||
this.openEmendMessageModal(serialNumber);
|
||||
|
||||
let body = { "serialNumber": serialNumber, "action": "Emendar" }
|
||||
console.log(body);
|
||||
this.processes.PostTaskAction(body);
|
||||
this.router.navigate(['/home/gabinete-digital/event-list']);
|
||||
this.modalController.dismiss(null);
|
||||
/* this.modalController.dismiss(null); */
|
||||
}
|
||||
|
||||
rejectTask(serialNumber:string){
|
||||
|
||||
let body = { "serialNumber": serialNumber, "action": "Rejeitar" }
|
||||
console.log(body);
|
||||
this.processes.PostTaskAction(body);
|
||||
this.alertService.presentAlert('Operação realizada com sucesso!');
|
||||
this.router.navigate(['/home/gabinete-digital/event-list']);
|
||||
this.modalController.dismiss(null);
|
||||
}
|
||||
@@ -95,7 +100,38 @@ export class ApproveEventModalPage implements OnInit {
|
||||
});
|
||||
return await popover.present();
|
||||
}
|
||||
|
||||
|
||||
openMenu() {
|
||||
this.menu.open();
|
||||
}
|
||||
async openEmendMessageModal(serialNumber:string) {
|
||||
const modal = await this.modalController.create({
|
||||
component: EmendMessageModalPage,
|
||||
componentProps:{
|
||||
|
||||
},
|
||||
cssClass: 'emend-message-modal',
|
||||
backdropDismiss: false
|
||||
});
|
||||
|
||||
await modal.present();
|
||||
|
||||
modal.onDidDismiss().then(res => {
|
||||
if(res.data !== ''){
|
||||
let body = { "serialNumber": serialNumber,
|
||||
"action": "Emendar",
|
||||
"dataFields": {
|
||||
"ReviewerComments": res.data,
|
||||
}
|
||||
}
|
||||
console.log(body);
|
||||
this.processes.PostTaskAction(body);
|
||||
this.alertService.presentAlert('Operação realizada com sucesso!');
|
||||
this.router.navigate(['/home/gabinete-digital/event-list']);
|
||||
}
|
||||
else{
|
||||
this.alertService.presentAlert('Operação cancelada!');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { Routes, RouterModule } from '@angular/router';
|
||||
|
||||
import { EmendMessageModalPage } from './emend-message-modal.page';
|
||||
|
||||
const routes: Routes = [
|
||||
{
|
||||
path: '',
|
||||
component: EmendMessageModalPage
|
||||
}
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
imports: [RouterModule.forChild(routes)],
|
||||
exports: [RouterModule],
|
||||
})
|
||||
export class EmendMessageModalPageRoutingModule {}
|
||||
@@ -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 { EmendMessageModalPageRoutingModule } from './emend-message-modal-routing.module';
|
||||
|
||||
import { EmendMessageModalPage } from './emend-message-modal.page';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule,
|
||||
FormsModule,
|
||||
IonicModule,
|
||||
EmendMessageModalPageRoutingModule
|
||||
],
|
||||
declarations: [EmendMessageModalPage]
|
||||
})
|
||||
export class EmendMessageModalPageModule {}
|
||||
@@ -0,0 +1,26 @@
|
||||
<ion-header class="ion-no-border">
|
||||
<div class="header-content">
|
||||
<div class="header-icon-left">
|
||||
<ion-icon (click)="close()" src="assets/images/icons-arrow-arrow-left.svg"></ion-icon>
|
||||
</div>
|
||||
<div class="header-title">
|
||||
<label>Notas</label>
|
||||
</div>
|
||||
</div>
|
||||
</ion-header>
|
||||
|
||||
<ion-content>
|
||||
<ion-item lines="none">
|
||||
<ion-textarea [(ngModel)]="emendMessage" rows="4" cols="20" placeholder="Digite o seu comentário..."></ion-textarea>
|
||||
</ion-item>
|
||||
</ion-content>
|
||||
<ion-footer>
|
||||
<ion-toolbar>
|
||||
<div class="buttons">
|
||||
<ion-item lines="none">
|
||||
<ion-button class="button-reject" shape="round" (click)="close()">Cancelar</ion-button>
|
||||
<ion-button class="button-approve" shape="round" (click)="save()">Gravar</ion-button>
|
||||
</ion-item>
|
||||
</div>
|
||||
</ion-toolbar>
|
||||
</ion-footer>
|
||||
@@ -0,0 +1,41 @@
|
||||
.header-content{
|
||||
width: 360px;
|
||||
overflow: auto;
|
||||
margin: 25px auto;
|
||||
}
|
||||
.header-icon-left{
|
||||
width: 36px;
|
||||
font-size: 33px;
|
||||
color: #42b9fe;
|
||||
float: left;
|
||||
}
|
||||
.header-title{
|
||||
width: 264px;
|
||||
font-family: Roboto;
|
||||
font-size: 25px;
|
||||
margin: 0 5px 0 5px;
|
||||
padding: 0;
|
||||
color:#000;
|
||||
float: left;
|
||||
}
|
||||
.buttons{
|
||||
width: 320px;
|
||||
margin: 0 auto;
|
||||
padding: 5px 0 5px 0;
|
||||
}
|
||||
|
||||
.button-reject {
|
||||
width: 130px;
|
||||
height: 44px;
|
||||
--color: #d30a0a;
|
||||
border-radius: 22.5px;
|
||||
--background: #ffe0e0;
|
||||
margin: 0 12px 0 0px;
|
||||
}
|
||||
.button-approve {
|
||||
width: 130px;
|
||||
height: 44px;
|
||||
border-radius: 22.5px;
|
||||
--background: #42b9fe;
|
||||
margin: 0 0px 0 12px;
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { IonicModule } from '@ionic/angular';
|
||||
|
||||
import { EmendMessageModalPage } from './emend-message-modal.page';
|
||||
|
||||
describe('EmendMessageModalPage', () => {
|
||||
let component: EmendMessageModalPage;
|
||||
let fixture: ComponentFixture<EmendMessageModalPage>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ EmendMessageModalPage ],
|
||||
imports: [IonicModule.forRoot()]
|
||||
}).compileComponents();
|
||||
|
||||
fixture = TestBed.createComponent(EmendMessageModalPage);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
}));
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,25 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { ModalController } from '@ionic/angular';
|
||||
|
||||
@Component({
|
||||
selector: 'app-emend-message-modal',
|
||||
templateUrl: './emend-message-modal.page.html',
|
||||
styleUrls: ['./emend-message-modal.page.scss'],
|
||||
})
|
||||
export class EmendMessageModalPage implements OnInit {
|
||||
emendMessage: string = '';
|
||||
|
||||
constructor(
|
||||
private modalController: ModalController,
|
||||
) { }
|
||||
|
||||
ngOnInit() {
|
||||
}
|
||||
close(){
|
||||
this.modalController.dismiss('');
|
||||
}
|
||||
save(){
|
||||
this.modalController.dismiss(this.emendMessage);
|
||||
}
|
||||
|
||||
}
|
||||
+1
-11
@@ -48,17 +48,7 @@
|
||||
</ion-content>
|
||||
</ion-menu>
|
||||
<div class="ion-page" id="main-content">
|
||||
<ion-header>
|
||||
<ion-toolbar>
|
||||
<ion-buttons slot="start">
|
||||
<ion-menu-button></ion-menu-button>
|
||||
</ion-buttons>
|
||||
<ion-title>Inbox</ion-title>
|
||||
</ion-toolbar>
|
||||
</ion-header>
|
||||
<ion-content class="ion-padding">
|
||||
<ion-button expand="block" onclick="openMenu()">Open Menu</ion-button>
|
||||
</ion-content>
|
||||
<ion-menu-button></ion-menu-button>
|
||||
</div>
|
||||
|
||||
<ion-content padding>
|
||||
|
||||
Reference in New Issue
Block a user