No puede seleccionar más de 25 temas
Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.
Este repositorio está archivado. Puede ver los archivos y clonarlo, pero no puede subir cambios o reportar incidencias ni pedir Pull Requests.
|
- 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();
- }
-
- }
|