mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
Merge branch 'developer' of https://bitbucket.org/equilibriumito/gabinete-digital into developer
This commit is contained in:
@@ -1,12 +0,0 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { Routes, RouterModule } from '@angular/router';
|
||||
|
||||
import { AttendeesPage } from './attendees.page';
|
||||
|
||||
const routes: Routes = [];
|
||||
|
||||
@NgModule({
|
||||
imports: [RouterModule.forChild(routes)],
|
||||
exports: [RouterModule],
|
||||
})
|
||||
export class AttendeesPageRoutingModule {}
|
||||
@@ -1,21 +0,0 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
|
||||
import { IonicModule } from '@ionic/angular';
|
||||
|
||||
import { AttendeesPageRoutingModule } from './attendees-routing.module';
|
||||
|
||||
import { AttendeesPage } from './attendees.page';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule,
|
||||
FormsModule,
|
||||
IonicModule,
|
||||
AttendeesPageRoutingModule
|
||||
],
|
||||
declarations: [AttendeesPage],
|
||||
exports: [AttendeesPage]
|
||||
})
|
||||
export class AttendeesPageModule {}
|
||||
@@ -1,57 +0,0 @@
|
||||
<ion-header class="ion-no-border">
|
||||
<ion-toolbar>
|
||||
<ion-title>Participantes</ion-title>
|
||||
</ion-toolbar>
|
||||
<ion-toolbar>
|
||||
<ion-segment [(ngModel)]="segment">
|
||||
<ion-segment-button value="true">
|
||||
Intervenientes
|
||||
</ion-segment-button>
|
||||
<ion-segment-button value="false">
|
||||
Com Conhecimento
|
||||
</ion-segment-button>
|
||||
</ion-segment>
|
||||
</ion-toolbar>
|
||||
</ion-header>
|
||||
<ion-content>
|
||||
<ion-item-group>
|
||||
<ion-button class="btn-ok-no-width" fill="clear" color="#fff" shape="round" (click)="addAttendees()" expand="block">
|
||||
<ion-label>Adicionar participantes XV</ion-label>
|
||||
</ion-button>
|
||||
</ion-item-group>
|
||||
<ion-item-group [ngSwitch]="segment" *ngFor="let attendee of eventAttendees">
|
||||
<ion-list *ngSwitchCase="attendee.IsRequired.toString()">
|
||||
<ion-item-sliding>
|
||||
<ion-item-options side="end">
|
||||
<ion-item-option color="danger" (click)="removeAttendee(attendee)">Apagar</ion-item-option>
|
||||
</ion-item-options>
|
||||
<ion-item lines="none">
|
||||
<ion-icon slot="start" name="person"></ion-icon>
|
||||
<ion-label>
|
||||
<h3>{{ attendee.Name }}</h3>
|
||||
<p>{{ attendee.EmailAddress }}</p>
|
||||
</ion-label>
|
||||
</ion-item>
|
||||
</ion-item-sliding>
|
||||
</ion-list>
|
||||
</ion-item-group>
|
||||
</ion-content>
|
||||
|
||||
|
||||
<ion-footer class="ion-no-border">
|
||||
<ion-toolbar class="width-100 d-flex justify-space-between px-20">
|
||||
<ion-buttons slot="start">
|
||||
<ion-button class="btn-cancel" fill="clear" color="#061b52" (click)="close()">
|
||||
<ion-label>Cancelar</ion-label>
|
||||
<ion-icon name="close" slot="start"></ion-icon>
|
||||
</ion-button>
|
||||
</ion-buttons>
|
||||
<ion-title></ion-title>
|
||||
<ion-buttons slot="end">
|
||||
<ion-button class="btn-ok" fill="clear" color="#fff" (click)="save()">
|
||||
<ion-label>OK</ion-label>
|
||||
<ion-icon name="checkmark" slot="start"></ion-icon>
|
||||
</ion-button>
|
||||
</ion-buttons>
|
||||
</ion-toolbar>
|
||||
</ion-footer>
|
||||
@@ -1,4 +0,0 @@
|
||||
|
||||
ion-item{
|
||||
border-bottom:1px solid #ccc;
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { IonicModule } from '@ionic/angular';
|
||||
|
||||
import { AttendeesPage } from './attendees.page';
|
||||
|
||||
describe('AttendeesPage', () => {
|
||||
let component: AttendeesPage;
|
||||
let fixture: ComponentFixture<AttendeesPage>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ AttendeesPage ],
|
||||
imports: [IonicModule.forRoot()]
|
||||
}).compileComponents();
|
||||
|
||||
fixture = TestBed.createComponent(AttendeesPage);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
}));
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -1,93 +0,0 @@
|
||||
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
|
||||
import { EventPerson } from 'src/app/models/eventperson.model';
|
||||
import { EventsService } from 'src/app/services/events.service';
|
||||
import { ModalController, NavController } from '@ionic/angular';
|
||||
// import { AttendeeModalPage } from '../attendee-modal/attendee-modal.page';
|
||||
|
||||
@Component({
|
||||
selector: 'app-attendees',
|
||||
templateUrl: './attendees.page.html',
|
||||
styleUrls: ['./attendees.page.scss'],
|
||||
})
|
||||
export class AttendeesPage implements OnInit {
|
||||
|
||||
|
||||
segment:string = "true";
|
||||
shouldShowCancel:boolean = true;
|
||||
|
||||
searchCountryString = ''; // initialize your searchCountryString string empty
|
||||
|
||||
@Output() openAttendeeModal = new EventEmitter<any>();
|
||||
@Output() openAddEvent = new EventEmitter<any>();
|
||||
@Input() eventAttendees: EventPerson[];
|
||||
@Output() GoBackEditOrAdd = new EventEmitter<any>();
|
||||
|
||||
|
||||
constructor(private eventService: EventsService, private modalCtrl: ModalController,
|
||||
private navCtrl: NavController) {
|
||||
}
|
||||
|
||||
|
||||
ngOnInit() {
|
||||
}
|
||||
|
||||
save(){
|
||||
this.GoBackEditOrAdd.emit();
|
||||
//this.openAddEvent.emit();
|
||||
// this.modalCtrl.dismiss(this.eventAttendees);
|
||||
}
|
||||
|
||||
close(){
|
||||
this.GoBackEditOrAdd.emit();
|
||||
// this.modalCtrl.dismiss(null);
|
||||
//this.openAddEvent.emit();
|
||||
}
|
||||
|
||||
removeAttendee(attendee: EventPerson)
|
||||
{
|
||||
let index: number = this.eventAttendees.findIndex((att) => {
|
||||
return att.EmailAddress == attendee.EmailAddress
|
||||
});
|
||||
|
||||
this.eventAttendees.splice(index, 1);
|
||||
}
|
||||
|
||||
async addAttendees() {
|
||||
|
||||
console.log('Event Intervenient');
|
||||
this.openAttendeeModal.emit();
|
||||
|
||||
/* const modal = await this.modalCtrl.create({
|
||||
component: AttendeeModalPage,
|
||||
componentProps: {
|
||||
eventPersons: this.eventAttendees
|
||||
},
|
||||
cssClass: 'attendee-modal',
|
||||
backdropDismiss: false
|
||||
});
|
||||
|
||||
await modal.present();
|
||||
|
||||
modal.onDidDismiss().then((data) => {
|
||||
let newattendees: EventPerson[] = data['data'];
|
||||
|
||||
if (newattendees != null)
|
||||
{
|
||||
newattendees.forEach(newattendee => {
|
||||
let att = {
|
||||
"EmailAddress": newattendee.EmailAddress,
|
||||
"Name": newattendee.Name,
|
||||
"IsRequired": (this.segment == "true")
|
||||
};
|
||||
if (this.eventAttendees == null)
|
||||
{
|
||||
this.eventAttendees = new Array();
|
||||
}
|
||||
this.eventAttendees.push(att);
|
||||
});
|
||||
}
|
||||
}); */
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user