import {ApplicationConfig} from "../common/entities/ApplicationConfig"; import {HostExtractor} from "../common/util/HostExtractor"; import {UserDataState} from "../common/state/UserDataState"; import {QuoteService} from "../common/services/QuoteService"; import {EligibilityService} from "../common/services/EligibilityService"; import {LayoutState} from "../common/state/LayoutState"; import {OptimizelyService} from "../common/services/OptimizelyService"; import {AnalyticsService} from "../common/services/AnalyticsService"; import {GetQuoteController} from "./GetQuote"; export class GetQuoteControllerEV extends GetQuoteController { chargingAtHome: String; clientHasEV: Boolean; constructor(APP_CONFIG: ApplicationConfig, host: HostExtractor, userDataState: UserDataState, quoteService: QuoteService, eligibilityServiceNew: EligibilityService, $state: ng.ui.IStateService, $anchorScroll: ng.IAnchorScrollService, layoutState: LayoutState, optimizelyService: OptimizelyService, analyticsService: AnalyticsService) { super(APP_CONFIG, host, userDataState, quoteService, eligibilityServiceNew, $state, $anchorScroll, layoutState, optimizelyService, analyticsService); this.chargingAtHome = "High"; this.clientHasEV = false; } quoteHandler = () => { this.$state.go('^.plan'); }; parseQueryParams(params: ng.ui.IStateParamsService) { this.userDataState.postcode = params.postcode || this.userDataState.postcode; this.userDataState.paymentMethod = 'Paym'; } submit() { this.analyticsService.push({chargingAtHome: this.chargingAtHome}); return super.submit(); } }