mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
Added show attendees and show attachments at event-detal + style at new-event modal
This commit is contained in:
@@ -25,10 +25,6 @@ const routes: Routes = [
|
|||||||
{
|
{
|
||||||
path: 'attachments',
|
path: 'attachments',
|
||||||
children: [
|
children: [
|
||||||
{
|
|
||||||
path:'',
|
|
||||||
loadChildren: ()=> import('../pages/events/attachments/attachments.module').then(m => m.AttachmentsPageModule)
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
path:':eventId',
|
path:':eventId',
|
||||||
loadChildren: ()=> import('../pages/events/attachments/attachments.module').then(m => m.AttachmentsPageModule)
|
loadChildren: ()=> import('../pages/events/attachments/attachments.module').then(m => m.AttachmentsPageModule)
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
<ion-content>
|
<ion-content>
|
||||||
<div class="div-ion-content">
|
<div class="div-ion-content">
|
||||||
<ion-item>
|
<ion-item>
|
||||||
<ion-label>Assunto</ion-label>
|
<ion-label position="stacked">Assunto</ion-label>
|
||||||
<ion-input type="text" [(ngModel)]="postEvent.Subject"></ion-input>
|
<ion-input type="text" [(ngModel)]="postEvent.Subject"></ion-input>
|
||||||
</ion-item>
|
</ion-item>
|
||||||
<!-- <ion-item>
|
<!-- <ion-item>
|
||||||
@@ -20,11 +20,11 @@
|
|||||||
<ion-input type="text" [(ngModel)]="postEvent.Body.Text"></ion-input>
|
<ion-input type="text" [(ngModel)]="postEvent.Body.Text"></ion-input>
|
||||||
</ion-item> -->
|
</ion-item> -->
|
||||||
<ion-item>
|
<ion-item>
|
||||||
<ion-label>Descrição</ion-label>
|
<ion-label position="stacked">Descrição</ion-label>
|
||||||
<ion-textarea [(ngModel)]="postEvent.Body.Text" placeholder=""></ion-textarea>
|
<ion-textarea [(ngModel)]="postEvent.Body.Text" placeholder=""></ion-textarea>
|
||||||
</ion-item>
|
</ion-item>
|
||||||
<ion-item>
|
<ion-item>
|
||||||
<ion-label>Localização</ion-label>
|
<ion-label position="stacked">Localização</ion-label>
|
||||||
<ion-input type="text" [(ngModel)]="postEvent.Location"></ion-input>
|
<ion-input type="text" [(ngModel)]="postEvent.Location"></ion-input>
|
||||||
</ion-item>
|
</ion-item>
|
||||||
<!-- <ion-item>
|
<!-- <ion-item>
|
||||||
@@ -45,14 +45,14 @@
|
|||||||
</ion-radio-group>
|
</ion-radio-group>
|
||||||
</ion-list> -->
|
</ion-list> -->
|
||||||
<ion-item>
|
<ion-item>
|
||||||
<ion-label>Selecione a Agenda</ion-label>
|
<ion-label position="stacked">Selecione a Agenda</ion-label>
|
||||||
<ion-select [(ngModel)]="postEvent.CalendarName" interface="action-sheet" class="custom-options" Cancel-text="Cancelar">
|
<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 Pessoal="Reunião">Pessoal</ion-select-option>
|
||||||
<ion-select-option Oficial="Viagem">Oficial</ion-select-option>
|
<ion-select-option Oficial="Viagem">Oficial</ion-select-option>
|
||||||
</ion-select>
|
</ion-select>
|
||||||
</ion-item>
|
</ion-item>
|
||||||
<ion-item>
|
<ion-item>
|
||||||
<ion-label>Tipo de evento</ion-label>
|
<ion-label position="stacked">Tipo de evento</ion-label>
|
||||||
<ion-select [(ngModel)]="postEvent.EventType" 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>
|
||||||
@@ -61,13 +61,13 @@
|
|||||||
</ion-select>
|
</ion-select>
|
||||||
</ion-item>
|
</ion-item>
|
||||||
<ion-item>
|
<ion-item>
|
||||||
<ion-label>Data Início</ion-label>
|
<ion-label position="stacked">Data Início</ion-label>
|
||||||
<ion-datetime [(ngModel)]="postEvent.StartDate" min="2020" max="2100"
|
<ion-datetime [(ngModel)]="postEvent.StartDate" min="2020" max="2100"
|
||||||
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 position="stacked">Data Fim</ion-label>
|
||||||
<ion-datetime [(ngModel)]="postEvent.EndDate" min="2020" max="2100"
|
<ion-datetime [(ngModel)]="postEvent.EndDate" min="2020" max="2100"
|
||||||
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>
|
||||||
|
|||||||
@@ -45,7 +45,7 @@
|
|||||||
</ion-select>
|
</ion-select>
|
||||||
</ion-item>
|
</ion-item>
|
||||||
<ion-item>
|
<ion-item>
|
||||||
<ion-label>Data Início</ion-label>
|
<ion-label position="stacked">Data Início</ion-label>
|
||||||
<ion-datetime value="{{loadedEvent.StartDate}}" [(ngModel)]="loadedEvent.StartDate" min="2020" max="2100"
|
<ion-datetime value="{{loadedEvent.StartDate}}" [(ngModel)]="loadedEvent.StartDate" min="2020" max="2100"
|
||||||
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>
|
||||||
@@ -55,12 +55,12 @@
|
|||||||
<ion-input [(ngModel)]='loadedEvent.StartDate'></ion-input>
|
<ion-input [(ngModel)]='loadedEvent.StartDate'></ion-input>
|
||||||
</ion-item> -->
|
</ion-item> -->
|
||||||
<ion-item>
|
<ion-item>
|
||||||
<ion-label>Data Fim</ion-label>
|
<ion-label position="stacked">Data Fim</ion-label>
|
||||||
<ion-datetime value="{{loadedEvent.EndDate}}" [(ngModel)]="loadedEvent.EndDate" min="2020" max="2100"
|
<ion-datetime value="{{loadedEvent.EndDate}}" [(ngModel)]="loadedEvent.EndDate" min="2020" max="2100"
|
||||||
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>
|
||||||
<div class="div-card-button">
|
<!-- <div class="div-card-button">
|
||||||
<ion-card (click)="openAttendees()">
|
<ion-card (click)="openAttendees()">
|
||||||
<ion-card-header>
|
<ion-card-header>
|
||||||
<ion-card-title center>
|
<ion-card-title center>
|
||||||
@@ -72,8 +72,8 @@
|
|||||||
<ion-card-content class="center">
|
<ion-card-content class="center">
|
||||||
Intervenientes
|
Intervenientes
|
||||||
</ion-card-content>
|
</ion-card-content>
|
||||||
</ion-card>
|
</ion-card>-->
|
||||||
<ion-card [routerLink]="['/home/attachments', loadedEvent.EventId]">
|
<!-- <ion-card [routerLink]="['/home/attachments', loadedEvent.EventId]">
|
||||||
<ion-card-header>
|
<ion-card-header>
|
||||||
<ion-card-title center>
|
<ion-card-title center>
|
||||||
<div class="center">
|
<div class="center">
|
||||||
@@ -84,36 +84,53 @@
|
|||||||
<ion-card-content class="center">
|
<ion-card-content class="center">
|
||||||
Anexos
|
Anexos
|
||||||
</ion-card-content>
|
</ion-card-content>
|
||||||
</ion-card>
|
</ion-card> -->
|
||||||
</div>
|
<!-- </div> -->
|
||||||
<!-- <div class="div-attach">
|
|
||||||
|
|
||||||
|
<div class="div-attach" >
|
||||||
<ion-item>
|
<ion-item>
|
||||||
<ion-icon name="add" slot="end"></ion-icon>
|
<ion-buttons slot="end" (click)="openAttendees()">
|
||||||
|
<ion-icon name="eye" slot="start" ></ion-icon>
|
||||||
|
<ion-label>Ver mais</ion-label>
|
||||||
|
</ion-buttons>
|
||||||
<ion-label class="attach-label">Intervenientes</ion-label>
|
<ion-label class="attach-label">Intervenientes</ion-label>
|
||||||
</ion-item>
|
</ion-item>
|
||||||
<div id="AttachFiles"></div>
|
<div id="AttachFiles"></div>
|
||||||
<ion-list [(ngModel)]="loadedEvent.EventType">
|
<ion-list>
|
||||||
<ion-item lines="none">
|
<ion-item class="attendees" lines="none" *ngFor="let attendee of loadedEvent.Attendees.slice(0, 2)">
|
||||||
<ion-icon name="attach"></ion-icon>
|
<ion-icon class="attendees-icon" name="person" slot="start"></ion-icon>
|
||||||
<ion-label color="secondary">Lei do orçamento geral do Estado</ion-label>
|
<ion-label color="secondary" class="attendees-list">{{attendee.Name}}</ion-label>
|
||||||
<ion-icon name="trash" slot="end"></ion-icon>
|
<!-- <ion-icon name="trash" slot="end"></ion-icon> -->
|
||||||
|
</ion-item>
|
||||||
|
</ion-list>
|
||||||
|
<!-- <ion-button (click)="openAttendees()">Ver mais</ion-button> -->
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="div-attach">
|
||||||
|
<ion-item>
|
||||||
|
<ion-icon (click)="showAlert()" name="add" slot="end"></ion-icon>
|
||||||
|
<ion-label class="attach-label">Anexos</ion-label>
|
||||||
|
</ion-item>
|
||||||
|
<!-- <div id="AttachFiles"></div> -->
|
||||||
|
<ion-progress-bar type="indeterminate" *ngIf="showLoader"></ion-progress-bar>
|
||||||
|
<ion-list *ngIf="loadedEventAttachments">
|
||||||
|
<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-item>
|
||||||
</ion-list>
|
</ion-list>
|
||||||
</div>
|
</div>
|
||||||
<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-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> -->
|
|
||||||
</ion-item-sliding>
|
</ion-item-sliding>
|
||||||
</ion-item-group>
|
</ion-item-group>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -74,4 +74,14 @@ ion-card{
|
|||||||
color: red;
|
color: red;
|
||||||
background-color: white;
|
background-color: white;
|
||||||
padding-right: 5px;
|
padding-right: 5px;
|
||||||
}
|
}
|
||||||
|
/* .attendees{
|
||||||
|
margin:0 !important;
|
||||||
|
padding: 0 !important;
|
||||||
|
}
|
||||||
|
.attendees-icon{
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
.attendees-list{
|
||||||
|
font-size: 14px;
|
||||||
|
} */
|
||||||
@@ -7,6 +7,9 @@ import { EventBody } from 'src/app/models/eventbody.model';
|
|||||||
import { AlertController, ModalController } from '@ionic/angular';
|
import { AlertController, ModalController } from '@ionic/angular';
|
||||||
import { EventPerson } from 'src/app/models/eventperson.model';
|
import { EventPerson } from 'src/app/models/eventperson.model';
|
||||||
import { AttendeesPage } from 'src/app/pages/events/attendees/attendees.page';
|
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';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-event-detail',
|
selector: 'app-event-detail',
|
||||||
@@ -16,14 +19,23 @@ import { AttendeesPage } from 'src/app/pages/events/attendees/attendees.page';
|
|||||||
export class EventDetailPage implements OnInit {
|
export class EventDetailPage implements OnInit {
|
||||||
|
|
||||||
loadedEvent: Event;
|
loadedEvent: Event;
|
||||||
|
loadedEventAttachments: Attachment[];
|
||||||
|
pageId: string;
|
||||||
|
showLoader: boolean;
|
||||||
|
|
||||||
constructor(public alertController: AlertController, private router: Router, private activatedRoute: ActivatedRoute, private eventsService: EventsService, private modalCtrl: ModalController) {
|
|
||||||
|
constructor(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 = new Event();
|
||||||
this.loadedEvent.Body = new EventBody();
|
this.loadedEvent.Body = new EventBody();
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.loadEvent();
|
this.loadEvent();
|
||||||
|
this.loadAttachments();
|
||||||
}
|
}
|
||||||
|
|
||||||
loadEvent()
|
loadEvent()
|
||||||
@@ -34,7 +46,7 @@ export class EventDetailPage implements OnInit {
|
|||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
this.pageId = paramMap.get('eventId');
|
||||||
this.eventsService.getEvent(paramMap.get('eventId')).subscribe(response =>
|
this.eventsService.getEvent(paramMap.get('eventId')).subscribe(response =>
|
||||||
{
|
{
|
||||||
this.loadedEvent = response;
|
this.loadedEvent = response;
|
||||||
@@ -132,4 +144,20 @@ 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);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ export class EventsPage implements OnInit {
|
|||||||
.subscribe(response => {
|
.subscribe(response => {
|
||||||
this.eventsList = response;
|
this.eventsList = response;
|
||||||
this.showLoader = false;
|
this.showLoader = false;
|
||||||
console.log(response[0].HasAttachments)
|
console.log(response[0].HasAttachments);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ export const environment = {
|
|||||||
production: false,
|
production: false,
|
||||||
apiURL: 'http://gpr-dev-01.gabinetedigital.local/GabineteDigital.Services/v2/api/',
|
apiURL: 'http://gpr-dev-01.gabinetedigital.local/GabineteDigital.Services/v2/api/',
|
||||||
domain: 'gabinetedigital.local',
|
domain: 'gabinetedigital.local',
|
||||||
defaultuser: 'tiago.kayaya',
|
defaultuser: 'paulo.pinto',
|
||||||
defaultuserpwd: 'tabteste@006'
|
defaultuserpwd: 'tabteste@006'
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user