/** * @Component Name: CreditCheckComponent * @Module: Home * @Module Functionality : To display the customer credit check information * @Creation Date: August 12,2017 * @Author: sbaireddy * @Version: 1.0 */ import { EventEmitter, OnInit, OnDestroy } from '@angular/core'; import { NgForm } from '@angular/forms'; import { User } from '../shared/modal/user'; import { Cart } from '../shared/modal/cart'; import { SharedService } from '../shared/shared.service'; import { UserService } from '../services/user.service'; import { CartService } from '../services/cart.service'; import { CustomerService } from '../services/customer.service'; import { IDormantProperties } from '../shared/modal/common'; export declare class CreditCheckComponent implements OnInit, OnDestroy { sharedService: SharedService; userService: UserService; cartService: CartService; customerService: CustomerService; private COMPONENT_NAME; karmaTestResult: any; stateItems: any[]; idTypeItems: any[]; bdStoreId: number; rtStoreId: number; cdStoreId: number; csStoreId: number; creditType: string; customerModel: any; customerForm: any; onResetForm: EventEmitter; storeId: number; creditCheckModel: any; dob: string; birthYear: number; expirationYear: number; expiration: number; isDateValid: boolean; minAllowedDate: any; user: User; cart: Cart; subscription: any; hasItemsInCart: boolean; isDealerCodeExists: boolean; maxdate: any; conflictModel: any; disablePIN: boolean; today: Date; eligibleAge: number; type: string; clearAllStatus: boolean; isEmployee: boolean; isUnderAge: boolean; isPreScreenFailure: boolean; dormantProperties: IDormantProperties; disableSsn3: boolean; prescreenEnabled: boolean; constructor(sharedService: SharedService, userService: UserService, cartService: CartService, customerService: CustomerService); /** * This function is used to initialize the directive/component after Angular * first displays the data-bound properties.It is invoked only once when the * directive is instantiated.Here it is initializing all the states, ID Types, user and cart informations * @return {void} */ ngOnInit(): void; /** * This function is called whenever one or more data-bound input properties change * @return {void} */ ngOnChanges(): void; /** * Cleanup just before Angular destroys the directive/component. * Unsubscribe Observables and detach event handlers to avoid memory leaks. * @return void */ ngOnDestroy(): void; /** * This function is used to check the credit eligibility of a customer based on their * credit history * @return void */ checkEligibility(): void; /** * This function is used to perform the customer credit check through * creditCheck function in customer service * @param {number} orderId - order id to refer the order details * @return void */ processCreditCheck(orderId: number): void; /** * This function is used to resolve conflicts * @returns void */ resolveConflicts(): void; /** * This function is used to resolve the conflicted data after * the process credit check * @return void */ removeConflicts(): void; /** * This function is used for clearing the form elements * @returns void */ resetCreditCheck(frm: NgForm): void; /** * This function is used set the state as empty when selected id type US Alien ID * @param {any} idSelected - contains the selected ID * @returns void */ idTypeChanged(idSelected: any): void; }