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TzlB,IACD0lB,SAtDQ,CACPC,KACAC,MACAC,MACAC,MACAC,OACAC,KACAC,KACAC,KACAD,KACAE,MACAC,KACAC,MACAC,KACAC,KACAC,KACAjB,GACAkB,KACAC,OACAC,OACAC,OACAC,OACAC,OACAC,KACAC,KACAC,KACAC,KACAC,SA6BS1B,GAAb","names":["CroptypesOverviewActions","ApCroptypesOverviewComponent","constructor","cropTypeStore","translationStore","mapViewStore","settingsStore","permissionPipe","roundNumericService","roundNumericPipe","elementOxideCalculate","elementService","this","of","EventEmitter","ngOnInit","hideMapView","croptypeLoading$","Listen","s","loading","_settings","FirstSetting","items$","_getItems","columns","_getColumns","pager","_getPager","ngAfterContentInit","_subscriptions","push","_applyClicked","subscribe","e","_onApplyClicked","FirstSetting$","transform","ApPermissions","permission","ngOnDestroy","forEach","d","unsubscribe","ApDynGridStatusColumnConfig","field","showHeaderTitle","class","description","filterable","groupIndex","groupDesc","ApDynGridPropertyColumnConfig","title","width","headerFilterable","sortIndex","sortDesc","cssClass","filterType","FilterType","pipes","pipe","args","DigitsAfterDecimalPoint","ApDynGridGroupColumnConfig","headerStyle","style","border","groupColumns","GetElementStringByString","ApElementType","APP_CONFIGURATION","hide","UseMethodEuf","ApDynGridEditColumnConfig","data","callback","ApUtilService","_onSelectedToggle","bind","text","dataItem","SourceItem","Selected","isHasPermission","ApDynGridPagerConfig","listMassEditing","id","Active","name","FindTranslationForSelectedLanguage","type","ApGridPagerType","values","Inactive","ExpectedYield","apply","hasPermission","filter","map","croptypes","Convert","ct","kValue","_elementOxidCalculate","MainwdK","ApElementOxydTypeEnum","pValue","MainwdP","mgValue","MainwdMg","secKValue","SecwdK","secPValue","SecwdP","secMGValue","SecwdMg","euFKValue","EuFiltrationK","euFPValue","EuFiltrationP","euFMGValue","EuFiltrationMg","Id","Status","StatusClass","StatusDesc","KValue","roundAsNumber","PValue","MGValue","WdN","MainwdN","SecKValue","SecPValue","SecMGValue","SecWdN","SecwdN","EuFKValue","EuFPValue","EuFMGValue","modified","yieldChanged","anyRow","dynComponent","getSelectedItems","row","ObjectFactory","object","value","Add","saveCroptypes","unit","UnitElementOxyd","item","cropType","CropTypes","Find","crop","r","i0","selectors","ApDynComponentComponent","ApSubFarmsComponent","subFarmStore","farmUsersStore","permissionsStore","formStore","subFarm","DeletedBy","_onDelete","event","deleteClicked","getDataFromStore","gridBuilder","fillWizardChoiceData","loadSubFarms","onCreate","openForm","component","ApSubFarmsEditComponent","onEdit","ids","getValue","i","n","deleteSubFarm","disabled","_listMassEditing","onSubmit","ctx","ApMachinesGridEnum","GetMachineKindNamePipe","machineStore","kindId","machineType","machineTypes","FirstOrDefault","Description","pure","ApMachinesComponent","instrumentStore","driverStore","fb","getMachineKindNamePipe","machines","machine","kindName","Kind","instrumentName","GetProperty","DefaultInstrument","el","Name","driverName","DefaultDriver","IsDeleted","editHandler","ApMachinesEditComponent","deleteMachine","gridColumns","STATUS","STATUSCLASS","STATUSDESC","KIND_NAME","NAME","SIGN","INSTRUMENT_NAME","DRIVER_NAME","ApInstrumentsComponent","worktypeStore","instruments","DefaultWorkTypeName","DefaultWorktype","ApInstrumentsEditComponent","deleteInstruments","deleteInstrument","ApDriversComponent","driversStore","driver","ApDriversEditComponent","deleteDriver","ApTerminalsOverviewComponent","terminalsStore","languageStore","campaignYearStore","dateService","terminalsLoading$","terminal","LastServiceDate","getDateMidnight","LastService","selectedYear","loadTerminals","ApDynGridColumnHideConfig","mapHide","format","SelectedLanguage","DateFormat","RessourceTabs","ApDocuRessourcesComponent","Machines","selectTab","headerComponent","reset","selectedTab","machineComonent","_a","_b","dynGrid","_c","filterGrid","Instrument","u","o","instrumentsComponent","_d","_e","_f","Drivers","m","h","c","driversComponent","_g","_h","_j","Terminals","g","C","_","terminalsComponent","_k","_l","_m","index","searchIn","createNew","docuComponent","isCreateNewAllowed","ApSectionHeaderGridComponent","VarietyGridActions","ApVarietiesOverviewComponent","varietyStore","croptypeStore","pp","variety","y","CropKey","CroptypesCropkey","Selectable","CropType","state","ACTIVE","label","INACTIVE","rows","val","updateSelectableVariety","OrganicFertilizerGridActions","ApFertilizerOrgsComponent","store","translationService","fertilizerOrganicLoading$","organic","ContentK","ContentMg","ContentP","isLiquid","IsLiquid","RealContentCaO","CaOValue","ContentCaO","NValue","ContentN","SValue","ContentS","Efficiency","DMPercent","Liquid","Density","Unit","Key","_getDataFromStore","_gridBuilder","ApFertilizerOrgsEditComponent","_getLabelWithUnit","_getEditButtons","updateSelectableFertilizer","translate","result","FarmId","fertilizerOrganic","InorganicFertilizerActions","ApFertilizerInorgsComponent","SafeBehaviorSubject","fertilizerInorganicLoading$","inorganic","EquivCaO","ApFertilizerInorgsEditComponent","getLabelWithUnit","preselect","fertilizerInorganic","FertilizerTabs","ApFertilizersOverviewComponent","FertilizerOrg","fertilizerOrgsOverviewComponent","FertilizerInorg","fertilizerInOrgsOverviewComponent","fertilizerComponent","static","responsiveData","addDetailsCallback","loginStore","workTypesStore","effectiveRangesStore","ppProductSelectedDetailsTemplate","ppProductAvailableCropsTemplate","countrySelection","ApRoleTypeService","User","ApDynformsConfigComboBox","key","nameOf","options","GetAvailableCountries","disabled$","CountryDisabled$","valueField","textField","validators","ApDynformsValidator","validator","Validators","errorKey","ApDynformsConfigPlaceholder","ApDynformsConfigCheckbox","ApDynformsConfigFieldset","legend","config","ApDynformsConfigTextbox","ApDynformsConfigDatepicker","formErrors","minDate","MinPermissionEnd$","MinUseByDate$","getWorkTypes","FindAll","w","Category_Text","sort","AvailableUnits$","hideLegend","classList","useMaxWidth","ApDynformsConfigTemplate","ApDynformsConfigNumerictextbox","min","max","PreselectedGrowStageMax$","decimals","PreselectedGrowStageMin$","label$","PreselectedUnit$","baseHeader","length","ApDynformsConfigMultiSelect","ApDynformsConfigButton","disabledButton$","l","AddDetailsButtonDisabled$","availableCountries","country","Farms$","f","Country","Any","deleteProductDetailsCallback","ApDynGridButtonColumnConfig","tooltip","isStandardIcon","standardIcon","PpProductWizardDetailsProvider","unitsStore","worktypeUnitStore","BehaviorSubject","ApDateRangeValidator","undefined","deleteProductDetails","availableCropsColumns","PpProductWizardDetailsUiProvider","productDetailsColumns$","_deleteDetailsClicked","getUnitWithUnit","_formDto","init","caption$","fieldSets$","dynForm","selectedDetailsItems$","ppProductAvailableCropsGrid$","_caption$","_fieldSets$","_dynForm","_ppProductSelectedDetailsTemplate","_ppProductAvailableCropsTemplate","_ppProductAvailableCropsGrid$","_addDetailsCallback","addDetails","_previouslySelectedCropIds","availableCropsGrid","gridPaging","onSelectedChange","updateAddDetailsButtonAvailability","_responsiveData","Date","SelectedDetailsItems$","onFormValueChanges","valueChangesArgs","_responsiveProperties","Exists","p","control","form","getRawValue","next","IsCountryWide","PermissionStart","PermissionEnd","getUnitsByWorktype","WorkType","b","O","_o","_p","oe","Q","_q","_r","F","_s","GrowStageMax","E","_t","GrowStageMin","patchForm","selectedDetails","crops","selectedItems","effectiveRangeNames","EffectiveRanges","getEffectiveRangeById","Join","detailToAdd","ApGuidUtil","CropTypeNames","CropTypeName","CropTypeIds","MaxRate","EffectiveRangeIds","Indicator","ButtonIconName","updateCaption","updateFieldSets","setTimeout","setSelectedKeys","updateGridView","formInvalid","cropSelectionInvalid","selectedKeys","triggerValidation","patchValue","emitEvent","markAsTouched","buildDefaultDetails","ProductName","Note","UseByDate","AvailableCrops","AvailableCropTypes","SelectedDetails","SelectedProductDetails","onDetailsSelectionChange","selectionArgs","selectedRows","isValid","formControls","controls","valid","leave","getSelectedDetailsGridHeight","onDestroy","factory","PpProductWizardOverviewProvider","overviewData","PpProductWizardOverviewUiProvider","buildOverviewItem","detailsData","getProductExpr","PermissionStartExpr","CurrentDateFormat","PermissionEndExpr","UseByDateExpr","WorkTypeExpr","CountryExpr","productExpr","slice","ctx_r5","oxw","PpProductWizardComponent","wizardDetailsProvider","wizardOverviewProvider","plantProtectionProductStore","countryStore","PpWizardStates","handleStateChangeAction","handleStateChange","_stateModel","initOverview","initSave","initDetails","initLeave","availableCropsItems$","cropTypes","combineLatest","x","saving","saved","saving$","closeForm","initialized","formValueChanges","valuesChangesArgs","activeWizardStep","pristine","dirty","touched","newState","oldState","activeWizardProvider$","buildUi","wizardProvider","productId","Countries","Ae","SelectedFarm","ppProductDetails","selectedProductDetails","productDetail","effectiveRangeId","cropTypeId","ProductId","AmountMax","EcMax","EcMin","EffectiveRange","EppoCrop","getDefaultCroptype","Eppocode","EppoHarmfulOrganism","SelectedFarmId","GrowthStageDefined","ChangedAt","ChangedBy","CreatedAt","CreatedBy","DeletedAt","Version","ppProduct","getDateNoon","ExternalProductId","replace","ProductDetails","createNewProduct","getSelectedCropsNote","toString","PlantProtectionGridActions","ApPlantProtectionProductsComponent","onApplyClicked","loadPlantProtectionProducts","loadAllCountries","loading$","plantProtectionProductsLoading","campaignYearLoading","croptypesLoading","plantProtectionProducts","plantProtectionProduct","useByDate","permissionEndDate","statusSelection","getSelectionStatus","statusProduct","getProductStatus","distinctEffRanges","array","indexOf","join","productEppoCodes","targetCrops","Contains","EppoGroups","self","StatusSelection","StatusProduct","Ingredients","parseIngredients","StartDate","EndDate","EffRange","Crops","DetailsTooltip","buildDetailsTooltip","IsSystemProduct","checkbox","onStatusToggle","ppProducts","updateSelectablePlantProtectionProduct","copiedPlantProtectionProduct","productSelected","ApColumnState","now","parsedIngredients","JSON","parse","Array","isArray","detail","ApWorktypesOverviewComponent","workType","shortName","Shortname","Wt_Unit","Type","ShortName","ApDynGridPagerWizardConfig","ApDynGridPagerWizardSection","UserEdits","UserEditGridActions","ApUsersAssignmentFarmComponent","usersStore","roleTypeService","farmUsersLoading$","loadUsers","fu","items","IsConsultant","farmUser","userGroups","getUserGroups","UsergroupUser","IsActive","UserGroups","ApUsersAssignmentFarmEditComponent","Usergroup","remove","Remove","update","delete","ApUsersComponent","booleanPipe","farmUsers","users","IsDriver","_boolean","ApUsersEditComponent","UserInvitations","UserInvitationsStatus","ApUsersInvitationComponent","invitationStore","notifyStore","getAvailableUserGroups","_listUserGroupItems","invitationsLoading$","loadInvitations","_fillWizardChoiceData","isInvitationResend","resendResult","notification","DisplayTimeout","Level","ErrorKey","addMessage","ApUsersInvitationEditComponent","invitations","invitation","status","_getStatus","_getUserGroups","Usergroupid","_getStatusClass","_getStatusDescription","Created","dateToMoment","Isdriver","SelectedLanguage$","_resendInvitation","Activated","resend","Email","group","Confirmation_Time","invitationDate","setDate","getDate","getUtc","Waiting","Expired","UserContactEdits","UserContactEditGridActions","ApUserContactsOverviewComponent","userContactsStore","userContactsLoading$","userContact","loadUserContacts","ApUserContactsEditComponent","updateUserContact","deleteUserContact","UserTabs","ApUsersOverviewComponent","usersComponent","Invitation","userInvitationComponent","Contacts","userContactsComponent","routes","path","canActivate","ApPermissionGuard","login","layout","PageMode","ApBasedataRoutes","RouterModule","ApBaseDataModule","imports","ReactiveFormsModule","SplitButtonModule","ComboBoxModule","DateInputsModule","GridModule","ApCoreModule","ApTranslationModule","CommonModule","ButtonModule","FormsModule","DropDownsModule","DropDownButtonModule","ApDynformsModule","LayoutModule","ApUtilsModule","RowFilterModule","BodyModule","FilterMenuModule","HeaderModule","PagerModule","ApResponsiveTextModule","ApTooltipModule","ApSectionHeaderModule","ApDynComponentModule","ApPermissionModule"],"sources":["./src/app/basedata/components/ap-croptypes.component.ts","./src/app/basedata/components/ap-subfarms.component.ts","./src/app/ap-interface/enums/grids/ap-machines-grid.enum.ts","./src/app/basedata/pipes/machines/get-machine-kind-name.pipe.ts","./src/app/basedata/components/machines/ap-machines.component.ts","./src/app/basedata/components/instruments/ap-instruments.component.ts","./src/app/basedata/components/drivers/ap-drivers.component.ts","./src/app/basedata/components/terminals/ap-terminals.overview.component.ts","./src/app/basedata/components/ap-docu-ressources.component.html","./src/app/basedata/components/ap-docu-ressources.component.ts","./src/app/basedata/components/ap-varieties.component.ts","./src/app/basedata/components/ap-fertilizer-orgs.component.ts","./src/app/basedata/components/ap-fertilizer-inorgs.component.ts","./src/app/basedata/components/ap-fertilizers.component.html","./src/app/basedata/components/ap-fertilizers.component.ts","./src/app/entry-components/plant-protection-entry-components/pp-product-wizard/configs/pp-product-wizard-details.ui-provider.ts","./src/app/entry-components/plant-protection-entry-components/pp-product-wizard/configs/pp-product-wizard-details.provider.ts","./src/app/entry-components/plant-protection-entry-components/pp-product-wizard/configs/pp-product-wizard-overview.provider.ts","./src/app/entry-components/plant-protection-entry-components/pp-product-wizard/configs/pp-product-wizard-overview.ui-provider.ts","./src/app/entry-components/plant-protection-entry-components/pp-product-wizard/pp-product-wizard.component.ts","./src/app/basedata/types/plant-protection-products.types.ts","./src/app/basedata/components/ap-plant-protection-products.component.ts","./src/app/basedata/components/ap-worktypes.component.ts","./src/app/basedata/components/users/assignment/ap-users-assignment-farm.component.ts","./src/app/basedata/components/users/user/ap-users.component.ts","./src/app/basedata/components/users/invitation/ap-users-invitation.component.ts","./src/app/basedata/components/users/user-contacts/ap-user-contacts-overview.component.ts","./src/app/basedata/components/users/ap-users-overview.component.html","./src/app/basedata/components/users/ap-users-overview.component.ts","./src/app/basedata/ap-basedata.routes.ts","./src/app/basedata/ap-basedata.module.ts"],"sourcesContent":["import {\n AfterContentInit,\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n OnDestroy,\n OnInit,\n ViewChild\n} from '@angular/core';\nimport {Observable, of, Subscription} from 'rxjs';\nimport {ApElementOxydTypeEnum, ApGridPagerType, IGridData} from '../../ap-interface';\nimport {ApPermissions} from 'invoker-transport';\nimport {ApDynComponentComponent} from '../../ap-dyncomponent/ap-dyncomponent.component';\nimport {\n ApDynGridColumnConfigBase\n} from '../../ap-dyngrids/config/ap-dyn-grid-column-config-base';\nimport {\n ApDynGridPagerConfigBase\n} from '../../ap-dyngrids/config/ap-dyn-grid-pager-config-base';\nimport {\n ApDynGridStatusColumnConfig\n} from '../../ap-dyngrids/config/ap-dyn-grid-status-column-config';\nimport {\n ApDynGridPropertyColumnConfig,\n FilterType\n} from '../../ap-dyngrids/config/ap-dyn-grid-property-column-config';\nimport {\n ApDynGridEditColumnConfig\n} from '../../ap-dyngrids/config/ap-dyn-grid-edit-column-config';\nimport {ApDynGridPagerConfig, IDynGridWizardChoiceData} from '../../ap-dyngrids/config/ap-dyn-grid-pager-config';\nimport {\n ApDynGridGroupColumnConfig\n} from '../../ap-dyngrids/config/ap-dyn-grid-group-column-config';\nimport {GetElementOxidCalculatePipe, GetRoundNumericPipe} from '../../ap-utils';\nimport {CropTypeStore} from '../../stores/base-data/crop.types.store';\nimport {filter, map} from 'rxjs/operators';\nimport {SettingsStore} from '../../stores/base-data/settings.store';\nimport {MapViewStore} from '../../stores/layout/mapview.store';\nimport {TranslationStore} from '../../stores/translation/translation.store';\nimport {GetPermissionPipe} from '../../ap-permission/pipes/get-permission.pipe';\nimport {GetRoundNumericService} from '../../ap-utils/service/get-round-numeric.service';\nimport {APP_CONFIGURATION} from '../../ap-core/config';\nimport {GetElementService} from '../../ap-utils/service/ap-get-element.service';\nimport {ApUtilService} from '../../ap-utils/service/ap-util.service';\nimport {ObjectFactory} from 'ts-tooling';\nimport {ApElementType} from '../../ap-interface/enums/ap-elements-type.enum';\nimport ISettings = Data.BaseData.ISettings;\nimport ICropTypes = Data.BaseData.ICropTypes;\n\nenum CroptypesOverviewActions {\n Active = 0,\n Inactive = 1,\n ExpectedYield = 2\n}\n\ninterface ICropTypeGridData extends IGridData {\n Status: number;\n StatusClass: string;\n StatusDesc: string;\n KValue: number;\n PValue: number;\n MGValue: number;\n WdN: number;\n SecKValue: number;\n SecPValue: number;\n SecMGValue: number;\n SecWdN: number;\n EuFKValue: number;\n EuFPValue: number;\n EuFMGValue: number;\n}\n\n/**\n * Component for the croptypes\n */\n@Component({\n selector: 'ap-croptypes-overview',\n template: `\n `,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\n\nexport class ApCroptypesOverviewComponent implements OnInit, AfterContentInit, OnDestroy {\n @ViewChild(ApDynComponentComponent, {static: true}) dynComponent: ApDynComponentComponent;\n public croptypeLoading$ = of(true);\n public items$: Observable = of([]);\n public columns: ApDynGridColumnConfigBase[] = [];\n public pager: ApDynGridPagerConfigBase;\n\n private _applyClicked = new EventEmitter();\n private _settings: ISettings;\n private _subscriptions: Array = [];\n\n constructor(private cropTypeStore: CropTypeStore,\n private translationStore: TranslationStore,\n private mapViewStore: MapViewStore,\n private settingsStore: SettingsStore,\n private permissionPipe: GetPermissionPipe,\n private roundNumericService: GetRoundNumericService,\n private roundNumericPipe: GetRoundNumericPipe,\n private elementOxideCalculate: GetElementOxidCalculatePipe,\n private elementService: GetElementService) {\n\n }\n\n ngOnInit(): void {\n this.mapViewStore.hideMapView();\n this.croptypeLoading$ = this.cropTypeStore.Listen(s => s.loading);\n this._settings = this.settingsStore.FirstSetting;\n this.items$ = this._getItems();\n this.columns = this._getColumns();\n this.pager = this._getPager(false);\n }\n\n ngAfterContentInit(): void {\n this._subscriptions.push(this._applyClicked.subscribe((e) => this._onApplyClicked(e)));\n this._subscriptions.push(this.settingsStore.FirstSetting$.subscribe(s => this._settings = s));\n this._subscriptions.push(this.permissionPipe.transform(ApPermissions.EDIT_CROPTYPES).subscribe(permission => {\n this.pager = this._getPager(permission);\n }));\n }\n\n ngOnDestroy(): void {\n this._subscriptions.forEach(d => {\n d.unsubscribe();\n });\n }\n\n private _getColumns(): ApDynGridColumnConfigBase[] {\n const columns: ApDynGridColumnConfigBase[] = [\n new ApDynGridStatusColumnConfig({\n field: 'Status',\n showHeaderTitle: true,\n class: 'StatusClass',\n description: 'StatusDesc',\n filterable: true,\n groupIndex: 0,\n groupDesc: true\n }),\n new ApDynGridPropertyColumnConfig({\n field: 'SourceItem.Shortname',\n title: 'Global__Acronym',\n filterable: true,\n width: 70,\n headerFilterable: true,\n sortIndex: 0,\n sortDesc: false,\n }),\n new ApDynGridPropertyColumnConfig({\n field: 'SourceItem.Description',\n title: 'Global__Description',\n filterable: true,\n width: 120,\n headerFilterable: true\n }),\n new ApDynGridPropertyColumnConfig({\n field: 'SourceItem.ExpectedYield',\n title: 'Global__Average_Yield_Unit',\n cssClass: 'right',\n filterType: FilterType.NUMBER,\n width: 60,\n headerFilterable: true,\n pipes: [{\n pipe: this.roundNumericPipe,\n args: [this.settingsStore.FirstSetting.DigitsAfterDecimalPoint]\n }]\n }),\n new ApDynGridGroupColumnConfig({\n title: 'Global__Detraction_MainCrop_Unit',\n headerStyle: {'text-align': 'center'},\n style: {border: '1px solid #2c3237'},\n groupColumns: [\n new ApDynGridPropertyColumnConfig({\n field: 'PValue',\n title: this.elementService.GetElementStringByString(ApElementType.P),\n cssClass: 'right',\n filterType: FilterType.NUMBER,\n width: 40,\n pipes: [{\n pipe: this.roundNumericPipe,\n args: [APP_CONFIGURATION.SpecialDecimalPlaces.CropExtraction]\n }]\n }),\n new ApDynGridPropertyColumnConfig({\n field: 'KValue',\n title: this.elementService.GetElementStringByString(ApElementType.K),\n cssClass: 'right',\n filterType: FilterType.NUMBER,\n width: 40,\n pipes: [{\n pipe: this.roundNumericPipe,\n args: [APP_CONFIGURATION.SpecialDecimalPlaces.CropExtraction]\n }]\n }),\n new ApDynGridPropertyColumnConfig({\n field: 'MGValue',\n title: this.elementService.GetElementStringByString(ApElementType.Mg),\n cssClass: 'right',\n filterType: FilterType.NUMBER,\n width: 40,\n pipes: [{\n pipe: this.roundNumericPipe,\n args: [APP_CONFIGURATION.SpecialDecimalPlaces.CropExtraction]\n }]\n }),\n new ApDynGridPropertyColumnConfig({\n field: 'WdN',\n title: 'Global__Agent_N',\n width: 40,\n cssClass: 'right',\n filterType: FilterType.NUMBER,\n hide: true,\n pipes: [{\n pipe: this.roundNumericPipe,\n args: [APP_CONFIGURATION.SpecialDecimalPlaces.CropExtraction]\n }]\n })\n ]\n }),\n new ApDynGridPropertyColumnConfig({\n field: 'SourceItem.MsRatio',\n title: 'Global__Main_Secondary_Crop_Ratio',\n hide: true,\n width: 50,\n cssClass: 'right',\n filterType: FilterType.NUMBER,\n filterable: true,\n headerFilterable: true,\n pipes: [{\n pipe: this.roundNumericPipe,\n args: [APP_CONFIGURATION.SpecialDecimalPlaces.CropExtraction]\n }]\n }),\n new ApDynGridGroupColumnConfig({\n title: 'Global__Detraction_SecondCrop_Unit',\n headerStyle: {'text-align': 'center'},\n style: {border: '1px solid #2c3237'},\n hide: true,\n groupColumns: [\n new ApDynGridPropertyColumnConfig({\n field: 'SecPValue',\n title: this.elementService.GetElementStringByString(ApElementType.P),\n width: 40,\n cssClass: 'right',\n filterType: FilterType.NUMBER,\n hide: true,\n pipes: [{\n pipe: this.roundNumericPipe,\n args: [APP_CONFIGURATION.SpecialDecimalPlaces.CropExtraction]\n }]\n }),\n new ApDynGridPropertyColumnConfig({\n field: 'SecKValue',\n title: this.elementService.GetElementStringByString(ApElementType.K),\n width: 40,\n cssClass: 'right',\n filterType: FilterType.NUMBER,\n hide: true,\n pipes: [{\n pipe: this.roundNumericPipe,\n args: [APP_CONFIGURATION.SpecialDecimalPlaces.CropExtraction]\n }]\n }),\n new ApDynGridPropertyColumnConfig({\n field: 'SecMGValue',\n title: this.elementService.GetElementStringByString(ApElementType.Mg),\n width: 40,\n cssClass: 'right',\n filterType: FilterType.NUMBER,\n hide: true,\n pipes: [{\n pipe: this.roundNumericPipe,\n args: [APP_CONFIGURATION.SpecialDecimalPlaces.CropExtraction]\n }]\n }),\n new ApDynGridPropertyColumnConfig({\n field: 'SecWdN',\n title: 'Global__Agent_N',\n width: 40,\n cssClass: 'right',\n filterType: FilterType.NUMBER,\n hide: true,\n pipes: [{\n pipe: this.roundNumericPipe,\n args: [APP_CONFIGURATION.SpecialDecimalPlaces.CropExtraction]\n }]\n })\n ]\n })\n ];\n if (this._settings.UseMethodEuf) {\n columns.push(\n new ApDynGridGroupColumnConfig({\n title: 'Global__Detraction_EUF_MainCrop_Unit',\n headerStyle: {'text-align': 'center'},\n style: {border: '1px solid #2c3237'},\n hide: true,\n groupColumns: [\n new ApDynGridPropertyColumnConfig({\n field: 'EuFPValue',\n title: this.elementService.GetElementStringByString(ApElementType.P),\n width: 40,\n hide: true\n }),\n new ApDynGridPropertyColumnConfig({\n field: 'EuFKValue',\n title: this.elementService.GetElementStringByString(ApElementType.K),\n width: 40,\n hide: true\n }),\n new ApDynGridPropertyColumnConfig({\n field: 'EuFMGValue',\n title: this.elementService.GetElementStringByString(ApElementType.Mg),\n width: 40,\n hide: true\n })\n ]\n }),\n );\n }\n columns.push(\n new ApDynGridEditColumnConfig({\n data: [{\n callback: ApUtilService.createEventEmitter(this._onSelectedToggle.bind(this), this._subscriptions),\n text: (dataItem) => dataItem.SourceItem.Selected ? 'Global__Disable' : 'Global__Enable'\n }]\n })\n );\n return columns;\n }\n\n private _getPager(isHasPermission: boolean): ApDynGridPagerConfig {\n return new ApDynGridPagerConfig({\n listMassEditing: [\n {\n id: CroptypesOverviewActions.Active,\n name: this.translationStore.FindTranslationForSelectedLanguage('Global__Enable'),\n type: ApGridPagerType.None,\n values: null\n } as IDynGridWizardChoiceData,\n {\n id: CroptypesOverviewActions.Inactive,\n name: this.translationStore.FindTranslationForSelectedLanguage('Global__Disable'),\n type: ApGridPagerType.None,\n values: null\n } as IDynGridWizardChoiceData,\n {\n id: CroptypesOverviewActions.ExpectedYield,\n name: this.translationStore.FindTranslationForSelectedLanguage('Global__Average_Yield_Unit'),\n type: ApGridPagerType.Numeric,\n values: null\n } as IDynGridWizardChoiceData\n ],\n apply: this._applyClicked,\n hasPermission: isHasPermission,\n });\n }\n\n private _getItems(): Observable {\n return this.cropTypeStore.Listen(s => s.data)\n .pipe(\n filter(d => !!d),\n map(croptypes => croptypes.Convert((ct: any) => {\n const kValue = this._elementOxidCalculate(ct.MainwdK, ApElementOxydTypeEnum.K);\n const pValue = this._elementOxidCalculate(ct.MainwdP, ApElementOxydTypeEnum.P);\n const mgValue = this._elementOxidCalculate(ct.MainwdMg, ApElementOxydTypeEnum.Mg);\n const secKValue = this._elementOxidCalculate(ct.SecwdK, ApElementOxydTypeEnum.K);\n const secPValue = this._elementOxidCalculate(ct.SecwdP, ApElementOxydTypeEnum.P);\n const secMGValue = this._elementOxidCalculate(ct.SecwdMg, ApElementOxydTypeEnum.Mg);\n const euFKValue = this._elementOxidCalculate(ct.EuFiltrationK, ApElementOxydTypeEnum.K);\n const euFPValue = this._elementOxidCalculate(ct.EuFiltrationP, ApElementOxydTypeEnum.P);\n const euFMGValue = this._elementOxidCalculate(ct.EuFiltrationMg, ApElementOxydTypeEnum.Mg);\n return {\n Id: ct.Id,\n SourceItem: ct,\n Status: ct.Selected ? 1 : -1,\n StatusClass: ct.Selected ? 'ap-status-green' : 'ap-status-red',\n StatusDesc: ct.Selected ? 'Global__Active' : 'Global__Inactive',\n KValue: this.roundNumericService.roundAsNumber(kValue, APP_CONFIGURATION.SpecialDecimalPlaces.CropExtraction),\n PValue: this.roundNumericService.roundAsNumber(pValue, APP_CONFIGURATION.SpecialDecimalPlaces.CropExtraction),\n MGValue: this.roundNumericService.roundAsNumber(mgValue, APP_CONFIGURATION.SpecialDecimalPlaces.CropExtraction),\n WdN: this.roundNumericService.roundAsNumber(ct.MainwdN, APP_CONFIGURATION.SpecialDecimalPlaces.CropExtraction),\n SecKValue: this.roundNumericService.roundAsNumber(secKValue, APP_CONFIGURATION.SpecialDecimalPlaces.CropExtraction),\n SecPValue: this.roundNumericService.roundAsNumber(secPValue, APP_CONFIGURATION.SpecialDecimalPlaces.CropExtraction),\n SecMGValue: this.roundNumericService.roundAsNumber(secMGValue, APP_CONFIGURATION.SpecialDecimalPlaces.CropExtraction),\n SecWdN: this.roundNumericService.roundAsNumber(ct.SecwdN, APP_CONFIGURATION.SpecialDecimalPlaces.CropExtraction),\n EuFKValue: this.roundNumericService.roundAsNumber(euFKValue, APP_CONFIGURATION.SpecialDecimalPlaces.CropExtraction),\n EuFPValue: this.roundNumericService.roundAsNumber(euFPValue, APP_CONFIGURATION.SpecialDecimalPlaces.CropExtraction),\n EuFMGValue: this.roundNumericService.roundAsNumber(euFMGValue, APP_CONFIGURATION.SpecialDecimalPlaces.CropExtraction)\n };\n })\n )\n );\n }\n\n private _onApplyClicked(data: any): void {\n const modified: ICropTypes[] = [];\n let yieldChanged = false;\n for (const anyRow of this.dynComponent.getSelectedItems()) {\n let row = ObjectFactory.Copy(anyRow['SourceItem'] as ICropTypes);\n if (!row) {\n continue;\n }\n // copy data here we won't change the original value in the grid!\n row = ObjectFactory.Copy(row);\n switch (data.object.id) {\n case CroptypesOverviewActions.Active:\n row.Selected = true;\n break;\n case CroptypesOverviewActions.Inactive:\n row.Selected = false;\n break;\n case CroptypesOverviewActions.ExpectedYield:\n row.ExpectedYield = data.value;\n yieldChanged = true;\n break;\n }\n modified.Add(row);\n }\n this.cropTypeStore.saveCroptypes(modified, yieldChanged);\n }\n\n private _elementOxidCalculate(value: number, unit: ApElementOxydTypeEnum): number {\n return this.elementOxideCalculate.transform(\n value, unit, this._settings.UnitElementOxyd\n );\n }\n\n private _onSelectedToggle(item: any): void {\n const cropType = ObjectFactory.Copy(this.cropTypeStore.CropTypes.Find((crop) => !!crop && !!item && crop?.Id === item?.Id));\n cropType.Selected = !cropType.Selected;\n this.cropTypeStore.saveCroptypes([cropType], false);\n }\n}\n","import {AfterContentInit, Component, EventEmitter, ViewChild} from '@angular/core';\nimport {ApDynComponentComponent} from '../../ap-dyncomponent/ap-dyncomponent.component';\nimport {\n ApDynGridColumnConfigBase\n} from '../../ap-dyngrids/config/ap-dyn-grid-column-config-base';\nimport {\n ApDynGridPagerConfigBase\n} from '../../ap-dyngrids/config/ap-dyn-grid-pager-config-base';\nimport {IApPermissionData, IGridData, IWizardChoiceData} from '../../ap-interface/interfaces';\nimport {\n ApDynGridStatusColumnConfig\n} from '../../ap-dyngrids/config/ap-dyn-grid-status-column-config';\nimport {\n ApDynGridPropertyColumnConfig\n} from '../../ap-dyngrids/config/ap-dyn-grid-property-column-config';\nimport {\n ApDynGridEditColumnConfig\n} from '../../ap-dyngrids/config/ap-dyn-grid-edit-column-config';\nimport {ApDynGridPagerConfig, IGridPagerSubmitData} from '../../ap-dyngrids/config/ap-dyn-grid-pager-config';\nimport {ApGridPagerType} from '../../ap-interface';\nimport {ApPermissions} from 'invoker-transport';\nimport {\n ApSubFarmsEditComponent\n} from '../../entry-components/ap-basedata-entry-components/ap-subfarms-edit.component';\nimport {filter, map} from 'rxjs/operators';\nimport {SubFarmStore} from '../../stores/base-data/subfarm.store';\nimport {AccessPermissionsStore} from '../../stores/settings/access.permission.store';\nimport {FarmUsersStore} from '../../stores/farm/farm.users.store';\nimport {FormStore} from '../../stores/layout/form.store';\nimport {MapViewStore} from '../../stores/layout/mapview.store';\nimport {TranslationStore} from '../../stores/translation/translation.store';\nimport {GetPermissionPipe} from '../../ap-permission/pipes/get-permission.pipe';\nimport ISubFarms = Data.BaseData.ISubFarms;\n\ninterface ISubFarmGridData extends IGridData {\n Status: number;\n StatusClass: string;\n StatusDesc: string;\n}\n\n/**\n * Component for the sub farms\n */\n@Component({\n selector: 'ap-subfarms-overview',\n template: `\n `\n})\n\nexport class ApSubFarmsComponent implements AfterContentInit {\n @ViewChild(ApDynComponentComponent, {static: true}) dynComponent: ApDynComponentComponent;\n columns: ApDynGridColumnConfigBase[] = [];\n public subFarmsLoading$ = this.subFarmStore.Listen(s => s.loading);\n public items$ = this.subFarmStore.Listen(s => s.data).pipe(\n filter(d => !!d),\n map(d => d.Convert(subFarm => ({\n Id: subFarm.Id,\n SourceItem: subFarm,\n Status: subFarm.DeletedBy !== null ? -1 : 1,\n StatusClass: subFarm.DeletedBy !== null ? 'ap-status-red' : 'ap-status-green',\n StatusDesc: subFarm.DeletedBy !== null ? 'AgriConnect_Deleted' : 'Global__Active',\n }))),\n );\n pager: ApDynGridPagerConfigBase;\n public ApPermissions = ApPermissions;\n public apPermissionData: IApPermissionData;\n private _listMassEditing = [];\n private _onDelete = new EventEmitter();\n\n constructor(private subFarmStore: SubFarmStore,\n private translationStore: TranslationStore,\n private mapViewStore: MapViewStore,\n private farmUsersStore: FarmUsersStore,\n private permissionsStore: AccessPermissionsStore,\n private permissionPipe: GetPermissionPipe,\n private formStore: FormStore) {\n this.mapViewStore.hideMapView();\n this._onDelete.subscribe((event) => this.deleteClicked(event));\n }\n\n ngAfterContentInit(): void {\n this.getDataFromStore();\n this.gridBuilder();\n this.fillWizardChoiceData();\n }\n\n getDataFromStore(): void {\n this.subFarmStore.loadSubFarms();\n }\n\n onCreate(): void {\n this.formStore.openForm({component: ApSubFarmsEditComponent, data: null});\n }\n\n onEdit(dataItem): void {\n this.formStore.openForm({component: ApSubFarmsEditComponent, data: dataItem.SourceItem});\n }\n\n deleteClicked(event: IGridPagerSubmitData): void {\n event.ids.forEach(id => {\n const item = this.subFarmStore.Listen(s => s.data).getValue().Find(i => i?.Id === id);\n if (item) {\n this.subFarmStore.deleteSubFarm(item);\n }\n });\n }\n\n private gridBuilder(): void {\n this.permissionPipe.transform(ApPermissions.EDIT_SUBFARMS).subscribe(permission => {\n this.columns = [\n new ApDynGridStatusColumnConfig({\n field: 'Status',\n showHeaderTitle: true,\n class: 'StatusClass',\n description: 'StatusDesc',\n filterable: true\n }),\n new ApDynGridPropertyColumnConfig({\n field: 'SourceItem.Nummer',\n title: 'Base__ManagementStyle_Number',\n filterable: true,\n width: 80,\n headerFilterable: true\n }),\n new ApDynGridPropertyColumnConfig({\n field: 'SourceItem.Name',\n title: 'Global__Name',\n filterable: true,\n width: 100,\n headerFilterable: true,\n sortIndex: 0,\n sortDesc: false\n }),\n new ApDynGridPropertyColumnConfig({\n field: 'SourceItem.Street',\n title: 'Lbl_Order_Streetno',\n filterable: true,\n width: 80,\n headerFilterable: true\n }),\n new ApDynGridPropertyColumnConfig({\n field: 'SourceItem.Postalcode',\n title: 'Global__ZipCode',\n filterable: true,\n width: 80,\n headerFilterable: true\n }),\n new ApDynGridPropertyColumnConfig({\n field: 'SourceItem.City',\n title: 'Global__City',\n filterable: true,\n width: 80,\n headerFilterable: true,\n hide: true\n }),\n new ApDynGridPropertyColumnConfig({\n field: 'SourceItem.Email',\n title: 'Global__Email',\n filterable: true,\n width: 80,\n headerFilterable: true,\n hide: true\n }),\n new ApDynGridPropertyColumnConfig({\n field: 'SourceItem.Telephone_Nr',\n title: 'Global__Telephon',\n filterable: true,\n width: 80,\n headerFilterable: true,\n hide: true\n }),\n new ApDynGridPropertyColumnConfig({\n field: 'SourceItem.Fax',\n title: 'Docu_Ini__Fax',\n filterable: true,\n width: 80,\n headerFilterable: true,\n hide: true\n }),\n new ApDynGridEditColumnConfig(\n {\n disabled: !permission,\n }\n )\n ];\n this.pager = new ApDynGridPagerConfig({\n listMassEditing: this._listMassEditing,\n hasPermission: permission,\n });\n });\n }\n\n private fillWizardChoiceData(): void {\n const deleteSubFarm = {\n id: 0,\n name: this.translationStore.FindTranslationForSelectedLanguage('Global__Delete'),\n type: ApGridPagerType.None,\n values: null,\n onSubmit: this._onDelete\n } as IWizardChoiceData;\n this._listMassEditing.push(deleteSubFarm);\n }\n}\n","export enum ApMachinesGridEnum {\n STATUS = 'Status',\n STATUSCLASS = 'StatusClass',\n STATUSDESC = 'StatusDesc',\n KIND_NAME = 'kindName',\n NAME = 'SourceItem.Name',\n SIGN = 'SourceItem.Sign',\n SHORTNAME = 'SourceItem.Shortname',\n INSTRUMENT_NAME = 'instrumentName',\n DRIVER_NAME = 'driverName'\n}\n","import {Pipe, PipeTransform} from '@angular/core';\nimport {MachineStore} from '../../../stores/docu/machine.store';\nimport {TranslationStore} from '../../../stores/translation/translation.store';\n\n@Pipe({\n name: 'getMachineKindName'\n})\nexport class GetMachineKindNamePipe implements PipeTransform {\n\n constructor(private machineStore: MachineStore,\n private translationStore: TranslationStore) {\n }\n\n transform(kindId: number): string {\n const machineType = this.machineStore.Listen(s => s.machineTypes).getValue().FirstOrDefault(i => i.Id === kindId);\n if (machineType) {\n return this.translationStore.FindTranslationForSelectedLanguage(machineType.Description);\n } else {\n return null;\n }\n }\n\n}\n","import {Component, EventEmitter, OnDestroy, OnInit, ViewChild} from '@angular/core';\nimport {FormBuilder} from '@angular/forms';\nimport {Subscription} from 'rxjs';\nimport {ApGridPagerType, IGridData, IWizardChoiceData} from '../../../ap-interface';\nimport {\n ApMachinesGridEnum\n} from '../../../ap-interface/enums/grids/ap-machines-grid.enum';\nimport {\n ApDynGridColumnConfigBase\n} from '../../../ap-dyngrids/config/ap-dyn-grid-column-config-base';\nimport {\n ApDynGridPagerConfig,\n IDynGridWizardChoiceData,\n IGridPagerSubmitData\n} from '../../../ap-dyngrids/config/ap-dyn-grid-pager-config';\nimport {\n ApDynGridStatusColumnConfig\n} from '../../../ap-dyngrids/config/ap-dyn-grid-status-column-config';\nimport {\n ApDynGridPropertyColumnConfig\n} from '../../../ap-dyngrids/config/ap-dyn-grid-property-column-config';\nimport {\n ApDynGridEditColumnConfig\n} from '../../../ap-dyngrids/config/ap-dyn-grid-edit-column-config';\nimport {\n ApDynComponentComponent\n} from '../../../ap-dyncomponent/ap-dyncomponent.component';\nimport {\n ApMachinesEditComponent\n} from '../../../entry-components/ap-basedata-entry-components/ap-machines-edit.component';\nimport {MachineStore} from '../../../stores/docu/machine.store';\nimport {filter, map} from 'rxjs/operators';\nimport {\n GetMachineKindNamePipe\n} from '../../pipes/machines/get-machine-kind-name.pipe';\nimport {\n InstrumentStore\n} from '../../../stores/docu/instrument.store';\nimport {DriverStore} from '../../../stores/docu/driver.store';\nimport {FormStore} from '../../../stores/layout/form.store';\nimport {\n TranslationStore\n} from '../../../stores/translation/translation.store';\nimport IMachine = Data.DocuContext.Machine.IMachine;\nimport IInstrument = Data.DocuContext.Instrument.IInstrument;\n\ninterface IMachinesGridData extends IGridData {\n kindName: string;\n instrumentName: string;\n driverName: string;\n Status: number;\n StatusClass: string;\n StatusDesc: string;\n}\n\n/**\n * Machines overview component.\n * Shows a list of all machines.\n */\n@Component({\n selector: 'ap-machines-overview',\n template: `\n \n `\n})\n\n/**\n * Machines overview component.\n * Shows a list of all machines.\n */\nexport class ApMachinesComponent implements OnInit, OnDestroy {\n @ViewChild(ApDynComponentComponent, {static: true}) dynComponent;\n\n machinesLoading$ = this.machineStore.Listen(s => s.loading);\n items$ = this.machineStore.Listen(s => s.data).pipe(\n filter(d => !!d),\n map(machines => machines.Convert((machine: IMachine) => ({\n Id: machine.Id,\n SourceItem: machine,\n kindName: this.getMachineKindNamePipe.transform(machine.Kind),\n instrumentName: this.instrumentStore\n .GetProperty(\n machine.DefaultInstrument ? machine.DefaultInstrument.Id : '',\n el => el.Name) || '',\n driverName: this.driverStore\n .GetProperty(\n machine.DefaultDriver ? machine.DefaultDriver.Id : '',\n el => el.Name) || '',\n Status: machine.IsDeleted ? -1 : 1,\n StatusClass: machine.IsDeleted ? 'ap-status-red' : 'ap-status-green',\n StatusDesc: machine.IsDeleted ? 'AgriConnect_Deleted' : 'Global__Active'\n }))),\n );\n\n columns: ApDynGridColumnConfigBase[];\n gridColumns = ApMachinesGridEnum;\n listMassEditing: Array = [];\n pager: ApDynGridPagerConfig;\n\n private _onDelete = new EventEmitter();\n private _subscriptions: Array = [];\n\n constructor(public machineStore: MachineStore,\n private instrumentStore: InstrumentStore,\n private driverStore: DriverStore,\n private fb: FormBuilder,\n private formStore: FormStore,\n private translationStore: TranslationStore,\n private getMachineKindNamePipe: GetMachineKindNamePipe) {\n this._subscriptions.push(this._onDelete.subscribe((event) => this.deleteClicked(event)));\n }\n\n /**\n * when the component is loaded\n */\n ngOnInit(): void {\n this.gridBuilder();\n this.fillWizardChoiceData();\n }\n\n /**\n * Handler for edit operation.\n * User wants to edit one machine.\n */\n public editHandler(dataItem): void {\n this.formStore.openForm({component: ApMachinesEditComponent, data: dataItem.SourceItem});\n }\n\n /**\n * apply clicked event\n */\n public deleteClicked(event: IGridPagerSubmitData): void {\n for (const id of event.ids) {\n const item = this.machineStore.Listen(d => d.data).getValue().Find(i => i?.Id === id);\n if (item) {\n this.machineStore.deleteMachine(item);\n }\n }\n }\n\n /**\n * cleanup subscriptions\n */\n ngOnDestroy(): void {\n this._subscriptions.forEach(d => {\n d.unsubscribe();\n });\n }\n\n /**\n * binding of validators\n */\n private gridBuilder(): void {\n this.columns = [\n new ApDynGridStatusColumnConfig({\n field: this.gridColumns.STATUS, sortIndex: 0, sortDesc: true, showHeaderTitle: false,\n class: this.gridColumns.STATUSCLASS, description: this.gridColumns.STATUSDESC, filterable: true\n }),\n new ApDynGridPropertyColumnConfig({\n field: this.gridColumns.KIND_NAME, title: 'Docu_Ini__Type',\n filterable: true,\n headerFilterable: true\n }),\n new ApDynGridPropertyColumnConfig({\n field: this.gridColumns.NAME, title: 'Docu_Ini__Description',\n filterable: true,\n headerFilterable: true\n }),\n new ApDynGridPropertyColumnConfig({\n field: this.gridColumns.SIGN, title: 'Docu_Ini__NumberPlate',\n filterable: true,\n headerFilterable: true\n }),\n new ApDynGridPropertyColumnConfig({\n field: this.gridColumns.INSTRUMENT_NAME, title: 'Docu_Ini__Tool_Default',\n filterable: true,\n headerFilterable: true\n }),\n new ApDynGridPropertyColumnConfig({\n field: this.gridColumns.DRIVER_NAME, title: 'Docu_Ini__Motorist_Default',\n filterable: true,\n headerFilterable: true\n }),\n new ApDynGridEditColumnConfig({}),\n ];\n\n this.pager = new ApDynGridPagerConfig({listMassEditing: this.listMassEditing});\n }\n\n /**\n * fill wizard choice data\n */\n private fillWizardChoiceData(): void {\n const deleteMachine = {\n id: 0,\n name: this.translationStore.FindTranslationForSelectedLanguage('Global__Delete'),\n type: ApGridPagerType.None,\n onSubmit: this._onDelete\n } as IDynGridWizardChoiceData;\n this.listMassEditing.push(deleteMachine);\n }\n}\n","import {Component, EventEmitter, OnInit, ViewChild} from '@angular/core';\nimport {FormBuilder} from '@angular/forms';\nimport {\n ApInstrumentsEditComponent\n} from '../../../entry-components/ap-basedata-entry-components/ap-instruments-edit.component';\nimport {ApGridPagerType, IGridData, IWizardChoiceData} from '../../../ap-interface';\nimport {\n ApDynGridStatusColumnConfig\n} from '../../../ap-dyngrids/config/ap-dyn-grid-status-column-config';\nimport {\n ApDynGridPropertyColumnConfig,\n FilterType\n} from '../../../ap-dyngrids/config/ap-dyn-grid-property-column-config';\nimport {\n ApDynGridEditColumnConfig\n} from '../../../ap-dyngrids/config/ap-dyn-grid-edit-column-config';\nimport {\n ApDynGridPagerConfig,\n IDynGridWizardChoiceData,\n IGridPagerSubmitData\n} from '../../../ap-dyngrids/config/ap-dyn-grid-pager-config';\nimport {\n ApDynComponentComponent\n} from '../../../ap-dyncomponent/ap-dyncomponent.component';\nimport {\n ApDynGridColumnConfigBase\n} from '../../../ap-dyngrids/config/ap-dyn-grid-column-config-base';\nimport {\n InstrumentStore\n} from '../../../stores/docu/instrument.store';\nimport {filter, map} from 'rxjs/operators';\nimport {\n WorkTypesStore\n} from '../../../stores/base-data/worrktypes.store';\nimport {FormStore} from '../../../stores/layout/form.store';\nimport {\n TranslationStore\n} from '../../../stores/translation/translation.store';\nimport IInstrument = Data.DocuContext.Instrument.IInstrument;\n\ninterface IInstrumentGridData extends IGridData {\n DefaultWorkTypeName: string;\n Status: number;\n StatusClass: string;\n StatusDesc: string;\n}\n\n/**\n * Component for the instruments overview.\n */\n@Component({\n selector: 'ap-instruments-overview',\n template: `\n \n `\n})\n\n/**\n * Component for the instruments overview.\n */\nexport class ApInstrumentsComponent implements OnInit {\n @ViewChild(ApDynComponentComponent, {static: true}) dynComponent;\n public instrumentsLoading$ = this.instrumentStore.Listen(d => d.loading);\n public items$ = this.instrumentStore.Listen(s => s.data).pipe(\n filter(d => !!d),\n map(instruments => instruments.Convert(i => ({\n Id: i.Id,\n SourceItem: i,\n DefaultWorkTypeName: this.translationStore.FindTranslationForSelectedLanguage(i.DefaultWorktype ? i.DefaultWorktype.Description : ''),\n Status: i.IsDeleted ? -1 : 1,\n StatusClass: i.IsDeleted ? 'ap-status-red' : 'ap-status-green',\n StatusDesc: i.IsDeleted ? 'AgriConnect_Deleted' : 'Global__Active',\n })))\n );\n public columns: ApDynGridColumnConfigBase[];\n public pager: ApDynGridPagerConfig;\n public listMassEditing: Array = [];\n\n private _onDelete = new EventEmitter();\n\n constructor(private instrumentStore: InstrumentStore,\n private fb: FormBuilder,\n private formStore: FormStore,\n private worktypeStore: WorkTypesStore,\n private translationStore: TranslationStore) {\n this._onDelete.subscribe((event) => this.deleteClicked(event));\n }\n\n /**\n * when the component is loaded\n */\n ngOnInit(): void {\n this.gridBuilder();\n this.fillWizardChoiceData();\n }\n\n /**\n * binding of validators\n */\n gridBuilder(): void {\n this.columns = [\n new ApDynGridStatusColumnConfig({\n field: 'Status', sortIndex: 0, sortDesc: true, showHeaderTitle: false,\n class: 'StatusClass', description: 'StatusDesc', filterable: true,\n }),\n new ApDynGridPropertyColumnConfig({\n field: 'SourceItem.Name', title: 'Docu_Ini__Description', sortIndex: 1,\n filterable: true,\n headerFilterable: true\n }),\n new ApDynGridPropertyColumnConfig({\n field: 'SourceItem.DefaultWidth', title: 'Docu_Ini__WorkingWidth',\n filterable: true,\n headerFilterable: true,\n cssClass: 'right',\n filterType: FilterType.NUMBER\n }),\n new ApDynGridPropertyColumnConfig({\n field: 'DefaultWorkTypeName', title: 'Docu_Ini__WorkType',\n filterable: true,\n headerFilterable: true\n }),\n new ApDynGridEditColumnConfig({}),\n ];\n\n this.pager = new ApDynGridPagerConfig({listMassEditing: this.listMassEditing});\n }\n\n /**\n * Handler for edit operation.\n * User wants to edit one instrument.\n */\n public editHandler(dataItem): void {\n this.formStore.openForm({component: ApInstrumentsEditComponent, data: dataItem.SourceItem});\n }\n\n /**\n * fill wizard choice data\n */\n fillWizardChoiceData(): void {\n const deleteInstruments = {\n id: 0,\n name: this.translationStore.FindTranslationForSelectedLanguage('Global__Delete'),\n type: ApGridPagerType.None,\n onSubmit: this._onDelete\n } as IDynGridWizardChoiceData;\n this.listMassEditing.push(deleteInstruments);\n }\n\n /**\n * apply clicked event\n */\n deleteClicked(event: IGridPagerSubmitData): void {\n event.ids.forEach(id => {\n const item = this.instrumentStore.Listen(d => d.data).getValue().Find(i => i.Id === id);\n if (item) {\n this.instrumentStore.deleteInstrument(item);\n }\n });\n }\n}\n","import {Component, EventEmitter, OnInit, ViewChild} from '@angular/core';\nimport {FormBuilder} from '@angular/forms';\nimport {ApGridPagerType, IGridData, IWizardChoiceData} from '../../../ap-interface';\nimport {\n ApDynGridColumnConfigBase\n} from '../../../ap-dyngrids/config/ap-dyn-grid-column-config-base';\nimport {\n ApDynComponentComponent\n} from '../../../ap-dyncomponent/ap-dyncomponent.component';\nimport {\n ApDynGridPagerConfig,\n IDynGridWizardChoiceData,\n IGridPagerSubmitData\n} from '../../../ap-dyngrids/config/ap-dyn-grid-pager-config';\nimport {\n ApDynGridStatusColumnConfig\n} from '../../../ap-dyngrids/config/ap-dyn-grid-status-column-config';\nimport {\n ApDynGridPropertyColumnConfig\n} from '../../../ap-dyngrids/config/ap-dyn-grid-property-column-config';\nimport {\n ApDynGridEditColumnConfig\n} from '../../../ap-dyngrids/config/ap-dyn-grid-edit-column-config';\nimport {\n ApDriversEditComponent\n} from '../../../entry-components/ap-basedata-entry-components/ap-drivers-edit.component';\nimport {DriverStore} from '../../../stores/docu/driver.store';\nimport {filter, map} from 'rxjs/operators';\nimport {FormStore} from '../../../stores/layout/form.store';\nimport {\n TranslationStore\n} from '../../../stores/translation/translation.store';\nimport IDriver = Data.DocuContext.Driver.IDriver;\n\ninterface IDriverGridData extends IGridData {\n Status: number;\n StatusClass: string;\n StatusDesc: string;\n}\n\n/**\n * Component for the drivers\n */\n@Component({\n selector: 'ap-drivers-overview',\n template: `\n \n \n `\n})\n\n/**\n * Drivers overview component.\n */\nexport class ApDriversComponent implements OnInit {\n @ViewChild(ApDynComponentComponent, {static: true}) dynComponent;\n public driversLoading$ = this.driversStore.Listen(s => s.loading);\n public items$ = this.driversStore.Listen(s => s.data).pipe(\n filter(d => !!d),\n map(d => d.Convert(driver => ({\n Id: driver.Id,\n SourceItem: driver,\n Status: driver.IsDeleted ? -1 : 1,\n StatusClass: driver.IsDeleted ? 'ap-status-red' : 'ap-status-green',\n StatusDesc: driver.IsDeleted ? 'AgriConnect_Deleted' : 'Global__Active',\n }))),\n );\n\n public listMassEditing: Array = [];\n public columns: ApDynGridColumnConfigBase[];\n public pager: ApDynGridPagerConfig;\n\n private _onDelete = new EventEmitter();\n\n constructor(public driversStore: DriverStore,\n private fb: FormBuilder,\n private formStore: FormStore,\n private translationStore: TranslationStore) {\n this._onDelete.subscribe((event) => this.deleteClicked(event));\n }\n\n /**\n * when the component is loaded\n */\n ngOnInit(): void {\n this.gridBuilder();\n this.fillWizardChoiceData();\n }\n\n /**\n * binding of validators\n */\n gridBuilder(): void {\n this.columns = [\n new ApDynGridStatusColumnConfig({\n field: 'Status', showHeaderTitle: false,\n class: 'StatusClass', description: 'StatusDesc', filterable: true\n }),\n new ApDynGridPropertyColumnConfig({\n field: 'SourceItem.Firstname', title: 'Docu_Ini__Forename',\n headerFilterable: true, sortIndex: 0\n }),\n new ApDynGridPropertyColumnConfig({\n field: 'SourceItem.Name', title: 'Docu_Ini__Surname',\n headerFilterable: true\n }),\n new ApDynGridEditColumnConfig({}),\n ];\n\n this.pager = new ApDynGridPagerConfig({listMassEditing: this.listMassEditing});\n }\n\n /**\n * Handler for edit operation.\n * User wants to edit one driver.\n */\n public editHandler(dataItem): void {\n this.formStore.openForm({component: ApDriversEditComponent, data: dataItem.SourceItem});\n }\n\n /**\n * fill wizard choice data\n */\n fillWizardChoiceData(): void {\n const deleteDriver = {\n id: 0,\n name: this.translationStore.FindTranslationForSelectedLanguage('Global__Delete'),\n type: ApGridPagerType.None,\n onSubmit: this._onDelete\n } as IDynGridWizardChoiceData;\n this.listMassEditing.push(deleteDriver);\n }\n\n /**\n * apply clicked event\n */\n deleteClicked(event: IGridPagerSubmitData): void {\n event.ids.forEach(id => {\n const item = this.driversStore.Listen(s => s.data).getValue().Find(i => i?.Id === id);\n if (item) {\n this.driversStore.deleteDriver(item);\n }\n });\n }\n}\n","import {AfterContentInit, Component, OnDestroy, OnInit, ViewChild} from '@angular/core';\nimport {FormBuilder} from '@angular/forms';\nimport {IGridData} from '../../../ap-interface';\nimport {\n ApDynGridColumnConfigBase,\n ApDynGridColumnHideConfig\n} from '../../../ap-dyngrids/config/ap-dyn-grid-column-config-base';\nimport {\n ApDynComponentComponent\n} from '../../../ap-dyncomponent/ap-dyncomponent.component';\nimport {\n ApDynGridPagerConfig\n} from '../../../ap-dyngrids/config/ap-dyn-grid-pager-config';\nimport {\n ApDynGridStatusColumnConfig\n} from '../../../ap-dyngrids/config/ap-dyn-grid-status-column-config';\nimport {\n ApDynGridPropertyColumnConfig,\n FilterType\n} from '../../../ap-dyngrids/config/ap-dyn-grid-property-column-config';\nimport {filter, map} from 'rxjs/operators';\nimport {FormStore} from '../../../stores/layout/form.store';\nimport {TerminalsStore} from '../../../stores/base-data/terminals.store';\nimport {Observable, Subscription} from 'rxjs';\nimport {CampaignYearStore} from '../../../stores/login/campaignyear.store';\nimport {\n ApDynGridGroupColumnConfig\n} from '../../../ap-dyngrids/config/ap-dyn-grid-group-column-config';\nimport {LanguageStore} from '../../../stores/translation/language.store';\nimport {ApDateService} from '../../../ap-core/services/ap-date-service';\nimport ITerminals = Data.BaseData.ITerminals;\n\ninterface ITerminalsGridData extends IGridData {\n Status: number;\n StatusClass: string;\n StatusDesc: string;\n LastServiceDate: Date;\n}\n\n/**\n * Component for the terminals overview\n */\n@Component({\n selector: 'ap-terminals-overview',\n template: `\n \n `\n})\n\n/**\n * Terminals overview component.\n */\nexport class ApTerminalsOverviewComponent implements OnInit, AfterContentInit, OnDestroy {\n @ViewChild(ApDynComponentComponent, {static: true}) dynComponent;\n public terminalsLoading$: Observable;\n public items$: Observable;\n public columns: ApDynGridColumnConfigBase[];\n public pager: ApDynGridPagerConfig;\n private _subscriptions: Subscription[] = [];\n\n constructor(public terminalsStore: TerminalsStore,\n private fb: FormBuilder,\n private formStore: FormStore,\n private languageStore: LanguageStore,\n private campaignYearStore: CampaignYearStore,\n private dateService: ApDateService) {\n this.terminalsLoading$ = this.terminalsStore.Listen(s => s.loading);\n this.items$ = this.terminalsStore.Listen(s => s.data).pipe(\n filter(d => !!d),\n map(d => d.Convert(terminal => ({\n Id: terminal.Id,\n SourceItem: terminal,\n // Dummy status. We do not have deleted or non-active terminals in our database. They are deleted by ERP-Sync Job\n Status: 1,\n StatusClass: 'ap-status-green',\n StatusDesc: 'Global__Active',\n LastServiceDate: this.dateService.getDateMidnight(terminal.LastService),\n }))),\n );\n }\n\n ngAfterContentInit(): void {\n this.gridBuilder();\n }\n\n ngOnInit(): void {\n this._subscriptions.push(this.campaignYearStore.Listen(s => s.selectedYear).subscribe(() => {\n this.terminalsStore.loadTerminals();\n }));\n }\n\n ngOnDestroy(): void {\n this._subscriptions.forEach(s => s.unsubscribe());\n }\n\n /**\n * Build grid columns\n */\n gridBuilder(): void {\n this.columns = [\n new ApDynGridStatusColumnConfig({\n field: 'Status', showHeaderTitle: false,\n class: 'StatusClass', description: 'StatusDesc', filterable: true\n }),\n new ApDynGridGroupColumnConfig({\n title: 'Global__Terminal',\n groupColumns: [\n new ApDynGridPropertyColumnConfig({\n field: 'SourceItem.Terminal', title: 'Tasks_ViewModel__Type',\n filterable: true,\n headerFilterable: true, sortIndex: 0\n }),\n new ApDynGridPropertyColumnConfig({\n field: 'SourceItem.TerminalSn', title: 'Global__SerialNumber',\n filterable: true,\n headerFilterable: true,\n hide: new ApDynGridColumnHideConfig({\n mapHide: true\n })\n })]\n }),\n new ApDynGridGroupColumnConfig({\n title: 'Global__Sensor',\n groupColumns: [\n new ApDynGridPropertyColumnConfig({\n field: 'SourceItem.Sensor', title: 'Tasks_ViewModel__Type',\n filterable: true,\n headerFilterable: true\n }),\n new ApDynGridPropertyColumnConfig({\n field: 'SourceItem.SensorSn', title: 'Global__SerialNumber',\n filterable: true,\n headerFilterable: true,\n hide: new ApDynGridColumnHideConfig({\n mapHide: true\n })\n })]\n }),\n new ApDynGridPropertyColumnConfig({\n field: 'SourceItem.MailAddress', title: 'Global__Email',\n filterable: true,\n headerFilterable: true\n }),\n new ApDynGridPropertyColumnConfig({\n field: 'LastServiceDate', title: 'Global_Last_Update',\n filterable: true,\n headerFilterable: true,\n format: this.languageStore.SelectedLanguage.DateFormat,\n filterType: FilterType.DATE\n })\n ];\n this.pager = new ApDynGridPagerConfig();\n }\n}\n","\n \n \n\n\n\n
\n\n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n\n
\n","import {Component, ViewChild} from '@angular/core';\nimport {ApMachinesEditComponent} from '../../entry-components/ap-basedata-entry-components/ap-machines-edit.component';\nimport {ApDriversEditComponent} from '../../entry-components/ap-basedata-entry-components/ap-drivers-edit.component';\nimport {ApInstrumentsEditComponent} from '../../entry-components/ap-basedata-entry-components/ap-instruments-edit.component';\nimport {ApMachinesComponent} from './machines/ap-machines.component';\nimport {ApInstrumentsComponent} from './instruments/ap-instruments.component';\nimport {ApDriversComponent} from './drivers/ap-drivers.component';\nimport {ApSectionHeaderGridComponent} from '../../ap-section-header/components/ap-section-header-grid/ap-section-header-grid.component';\nimport {FormStore} from '../../stores/layout/form.store';\nimport {ApTerminalsOverviewComponent} from './terminals/ap-terminals.overview.component';\n\n/**\n * Enumeration of all ressource tabs\n */\nexport enum RessourceTabs {\n Machines = 0,\n Instrument = 1,\n Drivers = 2,\n Terminals = 3\n}\n\n/**\n * Component for docu ressources overview\n */\n@Component({\n selector: 'ap-docu-ressources',\n templateUrl: 'ap-docu-ressources.component.html'\n})\n\n/**\n * Component for docu ressources overview\n */\nexport class ApDocuRessourcesComponent {\n\n @ViewChild(ApMachinesComponent, {static: false})\n public machineComonent: ApMachinesComponent;\n\n @ViewChild(ApInstrumentsComponent, {static: false})\n public instrumentsComponent: ApInstrumentsComponent;\n\n @ViewChild(ApDriversComponent, {static: false})\n public driversComponent: ApDriversComponent;\n\n @ViewChild(ApTerminalsOverviewComponent, {static: false})\n public terminalsComponent: ApTerminalsOverviewComponent;\n\n @ViewChild(ApSectionHeaderGridComponent, {static: false})\n private headerComponent: ApSectionHeaderGridComponent;\n\n public selectedTab: RessourceTabs = RessourceTabs.Machines;\n\n constructor(private formStore: FormStore) {\n }\n\n /**\n * Handler for selectedTab changed.\n * Determins the selected tab for proper new-handling.\n */\n public selectTab(e): void {\n this.headerComponent.reset();\n switch (this.selectedTab) {\n case RessourceTabs.Machines:\n this.machineComonent?.dynComponent?.dynGrid?.filterGrid('');\n break;\n case RessourceTabs.Instrument:\n this.instrumentsComponent?.dynComponent?.dynGrid?.filterGrid('');\n break;\n case RessourceTabs.Drivers:\n this.driversComponent?.dynComponent?.dynGrid?.filterGrid('');\n break;\n case RessourceTabs.Terminals:\n this.terminalsComponent?.dynComponent?.dynGrid?.filterGrid('');\n break;\n }\n this.selectedTab = e.index;\n }\n\n /**\n * Search in ressources\n */\n public searchIn(value: string): void {\n /*\n * Filters the grid and forces a refresh of the grid.\n * This is necessary because the grid is embedded within a Tab.\n */\n switch (this.selectedTab) {\n case RessourceTabs.Machines:\n this.machineComonent?.dynComponent?.dynGrid?.filterGrid(value);\n break;\n case RessourceTabs.Instrument:\n this.instrumentsComponent?.dynComponent?.dynGrid?.filterGrid(value);\n break;\n case RessourceTabs.Drivers:\n this.driversComponent?.dynComponent?.dynGrid?.filterGrid(value);\n break;\n case RessourceTabs.Terminals:\n this.terminalsComponent?.dynComponent?.dynGrid?.filterGrid(value);\n break;\n }\n }\n\n /**\n * Handler for creating a new ressource.\n * Depending on the selected tab the corresponding edit-form opens.\n */\n public createNew(): void {\n\n let docuComponent: any;\n switch (this.selectedTab) {\n case RessourceTabs.Machines:\n docuComponent = ApMachinesEditComponent;\n break;\n case RessourceTabs.Instrument:\n docuComponent = ApInstrumentsEditComponent;\n break;\n case RessourceTabs.Drivers:\n docuComponent = ApDriversEditComponent;\n break;\n }\n if (!docuComponent) {\n return;\n }\n this.formStore.openForm({component: docuComponent, data: null});\n }\n\n isCreateNewAllowed(): boolean {\n return this.selectedTab !== RessourceTabs.Terminals;\n }\n}\n","import {AfterContentInit, Component, EventEmitter, OnDestroy, ViewChild} from '@angular/core';\nimport {Subscription} from 'rxjs';\nimport {ApGridPagerType, IGridData, IGridPagerData, IWizardChoiceData} from '../../ap-interface';\nimport {ApPermissions} from 'invoker-transport';\nimport {\n ApDynComponentComponent\n} from '../../ap-dyncomponent/ap-dyncomponent.component';\nimport {\n ApDynGridColumnConfigBase\n} from '../../ap-dyngrids/config/ap-dyn-grid-column-config-base';\nimport {\n ApDynGridPagerConfigBase\n} from '../../ap-dyngrids/config/ap-dyn-grid-pager-config-base';\nimport {\n ApDynGridStatusColumnConfig\n} from '../../ap-dyngrids/config/ap-dyn-grid-status-column-config';\nimport {\n ApDynGridPropertyColumnConfig,\n FilterType\n} from '../../ap-dyngrids/config/ap-dyn-grid-property-column-config';\nimport {\n ApDynGridEditColumnConfig\n} from '../../ap-dyngrids/config/ap-dyn-grid-edit-column-config';\nimport {\n ApDynGridPagerConfig\n} from '../../ap-dyngrids/config/ap-dyn-grid-pager-config';\nimport {CropTypeStore} from '../../stores/base-data/crop.types.store';\nimport {\n AccessPermissionsStore\n} from '../../stores/settings/access.permission.store';\nimport {VarietyStore} from '../../stores/base-data/variety.store';\nimport {filter, map} from 'rxjs/operators';\nimport {FarmUsersStore} from '../../stores/farm/farm.users.store';\nimport {MapViewStore} from '../../stores/layout/mapview.store';\nimport {\n TranslationStore\n} from '../../stores/translation/translation.store';\nimport {\n GetPermissionPipe\n} from '../../ap-permission/pipes/get-permission.pipe';\nimport {SettingsStore} from '../../stores/base-data/settings.store';\nimport {GetRoundNumericPipe} from '../../ap-utils';\nimport {ObjectFactory} from 'ts-tooling';\nimport IVarieties = Data.BaseData.IVarieties;\n\nenum VarietyGridActions {\n ACTIVE = 1,\n INACTIVE = 0,\n}\n\ninterface IVarietyGridData extends IGridData {\n Status: number;\n StatusClass: string;\n StatusDesc: string;\n CropType: string;\n}\n\n/**\n * Component for the varieties\n */\n@Component({\n selector: 'ap-varieties-overview',\n template: `\n `\n})\n\nexport class ApVarietiesOverviewComponent implements AfterContentInit, OnDestroy {\n @ViewChild(ApDynComponentComponent, {static: true}) dynComponent: ApDynComponentComponent;\n columns: ApDynGridColumnConfigBase[] = [];\n pager: ApDynGridPagerConfigBase;\n public varietyLoading$ = this.varietyStore.Listen(s => s.loading);\n items$ = this.varietyStore.Listen(s => s.data).pipe(\n filter(d => !!d),\n map(pp => pp.Convert((variety: IVarieties) => {\n const cropType = this.croptypeStore.Listen(s => s.data).getValue().Find(c => c?.CropKey === variety?.CroptypesCropkey)?.Description;\n return {\n Id: variety.Id,\n SourceItem: variety,\n Status: variety.Selectable ? 1 : -1,\n StatusClass: variety.Selectable ? 'ap-status-green' : 'ap-status-red',\n StatusDesc: variety.Selectable ? 'Global__Active' : 'Global__Inactive',\n CropType: cropType,\n };\n })));\n\n private _subscriptions: Array = [];\n private _listMassEditing = [];\n private _applyClicked = new EventEmitter();\n\n constructor(private varietyStore: VarietyStore,\n private farmUsersStore: FarmUsersStore,\n private translationStore: TranslationStore,\n private croptypeStore: CropTypeStore,\n private mapViewStore: MapViewStore,\n private permissionsStore: AccessPermissionsStore,\n private settingsStore: SettingsStore,\n private roundNumericPipe: GetRoundNumericPipe,\n private permissionPipe: GetPermissionPipe) {\n this.mapViewStore.hideMapView();\n this._subscriptions.push(this._applyClicked.subscribe((e) => this._onApplyClicked(e)));\n }\n\n ngAfterContentInit(): void {\n this.gridBuilder();\n this.fillWizardChoiceData();\n }\n\n ngOnDestroy(): void {\n this._subscriptions.forEach(d => {\n d.unsubscribe();\n });\n }\n\n fillWizardChoiceData(): void {\n const state = {\n id: 0,\n name: this.translationStore.FindTranslationForSelectedLanguage('Global__Status'),\n type: ApGridPagerType.DropDown,\n values: [\n {\n id: VarietyGridActions.ACTIVE,\n label: this.translationStore.FindTranslationForSelectedLanguage('Global__Active'),\n },\n {\n id: VarietyGridActions.INACTIVE,\n label: this.translationStore.FindTranslationForSelectedLanguage('Global__Inactive'),\n }\n ]\n } as IWizardChoiceData;\n this._listMassEditing.push(state);\n }\n\n private gridBuilder(): void {\n this.columns = [\n new ApDynGridStatusColumnConfig({\n field: 'Status',\n showHeaderTitle: true,\n class: 'StatusClass',\n description: 'StatusDesc',\n filterable: true,\n groupIndex: 0,\n groupDesc: true\n }),\n new ApDynGridPropertyColumnConfig({\n field: 'CropType',\n title: 'Global__CropType',\n filterable: true,\n width: 150,\n headerFilterable: true,\n sortIndex: 0,\n sortDesc: false,\n }),\n new ApDynGridPropertyColumnConfig({\n field: 'SourceItem.Prodname',\n title: 'Global__Description',\n filterable: true,\n width: 100,\n headerFilterable: true\n }),\n new ApDynGridPropertyColumnConfig({\n field: 'SourceItem.Flattenedrisk',\n title: 'Global__Lodging',\n filterable: true,\n width: 80,\n cssClass: 'right', filterType: FilterType.NUMBER,\n pipes: [\n {\n pipe: this.roundNumericPipe,\n args: [\n this.settingsStore.FirstSetting.DigitsAfterDecimalPoint,\n ]\n }\n ],\n headerFilterable: true\n }),\n new ApDynGridPropertyColumnConfig({\n field: 'SourceItem.Tkg',\n title: 'Global__Thousand_Seed_Weight',\n filterable: true,\n width: 80,\n cssClass: 'right', filterType: FilterType.NUMBER,\n pipes: [\n {\n pipe: this.roundNumericPipe,\n args: [\n this.settingsStore.FirstSetting.DigitsAfterDecimalPoint,\n ]\n }\n ],\n headerFilterable: true\n }),\n new ApDynGridPropertyColumnConfig({\n field: 'SourceItem.IdentificationNumber',\n title: 'Docu_Ini__Id',\n filterable: true,\n width: 80,\n cssClass: 'right', filterType: FilterType.NUMBER,\n headerFilterable: true,\n hide: true\n }),\n new ApDynGridPropertyColumnConfig({\n field: 'SourceItem.YearOfPermission',\n title: 'Global__Admission',\n filterable: true,\n width: 80,\n cssClass: 'right', filterType: FilterType.NUMBER,\n headerFilterable: true,\n hide: true\n }),\n new ApDynGridEditColumnConfig(\n {\n disabled: true\n }\n )\n ];\n this.permissionPipe.transform(ApPermissions.EDIT_VARIETIES).subscribe(permission => {\n this.pager = new ApDynGridPagerConfig({\n listMassEditing: this._listMassEditing,\n apply: this._applyClicked,\n hasPermission: permission,\n });\n });\n }\n\n private _onApplyClicked(data: IGridPagerData): void {\n const rows = this.dynComponent.getSelectedItems();\n if (data.object.id === 0) {\n {\n rows.forEach(row => {\n const item = ObjectFactory.Copy(row['SourceItem'] as IVarieties);\n if (item) {\n let val = false;\n if (data.value.id === VarietyGridActions.ACTIVE) {\n val = true;\n }\n item.Selectable = val;\n this.varietyStore.updateSelectableVariety(row as IVarieties);\n }\n });\n }\n }\n }\n}\n","import {AfterContentInit, Component, EventEmitter, OnDestroy, OnInit, ViewChild} from '@angular/core';\nimport {Observable, Subscription} from 'rxjs';\nimport {ApElementOxydTypeEnum, ApGridPagerType, IGridData, IGridPagerData} from '../../ap-interface';\nimport {ApPermissions} from 'invoker-transport';\nimport {\n ApFertilizerOrgsEditComponent\n} from '../../entry-components/ap-basedata-entry-components/ap-fertilizer-orgs-edit.component';\nimport {\n ApDynComponentComponent\n} from '../../ap-dyncomponent/ap-dyncomponent.component';\nimport {\n ApDynGridColumnConfigBase\n} from '../../ap-dyngrids/config/ap-dyn-grid-column-config-base';\nimport {\n ApDynGridPagerConfigBase\n} from '../../ap-dyngrids/config/ap-dyn-grid-pager-config-base';\nimport {\n ApDynGridStatusColumnConfig\n} from '../../ap-dyngrids/config/ap-dyn-grid-status-column-config';\nimport {\n ApDynGridPropertyColumnConfig,\n FilterType\n} from '../../ap-dyngrids/config/ap-dyn-grid-property-column-config';\nimport {\n ApDynGridEditColumnConfig\n} from '../../ap-dyngrids/config/ap-dyn-grid-edit-column-config';\nimport {\n ApDynGridPagerConfig, IDynGridWizardChoiceData\n} from '../../ap-dyngrids/config/ap-dyn-grid-pager-config';\nimport {\n ApDynGridGroupColumnConfig\n} from '../../ap-dyngrids/config/ap-dyn-grid-group-column-config';\nimport {GetBooleanPipe, GetElementOxidCalculatePipe, GetRoundNumericPipe} from '../../ap-utils';\nimport {\n SettingsStore\n} from '../../stores/base-data/settings.store';\nimport {\n FertilizerOrganicStore\n} from '../../stores/base-data/fertilizer.organic.store';\nimport {filter, map} from 'rxjs/operators';\nimport {\n FormStore\n} from '../../stores/layout/form.store';\nimport {\n MapViewStore\n} from '../../stores/layout/mapview.store';\nimport {\n TranslationStore\n} from '../../stores/translation/translation.store';\nimport {\n GetPermissionPipe\n} from '../../ap-permission/pipes/get-permission.pipe';\nimport {\n APP_CONFIGURATION\n} from '../../ap-core/config';\nimport {\n GetElementService\n} from '../../ap-utils/service/ap-get-element.service';\nimport {ObjectFactory, SafeBehaviorSubject} from 'ts-tooling';\nimport {\n ApTranslationService\n} from '../../ap-utils/service/ap-translation.service';\nimport {\n ApUtilService\n} from '../../ap-utils/service/ap-util.service';\nimport {\n DropDownButtonData\n} from '../../ap-dyngrids/config/ap-dyn-grid-button-column-config';\nimport {\n ApElementType\n} from '../../ap-interface/enums/ap-elements-type.enum';\n\nimport IFertilizerOrganic = Data.BaseData.IFertilizerOrg;\nimport ISettings = Data.BaseData.ISettings;\n\nenum OrganicFertilizerGridActions {\n Active = 0,\n Inactive = 1\n}\n\ninterface IFertilizerOrganicGridData extends IGridData {\n Status: number;\n StatusClass: string;\n StatusDesc: string;\n CaOValue: any;\n KValue: any;\n MGValue: any;\n NValue: any;\n PValue: any;\n Efficiency: any;\n DMPercent: any;\n Liquid: any;\n Density: any;\n Unit: any;\n RealContentCaO: any;\n}\n\n@Component({\n selector: 'ap-fertilizer-organic-overview',\n template: `\n \n `\n})\n\nexport class ApFertilizerOrgsComponent implements OnInit, AfterContentInit, OnDestroy {\n @ViewChild(ApDynComponentComponent, {static: true}) dynComponent: ApDynComponentComponent;\n public columns: ApDynGridColumnConfigBase[] = [];\n public pager: ApDynGridPagerConfigBase;\n public fertilizerOrganicLoading$: SafeBehaviorSubject;\n public items$: Observable;\n\n private _subscriptions: Array = [];\n private _applyClicked = new EventEmitter();\n private _settings: ISettings;\n\n constructor(private store: FertilizerOrganicStore,\n private formStore: FormStore,\n private translationStore: TranslationStore,\n private mapViewStore: MapViewStore,\n private settingsStore: SettingsStore,\n private permissionPipe: GetPermissionPipe,\n private roundNumericPipe: GetRoundNumericPipe,\n private elementOxideCalculate: GetElementOxidCalculatePipe,\n private elementService: GetElementService,\n private translationService: ApTranslationService) {\n }\n\n ngOnInit(): void {\n this.mapViewStore.hideMapView();\n this.fertilizerOrganicLoading$ = this.store.Listen(s => s.loading);\n this.items$ = this.store.Listen(s => s.data).pipe(\n filter(d => !!d),\n map(pp => pp.Convert((organic: IFertilizerOrganic) => {\n const kValue = this._elementOxidCalculate(organic.ContentK, ApElementOxydTypeEnum.K);\n const mgValue = this._elementOxidCalculate(organic.ContentMg, ApElementOxydTypeEnum.Mg);\n const pValue = this._elementOxidCalculate(organic.ContentP, ApElementOxydTypeEnum.P);\n const isLiquid = organic.IsLiquid\n ? this.translationStore.FindTranslationForSelectedLanguage('Global__Aggregate_State_Liquid')\n : this.translationStore.FindTranslationForSelectedLanguage('Global__Aggregate_State_Solid');\n return {\n Id: organic.Id,\n SourceItem: organic,\n Status: organic.Selectable ? 1 : -1,\n StatusClass: organic.Selectable ? 'ap-status-green' : 'ap-status-red',\n StatusDesc: organic.Selectable ? 'Global__Active' : 'Global__Inactive',\n RealContentCaO: organic.RealContentCaO,\n CaOValue: organic.ContentCaO,\n KValue: kValue,\n MGValue: mgValue,\n PValue: pValue,\n NValue: organic.ContentN,\n SValue: organic.ContentS,\n Efficiency: organic.Efficiency,\n DMPercent: organic.DMPercent,\n Liquid: isLiquid,\n Density: organic.Density,\n Unit: this.translationStore.FindTranslationForSelectedLanguage(organic.Unit?.Key)\n };\n })));\n }\n\n ngAfterContentInit(): void {\n this._subscriptions.push(this._applyClicked.subscribe((e) => this._onApplyClicked(e)));\n this._getDataFromStore();\n this._gridBuilder();\n }\n\n ngOnDestroy(): void {\n this._subscriptions.forEach(d => d.unsubscribe());\n }\n\n public onEdit(dataItem: any): void {\n this.formStore.openForm({component: ApFertilizerOrgsEditComponent, data: dataItem.SourceItem});\n }\n\n private _getDataFromStore(): void {\n this._subscriptions.push(this.settingsStore.FirstSetting$.subscribe(s => this._settings = s));\n }\n\n private _gridBuilder(): void {\n this.permissionPipe.transform(ApPermissions.EDIT_FERTILIZER).subscribe(permission => {\n this.columns = [\n new ApDynGridStatusColumnConfig({\n field: 'Status',\n showHeaderTitle: true,\n class: 'StatusClass',\n description: 'StatusDesc',\n filterable: true,\n groupIndex: 0,\n groupDesc: true\n }),\n new ApDynGridPropertyColumnConfig({\n field: 'SourceItem.Prodname',\n title: 'Global__Name',\n filterable: true,\n width: 100,\n headerFilterable: true,\n hide: true\n }),\n new ApDynGridGroupColumnConfig({\n headerStyle: {\n 'text-align': 'center'\n },\n style: {border: '1px solid #2c3237'},\n title: 'Global__Content_Kg_T_Or_Kg_M3',\n groupColumns: [\n new ApDynGridPropertyColumnConfig({\n field: 'PValue',\n title: this.elementService.GetElementStringByString(ApElementType.P),\n width: 60,\n cssClass: 'right',\n filterType: FilterType.NUMBER,\n pipes: [{\n pipe: this.roundNumericPipe,\n args: [APP_CONFIGURATION.SpecialDecimalPlaces.OrgFertContent]\n }]\n }),\n new ApDynGridPropertyColumnConfig({\n field: 'KValue',\n cssClass: 'right',\n title: this.elementService.GetElementStringByString(ApElementType.K),\n filterType: FilterType.NUMBER,\n width: 60,\n pipes: [{\n pipe: this.roundNumericPipe,\n args: [APP_CONFIGURATION.SpecialDecimalPlaces.OrgFertContent]\n }]\n }),\n new ApDynGridPropertyColumnConfig({\n field: 'MGValue',\n title: this.elementService.GetElementStringByString(ApElementType.Mg),\n cssClass: 'right',\n filterType: FilterType.NUMBER,\n width: 60,\n pipes: [{\n pipe: this.roundNumericPipe,\n args: [APP_CONFIGURATION.SpecialDecimalPlaces.OrgFertContent]\n }]\n }),\n new ApDynGridPropertyColumnConfig({\n field: 'CaOValue',\n title: 'Global__NutrientCaO',\n cssClass: 'right',\n filterType: FilterType.NUMBER,\n width: 60,\n pipes: [{\n pipe: this.roundNumericPipe,\n args: [APP_CONFIGURATION.SpecialDecimalPlaces.OrgFertContent]\n }]\n }),\n new ApDynGridPropertyColumnConfig({\n field: 'NValue',\n title: 'Global__NutrientN',\n cssClass: 'right',\n filterType: FilterType.NUMBER,\n width: 60,\n pipes: [{\n pipe: this.roundNumericPipe,\n args: [APP_CONFIGURATION.SpecialDecimalPlaces.OrgFertContent]\n }]\n }),\n new ApDynGridPropertyColumnConfig({\n field: 'SValue',\n title: 'Global__NutrientS',\n cssClass: 'right',\n filterType: FilterType.NUMBER,\n width: 60,\n pipes: [{\n pipe: this.roundNumericPipe,\n args: [APP_CONFIGURATION.SpecialDecimalPlaces.OrgFertContent]\n }]\n })\n ]\n }),\n new ApDynGridPropertyColumnConfig({\n field: 'Unit',\n title: 'Settings__Lbl_Menu_Unit',\n filterable: true,\n width: 40,\n headerFilterable: true,\n hide: true,\n }),\n new ApDynGridPropertyColumnConfig({\n field: 'Efficiency',\n title: this._getLabelWithUnit('Settings__Lbl_NEffectiveness', '%'),\n filterable: true,\n width: 60,\n cssClass: 'right', filterType: FilterType.NUMBER,\n headerFilterable: true,\n hide: true,\n pipes: [\n {\n pipe: this.roundNumericPipe,\n args: [APP_CONFIGURATION.SpecialDecimalPlaces.OrgFertNEff]\n }\n ]\n }),\n new ApDynGridPropertyColumnConfig({\n field: 'DMPercent',\n title: this._getLabelWithUnit('Global__Drymatter', '%'),\n filterable: true,\n width: 60,\n cssClass: 'right', filterType: FilterType.NUMBER,\n headerFilterable: true,\n hide: true,\n pipes: [\n {\n pipe: this.roundNumericPipe,\n args: [APP_CONFIGURATION.SpecialDecimalPlaces.OrgFertDryMatter]\n }\n ]\n }),\n new ApDynGridPropertyColumnConfig({\n field: 'Liquid',\n title: 'Global__Aggregate',\n filterable: true,\n width: 60,\n headerFilterable: true,\n hide: true\n }),\n new ApDynGridPropertyColumnConfig({\n field: 'SourceItem.Note',\n title: 'Global__Note',\n filterable: true,\n width: 180,\n headerFilterable: true,\n hide: true\n }),\n new ApDynGridEditColumnConfig(\n {\n data: this._getEditButtons(permission)\n }\n )\n ];\n this.pager = new ApDynGridPagerConfig({\n listMassEditing: [\n {\n id: OrganicFertilizerGridActions.Active,\n name: this.translationStore.FindTranslationForSelectedLanguage('Global__Enable'),\n type: ApGridPagerType.None,\n values: null\n } as IDynGridWizardChoiceData,\n {\n id: OrganicFertilizerGridActions.Inactive,\n name: this.translationStore.FindTranslationForSelectedLanguage('Global__Disable'),\n type: ApGridPagerType.None,\n values: null\n } as IDynGridWizardChoiceData,\n ],\n apply: this._applyClicked,\n hasPermission: permission,\n });\n });\n }\n\n private _onApplyClicked(data: IGridPagerData): void {\n const rows = this.dynComponent.getSelectedItems();\n rows.forEach(row => {\n const item = ObjectFactory.Copy(row['SourceItem'] as IFertilizerOrganic);\n if (item) {\n item.Selectable = data.object.id === OrganicFertilizerGridActions.Active;\n this.store.updateSelectableFertilizer(item);\n }\n });\n }\n\n private _elementOxidCalculate(value: number, unit: ApElementOxydTypeEnum): number {\n return this.elementOxideCalculate.transform(\n value, unit, this._settings.UnitElementOxyd\n );\n }\n\n private _getLabelWithUnit(text: string, unit: string): string {\n return this.translationService.translate(text) + ' [' + unit + ']';\n }\n\n private _getEditButtons(permission: boolean): DropDownButtonData[] {\n const result: DropDownButtonData[] = [];\n if (permission) {\n result.push({\n text: 'Global__Edit',\n disabled: (dataItem) => !(dataItem?.SourceItem.FarmId > 0),\n callback: ApUtilService.createEventEmitter(this.onEdit.bind(this), this._subscriptions)\n });\n }\n result.push({\n callback: ApUtilService.createEventEmitter(this._onSelectedToggle.bind(this), this._subscriptions),\n text: (dataItem) => dataItem.SourceItem.Selectable ? 'Global__Disable' : 'Global__Enable'\n });\n\n return result;\n }\n\n private _onSelectedToggle(dataItem: any): void {\n const fertilizerOrganic = ObjectFactory.Copy(\n this.store.Listen(s => s.data).getValue().Find((d) => !!dataItem && d?.Id === dataItem?.Id)\n );\n fertilizerOrganic.Selectable = !fertilizerOrganic.Selectable;\n this.store.updateSelectableFertilizer(fertilizerOrganic);\n }\n}\n","import {AfterContentInit, Component, EventEmitter, OnDestroy, OnInit, ViewChild} from '@angular/core';\nimport {Observable, Subscription} from 'rxjs';\nimport {ApElementOxydTypeEnum, ApGridPagerType, IGridData, IGridPagerData} from '../../ap-interface';\nimport {ApPermissions} from 'invoker-transport';\nimport {\n ApFertilizerInorgsEditComponent\n} from '../../entry-components/ap-basedata-entry-components/ap-fertilizer-inorgs-edit.component';\nimport {\n ApDynComponentComponent\n} from '../../ap-dyncomponent/ap-dyncomponent.component';\nimport {\n ApDynGridColumnConfigBase\n} from '../../ap-dyngrids/config/ap-dyn-grid-column-config-base';\nimport {\n ApDynGridPagerConfigBase\n} from '../../ap-dyngrids/config/ap-dyn-grid-pager-config-base';\nimport {GetElementOxidCalculatePipe, GetRoundNumericPipe} from '../../ap-utils';\nimport {\n ApDynGridStatusColumnConfig\n} from '../../ap-dyngrids/config/ap-dyn-grid-status-column-config';\nimport {\n ApDynGridPropertyColumnConfig,\n FilterType\n} from '../../ap-dyngrids/config/ap-dyn-grid-property-column-config';\nimport {\n ApDynGridGroupColumnConfig\n} from '../../ap-dyngrids/config/ap-dyn-grid-group-column-config';\nimport {\n ApDynGridEditColumnConfig\n} from '../../ap-dyngrids/config/ap-dyn-grid-edit-column-config';\nimport {\n ApDynGridPagerConfig, IDynGridWizardChoiceData\n} from '../../ap-dyngrids/config/ap-dyn-grid-pager-config';\nimport {\n SettingsStore\n} from '../../stores/base-data/settings.store';\nimport {\n FertilizerInorganicStore\n} from '../../stores/base-data/fertilizer.inorganic.store';\nimport {filter, map} from 'rxjs/operators';\nimport {\n FormStore\n} from '../../stores/layout/form.store';\nimport {\n MapViewStore\n} from '../../stores/layout/mapview.store';\nimport {\n TranslationStore\n} from '../../stores/translation/translation.store';\nimport {\n GetPermissionPipe\n} from '../../ap-permission/pipes/get-permission.pipe';\nimport {ObjectFactory, SafeBehaviorSubject} from 'ts-tooling';\nimport {\n APP_CONFIGURATION\n} from '../../ap-core/config';\nimport {\n GetElementService\n} from '../../ap-utils/service/ap-get-element.service';\nimport {\n ApTranslationService\n} from '../../ap-utils/service/ap-translation.service';\nimport {\n ApUtilService\n} from '../../ap-utils/service/ap-util.service';\nimport {\n DropDownButtonData\n} from '../../ap-dyngrids/config/ap-dyn-grid-button-column-config';\nimport {\n ApElementType\n} from '../../ap-interface/enums/ap-elements-type.enum';\nimport IFertilizerInorganic = Data.BaseData.IFertilizerInorg;\nimport ISettings = Data.BaseData.ISettings;\n\nenum InorganicFertilizerActions {\n Active = 0,\n Inactive = 1,\n}\n\ninterface IFertilizerInorganicGridData extends IGridData {\n Status: number;\n StatusClass: string;\n StatusDesc: string;\n CaOValue: any;\n KValue: any;\n MGValue: any;\n NValue: any;\n PValue: any;\n SValue: any;\n Efficiency: any;\n EquivCaO: any;\n Liquid: any;\n Density: any;\n Unit: any;\n RealContentCaO: any;\n}\n\n/**\n * Fertilizer inorganic overview component.\n * Shows a list of all Fertilizer inorganic.\n */\n@Component({\n selector: 'ap-fertilizer-inorganic-overview',\n template: `\n \n `\n})\n\nexport class ApFertilizerInorgsComponent implements OnInit, AfterContentInit, OnDestroy {\n @ViewChild(ApDynComponentComponent, {static: true}) dynComponent: ApDynComponentComponent;\n public columns: ApDynGridColumnConfigBase[] = [];\n public pager: ApDynGridPagerConfigBase;\n public fertilizerInorganicLoading$: SafeBehaviorSubject = new SafeBehaviorSubject(false);\n public items$: Observable;\n\n private _subscriptions: Array = [];\n private _applyClicked = new EventEmitter();\n private _settings: ISettings;\n\n constructor(private store: FertilizerInorganicStore,\n private formStore: FormStore,\n private translationStore: TranslationStore,\n private mapViewStore: MapViewStore,\n private settingsStore: SettingsStore,\n private permissionPipe: GetPermissionPipe,\n private roundNumericPipe: GetRoundNumericPipe,\n private elementOxideCalculate: GetElementOxidCalculatePipe,\n private elementService: GetElementService,\n private translationService: ApTranslationService) {\n }\n\n public ngOnInit(): void {\n this.fertilizerInorganicLoading$ = this.store.Listen(s => s.loading);\n this.mapViewStore.hideMapView();\n this.items$ = this.store.Listen(s => s.data).pipe(\n filter(d => !!d),\n map(pp => pp.Convert((inorganic: IFertilizerInorganic) => {\n const kValue = this._elementOxidCalculate(inorganic.ContentK, ApElementOxydTypeEnum.K);\n const mgValue = this._elementOxidCalculate(inorganic.ContentMg, ApElementOxydTypeEnum.Mg);\n const pValue = this._elementOxidCalculate(inorganic.ContentP, ApElementOxydTypeEnum.P);\n const isLiquid = inorganic.IsLiquid\n ? this.translationStore.FindTranslationForSelectedLanguage('Global__Aggregate_State_Liquid')\n : this.translationStore.FindTranslationForSelectedLanguage('Global__Aggregate_State_Solid');\n return {\n Id: inorganic.Id,\n SourceItem: inorganic,\n Status: inorganic.Selectable ? 1 : -1,\n StatusClass: inorganic.Selectable ? 'ap-status-green' : 'ap-status-red',\n StatusDesc: inorganic.Selectable ? 'Global__Active' : 'Global__Inactive',\n RealContentCaO: inorganic.RealContentCaO,\n CaOValue: inorganic.ContentCaO,\n KValue: kValue,\n MGValue: mgValue,\n NValue: inorganic.ContentN,\n PValue: pValue,\n SValue: inorganic.ContentS,\n Efficiency: inorganic.Efficiency,\n EquivCaO: inorganic.EquivCaO,\n Liquid: isLiquid,\n Density: inorganic.Density,\n Unit: this.translationStore.FindTranslationForSelectedLanguage(inorganic.Unit?.Key)\n };\n })));\n }\n\n public ngAfterContentInit(): void {\n this._subscriptions.push(this._applyClicked.subscribe((e) => this._onApplyClicked(e)));\n this._getDataFromStore();\n this._gridBuilder();\n }\n\n public ngOnDestroy(): void {\n this._subscriptions.forEach(d => d.unsubscribe());\n }\n\n public onEdit(dataItem: any): void {\n this.formStore.openForm({component: ApFertilizerInorgsEditComponent, data: dataItem.SourceItem});\n }\n\n private _getDataFromStore(): void {\n this._subscriptions.push(this.settingsStore.FirstSetting$.subscribe(s => this._settings = s));\n }\n\n private _gridBuilder(): void {\n this.permissionPipe.transform(ApPermissions.EDIT_FERTILIZER).subscribe(permission => {\n this.columns = [\n new ApDynGridStatusColumnConfig({\n field: 'Status',\n showHeaderTitle: true,\n class: 'StatusClass',\n description: 'StatusDesc',\n filterable: true,\n groupIndex: 0,\n groupDesc: true\n }),\n new ApDynGridPropertyColumnConfig({\n field: 'SourceItem.Prodname',\n title: 'Global__Name',\n filterable: true,\n width: 100,\n headerFilterable: true,\n hide: true\n }),\n new ApDynGridGroupColumnConfig({\n headerStyle: {\n 'text-align': 'center'\n },\n style: {border: '1px solid #2c3237'},\n title: this.getLabelWithUnit('Global__Content', '%'),\n groupColumns: [\n new ApDynGridPropertyColumnConfig({\n field: 'PValue',\n cssClass: 'right', filterType: FilterType.NUMBER,\n title: this.elementService.GetElementStringByString(ApElementType.P),\n width: 60,\n pipes: [\n {\n pipe: this.roundNumericPipe,\n args: [APP_CONFIGURATION.SpecialDecimalPlaces.InorgFertContent]\n }\n ]\n }),\n new ApDynGridPropertyColumnConfig({\n field: 'KValue',\n cssClass: 'right', filterType: FilterType.NUMBER,\n title: this.elementService.GetElementStringByString(ApElementType.K),\n width: 60,\n pipes: [\n {\n pipe: this.roundNumericPipe,\n args: [APP_CONFIGURATION.SpecialDecimalPlaces.InorgFertContent]\n }\n ]\n }),\n new ApDynGridPropertyColumnConfig({\n field: 'MGValue',\n cssClass: 'right', filterType: FilterType.NUMBER,\n title: this.elementService.GetElementStringByString(ApElementType.Mg),\n width: 60,\n pipes: [\n {\n pipe: this.roundNumericPipe,\n args: [APP_CONFIGURATION.SpecialDecimalPlaces.InorgFertContent]\n }\n ]\n }),\n new ApDynGridPropertyColumnConfig({\n field: 'CaOValue',\n cssClass: 'right', filterType: FilterType.NUMBER,\n title: 'Global__NutrientCaO',\n width: 60,\n pipes: [\n {\n pipe: this.roundNumericPipe,\n args: [APP_CONFIGURATION.SpecialDecimalPlaces.InorgFertContent]\n }\n ]\n }),\n new ApDynGridPropertyColumnConfig({\n field: 'NValue',\n cssClass: 'right', filterType: FilterType.NUMBER,\n title: 'Global__NutrientN',\n width: 60,\n pipes: [\n {\n pipe: this.roundNumericPipe,\n args: [APP_CONFIGURATION.SpecialDecimalPlaces.InorgFertContent]\n }\n ]\n }),\n new ApDynGridPropertyColumnConfig({\n field: 'SValue',\n cssClass: 'right', filterType: FilterType.NUMBER,\n title: 'Global__NutrientS',\n width: 60,\n pipes: [\n {\n pipe: this.roundNumericPipe,\n args: [APP_CONFIGURATION.SpecialDecimalPlaces.InorgFertContent]\n }\n ]\n }),\n ]\n }),\n new ApDynGridPropertyColumnConfig({\n field: 'Unit',\n title: 'Settings__Lbl_Menu_Unit',\n filterable: true,\n width: 40,\n headerFilterable: true,\n hide: true,\n }),\n new ApDynGridPropertyColumnConfig({\n field: 'Efficiency',\n title: 'Settings__Lbl_NEffectiveness',\n cssClass: 'right', filterType: FilterType.NUMBER,\n filterable: true,\n width: 60,\n headerFilterable: true,\n hide: true,\n pipes: [\n {\n pipe: this.roundNumericPipe,\n args: [this._settings.DigitsAfterDecimalPoint]\n }\n ]\n }),\n new ApDynGridPropertyColumnConfig({\n field: 'EquivCaO',\n title: 'Nutrients_Pages__PartOfCaO',\n cssClass: 'right', filterType: FilterType.NUMBER,\n filterable: true,\n width: 60,\n headerFilterable: true,\n hide: true,\n pipes: [\n {\n pipe: this.roundNumericPipe,\n args: [APP_CONFIGURATION.SpecialDecimalPlaces.InorgFertCaO]\n }\n ]\n }),\n new ApDynGridPropertyColumnConfig({\n field: 'Liquid',\n title: 'Global__Aggregate',\n filterable: true,\n width: 60,\n headerFilterable: true,\n hide: true\n }),\n new ApDynGridPropertyColumnConfig({\n field: 'Density',\n title: 'Global__Density',\n cssClass: 'right', filterType: FilterType.NUMBER,\n filterable: true,\n width: 60,\n headerFilterable: true,\n hide: true,\n pipes: [\n {\n pipe: this.roundNumericPipe,\n args: [APP_CONFIGURATION.SpecialDecimalPlaces.InorgFertDensity]\n }\n ]\n }),\n new ApDynGridPropertyColumnConfig({\n field: 'SourceItem.Note',\n title: 'Global__Note',\n filterable: true,\n width: 180,\n headerFilterable: true,\n hide: true\n }),\n new ApDynGridEditColumnConfig(\n {\n data: this._getEditButtons(permission)\n }\n )\n ];\n this.pager = new ApDynGridPagerConfig({\n listMassEditing: [\n {\n id: InorganicFertilizerActions.Active,\n name: this.translationStore.FindTranslationForSelectedLanguage('Global__Enable'),\n type: ApGridPagerType.None,\n values: null\n } as IDynGridWizardChoiceData,\n {\n id: InorganicFertilizerActions.Inactive,\n name: this.translationStore.FindTranslationForSelectedLanguage('Global__Disable'),\n type: ApGridPagerType.None,\n values: null\n } as IDynGridWizardChoiceData,\n ],\n apply: this._applyClicked,\n hasPermission: permission,\n preselect: true\n });\n });\n }\n\n private _onApplyClicked(data: IGridPagerData): void {\n const rows = this.dynComponent.getSelectedItems();\n rows.forEach(row => {\n const item = ObjectFactory.Copy(row['SourceItem'] as IFertilizerInorganic);\n if (item) {\n item.Selectable = data.object.id === InorganicFertilizerActions.Active;\n this.store.updateSelectableFertilizer(item);\n }\n });\n }\n\n private _elementOxidCalculate(value: number, unit: ApElementOxydTypeEnum): number {\n return this.elementOxideCalculate.transform(\n value, unit, this._settings.UnitElementOxyd\n );\n }\n\n private getLabelWithUnit(text: string, unit: string): string {\n return this.translationService.translate(text) + ' [' + unit + ']';\n }\n\n private _getEditButtons(permission: boolean): DropDownButtonData[] {\n const result: DropDownButtonData[] = [];\n if (permission) {\n result.push({\n text: 'Global__Edit',\n disabled: (dataItem) => !(dataItem?.SourceItem.FarmId > 0),\n callback: ApUtilService.createEventEmitter(this.onEdit.bind(this), this._subscriptions)\n });\n }\n result.push({\n callback: ApUtilService.createEventEmitter(this._onSelectedToggle.bind(this), this._subscriptions),\n text: (dataItem) => dataItem.SourceItem.Selectable ? 'Global__Disable' : 'Global__Enable'\n });\n\n return result;\n }\n\n private _onSelectedToggle(dataItem: any): void {\n const fertilizerInorganic = ObjectFactory.Copy(\n this.store.Listen(s => s.data).getValue().Find((d) => !!dataItem && d?.Id === dataItem?.Id)\n );\n fertilizerInorganic.Selectable = !fertilizerInorganic.Selectable;\n this.store.updateSelectableFertilizer(fertilizerInorganic);\n }\n}\n","\n \n\n
\n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n
\n","import {Component, ViewChild} from '@angular/core';\nimport {ApFertilizerOrgsComponent} from './ap-fertilizer-orgs.component';\nimport {ApFertilizerInorgsComponent} from './ap-fertilizer-inorgs.component';\nimport {IApPermissionData} from '../../ap-interface';\nimport {ApPermissions} from 'invoker-transport';\nimport {\n ApFertilizerInorgsEditComponent\n} from '../../entry-components/ap-basedata-entry-components/ap-fertilizer-inorgs-edit.component';\nimport {\n ApFertilizerOrgsEditComponent\n} from '../../entry-components/ap-basedata-entry-components/ap-fertilizer-orgs-edit.component';\nimport {FormStore} from '../../stores/layout/form.store';\nimport {MapViewStore} from '../../stores/layout/mapview.store';\n\n/**\n * Enumeration of all fertilizer tabs\n */\nexport enum FertilizerTabs {\n FertilizerOrg = 0,\n FertilizerInorg = 1\n}\n\n/**\n * Component for the fertilizers\n */\n@Component({\n selector: 'ap-fertilizers-overview',\n templateUrl: 'ap-fertilizers.component.html',\n})\n\nexport class ApFertilizersOverviewComponent {\n public apPermissionData: IApPermissionData;\n public ApPermissions = ApPermissions;\n public selectedTab: FertilizerTabs = FertilizerTabs.FertilizerOrg;\n\n @ViewChild(ApFertilizerOrgsComponent, {static: false})\n public fertilizerOrgsOverviewComponent: ApFertilizerOrgsComponent;\n\n @ViewChild(ApFertilizerInorgsComponent, {static: false})\n public fertilizerInOrgsOverviewComponent: ApFertilizerInorgsComponent;\n\n constructor(private formStore: FormStore,\n private mapViewStore: MapViewStore) {\n this.mapViewStore.hideMapView();\n }\n\n public searchIn(value: string): void {\n switch (this.selectedTab) {\n case FertilizerTabs.FertilizerOrg:\n this.fertilizerOrgsOverviewComponent.dynComponent?.dynGrid?.filterGrid(value);\n break;\n case FertilizerTabs.FertilizerInorg:\n this.fertilizerInOrgsOverviewComponent.dynComponent?.dynGrid?.filterGrid(value);\n break;\n }\n }\n\n public createNew(): void {\n let fertilizerComponent: any;\n switch (this.selectedTab) {\n case FertilizerTabs.FertilizerOrg:\n fertilizerComponent = ApFertilizerOrgsEditComponent;\n break;\n case FertilizerTabs.FertilizerInorg:\n fertilizerComponent = ApFertilizerInorgsEditComponent;\n break;\n }\n this.formStore.openForm({component: fertilizerComponent, data: null});\n }\n\n public selectTab(e: any): void {\n switch (this.selectedTab) {\n case FertilizerTabs.FertilizerOrg:\n this.fertilizerOrgsOverviewComponent.dynComponent?.dynGrid.filterGrid('');\n break;\n case FertilizerTabs.FertilizerInorg:\n this.fertilizerInOrgsOverviewComponent.dynComponent?.dynGrid.filterGrid('');\n break;\n }\n this.selectedTab = e.index;\n }\n}\n","import {ApDynformsConfigFieldset} from '../../../../ap-dynforms/config/ap-dynforms-config-fieldset';\nimport {ApDynformsConfigTextbox} from '../../../../ap-dynforms/config/ap-dynforms-config-textbox';\nimport {nameOf} from '../../../../ap-core/utils/ap-name-of';\nimport {\n IPpProductAvailableCrops,\n IPpProductSelectedDetails,\n IPpProductWizardDetailsData,\n IPpProductWizardDetailsResponsiveData\n} from '../pp-product-wizard.types';\nimport {ApDynformsConfigComboBox} from '../../../../ap-dynforms/config/ap-dynforms-config-combobox';\nimport {ApDynformsValidator} from '../../../../ap-dynforms/ap-dynforms-validator';\nimport {Validators} from '@angular/forms';\nimport {ApDynformsConfigDatepicker} from '../../../../ap-dynforms/config/ap-dynforms-config-datepicker';\nimport {ApDynformsConfigPlaceholder} from '../../../../ap-dynforms/config/ap-dynforms-config-placeholder';\nimport {ApDynformsConfigCheckbox} from '../../../../ap-dynforms/config/ap-dynforms-config-checkbox';\nimport {LoginStore} from '../../../../stores/login/login.store';\nimport {WorkTypesStore} from '../../../../stores/base-data/worrktypes.store';\nimport {ApDynformsConfigButton} from '../../../../ap-dynforms/config/ap-dynforms-config-button';\nimport {EventEmitter, TemplateRef} from '@angular/core';\nimport {ApDynformsConfigTemplate} from '../../../../ap-dynforms/config/ap-dynforms-config-template';\nimport {ApDynformsConfigNumerictextbox} from '../../../../ap-dynforms/config/ap-dynforms-config-numerictextbox';\nimport {map} from 'rxjs/operators';\nimport {EffectiveRangesStore} from '../../../../stores/common/effective_ranges.store';\nimport {ApDynGridPropertyColumnConfig} from '../../../../ap-dyngrids/config/ap-dyn-grid-property-column-config';\nimport {ApDynGridButtonColumnConfig} from '../../../../ap-dyngrids/config/ap-dyn-grid-button-column-config';\nimport {GetRoundNumericPipe} from '../../../../ap-utils';\nimport {SettingsStore} from '../../../../stores/base-data/settings.store';\nimport {ApDynGridColumnConfigBase} from '../../../../ap-dyngrids/config/ap-dyn-grid-column-config-base';\nimport {ApTranslationService} from '../../../../ap-utils/service/ap-translation.service';\nimport {ApDynformsConfigMultiSelect} from '../../../../ap-dynforms/config/ap-dynforms-config-multiselect';\nimport {ApRoleTypeService} from '../../../../services/common/ap-role-type.service';\nimport ICountry = Data.Common.ICountry;\nimport IWorktypes = Data.BaseData.IWorktypes;\nimport IUnit = Data.Common.IUnit;\n\n/**\n * PP-product wizard details-tab ui logic provider\n */\nexport class PpProductWizardDetailsUiProvider {\n\n /**\n * Method to retrieve fieldSets for the product details tab\n */\n public static CreateFieldset(responsiveData: IPpProductWizardDetailsResponsiveData,\n addDetailsCallback: EventEmitter,\n translationService: ApTranslationService,\n loginStore: LoginStore,\n workTypesStore: WorkTypesStore,\n effectiveRangesStore: EffectiveRangesStore,\n settingsStore: SettingsStore,\n ppProductSelectedDetailsTemplate: TemplateRef,\n ppProductAvailableCropsTemplate: TemplateRef): ApDynformsConfigFieldset[] {\n const result: ApDynformsConfigFieldset[] = [];\n const countrySelection = ApRoleTypeService.hasAgriconRole(loginStore.User) ? [\n new ApDynformsConfigComboBox({\n key: nameOf('Country'),\n label: 'Global__Country',\n options: this.GetAvailableCountries(loginStore),\n disabled$: responsiveData.CountryDisabled$,\n valueField: nameOf('Id'),\n textField: nameOf('Id'),\n validators: [\n new ApDynformsValidator({validator: Validators.required, errorKey: 'Settings__Msg_Vali_Value_Required'})\n ]\n }),\n new ApDynformsConfigPlaceholder(),\n new ApDynformsConfigCheckbox({\n label: 'Country_wide_available',\n key: nameOf('IsCountryWide')\n })\n ] : [];\n\n\n result.Add(new ApDynformsConfigFieldset({\n key: 'General',\n legend: 'Global__General_Information',\n config: [\n new ApDynformsConfigTextbox({\n key: nameOf('ProductName'), // 'Count_Fields',\n label: 'Global__Product',\n validators: [\n new ApDynformsValidator({validator: Validators.required, errorKey: 'Settings__Msg_Vali_Value_Required'})\n ]\n }),\n new ApDynformsConfigTextbox({\n key: nameOf('Note'),\n label: 'Global__Note',\n }),\n new ApDynformsConfigDatepicker({\n key: nameOf('PermissionStart'),\n label: 'Docu_Ini__StartDate',\n formErrors: ['AgriConnect_Error_MinMax'],\n validators: [\n new ApDynformsValidator({validator: Validators.required, errorKey: 'Settings__Msg_Vali_Value_Required'})\n ]\n }),\n new ApDynformsConfigDatepicker({\n key: nameOf('PermissionEnd'),\n label: 'Docu_Ini__EndDate',\n minDate: responsiveData.MinPermissionEnd$,\n formErrors: ['AgriConnect_Error_MinMax'],\n validators: [\n new ApDynformsValidator({validator: Validators.required, errorKey: 'Settings__Msg_Vali_Value_Required'})\n ]\n }),\n new ApDynformsConfigDatepicker({\n key: nameOf('UseByDate'),\n label: 'Global__Expire_Date',\n minDate: responsiveData.MinUseByDate$,\n formErrors: ['AgriConnect_Error_MinMax'],\n validators: [\n new ApDynformsValidator({validator: Validators.required, errorKey: 'Settings__Msg_Vali_Value_Required'})\n ]\n }),\n ...countrySelection\n ]\n }));\n\n result.Add(new ApDynformsConfigFieldset({\n key: 'Agronomy',\n legend: 'Global__Agronomy',\n config: [\n new ApDynformsConfigComboBox({\n key: nameOf('WorkType'),\n label: 'Docu_Ini__WorkType',\n options: workTypesStore.getWorkTypes()?.FindAll(w => w?.Category_Text === 'Worktype_Category_PlantProtection'),\n sort: 1,\n valueField: nameOf('Id'),\n textField: nameOf('Description'),\n translate: true,\n validators: [\n new ApDynformsValidator({validator: Validators.required, errorKey: 'Settings__Msg_Vali_Value_Required'})\n ]\n }),\n new ApDynformsConfigComboBox({\n key: nameOf('Unit'),\n label: 'Settings__Lbl_Menu_Unit',\n options: responsiveData.AvailableUnits$,\n sort: 1,\n valueField: nameOf('Id'),\n textField: nameOf('Key'),\n translate: true,\n validators: [\n new ApDynformsValidator({validator: Validators.required, errorKey: 'Settings__Msg_Vali_Value_Required'})\n ]\n }),\n ]}\n ));\n\n result.Add(new ApDynformsConfigFieldset({\n key: 'Agronomy2',\n legend: 'Agronomy2',\n hideLegend: true,\n classList: 'ap-field-set-no-legend-line',\n columns: 1,\n useMaxWidth: true,\n config: [\n new ApDynformsConfigTemplate({\n key: 'AvailableCrops',\n value: ppProductAvailableCropsTemplate\n })\n ]}\n ));\n\n result.Add(new ApDynformsConfigFieldset({\n key: 'Agronomy3',\n legend: 'Agronomy3',\n hideLegend: true,\n classList: 'ap-field-set-no-legend-line',\n config: [\n new ApDynformsConfigNumerictextbox({\n key: nameOf('GrowStageMin'),\n label: `Global__EC_Min`,\n min: 0,\n max: responsiveData.PreselectedGrowStageMax$,\n decimals: 0,\n format: 'n0',\n validators: [\n new ApDynformsValidator({validator: Validators.required, errorKey: 'Settings__Msg_Vali_Value_Required'})\n ]\n }),\n new ApDynformsConfigNumerictextbox({\n key: nameOf('GrowStageMax'),\n label: `Global__EC_Max`,\n min: responsiveData.PreselectedGrowStageMin$,\n max: 99,\n decimals: 0,\n format: 'n0',\n validators: [\n new ApDynformsValidator({validator: Validators.required, errorKey: 'Settings__Msg_Vali_Value_Required'})\n ]\n }),\n new ApDynformsConfigNumerictextbox({\n key: nameOf('MaxRate'),\n label$: responsiveData.PreselectedUnit$.pipe(map(d => {\n const baseHeader = translationService.translate('MaxRateAtMaxWater');\n if (d?.length > 0) {\n return `${baseHeader} [${d}]`;\n }\n return baseHeader;\n })),\n min: 0,\n max: 9999,\n decimals: settingsStore.FirstSetting?.DigitsAfterDecimalPoint,\n validators: [\n new ApDynformsValidator({validator: Validators.required, errorKey: 'Settings__Msg_Vali_Value_Required'})\n ]\n }),\n new ApDynformsConfigMultiSelect({\n key: nameOf('EffectiveRanges'),\n label: 'Effective_Range',\n options: effectiveRangesStore.Listen(s => s.data).getValue(),\n sort: 1,\n valueField: nameOf('Id'),\n textField: nameOf('Key'),\n translate: true,\n validators: [\n new ApDynformsValidator({validator: Validators.required, errorKey: 'Settings__Msg_Vali_Value_Required'})\n ]\n }),\n new ApDynformsConfigTextbox({\n key: nameOf('Indicator'),\n label: 'Base_Pages_Rax__IndicationNote'\n })\n ]}\n ));\n\n result.Add(new ApDynformsConfigFieldset({\n key: 'AddProductDetails',\n legend: 'AddProductDetails',\n hideLegend: true,\n classList: 'ap-field-set-no-legend-line',\n columns: 3,\n config: [\n new ApDynformsConfigPlaceholder(),\n new ApDynformsConfigButton({\n key: 'addProductDetailsButtonKey',\n value: 'Global__TakeOver',\n callback: addDetailsCallback,\n disabledButton$: responsiveData?.AddDetailsButtonDisabled$\n }),\n new ApDynformsConfigPlaceholder()\n ]\n }));\n\n result.Add(new ApDynformsConfigFieldset({\n key: 'Result',\n legend: 'Global__Result',\n columns: 1,\n useMaxWidth: true,\n config: [\n new ApDynformsConfigTemplate({\n key: 'SelectedDetails',\n value: ppProductSelectedDetailsTemplate\n })\n ]\n }));\n\n return result;\n }\n\n /**\n * Method returns all available countries for the current user.\n * Only countries of available farms (permitted by consultants filter)\n */\n private static GetAvailableCountries(loginStore: LoginStore): ICountry[]{\n const availableCountries: ICountry[] = [];\n for (const country of loginStore.Farms$?.value.map(f => f.Country)) {\n if (!availableCountries.Any(c => c?.Id === country?.Id)) {\n availableCountries.push(country);\n }\n }\n return availableCountries;\n }\n\n /**\n * Method to retrieve columns for the crop-selection grid (embedded in a template)\n */\n public static GetAvailableCropsColumns(): ApDynGridColumnConfigBase[] {\n return [\n new ApDynGridPropertyColumnConfig({\n title: 'Global__Crop',\n field: nameOf('CropTypeName')\n })\n ];\n }\n\n /**\n * Method to retrieve columns for the product details grid (embedded in a template)\n */\n public static GetProductDetailsColumns(roundNumericPipe: GetRoundNumericPipe, settingsStore: SettingsStore,\n deleteProductDetailsCallback: EventEmitter, unit: string): ApDynGridColumnConfigBase[] {\n return [\n new ApDynGridPropertyColumnConfig({\n title: 'Global__Crop',\n field: nameOf('CropTypeNames'),\n width: 350\n }),\n new ApDynGridPropertyColumnConfig({\n title: 'Global__EC_Min',\n field: nameOf('GrowStageMin'),\n cssClass: 'right',\n width: 50\n }),\n new ApDynGridPropertyColumnConfig({\n title: 'Global__EC_Max',\n field: nameOf('GrowStageMax'),\n cssClass: 'right',\n width: 50\n }),\n new ApDynGridPropertyColumnConfig({\n title: 'MaxRateShort',\n field: nameOf('MaxRate'),\n unit,\n width: 100,\n cssClass: 'right',\n pipes: [{\n pipe: roundNumericPipe,\n args: [settingsStore.FirstSetting?.DigitsAfterDecimalPoint]\n }]\n }),\n new ApDynGridPropertyColumnConfig({\n title: 'Effective_Range',\n field: nameOf('EffectiveRanges'),\n width: 100\n }),\n new ApDynGridPropertyColumnConfig({\n title: 'Base_Pages_Rax__IndicationNote',\n field: nameOf('Indicator'),\n width: 150\n }),\n new ApDynGridButtonColumnConfig(\n {\n tooltip: 'Global__Delete',\n callback: deleteProductDetailsCallback,\n isStandardIcon: true,\n standardIcon: nameOf('ButtonIconName')\n }\n )];\n }\n}\n","// ATTENTION: injectable 'root' is very convenient in here because we can inject all needed stores.\n// BUT: This will reuse THE SAME instance of the provider every time. Therefor we need to carefully handle the 'onDestroy' method!\nimport {EventEmitter, Injectable, TemplateRef} from '@angular/core';\nimport {BehaviorSubject, Subscription} from 'rxjs';\nimport {ApDynformsConfigFieldset} from '../../../../ap-dynforms/config/ap-dynforms-config-fieldset';\nimport {ApDynformsComponent} from '../../../../ap-dynforms/ap-dynforms.component';\nimport {\n IPpProductAvailableCrops,\n IPpProductSelectedDetails,\n IPpProductWizardDetailsData,\n IPpProductWizardDetailsResponsiveData,\n IPpProductWizardProvider\n} from '../pp-product-wizard.types';\nimport {ApDynGridColumnConfigBase} from '../../../../ap-dyngrids/config/ap-dyn-grid-column-config-base';\nimport {PpProductWizardDetailsUiProvider} from './pp-product-wizard-details.ui-provider';\nimport {nameOf} from '../../../../ap-core/utils/ap-name-of';\nimport {ApRoleTypeService} from '../../../../services/common/ap-role-type.service';\nimport {LoginStore} from '../../../../stores/login/login.store';\nimport {WorkTypesStore} from '../../../../stores/base-data/worrktypes.store';\nimport {UnitsStore} from '../../../../stores/common/units.store';\nimport {EffectiveRangesStore} from '../../../../stores/common/effective_ranges.store';\nimport {CropTypeStore} from '../../../../stores/base-data/crop.types.store';\nimport {SettingsStore} from '../../../../stores/base-data/settings.store';\nimport {ApGuidUtil, GetRoundNumericPipe} from '../../../../ap-utils';\nimport {ApUtilService} from '../../../../ap-utils/service/ap-util.service';\nimport {ApTranslationService} from '../../../../ap-utils/service/ap-translation.service';\nimport {ApDynGridsComponent} from '../../../../ap-dyngrids/ap-dyngrids.component';\nimport {ApDynformsValidator} from '../../../../ap-dynforms/ap-dynforms-validator';\nimport {ApDateRangeValidator} from '../../../../ap-dynforms/validators/ap-date-range-validator';\nimport {WorktypeUnitStore} from '../../../../stores/base-data/worktype-unit.store';\nimport {SelectionEvent} from '@progress/kendo-angular-grid';\n\n/**\n * PP-product wizard details-tab business logic provider\n */\n@Injectable({providedIn: 'root'})\nexport class PpProductWizardDetailsProvider implements IPpProductWizardProvider {\n\n public productDetailsColumns$: BehaviorSubject = new BehaviorSubject([]);\n public availableCropsColumns: ApDynGridColumnConfigBase[] = [];\n public formValidators = [\n new ApDynformsValidator({\n validator: ApDateRangeValidator.ValidateDateRange('PermissionStart', 'PermissionEnd'),\n errorKey: 'AgriConnect_Error_MinMax'\n }),\n new ApDynformsValidator({\n validator: ApDateRangeValidator.ValidateDateRange('PermissionEnd', 'UseByDate'),\n errorKey: 'AgriConnect_Error_MinMax'\n })\n ];\n private _responsiveData: IPpProductWizardDetailsResponsiveData;\n private _subscriptions: Subscription[] = [];\n\n /**\n * form properties which might trigger the ui to rebuild or other values to change\n */\n private _responsiveProperties = [\n nameOf('IsCountryWide'),\n nameOf('PermissionStart'),\n nameOf('PermissionEnd'),\n nameOf('UseByDate'),\n nameOf('WorkType'),\n nameOf('GrowStageMax'),\n nameOf('GrowStageMin'),\n nameOf('MaxRate'),\n nameOf('EffectiveRanges'),\n nameOf('Unit')\n ];\n private _dynForm: ApDynformsComponent;\n /**\n * These values might change during the lifetime of this wizard(step)\n */\n private _formDto: IPpProductWizardDetailsData = undefined;\n private _caption$: BehaviorSubject;\n private _fieldSets$: BehaviorSubject;\n private _ppProductSelectedDetailsTemplate: TemplateRef;\n private _ppProductAvailableCropsTemplate: TemplateRef;\n private _ppProductAvailableCropsGrid$: BehaviorSubject;\n private _addDetailsCallback: EventEmitter;\n private _deleteDetailsClicked = ApUtilService.createEventEmitter(this.deleteProductDetails.bind(this), this._subscriptions);\n private _previouslySelectedCropIds: number[] = [];\n\n constructor(private loginStore: LoginStore,\n private workTypesStore: WorkTypesStore,\n private unitsStore: UnitsStore,\n private cropTypeStore: CropTypeStore,\n private effectiveRangesStore: EffectiveRangesStore,\n private settingsStore: SettingsStore,\n private translationService: ApTranslationService,\n private roundNumericPipe: GetRoundNumericPipe,\n private worktypeUnitStore: WorktypeUnitStore) {\n this.availableCropsColumns = PpProductWizardDetailsUiProvider.GetAvailableCropsColumns();\n this.productDetailsColumns$ = new BehaviorSubject(\n PpProductWizardDetailsUiProvider.GetProductDetailsColumns(this.roundNumericPipe, this.settingsStore, this._deleteDetailsClicked,\n this.unitsStore.getUnitWithUnit(this._formDto?.Unit)?.Key)\n );\n }\n\n public init(caption$: BehaviorSubject,\n fieldSets$: BehaviorSubject,\n dynForm: ApDynformsComponent,\n selectedDetailsItems$: BehaviorSubject,\n ppProductAvailableCropsGrid$: BehaviorSubject,\n ppProductSelectedDetailsTemplate: TemplateRef,\n ppProductAvailableCropsTemplate: TemplateRef): void {\n this._caption$ = caption$;\n this._fieldSets$ = fieldSets$;\n this._dynForm = dynForm;\n this._ppProductSelectedDetailsTemplate = ppProductSelectedDetailsTemplate;\n this._ppProductAvailableCropsTemplate = ppProductAvailableCropsTemplate;\n this._ppProductAvailableCropsGrid$ = ppProductAvailableCropsGrid$;\n this._addDetailsCallback = ApUtilService.createEventEmitter(this.addDetails.bind(this), this._subscriptions);\n this._previouslySelectedCropIds = [];\n this._subscriptions.push(this._ppProductAvailableCropsGrid$.subscribe(availableCropsGrid =>\n this._subscriptions.push(availableCropsGrid?.gridPaging?.onSelectedChange.subscribe(() => this.updateAddDetailsButtonAvailability()))));\n this._responsiveData = {\n CountryDisabled$: new BehaviorSubject(true),\n MinPermissionEnd$: new BehaviorSubject(new Date()),\n MinUseByDate$: new BehaviorSubject(new Date()),\n PreselectedGrowStageMax$: new BehaviorSubject(99),\n PreselectedGrowStageMin$: new BehaviorSubject(0),\n AddDetailsButtonDisabled$: new BehaviorSubject(true),\n PreselectedUnit$: new BehaviorSubject(undefined),\n SelectedDetailsItems$: selectedDetailsItems$,\n AvailableUnits$: new BehaviorSubject([])\n };\n }\n\n /**\n * Main method for handling user input.\n * Depending on the changed form values other values get changed or the ui is rebuilt\n * @param valueChangesArgs eventArgs from form's valueChanged event\n */\n public onFormValueChanges(valueChangesArgs: { control: string; value: any }): void {\n /**\n * we need to update UI, Data or Observables only after user changed certain properties:\n */\n if (!this._responsiveProperties.Exists(p => p === valueChangesArgs.control)) {\n return;\n }\n\n /**\n * retrieve current values from the form\n * and modify its values if needed or rebuild UI if needed\n */\n this._formDto = this._dynForm?.form?.getRawValue() as IPpProductWizardDetailsData;\n if (!this._formDto) {\n return;\n }\n\n /**\n * Enable/disable country selection depending on checkbox and user's role-ID\n */\n if (valueChangesArgs?.control === nameOf('IsCountryWide')) {\n this._responsiveData?.CountryDisabled$?.next(!this._formDto.IsCountryWide || !ApRoleTypeService.hasAgriconRole(this.loginStore.User));\n this._formDto.Country = undefined;\n }\n\n /**\n * Take care of permission date ranges and boundaries\n */\n if (this._responsiveData?.MinPermissionEnd$?.value !== this._formDto.PermissionStart) {\n this._responsiveData?.MinPermissionEnd$.next(this._formDto.PermissionStart);\n }\n if (this._responsiveData?.MinUseByDate$?.value !== this._formDto.PermissionEnd) {\n this._responsiveData?.MinUseByDate$.next(this._formDto.PermissionEnd);\n }\n\n /**\n * Take care of worktype-unit mapping. The user should be able to select units which are mapped\n * to the selected worktype\n */\n if (valueChangesArgs?.control === nameOf('WorkType')) {\n this._responsiveData.AvailableUnits$.next(\n this.worktypeUnitStore.getUnitsByWorktype(this._formDto.WorkType)\n );\n // reset unit if it is not valid for currently selected worktype\n if (!this._responsiveData.AvailableUnits$.value?.Any(u => u?.Id === this._formDto.Unit)) {\n this._formDto.Unit = undefined;\n }\n }\n\n /**\n * Take care of unit handling. The selected unit needs to appear right next to the maxRate label\n * as well as in the details-grid header\n */\n if (valueChangesArgs?.control === nameOf('Unit') ||\n valueChangesArgs?.control === nameOf('WorkType')) {\n this._responsiveData?.PreselectedUnit$.next(\n this.translationService.translate(\n this.unitsStore.Listen(s => s.data).value?.\n FirstOrDefault(u => u.Id === this._formDto.Unit)?.Key));\n\n this.productDetailsColumns$.next(\n PpProductWizardDetailsUiProvider.GetProductDetailsColumns(this.roundNumericPipe, this.settingsStore, this._deleteDetailsClicked,\n this.translationService.translate(this.unitsStore.getUnitWithUnit(this._formDto?.Unit)?.Key))\n );\n }\n\n /**\n * Take care of growStage boundaries\n */\n if (valueChangesArgs?.control === nameOf('GrowStageMax')) {\n this._responsiveData?.PreselectedGrowStageMax$.next(this._formDto.GrowStageMax);\n }\n if (valueChangesArgs?.control === nameOf('GrowStageMin')) {\n this._responsiveData?.PreselectedGrowStageMin$.next(this._formDto.GrowStageMin);\n }\n\n /**\n * Patch back our updated dto and update the buttons availability\n */\n this.updateAddDetailsButtonAvailability();\n this.patchForm();\n }\n\n /**\n * Handler adding a product's detail to the result grid\n */\n public addDetails(): void {\n this._formDto = this._dynForm.form.getRawValue() as IPpProductWizardDetailsData;\n if (!this._formDto) {\n return;\n }\n const selectedDetails = this._responsiveData.SelectedDetailsItems$.value;\n const crops = this._ppProductAvailableCropsGrid$?.value?.gridPaging.selectedItems as IPpProductAvailableCrops[];\n const effectiveRangeNames = this._formDto.EffectiveRanges?.map(e =>\n this.translationService.translate(this.effectiveRangesStore.getEffectiveRangeById(e)?.Key)).Join(', ');\n\n const detailToAdd = {\n Id: ApGuidUtil.generateNewGuid(),\n CropTypeNames: crops?.map(c => c?.CropTypeName)?.Join(', '),\n CropTypeIds: crops?.map(c => c?.Id),\n GrowStageMax: this._formDto.GrowStageMax,\n GrowStageMin: this._formDto.GrowStageMin,\n MaxRate: this._formDto.MaxRate,\n EffectiveRanges: effectiveRangeNames,\n EffectiveRangeIds: this._formDto.EffectiveRanges,\n Indicator: this._formDto.Indicator,\n ButtonIconName: 'delete'\n };\n\n // reset certain fields after user added the details...\n this._formDto.GrowStageMin = undefined;\n this._formDto.GrowStageMax = undefined;\n this._formDto.MaxRate = undefined;\n this.patchForm();\n this.updateAddDetailsButtonAvailability();\n this._responsiveData?.SelectedDetailsItems$.next([...selectedDetails, ...[detailToAdd]]);\n }\n\n /**\n * Handler deleting a details from the result grid\n */\n public deleteProductDetails(dataItem: IPpProductSelectedDetails): void {\n const selectedDetails = this._responsiveData?.SelectedDetailsItems$?.getValue();\n this._responsiveData?.SelectedDetailsItems$.next(selectedDetails?.filter(d => d?.Id !== dataItem?.Id));\n }\n\n public updateCaption(): void {\n this._caption$?.next('Create_pp_product_details');\n }\n\n public updateFieldSets(): void {\n this._fieldSets$?.next(PpProductWizardDetailsUiProvider\n .CreateFieldset(this._responsiveData, this._addDetailsCallback, this.translationService, this.loginStore,\n this.workTypesStore, this.effectiveRangesStore, this.settingsStore,\n this._ppProductSelectedDetailsTemplate, this._ppProductAvailableCropsTemplate));\n // select crops which were selected when user was on details-tab the last time\n setTimeout(() => {\n if (this._previouslySelectedCropIds?.length > 0) {\n this._ppProductAvailableCropsGrid$.value?.gridPaging?.setSelectedKeys(this._previouslySelectedCropIds);\n this._ppProductAvailableCropsGrid$.value?.gridPaging?.updateGridView();\n }\n }, 0);\n }\n\n private updateAddDetailsButtonAvailability(): void {\n const formInvalid = !((this._formDto?.GrowStageMin != null && this._formDto?.GrowStageMin >= 0) && this._formDto?.GrowStageMax > 0 &&\n this._formDto?.MaxRate > 0 && this._formDto?.EffectiveRanges?.length > 0);\n const cropSelectionInvalid = this._ppProductAvailableCropsGrid$?.value?.gridPaging?.selectedKeys?.length <= 0;\n this._responsiveData.AddDetailsButtonDisabled$.next(formInvalid || cropSelectionInvalid);\n }\n\n /**\n * Method applies current data transfer object (formDto) to the reactive form\n * without emitting new events to avoid triggering onFormValueChanges again.\n * @param triggerValidation true to trigger validations for the whole form\n * @private\n */\n private patchForm(triggerValidation?: boolean): void {\n setTimeout(() => {\n this._dynForm.form.patchValue(this._formDto, {emitEvent: false});\n if (triggerValidation) {\n setTimeout(() => this._dynForm.markAsTouched(), 0);\n }\n }, 0);\n }\n\n public buildDefaultDetails(): IPpProductWizardDetailsData {\n return {\n ProductName: undefined,\n IsCountryWide: false,\n Country: undefined,\n Note: undefined,\n PermissionStart: new Date(),\n PermissionEnd: undefined,\n UseByDate: undefined,\n WorkType: undefined,\n Unit: undefined,\n AvailableCrops: this.cropTypeStore.AvailableCropTypes,\n SelectedDetails: [],\n GrowStageMin: undefined,\n GrowStageMax: undefined,\n MaxRate: undefined,\n EffectiveRanges: undefined,\n Indicator: undefined,\n SelectedProductDetails: []\n };\n }\n\n /**\n * Handles the selectionChange of product details.\n * When selectionChanges the selected details shall be adopted to\n * the agronomic fields\n * @param selectionArgs\n */\n public onDetailsSelectionChange(selectionArgs: SelectionEvent): void {\n if (selectionArgs?.selectedRows?.length <= 0) {\n return;\n }\n\n const selectedDetails = selectionArgs.selectedRows[0].dataItem as IPpProductWizardDetailsData;\n if (!selectedDetails) {\n return;\n }\n\n this._formDto = this._dynForm.form.getRawValue() as IPpProductWizardDetailsData;\n this._formDto.GrowStageMin = selectedDetails?.GrowStageMin;\n this._formDto.GrowStageMax = selectedDetails?.GrowStageMax;\n this._formDto.MaxRate = selectedDetails?.MaxRate;\n this.patchForm(false);\n }\n\n /**\n * Custom check if the form is valid. The regular check of dynComponent.Valid$ does\n * not work here because it would check all controls - but product gs min/max, maxRate and effectiveRange\n * are not required to be validated before saving. Anyway those controls need a required validator\n * in order to validate before adding the product details to our details list\n */\n public isValid(): boolean {\n const formControls = this._dynForm?.form?.controls;\n return formControls &&\n formControls[nameOf('ProductName')]?.valid &&\n formControls[nameOf('PermissionStart')]?.valid &&\n formControls[nameOf('UseByDate')]?.valid &&\n formControls[nameOf('PermissionEnd')]?.valid &&\n formControls[nameOf('WorkType')]?.valid &&\n formControls[nameOf('Unit')]?.valid;\n }\n\n /**\n * Method which handles operations when leaving details tab\n */\n public leave(): void {\n this._previouslySelectedCropIds = (this._ppProductAvailableCropsGrid$?.value?.\n gridPaging?.selectedItems as IPpProductAvailableCrops[])?.map(c => c?.Id);\n }\n\n public getSelectedDetailsGridHeight(): string {\n return '160px';\n }\n\n /**\n * Cleanup the mess...\n */\n public onDestroy(): void {\n this._previouslySelectedCropIds = [];\n this._responsiveData = undefined;\n this._formDto = undefined;\n this._subscriptions?.forEach(s => s?.unsubscribe());\n this._subscriptions = [];\n }\n}\n","// ATTENTION: injectable 'root' is very convenient in here because we can inject all needed stores.\n// BUT: This will reuse THE SAME instance of the provider every time. Therefor we need to carefully handle the 'onDestroy' method!\nimport {Injectable, TemplateRef} from '@angular/core';\nimport {\n IPpProductWizardDetailsData,\n IPpProductWizardOverviewData,\n IPpProductWizardProvider\n} from '../pp-product-wizard.types';\nimport {BehaviorSubject} from 'rxjs';\nimport {\n ApDynformsConfigFieldset\n} from '../../../../ap-dynforms/config/ap-dynforms-config-fieldset';\nimport {\n LanguageStore\n} from '../../../../stores/translation/language.store';\nimport {\n PpProductWizardOverviewUiProvider\n} from './pp-product-wizard-overview.ui-provider';\nimport {\n LoginStore\n} from '../../../../stores/login/login.store';\nimport * as moment from 'moment';\nimport {\n WorkTypesStore\n} from '../../../../stores/base-data/worrktypes.store';\nimport {\n ApTranslationService\n} from '../../../../ap-utils/service/ap-translation.service';\n\n/**\n * PP-product wizard overview-tab business logic provider\n */\n@Injectable({providedIn: 'root'})\nexport class PpProductWizardOverviewProvider implements IPpProductWizardProvider {\n\n private _caption$: BehaviorSubject;\n private _fieldSets$: BehaviorSubject;\n private _ppProductSelectedDetailsTemplate: TemplateRef;\n\n constructor(private languageStore: LanguageStore,\n private translationService: ApTranslationService,\n private loginStore: LoginStore,\n private workTypesStore: WorkTypesStore) {\n }\n\n public init(caption$: BehaviorSubject,\n fieldSets$: BehaviorSubject,\n ppProductSelectedDetailsTemplate: TemplateRef): void {\n this._caption$ = caption$;\n this._fieldSets$ = fieldSets$;\n this._ppProductSelectedDetailsTemplate = ppProductSelectedDetailsTemplate;\n }\n\n\n public updateCaption(): void {\n this._caption$?.next('Create_pp_product_overview');\n }\n\n public updateFieldSets(overviewData: IPpProductWizardOverviewData): void {\n this._fieldSets$?.next(PpProductWizardOverviewUiProvider\n .CreateFieldset(overviewData, this.loginStore,\n this._ppProductSelectedDetailsTemplate));\n }\n\n /**\n * Creates a new instance of our overview item based on the entered product details\n */\n public buildOverviewItem(detailsData: IPpProductWizardDetailsData): IPpProductWizardOverviewData {\n return {\n ProductName: this.getProductExpr(detailsData),\n PermissionStartExpr: moment(detailsData?.PermissionStart)?.format(this.languageStore?.CurrentDateFormat),\n PermissionEndExpr: moment(detailsData?.PermissionEnd)?.format(this.languageStore?.CurrentDateFormat),\n UseByDateExpr: moment(detailsData?.UseByDate)?.format(this.languageStore?.CurrentDateFormat),\n WorkTypeExpr: this.translationService.translate(\n this.workTypesStore.getWorkTypes()?.FirstOrDefault(w => w?.Id === detailsData?.WorkType)?.Description),\n CountryExpr: detailsData?.Country?.length > 0 ? detailsData.Country : '-'\n };\n }\n\n /**\n * Method to builds product expression (optional truncated) productName and note\n */\n private getProductExpr(detailsData: IPpProductWizardDetailsData): string {\n if (!detailsData || detailsData?.ProductName?.length <= 0) {\n return '-';\n }\n let productExpr = detailsData.ProductName?.length > 70 ? `${detailsData.ProductName?.slice(0, 70)}...` : detailsData.ProductName;\n if (detailsData.Note?.length > 0) {\n const note = detailsData.Note?.length > 70 ? `${detailsData.Note?.slice(0, 70)}...` : detailsData.Note;\n productExpr += ` (${note})`;\n }\n return productExpr;\n }\n\n /**\n * Custom height calculation for the pp-product wizard overview tab\n */\n public getSelectedDetailsGridHeight(): string {\n return 'calc(100vH - 330px)';\n }\n\n /**\n * Cleanup the mess...\n */\n public onDestroy(): void {\n }\n}\n","import {IPpProductWizardOverviewData} from '../pp-product-wizard.types';\nimport {TemplateRef} from '@angular/core';\nimport {LoginStore} from '../../../../stores/login/login.store';\nimport {ApRoleTypeService} from '../../../../services/common/ap-role-type.service';\nimport {ApDynformsConfigFieldset} from '../../../../ap-dynforms/config/ap-dynforms-config-fieldset';\nimport {nameOf} from '../../../../ap-core/utils/ap-name-of';\nimport {ApDynformsConfigTextbox} from '../../../../ap-dynforms/config/ap-dynforms-config-textbox';\nimport {ApDynformsConfigTemplate} from '../../../../ap-dynforms/config/ap-dynforms-config-template';\n\n/**\n * PP-product wizard overview-tab ui logic provider\n */\nexport class PpProductWizardOverviewUiProvider {\n\n public static CreateFieldset(overviewData: IPpProductWizardOverviewData,\n loginStore: LoginStore,\n ppProductSelectedDetailsTemplate: TemplateRef): ApDynformsConfigFieldset[] {\n const result: ApDynformsConfigFieldset[] = [];\n const countrySelection = ApRoleTypeService.hasAgriconRole(loginStore.User) ? [\n new ApDynformsConfigTextbox({\n key: nameOf('CountryExpr'),\n label: 'Global__Country',\n disabled: true\n })\n ] : [];\n\n result.Add(new ApDynformsConfigFieldset({\n key: 'General',\n legend: overviewData?.ProductName,\n columns: countrySelection?.length > 0 ? 5 : 4,\n classList: 'ap-error-no-border',\n config: [\n new ApDynformsConfigTextbox({\n key: nameOf('PermissionStartExpr'),\n label: 'Docu_Ini__StartDate',\n disabled: true\n }),\n new ApDynformsConfigTextbox({\n key: nameOf('PermissionEndExpr'),\n label: 'Docu_Ini__EndDate',\n disabled: true\n }),\n new ApDynformsConfigTextbox({\n key: nameOf('UseByDateExpr'),\n label: 'Global__Expire_Date',\n disabled: true\n }),\n new ApDynformsConfigTextbox({\n key: nameOf('WorkTypeExpr'),\n label: 'Docu_Ini__WorkType',\n disabled: true\n }),\n ...countrySelection\n ]\n }));\n\n result.Add(new ApDynformsConfigFieldset({\n key: 'Result',\n legend: 'Global__Result',\n hideLegend: true,\n classList: 'ap-field-set-no-legend-line',\n columns: 1,\n useMaxWidth: true,\n config: [\n new ApDynformsConfigTemplate({\n key: 'SelectedDetails',\n value: ppProductSelectedDetailsTemplate\n })\n ]\n }));\n\n return result;\n }\n}\n","import {AfterContentInit, Component, EventEmitter, OnDestroy, TemplateRef, ViewChild} from '@angular/core';\nimport {\n ApDynComponentComponent\n} from '../../../ap-dyncomponent/ap-dyncomponent.component';\nimport {BehaviorSubject, combineLatest, Observable, of, Subscription} from 'rxjs';\nimport {\n PpWizardStates\n} from '../planning-wizard/pp-planning-wizard.types';\nimport {\n ApDynformsConfigFieldset\n} from '../../../ap-dynforms/config/ap-dynforms-config-fieldset';\nimport {\n IPpProductAvailableCrops,\n IPpProductSelectedDetails,\n IPpProductWizardDetailsData,\n IPpProductWizardOverviewData,\n IPpProductWizardProvider\n} from './pp-product-wizard.types';\nimport {\n PpProductWizardDetailsProvider\n} from './configs/pp-product-wizard-details.provider';\nimport {\n PpProductWizardOverviewProvider\n} from './configs/pp-product-wizard-overview.provider';\nimport {\n ApUtilService\n} from '../../../ap-utils/service/ap-util.service';\nimport {\n FormStore\n} from '../../../stores/layout/form.store';\nimport {\n CropTypeStore\n} from '../../../stores/base-data/crop.types.store';\nimport {\n ApTranslationService\n} from '../../../ap-utils/service/ap-translation.service';\nimport {filter, map} from 'rxjs/operators';\nimport {\n ApDynGridsComponent\n} from '../../../ap-dyngrids/ap-dyngrids.component';\nimport {\n PlantProtectionProductStore\n} from '../../../stores/base-data/plantprotection.product.store';\nimport {ApGuidUtil} from '../../../ap-utils';\nimport {\n CountryStore\n} from '../../../stores/common/country.store';\nimport {\n ApRoleTypeService\n} from '../../../services/common/ap-role-type.service';\nimport {\n LoginStore\n} from '../../../stores/login/login.store';\nimport {\n ApDateService\n} from '../../../ap-core/services/ap-date-service';\nimport {\n UnitsStore\n} from '../../../stores/common/units.store';\nimport {\n WorkTypesStore\n} from '../../../stores/base-data/worrktypes.store';\nimport {\n EffectiveRangesStore\n} from '../../../stores/common/effective_ranges.store';\nimport IPlantProtectionProductWriteable = Data.BaseData.IPlantProtectionProductWriteable;\nimport IPlantProtectionProductDetailsWriteable = Data.BaseData.IPlantProtectionProductDetailsWriteable;\n\n/**\n * Main PP-product wizard component\n */\n@Component({\n selector: 'pp-product-wizard',\n template: `\n \n
\n
\n \n
\n
\n \n \n
\n
\n \n
\n
\n
\n \n \n \n
\n \n
\n
\n \n \n \n
\n \n
\n
\n `,\n styles: [\n '.pp-selected-details { display: block; }',\n '.pp-available-crops { height: 200px; display: block; margin-top: 10px}'\n ]\n})\nexport class PpProductWizardComponent implements AfterContentInit, OnDestroy {\n @ViewChild(ApDynComponentComponent, {static: true}) public dynComponent: ApDynComponentComponent;\n @ViewChild('ppProductSelectedDetailsTemplate', {static: true}) public ppProductSelectedDetailsTemplate: TemplateRef;\n @ViewChild('ppProductAvailableCropsTemplate', {static: true}) public ppProductAvailableCropsTemplate: TemplateRef;\n // @ViewChild does not work in case the child-component is embedded within ng-template.\n // Therefore, we need to obtain the grid reference on our own way\n public ppProductAvailableCropsGrid$: BehaviorSubject = new BehaviorSubject(undefined);\n\n private _subscriptions: Subscription[] = [];\n private _stateModel: { [oldState: string]: { [newState: string]: () => void } } = {};\n public activeWizardStep: PpWizardStates = PpWizardStates.Details;\n public wizardSteps = PpWizardStates;\n public activeWizardProvider$ = new BehaviorSubject(undefined);\n public caption$ = new BehaviorSubject('Nutrients__SelectFieldsTitle');\n public fieldSets$ = new BehaviorSubject([]);\n public selectedDetailsItems$: BehaviorSubject = new BehaviorSubject([]);\n public availableCropsItems$: Observable = of([]);\n public handleStateChangeAction: EventEmitter;\n public saving$: BehaviorSubject = new BehaviorSubject(false);\n public detailsData: IPpProductWizardDetailsData;\n public overviewData: IPpProductWizardOverviewData;\n public breadCrumbsColumns = [\n PpWizardStates.Details,\n PpWizardStates.Overview\n ];\n\n constructor(public wizardDetailsProvider: PpProductWizardDetailsProvider,\n private wizardOverviewProvider: PpProductWizardOverviewProvider,\n private plantProtectionProductStore: PlantProtectionProductStore,\n private cropTypeStore: CropTypeStore,\n private translationService: ApTranslationService,\n private countryStore: CountryStore,\n private loginStore: LoginStore,\n private dateService: ApDateService,\n private unitsStore: UnitsStore,\n private workTypesStore: WorkTypesStore,\n private effectiveRangesStore: EffectiveRangesStore,\n private formStore: FormStore) {\n this.handleStateChangeAction = ApUtilService.createEventEmitter(this.handleStateChange.bind(this), this._subscriptions);\n /*\n * Setup of plant protection wizard state machine...\n */\n this._stateModel[PpWizardStates.Details] = {};\n this._stateModel[PpWizardStates.Overview] = {};\n this._stateModel[PpWizardStates.Save] = {};\n // Definition of actions when state changes: [oldState][newState] => (action) executed\n this._stateModel[PpWizardStates.Details][PpWizardStates.Overview] = this.initOverview.bind(this); // user switches from details to overview-tab\n this._stateModel[PpWizardStates.Overview][PpWizardStates.Save] = this.initSave.bind(this); // user clicks export in overview\n this._stateModel[PpWizardStates.Overview][PpWizardStates.Details] = this.initDetails.bind(this); // user goes back to details from overview\n this._stateModel[PpWizardStates.Details][PpWizardStates.Cancel] = this.initLeave.bind(this); // leaving wizard\n this._stateModel[PpWizardStates.Save][PpWizardStates.Details] = this.initDetails.bind(this); // after failed save user goes back to details\n this._stateModel[PpWizardStates.Save][PpWizardStates.Save] = this.initSave.bind(this); // save retry by user\n\n this.availableCropsItems$ = this.cropTypeStore.Listen(s => s.data).pipe(\n filter(d => !!d),\n map(cropTypes => cropTypes.filter(c => c.Selected)\n .map(c => {\n return {\n Id: c.Id,\n CropTypeName: this.translationService.translate(c.Description)\n };\n })));\n /**\n * Handle saving indicator and close for if saved successfully\n */\n this._subscriptions.push(\n combineLatest([\n this.plantProtectionProductStore.Listen(x => x.saving),\n this.plantProtectionProductStore.Listen(x => x.saved)\n ]).subscribe(([saving, saved]) => {\n if (!this.saving$?.value && saving) {\n this.saving$.next(true);\n return;\n }\n if (this.saving$?.value) {\n if (saved) {\n setTimeout(() => this.formStore.closeForm(), 1);\n }\n this.saving$.next(false);\n }\n }));\n }\n\n public ngAfterContentInit(): void {\n this.wizardDetailsProvider.init(\n this.caption$,\n this.fieldSets$,\n this.dynComponent.dynForm,\n this.selectedDetailsItems$,\n this.ppProductAvailableCropsGrid$,\n this.ppProductSelectedDetailsTemplate,\n this.ppProductAvailableCropsTemplate);\n this.wizardOverviewProvider.init(\n this.caption$,\n this.fieldSets$,\n this.ppProductSelectedDetailsTemplate);\n\n this.dynComponent.dynForm.initialized.subscribe(() => {\n // Handle subscriptions in one place and forward them to the corresponding\n // wizard provider which is currently in charge of the action\n this._subscriptions.push(this.dynComponent.dynForm.formValueChanges.subscribe(valuesChangesArgs => {\n if (this.activeWizardStep !== PpWizardStates.Details || this.dynComponent.dynForm.form.pristine ||\n (!this.dynComponent.dynForm.form.dirty && !this.dynComponent.dynForm.form.touched)) {\n return;\n }\n this.wizardDetailsProvider.onFormValueChanges(valuesChangesArgs);\n }));\n this.initDetails();\n });\n }\n\n /**\n * Handles the state transitions between the wizard steps\n * and performs the corresponding actions defined in the wizard stateMachine/Model\n * @param newState the new wizard step. The user might have navigated back or forward\n * @private\n */\n private handleStateChange(newState: PpWizardStates): void {\n const oldState = this.activeWizardStep;\n this.activeWizardStep = newState;\n if (this._stateModel[oldState][newState]) {\n this._stateModel[oldState][newState]();\n }\n }\n\n /**\n * Handles whatever needs to happen when wizard switches to Details\n * @private\n */\n private initDetails(): void {\n this.activeWizardProvider$?.next(this.wizardDetailsProvider);\n if (!this.detailsData) {\n this.detailsData = this.wizardDetailsProvider.buildDefaultDetails();\n }\n\n this.buildUi(this.wizardDetailsProvider);\n setTimeout(() =>\n this.dynComponent.dynForm.form.patchValue(this.detailsData), 0);\n // trigger initial validations. Do not trigger validations if user\n setTimeout(() => this.dynComponent.dynForm.markAsTouched(), 0);\n }\n\n /**\n * Handles whatever needs to happen when wizard switches to Overview\n * @private\n */\n private initOverview(): void {\n this.wizardDetailsProvider.leave();\n this.activeWizardProvider$?.next(this.wizardOverviewProvider);\n this.detailsData = this.dynComponent.dynForm.form.getRawValue() as IPpProductWizardDetailsData;\n this.overviewData = this.wizardOverviewProvider.buildOverviewItem(this.detailsData);\n this.buildUi(this.wizardOverviewProvider);\n setTimeout(() =>\n this.dynComponent.dynForm.form.patchValue(this.overviewData), 0);\n }\n\n /**\n * Generic function to generate/build UI depending on current wizard state.\n * @private\n */\n private buildUi(wizardProvider: IPpProductWizardProvider): void {\n if (!wizardProvider) {\n return;\n }\n wizardProvider.updateCaption();\n wizardProvider.updateFieldSets(this.overviewData);\n }\n\n /**\n * Handles whatever needs to happen when save is clicked\n * @private\n */\n private initSave(): void {\n if (!this.detailsData || this.selectedDetailsItems$?.value?.length === 0) {\n return;\n }\n const productId = ApGuidUtil.generateNewGuid();\n const country = ApRoleTypeService.hasAgriconRole(this.loginStore.User) && this.detailsData?.IsCountryWide && this.detailsData.Country ?\n this.countryStore.Countries.FirstOrDefault(c => c?.Id === this.detailsData?.Country)\n : this.loginStore.SelectedFarm?.Country;\n const ppProductDetails: IPlantProtectionProductDetailsWriteable[] = [];\n const selectedProductDetails = this.selectedDetailsItems$.value;\n for (const productDetail of selectedProductDetails) {\n if (!productDetail || productDetail?.EffectiveRangeIds?.length <= 0 || productDetail.CropTypeIds?.length <= 0) {\n continue;\n }\n for (const effectiveRangeId of productDetail.EffectiveRangeIds) {\n for (const cropTypeId of productDetail.CropTypeIds) {\n ppProductDetails.push({\n Id: ApGuidUtil.generateNewGuid(),\n ProductId: productId,\n AmountMax: productDetail.MaxRate,\n EcMax: productDetail.GrowStageMax,\n EcMin: productDetail.GrowStageMin,\n EffectiveRange: this.effectiveRangesStore.getEffectiveRangeById(effectiveRangeId),\n EppoCrop: this.cropTypeStore.getDefaultCroptype(cropTypeId)?.Eppocode,\n EppoHarmfulOrganism: null,\n Unit: this.unitsStore.getUnitWithUnit(this.detailsData?.Unit),\n WorkType: this.workTypesStore.getWorkTypes()?.FirstOrDefault(w => w.Id === this.detailsData.WorkType),\n FarmId: this.detailsData.IsCountryWide ? -1 : this.loginStore.SelectedFarmId,\n Indicator: productDetail.Indicator,\n GrowthStageDefined: true,\n ChangedAt: null,\n ChangedBy: null,\n CreatedAt: null,\n CreatedBy: null,\n DeletedAt: null,\n DeletedBy: null,\n Version: 0\n });\n }\n }\n }\n const ppProduct: IPlantProtectionProductWriteable = {\n Id: productId,\n ProductName: this.detailsData?.ProductName,\n Note: this.detailsData?.Note,\n PermissionStart: this.dateService.getDateNoon(this.detailsData?.PermissionStart),\n PermissionEnd: this.dateService.getDateNoon(this.detailsData?.PermissionEnd),\n UseByDate: this.dateService.getDateNoon(this.detailsData?.UseByDate),\n Country: country,\n ExternalProductId: productId?.replace('-', ''),\n ProductDetails: ppProductDetails,\n FarmId: this.detailsData.IsCountryWide ? -1 : this.loginStore.SelectedFarmId,\n ChangedAt: null,\n ChangedBy: null,\n CreatedAt: null,\n CreatedBy: null,\n DeletedAt: null,\n DeletedBy: null,\n Version: 0\n };\n this.plantProtectionProductStore.createNewProduct(ppProduct);\n }\n\n /**\n * Handles whatever needs to happen when leaving the wizard\n * @private\n */\n private initLeave(): void {\n setTimeout(() => this.formStore.closeForm(), 1);\n }\n\n public ngOnDestroy(): void {\n this._subscriptions.forEach(s => s.unsubscribe());\n this.wizardDetailsProvider.onDestroy();\n this.wizardOverviewProvider.onDestroy();\n this.wizardDetailsProvider = undefined;\n this.wizardOverviewProvider = undefined;\n }\n\n public getSelectedCropsNote(): string {\n return `${this.ppProductAvailableCropsGrid$?.value?.gridPaging?.selectedKeys?.length?.toString()}\n ${this.translationService.translate('Global__Selected')}`;\n }\n}\n","import {IGridStatus} from '../../ap-interface/interfaces/ap-grid-status.interface';\nimport IGuid = System.IGuid;\nimport IPlantProtectionProduct = Data.BaseData.IPlantProtectionProduct;\n\nexport enum PlantProtectionGridActions {\n Active = 0,\n Inactive = 1\n}\n\nexport interface IPlantProtectionProductsGridData {\n Id: IGuid;\n ProductName: string;\n StatusProduct: IGridStatus;\n StatusSelection: IGridStatus;\n Ingredients: string | undefined;\n StartDate: Date;\n EndDate: Date;\n UseByDate: Date;\n Crops: string;\n EffRange: string;\n DetailsTooltip: string;\n IsSystemProduct: boolean;\n SourceItem: IPlantProtectionProduct;\n}\n","import {AfterContentInit, Component, EventEmitter, OnDestroy, OnInit, ViewChild} from '@angular/core';\nimport {combineLatest, Observable, of, Subscription} from 'rxjs';\nimport {ApGridPagerType, IGridPagerData} from '../../ap-interface';\nimport {\n ApDynComponentComponent\n} from '../../ap-dyncomponent/ap-dyncomponent.component';\nimport {\n ApDynGridColumnConfigBase\n} from '../../ap-dyngrids/config/ap-dyn-grid-column-config-base';\nimport {\n ApDynGridPagerConfigBase\n} from '../../ap-dyngrids/config/ap-dyn-grid-pager-config-base';\nimport {\n ApDynGridStatusColumnConfig\n} from '../../ap-dyngrids/config/ap-dyn-grid-status-column-config';\nimport {\n ApDynGridEditColumnConfig\n} from '../../ap-dyngrids/config/ap-dyn-grid-edit-column-config';\nimport {\n ApDynGridPagerConfig,\n IDynGridWizardChoiceData\n} from '../../ap-dyngrids/config/ap-dyn-grid-pager-config';\nimport {\n ApDynGridPropertyColumnConfig\n} from '../../ap-dyngrids/config/ap-dyn-grid-property-column-config';\nimport {\n CropTypeStore\n} from '../../stores/base-data/crop.types.store';\nimport {\n PpProductWizardComponent\n} from '../../entry-components/plant-protection-entry-components/pp-product-wizard/pp-product-wizard.component';\nimport {filter, map} from 'rxjs/operators';\nimport {\n MapViewStore\n} from '../../stores/layout/mapview.store';\nimport {\n ApDateService\n} from '../../ap-core/services/ap-date-service';\nimport {ObjectFactory} from 'ts-tooling';\nimport {\n PlantProtectionProductStore\n} from '../../stores/base-data/plantprotection.product.store';\nimport {LoginStore} from '../../stores/login/login.store';\nimport {\n CampaignYearStore\n} from '../../stores/login/campaignyear.store';\nimport {\n ApTranslationService\n} from '../../ap-utils/service/ap-translation.service';\nimport {\n ApDynGridGroupColumnConfig\n} from '../../ap-dyngrids/config/ap-dyn-grid-group-column-config';\nimport {\n ApRoleTypeService\n} from '../../services/common/ap-role-type.service';\nimport {\n LanguageStore\n} from '../../stores/translation/language.store';\nimport {nameOf} from '../../ap-core/utils/ap-name-of';\nimport {\n ApUtilService\n} from '../../ap-utils/service/ap-util.service';\nimport {\n IGridStatus\n} from '../../ap-interface/interfaces/ap-grid-status.interface';\nimport {FormStore} from '../../stores/layout/form.store';\nimport {\n CountryStore\n} from '../../stores/common/country.store';\nimport {\n ApColumnState\n} from '../../ap-interface/enums/ap-column-state.enum';\nimport {\n IPlantProtectionProductsGridData,\n PlantProtectionGridActions\n} from '../types/plant-protection-products.types';\nimport IPlantProtectionProduct = Data.BaseData.IPlantProtectionProduct;\n\n/**\n * Component for plant protection products management\n */\n@Component({\n selector: 'ap-plant-protection-products',\n template: `\n `\n})\n\nexport class ApPlantProtectionProductsComponent implements OnInit, AfterContentInit, OnDestroy {\n @ViewChild(ApDynComponentComponent, {static: true}) dynComponent: ApDynComponentComponent;\n public columns: ApDynGridColumnConfigBase[] = [];\n public pager: ApDynGridPagerConfigBase;\n public loading$ = of(true);\n public items$: Observable = of([]);\n\n private _applyClicked = new EventEmitter();\n private _subscriptions: Array = [];\n\n constructor(private loginStore: LoginStore,\n private plantProtectionProductStore: PlantProtectionProductStore,\n private translationService: ApTranslationService,\n private mapViewStore: MapViewStore,\n private cropTypeStore: CropTypeStore,\n private campaignYearStore: CampaignYearStore,\n private languageStore: LanguageStore,\n private dateService: ApDateService,\n private formStore: FormStore,\n private countryStore: CountryStore) {\n }\n\n /**\n * Initializes the component\n * Hides the map view when the component is initialized\n */\n public ngOnInit(): void {\n this.mapViewStore.hideMapView();\n }\n\n /**\n * Performs initialization after content is initialized\n * Sets up subscriptions for campaign year changes and data loading\n * Triggers initial data retrieval and grid configuration\n */\n public ngAfterContentInit(): void {\n this._subscriptions.push(\n this._applyClicked.subscribe((e) => this.onApplyClicked(e))\n );\n this._subscriptions.push(\n this.campaignYearStore.Listen(s => s.selectedYear).subscribe(() => {\n this.plantProtectionProductStore.loadPlantProtectionProducts(false, true);\n })\n );\n this.getDataFromStore();\n this.gridBuilder();\n }\n\n /**\n * Cleans up subscriptions when the component is destroyed\n * Prevents memory leaks by unsubscribing from all active subscriptions\n */\n public ngOnDestroy(): void {\n this._subscriptions.forEach(x => x.unsubscribe());\n }\n\n /**\n * Opens the wizard to create a new plant protection product\n * Uses FormStore to open the product wizard component\n */\n public createNewProduct(): void {\n this.formStore.openForm({component: PpProductWizardComponent, data: null});\n }\n\n /**\n * Retrieves data from various stores\n * Sets up loading state and items observable\n * Transforms raw data into grid-compatible format\n * @private\n */\n private getDataFromStore(): void {\n this.countryStore.loadAllCountries();\n this.loading$ = combineLatest([\n this.plantProtectionProductStore.Listen(s => s.loading),\n this.plantProtectionProductStore.Listen(s => s.saving),\n this.campaignYearStore.Listen(s => s.loading),\n this.cropTypeStore.Listen(s => s.loading),\n this.countryStore.Listen(s => s.loading)\n ]).pipe(\n map(([plantProtectionProductsLoading, campaignYearLoading, croptypesLoading]) =>\n plantProtectionProductsLoading || campaignYearLoading || croptypesLoading)\n );\n this.items$ = combineLatest([\n this.plantProtectionProductStore.Listen(s => s.data),\n this.cropTypeStore.Listen(s => s.data)])\n .pipe(\n filter(([plantProtectionProducts, cropTypes]) => !!plantProtectionProducts && !!cropTypes),\n map(([plantProtectionProducts, _]) =>\n plantProtectionProducts.Convert((plantProtectionProduct: IPlantProtectionProduct) => {\n const useByDate = plantProtectionProduct.UseByDate ? this.dateService.getDateMidnight(plantProtectionProduct.UseByDate) : null;\n const permissionEndDate = plantProtectionProduct.PermissionEnd ? this.dateService.getDateMidnight(plantProtectionProduct.PermissionEnd) : null;\n const statusSelection = this.getSelectionStatus(plantProtectionProduct.Selectable);\n const statusProduct = this.getProductStatus(useByDate, permissionEndDate);\n const distinctEffRanges = plantProtectionProduct.ProductDetails?.map(d =>\n this.translationService.translate(d.EffectiveRange?.Key))?.filter((value, i, array) => array.indexOf(value) === i)?.join(', ');\n const productEppoCodes = plantProtectionProduct.ProductDetails?.map(d => d.EppoCrop);\n // Get all crops which are assigned to the product by its EppoCode.\n // Products may contain a certain crop eppoCode or an eppo_group\n // Filter empty crops and duplicates\n const targetCrops = this.cropTypeStore.CropTypes.FindAll(c =>\n c.Selected &&\n (productEppoCodes.Contains(c.Eppocode) || c.EppoGroups?.Any(g => productEppoCodes.Contains(g))))?.map(c => this.translationService.translate(c.Description))?.filter((value, index, self) => self.indexOf(value) === index && value !== '')?.join(', ');\n return {\n Id: plantProtectionProduct.Id,\n ProductName: plantProtectionProduct.ProductName,\n StatusSelection: statusSelection,\n StatusProduct: statusProduct,\n Ingredients: this.parseIngredients(plantProtectionProduct),\n StartDate: plantProtectionProduct.PermissionStart ? this.dateService.getDateMidnight(plantProtectionProduct.PermissionStart) : null,\n EndDate: plantProtectionProduct.PermissionEnd ? this.dateService.getDateMidnight(plantProtectionProduct.PermissionEnd) : null,\n UseByDate: useByDate,\n EffRange: distinctEffRanges,\n Crops: targetCrops,\n DetailsTooltip: this.buildDetailsTooltip(plantProtectionProduct),\n IsSystemProduct: plantProtectionProduct?.FarmId === -1,\n SourceItem: plantProtectionProduct\n };\n })\n )\n );\n }\n\n /**\n * Configures grid columns and pager\n * Sets up column definitions, filtering, sorting, and mass edit options\n * @private\n */\n private gridBuilder(): void {\n this.columns = [\n new ApDynGridStatusColumnConfig({\n field: `${nameOf('StatusSelection')}.${nameOf('state')}`,\n class: `${nameOf('StatusSelection')}.${nameOf('class')}`,\n description: `${nameOf('StatusSelection')}.${nameOf('description')}`,\n title: 'Global__Status',\n showHeaderTitle: false,\n filterable: true,\n groupIndex: 0,\n groupDesc: true\n }),\n new ApDynGridPropertyColumnConfig({\n field: nameOf('EffRange'),\n title: 'Global__Effective_Range',\n filterable: true,\n width: 80,\n headerFilterable: true\n }),\n new ApDynGridPropertyColumnConfig({\n field: nameOf('ProductName'),\n title: 'Global__Name',\n filterable: true,\n width: 100,\n headerFilterable: true,\n sortIndex: 0,\n sortDesc: false,\n tooltip: (dataItem) => dataItem['DetailsTooltip']\n }),\n new ApDynGridPropertyColumnConfig({\n field: nameOf('Ingredients'),\n title: 'Ingredients',\n width: 275,\n hide: true,\n filterable: true,\n headerFilterable: true\n }),\n new ApDynGridPropertyColumnConfig({\n field: nameOf('Crops'),\n title: 'Docu_Ini__CropTypes',\n width: 275,\n filterable: true,\n headerFilterable: true\n }),\n new ApDynGridPropertyColumnConfig({\n field: nameOf('IsSystemProduct'),\n title: 'System_Product',\n checkbox: true,\n filterable: true,\n width: 60\n }),\n new ApDynGridGroupColumnConfig({\n title: 'Global__Admission',\n groupColumns: [\n new ApDynGridStatusColumnConfig({\n field: `${nameOf('StatusProduct')}.${nameOf('state')}`,\n class: `${nameOf('StatusProduct')}.${nameOf('class')}`,\n description: `${nameOf('StatusProduct')}.${nameOf('description')}`,\n title: 'Global__Admission',\n showHeaderTitle: false,\n groupDesc: true,\n filterable: true\n }),\n new ApDynGridPropertyColumnConfig({\n field: nameOf('EndDate'),\n title: 'Docu_Ini__EndDate',\n filterable: true,\n width: 80,\n headerFilterable: true,\n hide: true,\n format: this.languageStore.CurrentDateFormat\n }),\n new ApDynGridPropertyColumnConfig({\n field: nameOf('UseByDate'),\n title: 'Global__Expire_Date',\n filterable: true,\n width: 80,\n headerFilterable: true,\n hide: true,\n format: this.languageStore.CurrentDateFormat\n })\n ]\n }),\n new ApDynGridEditColumnConfig({\n data: [{\n callback: ApUtilService.createEventEmitter(this.onStatusToggle.bind(this), this._subscriptions),\n text: (dataItem: IPlantProtectionProductsGridData) => dataItem.SourceItem.Selectable\n ? 'Global__Disable'\n : 'Global__Enable',\n disabled: false\n }]\n })\n ];\n this.pager = new ApDynGridPagerConfig({\n listMassEditing: [\n {\n id: PlantProtectionGridActions.Active,\n name: this.translationService.translate('Global__Enable'),\n type: ApGridPagerType.None,\n values: null\n } as IDynGridWizardChoiceData,\n {\n id: PlantProtectionGridActions.Inactive,\n name: this.translationService.translate('Global__Disable'),\n type: ApGridPagerType.None,\n values: null\n } as IDynGridWizardChoiceData\n ],\n apply: this._applyClicked,\n hasPermission: true\n });\n }\n\n /**\n * Handles mass edit actions for plant protection products\n * Updates the selectability of multiple products\n * @param data The selected mass edit action data\n * @private\n */\n private onApplyClicked(data: IGridPagerData): void {\n const ppProducts: IPlantProtectionProduct[] = [];\n const rows = this.dynComponent.getSelectedItems() as IPlantProtectionProductsGridData[];\n for (const row of rows) {\n const item = ObjectFactory.Copy(row.SourceItem);\n if (item) {\n item.Selectable = data.object.id === PlantProtectionGridActions.Active;\n ppProducts.push(item);\n }\n }\n if (ppProducts?.length > 0) {\n this.plantProtectionProductStore.updateSelectablePlantProtectionProduct(ppProducts);\n }\n }\n\n /**\n * Toggles the selectable status of a single plant protection product\n * @param item The grid item whose status is to be changed\n * @private\n */\n private onStatusToggle(item: IPlantProtectionProductsGridData): void {\n const copiedPlantProtectionProduct = ObjectFactory.Copy(item.SourceItem);\n if (copiedPlantProtectionProduct) {\n copiedPlantProtectionProduct.Selectable = !copiedPlantProtectionProduct.Selectable;\n this.plantProtectionProductStore.updateSelectablePlantProtectionProduct([copiedPlantProtectionProduct]);\n }\n }\n\n /**\n * Determines the selection status of a product\n * @param productSelected Boolean indicating if the product is selected\n * @returns Grid status object with state, class, and description\n * @private\n */\n private getSelectionStatus(productSelected: boolean): IGridStatus {\n if (productSelected === true) {\n return {\n state: ApColumnState.Green,\n class: 'ap-status-green',\n description: 'Global__Active'\n };\n }\n return {\n state: ApColumnState.Red,\n class: 'ap-status-red',\n description: 'Global__Inactive'\n };\n }\n\n /**\n * Determines the product status based on use-by and permission end dates\n * @param useByDate The date until the product can be used\n * @param permissionEndDate The date when product permission expires\n * @returns Grid status object with state, class, and description\n * @private\n */\n private getProductStatus(useByDate: Date, permissionEndDate: Date): IGridStatus {\n const now = new Date();\n if (permissionEndDate > now && useByDate > now) {\n return {\n state: ApColumnState.Green,\n class: 'ap-status-green',\n description: 'Admin_Pages_Booking__Valid'\n };\n } else if (permissionEndDate < now && useByDate >= now) {\n return {\n state: ApColumnState.Yellow,\n class: 'ap-status-yellow',\n description: `${this.translationService.translate('Admin_Pages_Booking__Valid')} (${this.translationService.translate('End_of_admission')})`\n };\n }\n return {\n state: ApColumnState.Red,\n class: 'ap-status-red',\n description: 'AgriConnect_Refused'\n };\n }\n\n /**\n * Parses ingredients from a plant protection product\n * @param plantProtectionProduct The product to parse ingredients from\n * @returns Comma-separated string of ingredients or undefined\n * @private\n */\n private parseIngredients(plantProtectionProduct: IPlantProtectionProduct): string | undefined {\n if (!plantProtectionProduct.Ingredients) {\n return undefined;\n }\n const parsedIngredients = JSON.parse(plantProtectionProduct.Ingredients) as string[];\n if (!Array.isArray(parsedIngredients) || parsedIngredients.length === 0) {\n return undefined;\n }\n return parsedIngredients.join('; ');\n }\n\n /**\n * ONLY for debugMode: builds an additional product tooltip with product's details of application\n * @param plantProtectionProduct\n * @private\n */\n private buildDetailsTooltip(plantProtectionProduct: IPlantProtectionProduct): string {\n if (!plantProtectionProduct?.ProductDetails || plantProtectionProduct?.ProductDetails?.length <= 0 || !ApRoleTypeService.hasAgriconRole(this.loginStore.User)) {\n return '';\n }\n let tooltip = ` ` +\n `\\n\\n` +\n `\\n` +\n `\\n` +\n `\\n` +\n `\\n` +\n `\\n` +\n `\\n` +\n `\\n` +\n `\\n` +\n `\\n` +\n `\\n` +\n `\\n`;\n for (const detail of plantProtectionProduct.ProductDetails) {\n tooltip += '\\n' +\n `\\n` +\n `\\n` +\n `\\n` +\n `\\n` +\n `\\n` +\n `\\n` +\n `\\n` +\n `\\n` +\n `\\n` +\n '\\n';\n }\n tooltip += '\\n
${plantProtectionProduct?.ProductName}
${this.translationService.translate('Global__EC_Min')}${this.translationService.translate('Global__EC_Max')}${this.translationService.translate('Global__Max_Admission')}${this.translationService.translate('Settings__Lbl_Menu_Unit')}${this.translationService.translate('Global__Eppo_Crop')}${this.translationService.translate('Global__Eppo_Harmful_Organism')}${this.translationService.translate('Global__Effective_Range')}${this.translationService.translate('Docu_Ini__WorkType')}${this.translationService.translate('Base_Pages_Rax__IndicationNote')}
${detail.EcMin}${detail.EcMax}${detail.AmountMax}${this.translationService.translate(detail.Unit?.Key)}${detail.EppoCrop ? detail.EppoCrop : ''}${detail.EppoHarmfulOrganism ? detail.EppoHarmfulOrganism : ''}${this.translationService.translate(detail.EffectiveRange?.Key)}${this.translationService.translate(detail?.WorkType?.Description)}${detail?.Indicator ? (detail.Indicator?.length > 200 ? detail.Indicator.slice(0, 200) : detail.Indicator) : ''}
';\n return tooltip;\n }\n}\n","import {AfterContentInit, Component, ViewChild} from '@angular/core';\nimport {ApDynComponentComponent} from '../../ap-dyncomponent/ap-dyncomponent.component';\nimport {\n ApDynGridColumnConfigBase\n} from '../../ap-dyngrids/config/ap-dyn-grid-column-config-base';\nimport {\n ApDynGridPagerConfigBase\n} from '../../ap-dyngrids/config/ap-dyn-grid-pager-config-base';\nimport {\n ApDynGridStatusColumnConfig\n} from '../../ap-dyngrids/config/ap-dyn-grid-status-column-config';\nimport {\n ApDynGridPropertyColumnConfig\n} from '../../ap-dyngrids/config/ap-dyn-grid-property-column-config';\nimport {\n ApDynGridEditColumnConfig\n} from '../../ap-dyngrids/config/ap-dyn-grid-edit-column-config';\nimport {\n ApDynGridPagerWizardConfig,\n ApDynGridPagerWizardSection\n} from '../../ap-dyngrids/config/ap-dyn-grid-pager-wizard-config';\nimport {WorkTypesStore} from '../../stores/base-data/worrktypes.store';\nimport {filter, map} from 'rxjs/operators';\nimport {IGridData} from '../../ap-interface/interfaces';\nimport {FarmUsersStore} from '../../stores/farm/farm.users.store';\nimport {MapViewStore} from '../../stores/layout/mapview.store';\nimport {TranslationStore} from '../../stores/translation/translation.store';\nimport IWorkTypes = Data.BaseData.IWorktypes;\n\n/**\n * TODO Worktypes Shortname und Description Übersetzung --> Jira Ticket angelegt https://jira.agricon.de/browse/APV49-819\n */\n\ninterface IWorkTypesGridData extends IGridData {\n Status: number;\n StatusClass: string;\n StatusDesc: string;\n Type: string;\n Description: string;\n ShortName: string;\n Unit: string;\n}\n\n/**\n * Component for the worktypes\n */\n@Component({\n selector: 'ap-worktypes-overview',\n template: `\n `\n})\n\nexport class ApWorktypesOverviewComponent implements AfterContentInit {\n @ViewChild(ApDynComponentComponent, {static: true}) dynComponent: ApDynComponentComponent;\n columns: ApDynGridColumnConfigBase[] = [];\n pager: ApDynGridPagerConfigBase;\n workTypeLoading$ = this.store.Listen(s => s.loading);\n public items$ = this.store.Listen(s => s.data).pipe(\n filter(d => !!d),\n map(d => d.Convert(workType => {\n const type = this.translationStore.FindTranslationForSelectedLanguage(workType.Category_Text);\n const description = this.translationStore.FindTranslationForSelectedLanguage(workType.Description);\n const shortName = this.translationStore.FindTranslationForSelectedLanguage(workType.Shortname);\n const unit = this.translationStore.FindTranslationForSelectedLanguage(workType.Wt_Unit);\n return {\n Id: workType.Id,\n SourceItem: workType,\n Status: 1,\n StatusClass: 'ap-status-green',\n StatusDesc: 'Global__Active',\n Type: type,\n Description: description,\n ShortName: shortName,\n Unit: unit\n };\n })));\n\n constructor(private store: WorkTypesStore,\n private farmUsersStore: FarmUsersStore,\n private translationStore: TranslationStore,\n private mapViewStore: MapViewStore) {\n this.mapViewStore.hideMapView();\n }\n\n ngAfterContentInit(): void {\n this.gridBuilder();\n }\n\n private gridBuilder(): void {\n this.columns = [\n new ApDynGridStatusColumnConfig({\n field: 'Status',\n showHeaderTitle: true,\n class: 'StatusClass',\n description: 'StatusDesc',\n filterable: true\n }),\n new ApDynGridPropertyColumnConfig({\n field: 'Type',\n title: 'Docu_Ini__Type',\n filterable: true,\n width: 150,\n headerFilterable: true,\n groupIndex: 0,\n groupDesc: false\n }),\n new ApDynGridPropertyColumnConfig({\n field: 'Description',\n title: 'Global__Description',\n filterable: true,\n width: 100,\n headerFilterable: true,\n sortIndex: 0,\n sortDesc: false,\n }),\n new ApDynGridPropertyColumnConfig({\n field: 'Unit',\n title: 'Settings__Lbl_Menu_Unit',\n filterable: true,\n width: 70,\n headerFilterable: true\n }),\n new ApDynGridEditColumnConfig(\n {\n disabled: true\n }\n )\n ];\n this.pager = new ApDynGridPagerWizardConfig(\n new ApDynGridPagerWizardSection(),\n new ApDynGridPagerWizardSection(),\n new ApDynGridPagerWizardSection()\n );\n }\n}\n","import {AfterContentInit, Component, EventEmitter, OnDestroy, ViewChild} from '@angular/core';\nimport {Observable, Subscription} from 'rxjs';\nimport {IApPermissionData, IGridPagerData, IWizardChoiceData} from '../../../../ap-interface/interfaces';\nimport {ApGridPagerType} from '../../../../ap-interface/enums';\nimport {\n ApUsersAssignmentFarmEditComponent\n} from '../../../../entry-components/ap-basedata-entry-components/ap-users-assignment-farm-edit.component';\nimport {ApPermissions} from 'invoker-transport';\nimport {\n ApDynComponentComponent\n} from '../../../../ap-dyncomponent/ap-dyncomponent.component';\nimport {\n ApDynGridColumnConfigBase\n} from '../../../../ap-dyngrids/config/ap-dyn-grid-column-config-base';\nimport {\n ApDynGridPagerConfigBase\n} from '../../../../ap-dyngrids/config/ap-dyn-grid-pager-config-base';\nimport {\n ApDynGridStatusColumnConfig\n} from '../../../../ap-dyngrids/config/ap-dyn-grid-status-column-config';\nimport {\n ApDynGridPropertyColumnConfig\n} from '../../../../ap-dyngrids/config/ap-dyn-grid-property-column-config';\nimport {\n ApDynGridEditColumnConfig\n} from '../../../../ap-dyngrids/config/ap-dyn-grid-edit-column-config';\nimport {\n ApDynGridPagerConfig\n} from '../../../../ap-dyngrids/config/ap-dyn-grid-pager-config';\nimport {UserStore} from '../../../../stores/base-data/user.store';\nimport {\n FarmUsersStore\n} from '../../../../stores/farm/farm.users.store';\nimport {FormStore} from '../../../../stores/layout/form.store';\nimport {MapViewStore} from '../../../../stores/layout/mapview.store';\nimport {\n TranslationStore\n} from '../../../../stores/translation/translation.store';\nimport {\n GetPermissionPipe\n} from '../../../../ap-permission/pipes/get-permission.pipe';\nimport IFarmUsers = Data.Authentication.IFarmUsers;\nimport IUsergroupUser = Data.AccessPermission.IUsergroupUser;\nimport {\n ApRoleTypeService\n} from '../../../../services/common/ap-role-type.service';\n\nenum UserEdits {\n IsActive = 0,\n Remove = 1\n}\n\nenum UserEditGridActions {\n ACTIVE = 1,\n INACTIVE = 0\n}\n\n@Component({\n selector: 'ap-users-assignment-farm',\n template: `\n \n `\n})\nexport class ApUsersAssignmentFarmComponent implements AfterContentInit, OnDestroy {\n @ViewChild(ApDynComponentComponent, {static: true}) dynComponent: ApDynComponentComponent;\n columns: ApDynGridColumnConfigBase[] = [];\n items: any[] = [];\n pager: ApDynGridPagerConfigBase;\n farmUsersLoading$: Observable;\n ApPermissions = ApPermissions;\n apPermissionData: IApPermissionData;\n\n private _listMassEditing = [];\n private _subscriptions: Array = [];\n private _applyClicked = new EventEmitter();\n\n constructor(private usersStore: UserStore,\n private formStore: FormStore,\n private mapViewStore: MapViewStore,\n private translationStore: TranslationStore,\n private farmUsersStore: FarmUsersStore,\n private roleTypeService: ApRoleTypeService,\n private permissionPipe: GetPermissionPipe) {\n this._subscriptions.push(this._applyClicked.subscribe((e) => this._onApplyClicked(e)));\n this.mapViewStore.hideMapView();\n }\n\n ngAfterContentInit(): void {\n this.getDataFromStore();\n this.gridBuilder();\n this.fillWizardChoiceData();\n }\n\n getDataFromStore(): void {\n this.farmUsersLoading$ = this.farmUsersStore.Listen(s => s.loading);\n this.usersStore.loadUsers();\n this._subscriptions.push(this.farmUsersStore.Listen(s => s.data).subscribe(fu => {\n if (fu == null) {\n return;\n }\n this.items = fu.FindAll(_ => !ApRoleTypeService.hasAgriconRole(_.User) && _.User?.IsConsultant === false).map(farmUser => {\n const userGroups = this.getUserGroups(farmUser.UsergroupUser);\n return {\n Id: farmUser.Id,\n SourceItem: farmUser,\n Status: farmUser.IsActive ? 1 : -1,\n StatusClass: farmUser.IsActive ? 'ap-status-green' : 'ap-status-red',\n StatusDesc: farmUser.IsActive ? 'Global__Active' : 'Global__Inactive',\n UserGroups: userGroups,\n };\n });\n }));\n\n }\n\n ngOnDestroy(): void {\n this._subscriptions.forEach(d => {\n d.unsubscribe();\n });\n }\n\n onCreate(): void {\n setTimeout(() => this.formStore.openForm({component: ApUsersAssignmentFarmEditComponent, data: null}), 1);\n }\n\n getUserGroups(items: IUsergroupUser[]): string[] {\n return items.Convert(i => this.translationStore.FindTranslationForSelectedLanguage(i.Usergroup.Name));\n }\n\n fillWizardChoiceData(): void {\n const state = {\n id: UserEdits.IsActive,\n name: this.translationStore.FindTranslationForSelectedLanguage('Global__Status'),\n type: ApGridPagerType.DropDown,\n values: [\n {\n id: UserEditGridActions.ACTIVE,\n label: this.translationStore.FindTranslationForSelectedLanguage('Global__Active')\n },\n {\n id: UserEditGridActions.INACTIVE,\n label: this.translationStore.FindTranslationForSelectedLanguage('Global__Inactive')\n }\n ]\n } as IWizardChoiceData;\n this._listMassEditing.push(state);\n const remove = {\n id: UserEdits.Remove,\n name: this.translationStore.FindTranslationForSelectedLanguage('Global_Remove'),\n type: ApGridPagerType.None,\n values: null,\n } as IWizardChoiceData;\n this._listMassEditing.push(remove);\n }\n\n private gridBuilder(): void {\n this.columns = [\n new ApDynGridStatusColumnConfig({\n field: 'Status',\n showHeaderTitle: true,\n class: 'StatusClass',\n description: 'StatusDesc',\n filterable: true,\n sortIndex: 0,\n sortDesc: true,\n groupIndex: 0,\n groupDesc: true\n }),\n new ApDynGridPropertyColumnConfig({\n field: 'SourceItem.Farm.FarmName',\n title: 'Global__Farm',\n filterable: true,\n width: 120,\n headerFilterable: true,\n sortIndex: 1,\n sortDesc: false,\n groupIndex: 1,\n groupDesc: false\n }),\n new ApDynGridPropertyColumnConfig({\n field: 'SourceItem.User.Forename',\n title: 'Global__Forename',\n filterable: true,\n width: 50,\n headerFilterable: true\n }),\n new ApDynGridPropertyColumnConfig({\n field: 'SourceItem.User.Surname',\n title: 'Global__Surname',\n filterable: true,\n width: 50,\n headerFilterable: true,\n }),\n new ApDynGridPropertyColumnConfig({\n field: 'SourceItem.User.UserName',\n title: 'Global__Username',\n filterable: true,\n width: 50,\n headerFilterable: true,\n }),\n new ApDynGridPropertyColumnConfig({\n field: 'SourceItem.User.EMail',\n title: 'Global__Email',\n filterable: true,\n width: 80,\n headerFilterable: true,\n }),\n new ApDynGridPropertyColumnConfig({\n field: 'UserGroups',\n title: 'Global_User_Groups',\n filterable: true,\n width: 80,\n headerFilterable: true,\n }),\n new ApDynGridPropertyColumnConfig({\n field: 'SourceItem.IsDriver',\n title: 'Global__Worker',\n filterable: true,\n width: 50,\n headerFilterable: true,\n checkbox: true,\n }),\n new ApDynGridEditColumnConfig(\n {\n disabled: true\n }\n )\n ];\n this.permissionPipe.transform(ApPermissions.EDIT_USERS).subscribe(permission => {\n this.pager = new ApDynGridPagerConfig({\n listMassEditing: this._listMassEditing,\n apply: this._applyClicked,\n hasPermission: permission,\n });\n });\n }\n\n private _onApplyClicked(data: IGridPagerData): void {\n const rows = this.dynComponent.getSelectedItems();\n switch (data.object.id) {\n case UserEdits.IsActive:\n rows.forEach(row => {\n let val = false;\n if (data.object.id === UserEditGridActions.ACTIVE) {\n val = true;\n }\n (row as IFarmUsers).IsActive = val;\n this.farmUsersStore.update(row as IFarmUsers);\n });\n break;\n case UserEdits.Remove:\n rows.forEach(row => {\n this.farmUsersStore.delete(row as IFarmUsers);\n });\n break;\n }\n }\n}\n\n","import {AfterContentInit, Component, EventEmitter, OnDestroy, ViewChild} from '@angular/core';\nimport {Observable, Subscription} from 'rxjs';\nimport {IApPermissionData, IGridPagerData, IWizardChoiceData} from '../../../../ap-interface/interfaces';\nimport {ApGridPagerType} from '../../../../ap-interface/enums';\nimport {ApPermissions} from 'invoker-transport';\nimport {\n ApUsersEditComponent\n} from '../../../../entry-components/ap-settings-entry-components/ap-users-edit.component';\nimport {\n ApDynComponentComponent\n} from '../../../../ap-dyncomponent/ap-dyncomponent.component';\nimport {\n ApDynGridColumnConfigBase\n} from '../../../../ap-dyngrids/config/ap-dyn-grid-column-config-base';\nimport {\n ApDynGridPagerConfigBase\n} from '../../../../ap-dyngrids/config/ap-dyn-grid-pager-config-base';\nimport {\n ApDynGridStatusColumnConfig\n} from '../../../../ap-dyngrids/config/ap-dyn-grid-status-column-config';\nimport {\n ApDynGridPropertyColumnConfig\n} from '../../../../ap-dyngrids/config/ap-dyn-grid-property-column-config';\nimport {\n ApDynGridEditColumnConfig\n} from '../../../../ap-dyngrids/config/ap-dyn-grid-edit-column-config';\nimport {\n ApDynGridPagerConfig\n} from '../../../../ap-dyngrids/config/ap-dyn-grid-pager-config';\nimport {GetBooleanPipe} from '../../../../ap-utils';\nimport {\n FarmUsersStore\n} from '../../../../stores/farm/farm.users.store';\nimport {FormStore} from '../../../../stores/layout/form.store';\nimport {MapViewStore} from '../../../../stores/layout/mapview.store';\nimport {\n TranslationStore\n} from '../../../../stores/translation/translation.store';\nimport {\n GetPermissionPipe\n} from '../../../../ap-permission/pipes/get-permission.pipe';\nimport {LoginStore} from '../../../../stores/login/login.store';\nimport IFarmUsers = Data.Authentication.IFarmUsers;\nimport IUsergroupUser = Data.AccessPermission.IUsergroupUser;\nimport {\n ApRoleTypeService\n} from '../../../../services/common/ap-role-type.service';\n\nenum UserEdits {\n IsActive = 0,\n Remove = 1\n}\n\nenum UserEditGridActions {\n ACTIVE = 1,\n INACTIVE = 0\n}\n\n@Component({\n selector: 'ap-users',\n template: `\n \n `\n})\n\nexport class ApUsersComponent implements AfterContentInit, OnDestroy {\n @ViewChild(ApDynComponentComponent, {static: true}) dynComponent: ApDynComponentComponent;\n columns: ApDynGridColumnConfigBase[] = [];\n items: any[] = [];\n pager: ApDynGridPagerConfigBase;\n farmUsersLoading$: Observable;\n\n ApPermissions = ApPermissions;\n apPermissionData: IApPermissionData;\n private _listMassEditing = [];\n private _subscriptions: Array = [];\n private _applyClicked = new EventEmitter();\n\n constructor(private formStore: FormStore,\n private farmUsersStore: FarmUsersStore,\n private translationStore: TranslationStore,\n private mapViewStore: MapViewStore,\n private booleanPipe: GetBooleanPipe,\n private permissionPipe: GetPermissionPipe,\n private loginStore: LoginStore) {\n this.mapViewStore.hideMapView();\n this._subscriptions.push(this._applyClicked.subscribe((e) => this._onApplyClicked(e)));\n }\n\n ngAfterContentInit(): void {\n this.getDataFromStore();\n this.gridBuilder();\n this.fillWizardChoiceData();\n }\n\n getDataFromStore(): void {\n this.farmUsersLoading$ = this.farmUsersStore.Listen(s => s.loading);\n this._subscriptions.push(this.farmUsersStore.Listen(s => s.data).subscribe(fu => {\n if (fu == null) {\n return;\n }\n const farmUsers = fu.FindAll(_ => _.FarmId === this.loginStore.SelectedFarmId && _.User?.IsConsultant === false && !ApRoleTypeService.hasAgriconRole(_.User));\n this.items = farmUsers.map(users => {\n const userGroups = this.getUserGroups(users.UsergroupUser);\n return {\n Id: users.Id,\n SourceItem: users,\n UserGroups: userGroups,\n Status: users.IsActive ? 1 : -1,\n StatusClass: users.IsActive ? 'ap-status-green' : 'ap-status-red',\n StatusDesc: users.IsActive ? 'Global__Active' : 'Global__Inactive',\n IsDriver: this._boolean(users.IsDriver),\n };\n });\n }));\n }\n\n ngOnDestroy(): void {\n this._subscriptions.forEach(d => {\n d.unsubscribe();\n });\n }\n\n getUserGroups(items: IUsergroupUser[]): string[] {\n return items.Convert(i => this.translationStore.FindTranslationForSelectedLanguage(i.Usergroup?.Name));\n }\n\n fillWizardChoiceData(): void {\n const state = {\n id: UserEdits.IsActive,\n name: this.translationStore.FindTranslationForSelectedLanguage('Global__Status'),\n type: ApGridPagerType.DropDown,\n values: [\n {\n id: UserEditGridActions.ACTIVE,\n label: this.translationStore.FindTranslationForSelectedLanguage('Global__Active')\n },\n {\n id: UserEditGridActions.INACTIVE,\n label: this.translationStore.FindTranslationForSelectedLanguage('Global__Inactive')\n }\n ]\n } as IWizardChoiceData;\n this._listMassEditing.push(state);\n const remove = {\n id: UserEdits.Remove,\n name: this.translationStore.FindTranslationForSelectedLanguage('Global_Remove'),\n type: ApGridPagerType.None,\n values: null,\n } as IWizardChoiceData;\n this._listMassEditing.push(remove);\n }\n\n onCreate(): void {\n setTimeout(() => this.formStore.openForm({component: ApUsersEditComponent, data: null}), 1);\n }\n\n onEdit(dataItem): void {\n setTimeout(() => this.formStore.openForm({component: ApUsersEditComponent, data: dataItem.SourceItem}), 1);\n }\n\n private gridBuilder(): void {\n this.permissionPipe.transform(ApPermissions.EDIT_USERS).subscribe(permission => {\n this.columns = [\n new ApDynGridStatusColumnConfig({\n field: 'Status',\n showHeaderTitle: true,\n class: 'StatusClass',\n description: 'StatusDesc',\n filterable: true,\n sortIndex: 0,\n sortDesc: true,\n groupIndex: 0,\n groupDesc: true\n }),\n new ApDynGridPropertyColumnConfig({\n field: 'SourceItem.User.Forename',\n title: 'Global__Forename',\n filterable: true,\n width: 50,\n headerFilterable: true\n }),\n new ApDynGridPropertyColumnConfig({\n field: 'SourceItem.User.Surname',\n title: 'Global__Surname',\n filterable: true,\n width: 50,\n headerFilterable: true,\n }),\n new ApDynGridPropertyColumnConfig({\n field: 'SourceItem.User.UserName',\n title: 'Global__Username',\n filterable: true,\n width: 50,\n headerFilterable: true,\n }),\n new ApDynGridPropertyColumnConfig({\n field: 'SourceItem.User.EMail',\n title: 'Global__Email',\n filterable: true,\n width: 80,\n headerFilterable: true,\n }),\n new ApDynGridPropertyColumnConfig({\n field: 'UserGroups',\n title: 'Global_User_Groups',\n filterable: true,\n width: 80,\n headerFilterable: true,\n }),\n new ApDynGridPropertyColumnConfig({\n field: 'IsDriver',\n title: 'Global__Worker',\n filterable: true,\n width: 50,\n headerFilterable: true,\n checkbox: true,\n }),\n new ApDynGridEditColumnConfig(\n {\n disabled: !permission,\n }\n )\n ];\n this.pager = new ApDynGridPagerConfig({\n listMassEditing: this._listMassEditing,\n apply: this._applyClicked,\n hasPermission: permission,\n });\n });\n }\n\n private _onApplyClicked(data: IGridPagerData): void {\n const rows = this.dynComponent.getSelectedItems();\n switch (data.object.id) {\n case UserEdits.IsActive:\n rows.forEach(row => {\n let val = false;\n if (data.value.id === UserEditGridActions.ACTIVE) {\n val = true;\n }\n (row as IFarmUsers).IsActive = val;\n this.farmUsersStore.update(row as IFarmUsers);\n });\n break;\n case UserEdits.Remove:\n rows.forEach(row => {\n this.farmUsersStore.delete(row as IFarmUsers);\n });\n break;\n }\n }\n\n private _boolean(value: any): boolean {\n return this.booleanPipe.transform(value);\n }\n}\n","import {AfterContentInit, Component, EventEmitter, OnDestroy, OnInit, ViewChild} from '@angular/core';\nimport {combineLatest, Observable, of, Subscription} from 'rxjs';\nimport {ApGridPagerType, IApPermissionData, IGridPagerData, IWizardChoiceData} from '../../../../ap-interface';\nimport {ApPermissions} from 'invoker-transport';\nimport {\n ApDynComponentComponent\n} from '../../../../ap-dyncomponent/ap-dyncomponent.component';\nimport {\n ApDynGridColumnConfigBase\n} from '../../../../ap-dyngrids/config/ap-dyn-grid-column-config-base';\nimport {\n ApDynGridPagerConfigBase\n} from '../../../../ap-dyngrids/config/ap-dyn-grid-pager-config-base';\nimport {GetBooleanPipe} from '../../../../ap-utils';\nimport {\n ApGetAvailableUserGroupsPipe\n} from '../../../../stores/pipes/ap-get-available-usergroups.pipe';\nimport {\n ApDynGridStatusColumnConfig\n} from '../../../../ap-dyngrids/config/ap-dyn-grid-status-column-config';\nimport {\n ApDynGridPropertyColumnConfig\n} from '../../../../ap-dyngrids/config/ap-dyn-grid-property-column-config';\nimport {\n ApDynGridEditColumnConfig\n} from '../../../../ap-dyngrids/config/ap-dyn-grid-edit-column-config';\nimport {\n ApDynGridPagerConfig\n} from '../../../../ap-dyngrids/config/ap-dyn-grid-pager-config';\nimport {\n ApUsersInvitationEditComponent\n} from '../../../../entry-components/ap-basedata-entry-components/ap-users-invitation-edit.component';\nimport {\n InvitationStore\n} from '../../../../stores/login/invitation.store';\nimport {\n FormStore\n} from '../../../../stores/layout/form.store';\nimport {\n MapViewStore\n} from '../../../../stores/layout/mapview.store';\nimport {\n TranslationStore\n} from '../../../../stores/translation/translation.store';\nimport {\n GetPermissionPipe\n} from '../../../../ap-permission/pipes/get-permission.pipe';\nimport {\n LanguageStore\n} from '../../../../stores/translation/language.store';\nimport {\n ApUtilService\n} from '../../../../ap-utils/service/ap-util.service';\nimport {\n NotifyStore\n} from '../../../../stores/dialog/notify.store';\nimport {\n ApDateService\n} from '../../../../ap-core/services/ap-date-service';\nimport {map} from 'rxjs/operators';\nimport IApValidationResult = Data.Api.Validation.IApValidationResult;\nimport IInvitations = Data.Authentication.IInvitations;\n\nenum UserInvitations {\n Remove = 0\n}\n\nenum UserInvitationsStatus {\n Waiting = 0,\n Activated = 1,\n Expired = 2\n}\n\n@Component({\n selector: 'ap-users-invitation',\n template: `\n \n `\n})\nexport class ApUsersInvitationComponent implements OnInit, AfterContentInit, OnDestroy {\n @ViewChild(ApDynComponentComponent, {static: true}) dynComponent: ApDynComponentComponent;\n public items$: Observable = of([]);\n public columns: ApDynGridColumnConfigBase[] = [];\n public pager: ApDynGridPagerConfigBase;\n public invitationsLoading$: Observable;\n public ApPermissions = ApPermissions;\n public apPermissionData: IApPermissionData;\n\n private _listMassEditing: any[] = [];\n private _subscriptions: Array = [];\n private _applyClicked: EventEmitter = new EventEmitter();\n private _listUserGroupItems: Array<{ text: string, value: number }> = [];\n\n constructor(private invitationStore: InvitationStore,\n private mapViewStore: MapViewStore,\n private formStore: FormStore,\n private translationStore: TranslationStore,\n private languageStore: LanguageStore,\n private notifyStore: NotifyStore,\n private dateService: ApDateService,\n private permissionPipe: GetPermissionPipe,\n private booleanPipe: GetBooleanPipe,\n private getAvailableUserGroups: ApGetAvailableUserGroupsPipe) {\n }\n\n ngOnInit(): void {\n this.mapViewStore.hideMapView();\n }\n\n ngAfterContentInit(): void {\n this._gridBuilder();\n this._listUserGroupItems = this.getAvailableUserGroups.transform();\n this.invitationsLoading$ = this.invitationStore.Listen(s => s.loading);\n this.invitationStore.loadInvitations();\n this._getItems();\n this._fillWizardChoiceData();\n this._subscriptions.push(this._applyClicked.subscribe((e) => this._onApplyClicked(e)));\n this._subscriptions.push(this.invitationStore.Listen(x => x.isInvitationResend)\n .subscribe(resendResult => {\n if (resendResult === undefined) {\n return;\n }\n const notification = {\n DisplayTimeout: 5\n } as IApValidationResult;\n if (resendResult) {\n notification.Level = Data.Api.Validation.ApValidationLevel.Success;\n notification.ErrorKey = 'Global__Invitations_Resend_Successfully';\n } else {\n notification.Level = Data.Api.Validation.ApValidationLevel.Error;\n notification.ErrorKey = 'Global__Invitations_Resend_Fail';\n }\n this.notifyStore.addMessage(notification);\n }\n ));\n }\n\n ngOnDestroy(): void {\n this._subscriptions.forEach(d => d.unsubscribe());\n }\n\n public onCreate(): void {\n setTimeout(() => this.formStore.openForm({component: ApUsersInvitationEditComponent, data: null}), 1);\n }\n\n private _getItems(): void {\n this.items$ = combineLatest([\n this.invitationStore.Listen(s => s.data)\n ]).pipe(\n map(([invitations]) => {\n return invitations.map((invitation: IInvitations): any => {\n const status = this._getStatus(invitation);\n const userGroups = this._getUserGroups(invitation.Usergroupid);\n return {\n Id: invitation.Id,\n SourceItem: invitation,\n UserGroups: userGroups,\n Status: status,\n StatusClass: this._getStatusClass(status),\n StatusDesc: this._getStatusDescription(status),\n Date: invitation.Created ? this.dateService.dateToMoment(invitation.Created).format('DD.MM.YYYY') : null,\n IsDriver: this._boolean(invitation.Isdriver),\n };\n });\n }));\n }\n\n private _fillWizardChoiceData(): void {\n const remove = {\n id: UserInvitations.Remove,\n name: this.translationStore.FindTranslationForSelectedLanguage('Global__Delete'),\n type: ApGridPagerType.None,\n values: null,\n } as IWizardChoiceData;\n this._listMassEditing.push(remove);\n }\n\n private _gridBuilder(): void {\n this.languageStore.SelectedLanguage$.subscribe(l => {\n this.columns = [\n new ApDynGridStatusColumnConfig({\n field: 'Status',\n showHeaderTitle: true,\n class: 'StatusClass',\n description: 'StatusDesc',\n filterable: true,\n sortIndex: 0,\n sortDesc: true,\n groupIndex: 0,\n groupDesc: true\n }),\n new ApDynGridPropertyColumnConfig({\n field: 'SourceItem.Email',\n title: 'Global__Email',\n filterable: true,\n width: 120,\n headerFilterable: true,\n }),\n new ApDynGridPropertyColumnConfig({\n field: 'Date',\n title: 'Global__CreatedAt',\n filterable: true,\n width: 120,\n headerFilterable: true,\n format: l.DateFormat\n }),\n new ApDynGridPropertyColumnConfig({\n field: 'UserGroups',\n title: 'Global_User_Group',\n filterable: true,\n width: 120,\n headerFilterable: true,\n }),\n new ApDynGridPropertyColumnConfig({\n field: 'IsDriver',\n title: 'Global__Worker',\n filterable: true,\n width: 50,\n headerFilterable: true,\n checkbox: true,\n }),\n new ApDynGridEditColumnConfig(\n {\n data: [\n {\n text: 'Global__Invitations_Resend',\n callback: ApUtilService.createEventEmitter(this._resendInvitation.bind(this), this._subscriptions),\n disabled: (dataItem: any): boolean => dataItem.Status === UserInvitationsStatus.Activated\n }\n ]\n }\n )\n ];\n this.permissionPipe.transform(ApPermissions.EDIT_USERS).subscribe(permission => {\n this.pager = new ApDynGridPagerConfig({\n listMassEditing: this._listMassEditing,\n apply: this._applyClicked,\n hasPermission: permission,\n });\n });\n });\n }\n\n private _resendInvitation(dataItem: any): void {\n this.invitationStore.resend(dataItem.SourceItem.Email);\n }\n\n private _onApplyClicked(data: IGridPagerData): void {\n const rows = this.dynComponent.getSelectedItems();\n rows.forEach(row => {\n if (data.object.id === UserInvitations.Remove) {\n this.invitationStore.delete(row as IInvitations);\n }\n });\n }\n\n private _getUserGroups(item: number): string {\n const group = this._listUserGroupItems.Find(_ => _?.value === item);\n return group !== undefined ? this.translationStore.FindTranslationForSelectedLanguage(group?.text) : '';\n }\n\n private _boolean(value: any): boolean {\n return this.booleanPipe.transform(value);\n }\n\n private _getStatus(invitation: IInvitations): UserInvitationsStatus {\n if (invitation.Confirmation_Time) {\n return UserInvitationsStatus.Activated;\n }\n if (invitation.Created) {\n const invitationDate = new Date(invitation.Created);\n invitationDate.setDate(invitationDate.getDate() + 7);\n if (invitationDate > this.dateService.getUtc()) {\n return UserInvitationsStatus.Waiting;\n }\n }\n return UserInvitationsStatus.Expired;\n }\n\n private _getStatusClass(status: UserInvitationsStatus): string {\n switch (status) {\n case UserInvitationsStatus.Waiting:\n return 'ap-status-yellow';\n case UserInvitationsStatus.Activated:\n return 'ap-status-green';\n case UserInvitationsStatus.Expired:\n return 'ap-status-red';\n }\n }\n\n private _getStatusDescription(status: UserInvitationsStatus): string {\n switch (status) {\n case UserInvitationsStatus.Waiting:\n return 'Global__Invitations_Waiting';\n case UserInvitationsStatus.Activated:\n return 'Global__Invitations_Activated';\n case UserInvitationsStatus.Expired:\n return 'Global__Invitations_Expired';\n }\n }\n}\n","import {\n AfterContentInit,\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n OnDestroy,\n OnInit,\n ViewChild\n} from '@angular/core';\nimport {FormBuilder} from '@angular/forms';\n\nimport {filter, map} from 'rxjs/operators';\n\nimport {Observable, Subscription} from 'rxjs';\nimport {\n ApDynComponentComponent\n} from '../../../../ap-dyncomponent/ap-dyncomponent.component';\nimport {\n ApDynGridColumnConfigBase,\n ApDynGridColumnHideConfig\n} from 'src/app/ap-dyngrids/config/ap-dyn-grid-column-config-base';\nimport {\n ApDynGridPagerConfig\n} from '../../../../ap-dyngrids/config/ap-dyn-grid-pager-config';\nimport {\n UserContactsStore\n} from '../../../../stores/base-data/user.contacts.store';\nimport {\n CampaignYearStore\n} from '../../../../stores/login/campaignyear.store';\nimport {FormStore} from '../../../../stores/layout/form.store';\nimport {ApGridPagerType, IGridData, IGridPagerData, IWizardChoiceData} from '../../../../ap-interface';\nimport {\n ApDynGridPropertyColumnConfig\n} from '../../../../ap-dyngrids/config/ap-dyn-grid-property-column-config';\nimport {\n ApDynGridStatusColumnConfig\n} from '../../../../ap-dyngrids/config/ap-dyn-grid-status-column-config';\nimport {\n TranslationStore\n} from '../../../../stores/translation/translation.store';\nimport {\n ApDynGridEditColumnConfig\n} from '../../../../ap-dyngrids/config/ap-dyn-grid-edit-column-config';\nimport {\n ApUserContactsEditComponent\n} from '../../../../entry-components/ap-basedata-entry-components/ap-user-contacts-edit.component';\nimport {ObjectFactory} from 'ts-tooling';\nimport IUserContacts = Data.BaseData.IUserContacts;\n\ninterface IUserContactsGridData extends IGridData {\n Status: number;\n StatusClass: string;\n StatusDesc: string;\n}\n\nenum UserContactEdits {\n IsActive = 0,\n Remove = 1\n}\n\nenum UserContactEditGridActions {\n ACTIVE = 1,\n INACTIVE = 0\n}\n\n/**\n * Component for the user_contacts overview\n */\n@Component({\n selector: 'ap-user-contacts',\n template: `\n \n `,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\n\n/**\n * User-Contacts overview component.\n */\nexport class ApUserContactsOverviewComponent implements OnInit, AfterContentInit, OnDestroy {\n @ViewChild(ApDynComponentComponent, {static: true}) dynComponent;\n public userContactsLoading$: Observable;\n public items$: Observable;\n public columns: ApDynGridColumnConfigBase[];\n public pager: ApDynGridPagerConfig;\n private _subscriptions: Subscription[] = [];\n private _listMassEditing = [];\n private _applyClicked = new EventEmitter();\n\n constructor(public userContactsStore: UserContactsStore,\n private fb: FormBuilder,\n private formStore: FormStore,\n private translationStore: TranslationStore,\n private campaignYearStore: CampaignYearStore) {\n this._subscriptions.push(this._applyClicked.subscribe((e) => this._onApplyClicked(e)));\n this.userContactsLoading$ = this.userContactsStore.Listen(s => s.loading);\n this.items$ = this.userContactsStore.Listen(s => s.data).pipe(\n filter(d => !!d),\n map(u => u.filter(_ => !_.DeletedAt)),\n map(d => d.Convert(userContact => ({\n Id: userContact.Id,\n SourceItem: userContact,\n Status: userContact.IsActive ? 1 : -1,\n StatusClass: userContact.IsActive ? 'ap-status-green' : 'ap-status-red',\n StatusDesc: userContact.IsActive ? 'Global__Active' : 'Global__Inactive',\n }))),\n );\n }\n\n ngAfterContentInit(): void {\n this.fillWizardChoiceData();\n this.gridBuilder();\n }\n\n ngOnInit(): void {\n this._subscriptions.push(this.campaignYearStore.Listen(s => s.selectedYear).subscribe(() => {\n this.userContactsStore.loadUserContacts();\n }));\n }\n\n ngOnDestroy(): void {\n this._subscriptions.forEach(s => s.unsubscribe());\n }\n\n onCreate(): void {\n setTimeout(() => this.formStore.openForm({component: ApUserContactsEditComponent, data: null}), 1);\n }\n\n onEdit(dataItem): void {\n setTimeout(() => this.formStore.openForm({component: ApUserContactsEditComponent, data: dataItem.SourceItem}), 1);\n }\n\n /**\n * Build grid columns\n */\n gridBuilder(): void {\n this.columns = [\n new ApDynGridStatusColumnConfig({\n field: 'Status', showHeaderTitle: false,\n class: 'StatusClass', description: 'StatusDesc', filterable: true\n }),\n new ApDynGridPropertyColumnConfig({\n field: 'SourceItem.Firstname', title: 'Global__Forename',\n filterable: true,\n headerFilterable: true, sortIndex: 0\n }),\n new ApDynGridPropertyColumnConfig({\n field: 'SourceItem.Lastname', title: 'Global__Name',\n filterable: true,\n headerFilterable: true,\n hide: new ApDynGridColumnHideConfig({\n mapHide: true\n })\n }),\n new ApDynGridPropertyColumnConfig({\n field: 'SourceItem.FarmName', title: 'Global_Organization',\n filterable: true,\n headerFilterable: true\n }),\n new ApDynGridPropertyColumnConfig({\n field: 'SourceItem.MailAddress', title: 'Global__Email',\n filterable: true,\n headerFilterable: true\n }),\n new ApDynGridEditColumnConfig()\n ];\n this.pager = new ApDynGridPagerConfig({\n listMassEditing: this._listMassEditing,\n apply: this._applyClicked\n });\n }\n\n fillWizardChoiceData(): void {\n const state = {\n id: UserContactEdits.IsActive,\n name: this.translationStore.FindTranslationForSelectedLanguage('Global__Status'),\n type: ApGridPagerType.DropDown,\n values: [\n {\n id: UserContactEditGridActions.ACTIVE,\n label: this.translationStore.FindTranslationForSelectedLanguage('Global__Active')\n },\n {\n id: UserContactEditGridActions.INACTIVE,\n label: this.translationStore.FindTranslationForSelectedLanguage('Global__Inactive')\n }\n ]\n } as IWizardChoiceData;\n this._listMassEditing.push(state);\n const remove = {\n id: UserContactEdits.Remove,\n name: this.translationStore.FindTranslationForSelectedLanguage('Global_Remove'),\n type: ApGridPagerType.None,\n values: null,\n } as IWizardChoiceData;\n this._listMassEditing.push(remove);\n }\n\n private _onApplyClicked(data: IGridPagerData): void {\n const rows = this.dynComponent.getSelectedItems();\n rows.forEach(row => {\n const userContact = ObjectFactory.Copy(row['SourceItem'] as IUserContacts);\n if (!userContact) {\n return;\n }\n switch (data.object.id) {\n case UserContactEdits.IsActive:\n userContact.IsActive = (data.value.id === UserContactEditGridActions.ACTIVE);\n this.userContactsStore.updateUserContact(userContact);\n break;\n case UserContactEdits.Remove:\n this.userContactsStore.deleteUserContact(userContact);\n break;\n }\n });\n }\n}\n","\n \n\n\n
\n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n\n \n
\n","import {ChangeDetectionStrategy, Component, OnInit, ViewChild} from '@angular/core';\nimport {ApUsersAssignmentFarmComponent} from './assignment/ap-users-assignment-farm.component';\nimport {ApUsersComponent} from './user/ap-users.component';\nimport {ApUsersInvitationComponent} from './invitation/ap-users-invitation.component';\nimport {\n ApUsersInvitationEditComponent\n} from '../../../entry-components/ap-basedata-entry-components/ap-users-invitation-edit.component';\nimport {ApPermissions} from 'invoker-transport';\nimport {FormStore} from '../../../stores/layout/form.store';\nimport {MapViewStore} from '../../../stores/layout/mapview.store';\nimport {\n ApUserContactsOverviewComponent\n} from './user-contacts/ap-user-contacts-overview.component';\nimport {\n ApUserContactsEditComponent\n} from '../../../entry-components/ap-basedata-entry-components/ap-user-contacts-edit.component';\n\n/**\n * TODO: Meldung Admin Entfernt sich selber\n */\n\nexport enum UserTabs {\n User = 0,\n Invitation = 1,\n Contacts = 2\n}\n\n@Component({\n selector: 'ap-users-overview',\n templateUrl: 'ap-users-overview.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class ApUsersOverviewComponent implements OnInit {\n @ViewChild(ApUsersComponent, {static: false})\n public usersComponent: ApUsersComponent;\n\n @ViewChild(ApUsersAssignmentFarmComponent, {static: false})\n public userAssigmentFarmComponent: ApUsersAssignmentFarmComponent;\n\n @ViewChild(ApUsersInvitationComponent, {static: false})\n public userInvitationComponent: ApUsersInvitationComponent;\n\n @ViewChild(ApUserContactsOverviewComponent, {static: false})\n public userContactsComponent: ApUserContactsOverviewComponent;\n\n public showAssigmentTab = false;\n public selectedTab: UserTabs = UserTabs.User;\n public ApPermissions = ApPermissions;\n\n constructor(private formStore: FormStore,\n private mapViewStore: MapViewStore) {\n }\n\n ngOnInit(): void {\n this.mapViewStore.hideMapView();\n }\n\n public selectTab(e: any): void {\n switch (this.selectedTab) {\n case UserTabs.User:\n this.usersComponent?.dynComponent?.dynGrid?.filterGrid('');\n break;\n case UserTabs.Invitation:\n this.userInvitationComponent?.dynComponent?.dynGrid?.filterGrid('');\n break;\n case UserTabs.Contacts:\n this.userContactsComponent?.dynComponent?.dynGrid?.filterGrid('');\n break;\n }\n this.selectedTab = e.index;\n }\n\n public searchIn(value: string): void {\n switch (this.selectedTab) {\n case UserTabs.User:\n this.usersComponent?.dynComponent?.dynGrid?.filterGrid(value);\n break;\n case UserTabs.Invitation:\n this.userInvitationComponent?.dynComponent?.dynGrid?.filterGrid(value);\n break;\n case UserTabs.Contacts:\n this.userContactsComponent?.dynComponent?.dynGrid?.filterGrid(value);\n break;\n }\n }\n\n public createNew(): void {\n switch (this.selectedTab) {\n case UserTabs.User:\n this.formStore.openForm({component: ApUsersInvitationEditComponent, data: null});\n return;\n case UserTabs.Invitation:\n this.formStore.openForm({component: ApUsersInvitationEditComponent, data: null});\n return;\n case UserTabs.Contacts:\n this.formStore.openForm({component: ApUserContactsEditComponent, data: null});\n return;\n default:\n return;\n }\n }\n\n public isCreateNewAllowed(): boolean {\n switch (this.selectedTab) {\n case UserTabs.User:\n case UserTabs.Contacts:\n case UserTabs.Invitation:\n return true;\n }\n }\n}\n","import {NgModule} from '@angular/core';\nimport {Route, RouterModule} from '@angular/router';\nimport {ApCroptypesOverviewComponent} from './components/ap-croptypes.component';\nimport {PageMode} from '../ap-interface';\nimport {ApSubFarmsComponent} from './components/ap-subfarms.component';\nimport {ApDocuRessourcesComponent} from './components/ap-docu-ressources.component';\nimport {ApVarietiesOverviewComponent} from './components/ap-varieties.component';\nimport {ApFertilizersOverviewComponent} from './components/ap-fertilizers.component';\nimport {ApPlantProtectionProductsComponent} from './components/ap-plant-protection-products.component';\nimport {ApWorktypesOverviewComponent} from './components/ap-worktypes.component';\nimport {ApUsersOverviewComponent} from './components/users/ap-users-overview.component';\nimport {ApPermissionGuard} from '../guards/ap-permission-guard.service';\n\nconst routes: Route[] = [\n {\n path: 'croptypes',\n component: ApCroptypesOverviewComponent,\n canActivate: [ApPermissionGuard],\n data: {\n login: true,\n layout: PageMode.HALFSCREEN\n }\n },\n {\n path: 'subfarms',\n component: ApSubFarmsComponent,\n canActivate: [ApPermissionGuard],\n data: {\n login: true,\n layout: PageMode.HALFSCREEN\n }\n },\n {\n path: 'docu-ressources',\n component: ApDocuRessourcesComponent,\n canActivate: [ApPermissionGuard],\n data: {\n login: true,\n layout: PageMode.HALFSCREEN\n }\n },\n {\n path: 'users',\n component: ApUsersOverviewComponent,\n canActivate: [ApPermissionGuard],\n data: {\n login: true,\n layout: PageMode.HALFSCREEN\n }\n },\n {\n path: 'varieties',\n component: ApVarietiesOverviewComponent,\n canActivate: [ApPermissionGuard],\n data: {\n login: true,\n layout: PageMode.HALFSCREEN\n }\n },\n {\n path: 'fertilizers',\n component: ApFertilizersOverviewComponent,\n canActivate: [ApPermissionGuard],\n data: {\n login: true,\n layout: PageMode.HALFSCREEN\n }\n },\n {\n path: 'plant-protections',\n component: ApPlantProtectionProductsComponent,\n canActivate: [ApPermissionGuard],\n data: {\n login: true,\n layout: PageMode.HALFSCREEN\n }\n },\n {\n path: 'worktypes',\n component: ApWorktypesOverviewComponent,\n canActivate: [ApPermissionGuard],\n data: {\n login: true,\n layout: PageMode.HALFSCREEN\n }\n },\n];\n\n@NgModule({\n imports: [\n RouterModule.forChild(routes)\n ],\n exports: [RouterModule]\n})\nexport class ApBasedataRoutes {\n}\n","import {NgModule} from '@angular/core';\nimport {ApCroptypesOverviewComponent} from './components/ap-croptypes.component';\nimport {ApVarietiesOverviewComponent} from './components/ap-varieties.component';\nimport {\n BodyModule,\n FilterMenuModule,\n GridModule,\n HeaderModule,\n PagerModule,\n RowFilterModule\n} from '@progress/kendo-angular-grid';\nimport {CommonModule} from '@angular/common';\nimport {ApTranslationModule} from '../translation/ap-translation.module';\nimport {FormsModule, ReactiveFormsModule} from '@angular/forms';\nimport {\n ButtonModule,\n DropDownButtonModule,\n SplitButtonModule\n} from '@progress/kendo-angular-buttons';\nimport {\n ComboBoxModule,\n DropDownsModule\n} from '@progress/kendo-angular-dropdowns';\nimport {ApUsersComponent} from './components/users/user/ap-users.component';\nimport {ApFertilizersOverviewComponent} from './components/ap-fertilizers.component';\nimport {ApPlantProtectionProductsComponent} from './components/ap-plant-protection-products.component';\nimport {ApCoreModule} from '../ap-core/ap-core.module';\nimport {ApMachinesComponent} from './components/machines/ap-machines.component';\nimport {ApInstrumentsComponent} from './components/instruments/ap-instruments.component';\nimport {ApDriversComponent} from './components/drivers/ap-drivers.component';\nimport {ApWorktypesOverviewComponent} from './components/ap-worktypes.component';\nimport {ApSubFarmsComponent} from './components/ap-subfarms.component';\nimport {ApDocuRessourcesComponent} from './components/ap-docu-ressources.component';\nimport {ApDynformsModule} from '../ap-dynforms/ap-dynforms.module';\nimport {ApBasedataRoutes} from './ap-basedata.routes';\nimport {LayoutModule} from '@progress/kendo-angular-layout';\nimport {ApFertilizerCategoryMappingPipe} from './pipes/ap-fertilizer-categorymapping.pipe';\nimport {ApUtilsModule} from '../ap-utils';\nimport {ApFertilizerInorgsComponent} from './components/ap-fertilizer-inorgs.component';\nimport {ApFertilizerOrgsComponent} from './components/ap-fertilizer-orgs.component';\nimport {DateInputsModule} from '@progress/kendo-angular-dateinputs';\nimport {ApUsersInvitationComponent} from './components/users/invitation/ap-users-invitation.component';\nimport {ApUsersOverviewComponent} from './components/users/ap-users-overview.component';\nimport {ApUsersAssignmentFarmComponent} from './components/users/assignment/ap-users-assignment-farm.component';\nimport {ApUsergroupMappingPipe} from './pipes/ap-usergroup-mapping.pipe';\nimport {ApResponsiveTextModule} from '../ap-responsive-text/ap-responsive-text.module';\nimport {ApTooltipModule} from '../ap-tooltip/ap-tooltip.module';\nimport {ApSectionHeaderModule} from '../ap-section-header/ap-section-header.module';\nimport {ApDynComponentModule} from '../ap-dyncomponent/ap-dyncomponent.module';\nimport {GetMachineKindNamePipe} from './pipes/machines/get-machine-kind-name.pipe';\nimport {ApPermissionModule} from '../ap-permission/ap-permission.module';\nimport {ApTerminalsOverviewComponent} from './components/terminals/ap-terminals.overview.component';\nimport {ApUserContactsOverviewComponent} from './components/users/user-contacts/ap-user-contacts-overview.component';\n\n@NgModule({\n declarations: [\n ApCroptypesOverviewComponent,\n ApVarietiesOverviewComponent,\n ApUsersComponent,\n ApFertilizersOverviewComponent,\n ApPlantProtectionProductsComponent,\n ApMachinesComponent,\n ApInstrumentsComponent,\n ApDriversComponent,\n ApWorktypesOverviewComponent,\n ApSubFarmsComponent,\n ApDocuRessourcesComponent,\n ApFertilizerCategoryMappingPipe,\n ApFertilizerInorgsComponent,\n ApFertilizerOrgsComponent,\n ApFertilizersOverviewComponent,\n ApUsersAssignmentFarmComponent,\n ApUsersOverviewComponent,\n ApUsersInvitationComponent,\n ApUsersComponent,\n ApUsergroupMappingPipe,\n GetMachineKindNamePipe,\n ApTerminalsOverviewComponent,\n ApUserContactsOverviewComponent\n ],\n imports: [\n ReactiveFormsModule,\n SplitButtonModule,\n ComboBoxModule,\n DateInputsModule,\n GridModule,\n ApCoreModule,\n ApTranslationModule,\n CommonModule,\n ApTranslationModule,\n ButtonModule,\n FormsModule,\n DropDownsModule,\n DropDownButtonModule,\n ApDynformsModule,\n LayoutModule,\n ApBasedataRoutes,\n ApUtilsModule,\n RowFilterModule,\n BodyModule,\n FilterMenuModule,\n HeaderModule,\n PagerModule,\n ApResponsiveTextModule,\n ApTooltipModule,\n ApSectionHeaderModule,\n ApDynComponentModule,\n ApPermissionModule\n ],\n exports: [\n ApCroptypesOverviewComponent,\n ApVarietiesOverviewComponent,\n ApUsersComponent,\n ApFertilizersOverviewComponent,\n ApPlantProtectionProductsComponent,\n ApMachinesComponent,\n ApInstrumentsComponent,\n ApDriversComponent,\n ApWorktypesOverviewComponent,\n ApSubFarmsComponent,\n ApDocuRessourcesComponent,\n ApFertilizerInorgsComponent,\n ApFertilizerOrgsComponent,\n ApFertilizersOverviewComponent,\n ApUsersOverviewComponent,\n ApUsersAssignmentFarmComponent,\n ApUsersInvitationComponent,\n ApUsersComponent,\n ApUsergroupMappingPipe,\n ApTerminalsOverviewComponent,\n ApUserContactsOverviewComponent\n ],\n providers: [\n GetMachineKindNamePipe,\n ]\n})\nexport class ApBaseDataModule {\n}\n"],"sourceRoot":"webpack:///","file":"642.9a5c99d566a1d3a4.js"}