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.
mohemmionic5/Mohem/src/app/offersdiscount/offer-details/offer-details.component.ts

30 lines
1.1 KiB
TypeScript

import { Component, OnInit } from '@angular/core';
import { CommonService } from 'src/app/hmg-common/services/common/common.service';
import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service';
import { OfferDiscountService } from '../services/service';
@Component({
selector: 'app-offer-details',
templateUrl: './offer-details.component.html',
styleUrls: ['./offer-details.component.scss'],
})
export class OfferDetailsComponent implements OnInit {
public details: any;
public direction: String;
public related: any;
constructor(public ts: TranslatorService, public cs: CommonService, public offersService: OfferDiscountService) { }
ngOnInit() {
this.direction = TranslatorService.getCurrentDirection();
this.details = this.cs.sharedService.getSharedData(OfferDiscountService.selected_offers, false);
this.related = this.cs.sharedService.getSharedData(OfferDiscountService.related_offers, false);
}
checkDate(date) {
return new Date(date) >= new Date()
}
getDotted(temp) {
return temp.substring(0, 75) + " ...";
}
}