@qubesense/customer-farm 0.1.2 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/esm2020/lib/customer-farm.component.mjs +203 -0
  2. package/esm2020/lib/customer-farm.module.mjs +106 -0
  3. package/esm2020/lib/customer-farm.service.mjs +129 -0
  4. package/esm2020/lib/dependencies/customer-farm-api-urls.mjs +19 -0
  5. package/esm2020/lib/dependencies/customer-farm-model.mjs +57 -0
  6. package/esm2020/public-api.mjs +9 -0
  7. package/esm2020/qubesense-customer-farm.mjs +5 -0
  8. package/fesm2015/qubesense-customer-farm.mjs +539 -0
  9. package/fesm2015/qubesense-customer-farm.mjs.map +1 -0
  10. package/fesm2020/qubesense-customer-farm.mjs +514 -0
  11. package/fesm2020/qubesense-customer-farm.mjs.map +1 -0
  12. package/index.d.ts +5 -0
  13. package/lib/customer-farm.component.d.ts +80 -0
  14. package/lib/customer-farm.module.d.ts +24 -0
  15. package/lib/customer-farm.service.d.ts +58 -0
  16. package/lib/dependencies/customer-farm-api-urls.d.ts +9 -0
  17. package/lib/dependencies/customer-farm-model.d.ts +48 -0
  18. package/package.json +31 -11
  19. package/{src/public-api.ts → public-api.d.ts} +0 -4
  20. package/.eslintrc.json +0 -44
  21. package/karma.conf.js +0 -44
  22. package/ng-package.json +0 -7
  23. package/src/lib/customer-farm.component.html +0 -93
  24. package/src/lib/customer-farm.component.scss +0 -0
  25. package/src/lib/customer-farm.component.ts +0 -207
  26. package/src/lib/customer-farm.module.ts +0 -54
  27. package/src/lib/customer-farm.service.ts +0 -126
  28. package/src/lib/dependencies/customer-farm-api-urls.ts +0 -22
  29. package/src/lib/dependencies/customer-farm-model.ts +0 -52
  30. package/src/test.ts +0 -27
  31. package/tsconfig.lib.json +0 -15
  32. package/tsconfig.lib.prod.json +0 -10
  33. package/tsconfig.spec.json +0 -17
@@ -0,0 +1 @@
1
+ {"version":3,"file":"qubesense-customer-farm.mjs","sources":["../../../projects/customer-farm/src/lib/dependencies/customer-farm-api-urls.ts","../../../projects/customer-farm/src/lib/customer-farm.service.ts","../../../projects/customer-farm/src/lib/dependencies/customer-farm-model.ts","../../../projects/customer-farm/src/lib/customer-farm.component.ts","../../../projects/customer-farm/src/lib/customer-farm.component.html","../../../projects/customer-farm/src/lib/customer-farm.module.ts","../../../projects/customer-farm/src/public-api.ts","../../../projects/customer-farm/src/qubesense-customer-farm.ts"],"sourcesContent":["export class CustomerFarmApiUrls {\r\n //api Url string for get data by Id\r\n getCustomerFarmByIdUrl: string = 'api/CustomerFarm/GetById';\r\n \r\n //api Url string for insert Customer data\r\n insertCustomerFarmDataUrl: string = 'api/CustomerFarm/Create';\r\n\r\n //api Url string for update Customer record\r\n updateCustomerFarmDataUrl: string = 'api/CustomerFarm/Update';\r\n\r\n //api Url string for delete Customer record\r\n deleteCustomerFarmDataUrl: string = 'api/CustomerFarm/Delete';\r\n\r\n //api Url string for get Customer list\r\n getCustomerFarmListUrl: string = 'api/CustomerFarm/GetAll';\r\n \r\n //api Url string for get Customer dropdown list\r\n getCustomerFarmDropdownListUrl: string = 'api/CustomerFarm/GetDropdownList';\r\n\r\n //api Url string for get Customer dropdown list\r\n getcustomerlistbykeyword: string = 'api/CustomerFarm/SearchCustomer';\r\n}","import { Injectable } from '@angular/core';\r\nimport { DataAccessService, WebApiResult } from '@qubesense/base-services';\r\nimport { CustomerFarmApiUrls } from './dependencies/customer-farm-api-urls';\r\nimport { CustomerFarmModel } from './dependencies/customer-farm-model';\r\n\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class CustomerFarmService {\r\n\r\n constructor(private dataAccessService: DataAccessService) { }\r\n\r\n customerFarmApiUrls = new CustomerFarmApiUrls();\r\n\r\n /**\r\n * service for get customer data by Id\r\n * \r\n * @param customerGUID \r\n * \r\n * @returns Response Data from Database\r\n */\r\n public async GetDataById(customerGUID: string): Promise<WebApiResult> {\r\n try {\r\n const url = this.customerFarmApiUrls.getCustomerFarmByIdUrl + '/' + customerGUID;\r\n const resultResponse = await this.dataAccessService.GetDataById(url);\r\n return resultResponse;\r\n } catch (error) {\r\n throw error;\r\n }\r\n }\r\n\r\n /**\r\n * service for inserting customer data into database\r\n * \r\n * @param customerFarmModel \r\n * \r\n * @returns Response message from Database\r\n */\r\n public async InsertData(customerFarmModel: CustomerFarmModel) {\r\n try {\r\n const url = this.customerFarmApiUrls.insertCustomerFarmDataUrl;\r\n const resultResponse = await this.dataAccessService.InsertData(url, customerFarmModel);\r\n return resultResponse;\r\n } catch (error) {\r\n throw error;\r\n }\r\n }\r\n\r\n /**\r\n * service for update customer Data\r\n * \r\n * @param customerFarmModel \r\n * \r\n * @returns Response message from Database\r\n */\r\n public async UpdateData(customerFarmModel: CustomerFarmModel) {\r\n try {\r\n const url = this.customerFarmApiUrls.updateCustomerFarmDataUrl;\r\n const resultResponse = await this.dataAccessService.UpdateData(url, customerFarmModel);\r\n return resultResponse;\r\n } catch (error) {\r\n throw error;\r\n }\r\n }\r\n\r\n /**\r\n * service for delete customer data by GUID\r\n * \r\n * @param customerFarmModel \r\n * \r\n * @returns Response message from Database\r\n */\r\n public async DeleteData(recordId: any) {\r\n try {\r\n const url = this.customerFarmApiUrls.deleteCustomerFarmDataUrl + '/' + recordId;\r\n const resultResponse = await this.dataAccessService.DeleteData(url);\r\n return resultResponse;\r\n }\r\n catch (error) {\r\n throw error;\r\n }\r\n }\r\n\r\n /**\r\n * service for get data for customer grid \r\n * \r\n * @param customerFarmModel \r\n * \r\n * @returns Response Data from Database\r\n */\r\n public async GetListData(customerDataModel: CustomerFarmModel) {\r\n try {\r\n const url = this.customerFarmApiUrls.getCustomerFarmListUrl;\r\n const resultResponse = await this.dataAccessService.GetListData(url, customerDataModel);\r\n return resultResponse;\r\n } catch (error) {\r\n throw error;\r\n }\r\n }\r\n\r\n /**\r\n * service for get data for customer DropDown List\r\n * \r\n * @returns \r\n */\r\n public async GetCustomersDropdownList() {\r\n try {\r\n const url = this.customerFarmApiUrls.getCustomerFarmDropdownListUrl;\r\n const resultResponse = await this.dataAccessService.GetDropdownListData(url);\r\n return resultResponse;\r\n } catch (error) {\r\n throw error;\r\n }\r\n }\r\n\r\n public async GetCustomerListByKeyword(value:string) {\r\n try {\r\n const url = this.customerFarmApiUrls.getcustomerlistbykeyword + '/' + value;\r\n const resultResponse = await this.dataAccessService.GetDataById(url);\r\n return resultResponse;\r\n } catch (error) {\r\n throw error;\r\n }\r\n }\r\n}\r\n","export class CustomerFarmModel {\r\n formCode: string = null;\r\n formId: string = '';\r\n recordId: string = null;\r\n customerId: string = null;\r\n customerName: string = '';\r\n defaultWarehouse: string = '';\r\n personInCharge: string = '';\r\n displayName: string = '';\r\n primaryVetId: string = '';\r\n PICTattoo: string = '';\r\n isActive: boolean = true;\r\n isDeleted: boolean = false;\r\n}\r\n\r\nexport class CustomerFarmConfigrationModel {\r\n formCode: string = null;\r\n customerId: string = null;\r\n defaultView: boolean = false;\r\n showModal: boolean = false;\r\n showGrid: boolean = false;\r\n isSearchable: boolean = false;\r\n showClientData: boolean = false;\r\n customerData: CustomerFarmModel = null;\r\n userMessages: boolean = false;\r\n requiredCustomerFarmSection: boolean = false;\r\n allowedCustomerFarmSection: boolean = false;\r\n requiredCustomerFarmFields: RequiredCustomerFarmFields = new RequiredCustomerFarmFields();\r\n allowedCustomerFarmFields: AllowedCustomerFarmFields = new AllowedCustomerFarmFields();\r\n}\r\n\r\nexport class RequiredCustomerFarmFields {\r\n customerName: boolean = true;\r\n customerId: boolean = true;\r\n defaultWarehouse: boolean = true;\r\n personInCharge: boolean = true;\r\n primaryVetId: boolean = true;\r\n displayName: boolean = true;\r\n PICTattoo: boolean = false;\r\n profileImageURL: boolean = false;\r\n}\r\n\r\nexport class AllowedCustomerFarmFields {\r\n customerName: boolean = true;\r\n defaultWarehouse: boolean = true;\r\n personInCharge: boolean = true;\r\n primaryVetId: boolean = true;\r\n PICTattoo: boolean = true;\r\n displayName: boolean = true;\r\n profileImageURL: boolean = false;\r\n}\r\n\r\n","import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';\r\nimport { FormBuilder, FormGroup, Validators } from '@angular/forms';\r\nimport { CustomerFarmConfigrationModel, CustomerFarmModel } from './dependencies/customer-farm-model';\r\nimport { ErrorLogService, GridEventsModel, KendoGridviewConfigurationModel, ToastrNotificationService } from '@qubesense/base-services';\r\nimport { CustomerFarmService } from './customer-farm.service';\r\n\r\n@Component({\r\n selector: 'lib-customer-farm',\r\n templateUrl: './customer-farm.component.html',\r\n styleUrls: ['./customer-farm.component.scss']\r\n})\r\nexport class CustomerFarmComponent implements OnInit {\r\n @Output() customerFarmData = new EventEmitter<any>();\r\n @Input() public customerFarmConfiguration: CustomerFarmConfigrationModel = new CustomerFarmConfigrationModel();\r\n customerFarmForm: FormGroup;\r\n userMessages: string[] = [];\r\n public gridData: any[] = [];\r\n gridConfiguration: KendoGridviewConfigurationModel = new KendoGridviewConfigurationModel();\r\n hideButtons = false;\r\n isViewCall = false;\r\n speciesList: any[] = [];\r\n filteredCustomers:[];\r\n\r\n constructor(private customerFarmService: CustomerFarmService,\r\n private formBuilder: FormBuilder,\r\n private errorLogService: ErrorLogService,\r\n private toastr: ToastrNotificationService\r\n ) { }\r\n\r\n ngOnInit() {\r\n this.DeclareForm();\r\n if (this.customerFarmConfiguration.showGrid) {\r\n this.gridConfiguration.FormCode = 'CUFA';\r\n this.gridConfiguration.showModal = true;\r\n this.gridConfiguration.actions = { 'View': false, 'Edit': true, 'Delete': true, 'Generate PDF': false }; \r\n this.GetListData();\r\n }\r\n }\r\n\r\n DeclareForm() {\r\n this.customerFarmForm = this.formBuilder.group({\r\n recordId : [null],\r\n customerId : [null],\r\n customerName : [null],\r\n defaultWarehouse : [null],\r\n personInCharge : [null],\r\n displayName : [null],\r\n primaryVetId : [null],\r\n PICTattoo : [null],\r\n isActive : [true]\r\n });\r\n if (this.customerFarmConfiguration.requiredCustomerFarmFields.customerName) {\r\n this.customerFarmForm.get('customerName').addValidators(Validators.required);\r\n this.customerFarmForm.get('customerName').addValidators(Validators.pattern('^[a-zA-Z ]*$'));\r\n this.customerFarmForm.get('customerName').addValidators(Validators.minLength(3));\r\n }\r\n if (this.customerFarmConfiguration.requiredCustomerFarmFields.defaultWarehouse) {\r\n this.customerFarmForm.get('defaultWarehouse').addValidators(Validators.required);\r\n }\r\n if (this.customerFarmConfiguration.requiredCustomerFarmFields.personInCharge) {\r\n this.customerFarmForm.get('personInCharge').addValidators(Validators.required);\r\n }\r\n if (this.customerFarmConfiguration.requiredCustomerFarmFields.primaryVetId) {\r\n this.customerFarmForm.get('primaryVetId').addValidators(Validators.required);\r\n }\r\n }\r\n\r\n ///////////////////////////////////standard methods/////////////////////////////////////////////////////\r\n\r\n /**\r\n * @description\r\n *\r\n * edit data list item using data item GUID\r\n *\r\n * @param customerId\r\n *\r\n * gets customer GUID from gridData and passes it to this function\r\n */\r\n async EditData(customerId:string) {\r\n const getResponse = await this.customerFarmService.GetDataById(customerId);\r\n this.customerFarmForm.controls['recordId'].setValue(getResponse.apiData.recordId);\r\n this.customerFarmForm.controls['customerId'].setValue(getResponse.apiData.customerId);\r\n this.customerFarmForm.controls['customerName'].setValue(getResponse.apiData.customerName);\r\n this.customerFarmForm.controls['defaultWarehouse'].setValue(getResponse.apiData.defaultWarehouse);\r\n this.customerFarmForm.controls['personInCharge'].setValue(getResponse.apiData.personInCharge);\r\n this.customerFarmForm.controls['displayName'].setValue(getResponse.apiData.displayName);\r\n this.customerFarmForm.controls['primaryVetId'].setValue(getResponse.apiData.primaryVetId);\r\n this.customerFarmForm.controls['PICTattoo'].setValue(getResponse.apiData.picTattoo);\r\n this.customerFarmForm.controls['isActive'].setValue(getResponse.apiData.isActive); \r\n }\r\n\r\n /**\r\n * @description\r\n *\r\n * this method converts all form inputs into model class\r\n *\r\n * @returns model with new form values\r\n */\r\n ConvertFormToModel() {\r\n const customerFarmModel = new CustomerFarmModel();\r\n customerFarmModel.recordId = this.customerFarmForm.value.recordId;\r\n customerFarmModel.customerName = this.customerFarmForm.value.customerName;\r\n customerFarmModel.defaultWarehouse = this.customerFarmForm.value.defaultWarehouse;\r\n customerFarmModel.personInCharge = this.customerFarmForm.value.personInCharge;\r\n customerFarmModel.displayName = this.customerFarmForm.value.displayName;\r\n customerFarmModel.primaryVetId = this.customerFarmForm.value.primaryVetId;\r\n customerFarmModel.PICTattoo = this.customerFarmForm.value.PICTattoo;\r\n customerFarmModel.customerId = this.customerFarmConfiguration.customerId;\r\n customerFarmModel.formCode = this.customerFarmConfiguration.formCode;\r\n\r\n return customerFarmModel;\r\n }\r\n\r\n /**\r\n * @description\r\n * clear form data\r\n */\r\n ClearForm() {\r\n this.DeclareForm();\r\n }\r\n\r\n emitDataToParent() {\r\n let customerFarmModel = new CustomerFarmModel();\r\n customerFarmModel = this.ConvertFormToModel();\r\n this.customerFarmData.emit(customerFarmModel);\r\n }\r\n\r\n /**\r\n * @description\r\n *\r\n * Insert customer data into database\r\n */\r\n public async InsertData() {\r\n let customerFarmModel = new CustomerFarmModel();\r\n customerFarmModel = this.ConvertFormToModel();\r\n const getResponse = await this.customerFarmService.InsertData(customerFarmModel);\r\n this.userMessages = getResponse.message.userMessage;\r\n if (this.customerFarmConfiguration.userMessages) {\r\n this.toastr.ShowSuccess(this.userMessages.toString());\r\n }\r\n }\r\n\r\n /**\r\n * @description\r\n *\r\n * update customer data into database\r\n */\r\n public async UpdateData() {\r\n let customerFarmModel = new CustomerFarmModel();\r\n customerFarmModel = this.ConvertFormToModel();\r\n const getResponse = await this.customerFarmService.UpdateData(customerFarmModel);\r\n this.userMessages = getResponse.message.userMessage;\r\n if (this.customerFarmConfiguration.userMessages) {\r\n this.toastr.ShowSuccess(this.userMessages.toString());\r\n }\r\n }\r\n\r\n /**\r\n * @description\r\n *\r\n * Delete customer data into database\r\n */\r\n public async DeleteData(value) {\r\n const getResponse = await this.customerFarmService.DeleteData(value);\r\n this.userMessages = getResponse.message.userMessage;\r\n if (this.customerFarmConfiguration.userMessages) {\r\n this.toastr.ShowSuccess(this.userMessages.toString());\r\n }\r\n }\r\n\r\n /**\r\n * @description\r\n * \r\n * Grid events calls\r\n */\r\n handleGridEvents(gridEvents: GridEventsModel) {\r\n gridEvents.editRecord.subscribe((recordId) => {\r\n this.hideButtons = false;\r\n this.isViewCall = false;\r\n this.EditData(recordId);\r\n this.customerFarmForm.enable();\r\n });\r\n gridEvents.deleteRecord.subscribe((recordId) => {\r\n this.DeleteData(recordId);\r\n });\r\n gridEvents.viewRecord.subscribe(async (recordId) => {\r\n this.EditData(recordId);\r\n this.customerFarmForm.disable();\r\n });\r\n }\r\n\r\n \r\n /**\r\n * @description\r\n * get data for Customer grid list\r\n */\r\n public async GetListData() {\r\n const customerFarmModel = new CustomerFarmModel();\r\n try {\r\n const getResponse = await this.customerFarmService.GetListData(customerFarmModel);\r\n this.gridData = getResponse.apiData;\r\n } catch (error) {\r\n this.errorLogService.saveError(error);\r\n this.toastr.ShowAllErrors(error.error.message.userMessage);\r\n }\r\n }\r\n}\r\n","<div class=\"flex flex-col flex-auto min-w-0 w-full\">\r\n <!-- form code starts here -->\r\n <!--content-->\r\n <div class=\"sm:w-full overflow-hidden\" *ngIf=\"customerFarmConfiguration.showModal\">\r\n\r\n <!--form body-->\r\n <form class=\"flex flex-col overflow-hidden\" [formGroup]=\"customerFarmForm\">\r\n <!-- Customer Farm section start -->\r\n\r\n <div class=\"sm:flex\">\r\n <div class=\"w-full\">\r\n <div class=\"sm:flex px-8 pt-4\">\r\n <mat-form-field class=\"flex-auto w-full mr-4\"\r\n *ngIf=\"customerFarmConfiguration.allowedCustomerFarmFields.customerName\">\r\n <mat-label>Client Name</mat-label>\r\n <input matInput id=\"customerName\" placeholder=\"Client Name\" pattern=\"^[a-zA-Z ]*$\"\r\n minlength=\"3\" [formControlName]=\"'customerName'\" (change)=\"emitDataToParent()\">\r\n <mat-error\r\n *ngIf=\"customerFarmForm.get('customerName').hasError('required') && customerFarmConfiguration.requiredCustomerFarmFields.customerName \">\r\n Client Name is required\r\n </mat-error>\r\n <mat-error *ngIf=\"customerFarmForm.get('customerName').hasError('pattern')\">\r\n Please enter valid Client name\r\n </mat-error>\r\n <mat-error *ngIf=\"customerFarmForm.get('customerName').hasError('minlength')\">\r\n Client name must be of atleast 3 characters\r\n </mat-error>\r\n </mat-form-field>\r\n\r\n <mat-form-field class=\"flex-auto w-full\"\r\n *ngIf=\"customerFarmConfiguration.allowedCustomerFarmFields.defaultWarehouse\">\r\n <mat-label>Default Warehouse</mat-label>\r\n <input matInput id=\"defaultWarehouse\" placeholder=\"Default Warehouse\"\r\n [formControlName]=\"'defaultWarehouse'\" (change)=\"emitDataToParent()\">\r\n <mat-error\r\n *ngIf=\"customerFarmForm.get('defaultWarehouse').hasError('required') && customerFarmConfiguration.requiredCustomerFarmFields.defaultWarehouse\">\r\n Default Warehouse is required\r\n </mat-error>\r\n </mat-form-field>\r\n </div>\r\n\r\n <div class=\"sm:flex px-8 pt-4\">\r\n <mat-form-field class=\"flex-auto w-full mr-4\"\r\n *ngIf=\"customerFarmConfiguration.allowedCustomerFarmFields.personInCharge\">\r\n <mat-label>Person In Charge</mat-label>\r\n <input matInput id=\"personInCharge\" placeholder=\"Person In Charge\"\r\n [formControlName]=\"'personInCharge'\" (change)=\"emitDataToParent()\">\r\n <mat-error\r\n *ngIf=\"customerFarmForm.get('personInCharge').hasError('required') && customerFarmConfiguration.requiredCustomerFarmFields.personInCharge\">\r\n Person In Charge is required\r\n </mat-error>\r\n </mat-form-field>\r\n\r\n <mat-form-field class=\"flex-auto w-full\"\r\n *ngIf=\"customerFarmConfiguration.allowedCustomerFarmFields.displayName\">\r\n <mat-label>Display Name</mat-label>\r\n <input matInput id=\"displayName\" placeholder=\"Display Name\"\r\n [formControlName]=\"'displayName'\" (change)=\"emitDataToParent()\">\r\n </mat-form-field>\r\n </div>\r\n\r\n <div class=\"sm:flex px-8 pt-4\">\r\n <mat-form-field class=\"flex-auto w-full mr-4\"\r\n *ngIf=\"customerFarmConfiguration.allowedCustomerFarmFields.primaryVetId\">\r\n <mat-label>Primary Vet</mat-label>\r\n <input matInput id=\"primaryVetId\" placeholder=\"Primary Vet\"\r\n [formControlName]=\"'primaryVetId'\" (change)=\"emitDataToParent()\">\r\n <mat-error\r\n *ngIf=\"customerFarmForm.get('primaryVetId').hasError('required') && customerFarmConfiguration.requiredCustomerFarmFields.primaryVetId\">\r\n Primary Vet is required\r\n </mat-error>\r\n </mat-form-field>\r\n\r\n <mat-form-field class=\"flex-auto w-full\"\r\n *ngIf=\"customerFarmConfiguration.allowedCustomerFarmFields.PICTattoo\">\r\n <mat-label>PIC/Tattoo (if applicable)</mat-label>\r\n <input matInput id=\"PICTattoo\" placeholder=\"PIC/Tattoo\" [formControlName]=\"'PICTattoo'\"\r\n (change)=\"emitDataToParent()\">\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n\r\n </div>\r\n <!-- Customer Farm section End -->\r\n\r\n </form>\r\n </div>\r\n <!-- form code ends here -->\r\n\r\n</div>\r\n<div *ngIf=\"customerFarmConfiguration.showGrid\">\r\n <lib-kendo-grid-view [configuration]=\"gridConfiguration\" (events)=\"handleGridEvents($event)\"></lib-kendo-grid-view>\r\n </div>\r\n","import { NgModule } from '@angular/core';\r\nimport { CustomerFarmComponent } from './customer-farm.component';\r\nimport { MatCheckboxModule } from '@angular/material/checkbox';\r\nimport { CdkStepperModule } from '@angular/cdk/stepper';\r\nimport { CommonModule } from '@angular/common';\r\nimport { ReactiveFormsModule, FormsModule } from '@angular/forms';\r\nimport { MatButtonModule } from '@angular/material/button';\r\nimport { MatOptionModule, MatNativeDateModule } from '@angular/material/core';\r\nimport { MatDatepickerModule } from '@angular/material/datepicker';\r\nimport { MatFormFieldModule } from '@angular/material/form-field';\r\nimport { MatGridListModule } from '@angular/material/grid-list';\r\nimport { MatIconModule } from '@angular/material/icon';\r\nimport { MatInputModule } from '@angular/material/input';\r\nimport { MatSelectModule } from '@angular/material/select';\r\nimport { MatStepperModule } from '@angular/material/stepper';\r\nimport { MatToolbarModule } from '@angular/material/toolbar';\r\nimport { ButtonsModule } from '@progress/kendo-angular-buttons';\r\nimport { GridModule, SharedModule, ExcelModule } from '@progress/kendo-angular-grid';\r\nimport { KendoGridViewModule } from '@qubesense/base-services';\r\n\r\n@NgModule({\r\n declarations: [\r\n CustomerFarmComponent\r\n ],\r\n imports: [\r\n MatIconModule,\r\n MatInputModule,\r\n MatToolbarModule,\r\n ReactiveFormsModule,\r\n FormsModule,\r\n CommonModule,\r\n GridModule,\r\n ButtonsModule,\r\n MatGridListModule,\r\n MatFormFieldModule,\r\n ReactiveFormsModule,\r\n MatInputModule,\r\n MatOptionModule,\r\n MatSelectModule,\r\n MatCheckboxModule,\r\n SharedModule,\r\n MatButtonModule,\r\n MatDatepickerModule,\r\n MatNativeDateModule,\r\n ExcelModule,\r\n MatStepperModule,\r\n CdkStepperModule,\r\n KendoGridViewModule\r\n ],\r\n exports: [\r\n CustomerFarmComponent\r\n ]\r\n})\r\nexport class CustomerFarmModule { }\r\n","/*\r\n * Public API Surface of customer-farm\r\n */\r\n\r\nexport * from './lib/customer-farm.service';\r\nexport * from './lib/customer-farm.component';\r\nexport * from './lib/customer-farm.module';\r\nexport * from './lib/dependencies/customer-farm-api-urls';\r\nexport * from './lib/dependencies/customer-farm-model';\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1","i1.CustomerFarmService"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;MAAa,mBAAmB,CAAA;AAAhC,IAAA,WAAA,GAAA;;AAEI,QAAA,IAAsB,CAAA,sBAAA,GAAW,0BAA0B,CAAC;;AAG5D,QAAA,IAAyB,CAAA,yBAAA,GAAW,yBAAyB,CAAC;;AAG9D,QAAA,IAAyB,CAAA,yBAAA,GAAW,yBAAyB,CAAC;;AAG9D,QAAA,IAAyB,CAAA,yBAAA,GAAW,yBAAyB,CAAC;;AAG9D,QAAA,IAAsB,CAAA,sBAAA,GAAW,y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B,kBAAkB;QAClB,mBAAmB;QACnB,cAAc;QACd,eAAe;QACf,eAAe;QACf,iBAAiB;QACjB,YAAY;QACZ,eAAe;QACf,mBAAmB;QACnB,mBAAmB;QACnB,WAAW;QACX,gBAAgB;QAChB,gBAAgB;QAChB,mBAAmB,CAAA,EAAA,CAAA,CAAA;2FAMd,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAjC9B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE;wBACZ,qBAAqB;AACtB,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,aAAa;wBACT,cAAc;wBACd,gBAAgB;wBAChB,mBAAmB;wBACnB,WAAW;wBACX,YAAY;wBACZ,UAAU;wBACV,aAAa;wBACb,iBAAiB;wBACjB,kBAAkB;wBAClB,mBAAmB;wBACnB,cAAc;wBACd,eAAe;wBACf,eAAe;wBACf,iBAAiB;wBACjB,YAAY;wBACZ,eAAe;wBACf,mBAAmB;wBACnB,mBAAmB;wBACnB,WAAW;wBACX,gBAAgB;wBAChB,gBAAgB;wBAChB,mBAAmB;AACxB,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,qBAAqB;AACtB,qBAAA;iBACF,CAAA;;;ACpDD;;AAEG;;ACFH;;AAEG;;;;"}
@@ -0,0 +1,514 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Injectable, EventEmitter, Component, Output, Input, NgModule } from '@angular/core';
3
+ import * as i3 from '@qubesense/base-services';
4
+ import { KendoGridviewConfigurationModel, KendoGridViewModule } from '@qubesense/base-services';
5
+ import * as i2 from '@angular/forms';
6
+ import { Validators, ReactiveFormsModule, FormsModule } from '@angular/forms';
7
+ import * as i4 from '@angular/material/form-field';
8
+ import { MatFormFieldModule } from '@angular/material/form-field';
9
+ import * as i5 from '@angular/material/input';
10
+ import { MatInputModule } from '@angular/material/input';
11
+ import * as i6 from '@angular/common';
12
+ import { CommonModule } from '@angular/common';
13
+ import { MatCheckboxModule } from '@angular/material/checkbox';
14
+ import { CdkStepperModule } from '@angular/cdk/stepper';
15
+ import { MatButtonModule } from '@angular/material/button';
16
+ import { MatOptionModule, MatNativeDateModule } from '@angular/material/core';
17
+ import { MatDatepickerModule } from '@angular/material/datepicker';
18
+ import { MatGridListModule } from '@angular/material/grid-list';
19
+ import { MatIconModule } from '@angular/material/icon';
20
+ import { MatSelectModule } from '@angular/material/select';
21
+ import { MatStepperModule } from '@angular/material/stepper';
22
+ import { MatToolbarModule } from '@angular/material/toolbar';
23
+ import { ButtonsModule } from '@progress/kendo-angular-buttons';
24
+ import { GridModule, SharedModule, ExcelModule } from '@progress/kendo-angular-grid';
25
+
26
+ class CustomerFarmApiUrls {
27
+ constructor() {
28
+ //api Url string for get data by Id
29
+ this.getCustomerFarmByIdUrl = 'api/CustomerFarm/GetById';
30
+ //api Url string for insert Customer data
31
+ this.insertCustomerFarmDataUrl = 'api/CustomerFarm/Create';
32
+ //api Url string for update Customer record
33
+ this.updateCustomerFarmDataUrl = 'api/CustomerFarm/Update';
34
+ //api Url string for delete Customer record
35
+ this.deleteCustomerFarmDataUrl = 'api/CustomerFarm/Delete';
36
+ //api Url string for get Customer list
37
+ this.getCustomerFarmListUrl = 'api/CustomerFarm/GetAll';
38
+ //api Url string for get Customer dropdown list
39
+ this.getCustomerFarmDropdownListUrl = 'api/CustomerFarm/GetDropdownList';
40
+ //api Url string for get Customer dropdown list
41
+ this.getcustomerlistbykeyword = 'api/CustomerFarm/SearchCustomer';
42
+ }
43
+ }
44
+
45
+ class CustomerFarmService {
46
+ constructor(dataAccessService) {
47
+ this.dataAccessService = dataAccessService;
48
+ this.customerFarmApiUrls = new CustomerFarmApiUrls();
49
+ }
50
+ /**
51
+ * service for get customer data by Id
52
+ *
53
+ * @param customerGUID
54
+ *
55
+ * @returns Response Data from Database
56
+ */
57
+ async GetDataById(customerGUID) {
58
+ try {
59
+ const url = this.customerFarmApiUrls.getCustomerFarmByIdUrl + '/' + customerGUID;
60
+ const resultResponse = await this.dataAccessService.GetDataById(url);
61
+ return resultResponse;
62
+ }
63
+ catch (error) {
64
+ throw error;
65
+ }
66
+ }
67
+ /**
68
+ * service for inserting customer data into database
69
+ *
70
+ * @param customerFarmModel
71
+ *
72
+ * @returns Response message from Database
73
+ */
74
+ async InsertData(customerFarmModel) {
75
+ try {
76
+ const url = this.customerFarmApiUrls.insertCustomerFarmDataUrl;
77
+ const resultResponse = await this.dataAccessService.InsertData(url, customerFarmModel);
78
+ return resultResponse;
79
+ }
80
+ catch (error) {
81
+ throw error;
82
+ }
83
+ }
84
+ /**
85
+ * service for update customer Data
86
+ *
87
+ * @param customerFarmModel
88
+ *
89
+ * @returns Response message from Database
90
+ */
91
+ async UpdateData(customerFarmModel) {
92
+ try {
93
+ const url = this.customerFarmApiUrls.updateCustomerFarmDataUrl;
94
+ const resultResponse = await this.dataAccessService.UpdateData(url, customerFarmModel);
95
+ return resultResponse;
96
+ }
97
+ catch (error) {
98
+ throw error;
99
+ }
100
+ }
101
+ /**
102
+ * service for delete customer data by GUID
103
+ *
104
+ * @param customerFarmModel
105
+ *
106
+ * @returns Response message from Database
107
+ */
108
+ async DeleteData(recordId) {
109
+ try {
110
+ const url = this.customerFarmApiUrls.deleteCustomerFarmDataUrl + '/' + recordId;
111
+ const resultResponse = await this.dataAccessService.DeleteData(url);
112
+ return resultResponse;
113
+ }
114
+ catch (error) {
115
+ throw error;
116
+ }
117
+ }
118
+ /**
119
+ * service for get data for customer grid
120
+ *
121
+ * @param customerFarmModel
122
+ *
123
+ * @returns Response Data from Database
124
+ */
125
+ async GetListData(customerDataModel) {
126
+ try {
127
+ const url = this.customerFarmApiUrls.getCustomerFarmListUrl;
128
+ const resultResponse = await this.dataAccessService.GetListData(url, customerDataModel);
129
+ return resultResponse;
130
+ }
131
+ catch (error) {
132
+ throw error;
133
+ }
134
+ }
135
+ /**
136
+ * service for get data for customer DropDown List
137
+ *
138
+ * @returns
139
+ */
140
+ async GetCustomersDropdownList() {
141
+ try {
142
+ const url = this.customerFarmApiUrls.getCustomerFarmDropdownListUrl;
143
+ const resultResponse = await this.dataAccessService.GetDropdownListData(url);
144
+ return resultResponse;
145
+ }
146
+ catch (error) {
147
+ throw error;
148
+ }
149
+ }
150
+ async GetCustomerListByKeyword(value) {
151
+ try {
152
+ const url = this.customerFarmApiUrls.getcustomerlistbykeyword + '/' + value;
153
+ const resultResponse = await this.dataAccessService.GetDataById(url);
154
+ return resultResponse;
155
+ }
156
+ catch (error) {
157
+ throw error;
158
+ }
159
+ }
160
+ }
161
+ CustomerFarmService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: CustomerFarmService, deps: [{ token: i3.DataAccessService }], target: i0.ɵɵFactoryTarget.Injectable });
162
+ CustomerFarmService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: CustomerFarmService, providedIn: 'root' });
163
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: CustomerFarmService, decorators: [{
164
+ type: Injectable,
165
+ args: [{
166
+ providedIn: 'root'
167
+ }]
168
+ }], ctorParameters: function () { return [{ type: i3.DataAccessService }]; } });
169
+
170
+ class CustomerFarmModel {
171
+ constructor() {
172
+ this.formCode = null;
173
+ this.formId = '';
174
+ this.recordId = null;
175
+ this.customerId = null;
176
+ this.customerName = '';
177
+ this.defaultWarehouse = '';
178
+ this.personInCharge = '';
179
+ this.displayName = '';
180
+ this.primaryVetId = '';
181
+ this.PICTattoo = '';
182
+ this.isActive = true;
183
+ this.isDeleted = false;
184
+ }
185
+ }
186
+ class CustomerFarmConfigrationModel {
187
+ constructor() {
188
+ this.formCode = null;
189
+ this.customerId = null;
190
+ this.defaultView = false;
191
+ this.showModal = false;
192
+ this.showGrid = false;
193
+ this.isSearchable = false;
194
+ this.showClientData = false;
195
+ this.customerData = null;
196
+ this.userMessages = false;
197
+ this.requiredCustomerFarmSection = false;
198
+ this.allowedCustomerFarmSection = false;
199
+ this.requiredCustomerFarmFields = new RequiredCustomerFarmFields();
200
+ this.allowedCustomerFarmFields = new AllowedCustomerFarmFields();
201
+ }
202
+ }
203
+ class RequiredCustomerFarmFields {
204
+ constructor() {
205
+ this.customerName = true;
206
+ this.customerId = true;
207
+ this.defaultWarehouse = true;
208
+ this.personInCharge = true;
209
+ this.primaryVetId = true;
210
+ this.displayName = true;
211
+ this.PICTattoo = false;
212
+ this.profileImageURL = false;
213
+ }
214
+ }
215
+ class AllowedCustomerFarmFields {
216
+ constructor() {
217
+ this.customerName = true;
218
+ this.defaultWarehouse = true;
219
+ this.personInCharge = true;
220
+ this.primaryVetId = true;
221
+ this.PICTattoo = true;
222
+ this.displayName = true;
223
+ this.profileImageURL = false;
224
+ }
225
+ }
226
+
227
+ class CustomerFarmComponent {
228
+ constructor(customerFarmService, formBuilder, errorLogService, toastr) {
229
+ this.customerFarmService = customerFarmService;
230
+ this.formBuilder = formBuilder;
231
+ this.errorLogService = errorLogService;
232
+ this.toastr = toastr;
233
+ this.customerFarmData = new EventEmitter();
234
+ this.customerFarmConfiguration = new CustomerFarmConfigrationModel();
235
+ this.userMessages = [];
236
+ this.gridData = [];
237
+ this.gridConfiguration = new KendoGridviewConfigurationModel();
238
+ this.hideButtons = false;
239
+ this.isViewCall = false;
240
+ this.speciesList = [];
241
+ }
242
+ ngOnInit() {
243
+ this.DeclareForm();
244
+ if (this.customerFarmConfiguration.showGrid) {
245
+ this.gridConfiguration.FormCode = 'CUFA';
246
+ this.gridConfiguration.showModal = true;
247
+ this.gridConfiguration.actions = { 'View': false, 'Edit': true, 'Delete': true, 'Generate PDF': false };
248
+ this.GetListData();
249
+ }
250
+ }
251
+ DeclareForm() {
252
+ this.customerFarmForm = this.formBuilder.group({
253
+ recordId: [null],
254
+ customerId: [null],
255
+ customerName: [null],
256
+ defaultWarehouse: [null],
257
+ personInCharge: [null],
258
+ displayName: [null],
259
+ primaryVetId: [null],
260
+ PICTattoo: [null],
261
+ isActive: [true]
262
+ });
263
+ if (this.customerFarmConfiguration.requiredCustomerFarmFields.customerName) {
264
+ this.customerFarmForm.get('customerName').addValidators(Validators.required);
265
+ this.customerFarmForm.get('customerName').addValidators(Validators.pattern('^[a-zA-Z ]*$'));
266
+ this.customerFarmForm.get('customerName').addValidators(Validators.minLength(3));
267
+ }
268
+ if (this.customerFarmConfiguration.requiredCustomerFarmFields.defaultWarehouse) {
269
+ this.customerFarmForm.get('defaultWarehouse').addValidators(Validators.required);
270
+ }
271
+ if (this.customerFarmConfiguration.requiredCustomerFarmFields.personInCharge) {
272
+ this.customerFarmForm.get('personInCharge').addValidators(Validators.required);
273
+ }
274
+ if (this.customerFarmConfiguration.requiredCustomerFarmFields.primaryVetId) {
275
+ this.customerFarmForm.get('primaryVetId').addValidators(Validators.required);
276
+ }
277
+ }
278
+ ///////////////////////////////////standard methods/////////////////////////////////////////////////////
279
+ /**
280
+ * @description
281
+ *
282
+ * edit data list item using data item GUID
283
+ *
284
+ * @param customerId
285
+ *
286
+ * gets customer GUID from gridData and passes it to this function
287
+ */
288
+ async EditData(customerId) {
289
+ const getResponse = await this.customerFarmService.GetDataById(customerId);
290
+ this.customerFarmForm.controls['recordId'].setValue(getResponse.apiData.recordId);
291
+ this.customerFarmForm.controls['customerId'].setValue(getResponse.apiData.customerId);
292
+ this.customerFarmForm.controls['customerName'].setValue(getResponse.apiData.customerName);
293
+ this.customerFarmForm.controls['defaultWarehouse'].setValue(getResponse.apiData.defaultWarehouse);
294
+ this.customerFarmForm.controls['personInCharge'].setValue(getResponse.apiData.personInCharge);
295
+ this.customerFarmForm.controls['displayName'].setValue(getResponse.apiData.displayName);
296
+ this.customerFarmForm.controls['primaryVetId'].setValue(getResponse.apiData.primaryVetId);
297
+ this.customerFarmForm.controls['PICTattoo'].setValue(getResponse.apiData.picTattoo);
298
+ this.customerFarmForm.controls['isActive'].setValue(getResponse.apiData.isActive);
299
+ }
300
+ /**
301
+ * @description
302
+ *
303
+ * this method converts all form inputs into model class
304
+ *
305
+ * @returns model with new form values
306
+ */
307
+ ConvertFormToModel() {
308
+ const customerFarmModel = new CustomerFarmModel();
309
+ customerFarmModel.recordId = this.customerFarmForm.value.recordId;
310
+ customerFarmModel.customerName = this.customerFarmForm.value.customerName;
311
+ customerFarmModel.defaultWarehouse = this.customerFarmForm.value.defaultWarehouse;
312
+ customerFarmModel.personInCharge = this.customerFarmForm.value.personInCharge;
313
+ customerFarmModel.displayName = this.customerFarmForm.value.displayName;
314
+ customerFarmModel.primaryVetId = this.customerFarmForm.value.primaryVetId;
315
+ customerFarmModel.PICTattoo = this.customerFarmForm.value.PICTattoo;
316
+ customerFarmModel.customerId = this.customerFarmConfiguration.customerId;
317
+ customerFarmModel.formCode = this.customerFarmConfiguration.formCode;
318
+ return customerFarmModel;
319
+ }
320
+ /**
321
+ * @description
322
+ * clear form data
323
+ */
324
+ ClearForm() {
325
+ this.DeclareForm();
326
+ }
327
+ emitDataToParent() {
328
+ let customerFarmModel = new CustomerFarmModel();
329
+ customerFarmModel = this.ConvertFormToModel();
330
+ this.customerFarmData.emit(customerFarmModel);
331
+ }
332
+ /**
333
+ * @description
334
+ *
335
+ * Insert customer data into database
336
+ */
337
+ async InsertData() {
338
+ let customerFarmModel = new CustomerFarmModel();
339
+ customerFarmModel = this.ConvertFormToModel();
340
+ const getResponse = await this.customerFarmService.InsertData(customerFarmModel);
341
+ this.userMessages = getResponse.message.userMessage;
342
+ if (this.customerFarmConfiguration.userMessages) {
343
+ this.toastr.ShowSuccess(this.userMessages.toString());
344
+ }
345
+ }
346
+ /**
347
+ * @description
348
+ *
349
+ * update customer data into database
350
+ */
351
+ async UpdateData() {
352
+ let customerFarmModel = new CustomerFarmModel();
353
+ customerFarmModel = this.ConvertFormToModel();
354
+ const getResponse = await this.customerFarmService.UpdateData(customerFarmModel);
355
+ this.userMessages = getResponse.message.userMessage;
356
+ if (this.customerFarmConfiguration.userMessages) {
357
+ this.toastr.ShowSuccess(this.userMessages.toString());
358
+ }
359
+ }
360
+ /**
361
+ * @description
362
+ *
363
+ * Delete customer data into database
364
+ */
365
+ async DeleteData(value) {
366
+ const getResponse = await this.customerFarmService.DeleteData(value);
367
+ this.userMessages = getResponse.message.userMessage;
368
+ if (this.customerFarmConfiguration.userMessages) {
369
+ this.toastr.ShowSuccess(this.userMessages.toString());
370
+ }
371
+ }
372
+ /**
373
+ * @description
374
+ *
375
+ * Grid events calls
376
+ */
377
+ handleGridEvents(gridEvents) {
378
+ gridEvents.editRecord.subscribe((recordId) => {
379
+ this.hideButtons = false;
380
+ this.isViewCall = false;
381
+ this.EditData(recordId);
382
+ this.customerFarmForm.enable();
383
+ });
384
+ gridEvents.deleteRecord.subscribe((recordId) => {
385
+ this.DeleteData(recordId);
386
+ });
387
+ gridEvents.viewRecord.subscribe(async (recordId) => {
388
+ this.EditData(recordId);
389
+ this.customerFarmForm.disable();
390
+ });
391
+ }
392
+ /**
393
+ * @description
394
+ * get data for Customer grid list
395
+ */
396
+ async GetListData() {
397
+ const customerFarmModel = new CustomerFarmModel();
398
+ try {
399
+ const getResponse = await this.customerFarmService.GetListData(customerFarmModel);
400
+ this.gridData = getResponse.apiData;
401
+ }
402
+ catch (error) {
403
+ this.errorLogService.saveError(error);
404
+ this.toastr.ShowAllErrors(error.error.message.userMessage);
405
+ }
406
+ }
407
+ }
408
+ CustomerFarmComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: CustomerFarmComponent, deps: [{ token: CustomerFarmService }, { token: i2.FormBuilder }, { token: i3.ErrorLogService }, { token: i3.ToastrNotificationService }], target: i0.ɵɵFactoryTarget.Component });
409
+ CustomerFarmComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.0", type: CustomerFarmComponent, selector: "lib-customer-farm", inputs: { customerFarmConfiguration: "customerFarmConfiguration" }, outputs: { customerFarmData: "customerFarmData" }, ngImport: i0, template: "<div class=\"flex flex-col flex-auto min-w-0 w-full\">\r\n <!-- form code starts here -->\r\n <!--content-->\r\n <div class=\"sm:w-full overflow-hidden\" *ngIf=\"customerFarmConfiguration.showModal\">\r\n\r\n <!--form body-->\r\n <form class=\"flex flex-col overflow-hidden\" [formGroup]=\"customerFarmForm\">\r\n <!-- Customer Farm section start -->\r\n\r\n <div class=\"sm:flex\">\r\n <div class=\"w-full\">\r\n <div class=\"sm:flex px-8 pt-4\">\r\n <mat-form-field class=\"flex-auto w-full mr-4\"\r\n *ngIf=\"customerFarmConfiguration.allowedCustomerFarmFields.customerName\">\r\n <mat-label>Client Name</mat-label>\r\n <input matInput id=\"customerName\" placeholder=\"Client Name\" pattern=\"^[a-zA-Z ]*$\"\r\n minlength=\"3\" [formControlName]=\"'customerName'\" (change)=\"emitDataToParent()\">\r\n <mat-error\r\n *ngIf=\"customerFarmForm.get('customerName').hasError('required') && customerFarmConfiguration.requiredCustomerFarmFields.customerName \">\r\n Client Name is required\r\n </mat-error>\r\n <mat-error *ngIf=\"customerFarmForm.get('customerName').hasError('pattern')\">\r\n Please enter valid Client name\r\n </mat-error>\r\n <mat-error *ngIf=\"customerFarmForm.get('customerName').hasError('minlength')\">\r\n Client name must be of atleast 3 characters\r\n </mat-error>\r\n </mat-form-field>\r\n\r\n <mat-form-field class=\"flex-auto w-full\"\r\n *ngIf=\"customerFarmConfiguration.allowedCustomerFarmFields.defaultWarehouse\">\r\n <mat-label>Default Warehouse</mat-label>\r\n <input matInput id=\"defaultWarehouse\" placeholder=\"Default Warehouse\"\r\n [formControlName]=\"'defaultWarehouse'\" (change)=\"emitDataToParent()\">\r\n <mat-error\r\n *ngIf=\"customerFarmForm.get('defaultWarehouse').hasError('required') && customerFarmConfiguration.requiredCustomerFarmFields.defaultWarehouse\">\r\n Default Warehouse is required\r\n </mat-error>\r\n </mat-form-field>\r\n </div>\r\n\r\n <div class=\"sm:flex px-8 pt-4\">\r\n <mat-form-field class=\"flex-auto w-full mr-4\"\r\n *ngIf=\"customerFarmConfiguration.allowedCustomerFarmFields.personInCharge\">\r\n <mat-label>Person In Charge</mat-label>\r\n <input matInput id=\"personInCharge\" placeholder=\"Person In Charge\"\r\n [formControlName]=\"'personInCharge'\" (change)=\"emitDataToParent()\">\r\n <mat-error\r\n *ngIf=\"customerFarmForm.get('personInCharge').hasError('required') && customerFarmConfiguration.requiredCustomerFarmFields.personInCharge\">\r\n Person In Charge is required\r\n </mat-error>\r\n </mat-form-field>\r\n\r\n <mat-form-field class=\"flex-auto w-full\"\r\n *ngIf=\"customerFarmConfiguration.allowedCustomerFarmFields.displayName\">\r\n <mat-label>Display Name</mat-label>\r\n <input matInput id=\"displayName\" placeholder=\"Display Name\"\r\n [formControlName]=\"'displayName'\" (change)=\"emitDataToParent()\">\r\n </mat-form-field>\r\n </div>\r\n\r\n <div class=\"sm:flex px-8 pt-4\">\r\n <mat-form-field class=\"flex-auto w-full mr-4\"\r\n *ngIf=\"customerFarmConfiguration.allowedCustomerFarmFields.primaryVetId\">\r\n <mat-label>Primary Vet</mat-label>\r\n <input matInput id=\"primaryVetId\" placeholder=\"Primary Vet\"\r\n [formControlName]=\"'primaryVetId'\" (change)=\"emitDataToParent()\">\r\n <mat-error\r\n *ngIf=\"customerFarmForm.get('primaryVetId').hasError('required') && customerFarmConfiguration.requiredCustomerFarmFields.primaryVetId\">\r\n Primary Vet is required\r\n </mat-error>\r\n </mat-form-field>\r\n\r\n <mat-form-field class=\"flex-auto w-full\"\r\n *ngIf=\"customerFarmConfiguration.allowedCustomerFarmFields.PICTattoo\">\r\n <mat-label>PIC/Tattoo (if applicable)</mat-label>\r\n <input matInput id=\"PICTattoo\" placeholder=\"PIC/Tattoo\" [formControlName]=\"'PICTattoo'\"\r\n (change)=\"emitDataToParent()\">\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n\r\n </div>\r\n <!-- Customer Farm section End -->\r\n\r\n </form>\r\n </div>\r\n <!-- form code ends here -->\r\n\r\n</div>\r\n<div *ngIf=\"customerFarmConfiguration.showGrid\">\r\n <lib-kendo-grid-view [configuration]=\"gridConfiguration\" (events)=\"handleGridEvents($event)\"></lib-kendo-grid-view>\r\n </div>\r\n", styles: [""], dependencies: [{ kind: "directive", type: i4.MatError, selector: "mat-error", inputs: ["id"] }, { kind: "component", type: i4.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4.MatLabel, selector: "mat-label" }, { kind: "directive", type: i5.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.MinLengthValidator, selector: "[minlength][formControlName],[minlength][formControl],[minlength][ngModel]", inputs: ["minlength"] }, { kind: "directive", type: i2.PatternValidator, selector: "[pattern][formControlName],[pattern][formControl],[pattern][ngModel]", inputs: ["pattern"] }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3.KendoGridViewComponent, selector: "lib-kendo-grid-view", inputs: ["configuration"], outputs: ["events"] }] });
410
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: CustomerFarmComponent, decorators: [{
411
+ type: Component,
412
+ args: [{ selector: 'lib-customer-farm', template: "<div class=\"flex flex-col flex-auto min-w-0 w-full\">\r\n <!-- form code starts here -->\r\n <!--content-->\r\n <div class=\"sm:w-full overflow-hidden\" *ngIf=\"customerFarmConfiguration.showModal\">\r\n\r\n <!--form body-->\r\n <form class=\"flex flex-col overflow-hidden\" [formGroup]=\"customerFarmForm\">\r\n <!-- Customer Farm section start -->\r\n\r\n <div class=\"sm:flex\">\r\n <div class=\"w-full\">\r\n <div class=\"sm:flex px-8 pt-4\">\r\n <mat-form-field class=\"flex-auto w-full mr-4\"\r\n *ngIf=\"customerFarmConfiguration.allowedCustomerFarmFields.customerName\">\r\n <mat-label>Client Name</mat-label>\r\n <input matInput id=\"customerName\" placeholder=\"Client Name\" pattern=\"^[a-zA-Z ]*$\"\r\n minlength=\"3\" [formControlName]=\"'customerName'\" (change)=\"emitDataToParent()\">\r\n <mat-error\r\n *ngIf=\"customerFarmForm.get('customerName').hasError('required') && customerFarmConfiguration.requiredCustomerFarmFields.customerName \">\r\n Client Name is required\r\n </mat-error>\r\n <mat-error *ngIf=\"customerFarmForm.get('customerName').hasError('pattern')\">\r\n Please enter valid Client name\r\n </mat-error>\r\n <mat-error *ngIf=\"customerFarmForm.get('customerName').hasError('minlength')\">\r\n Client name must be of atleast 3 characters\r\n </mat-error>\r\n </mat-form-field>\r\n\r\n <mat-form-field class=\"flex-auto w-full\"\r\n *ngIf=\"customerFarmConfiguration.allowedCustomerFarmFields.defaultWarehouse\">\r\n <mat-label>Default Warehouse</mat-label>\r\n <input matInput id=\"defaultWarehouse\" placeholder=\"Default Warehouse\"\r\n [formControlName]=\"'defaultWarehouse'\" (change)=\"emitDataToParent()\">\r\n <mat-error\r\n *ngIf=\"customerFarmForm.get('defaultWarehouse').hasError('required') && customerFarmConfiguration.requiredCustomerFarmFields.defaultWarehouse\">\r\n Default Warehouse is required\r\n </mat-error>\r\n </mat-form-field>\r\n </div>\r\n\r\n <div class=\"sm:flex px-8 pt-4\">\r\n <mat-form-field class=\"flex-auto w-full mr-4\"\r\n *ngIf=\"customerFarmConfiguration.allowedCustomerFarmFields.personInCharge\">\r\n <mat-label>Person In Charge</mat-label>\r\n <input matInput id=\"personInCharge\" placeholder=\"Person In Charge\"\r\n [formControlName]=\"'personInCharge'\" (change)=\"emitDataToParent()\">\r\n <mat-error\r\n *ngIf=\"customerFarmForm.get('personInCharge').hasError('required') && customerFarmConfiguration.requiredCustomerFarmFields.personInCharge\">\r\n Person In Charge is required\r\n </mat-error>\r\n </mat-form-field>\r\n\r\n <mat-form-field class=\"flex-auto w-full\"\r\n *ngIf=\"customerFarmConfiguration.allowedCustomerFarmFields.displayName\">\r\n <mat-label>Display Name</mat-label>\r\n <input matInput id=\"displayName\" placeholder=\"Display Name\"\r\n [formControlName]=\"'displayName'\" (change)=\"emitDataToParent()\">\r\n </mat-form-field>\r\n </div>\r\n\r\n <div class=\"sm:flex px-8 pt-4\">\r\n <mat-form-field class=\"flex-auto w-full mr-4\"\r\n *ngIf=\"customerFarmConfiguration.allowedCustomerFarmFields.primaryVetId\">\r\n <mat-label>Primary Vet</mat-label>\r\n <input matInput id=\"primaryVetId\" placeholder=\"Primary Vet\"\r\n [formControlName]=\"'primaryVetId'\" (change)=\"emitDataToParent()\">\r\n <mat-error\r\n *ngIf=\"customerFarmForm.get('primaryVetId').hasError('required') && customerFarmConfiguration.requiredCustomerFarmFields.primaryVetId\">\r\n Primary Vet is required\r\n </mat-error>\r\n </mat-form-field>\r\n\r\n <mat-form-field class=\"flex-auto w-full\"\r\n *ngIf=\"customerFarmConfiguration.allowedCustomerFarmFields.PICTattoo\">\r\n <mat-label>PIC/Tattoo (if applicable)</mat-label>\r\n <input matInput id=\"PICTattoo\" placeholder=\"PIC/Tattoo\" [formControlName]=\"'PICTattoo'\"\r\n (change)=\"emitDataToParent()\">\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n\r\n </div>\r\n <!-- Customer Farm section End -->\r\n\r\n </form>\r\n </div>\r\n <!-- form code ends here -->\r\n\r\n</div>\r\n<div *ngIf=\"customerFarmConfiguration.showGrid\">\r\n <lib-kendo-grid-view [configuration]=\"gridConfiguration\" (events)=\"handleGridEvents($event)\"></lib-kendo-grid-view>\r\n </div>\r\n" }]
413
+ }], ctorParameters: function () { return [{ type: CustomerFarmService }, { type: i2.FormBuilder }, { type: i3.ErrorLogService }, { type: i3.ToastrNotificationService }]; }, propDecorators: { customerFarmData: [{
414
+ type: Output
415
+ }], customerFarmConfiguration: [{
416
+ type: Input
417
+ }] } });
418
+
419
+ class CustomerFarmModule {
420
+ }
421
+ CustomerFarmModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: CustomerFarmModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
422
+ CustomerFarmModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.1.0", ngImport: i0, type: CustomerFarmModule, declarations: [CustomerFarmComponent], imports: [MatIconModule,
423
+ MatInputModule,
424
+ MatToolbarModule,
425
+ ReactiveFormsModule,
426
+ FormsModule,
427
+ CommonModule,
428
+ GridModule,
429
+ ButtonsModule,
430
+ MatGridListModule,
431
+ MatFormFieldModule,
432
+ ReactiveFormsModule,
433
+ MatInputModule,
434
+ MatOptionModule,
435
+ MatSelectModule,
436
+ MatCheckboxModule,
437
+ SharedModule,
438
+ MatButtonModule,
439
+ MatDatepickerModule,
440
+ MatNativeDateModule,
441
+ ExcelModule,
442
+ MatStepperModule,
443
+ CdkStepperModule,
444
+ KendoGridViewModule], exports: [CustomerFarmComponent] });
445
+ CustomerFarmModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: CustomerFarmModule, imports: [MatIconModule,
446
+ MatInputModule,
447
+ MatToolbarModule,
448
+ ReactiveFormsModule,
449
+ FormsModule,
450
+ CommonModule,
451
+ GridModule,
452
+ ButtonsModule,
453
+ MatGridListModule,
454
+ MatFormFieldModule,
455
+ ReactiveFormsModule,
456
+ MatInputModule,
457
+ MatOptionModule,
458
+ MatSelectModule,
459
+ MatCheckboxModule,
460
+ SharedModule,
461
+ MatButtonModule,
462
+ MatDatepickerModule,
463
+ MatNativeDateModule,
464
+ ExcelModule,
465
+ MatStepperModule,
466
+ CdkStepperModule,
467
+ KendoGridViewModule] });
468
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: CustomerFarmModule, decorators: [{
469
+ type: NgModule,
470
+ args: [{
471
+ declarations: [
472
+ CustomerFarmComponent
473
+ ],
474
+ imports: [
475
+ MatIconModule,
476
+ MatInputModule,
477
+ MatToolbarModule,
478
+ ReactiveFormsModule,
479
+ FormsModule,
480
+ CommonModule,
481
+ GridModule,
482
+ ButtonsModule,
483
+ MatGridListModule,
484
+ MatFormFieldModule,
485
+ ReactiveFormsModule,
486
+ MatInputModule,
487
+ MatOptionModule,
488
+ MatSelectModule,
489
+ MatCheckboxModule,
490
+ SharedModule,
491
+ MatButtonModule,
492
+ MatDatepickerModule,
493
+ MatNativeDateModule,
494
+ ExcelModule,
495
+ MatStepperModule,
496
+ CdkStepperModule,
497
+ KendoGridViewModule
498
+ ],
499
+ exports: [
500
+ CustomerFarmComponent
501
+ ]
502
+ }]
503
+ }] });
504
+
505
+ /*
506
+ * Public API Surface of customer-farm
507
+ */
508
+
509
+ /**
510
+ * Generated bundle index. Do not edit.
511
+ */
512
+
513
+ export { AllowedCustomerFarmFields, CustomerFarmApiUrls, CustomerFarmComponent, CustomerFarmConfigrationModel, CustomerFarmModel, CustomerFarmModule, CustomerFarmService, RequiredCustomerFarmFields };
514
+ //# sourceMappingURL=qubesense-customer-farm.mjs.map