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booking/pci-new-booking.model.ts","./src/app/models/reports/export-pdf-content.model.ts","./src/app/models/shared/export-pdf-options.model.ts","./src/app/shared/helpers/form-helper.ts"],"sourcesContent":["import { PartnerModel } from '../partners/partner.model';\r\nimport { EnumModel } from '../shared/enum-model';\r\nimport { RatePlanBaseModel } from '../rate-plan/rate-plan-base.model';\r\nimport { CountryModel } from '../account/country.model';\r\nimport { CurrencyModel } from '../account/currency.model';\r\n\r\nexport class NewBookingPDModel {\r\n public partners: PartnerModel[] = [];\r\n public beddingTypes: EnumModel[] = [];\r\n public ratePlans: RatePlanBaseModel[] = [];\r\n public bookingStatus: EnumModel[] = [];\r\n public countries: CountryModel[] = [];\r\n public titles: EnumModel[] = [];\r\n public bookingSources: BookingSourceModel[] = [];\r\n public bookingPaymentTypes: EnumModel[] = [];\r\n public showEmailCheckBox: boolean;\r\n}\r\n\r\nexport class BookingSourceModel {\r\n public id: number;\r\n public name: string;\r\n public dateCreated: Date;\r\n public active: any;\r\n}\r\n","import { BookingFlowModel } from './booking-flow.model';\r\nimport { FunctionFlowModel } from '../function-room/function-flow.model';\r\nimport { CalendarBookingModel } from './calendar-new-booking-pd.model';\r\n\r\nexport class PciNewBookingModel {\r\n public bookingFlow: BookingFlowModel;\r\n public pciBookingToken: string;\r\n public cardMask: string;\r\n}\r\n\r\nexport class PciNewCalendarBookingModel {\r\n public bookingFlow: CalendarBookingModel;\r\n public pciBookingToken: string;\r\n public cardMask: string;\r\n}\r\n\r\nexport class PciNewFunctionModel {\r\n public functionFlow: FunctionFlowModel;\r\n public pciBookingToken: string;\r\n public cardMask: string;\r\n}\r\n","export class ExportPdfContentModel {\r\n content: string;\r\n isHtml: boolean;\r\n\r\n constructor(content: string, isHtml: boolean) {\r\n this.content = content;\r\n this.isHtml = isHtml;\r\n }\r\n}","import { ExportPdfHeader, ExportPdfPostCompleteAction } from \"src/app/enums/export-pdf.enum\";\r\n\r\nexport class ExportPdfOptionsModel {\r\n public reportTitle: string;\r\n public fileName: string;\r\n public header: ExportPdfHeaderOptionsModel;\r\n public footer: boolean;\r\n public postCompleteAction: ExportPdfPostCompleteAction;\r\n\r\n constructor() {\r\n this.header = new ExportPdfHeaderOptionsModel();\r\n }\r\n \r\n}\r\n\r\nexport class ExportPdfHeaderOptionsModel {\r\n public headerLeft: ExportPdfHeader;\r\n public headerRight: ExportPdfHeader;\r\n}","import { FormBuilder, UntypedFormGroup, Validators, UntypedFormControl, AbstractControl } from '@angular/forms';\r\n\r\nexport default class FormHelper {\r\n\r\n static validateAllFormFields(formGroup: UntypedFormGroup) {\r\n Object.keys(formGroup.controls).forEach(field => {\r\n const control = formGroup.get(field);\r\n \r\n if (control instanceof UntypedFormControl) {\r\n control.markAsTouched({ onlySelf: true });\r\n } \r\n else if (control instanceof UntypedFormGroup) {\r\n this.validateAllFormFields(control);\r\n }\r\n });\r\n }\r\n\r\n static isFormTouched(formGroup: UntypedFormGroup): boolean {\r\n let formTouched = false;\r\n Object.keys(formGroup.controls).forEach(field => {\r\n const control = formGroup.get(field);\r\n if (control instanceof UntypedFormControl) {\r\n if (control.pristine === false) {\r\n formTouched = true;\r\n }\r\n } \r\n });\r\n return formTouched;\r\n }\r\n\r\n static resetForm(formGroup: UntypedFormGroup) {\r\n let control: AbstractControl = null;\r\n formGroup.reset();\r\n formGroup.markAsUntouched();\r\n formGroup.markAsPristine();\r\n Object.keys(formGroup.controls).forEach((name) => {\r\n control = formGroup.controls[name];\r\n control.setErrors(null);\r\n control.markAsPristine();\r\n });\r\n }\r\n\r\n}"],"names":["NewBookingPDModel","constructor","_defineProperty","BookingSourceModel","PciNewBookingModel","PciNewCalendarBookingModel","PciNewFunctionModel","ExportPdfContentModel","content","isHtml","ExportPdfOptionsModel","header","ExportPdfHeaderOptionsModel","UntypedFormGroup","UntypedFormControl","FormHelper","validateAllFormFields","formGroup","Object","keys","controls","forEach","field","control","get","markAsTouched","onlySelf","isFormTouched","formTouched","pristine","resetForm","reset","markAsUntouched","markAsPristine","name","setErrors","default"],"sourceRoot":"webpack:///","x_google_ignoreList":[]}