Ви не можете вибрати більше 25 тем
Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.
Це архівний репозитарій. Ви можете переглядати і клонувати файли, але не можете робити пуш або відкривати питання/запити.
|
- import { Component, OnInit } from '@angular/core';
- import { Location } from '@angular/common';
- import { DemoService } from '../services/demo.service';
-
- @Component({
- selector: 'app-attendance',
- templateUrl: './attendance.component.html',
- styleUrls: ['./attendance.component.scss']
- })
- export class AttendanceComponent implements OnInit {
- selectedList: number = 1;
- selectedSegment: any;
- selectedSegmentTab: any;
- selectedReportYear: any;
- demoType: string;
- attendanceList = [];
-
- constructor(
- private location: Location,
- private demoService: DemoService
- ) { }
-
- ngOnInit(): void {
- this.demoType = localStorage.demoType;
-
- this.attendanceList = this.demoService.attendanceList;
-
- if (this.demoType === 'Teacher') {
- this.selectedList = 1;
- this.selectedSegment = this.attendanceList[0];
- this.selectedSegmentTab = this.attendanceList[0].subjects[0];
- this.selectedReportYear = this.attendanceList[0].subjects[0].attendance[0].year;
- } else {
- this.selectedList = 1;
- this.selectedSegment = 'ALL';
- this.selectedSegmentTab = 'report';
- this.selectedReportYear = 2020;
- }
- }
-
- back() {
- this.location.back();
- }
-
- }
|