mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
Merge branch 'master' of https://bitbucket.org/equilibriumito/gabinete-digital
This commit is contained in:
@@ -34,10 +34,6 @@ const routes: Routes = [
|
||||
{
|
||||
path: 'attachments',
|
||||
children: [
|
||||
{
|
||||
path:'',
|
||||
loadChildren: ()=> import('../pages/events/attachments/attachments.module').then(m => m.AttachmentsPageModule)
|
||||
},
|
||||
{
|
||||
path:':eventId',
|
||||
loadChildren: ()=> import('../pages/events/attachments/attachments.module').then(m => m.AttachmentsPageModule)
|
||||
|
||||
@@ -12,47 +12,26 @@
|
||||
<ion-content>
|
||||
<div class="div-ion-content">
|
||||
<ion-item>
|
||||
<ion-label>Assunto</ion-label>
|
||||
<ion-label position="floating">Assunto</ion-label>
|
||||
<ion-input type="text" [(ngModel)]="postEvent.Subject"></ion-input>
|
||||
</ion-item>
|
||||
<!-- <ion-item>
|
||||
<ion-label>Descrição</ion-label>
|
||||
<ion-input type="text" [(ngModel)]="postEvent.Body.Text"></ion-input>
|
||||
</ion-item> -->
|
||||
<ion-item>
|
||||
<ion-label>Descrição</ion-label>
|
||||
<ion-textarea [(ngModel)]="postEvent.Body.Text" placeholder=""></ion-textarea>
|
||||
<ion-label position="floating">Descrição</ion-label>
|
||||
<ion-textarea [(ngModel)]="postEvent.Body.Text"></ion-textarea>
|
||||
</ion-item>
|
||||
<ion-item>
|
||||
<ion-label>Localização</ion-label>
|
||||
<ion-label position="floating">Localização</ion-label>
|
||||
<ion-input type="text" [(ngModel)]="postEvent.Location"></ion-input>
|
||||
</ion-item>
|
||||
<!-- <ion-item>
|
||||
<ion-label position="stacked">Intervenientes</ion-label>
|
||||
<ion-input type="text" [(ngModel)]="postEvent.RequiredAttendees.Name"></ion-input>
|
||||
</ion-item> -->
|
||||
<!-- <ion-list>
|
||||
<ion-radio-group value="biff">
|
||||
<ion-item class="radio-button" lines="none">
|
||||
<ion-label>Oficial</ion-label>
|
||||
<ion-radio [(ngModel)]="postEvent.CalendarName" slot="start" value="biff"></ion-radio>
|
||||
</ion-item>
|
||||
|
||||
<ion-item class="radio-button" lines="none">
|
||||
<ion-label>Pessoal</ion-label>
|
||||
<ion-radio [(ngModel)]="postEvent.CalendarName" slot="start" value="griff"></ion-radio>
|
||||
</ion-item>
|
||||
</ion-radio-group>
|
||||
</ion-list> -->
|
||||
<ion-item>
|
||||
<ion-label>Selecione a Agenda</ion-label>
|
||||
<ion-label position="floating">Selecione a Agenda</ion-label>
|
||||
<ion-select [(ngModel)]="postEvent.CalendarName" interface="action-sheet" class="custom-options" Cancel-text="Cancelar">
|
||||
<ion-select-option Pessoal="Reunião">Pessoal</ion-select-option>
|
||||
<ion-select-option Oficial="Viagem">Oficial</ion-select-option>
|
||||
</ion-select>
|
||||
</ion-item>
|
||||
<ion-item>
|
||||
<ion-label>Tipo de evento</ion-label>
|
||||
<ion-label position="floating">Tipo de evento</ion-label>
|
||||
<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="Viagem">Viagem</ion-select-option>
|
||||
@@ -61,13 +40,13 @@
|
||||
</ion-select>
|
||||
</ion-item>
|
||||
<ion-item>
|
||||
<ion-label>Data Início</ion-label>
|
||||
<ion-label position="floating">Data Início</ion-label>
|
||||
<ion-datetime [(ngModel)]="postEvent.StartDate" min="2020" max="2100"
|
||||
displayFormat="D MMM YYYY H:mm"
|
||||
monthShortNames="Jan, Fev, Mar, Abr, Mai, Jun, Jul, Aug, Sep, Out, Nov, Dez"></ion-datetime>
|
||||
</ion-item>
|
||||
<ion-item>
|
||||
<ion-label>Data Fim</ion-label>
|
||||
<ion-label position="floating">Data Fim</ion-label>
|
||||
<ion-datetime [(ngModel)]="postEvent.EndDate" min="2020" max="2100"
|
||||
displayFormat="D MMM YYYY H:mm"
|
||||
monthShortNames="Jan, Fev, Mar, Abr, Mai, Jun, Jul, Aug, Sep, Out, Nov, Dez"></ion-datetime>
|
||||
@@ -88,8 +67,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</ion-content>
|
||||
|
||||
|
||||
<ion-footer class="ion-no-border">
|
||||
<ion-toolbar color="primary">
|
||||
<ion-buttons slot="start">
|
||||
|
||||
@@ -13,114 +13,124 @@
|
||||
</ion-header>
|
||||
|
||||
<ion-content padding>
|
||||
<div *ngIf="loadedEvent">
|
||||
<div *ngIf="loadedEvent">
|
||||
<ion-item-group>
|
||||
<ion-item-sliding>
|
||||
<form [formGroup]="ionicForm" (ngSubmit)="submitForm()" novalidate>
|
||||
<ion-item>
|
||||
<ion-label position="stacked">Assunto</ion-label>
|
||||
<ion-input [(ngModel)]="loadedEvent.Subject" formControlName="subject" type="text" required></ion-input>
|
||||
<ion-input [(ngModel)]="loadedEvent.Subject"></ion-input>
|
||||
</ion-item>
|
||||
<!-- Error messages -->
|
||||
<span class="error ion-padding" *ngIf="errorControl.subject.errors?.required">
|
||||
Campo obrigatório
|
||||
</span>
|
||||
</form>
|
||||
<ion-item>
|
||||
<ion-label position="stacked">Descrição</ion-label>
|
||||
<ion-input [(ngModel)]='loadedEvent.Body.Text'></ion-input>
|
||||
</ion-item>
|
||||
<ion-item>
|
||||
<ion-label position="stacked">Localização</ion-label>
|
||||
<ion-input [(ngModel)]='loadedEvent.Location'></ion-input>
|
||||
</ion-item>
|
||||
<ion-item>
|
||||
<ion-label position="stacked">Calendário</ion-label>
|
||||
<ion-select placeholder="{{loadedEvent.CalendarName}}" [(ngModel)]="loadedEvent.CalendarName" interface="action-sheet" class="custom-options" Cancel-text="Cancelar">
|
||||
<ion-select-option Pessoal="Reunião">Pessoal</ion-select-option>
|
||||
<ion-select-option Oficial="Viagem">Oficial</ion-select-option>
|
||||
</ion-select>
|
||||
</ion-item>
|
||||
<ion-item>
|
||||
<ion-label position="stacked">Tipo do evento</ion-label>
|
||||
<ion-select placeholder="{{loadedEvent.EventType}}" [(ngModel)]="loadedEvent.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="Viagem">Viagem</ion-select-option>
|
||||
<ion-select-option value="Conferência">Conferência</ion-select-option>
|
||||
<ion-select-option value="Encontro">Encontro</ion-select-option>
|
||||
</ion-select>
|
||||
</ion-item>
|
||||
<ion-item>
|
||||
<ion-label>Data Início</ion-label>
|
||||
<ion-datetime value="{{loadedEvent.StartDate}}" [(ngModel)]="loadedEvent.StartDate" min="2020" max="2100"
|
||||
displayFormat="D MMM YYYY H:mm"
|
||||
monthShortNames="Jan, Fev, Mar, Abr, Mai, Jun, Jul, Aug, Sep, Out, Nov, Dez"></ion-datetime>
|
||||
</ion-item>
|
||||
<!-- <ion-item>
|
||||
<ion-label position="stacked">Data Início: </ion-label>
|
||||
<ion-input [(ngModel)]='loadedEvent.StartDate'></ion-input>
|
||||
</ion-item> -->
|
||||
<ion-item>
|
||||
<ion-label>Data Fim</ion-label>
|
||||
<ion-datetime value="{{loadedEvent.EndDate}}" [(ngModel)]="loadedEvent.EndDate" min="2020" max="2100"
|
||||
displayFormat="D MMM YYYY HH:mm"
|
||||
<ion-item>
|
||||
<ion-label position="stacked">Descrição</ion-label>
|
||||
<ion-input [(ngModel)]='loadedEvent.Body.Text'></ion-input>
|
||||
</ion-item>
|
||||
<ion-item>
|
||||
<ion-label position="stacked">Localização</ion-label>
|
||||
<ion-input [(ngModel)]='loadedEvent.Location'></ion-input>
|
||||
</ion-item>
|
||||
<ion-item>
|
||||
<ion-label position="stacked">Calendário</ion-label>
|
||||
<ion-select placeholder="{{loadedEvent.CalendarName}}" [(ngModel)]="loadedEvent.CalendarName" interface="action-sheet" class="custom-options" Cancel-text="Cancelar">
|
||||
<ion-select-option Pessoal="Reunião">Pessoal</ion-select-option>
|
||||
<ion-select-option Oficial="Viagem">Oficial</ion-select-option>
|
||||
</ion-select>
|
||||
</ion-item>
|
||||
<ion-item>
|
||||
<ion-label position="stacked">Tipo do evento</ion-label>
|
||||
<ion-select placeholder="{{loadedEvent.EventType}}" [(ngModel)]="loadedEvent.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="Viagem">Viagem</ion-select-option>
|
||||
<ion-select-option value="Conferência">Conferência</ion-select-option>
|
||||
<ion-select-option value="Encontro">Encontro</ion-select-option>
|
||||
</ion-select>
|
||||
</ion-item>
|
||||
<ion-item>
|
||||
<ion-label position="stacked">Data Início</ion-label>
|
||||
<ion-datetime value="{{loadedEvent.StartDate}}" [(ngModel)]="loadedEvent.StartDate" min="2020" max="2100"
|
||||
displayFormat="D MMM YYYY H:mm"
|
||||
monthShortNames="Jan, Fev, Mar, Abr, Mai, Jun, Jul, Aug, Sep, Out, Nov, Dez"></ion-datetime>
|
||||
</ion-item>
|
||||
<div class="div-card-button">
|
||||
<ion-card (click)="openAttendees()">
|
||||
<ion-card-header>
|
||||
<ion-card-title center>
|
||||
<div class="center">
|
||||
<ion-icon name="person"></ion-icon>
|
||||
</div>
|
||||
</ion-card-title>
|
||||
</ion-card-header>
|
||||
<ion-card-content class="center">
|
||||
Intervenientes
|
||||
</ion-card-content>
|
||||
</ion-card>
|
||||
<ion-card [routerLink]="['/home/attachments', loadedEvent.EventId]">
|
||||
<ion-card-header>
|
||||
<ion-card-title center>
|
||||
<div class="center">
|
||||
<ion-icon name="attach"></ion-icon>
|
||||
</div>
|
||||
</ion-card-title>
|
||||
</ion-card-header>
|
||||
<ion-card-content class="center">
|
||||
Anexos
|
||||
</ion-card-content>
|
||||
</ion-card>
|
||||
</div>
|
||||
<!-- <div class="div-attach">
|
||||
<ion-item>
|
||||
<ion-icon name="add" slot="end"></ion-icon>
|
||||
<ion-label class="attach-label">Intervenientes</ion-label>
|
||||
</ion-item>
|
||||
<div id="AttachFiles"></div>
|
||||
<ion-list [(ngModel)]="loadedEvent.EventType">
|
||||
<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>
|
||||
</ion-list>
|
||||
</div>
|
||||
<div class="div-attach">
|
||||
<ion-item>
|
||||
<ion-icon name="add" slot="end"></ion-icon>
|
||||
<ion-label class="attach-label">Anexos</ion-label>
|
||||
<ion-label position="stacked">Data Fim</ion-label>
|
||||
<ion-datetime value="{{loadedEvent.EndDate}}" [(ngModel)]="loadedEvent.EndDate" min="2020" max="2100"
|
||||
displayFormat="D MMM YYYY HH:mm"
|
||||
monthShortNames="Jan, Fev, Mar, Abr, Mai, Jun, Jul, Aug, Sep, Out, Nov, Dez"></ion-datetime>
|
||||
</ion-item>
|
||||
<div id="AttachFiles"></div>
|
||||
<ion-list [(ngModel)]="loadedEvent.EventType">
|
||||
<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>
|
||||
<!-- <div class="div-card-button">
|
||||
<ion-card (click)="openAttendees()">
|
||||
<ion-card-header>
|
||||
<ion-card-title center>
|
||||
<div class="center">
|
||||
<ion-icon name="person"></ion-icon>
|
||||
</div>
|
||||
</ion-card-title>
|
||||
</ion-card-header>
|
||||
<ion-card-content class="center">
|
||||
Intervenientes
|
||||
</ion-card-content>
|
||||
</ion-card>-->
|
||||
<!-- <ion-card [routerLink]="['/home/attachments', loadedEvent.EventId]">
|
||||
<ion-card-header>
|
||||
<ion-card-title center>
|
||||
<div class="center">
|
||||
<ion-icon name="attach"></ion-icon>
|
||||
</div>
|
||||
</ion-card-title>
|
||||
</ion-card-header>
|
||||
<ion-card-content class="center">
|
||||
Anexos
|
||||
</ion-card-content>
|
||||
</ion-card> -->
|
||||
<!-- </div> -->
|
||||
<div class="div-attach" >
|
||||
<ion-item>
|
||||
<ion-buttons slot="end" (click)="openAttendees()">
|
||||
<ion-icon name="people" slot="start" ></ion-icon>
|
||||
<ion-label>Ver mais</ion-label>
|
||||
</ion-buttons>
|
||||
<ion-label class="attach-label">Intervenientes</ion-label>
|
||||
</ion-item>
|
||||
<div id="AttachFiles"></div>
|
||||
<ion-list>
|
||||
<ion-item class="attendees" lines="none" *ngFor="let attendee of loadedEvent.Attendees.slice(0, 2)">
|
||||
<ion-icon class="attendees-icon" name="person" slot="start"></ion-icon>
|
||||
<ion-label color="secondary" class="attendees-list">{{attendee.Name}}</ion-label>
|
||||
</ion-item>
|
||||
</ion-list>
|
||||
</div>
|
||||
<div class="div-attach">
|
||||
<ion-item>
|
||||
|
||||
<ion-buttons slot="end" (click)="showAlert()">
|
||||
<ion-icon name="documents" slot="start"></ion-icon>
|
||||
<ion-label>Ver mais</ion-label>
|
||||
</ion-buttons>
|
||||
<ion-label class="attach-label">Anexos</ion-label>
|
||||
</ion-item>
|
||||
</ion-list>
|
||||
</div> -->
|
||||
</ion-item-sliding>
|
||||
<ion-list *ngIf="loadedEvent.HasAttachments">
|
||||
<ion-refresher name="refresher" slot="fixed" (ionRefresh)="doRefresh($event)">
|
||||
<ion-progress-bar type="indeterminate" *ngIf="showLoader"></ion-progress-bar>
|
||||
<ion-refresher-content>
|
||||
</ion-refresher-content>
|
||||
</ion-refresher>
|
||||
<ion-item lines="none" *ngFor="let att of loadedEventAttachments.slice(0, 2)">
|
||||
<ion-icon name="attach" slot="start"></ion-icon>
|
||||
<ion-label color="secondary">
|
||||
<p>{{ att.Description }}</p>
|
||||
<p>{{ att.CreateDate }}</p>
|
||||
</ion-label>
|
||||
<!-- <ion-icon name="trash" slot="end"></ion-icon> -->
|
||||
</ion-item>
|
||||
<ion-item lines="none" *ngIf="!loadedEvent.HasAttachments">
|
||||
<ion-label>
|
||||
Sem anexos
|
||||
</ion-label>
|
||||
</ion-item>
|
||||
</ion-list>
|
||||
</div>
|
||||
</ion-item-sliding>
|
||||
</ion-item-group>
|
||||
</div>
|
||||
<!-- Skeleton screen -->
|
||||
|
||||
@@ -80,4 +80,4 @@ ion-card{
|
||||
font-size: 12px;
|
||||
font-weight: bold;
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,8 +7,12 @@ import { EventBody } from 'src/app/models/eventbody.model';
|
||||
import { AlertController, ModalController } from '@ionic/angular';
|
||||
import { EventPerson } from 'src/app/models/eventperson.model';
|
||||
import { AttendeesPage } from 'src/app/pages/events/attendees/attendees.page';
|
||||
import { AlertService } from 'src/app/services/alert.service';
|
||||
import { Attachment } from 'src/app/models/attachment.model';
|
||||
import { AttachmentsService } from 'src/app/services/attachments.service';
|
||||
import { FormGroup, FormBuilder, Validators } from "@angular/forms";
|
||||
|
||||
|
||||
@Component({
|
||||
selector: 'app-event-detail',
|
||||
templateUrl: './event-detail.page.html',
|
||||
@@ -17,19 +21,28 @@ import { FormGroup, FormBuilder, Validators } from "@angular/forms";
|
||||
export class EventDetailPage implements OnInit {
|
||||
|
||||
loadedEvent: Event;
|
||||
loadedEventAttachments: Attachment[];
|
||||
pageId: string;
|
||||
showLoader: boolean;
|
||||
backURL: string;
|
||||
ionicForm: FormGroup;
|
||||
isSubmitted = false;
|
||||
|
||||
minDate: Date;
|
||||
|
||||
constructor(public formBuilder: FormBuilder, public alertController: AlertController, private router: Router, private activatedRoute: ActivatedRoute, private eventsService: EventsService, private modalCtrl: ModalController) {
|
||||
|
||||
constructor(public formBuilder: FormBuilder, public alertController: AlertController,
|
||||
private router: Router, private activatedRoute: ActivatedRoute,
|
||||
private eventsService: EventsService, private modalCtrl: ModalController,
|
||||
private alertService: AlertService,
|
||||
private attachamentsService: AttachmentsService) {
|
||||
this.loadedEvent = new Event();
|
||||
this.loadedEvent.Body = new EventBody();
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.loadEvent();
|
||||
this.loadAttachments();
|
||||
this.ionicForm = this.formBuilder.group({
|
||||
subject: ['', [Validators.required]]
|
||||
})
|
||||
@@ -51,6 +64,7 @@ export class EventDetailPage implements OnInit {
|
||||
}
|
||||
else
|
||||
{
|
||||
this.pageId = paramMap.get('eventId');
|
||||
eventid = paramMap.get('eventId');
|
||||
}
|
||||
|
||||
@@ -60,7 +74,7 @@ export class EventDetailPage implements OnInit {
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
this.eventsService.getEvent(eventid).subscribe(response =>
|
||||
{
|
||||
this.loadedEvent = response;
|
||||
@@ -156,8 +170,32 @@ export class EventDetailPage implements OnInit {
|
||||
}
|
||||
}
|
||||
|
||||
showAlert(){
|
||||
this.alertService.presentAlert("Funcionalidade em desenvolvimento");
|
||||
}
|
||||
|
||||
loadAttachments()
|
||||
{
|
||||
console.log(this.pageId);
|
||||
this.attachamentsService.getEventAttachments(this.pageId).subscribe(attachments => {
|
||||
this.loadedEventAttachments = attachments;
|
||||
console.log(attachments);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
back()
|
||||
{
|
||||
//this.back();
|
||||
}
|
||||
doRefresh(event){
|
||||
/* this.RefreshEvents(); */
|
||||
event.target.complete();
|
||||
setTimeout(() => {
|
||||
event.target.complete();
|
||||
}, 2000);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ export const environment = {
|
||||
production: false,
|
||||
apiURL: 'http://gpr-dev-01.gabinetedigital.local/GabineteDigital.Services/v2/api/',
|
||||
domain: 'gabinetedigital.local',
|
||||
defaultuser: 'tiago.kayaya',
|
||||
defaultuser: 'paulo.pinto',
|
||||
defaultuserpwd: 'tabteste@006'
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user