mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 13:26:08 +00:00
New changes added + AddEvent method partially done
This commit is contained in:
@@ -41,7 +41,16 @@ const routes: Routes = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
path:':expedienteId',
|
path:':expedienteId',
|
||||||
loadChildren: ()=> import('../pages/gabinete-digital/expediente/expediente.module').then(m => m.ExpedientePageModule)
|
children: [
|
||||||
|
{
|
||||||
|
path:'',
|
||||||
|
loadChildren: ()=> import('../pages/gabinete-digital/expediente/expediente.module').then(m => m.ExpedientePageModule)
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path:':expediente-detailId',
|
||||||
|
loadChildren: ()=> import('../pages/gabinete-digital/expediente/expediente-detail/expediente-detail.module').then(m => m.ExpedienteDetailPageModule)
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -13,36 +13,36 @@
|
|||||||
<div class="div-ion-content">
|
<div class="div-ion-content">
|
||||||
<ion-item>
|
<ion-item>
|
||||||
<ion-label position="stacked">Assunto</ion-label>
|
<ion-label position="stacked">Assunto</ion-label>
|
||||||
<ion-input tpye="text" [(ngModel)]="event.title"></ion-input>
|
<ion-input tpye="text" [(ngModel)]="postEvent.Subject"></ion-input>
|
||||||
</ion-item>
|
</ion-item>
|
||||||
<ion-item>
|
<ion-item>
|
||||||
<ion-label position="stacked">Descrição</ion-label>
|
<ion-label position="stacked">Descrição</ion-label>
|
||||||
<ion-input tpye="text" [(ngModel)]="event.desc"></ion-input>
|
<ion-input tpye="text" [(ngModel)]="postEvent.Body.Text"></ion-input>
|
||||||
</ion-item>
|
</ion-item>
|
||||||
<ion-item>
|
<ion-item>
|
||||||
<ion-label position="stacked">Localização</ion-label>
|
<ion-label position="stacked">Localização</ion-label>
|
||||||
<ion-input tpye="text" [(ngModel)]="event.place"></ion-input>
|
<ion-input tpye="text" [(ngModel)]="postEvent.Location"></ion-input>
|
||||||
</ion-item>
|
</ion-item>
|
||||||
<ion-item>
|
<ion-item>
|
||||||
<ion-label position="stacked">Intervenientes</ion-label>
|
<ion-label position="stacked">Intervenientes</ion-label>
|
||||||
<ion-input tpye="text" [(ngModel)]="event.people"></ion-input>
|
<ion-input tpye="text" [(ngModel)]="postEvent.RequiredAttendees.Name"></ion-input>
|
||||||
</ion-item>
|
</ion-item>
|
||||||
<ion-list>
|
<ion-list>
|
||||||
<ion-radio-group value="biff">
|
<ion-radio-group value="biff">
|
||||||
<ion-item class="radio-button" lines="none">
|
<ion-item class="radio-button" lines="none">
|
||||||
<ion-label>Oficial</ion-label>
|
<ion-label>Oficial</ion-label>
|
||||||
<ion-radio [(ngModel)]="event.type" slot="start" value="biff"></ion-radio>
|
<ion-radio [(ngModel)]="postEvent.CalendarName" slot="start" value="biff"></ion-radio>
|
||||||
</ion-item>
|
</ion-item>
|
||||||
|
|
||||||
<ion-item class="radio-button" lines="none">
|
<ion-item class="radio-button" lines="none">
|
||||||
<ion-label>Pessoal</ion-label>
|
<ion-label>Pessoal</ion-label>
|
||||||
<ion-radio slot="start" value="griff"></ion-radio>
|
<ion-radio [(ngModel)]="postEvent.CalendarName" slot="start" value="griff"></ion-radio>
|
||||||
</ion-item>
|
</ion-item>
|
||||||
</ion-radio-group>
|
</ion-radio-group>
|
||||||
</ion-list>
|
</ion-list>
|
||||||
<ion-item>
|
<ion-item>
|
||||||
<ion-label>Selecione o tipo de evento</ion-label>
|
<ion-label>Selecione o tipo de evento</ion-label>
|
||||||
<ion-select interface="action-sheet" class="custom-options" Cancel-text="Cancelar">
|
<ion-select [(ngModel)]="postEvent.EventType" interface="action-sheet" class="custom-options" Cancel-text="Cancelar">
|
||||||
<ion-select-option value="Reunião">Reunião</ion-select-option>
|
<ion-select-option value="Reunião">Reunião</ion-select-option>
|
||||||
<ion-select-option value="Viagem">Viagem</ion-select-option>
|
<ion-select-option value="Viagem">Viagem</ion-select-option>
|
||||||
<ion-select-option value="Conferência">Conferência</ion-select-option>
|
<ion-select-option value="Conferência">Conferência</ion-select-option>
|
||||||
@@ -51,13 +51,13 @@
|
|||||||
</ion-item>
|
</ion-item>
|
||||||
<ion-item>
|
<ion-item>
|
||||||
<ion-label>Data Início</ion-label>
|
<ion-label>Data Início</ion-label>
|
||||||
<ion-datetime value="2005-06-17T11:06Z" min="1990" max="2020"
|
<ion-datetime [(ngModel)]="postEvent.StartDate" value="2005-06-17T11:06Z" min="1990" max="2020"
|
||||||
displayFormat="D MMM YYYY H:mm"
|
displayFormat="D MMM YYYY H:mm"
|
||||||
monthShortNames="Jan, Fev, Mar, Abr, Mai, Jun, Jul, Aug, Sep, Out, Nov, Dez"></ion-datetime>
|
monthShortNames="Jan, Fev, Mar, Abr, Mai, Jun, Jul, Aug, Sep, Out, Nov, Dez"></ion-datetime>
|
||||||
</ion-item>
|
</ion-item>
|
||||||
<ion-item>
|
<ion-item>
|
||||||
<ion-label>Data Fim</ion-label>
|
<ion-label>Data Fim</ion-label>
|
||||||
<ion-datetime value="2005-06-17T11:06Z" min="1990" max="2020"
|
<ion-datetime [(ngModel)]="postEvent.EndDate" value="2005-06-17T11:06Z" min="1990" max="2020"
|
||||||
displayFormat="D MMM YYYY H:mm"
|
displayFormat="D MMM YYYY H:mm"
|
||||||
monthShortNames="Jan, Fev, Mar, Abr, Mai, Jun, Jul, Aug, Sep, Out, Nov, Dez"></ion-datetime>
|
monthShortNames="Jan, Fev, Mar, Abr, Mai, Jun, Jul, Aug, Sep, Out, Nov, Dez"></ion-datetime>
|
||||||
</ion-item>
|
</ion-item>
|
||||||
@@ -65,14 +65,15 @@
|
|||||||
<ion-item>
|
<ion-item>
|
||||||
<ion-icon name="add" slot="end"></ion-icon>
|
<ion-icon name="add" slot="end"></ion-icon>
|
||||||
<ion-label class="attach-label">Anexos</ion-label>
|
<ion-label class="attach-label">Anexos</ion-label>
|
||||||
|
|
||||||
</ion-item>
|
</ion-item>
|
||||||
<div id="AttachFiles"></div>
|
<div id="AttachFiles"></div>
|
||||||
|
<ion-list [(ngModel)]="postEvent.Attachments">
|
||||||
<ion-item lines="none">
|
<ion-item lines="none">
|
||||||
<ion-icon name="attach"></ion-icon>
|
<ion-icon name="attach"></ion-icon>
|
||||||
<ion-label color="secondary">Lei do orçamento geral do Estado</ion-label>
|
<ion-label color="secondary">Lei do orçamento geral do Estado</ion-label>
|
||||||
<ion-icon name="trash" slot="end"></ion-icon>
|
<ion-icon name="trash" slot="end"></ion-icon>
|
||||||
</ion-item>
|
</ion-item>
|
||||||
|
</ion-list>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</ion-content>
|
</ion-content>
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
import { Component, OnInit, AfterViewInit } from '@angular/core';
|
import { Component, OnInit, AfterViewInit } from '@angular/core';
|
||||||
import { ModalController } from '@ionic/angular';
|
import { ModalController } from '@ionic/angular';
|
||||||
|
|
||||||
|
import { Event } from '../../models/event.model';
|
||||||
|
import { EventsService } from 'src/app/services/events.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-cal-modal',
|
selector: 'app-cal-modal',
|
||||||
templateUrl: './cal-modal.page.html',
|
templateUrl: './cal-modal.page.html',
|
||||||
@@ -15,22 +18,31 @@ export class CalModalPage implements AfterViewInit {
|
|||||||
|
|
||||||
viewTitle: string;
|
viewTitle: string;
|
||||||
|
|
||||||
event = {
|
public postEvent: Event = {
|
||||||
title: '',
|
EventId: '',
|
||||||
desc: '',
|
Subject: '',
|
||||||
place: '',
|
Body: null,
|
||||||
people: '',
|
Location: '',
|
||||||
group: '',
|
CalendarId: '',
|
||||||
type: '',
|
CalendarName: '',
|
||||||
frequency: '',
|
StartDate: '',
|
||||||
startTime: null,
|
EndDate: '',
|
||||||
endTime: null,
|
EventType: '',
|
||||||
allDay: true
|
RequiredAttendees: null,
|
||||||
|
OptionalAttendees: null,
|
||||||
|
HasAttachments: false,
|
||||||
|
IsMeeting: false,
|
||||||
|
IsRecurring: false,
|
||||||
|
AppointmentState: 0,
|
||||||
|
TimeZone: '',
|
||||||
|
Organizer: '',
|
||||||
|
Categories: null,
|
||||||
|
Attachments: null,
|
||||||
};
|
};
|
||||||
|
|
||||||
modalReady = false;
|
modalReady = false;
|
||||||
|
|
||||||
constructor(private modalCtrl: ModalController) { }
|
constructor(private modalCtrl: ModalController, private eventService: EventsService) { }
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
}
|
}
|
||||||
@@ -42,7 +54,11 @@ export class CalModalPage implements AfterViewInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
save(){
|
save(){
|
||||||
this.modalCtrl.dismiss({event: this.event})
|
this.modalCtrl.dismiss({postEvent: this.eventService.AddEvent(this.postEvent)});
|
||||||
|
/* this.eventService.AddEvent(); */
|
||||||
|
console.log("created");
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
onViewTitleChanged(title){
|
onViewTitleChanged(title){
|
||||||
@@ -50,7 +66,8 @@ export class CalModalPage implements AfterViewInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
onTimeSelected(ev){
|
onTimeSelected(ev){
|
||||||
this.event.startTime = new Date(ev.selectedTime);
|
/* this.postEvent.startTime = new Date(ev.selectedTime); */
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
close(){
|
close(){
|
||||||
|
|||||||
@@ -1,20 +0,0 @@
|
|||||||
import { NgModule } from '@angular/core';
|
|
||||||
import { CommonModule } from '@angular/common';
|
|
||||||
import { FormsModule } from '@angular/forms';
|
|
||||||
|
|
||||||
import { IonicModule } from '@ionic/angular';
|
|
||||||
|
|
||||||
import { GabineteDigitalMenuPageRoutingModule } from './gabinete-digital-menu-routing.module';
|
|
||||||
|
|
||||||
import { GabineteDigitalMenuPage } from './gabinete-digital-menu.page';
|
|
||||||
|
|
||||||
@NgModule({
|
|
||||||
imports: [
|
|
||||||
CommonModule,
|
|
||||||
FormsModule,
|
|
||||||
IonicModule,
|
|
||||||
GabineteDigitalMenuPageRoutingModule
|
|
||||||
],
|
|
||||||
declarations: [GabineteDigitalMenuPage]
|
|
||||||
})
|
|
||||||
export class GabineteDigitalMenuPageModule {}
|
|
||||||
@@ -1,53 +0,0 @@
|
|||||||
<ion-header>
|
|
||||||
<ion-toolbar>
|
|
||||||
<ion-title>Gbinete Digital</ion-title>
|
|
||||||
</ion-toolbar>
|
|
||||||
</ion-header>
|
|
||||||
|
|
||||||
<ion-content>
|
|
||||||
<ion-card color="#d4d5ca">
|
|
||||||
<ion-card-header>
|
|
||||||
<ion-card-title>Expediente</ion-card-title>
|
|
||||||
<ion-card-content>
|
|
||||||
<ion-item (click)="load()">
|
|
||||||
<ion-label>Correspondência</ion-label>
|
|
||||||
<ion-button slot="end">1</ion-button>
|
|
||||||
</ion-item>
|
|
||||||
<ion-item (click)="load()" class="ion-activated">
|
|
||||||
<ion-label>Pedidos de parecer</ion-label>
|
|
||||||
<ion-button slot="end">1</ion-button>
|
|
||||||
</ion-item>
|
|
||||||
<ion-item (click)="load()">
|
|
||||||
<ion-label>Pedidos de deferimento</ion-label>
|
|
||||||
<ion-button slot="end">1</ion-button>
|
|
||||||
</ion-item>
|
|
||||||
</ion-card-content>
|
|
||||||
</ion-card-header>
|
|
||||||
</ion-card>
|
|
||||||
<ion-card color="#d4d5ca">
|
|
||||||
<ion-card-header>
|
|
||||||
<ion-card-title>Diplomas</ion-card-title>
|
|
||||||
<ion-card-content>
|
|
||||||
<ion-item (click)="load()" class="ion-item-change-color">
|
|
||||||
<ion-label>Assinados pelo PR</ion-label>
|
|
||||||
<ion-button slot="end">1</ion-button>
|
|
||||||
</ion-item>
|
|
||||||
<ion-item primary (click)="load()" class="ion-activated">
|
|
||||||
<ion-label>Por validar (MDGPR)</ion-label>
|
|
||||||
<ion-button slot="end">1</ion-button>
|
|
||||||
</ion-item>
|
|
||||||
</ion-card-content>
|
|
||||||
</ion-card-header>
|
|
||||||
</ion-card>
|
|
||||||
<ion-card color="#d4d5ca">
|
|
||||||
<ion-card-header>
|
|
||||||
<ion-card-title>Despachos Efectuados</ion-card-title>
|
|
||||||
<ion-card-content>
|
|
||||||
<ion-item (click)="load()" class="ion-item-change-color">
|
|
||||||
<ion-label>Presidente da República</ion-label>
|
|
||||||
<ion-button slot="end">1</ion-button>
|
|
||||||
</ion-item>
|
|
||||||
</ion-card-content>
|
|
||||||
</ion-card-header>
|
|
||||||
</ion-card>
|
|
||||||
</ion-content>
|
|
||||||
@@ -1,29 +0,0 @@
|
|||||||
:host{
|
|
||||||
ion-card-title{
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
ion-card{
|
|
||||||
background-color: #d4d5ca;
|
|
||||||
}
|
|
||||||
ion-item{
|
|
||||||
--ion-background-color:#dae3f3;
|
|
||||||
margin-bottom: 10px;
|
|
||||||
border-radius: 5px;
|
|
||||||
}
|
|
||||||
ion-button{
|
|
||||||
color: #000;
|
|
||||||
--background:none;
|
|
||||||
--border-color: none;
|
|
||||||
--box-shadow:none;
|
|
||||||
}
|
|
||||||
ion-label{
|
|
||||||
padding: 10px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.ion-item-change-color{
|
|
||||||
--ion-background-color:#fff2cc !important;
|
|
||||||
margin-bottom: 10px;
|
|
||||||
border-radius: 5px;
|
|
||||||
}
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
import { Component, OnInit } from '@angular/core';
|
|
||||||
|
|
||||||
@Component({
|
|
||||||
selector: 'app-gabinete-digital-menu',
|
|
||||||
templateUrl: './gabinete-digital-menu.page.html',
|
|
||||||
styleUrls: ['./gabinete-digital-menu.page.scss'],
|
|
||||||
})
|
|
||||||
export class GabineteDigitalMenuPage implements OnInit {
|
|
||||||
|
|
||||||
constructor() { }
|
|
||||||
|
|
||||||
ngOnInit() {
|
|
||||||
}
|
|
||||||
|
|
||||||
load(){
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
+3
-3
@@ -1,12 +1,12 @@
|
|||||||
import { NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { Routes, RouterModule } from '@angular/router';
|
import { Routes, RouterModule } from '@angular/router';
|
||||||
|
|
||||||
import { GabineteDigitalMenuPage } from './gabinete-digital-menu.page';
|
import { ExpedienteModalPage } from './expediente-modal.page';
|
||||||
|
|
||||||
const routes: Routes = [
|
const routes: Routes = [
|
||||||
{
|
{
|
||||||
path: '',
|
path: '',
|
||||||
component: GabineteDigitalMenuPage
|
component: ExpedienteModalPage
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
@@ -14,4 +14,4 @@ const routes: Routes = [
|
|||||||
imports: [RouterModule.forChild(routes)],
|
imports: [RouterModule.forChild(routes)],
|
||||||
exports: [RouterModule],
|
exports: [RouterModule],
|
||||||
})
|
})
|
||||||
export class GabineteDigitalMenuPageRoutingModule {}
|
export class ExpedienteModalPageRoutingModule {}
|
||||||
@@ -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 { ExpedienteModalPageRoutingModule } from './expediente-modal-routing.module';
|
||||||
|
|
||||||
|
import { ExpedienteModalPage } from './expediente-modal.page';
|
||||||
|
|
||||||
|
@NgModule({
|
||||||
|
imports: [
|
||||||
|
CommonModule,
|
||||||
|
FormsModule,
|
||||||
|
IonicModule,
|
||||||
|
ExpedienteModalPageRoutingModule
|
||||||
|
],
|
||||||
|
declarations: [ExpedienteModalPage]
|
||||||
|
})
|
||||||
|
export class ExpedienteModalPageModule {}
|
||||||
@@ -0,0 +1,60 @@
|
|||||||
|
<ion-header>
|
||||||
|
<ion-toolbar>
|
||||||
|
<ion-buttons slot="start">
|
||||||
|
<ion-button (click)="close()">
|
||||||
|
<ion-icon name="chevron-back" slot="start"></ion-icon>
|
||||||
|
</ion-button>
|
||||||
|
</ion-buttons>
|
||||||
|
<ion-title>Novo Processo</ion-title>
|
||||||
|
</ion-toolbar>
|
||||||
|
</ion-header>
|
||||||
|
|
||||||
|
<ion-content padding>
|
||||||
|
<ion-item-group>
|
||||||
|
<ion-item>
|
||||||
|
<ion-label position="stacked">Assunto</ion-label>
|
||||||
|
<ion-input></ion-input>
|
||||||
|
</ion-item>
|
||||||
|
<ion-item>
|
||||||
|
<ion-label position="stacked">Remetentes</ion-label>
|
||||||
|
<ion-list>
|
||||||
|
<ion-item>
|
||||||
|
<ion-input></ion-input>
|
||||||
|
</ion-item>
|
||||||
|
</ion-list>
|
||||||
|
</ion-item>
|
||||||
|
<ion-item>
|
||||||
|
<ion-label position="stacked">Data</ion-label>
|
||||||
|
<ion-input></ion-input>
|
||||||
|
</ion-item>
|
||||||
|
<div class="div-attach">
|
||||||
|
<ion-item>
|
||||||
|
<ion-icon name="add" slot="end"></ion-icon>
|
||||||
|
<ion-label class="attach-label">Anexos</ion-label>
|
||||||
|
</ion-item>
|
||||||
|
<div id="AttachFiles"></div>
|
||||||
|
<ion-item lines="none">
|
||||||
|
<ion-icon name="attach"></ion-icon>
|
||||||
|
<ion-label color="secondary">Lei do orçamento geral do Estado</ion-label>
|
||||||
|
<ion-icon name="trash" slot="end"></ion-icon>
|
||||||
|
</ion-item>
|
||||||
|
</div>
|
||||||
|
</ion-item-group>
|
||||||
|
</ion-content>
|
||||||
|
<ion-footer class="ion-no-border">
|
||||||
|
<ion-toolbar color="primary">
|
||||||
|
<ion-buttons slot="start">
|
||||||
|
<ion-button (click)="close()">
|
||||||
|
<ion-label>Cancelar</ion-label>
|
||||||
|
<ion-icon name="close" slot="start"></ion-icon>
|
||||||
|
</ion-button>
|
||||||
|
</ion-buttons>
|
||||||
|
<ion-title>{{ viewTitle }}</ion-title>
|
||||||
|
<ion-buttons slot="end">
|
||||||
|
<ion-button (click)="save()">
|
||||||
|
<ion-label>Guardar</ion-label>
|
||||||
|
<ion-icon name="checkmark" slot="start"></ion-icon>
|
||||||
|
</ion-button>
|
||||||
|
</ion-buttons>
|
||||||
|
</ion-toolbar>
|
||||||
|
</ion-footer>
|
||||||
+6
-6
@@ -1,19 +1,19 @@
|
|||||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
import { IonicModule } from '@ionic/angular';
|
import { IonicModule } from '@ionic/angular';
|
||||||
|
|
||||||
import { GabineteDigitalMenuPage } from './gabinete-digital-menu.page';
|
import { ExpedienteModalPage } from './expediente-modal.page';
|
||||||
|
|
||||||
describe('GabineteDigitalMenuPage', () => {
|
describe('ExpedienteModalPage', () => {
|
||||||
let component: GabineteDigitalMenuPage;
|
let component: ExpedienteModalPage;
|
||||||
let fixture: ComponentFixture<GabineteDigitalMenuPage>;
|
let fixture: ComponentFixture<ExpedienteModalPage>;
|
||||||
|
|
||||||
beforeEach(async(() => {
|
beforeEach(async(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
declarations: [ GabineteDigitalMenuPage ],
|
declarations: [ ExpedienteModalPage ],
|
||||||
imports: [IonicModule.forRoot()]
|
imports: [IonicModule.forRoot()]
|
||||||
}).compileComponents();
|
}).compileComponents();
|
||||||
|
|
||||||
fixture = TestBed.createComponent(GabineteDigitalMenuPage);
|
fixture = TestBed.createComponent(ExpedienteModalPage);
|
||||||
component = fixture.componentInstance;
|
component = fixture.componentInstance;
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
}));
|
}));
|
||||||
@@ -0,0 +1,46 @@
|
|||||||
|
import { Component, OnInit } from '@angular/core';
|
||||||
|
import { ModalController } from '@ionic/angular';
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: 'app-expediente-modal',
|
||||||
|
templateUrl: './expediente-modal.page.html',
|
||||||
|
styleUrls: ['./expediente-modal.page.scss'],
|
||||||
|
})
|
||||||
|
export class ExpedienteModalPage implements OnInit {
|
||||||
|
|
||||||
|
viewTitle: string;
|
||||||
|
|
||||||
|
expediente = {
|
||||||
|
title: '',
|
||||||
|
desc: '',
|
||||||
|
};
|
||||||
|
|
||||||
|
modalReady = false;
|
||||||
|
|
||||||
|
constructor(private modalCtrl: ModalController) { }
|
||||||
|
|
||||||
|
ngOnInit() {
|
||||||
|
}
|
||||||
|
|
||||||
|
ngAfterViewInit(): void {
|
||||||
|
setTimeout(()=>{
|
||||||
|
this.modalReady = true;
|
||||||
|
}, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
save(){
|
||||||
|
this.modalCtrl.dismiss({event: this.expediente})
|
||||||
|
}
|
||||||
|
|
||||||
|
onViewTitleChanged(title){
|
||||||
|
this.viewTitle = title;
|
||||||
|
}
|
||||||
|
|
||||||
|
onTimeSelected(ev){
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
close(){
|
||||||
|
this.modalCtrl.dismiss();
|
||||||
|
}
|
||||||
|
}
|
||||||
+17
@@ -0,0 +1,17 @@
|
|||||||
|
import { NgModule } from '@angular/core';
|
||||||
|
import { Routes, RouterModule } from '@angular/router';
|
||||||
|
|
||||||
|
import { ExpedienteDetailPage } from './expediente-detail.page';
|
||||||
|
|
||||||
|
const routes: Routes = [
|
||||||
|
{
|
||||||
|
path: '',
|
||||||
|
component: ExpedienteDetailPage
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
@NgModule({
|
||||||
|
imports: [RouterModule.forChild(routes)],
|
||||||
|
exports: [RouterModule],
|
||||||
|
})
|
||||||
|
export class ExpedienteDetailPageRoutingModule {}
|
||||||
+20
@@ -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 { ExpedienteDetailPageRoutingModule } from './expediente-detail-routing.module';
|
||||||
|
|
||||||
|
import { ExpedienteDetailPage } from './expediente-detail.page';
|
||||||
|
|
||||||
|
@NgModule({
|
||||||
|
imports: [
|
||||||
|
CommonModule,
|
||||||
|
FormsModule,
|
||||||
|
IonicModule,
|
||||||
|
ExpedienteDetailPageRoutingModule
|
||||||
|
],
|
||||||
|
declarations: [ExpedienteDetailPage]
|
||||||
|
})
|
||||||
|
export class ExpedienteDetailPageModule {}
|
||||||
+40
@@ -0,0 +1,40 @@
|
|||||||
|
<ion-header>
|
||||||
|
<ion-toolbar>
|
||||||
|
<ion-buttons slot="start">
|
||||||
|
<ion-back-button defaultHref="/expediente"></ion-back-button>
|
||||||
|
</ion-buttons>
|
||||||
|
<ion-title>Detalhes do Processo</ion-title>
|
||||||
|
</ion-toolbar>
|
||||||
|
</ion-header>
|
||||||
|
|
||||||
|
<ion-content padding>
|
||||||
|
<ion-item-group>
|
||||||
|
<ion-item>
|
||||||
|
<ion-label position="stacked">Assunto</ion-label>
|
||||||
|
<ion-input value='Reunião de Conselho de Ministros'></ion-input>
|
||||||
|
</ion-item>
|
||||||
|
<ion-item>
|
||||||
|
<ion-label position="stacked">Remetentes</ion-label>
|
||||||
|
<ion-list>
|
||||||
|
<ion-item>
|
||||||
|
<ion-input value='MINEC'></ion-input>
|
||||||
|
</ion-item>
|
||||||
|
</ion-list>
|
||||||
|
</ion-item>
|
||||||
|
<ion-item>
|
||||||
|
<ion-label position="stacked">Data</ion-label>
|
||||||
|
<ion-input value=''></ion-input>
|
||||||
|
</ion-item>
|
||||||
|
<ion-list>
|
||||||
|
<ion-list-header>Documentos a Anexar</ion-list-header>
|
||||||
|
<ion-item>
|
||||||
|
<ion-icon name="attach" slot="start"></ion-icon>
|
||||||
|
<ion-label>Lei do orçamento geral do Estado</ion-label>
|
||||||
|
</ion-item>
|
||||||
|
</ion-list>
|
||||||
|
</ion-item-group>
|
||||||
|
<div class="event-detail-buttons">
|
||||||
|
<ion-button class="ion-button-right">Guardar</ion-button>
|
||||||
|
</div>
|
||||||
|
</ion-content>
|
||||||
|
|
||||||
+14
@@ -0,0 +1,14 @@
|
|||||||
|
.event-detail-buttons{
|
||||||
|
width: 80%;
|
||||||
|
margin: 10px auto;
|
||||||
|
}
|
||||||
|
.event-detail-buttons ion-button{
|
||||||
|
width: 40%;
|
||||||
|
}
|
||||||
|
.ion-button-left{
|
||||||
|
float: left;
|
||||||
|
background: none;
|
||||||
|
}
|
||||||
|
.ion-button-right{
|
||||||
|
float: right;
|
||||||
|
}
|
||||||
+24
@@ -0,0 +1,24 @@
|
|||||||
|
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
|
import { IonicModule } from '@ionic/angular';
|
||||||
|
|
||||||
|
import { ExpedienteDetailPage } from './expediente-detail.page';
|
||||||
|
|
||||||
|
describe('ExpedienteDetailPage', () => {
|
||||||
|
let component: ExpedienteDetailPage;
|
||||||
|
let fixture: ComponentFixture<ExpedienteDetailPage>;
|
||||||
|
|
||||||
|
beforeEach(async(() => {
|
||||||
|
TestBed.configureTestingModule({
|
||||||
|
declarations: [ ExpedienteDetailPage ],
|
||||||
|
imports: [IonicModule.forRoot()]
|
||||||
|
}).compileComponents();
|
||||||
|
|
||||||
|
fixture = TestBed.createComponent(ExpedienteDetailPage);
|
||||||
|
component = fixture.componentInstance;
|
||||||
|
fixture.detectChanges();
|
||||||
|
}));
|
||||||
|
|
||||||
|
it('should create', () => {
|
||||||
|
expect(component).toBeTruthy();
|
||||||
|
});
|
||||||
|
});
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
import { Component, OnInit } from '@angular/core';
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: 'app-expediente-detail',
|
||||||
|
templateUrl: './expediente-detail.page.html',
|
||||||
|
styleUrls: ['./expediente-detail.page.scss'],
|
||||||
|
})
|
||||||
|
export class ExpedienteDetailPage implements OnInit {
|
||||||
|
|
||||||
|
constructor() { }
|
||||||
|
|
||||||
|
ngOnInit() {
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -7,6 +7,10 @@ const routes: Routes = [
|
|||||||
{
|
{
|
||||||
path: '',
|
path: '',
|
||||||
component: ExpedientePage
|
component: ExpedientePage
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'expediente-detail',
|
||||||
|
loadChildren: () => import('./expediente-detail/expediente-detail.module').then( m => m.ExpedienteDetailPageModule)
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
<ion-item-sliding>
|
<ion-item-sliding>
|
||||||
<ion-item lines="none">
|
<ion-item lines="none">
|
||||||
<div class="div-content-expediente">
|
<div class="div-content-expediente">
|
||||||
<ion-item lines="none">
|
<ion-item lines="none" [routerLink]="['/home/gabinete-digital/1/1']">
|
||||||
<ion-icon slot="end" name="document-outline"></ion-icon>
|
<ion-icon slot="end" name="document-outline"></ion-icon>
|
||||||
<h3>Reunião de Conselho de Ministros</h3>
|
<h3>Reunião de Conselho de Ministros</h3>
|
||||||
</ion-item>
|
</ion-item>
|
||||||
@@ -50,19 +50,9 @@
|
|||||||
</ion-item-group>
|
</ion-item-group>
|
||||||
</ion-list>
|
</ion-list>
|
||||||
</div>
|
</div>
|
||||||
<!-- <p>Jaqueta corta-vento, dupla face, um lado estampado de camuflado exclusivo Element, do outro preto, ambos com estampa no peito esquerdo de quem veste, bolsos laterais e etiquetas personalizadas Element. Características Principais: Material: 100% Poliéster Garantia conta defeito de fabricação.
|
|
||||||
Jaqueta corta-vento, dupla face, um lado estampado de camuflado exclusivo Element, do outro preto, ambos com estampa no peito esquerdo de quem veste, bolsos laterais e etiquetas personalizadas Element. Características Principais: Material: 100% Poliéster Garantia conta defeito de fabricação.
|
|
||||||
Jaqueta corta-vento, dupla face, um lado estampado de camuflado exclusivo Element, do outro preto, ambos com estampa no peito esquerdo de quem veste, bolsos laterais e etiquetas personalizadas Element. Características Principais: Material: 100% Poliéster Garantia conta defeito de fabricação.
|
|
||||||
Jaqueta corta-vento, dupla face, um lado estampado de camuflado exclusivo Element, do outro preto, ambos com estampa no peito esquerdo de quem veste, bolsos laterais e etiquetas personalizadas Element. Características Principais: Material: 100% Poliéster Garantia conta defeito de fabricação.
|
|
||||||
Jaqueta corta-vento, dupla face, um lado estampado de camuflado exclusivo Element, do outro preto, ambos com estampa no peito esquerdo de quem veste, bolsos laterais e etiquetas personalizadas Element. Características Principais: Material: 100% Poliéster Garantia conta defeito de fabricação.
|
|
||||||
Jaqueta corta-vento, dupla face, um lado estampado de camuflado exclusivo Element, do outro preto, ambos com estampa no peito esquerdo de quem veste, bolsos laterais e etiquetas personalizadas Element. Características Principais: Material: 100% Poliéster Garantia conta defeito de fabricação.
|
|
||||||
Jaqueta corta-vento, dupla face, um lado estampado de camuflado exclusivo Element, do outro preto, ambos com estampa no peito esquerdo de quem veste, bolsos laterais e etiquetas personalizadas Element. Características Principais: Material: 100% Poliéster Garantia conta defeito de fabricação.
|
|
||||||
Jaqueta corta-vento, dupla face, um lado estampado de camuflado exclusivo Element, do outro preto, ambos com estampa no peito esquerdo de quem veste, bolsos laterais e etiquetas personalizadas Element. Características Principais: Material: 100% Poliéster Garantia conta defeito de fabricação.
|
|
||||||
Jaqueta corta-vento, dupla face, um lado estampado de camuflado exclusivo Element, do outro preto, ambos com estampa no peito esquerdo de quem veste, bolsos laterais e etiquetas personalizadas Element. Características Principais: Material: 100% Poliéster Garantia conta defeito de fabricação.
|
|
||||||
</p> -->
|
|
||||||
<ion-fab vertical="bottom" horizontal="end" slot="fixed">
|
<ion-fab vertical="bottom" horizontal="end" slot="fixed">
|
||||||
<ion-fab-button>
|
<ion-fab-button>
|
||||||
<ion-icon name="create"></ion-icon>
|
<ion-icon name="create" (click)="openExpedienteModal()"></ion-icon>
|
||||||
</ion-fab-button>
|
</ion-fab-button>
|
||||||
</ion-fab>
|
</ion-fab>
|
||||||
</ion-content>
|
</ion-content>
|
||||||
|
|||||||
@@ -1,4 +1,8 @@
|
|||||||
import { Component, OnInit } from '@angular/core';
|
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||||
|
import { Router } from '@angular/router';
|
||||||
|
import { ModalController } from '@ionic/angular';
|
||||||
|
import { ExpedienteModalPage } from '../expediente-modal/expediente-modal.page';
|
||||||
|
import { CalendarComponent } from 'ionic2-calendar';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-expediente',
|
selector: 'app-expediente',
|
||||||
@@ -9,11 +13,50 @@ export class ExpedientePage implements OnInit {
|
|||||||
|
|
||||||
segment:string;
|
segment:string;
|
||||||
|
|
||||||
constructor() { }
|
@ViewChild(CalendarComponent) myCal: CalendarComponent;
|
||||||
|
|
||||||
|
constructor(private router: Router,private modalCtrl: ModalController ) { }
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
//Inicializar segment
|
//Inicializar segment
|
||||||
this.segment = "expediente";
|
this.segment = "expediente";
|
||||||
}
|
}
|
||||||
|
async openExpedienteModal(){
|
||||||
|
const modal = await this.modalCtrl.create({
|
||||||
|
component: ExpedienteModalPage,
|
||||||
|
cssClass: 'expediente-modal',
|
||||||
|
backdropDismiss: false
|
||||||
|
});
|
||||||
|
|
||||||
|
await modal.present();
|
||||||
|
|
||||||
|
modal.onDidDismiss().then((result) => {
|
||||||
|
if (result.data && result.data.event) {
|
||||||
|
let event = result.data.event;
|
||||||
|
if (event.allDay) {
|
||||||
|
let start = event.startTime;
|
||||||
|
event.startTime = new Date(
|
||||||
|
Date.UTC(
|
||||||
|
start.getUTCFullYear(),
|
||||||
|
start.getUTCMonth(),
|
||||||
|
start.getUTCDate()
|
||||||
|
)
|
||||||
|
);
|
||||||
|
event.endTime = new Date(
|
||||||
|
Date.UTC(
|
||||||
|
start.getUTCFullYear(),
|
||||||
|
start.getUTCMonth(),
|
||||||
|
start.getUTCDate() + 1
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
/* Here you save the data entered */
|
||||||
|
/* this.eventSource.push(result.data.event); */
|
||||||
|
/* Here you load the data saved */
|
||||||
|
/* this.myCal.loadEvents(); */
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -10,6 +10,10 @@ const routes: Routes = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'expediente',
|
path: 'expediente',
|
||||||
|
loadChildren: () => import('./expediente/expediente.module').then( m => m.ExpedientePageModule)
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'expediente-modal',
|
||||||
loadChildren: () => import('../../Pages/gabinete-digital/expediente-modal/expediente-modal.module').then( m => m.ExpedienteModalPageModule)
|
loadChildren: () => import('../../Pages/gabinete-digital/expediente-modal/expediente-modal.module').then( m => m.ExpedienteModalPageModule)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import { HttpClient } from '@angular/common/http';
|
|||||||
import { Observable } from 'rxjs';
|
import { Observable } from 'rxjs';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Injectable({
|
@Injectable({
|
||||||
providedIn: 'root'
|
providedIn: 'root'
|
||||||
})
|
})
|
||||||
@@ -69,6 +70,49 @@ export class EventsService {
|
|||||||
return this.http.get<Event>(`${url + ev}`, this.options)
|
return this.http.get<Event>(`${url + ev}`, this.options)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
AddEvent(postEvent: any){
|
||||||
|
const url = 'http://gpr-dev-01.gabinetedigital.local/GabineteDigital.Services/api/calendar/PostEvent';
|
||||||
|
const mydata = JSON.stringify({
|
||||||
|
"AppointmentState":1,
|
||||||
|
"Body":{"BodyType":1,"Text":"Noooooo"},
|
||||||
|
"CalendarId":"AAMkAGMwNTJiZDY2LTZjN2MtNDgzYS1hNzAzLTZhZWRhNTk3ZWNiMAAuAAAAAABgX8u97PeNQrYTHXctnZkcAQB4Hy3hTowgSI7Yp8YAVgKKAAACCd9zAAA=",
|
||||||
|
"EndDate":"8/16/2020 6:00:00 PM",
|
||||||
|
"EventType":"Single","HasAttachments":false,
|
||||||
|
"IsMeeting":true,"IsRecurring":false,
|
||||||
|
"Location":postEvent.Location,
|
||||||
|
"OptionalAttendees":null,
|
||||||
|
"Organizer":{"EmailAddress":"paulo.pinto@gabinetedigital.local","Name":"Paulo Pinto"},
|
||||||
|
"RequiredAttendees":[{"EmailAddress":"Administrator@gabinetedigital.local","Name":"Administrator"},{"EmailAddress":"tiago.kayaya@gabinetedigital.local","Name":"Tiago Kayaya"}],
|
||||||
|
"StartDate":"8/14/2020 5:30:00 PM",
|
||||||
|
"Subject":postEvent.Subject,
|
||||||
|
"TimeZone":"(UTC+01:00) Centro-Oeste da África"});
|
||||||
|
/* const options = {
|
||||||
|
method: 'post',
|
||||||
|
url: 'url',
|
||||||
|
headears: {
|
||||||
|
'Authorization': 'Basic Z2FiaW5ldGVkaWdpdGFsLmxvY2FsXHBhdWxvLnBpbnRvOnRhYnRlc3RlQDAwNg==',
|
||||||
|
'Content-Type': 'application/json'
|
||||||
|
},
|
||||||
|
data: data
|
||||||
|
} */
|
||||||
|
console.log(postEvent.Subject);
|
||||||
|
axios({
|
||||||
|
method: 'post',
|
||||||
|
url: url,
|
||||||
|
data: mydata,
|
||||||
|
headers: {'Authorization': 'Basic Z2FiaW5ldGVkaWdpdGFsLmxvY2FsXHBhdWxvLnBpbnRvOnRhYnRlc3RlQDAwNg==',
|
||||||
|
'Content-Type': 'application/json' }
|
||||||
|
})
|
||||||
|
.then(function (response) {
|
||||||
|
//handle success
|
||||||
|
console.log(response);
|
||||||
|
})
|
||||||
|
.catch(function (response) {
|
||||||
|
//handle error
|
||||||
|
console.log(response);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
getStaticEvent(eventId: string){
|
getStaticEvent(eventId: string){
|
||||||
return {
|
return {
|
||||||
// The find() function looks for an event in a array and return true if found
|
// The find() function looks for an event in a array and return true if found
|
||||||
@@ -78,4 +122,5 @@ export class EventsService {
|
|||||||
})
|
})
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user