calendar done needs to do heuristic
This commit is contained in:
1 parent
6ed0bdeca7
commit
9ccbe2534a
22 files changed
+16146
-15540
No files matched your search
@@ -0,0 +1,9 @@
|
||||
<div class="calendar-year">
|
||||
@for (month of [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]; track $index) {
|
||||
<mat-card>
|
||||
<mat-card-content>
|
||||
<app-calendar-month [monthIndex]="month" [year]="year" [selectedDates]="selectedDates"></app-calendar-month>
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
}
|
||||
</div>
|
||||
@@ -0,0 +1,8 @@
|
||||
.calendar-year {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
flex-wrap: wrap;
|
||||
justify-content: center;
|
||||
gap: 16px;
|
||||
max-width: 60vw;
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { CalendarYear } from './calendar-year';
|
||||
|
||||
describe('CalendarYear', () => {
|
||||
let component: CalendarYear;
|
||||
let fixture: ComponentFixture<CalendarYear>;
|
||||
|
||||
beforeEach(async () => {
|
||||
await TestBed.configureTestingModule({
|
||||
imports: [CalendarYear]
|
||||
})
|
||||
.compileComponents();
|
||||
|
||||
fixture = TestBed.createComponent(CalendarYear);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,25 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { UserInputService } from '../../services/user-input-service';
|
||||
import { DateRange } from '@angular/material/datepicker';
|
||||
import { MatCard, MatCardContent } from '@angular/material/card';
|
||||
import { CalendarMonth } from "../calendar-month/calendar-month";
|
||||
import { CalendarService, SelectedDates } from '../../services/calendar-service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-calendar-year',
|
||||
imports: [MatCard, CalendarMonth, MatCardContent],
|
||||
templateUrl: './calendar-year.html',
|
||||
styleUrl: './calendar-year.scss',
|
||||
})
|
||||
export class CalendarYear implements OnInit {
|
||||
constructor(private userInput: UserInputService, private calendarService: CalendarService) {
|
||||
}
|
||||
|
||||
protected selectedDates: SelectedDates = new SelectedDates();
|
||||
|
||||
protected year: number = 2026;
|
||||
|
||||
ngOnInit(): void {
|
||||
this.selectedDates = this.calendarService.getSelectedDatesForYear(this.year);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user