diff --git a/src/app/calendar/calendar.component.html b/src/app/calendar/calendar.component.html index edf17de..cd12a67 100644 --- a/src/app/calendar/calendar.component.html +++ b/src/app/calendar/calendar.component.html @@ -1,8 +1,12 @@ -
+
@@ -80,6 +84,158 @@ + +
+
{{ selectedDate - 1 }}, {{ selectedMonth }} {{ selectedYear }}
+
    +
  • + +
    +
    + +

    8:00 AM to 10:00 AM

    +
    + Attended +
    +
  • + +
  • + +
    +
    + +

    11:00 AM to 1:00 PM

    +
    + Absent +
    + +
  • + +
  • + +
    +
    + +

    2:00 PM to 3:00 PM

    +
    + Late by 10 mins +
    + +
  • + +
  • + +
    +
    + +

    4:00 AM to 5:00 PM

    +
    + Progress +
    + +
  • +
+ +
{{ selectedDate - 2 }}, {{ selectedMonth }} {{ selectedYear }}
+
    +
  • + +
    +
    + +

    8:00 AM to 10:00 AM

    +
    + Attended +
    +
  • + +
  • + +
    +
    + +

    11:00 AM to 1:00 PM

    +
    + Absent +
    + +
  • + +
  • + +
    +
    + +

    2:00 PM to 3:00 PM

    +
    + Late by 10 mins +
    + +
  • + +
  • + +
    +
    + +

    4:00 AM to 5:00 PM

    +
    + Progress +
    + +
  • +
+ +
{{ selectedDate - 3 }}, {{ selectedMonth }} {{ selectedYear }}
+
    +
  • + +
    +
    + +

    8:00 AM to 10:00 AM

    +
    + Attended +
    +
  • + +
  • + +
    +
    + +

    11:00 AM to 1:00 PM

    +
    + Absent +
    + +
  • + +
  • + +
    +
    + +

    2:00 PM to 3:00 PM

    +
    + Late by 10 mins +
    + +
  • + +
  • + +
    +
    + +

    4:00 AM to 5:00 PM

    +
    + Progress +
    + +
  • +
+
diff --git a/src/app/calendar/calendar.component.scss b/src/app/calendar/calendar.component.scss index b1387fd..bd34b2f 100644 --- a/src/app/calendar/calendar.component.scss +++ b/src/app/calendar/calendar.component.scss @@ -26,6 +26,17 @@ } } + .show-all-button { + margin-left: auto; + background-color: var(--dark-grey); + color: white; + border: 0px; + border-radius: 3px; + height: 35px; + padding: 0 15px; + font-size: 14px; + } + .profile-button { background-color: transparent; margin-left: auto; @@ -126,14 +137,14 @@ } .schedule-details { - max-height: calc(100vh - 60px); background-color: white; - padding: 40px 5% 100px; + padding: 0 5% 100px; overflow: auto; border-top-left-radius: 30px; border-top-right-radius: 30px; position: relative; - + z-index: 0; + &::before { content: ''; position: absolute; @@ -149,6 +160,7 @@ color: var(--dark-grey); font-size: 16px; font-weight: 700; + margin-top: 40px; } ul { @@ -245,17 +257,19 @@ .content-holder { width: calc(100% - 40px); display: flex; - padding: 0 10px; + padding: 15px 15px; align-items: center; + box-shadow: 1px 1px 5px var(--light-grey); + border-radius: 7px; .content { - width: calc(100% - 150px); + flex-grow: 1; } .status { font-size: 14px; text-align: right; - flex-grow: 1; + margin-left: auto; } } diff --git a/src/app/calendar/calendar.component.ts b/src/app/calendar/calendar.component.ts index 52c1013..2df213b 100644 --- a/src/app/calendar/calendar.component.ts +++ b/src/app/calendar/calendar.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, ElementRef, ViewChild } from '@angular/core'; import { Location } from '@angular/common'; @Component({ @@ -7,6 +7,7 @@ import { Location } from '@angular/common'; styleUrls: ['./calendar.component.scss'] }) export class CalendarComponent implements OnInit { + @ViewChild('scrollMe') private myScrollContainer: ElementRef; currentDate: number; currentMonth: string; currentYear: number; @@ -18,10 +19,22 @@ export class CalendarComponent implements OnInit { succeedingDays: Array = []; selectedMonthDays: Array = []; + showAllSchedules: boolean = false; + constructor( private location: Location ) { } + scrollToBottom() { + this.showAllSchedules = !this.showAllSchedules; + + if (this.showAllSchedules) { + try { + this.myScrollContainer.nativeElement.scrollTop = this.myScrollContainer.nativeElement.scrollHeight; + } catch(err) { } + } + } + ngOnInit(): void { this.selectToday(); }