mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +00:00
Refified processService methods;
Add approve page and criate its layout; Finish functionality for list approve page
This commit is contained in:
@@ -1,17 +1,21 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { Routes, RouterModule } from '@angular/router';
|
||||
|
||||
import { AgendaPage } from './agenda.page';
|
||||
|
||||
const routes: Routes = [
|
||||
{
|
||||
path: '',
|
||||
component: AgendaPage
|
||||
import { NgModule } from '@angular/core';
|
||||
import { Routes, RouterModule } from '@angular/router';
|
||||
|
||||
import { AgendaPage } from './agenda.page';
|
||||
|
||||
const routes: Routes = [
|
||||
{
|
||||
path: '',
|
||||
component: AgendaPage
|
||||
},
|
||||
{
|
||||
path: 'approve-event-modal',
|
||||
loadChildren: () => import('./approve-event-modal/approve-event-modal.module').then( m => m.ApproveEventModalPageModule)
|
||||
];
|
||||
}
|
||||
@NgModule({
|
||||
imports: [RouterModule.forChild(routes)],
|
||||
exports: [RouterModule],
|
||||
})
|
||||
export class AgendaPageRoutingModule {}
|
||||
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
imports: [RouterModule.forChild(routes)],
|
||||
exports: [RouterModule],
|
||||
})
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { Routes, RouterModule } from '@angular/router';
|
||||
|
||||
import { ApproveEventModalPage } from './approve-event-modal.page';
|
||||
|
||||
const routes: Routes = [
|
||||
{
|
||||
path: '',
|
||||
component: ApproveEventModalPage
|
||||
}
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
imports: [RouterModule.forChild(routes)],
|
||||
exports: [RouterModule],
|
||||
})
|
||||
export class ApproveEventModalPageRoutingModule {}
|
||||
@@ -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 { ApproveEventModalPageRoutingModule } from './approve-event-modal-routing.module';
|
||||
|
||||
import { ApproveEventModalPage } from './approve-event-modal.page';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule,
|
||||
FormsModule,
|
||||
IonicModule,
|
||||
ApproveEventModalPageRoutingModule
|
||||
],
|
||||
declarations: [ApproveEventModalPage]
|
||||
})
|
||||
export class ApproveEventModalPageModule {}
|
||||
@@ -0,0 +1,52 @@
|
||||
<ion-header>
|
||||
<ion-toolbar>
|
||||
<ion-buttons slot="start">
|
||||
<ion-back-button defaultHref="" (click)="close()"></ion-back-button>
|
||||
</ion-buttons>
|
||||
<ion-title>{{loadedEvent.workflowInstanceDataFields.Subject}}</ion-title>
|
||||
</ion-toolbar>
|
||||
</ion-header>
|
||||
|
||||
<ion-content>
|
||||
<ion-item lines="none">
|
||||
<p class="location-detail">{{loadedEvent.workflowInstanceDataFields.Location}}</p>
|
||||
<ion-button class="button-calendar-type" class="button-calendar-type" slot="end">{{loadedEvent.workflowInstanceDataFields.Agenda}}</ion-button>
|
||||
</ion-item>
|
||||
<ion-item>
|
||||
<ion-label>
|
||||
<p>{{loadedEvent.workflowInstanceDataFields.StartDate | date: 'fullDate'}}</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>
|
||||
</ion-item>
|
||||
<ion-item>
|
||||
<ion-label>
|
||||
<h3>Intervenientes</h3>
|
||||
<p>{{loadedEvent.workflowInstanceDataFields.Participants}}</p>
|
||||
</ion-label>
|
||||
</ion-item>
|
||||
<ion-item>
|
||||
<ion-label>
|
||||
<h3>Detalhes</h3>
|
||||
<p>MINEC, MINFIN</p>
|
||||
</ion-label>
|
||||
</ion-item>
|
||||
<ion-item lines="none">
|
||||
<ion-label>
|
||||
<h3>Documentos</h3>
|
||||
<ion-item>
|
||||
<ion-label>
|
||||
<h4>Lei do Orçamento Geral do Estado</h4>
|
||||
<p><span>MINEC, MINFIN</span><span>13/04/2020</span></p>
|
||||
</ion-label>
|
||||
</ion-item>
|
||||
</ion-label>
|
||||
</ion-item>
|
||||
</ion-content>
|
||||
<ion-footer>
|
||||
<ion-toolbar>
|
||||
<ion-button class="button-edit-event" shape="round" (click)="editEvent()">Emendar</ion-button>
|
||||
<ion-button class="button-options" shape="round" (click)="openOptions()"><ion-icon name="ellipsis-vertical-outline"></ion-icon></ion-button>
|
||||
<ion-button shape="round" (click)="approveEvent()">Aprovar</ion-button>
|
||||
</ion-toolbar>
|
||||
</ion-footer>
|
||||
@@ -0,0 +1,26 @@
|
||||
.location-detail{
|
||||
font-size: 18px;
|
||||
}
|
||||
.button-calendar-type{
|
||||
width: 91px;
|
||||
height: 25px;
|
||||
--border-radius: 12.5px;
|
||||
--background-color: #ffb703;
|
||||
}
|
||||
.button-edit-event {
|
||||
width: 170px;
|
||||
height: 44px;
|
||||
border-radius: 22.5px;
|
||||
background-color: #e0e9ee;
|
||||
}
|
||||
.button-options {
|
||||
width: 36px;
|
||||
height: 35px;
|
||||
object-fit: contain;
|
||||
}
|
||||
.button-approve {
|
||||
width: 170px;
|
||||
height: 44px;
|
||||
border-radius: 22.5px;
|
||||
background-color: #42b9fe;
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { IonicModule } from '@ionic/angular';
|
||||
|
||||
import { ApproveEventModalPage } from './approve-event-modal.page';
|
||||
|
||||
describe('ApproveEventModalPage', () => {
|
||||
let component: ApproveEventModalPage;
|
||||
let fixture: ComponentFixture<ApproveEventModalPage>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ ApproveEventModalPage ],
|
||||
imports: [IonicModule.forRoot()]
|
||||
}).compileComponents();
|
||||
|
||||
fixture = TestBed.createComponent(ApproveEventModalPage);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
}));
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,75 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { Router } from '@angular/router';
|
||||
import { ModalController, NavParams } from '@ionic/angular';
|
||||
import { Event } from 'src/app/models/event.model';
|
||||
import { ProcessesService } from 'src/app/services/processes.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-approve-event-modal',
|
||||
templateUrl: './approve-event-modal.page.html',
|
||||
styleUrls: ['./approve-event-modal.page.scss'],
|
||||
})
|
||||
export class ApproveEventModalPage implements OnInit {
|
||||
event: Event;
|
||||
loadedEvent:any;
|
||||
serialNumber:string;
|
||||
|
||||
constructor(
|
||||
private router:Router,
|
||||
private modalController: ModalController,
|
||||
private navParams: NavParams,
|
||||
private processes:ProcessesService,
|
||||
)
|
||||
{
|
||||
this.serialNumber = this.navParams.get('serialNumber');
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
console.log(this.serialNumber);
|
||||
this.getTask();
|
||||
|
||||
this.event = {
|
||||
EventId: '1',
|
||||
Subject: 'Reunião do Conselho de Ministros',
|
||||
Body: null,
|
||||
Location: 'Palácio Presidencial, Luanda',
|
||||
CalendarId: 'string',
|
||||
CalendarName: 'Oficial',
|
||||
StartDate: new Date,
|
||||
EndDate: new Date,
|
||||
EventType: 'Reunião',
|
||||
Attendees: null,
|
||||
IsMeeting: true,
|
||||
IsRecurring: false,
|
||||
AppointmentState: 2,
|
||||
TimeZone: '',
|
||||
Organizer: '',
|
||||
Categories: null,
|
||||
HasAttachments: false,
|
||||
}
|
||||
|
||||
}
|
||||
close(){
|
||||
this.router.navigate(['/home/gabinete-digital']);
|
||||
this.modalController.dismiss(null);
|
||||
}
|
||||
getTask(){
|
||||
this.processes.GetTask(this.serialNumber).subscribe(res => {
|
||||
console.log(res);
|
||||
this.loadedEvent = res;
|
||||
})
|
||||
|
||||
}
|
||||
editEvent(){
|
||||
|
||||
}
|
||||
openOptions(){
|
||||
|
||||
}
|
||||
approveEvent(){
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user