import { Component, OnInit } from '@angular/core'; import { AuthService } from 'src/app/shared/services/auth.service'; import * as Moment from 'moment' @Component({ selector: 'app-profile-container-xs', templateUrl: './profile-container-xs.component.html', styleUrls: ['./profile-container-xs.component.css'] }) export class ProfileContainerXsComponent implements OnInit { _currentlyExpanded: string; GDRPDueIn: string; constructor(public auth: AuthService) { } ngOnInit() { this.GDRPDueIn = this.auth.User.gdprDueIn(); } Toggle(zone: string) { if (!this._currentlyExpanded) { this._currentlyExpanded = zone; } else { if (this.Expanded(zone)) { this._currentlyExpanded = null; } else { this._currentlyExpanded = zone; } } } Expanded(zone: string) { return this._currentlyExpanded == zone; } ExpandCollapseText(zone: string) { if (this.Expanded(zone)) { return "Click to Collapse"; } return "Click to Expand"; } }