UNPKG

consumerportal

Version:

mydna Custimised for you

45 lines (38 loc) 1.81 kB
/// <reference path="../../includes.ts" /> module app { class Controller { public close: Function; public static $inject = ['$scope']; constructor(private $scope: angular.IScope) { } openBooking() { let d: Date = new Date(); let url: string = d.getDate() > 27 && d.getMonth() == 11 || d.getFullYear() > 2017 ? 'https://app.acuityscheduling.com/schedule.php?owner=14769732' : 'https://mydnalifeptyltd.gettimely.com/book'; window.open(url, '_blank'); this.close(); } } class Component { public bindings: any = { close: '<' }; public template: string = ` <div> <div><div>Your Report is Ready</div><div ng-click="vm.close()"></div></div> <div> <p>Book an appointment to speak to one of our friendly team members who will take you through your test findings.</p> <p>This is an easy process and it won’t take long.</p> <p>During this call our consultant will highlight your findings after which your report will be uploaded to the secure portal.</p> <p>Please Note - you will only be able to access your report once your consultation is complete.</p> </div> <div> <button ng-click="vm.openBooking()"><span>Book Your Phone Consultation Here</span></button> </div> </div>`; public controller: any = Controller; public controllerAs: string = 'vm'; } angular .module('app') .component('diettga', new Component()); }