customer available events improvements

This commit is contained in:
Roland Schneider
2021-09-10 23:30:13 +02:00
parent 2bf9985928
commit 18cd8312b5
15 changed files with 125 additions and 179 deletions

View File

@@ -0,0 +1,6 @@
import {Event, Registration} from "./services/event.service";
export interface CalendarEvent{
event: Event;
registrations: Registration;
}

View File

@@ -1,25 +0,0 @@
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import { MonthCalendarDayComponent } from './month-calendar-day.component';
describe('MonthCalendarDayComponent', () => {
let component: MonthCalendarDayComponent;
let fixture: ComponentFixture<MonthCalendarDayComponent>;
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [ MonthCalendarDayComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(MonthCalendarDayComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@@ -5,7 +5,7 @@
<h5 *ngFor="let dayOfWeek of daysOfWeek" class="col-sm p-1 text-center name-of-day-of-week">{{dayOfWeek.name}}</h5>
</div>
</header>
<div *ngIf="eventsAvailableResponse" class="row border border-right-0 border-bottom-0">
<div *ngIf="eventsAvailableResponse" class="row border border-right-0 border-bottom-0 mb-4">
<ng-container *ngFor="let day of eventsAvailableResponse.dates; let i = index">
<div app-month-calendar-day [day]="day" (onEvent)="handleEvent($event)" ></div>
<div *ngIf="i > 0 && ( ((i+1) % 7) == 0)" class="w-100"></div>

View File

@@ -1,25 +0,0 @@
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import { MonthCalendarComponent } from './month-calendar.component';
describe('MonthCalendarComponent', () => {
let component: MonthCalendarComponent;
let fixture: ComponentFixture<MonthCalendarComponent>;
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [ MonthCalendarComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(MonthCalendarComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@@ -1,25 +0,0 @@
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import { EventsComponent } from './events.component';
describe('EventsComponent', () => {
let component: EventsComponent;
let fixture: ComponentFixture<EventsComponent>;
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [ EventsComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(EventsComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@@ -1,6 +1,6 @@
import { Component, OnInit } from '@angular/core';
import {EventsAvailableResponse, EventService} from "../../services/event.service";
import {Observable} from "rxjs";
import {forkJoin, Observable} from "rxjs";
import {MonthCalendarEvent} from "../../components/month-calendar/month-calendar.component";
import {NavigationService} from "../../services/navigation.service";

View File

@@ -1,7 +1,9 @@
import {Injectable} from '@angular/core';
import {HttpClient} from "@angular/common/http";
import {Endpoints} from "./endpoints";
import {Observable} from "rxjs";
import {forkJoin, Observable} from "rxjs";
import {map} from "rxjs/operators";
import {CalendarEvent} from "../app.types";
@Injectable({
providedIn: 'root'