add either pattern

This commit is contained in:
Peter Maquiran
2024-07-09 12:36:46 +01:00
parent 06417ead0f
commit a26fbbddba
45 changed files with 985 additions and 701 deletions
@@ -0,0 +1,17 @@
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { DeleteEventRecurrencePage } from './delete-event-recurrence.page';
const routes: Routes = [
{
path: '',
component: DeleteEventRecurrencePage
}
];
@NgModule({
imports: [RouterModule.forChild(routes)],
exports: [RouterModule],
})
export class DeleteEventRecurrencePageRoutingModule {}
@@ -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 { DeleteEventRecurrencePageRoutingModule } from './delete-event-recurrence-routing.module';
import { DeleteEventRecurrencePage } from './delete-event-recurrence.page';
@NgModule({
imports: [
CommonModule,
FormsModule,
IonicModule,
DeleteEventRecurrencePageRoutingModule
],
declarations: [DeleteEventRecurrencePage]
})
export class DeleteEventRecurrencePageModule {}
@@ -0,0 +1,22 @@
<ion-content>
<div class="pb-30 text-center pt-25">Este é um evento recorrente</div>
<div>
<ion-buttons slot="start" class="pb-15">
<button class="btn-ok" style="width: 240px !important" fill="clear" color="#fff" (click)="close('DeleteAll')" >
<ion-label>Eliminar todos eventos da serie</ion-label>
</button>
</ion-buttons>
<ion-buttons slot="end" class="pb-15">
<button class="btn-cancel" fill="clear" color="#061b52" style="width: 240px !important" (click)="close('DeleteOne')">
<ion-label>Eliminar apenas este evento</ion-label>
</button>
</ion-buttons>
<ion-buttons slot="end">
<button class="btn-cancel" fill="clear" color="#061b52" style="width: 240px !important" (click)="close('Cancel')">
<ion-label>Cancelar</ion-label>
</button>
</ion-buttons>
</div>
</ion-content>
@@ -0,0 +1,24 @@
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import { IonicModule } from '@ionic/angular';
import { DeleteEventRecurrencePage } from './delete-event-recurrence.page';
describe('DeleteEventRecurrencePage', () => {
let component: DeleteEventRecurrencePage;
let fixture: ComponentFixture<DeleteEventRecurrencePage>;
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [ DeleteEventRecurrencePage ],
imports: [IonicModule.forRoot()]
}).compileComponents();
fixture = TestBed.createComponent(DeleteEventRecurrencePage);
component = fixture.componentInstance;
fixture.detectChanges();
}));
it('should create', () => {
expect(component).toBeTruthy();
});
});
@@ -0,0 +1,26 @@
import { Component, OnInit } from '@angular/core';
import { ModalController } from '@ionic/angular';
export type EventDeleteRecurrenceComponentReturn = 'DeleteAll' | 'DeleteOne' | 'Cancel'
@Component({
selector: 'app-delete-event-recurrence',
templateUrl: './delete-event-recurrence.page.html',
styleUrls: ['./delete-event-recurrence.page.scss'],
})
export class DeleteEventRecurrencePage implements OnInit {
constructor(
private modalController: ModalController
) { }
ngOnInit() {
}
close(data: EventDeleteRecurrenceComponentReturn) {
this.modalController.dismiss(data)
}
}