Commit 63b74dc3 authored by Siedschlag, Lennart's avatar Siedschlag, Lennart
Browse files

Aktueller Tag wird im Kalender angezeigt, Agenda umbenannt, dashboard refresh button

parent 038f62e5
Pipeline #6335 passed with stage
in 5 minutes and 15 seconds
.selected {
background-color: #CFD8DC !important;
color: white;
}
.appointments {
margin: 0 0 2em 0;
list-style-type: none;
......@@ -23,7 +19,7 @@
background-color: #DDD;
left: .1em;
}
.appointments li.selected:hover {
.appointments li.today:hover {
background-color: #BBD8DC !important;
color: white;
}
......
<h3>Agenda</h3>
<h3>All Appointments (Agenda)</h3>
<appointment-search id="search"></appointment-search>
<ul class="appointments">
......
.today {
background-color: lightgreen;
}
td{
border-width:2px;
border-style: solid;
......@@ -58,6 +62,7 @@ div .appointmentNotifier{
color: red;
}
/*
colors to use if possible (descending) :
#FF7B89
......
......@@ -23,6 +23,8 @@ class CalendarComponent implements OnActivate, OnInit {
List<String> get week => month.week;
List<Appointment> appointments = [];
int today;
int thisMonth;
// auswählen des Tages
Future<NavigationResult> gotoDetail(Day day) =>
......@@ -39,6 +41,8 @@ class CalendarComponent implements OnActivate, OnInit {
}
// todo bug in anderen monaten
Future<void> _getAppointments() async {
today = DateTime.now().day;
thisMonth = DateTime.now().month;
appointments = await _appointmentService.getByDate(month.year, month.month);
appointments.sort((a, b) => a.id.compareTo(b.id));
}
......
......@@ -6,32 +6,32 @@
<th *ngFor="let day of week">{{day}}</th>
</tr>
<tr>
<td *ngFor="let day of month.weekOfMonth(0)" (click)="gotoDetail(day)">{{day.day}}
<td *ngFor="let day of month.weekOfMonth(0)" [class.today]="day.day === today && day.month === thisMonth" (click)="gotoDetail(day)">{{day.day}}
<div *ngIf="daysAppointments(day) != 0" class="appointmentNotifier">{{daysAppointments(day)}}</div>
</td>
</tr>
<tr>
<td *ngFor="let day of month.weekOfMonth(1)" (click)="gotoDetail(day)">{{day.day}}
<td *ngFor="let day of month.weekOfMonth(1)" [class.today]="day.day === today && day.month === thisMonth" (click)="gotoDetail(day)">{{day.day}}
<div *ngIf="daysAppointments(day) != 0" class="appointmentNotifier">{{daysAppointments(day)}}</div>
</td>
</tr>
<tr>
<td *ngFor="let day of month.weekOfMonth(2)" (click)="gotoDetail(day)">{{day.day}}
<td *ngFor="let day of month.weekOfMonth(2)" [class.today]="day.day === today && day.month === thisMonth" (click)="gotoDetail(day)">{{day.day}}
<div *ngIf="daysAppointments(day) != 0" class="appointmentNotifier">{{daysAppointments(day)}}</div>
</td>
</tr>
<tr>
<td *ngFor="let day of month.weekOfMonth(3)" (click)="gotoDetail(day)">{{day.day}}
<td *ngFor="let day of month.weekOfMonth(3)" [class.today]="day.day === today && day.month === thisMonth" (click)="gotoDetail(day)">{{day.day}}
<div *ngIf="daysAppointments(day) != 0" class="appointmentNotifier">{{daysAppointments(day)}}</div>
</td>
</tr>
<tr>
<td *ngFor="let day of month.weekOfMonth(4)" (click)="gotoDetail(day)">{{day.day}}
<td *ngFor="let day of month.weekOfMonth(4)" [class.today]="day.day === today && day.month === thisMonth" (click)="gotoDetail(day)">{{day.day}}
<div *ngIf="daysAppointments(day) != 0" class="appointmentNotifier">{{daysAppointments(day)}}</div>
</td>
</tr>
<tr>
<td *ngFor="let day of month.weekOfMonth(5)" (click)="gotoDetail(day)">{{day.day}}
<td *ngFor="let day of month.weekOfMonth(5)" [class.today]="day.day === today && day.month === thisMonth" (click)="gotoDetail(day)">{{day.day}}
<div *ngIf="daysAppointments(day) != 0" class="appointmentNotifier">{{daysAppointments(day)}}</div>
</td>
</tr>
......
@import url('https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/css/bootstrap.min.css');
\ No newline at end of file
......@@ -33,4 +33,8 @@ class DashboardComponent implements OnInit, OnActivate {
joke = await _dashboardService.getJoke();
}
}
void refresh() async{
joke = await _dashboardService.getJoke();
}
}
\ No newline at end of file
<h3>HAHAHA</h3>
<p *ngFor="let entry of joke">{{entry}}</p>
\ No newline at end of file
<p *ngFor="let entry of joke">{{entry}}</p>
<button (click)="refresh()" class="btn">Refresh</button>
\ No newline at end of file
import 'dart:core' as prefix0;
import 'dart:core';
import 'dart:html';
import 'package:angular/angular.dart';
import 'package:angular_router/angular_router.dart';
......@@ -32,8 +33,14 @@ class AppComponent {
//todo muss raus hier
static bool showButtons = false;
void logout() {
LoginComponent.loggedIn = false;
showButtons = false;
if (window.confirm('Are you sure you want to log out?')) {
LoginComponent.loggedIn = false;
showButtons = false;
} else {
// Do nothing!
}
}
}
// Connection Defaults soll später im Clienten einstellbar sein.
......
......@@ -10,7 +10,7 @@
[routerLinkActive]="'active'">Calendar
</li>
<li [routerLink]="RoutePaths.appointments.toUrl()"
[routerLinkActive]="'active'">Agenda
[routerLinkActive]="'active'">All Appointments (Agenda)
</li>
<li [routerLink]="RoutePaths.appointmentNew.toUrl()"
[routerLinkActive]="'active'">New Appointment
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment