-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(bigcalendar): Adding a full calendar component
- Loading branch information
Showing
23 changed files
with
1,301 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 49 additions & 0 deletions
49
demo/pages/elements/calendar/templates/BigCalendarDemo.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
<template #jobTemplate let-day="day" let-locale="locale" let-accepted="accepted" let-maybes="maybes" let-eventClicked="eventClicked"> | ||
<div class="calendar-day-top"> | ||
<span class="calendar-day-badge" *ngIf="accepted.length">{{ accepted.length }}</span> | ||
<span class="calendar-day-number">{{ day.date | dayofmonth:locale }}</span> | ||
</div> | ||
<div class="calendar-events"> | ||
<div | ||
class="calendar-event" | ||
*ngFor="let event of maybes" | ||
[style.backgroundColor]="event.color.primary" | ||
[ngClass]="event?.cssClass" | ||
(click)="$event.stopPropagation(); eventClicked.emit({event:event})"> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<template #availTemplate let-day="day" let-locale="locale" let-accepted="accepted" let-rejected="rejected"> | ||
<div class="calendar-day-top"> | ||
<span class="calendar-day-number">{{ day.date | dayofmonth:locale }}</span> | ||
</div> | ||
<div class="calendar-day-available" *ngIf="accepted.length"> | ||
<i class="bhi-check"></i> | ||
</div> | ||
<div class="calendar-day-not-available" *ngIf="rejected.length"> | ||
<i class="bhi-times"></i> | ||
</div> | ||
</template> | ||
|
||
<novo-calendar-month | ||
[viewDate]="viewDate" | ||
[events]="events" | ||
(dayClicked)="dayClicked($event)"> | ||
</novo-calendar-month> | ||
|
||
<novo-calendar-month | ||
class="availability" | ||
[viewDate]="viewDate" | ||
[events]="events" | ||
[cellTemplate]="availTemplate" | ||
(dayClicked)="toggleAvailable($event)"> | ||
</novo-calendar-month> | ||
|
||
<novo-calendar-month | ||
[viewDate]="viewDate" | ||
[events]="events" | ||
[cellTemplate]="jobTemplate" | ||
(dayClicked)="addShift($event)" | ||
(eventClicked)="removeShift($event)"> | ||
</novo-calendar-month> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// NG2 | ||
import { NgModule } from '@angular/core'; | ||
import { CommonModule } from '@angular/common'; | ||
// APP | ||
import { NovoButtonModule } from '../button/Button.module'; | ||
import { CalendarMonthElement } from './CalendarMonth'; | ||
import { CalendarMonthHeaderElement } from './CalendarMonthHeader'; | ||
import { CalendarMonthDayElement } from './CalendarMonthDay'; | ||
import { WeekdayPipe } from './Weekday.pipe'; | ||
import { MonthPipe } from './Month.pipe'; | ||
import { YearPipe } from './Year.pipe'; | ||
import { DayOfMonthPipe } from './DayOfMonth.pipe'; | ||
|
||
@NgModule({ | ||
imports: [CommonModule, NovoButtonModule], | ||
declarations: [CalendarMonthElement, CalendarMonthHeaderElement, CalendarMonthDayElement, WeekdayPipe, DayOfMonthPipe, MonthPipe, YearPipe], | ||
exports: [CalendarMonthElement, CalendarMonthHeaderElement, CalendarMonthDayElement, WeekdayPipe, DayOfMonthPipe, MonthPipe, YearPipe] | ||
}) | ||
export class NovoCalendarModule { | ||
} |
Oops, something went wrong.