You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
mohemmhmg/Mohem/src/app/time-card/time-card-details/time-card-details.component.ts

52 lines
1.5 KiB
TypeScript

import { Component, OnInit } from '@angular/core';
import { TimeCardService } from 'src/app/time-card/service/time-card.service';
import { GetShiftTypeResponse } from '../service/models/get-shift-type.response';
import { CommonService } from 'src/app/hmg-common/services/common/common.service';
import { ModalController } from '@ionic/angular';
import { SelectPeriodComponent } from '../select-period/select-period.component';
@Component({
selector: 'app-time-card-details',
templateUrl: './time-card-details.component.html',
styleUrls: ['./time-card-details.component.scss'],
})
export class TimeCardDetailsComponent implements OnInit {
public activeSegment: any = 'time-card-summary';
public showMore: any = false;
constructor(
public timeCardService: TimeCardService,
public cs: CommonService,
public modalController: ModalController
) { }
ngOnInit() {
// this.getShiftType();
}
public segmentChanged(event: any) {
this.activeSegment = event.detail.value;
}
public getShiftType() {
this.timeCardService.getShiftType().subscribe((result: GetShiftTypeResponse) => {
if (this.cs.validResponse(result)) {
console.log('umar' + result);
}
});
}
public toggleButton() {
this.showMore = !this.showMore;
}
async openSelectPeriodModal() {
const modal = await this.modalController.create({
component: SelectPeriodComponent,
cssClass: 'select-period-custom-modal'
});
return await modal.present();
}
}