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OAAQC,iBAGZ,CACEL,KAAM,gBACNnR,UAAW8J,GACXuH,YAAa,CAACC,KACd9X,KAAM,CACJmV,OAAO,EACP4C,OAAQC,iBAGZ,CACEL,KAAM,eACNnR,UAAWiR,GACXzX,KAAM,CACJmV,OAAO,EACP4C,OAAQC,kBAaP,IAAMC,GAAb,MAAM,sDAAOA,4DAPF,CACPC,eAAsBR,KAGtBQ,SAGSD,GAAb,2FCMO,IAAME,GAAb,MAAM,sDAAOA,4DAnCF,CACPC,KACAC,MACAC,KACAC,MACAC,MACAC,MACAC,KACAC,MACAC,MACAC,MACAZ,GACAa,KACAC,KACAC,KACAC,MACAC,KACAC,KACAC,KACAC,KACAC,KACAC,SAcSpB,GAAb","names":["ApDynGridColumnConfigBase","constructor","options","super","this","ApDynGridColumnControlType","callback","enable","key","title","filterable","ApCropGroupsOverviewComponent","store","translationStore","farmUsersStore","permissionsStore","permissionPipe","statisticStore","fieldStore","cropTypeStore","mapViewStore","campaignYearStore","getSecondCropStatisticPipe","getMainCropStatisticPipe","Listen","s","data","pipe","filter","d","map","pp","Convert","cropGroup","FindTranslationForSelectedLanguage","Key","color","Colordefault","FarmColor","Color","Id","SourceItem","EventEmitter","showMapView","_subscriptions","push","_applyClicked","subscribe","_onApplyClicked","_editClick","item","_onColorEdit","createStatistic","cropGroupsLoadingOrSaving$","combineLatest","loading","saving","croptypesLoading","fieldsLoading","savedSubscription","saved","loadCroptypes","cropTypesSubscription","_","cropTypes","length","loadFields","SelectedCampaignYear","DefaultStart","unsubscribe","ngAfterContentInit","fillWizardChoiceData","gridBuilder","transform","ApPermissions","permission","goIntoStatisticMenu","ngOnDestroy","removeStatisticData","forEach","columns","ApDynGridPropertyColumnConfig","field","headerFilterable","sortDesc","sortIndex","width","ApDynGridColorColumnConfig","pager","ApDynGridPagerConfig","apply","hasPermission","listMassEditing","_listMassEditing","mainCropResult","mergeResult","setStatisticData","ApStatsType","cropgroup","ApLodash","FarmCropGroup","SetColor","SetColorAndGroup","saveFarmCropGroups","getCropGroups","Find","remove","id","name","type","ApGridPagerType","values","dynComponent","getSelectedItems","row","deleteFarmCropGroups","i0","selectors","ApDynComponentComponent","ApLoggerComponent","loggerStore","formStore","log","Status","IsDeleted","StatusClass","StatusDesc","onEdit","dataItem","openForm","component","ApLoggerEditComponent","ApDynGridStatusColumnConfig","showHeaderTitle","class","description","groupIndex","groupDesc","ApDynGridEditColumnConfig","disabled","deleteLogger","ctx","ApMachinesLoggerComponent","dateService","machinesLoggerStore","settingsStore","languageStore","ml","from","getDateMidnight","toFarmDateFromUtcGetJsDate","DateFrom","to","DateTo","From","To","getDataFromStore","ApMachinesLoggerEditComponent","SelectedLanguage$","language","format","DateFormat","deleteMachinesLogger","RessourceTabs","ApLoggerSettingsComponent","Logger","hideMapView","searchIn","value","selectedTab","i","loggerComponent","_a","dynGrid","_b","filterGrid","MachinesLogger","a","r","machinesLoggerComponent","_c","_d","createNew","docuComponent","selectTab","e","index","ApLicenceComponent","loginStore","licenseStore","soilSampleDateStore","soilSampleDateService","of","ngOnInit","loading$","Loading$","loadingItems","some","_getColumns","_getPager","x","debounceTime","_isSaving","items$","_getItems","licenseData$","Fields$","Dates$","licenses","fields","soilSampleDates","filteredLicenses","ApRoleTypeService","User","FeatureModul","c","ErpId","license","validFromDate","_getDateForLicense","ValidFrom","undefined","validToDate","ValidTo","Date","trialExpiredAt","TrialExpireAt","gridStatus","_getLicenseStatusObject","state","Module","Translationkey","TrialExpiredAt","UsedAmount","_getUsedAmount","LicensedAmount","QuantityErp","NoCheck","template","PropertyTemplate","tooltip","_generateTooltipForTrialExpiredAt","checkbox","hide","text","ApUtilService","_switchLicenseCheck","bind","_activateTrialLicense","checkIsTrialDateIsValid","_resetTrialLicense","ApDynGridPagerWizardConfig","ApDynGridPagerWizardSection","date","toReplace","newDate","dateToMoment","toDate","ApFeatureModulKey","getFieldsWithValidSoilSampleDate","reduce","totalAreaAmount","fieldGeom","getCurrentFieldGeom","Create","p","AreaHa","copiedObject","ObjectFactory","updateLicense","trialExpireAt","setMonth","getMonth","toFarmDate","getDateNoon","validTo","ApColumnState","currentDate","dateDifferenceInDays","getDateDiff","DateDiffType","TrialActivationsCount","gridItem","trialCount","daysLeft","getUtc","fieldsTooltip","daysDifference","ApAccessPermissionsComponent","userGroupStore","admin","getGroupAccessPermissions","user","consultant","Featuremodul_Translationkey","Feature","Feature_Translationkey","Admin","StatusClassAdmin","StatusDescAdmin","StatusClassUser","StatusDescUser","Consultant","StatusClassConsultant","StatusDescConsultant","usergroupName","firstGroup","find","Groups","usergroup_name","access_permission","ApDynGridStatusSwitchColumnConfig","disableGreen","disableRed","showYellowState","toolTipGreen","toolTipRed","stateChange","_createEventEmitter","event","_setPermission","generatorOrNext","eventEmitter","group","userGroup","groupPer","getUserGroups","usergroup_id","insertPermission","FarmId","Feature_Id","deletePermission","ApUserProfileEditComponent","userStore","notifyStore","BehaviorSubject","_getLoading","_saveState","_user","_language","SelectedLanguage","formConfig","_getFormFieldSets","_onDatabaseUpdate","dynForm","initialized","form","valueChanges","_onFormValuesChanges","warningNotification","_getWarningNotification","removeMessage","onSubmit","disabledButton","next","isUserProfileChanged","isUserProfileSaving","isLanguageChanged","_isUserDataChanged","_isLanguageChanged","updateUserFullName","UserId","Forename","Surname","_afterDatabaseOperation","login","y","ApDynformsConfigFieldset","config","ApDynformsConfigTextbox","label","validators","ApDynformsValidator","validator","Validators","errorKey","EMail","ApDynformsConfigComboBox","valueField","textField","valuePrimitive","getValue","SelectLanguage","Language","saveSelectedLanguageToLocalStorage","showSaveSuccessMessage","window","location","reload","addMessage","ErrorKey","_changeLanguageWarningKey","Level","UserName","Parameters","Counter","DisplayTimeout","getNotify","n","userData","formValue","selectedLanguage","ApDynformsComponent","ApUserProfileUserSettingsComponent","routes","path","ApSettingsEditComponent","canActivate","ApPermissionGuard","layout","PageMode","ApSettingsRoutes","RouterModule","ApSettingsModule","CommonModule","GridModule","ApCoreModule","BodyModule","HeaderModule","SharedModule","ApTranslationModule","ButtonsModule","GroupModule","PagerModule","TabStripModule","ApDynformsModule","ReactiveFormsModule","ComboBoxModule","ApUtilsModule","ApResponsiveTextModule","ApTooltipModule","ApSectionHeaderModule","ApDynComponentModule","ApPermissionModule"],"sources":["./src/app/ap-dyngrids/config/ap-dyn-grid-color-column-config.ts","./src/app/settings/components/cropgroups/ap-cropgroups.component.ts","./src/app/settings/components/logger/ap-logger.component.ts","./src/app/settings/components/machineslogger/ap-machines-logger.component.ts","./src/app/settings/components/ap-logger-settings.component.html","./src/app/settings/components/ap-logger-settings.component.ts","./src/app/settings/components/licence-management/ap-licence.component.ts","./src/app/settings/components/access-permissions/ap-access-permissions.component.ts","./src/app/settings/components/user-profile/ap-userprofile-edit.component.ts","./src/app/settings/components/ap-userprofile-usersettings.component.ts","./src/app/settings/components/ap-userprofile-usersettings.component.html","./src/app/settings/ap-settings.routes.ts","./src/app/settings/ap-settings.module.ts"],"sourcesContent":["import {\n ApDynGridColumnConfigBase,\n ApDynGridColumnControlType,\n ApDynGridColumnHideConfig,\n IPipeDefinition\n} from './ap-dyn-grid-column-config-base';\nimport {EventEmitter} from '@angular/core';\n\nexport class ApDynGridColorColumnConfig extends ApDynGridColumnConfigBase {\n public type = ApDynGridColumnControlType.Color;\n public title: string;\n public key: string;\n public enable: boolean;\n public callback: EventEmitter;\n public filterable: boolean;\n\n constructor(options: {\n hide?: boolean | ApDynGridColumnHideConfig,\n sortIndex?: number,\n sortDesc?: boolean,\n groupIndex?: number,\n groupDesc?: boolean,\n headerStyle?: any,\n style?: any,\n width?: number,\n pdfExport?: boolean,\n xlsExport?: boolean,\n field?: string,\n title?: string,\n key?: string,\n enable?: boolean,\n callback?: EventEmitter,\n filterable?: boolean,\n cssClass?: 'left' | 'right',\n pipes?: IPipeDefinition[],\n tooltipPipes?: IPipeDefinition[],\n } = {}) {\n super(options);\n this.callback = options.callback;\n this.enable = options.enable ? options.enable : false;\n this.key = options.key;\n this.title = options.title ? options.title : ' ';\n this.filterable = options.filterable === false ? false : true; // default is true and can explicitly set to false in component\n }\n}\n","import {AfterContentInit, Component, EventEmitter, OnDestroy, ViewChild} from '@angular/core';\nimport {combineLatest, Observable, Subscription} from 'rxjs';\nimport {filter, map} from 'rxjs/operators';\nimport {\n ApDynComponentComponent\n} from '../../../ap-dyncomponent/ap-dyncomponent.component';\nimport {\n ApDynGridColorColumnConfig\n} from '../../../ap-dyngrids/config/ap-dyn-grid-color-column-config';\nimport {\n ApDynGridColumnConfigBase\n} from '../../../ap-dyngrids/config/ap-dyn-grid-column-config-base';\nimport {\n ApDynGridPagerConfig\n} from '../../../ap-dyngrids/config/ap-dyn-grid-pager-config';\nimport {\n ApDynGridPagerConfigBase\n} from '../../../ap-dyngrids/config/ap-dyn-grid-pager-config-base';\nimport {\n ApDynGridPropertyColumnConfig\n} from '../../../ap-dyngrids/config/ap-dyn-grid-property-column-config';\nimport {ApPermissions} from 'invoker-transport';\nimport {ApGridPagerType, ApStatsType} from '../../../ap-interface/enums';\nimport {IGridData, IWizardChoiceData} from '../../../ap-interface/interfaces';\nimport {\n GetPermissionPipe\n} from '../../../ap-permission/pipes/get-permission.pipe';\nimport {ApLodash} from '../../../ap-utils';\nimport {\n CropGroupStore\n} from '../../../stores/base-data/crop.groups.store';\nimport {\n CropTypeStore\n} from '../../../stores/base-data/crop.types.store';\nimport {FarmUsersStore} from '../../../stores/farm/farm.users.store';\nimport {FieldStore} from '../../../stores/farm/field.store';\nimport {MapViewStore} from '../../../stores/layout/mapview.store';\nimport {\n GetMainCropStatisticPipe\n} from '../../../stores/pipes/ap-get-main-crop-statistic.pipe';\nimport {\n GetSecondCropStatisticPipe\n} from '../../../stores/pipes/ap-get-second-crop-statistic.pipe';\nimport {\n AccessPermissionsStore\n} from '../../../stores/settings/access.permission.store';\nimport {\n StatisticStore\n} from '../../../stores/statistic/statistic.store';\nimport {\n TranslationStore\n} from '../../../stores/translation/translation.store';\nimport {\n CampaignYearStore\n} from '../../../stores/login/campaignyear.store';\nimport ICropGroups = Data.BaseData.ICropGroups;\n\ninterface ICropGroupsGridData extends IGridData {\n Key: string;\n Color: string;\n}\n\n/**\n * Component for the cropGroups\n */\n@Component({\n selector: 'ap-crop-groups-overview',\n template: `\n `,\n})\n\nexport class ApCropGroupsOverviewComponent implements AfterContentInit, OnDestroy {\n @ViewChild(ApDynComponentComponent, {static: true}) public dynComponent: ApDynComponentComponent;\n public columns: ApDynGridColumnConfigBase[] = [];\n public items: any[] = [];\n public pager: ApDynGridPagerConfigBase;\n public cropGroupsLoadingOrSaving$: Observable;\n public items$ = this.store.Listen((s) => s.data).pipe(\n filter((d) => !!d),\n map((pp) => pp.Convert((cropGroup: ICropGroups) => {\n const key = this.translationStore.FindTranslationForSelectedLanguage(cropGroup.Key);\n let color = cropGroup.Colordefault;\n if (cropGroup.FarmColor) {\n color = cropGroup.FarmColor;\n }\n return {\n Color: color,\n Id: cropGroup.Id,\n Key: key,\n SourceItem: cropGroup,\n };\n })));\n\n private _listMassEditing = [];\n private _subscriptions: Array = [];\n private _editClick = new EventEmitter();\n private _applyClicked = new EventEmitter();\n\n constructor(private store: CropGroupStore,\n private translationStore: TranslationStore,\n private farmUsersStore: FarmUsersStore,\n private permissionsStore: AccessPermissionsStore,\n private permissionPipe: GetPermissionPipe,\n private statisticStore: StatisticStore,\n private fieldStore: FieldStore,\n private cropTypeStore: CropTypeStore,\n private mapViewStore: MapViewStore,\n private campaignYearStore: CampaignYearStore,\n private getSecondCropStatisticPipe: GetSecondCropStatisticPipe,\n private getMainCropStatisticPipe: GetMainCropStatisticPipe) {\n this.mapViewStore.showMapView();\n this._subscriptions.push(this._applyClicked.subscribe(() => this._onApplyClicked()));\n this._subscriptions.push(this._editClick.subscribe((item) => this._onColorEdit(item)));\n this._subscriptions.push(this.fieldStore.Listen((s) => s.data).subscribe(() => this.createStatistic()));\n this._subscriptions.push(this.store.Listen((s) => s.data).subscribe(() => this.createStatistic()));\n\n this.cropGroupsLoadingOrSaving$ = combineLatest([\n this.store.Listen(s => s.loading),\n this.store.Listen(s => s.saving),\n this.cropTypeStore.Listen(s => s.loading),\n this.fieldStore.Listen(s => s.loading)\n ]).pipe(\n map(([loading, saving, croptypesLoading, fieldsLoading]) => loading || saving || croptypesLoading || fieldsLoading)\n );\n\n this._subscriptions.push(this.store.Listen(s => s.saving).subscribe(saving => {\n // when saving => register for save success (once) to reload croptypes and fields\n if (saving) {\n const savedSubscription = this.store.Listen(s => s.saved).subscribe(saved => {\n if (saved) {\n // Reload croptypes (once) after editing of cropGroups has finished successfully\n this.cropTypeStore.loadCroptypes();\n const cropTypesSubscription = this.cropTypeStore.Listen(_ => _.data).subscribe(cropTypes => {\n if (cropTypes && cropTypes.length > 0) {\n // Reload fields after editing of cropGroups and reload of croptypes has finished successfully\n this.fieldStore.loadFields(this.campaignYearStore.SelectedCampaignYear.DefaultStart);\n cropTypesSubscription.unsubscribe();\n savedSubscription.unsubscribe();\n }\n });\n }\n });\n }\n }));\n }\n\n public ngAfterContentInit(): void {\n this.fillWizardChoiceData();\n this.gridBuilder();\n this.permissionPipe.transform(ApPermissions.SHOW_STATISTICS).pipe(\n filter((permission) => permission === true),\n ).subscribe(() => this.mapViewStore.goIntoStatisticMenu());\n }\n\n public ngOnDestroy(): void {\n this.statisticStore.removeStatisticData();\n this._subscriptions.forEach((d) => {\n d.unsubscribe();\n });\n }\n\n private gridBuilder(): void {\n this.permissionPipe.transform(ApPermissions.EDIT_CROPTYPE_GROUPS).subscribe((permission) => {\n this.columns = [\n new ApDynGridPropertyColumnConfig({\n field: 'Key',\n filterable: true,\n headerFilterable: true,\n sortDesc: false,\n sortIndex: 0,\n title: 'Global__Description',\n width: 300,\n }),\n new ApDynGridColorColumnConfig({\n callback: this._editClick,\n enable: permission,\n field: 'Color',\n key: 'Color',\n filterable: false,\n title: 'Global__Lbl_Standardcolor',\n width: 200,\n }),\n ];\n this.pager = new ApDynGridPagerConfig({\n apply: this._applyClicked,\n hasPermission: permission,\n listMassEditing: this._listMassEditing,\n });\n });\n }\n\n private createStatistic(): void {\n const mainCropResult = this.getMainCropStatisticPipe.transform();\n const secondCropResult = this.getSecondCropStatisticPipe.transform();\n const mergeResult = [...secondCropResult, ...mainCropResult];\n this.statisticStore.setStatisticData(mergeResult, ApStatsType.MainSecondCrop, this.translationStore.FindTranslationForSelectedLanguage('Global_Distribution_Crop_Groups'));\n }\n\n private _onColorEdit(item: any): void {\n const cropgroup = item['SourceItem'] as ICropGroups;\n if ((cropgroup.FarmColor == null && item.Color === cropgroup.Colordefault) || cropgroup.FarmColor === item.Color) {\n return;\n }\n if (ApLodash.isValidGridDataSource(cropgroup.FarmCropGroup)) {\n this.store.SetColor(cropgroup.Id, item.Color);\n } else {\n this.store.SetColorAndGroup(cropgroup.Id, item.Color, cropgroup.Id);\n }\n\n this.store.saveFarmCropGroups(this.store.getCropGroups().Find(_ => _.Id === cropgroup.Id));\n }\n\n private fillWizardChoiceData(): void {\n const remove = {\n id: 0,\n name: this.translationStore.FindTranslationForSelectedLanguage('Global__Reset'),\n type: ApGridPagerType.None,\n values: null,\n } as IWizardChoiceData;\n this._listMassEditing.push(remove);\n }\n\n private _onApplyClicked(): void {\n const rows = this.dynComponent.getSelectedItems();\n rows.forEach((row) => {\n const item = row['SourceItem'] as ICropGroups;\n if (item) {\n if (ApLodash.isValidGridDataSource(item.FarmCropGroup)) {\n this.store.deleteFarmCropGroups(item);\n }\n }\n });\n }\n}\n","import {AfterContentInit, Component, EventEmitter, OnDestroy, ViewChild} from '@angular/core';\nimport {Subscription} from 'rxjs';\nimport {ApGridPagerType, IGridData, IWizardChoiceData} from '../../../ap-interface';\nimport {ApPermissions} from 'invoker-transport';\nimport {\n ApLoggerEditComponent\n} from '../../../entry-components/ap-settings-entry-components/ap-logger-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 ApDynGridPropertyColumnConfig\n} from '../../../ap-dyngrids/config/ap-dyn-grid-property-column-config';\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 ApDynGridEditColumnConfig\n} from '../../../ap-dyngrids/config/ap-dyn-grid-edit-column-config';\nimport {LoggerStore} from '../../../stores/docu/logger.store';\nimport {filter, map} from 'rxjs/operators';\nimport {FormStore} from '../../../stores/layout/form.store';\nimport {\n TranslationStore\n} from '../../../stores/translation/translation.store';\nimport {\n GetPermissionPipe\n} from '../../../ap-permission/pipes/get-permission.pipe';\nimport ILogger = Data.DocuContext.Logger.ILogger;\n\ninterface ILoggerGridData extends IGridData {\n Status: number;\n StatusClass: string;\n StatusDesc: string;\n}\n\n/**\n * Component for the logger overview\n */\n@Component({\n selector: 'ap-logger-overview',\n template: `\n \n `\n})\n\n/**\n * Component for the logger overview\n */\nexport class ApLoggerComponent implements AfterContentInit, OnDestroy {\n @ViewChild(ApDynComponentComponent, {static: true}) dynComponent: ApDynComponentComponent;\n columns: ApDynGridColumnConfigBase[] = [];\n public loggerLoading$ = this.loggerStore.Listen(s => s.loading);\n public items$ = this.loggerStore.Listen(s => s.data).pipe(\n filter(d => !!d),\n map(d => d.Convert(log => ({\n Id: log.Id,\n SourceItem: log,\n Status: log.IsDeleted ? -1 : 1,\n StatusClass: log.IsDeleted ? 'ap-status-red' : 'ap-status-green',\n StatusDesc: log.IsDeleted ? 'Global__Inactive' : 'Global__Active'\n }))),\n );\n pager: ApDynGridPagerConfigBase;\n\n private _listMassEditing = [];\n private _subscriptions: Array = [];\n private _applyClicked = new EventEmitter();\n\n constructor(private loggerStore: LoggerStore,\n private formStore: FormStore,\n private translationStore: TranslationStore,\n private permissionPipe: GetPermissionPipe) {\n this._subscriptions.push(this._applyClicked.subscribe(() => this._onApplyClicked()));\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 onEdit(dataItem): void {\n this.formStore.openForm({component: ApLoggerEditComponent, data: dataItem.SourceItem});\n }\n\n private gridBuilder(): void {\n this.permissionPipe.transform(ApPermissions.EDIT_LOGGER).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.Typ', title: 'Docu_Ini__Type', filterable: true, width: 100, headerFilterable: true\n }),\n new ApDynGridPropertyColumnConfig({\n field: 'SourceItem.Imei', title: 'Docu_Ini__Imei', filterable: true, width: 100, headerFilterable: 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 fillWizardChoiceData(): void {\n const deleteLogger = {\n id: 0,\n name: this.translationStore.FindTranslationForSelectedLanguage('Global__Inactive'),\n type: ApGridPagerType.None,\n values: null,\n } as IWizardChoiceData;\n this._listMassEditing.push(deleteLogger);\n }\n\n private _onApplyClicked(): void {\n const rows = this.dynComponent.getSelectedItems();\n rows.forEach(row => {\n const item = row['SourceItem'] as ILogger;\n if (item) {\n this.loggerStore.deleteLogger(item as ILogger);\n }\n });\n }\n}\n","import {AfterContentInit, Component, EventEmitter, OnDestroy, ViewChild} from '@angular/core';\nimport {combineLatest, Subscription} from 'rxjs';\nimport {ApGridPagerType, IGridData, IWizardChoiceData} from '../../../ap-interface';\nimport {ApPermissions} from 'invoker-transport';\nimport {\n ApMachinesLoggerEditComponent\n} from '../../../entry-components/ap-settings-entry-components/ap-machines-logger-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 {\n SettingsStore\n} from '../../../stores/base-data/settings.store';\nimport {\n AccessPermissionsStore\n} from '../../../stores/settings/access.permission.store';\nimport {\n MachineLoggerStore\n} from '../../../stores/docu/machine.logger.store';\nimport {filter, map} from 'rxjs/operators';\nimport {FarmUsersStore} from '../../../stores/farm/farm.users.store';\nimport {FormStore} from '../../../stores/layout/form.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 ApDateService\n} from '../../../ap-core/services/ap-date-service';\nimport IMachinesLogger = Data.DocuContext.MachinesLogger.IMachinesLogger;\n\ninterface IMachineLoggerGridData extends IGridData {\n Status: number;\n StatusClass: string;\n StatusDesc: string;\n}\n\n/**\n * Component for the machines - logger overview\n */\n@Component({\n selector: 'ap-machines-logger-overview',\n template: `\n `\n})\n\n/**\n * Component for the machines - logger overview\n */\nexport class ApMachinesLoggerComponent implements AfterContentInit, OnDestroy {\n @ViewChild(ApDynComponentComponent, {static: true}) dynComponent: ApDynComponentComponent;\n columns: ApDynGridColumnConfigBase[] = [];\n public machinesLoggerLoading$ = this.machinesLoggerStore.Listen(s => s.loading);\n public items$ = this.machinesLoggerStore.Listen(s => s.data).pipe(\n filter(d => !!d),\n map(d => d.Convert(ml => {\n const from = this.dateService.getDateMidnight(this.dateService.toFarmDateFromUtcGetJsDate(ml.DateFrom));\n const to = this.dateService.getDateMidnight(this.dateService.toFarmDateFromUtcGetJsDate(ml.DateTo));\n return {\n Id: ml.Id,\n SourceItem: ml,\n Status: ml.IsDeleted ? -1 : 1,\n StatusClass: ml.IsDeleted ? 'ap-status-red' : 'ap-status-green',\n StatusDesc: ml.IsDeleted ? 'Global__Inactive' : 'Global__Active',\n From: from,\n To: to,\n };\n })\n ));\n pager: ApDynGridPagerConfigBase;\n\n private _listMassEditing = [];\n private _subscriptions: Array = [];\n private _applyClicked = new EventEmitter();\n\n constructor(private dateService: ApDateService,\n private machinesLoggerStore: MachineLoggerStore,\n private formStore: FormStore,\n private translationStore: TranslationStore,\n private farmUsersStore: FarmUsersStore,\n private permissionsStore: AccessPermissionsStore,\n private permissionPipe: GetPermissionPipe,\n private settingsStore: SettingsStore,\n private languageStore: LanguageStore) {\n this._subscriptions.push(this._applyClicked.subscribe(() => this._onApplyClicked()));\n }\n\n ngAfterContentInit(): void {\n this.getDataFromStore();\n this.gridBuilder();\n this.fillWizardChoiceData();\n }\n\n getDataFromStore(): void {\n }\n\n ngOnDestroy(): void {\n this._subscriptions.forEach(d => {\n d.unsubscribe();\n });\n }\n\n onEdit(dataItem): void {\n this.formStore.openForm({component: ApMachinesLoggerEditComponent, data: dataItem.SourceItem});\n }\n\n private gridBuilder(): void {\n combineLatest([\n this.permissionPipe.transform(ApPermissions.EDIT_LOGGER),\n this.languageStore.SelectedLanguage$\n ]).subscribe(([permission, language]) => {\n this.columns = [\n new ApDynGridStatusColumnConfig({\n field: 'Status', showHeaderTitle: true,\n class: 'StatusClass', description: 'StatusDesc', filterable: true, groupIndex: 0, groupDesc: true\n }),\n new ApDynGridPropertyColumnConfig({\n field: 'SourceItem.Machine.NameWithSign',\n title: 'Docu_Ini__Engine',\n filterable: true,\n width: 100,\n headerFilterable: true\n }),\n new ApDynGridPropertyColumnConfig({\n field: 'SourceItem.Logger.Imei',\n title: 'Docu_Ini__Datalogger',\n filterable: true,\n width: 100,\n headerFilterable: true\n }),\n new ApDynGridPropertyColumnConfig({\n field: 'From',\n title: 'Docu_Ini__From',\n filterable: true,\n width: 100,\n sortIndex: 0,\n sortDesc: false,\n format: language.DateFormat,\n headerFilterable: true\n }),\n new ApDynGridPropertyColumnConfig({\n field: 'To',\n title: 'Docu_Ini__To',\n filterable: true,\n width: 100,\n format: language.DateFormat,\n headerFilterable: 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 fillWizardChoiceData(): void {\n const deleteLogger = {\n id: 0,\n name: this.translationStore.FindTranslationForSelectedLanguage('Global__Delete'),\n type: ApGridPagerType.None,\n values: null,\n } as IWizardChoiceData;\n this._listMassEditing.push(deleteLogger);\n }\n\n private _onApplyClicked(): void {\n const rows = this.dynComponent.getSelectedItems();\n rows.forEach(row => {\n const item = row['SourceItem'] as IMachinesLogger;\n if (item) {\n this.machinesLoggerStore.deleteMachinesLogger(item as IMachinesLogger);\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 {ApLoggerEditComponent} from '../../entry-components/ap-settings-entry-components/ap-logger-edit.component';\nimport {ApMachinesLoggerEditComponent} from '../../entry-components/ap-settings-entry-components/ap-machines-logger-edit.component';\nimport {ApLoggerComponent} from './logger/ap-logger.component';\nimport {ApMachinesLoggerComponent} from './machineslogger/ap-machines-logger.component';\nimport {IApPermissionData} from '../../ap-interface/interfaces';\nimport {ApPermissions} from 'invoker-transport';\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';\n\n\n/**\n * Enumeration of all ressource tabs\n */\nexport enum RessourceTabs {\n Logger = 0,\n MachinesLogger = 1,\n}\n\n@Component({\n selector: 'ap-logger-settings',\n templateUrl: './ap-logger-settings.component.html'\n})\nexport class ApLoggerSettingsComponent {\n public apPermissionData: IApPermissionData;\n public ApPermissions = ApPermissions;\n\n @ViewChild(ApLoggerComponent, {static: false})\n public loggerComponent: ApLoggerComponent;\n\n @ViewChild(ApMachinesLoggerComponent, {static: false})\n public machinesLoggerComponent: ApMachinesLoggerComponent;\n\n public selectedTab: RessourceTabs = RessourceTabs.Logger;\n\n constructor(private formStore: FormStore,\n private farmUsersStore: FarmUsersStore,\n private permissionsStore: AccessPermissionsStore,\n private mapViewStore: MapViewStore) {\n this.mapViewStore.hideMapView();\n }\n\n searchIn(value: string): void {\n switch (this.selectedTab) {\n case RessourceTabs.Logger:\n this.loggerComponent.dynComponent?.dynGrid?.filterGrid(value);\n break;\n case RessourceTabs.MachinesLogger:\n this.machinesLoggerComponent.dynComponent?.dynGrid?.filterGrid(value);\n break;\n }\n }\n\n createNew(): void {\n let docuComponent: any;\n switch (this.selectedTab) {\n case RessourceTabs.Logger:\n docuComponent = ApLoggerEditComponent;\n break;\n case RessourceTabs.MachinesLogger:\n docuComponent = ApMachinesLoggerEditComponent;\n break;\n }\n this.formStore.openForm({component: docuComponent, data: null});\n }\n\n selectTab(e): void {\n switch (this.selectedTab) {\n case RessourceTabs.Logger:\n this.loggerComponent.dynComponent?.dynGrid?.filterGrid('');\n break;\n case RessourceTabs.MachinesLogger:\n this.machinesLoggerComponent.dynComponent?.dynGrid?.filterGrid('');\n break;\n }\n this.selectedTab = e.index;\n }\n}\n","import {AfterContentInit, ChangeDetectionStrategy, Component, OnDestroy, OnInit, ViewChild} from '@angular/core';\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 ApDynGridPropertyColumnConfig,\n PropertyTemplate\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 ApDynGridPagerWizardConfig,\n ApDynGridPagerWizardSection\n} from '../../../ap-dyngrids/config/ap-dyn-grid-pager-wizard-config';\nimport {\n ApDynGridEditColumnConfig\n} from '../../../ap-dyngrids/config/ap-dyn-grid-edit-column-config';\nimport {debounceTime, map} from 'rxjs/operators';\nimport {\n IGridData\n} from '../../../ap-interface';\nimport {\n MapViewStore\n} from '../../../stores/layout/mapview.store';\nimport {\n TranslationStore\n} from '../../../stores/translation/translation.store';\nimport {\n ApDateService,\n DateDiffType\n} from '../../../ap-core/services/ap-date-service';\nimport {combineLatest, Observable, of, Subscription} from 'rxjs';\nimport {\n ApUtilService\n} from '../../../ap-utils/service/ap-util.service';\nimport {\n LicenseStore\n} from '../../../stores/farm/license.store';\nimport {Create, ObjectFactory} from 'ts-tooling';\nimport {\n LoginStore\n} from '../../../stores/login/login.store';\nimport {\n ApRoleTypeService\n} from '../../../services/common/ap-role-type.service';\nimport {\n FieldStore\n} from '../../../stores/farm/field.store';\nimport {\n SoilSampleDates,\n SoilSampleDateStore\n} from '../../../stores/nutrients/soilsampledate.store';\nimport {\n SoilSampleDateService\n} from '../../../services/data/soil-sample-date.service';\nimport {\n IGridStatus\n} from '../../../ap-interface/interfaces/ap-grid-status.interface';\nimport {\n ApColumnState\n} from '../../../ap-interface/enums/ap-column-state.enum';\nimport {\n ApFeatureModulKey\n} from '../../../ap-interface/enums/ap-feature-modul-key.enum';\nimport ILicense = Data.Licensing.ILicense;\nimport IField = Data.FieldManagement.IField;\n\ninterface ILicenseGridData extends IGridData {\n Status: number;\n StatusClass: string;\n StatusDesc: string;\n Module: any;\n ValidFrom: any;\n ValidTo: any;\n TrialExpiredAt: any;\n NoCheck: boolean;\n UsedAmount: number | undefined;\n LicensedAmount: number | undefined;\n}\n\n@Component({\n selector: 'ap-licence',\n template: `\n `,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class ApLicenceComponent implements OnInit, AfterContentInit, OnDestroy {\n @ViewChild(ApDynComponentComponent, {static: true}) dynComponent: ApDynComponentComponent;\n public loading$ = of(true);\n public items$: Observable = of([]);\n public columns: ApDynGridColumnConfigBase[] = [];\n public pager: ApDynGridPagerConfigBase;\n\n private _isSaving = false;\n private _subscriptions: Subscription[] = [];\n\n constructor(private translationStore: TranslationStore,\n private mapViewStore: MapViewStore,\n private loginStore: LoginStore,\n private licenseStore: LicenseStore,\n private fieldStore: FieldStore,\n private soilSampleDateStore: SoilSampleDateStore,\n private soilSampleDateService: SoilSampleDateService,\n private dateService: ApDateService) {\n }\n\n public ngOnInit(): void {\n this.loading$ = combineLatest([\n this.fieldStore.Loading$,\n this.licenseStore.Loading$,\n this.soilSampleDateStore.Loading$\n ]).pipe(\n map(loadingItems => loadingItems.some(loading => loading))\n );\n this.mapViewStore.hideMapView();\n this.columns = this._getColumns();\n this.pager = this._getPager();\n }\n\n public ngAfterContentInit(): void {\n this._subscriptions.push(\n combineLatest([\n this.licenseStore.Listen(x => x.saved),\n this.licenseStore.Listen(x => x.saving)\n ]).pipe(\n debounceTime(100)\n ).subscribe(([saved, saving]) => {\n this._isSaving = !((!saved && !saving) || (saved && !saving));\n }));\n this.items$ = this._getItems();\n }\n\n public ngOnDestroy(): void {\n this._subscriptions.forEach(x => x.unsubscribe());\n }\n\n /**\n * Retrieves license items with additional processing\n * Transforms license data by:\n * - Filtering licenses based on user role\n * - Calculating license status\n * - Formatting dates\n * - Adding additional metadata\n * @returns Observable of processed license grid data\n * @private\n */\n private _getItems(): Observable {\n return combineLatest([\n this.licenseStore.licenseData$,\n this.fieldStore.Fields$,\n this.soilSampleDateStore.Dates$\n ]).pipe(\n map(([licenses, fields, soilSampleDates]) => {\n let filteredLicenses = licenses;\n if (!ApRoleTypeService.hasDeveloperRole(this.loginStore.User)) {\n filteredLicenses = licenses.filter(x => !!x.FeatureModul && x.FeatureModul?.ErpId > 0);\n }\n return filteredLicenses.map((license: ILicense) => {\n const validFromDate = this._getDateForLicense(license.ValidFrom, undefined);\n const validToDate = this._getDateForLicense(license.ValidTo, new Date(2100, 1));\n const trialExpiredAt = this._getDateForLicense(license.TrialExpireAt, undefined);\n const gridStatus = this._getLicenseStatusObject(license, validToDate);\n return {\n Id: license.Id,\n SourceItem: license,\n Status: gridStatus.state,\n StatusClass: gridStatus.class,\n StatusDesc: gridStatus.description,\n Module: this.translationStore.FindTranslationForSelectedLanguage(license.FeatureModul.Translationkey),\n ValidFrom: validFromDate,\n ValidTo: validToDate,\n TrialExpiredAt: trialExpiredAt,\n UsedAmount: this._getUsedAmount(license, fields, soilSampleDates),\n LicensedAmount: license?.QuantityErp > 0 ? license.QuantityErp : undefined,\n NoCheck: license.NoCheck\n };\n });\n })\n );\n }\n\n /**\n * Generates grid columns for the license overview\n * Configures column settings including:\n * - Status column\n * - Module column\n * - Amount columns\n * - Date columns\n * - Edit actions\n * @returns Array of column configurations\n * @private\n */\n private _getColumns(): ApDynGridColumnConfigBase[] {\n return [\n new ApDynGridStatusColumnConfig({\n field: 'Status',\n showHeaderTitle: false,\n class: 'StatusClass',\n description: 'StatusDesc',\n filterable: true\n }),\n new ApDynGridPropertyColumnConfig({\n field: 'Module',\n title: 'Global__Module',\n filterable: true,\n headerFilterable: true,\n sortIndex: 1,\n sortDesc: false,\n width: 200\n }),\n new ApDynGridPropertyColumnConfig({\n field: 'UsedAmount',\n title: 'UsedAmount',\n template: PropertyTemplate.NUMBER,\n width: 90,\n filterable: true\n }),\n new ApDynGridPropertyColumnConfig({\n field: 'LicensedAmount',\n title: 'LicensedAmount',\n template: PropertyTemplate.NUMBER,\n width: 90,\n filterable: true\n }),\n new ApDynGridPropertyColumnConfig({\n field: 'ValidFrom',\n title: 'Docu_Ini__From',\n format: 'DD.MM.YYYY',\n width: 90\n }),\n new ApDynGridPropertyColumnConfig({\n field: 'ValidTo',\n title: 'Docu_Ini__To',\n format: 'DD.MM.YYYY',\n width: 90\n }),\n new ApDynGridPropertyColumnConfig({\n field: 'TrialExpiredAt',\n title: 'TrialExpiredAt',\n format: 'DD.MM.YYYY',\n tooltip: (item: ILicenseGridData) => this._generateTooltipForTrialExpiredAt(item),\n width: 90\n }),\n new ApDynGridPropertyColumnConfig({\n title: 'No_Check',\n field: 'NoCheck',\n checkbox: true,\n hide: true,\n width: 40\n }),\n new ApDynGridEditColumnConfig({\n data: [\n {\n text: (item: ILicenseGridData) => this.translationStore.FindTranslationForSelectedLanguage(\n item.NoCheck ? 'Enable_Check' : 'Disable_Check'\n ),\n callback: ApUtilService.createEventEmitter(this._switchLicenseCheck.bind(this), this._subscriptions),\n disabled: !ApRoleTypeService.hasAgriconRole(this.loginStore.User) || this._isSaving\n },\n {\n text: this.translationStore.FindTranslationForSelectedLanguage('Global__activate_trial_license'),\n callback: ApUtilService.createEventEmitter(this._activateTrialLicense.bind(this), this._subscriptions),\n disabled: (item: ILicenseGridData) => item.Status !== 0 || this._isSaving || this.checkIsTrialDateIsValid(item)\n },\n {\n text: this.translationStore.FindTranslationForSelectedLanguage('ResetTrialLicense'),\n callback: ApUtilService.createEventEmitter(this._resetTrialLicense.bind(this), this._subscriptions),\n disabled: () => !ApRoleTypeService.hasAgriconRole(this.loginStore.User) || this._isSaving\n }\n ]\n })\n ];\n }\n\n /**\n * Creates a pager configuration for the license grid\n * Sets up empty wizard pager sections\n * @returns Pager configuration\n * @private\n */\n private _getPager(): ApDynGridPagerWizardConfig {\n return new ApDynGridPagerWizardConfig(\n new ApDynGridPagerWizardSection(),\n new ApDynGridPagerWizardSection(),\n new ApDynGridPagerWizardSection()\n );\n }\n\n /**\n * Processes a license date, applying default values if needed\n * @param date Original date from license\n * @param toReplace Replacement date if original is undefined\n * @returns Processed date at midnight\n * @private\n */\n private _getDateForLicense(date: Date | undefined, toReplace: Date | undefined): Date | undefined {\n const newDate = date ? this.dateService.dateToMoment(date).toDate() : toReplace;\n if (!newDate) {\n return undefined;\n }\n return this.dateService.getDateMidnight(newDate);\n }\n\n /**\n * Calculates used amount for base fertilization licenses\n * Computes total area of fields with valid soil sample dates\n * @param license Current license\n * @param fields Available fields\n * @param soilSampleDates Soil sample dates\n * @returns Used amount or undefined\n * @private\n */\n private _getUsedAmount(license: ILicense, fields: IField[], soilSampleDates: SoilSampleDates): number | undefined {\n if (license.FeatureModul.Key !== ApFeatureModulKey.BaseFertilization) {\n return undefined;\n }\n const fieldsWithValidSoilSample = this.soilSampleDateService.getFieldsWithValidSoilSampleDate(fields, soilSampleDates);\n return fieldsWithValidSoilSample.reduce((totalAreaAmount, field) => {\n const fieldGeom = this.fieldStore.getCurrentFieldGeom(field);\n return totalAreaAmount + Create(fieldGeom?.AreaHa, 0);\n }, 0);\n }\n\n /**\n * Switches the license check status\n * @param item The license grid data item to toggle\n * @private\n */\n private _switchLicenseCheck(item: ILicenseGridData): void {\n if (this._isSaving) {\n return;\n }\n const copiedObject = ObjectFactory.Copy(item.SourceItem);\n copiedObject.NoCheck = !copiedObject.NoCheck;\n this.licenseStore.updateLicense(copiedObject, false, false);\n }\n\n /**\n * Activates a trial license\n * Sets trial expiration date to one month from current date\n * @param item The license grid data item to activate\n * @private\n */\n private _activateTrialLicense(item: ILicenseGridData): void {\n if (this._isSaving) {\n return;\n }\n const copiedObject = ObjectFactory.Copy(item.SourceItem);\n let trialExpireAt = new Date();\n trialExpireAt.setMonth(trialExpireAt.getMonth() + 1);\n trialExpireAt = this.dateService.toFarmDate(this.dateService.getDateNoon(trialExpireAt)).toDate();\n copiedObject.TrialExpireAt = trialExpireAt;\n this.licenseStore.updateLicense(copiedObject, true, false);\n }\n\n /**\n * Resets the trial license\n * Clears the trial expiration date\n * @param item The license grid data item to reset\n * @private\n */\n private _resetTrialLicense(item: ILicenseGridData): void {\n if (this._isSaving) {\n return;\n }\n const copiedObject = ObjectFactory.Copy(item.SourceItem);\n copiedObject.TrialExpireAt = null;\n this.licenseStore.updateLicense(copiedObject, false, true);\n }\n\n /**\n * Determines the status of a license\n * Evaluates license validity based on:\n * - Expiration date\n * - Number of trial activations\n * @param license License to evaluate\n * @param validTo Expiration date\n * @returns Grid status object\n * @private\n */\n private _getLicenseStatusObject(license: ILicense, validTo: Date): IGridStatus {\n const gridStatus: IGridStatus = {\n state: ApColumnState.Yellow,\n class: 'ap-status-yellow',\n description: 'Global_no_valid_license'\n };\n const currentDate = this.dateService.getDateMidnight(new Date());\n const dateDifferenceInDays = this.dateService.getDateDiff(validTo, currentDate, DateDiffType.Days);\n if (validTo && dateDifferenceInDays >= 0) {\n gridStatus.state = ApColumnState.Green;\n gridStatus.class = 'ap-status-green';\n gridStatus.description = 'Global_valid_license';\n return gridStatus;\n }\n if (license.TrialActivationsCount >= 3) {\n gridStatus.state = ApColumnState.Red;\n gridStatus.class = 'ap-status-red';\n gridStatus.description = 'Global_trials_exceeded';\n return gridStatus;\n }\n return gridStatus;\n }\n\n /**\n * Generates a tooltip for trial expiration date\n * Creates a formatted HTML tooltip showing:\n * - Days left until trial expiration\n * - Number of trial activations\n * @param gridItem License grid data item\n * @returns HTML tooltip string or undefined\n * @private\n */\n private _generateTooltipForTrialExpiredAt(gridItem: ILicenseGridData): string | undefined {\n if (!gridItem.TrialExpiredAt) {\n return undefined;\n }\n const trialCount = gridItem.SourceItem.TrialActivationsCount ?? '';\n let daysLeft = this.dateService.getDateDiff(gridItem.TrialExpiredAt,\n this.dateService.getUtc(), DateDiffType.Days);\n if (daysLeft < 0) {\n daysLeft = 0;\n }\n const daysLeftTranslation = this.translationStore.FindTranslationForSelectedLanguage('DaysLeft');\n const trialCountTranslation = this.translationStore.FindTranslationForSelectedLanguage('TrialCount');\n let fieldsTooltip = '
';\n fieldsTooltip += `
${daysLeftTranslation}: ${daysLeft}
`;\n fieldsTooltip += `
${trialCountTranslation}: ${trialCount}
`;\n fieldsTooltip += '
';\n return fieldsTooltip;\n }\n\n /**\n * Checks if trial date is still valid\n * @param gridItem The license grid data item to check\n * @returns Boolean indicating if trial date is valid\n * @private\n */\n private checkIsTrialDateIsValid(gridItem: ILicenseGridData): boolean {\n if (!gridItem.TrialExpiredAt) {\n return false;\n }\n const daysDifference = this.dateService.getDateDiff(new Date(gridItem.TrialExpiredAt),\n new Date(), DateDiffType.Days);\n return daysDifference >= 0;\n }\n}\n","import {AfterContentInit, Component, EventEmitter, OnDestroy, ViewChild} from '@angular/core';\nimport {IGridData} from '../../../ap-interface';\nimport {ApPermissions} from 'invoker-transport';\nimport {ApDynComponentComponent} from '../../../ap-dyncomponent/ap-dyncomponent.component';\nimport {ApDynGridColumnConfigBase} from '../../../ap-dyngrids/config/ap-dyn-grid-column-config-base';\nimport {ApDynGridPagerConfigBase} from '../../../ap-dyngrids/config/ap-dyn-grid-pager-config-base';\nimport {ApDynGridPropertyColumnConfig} from '../../../ap-dyngrids/config/ap-dyn-grid-property-column-config';\nimport {\n ApDynGridPagerWizardConfig,\n ApDynGridPagerWizardSection\n} from '../../../ap-dyngrids/config/ap-dyn-grid-pager-wizard-config';\nimport {ApDynGridEditColumnConfig} from '../../../ap-dyngrids/config/ap-dyn-grid-edit-column-config';\nimport {find} from 'lodash';\nimport {AccessPermissionsStore} from '../../../stores/settings/access.permission.store';\nimport {filter, map} from 'rxjs/operators';\nimport {FarmUsersStore} from '../../../stores/farm/farm.users.store';\nimport {MapViewStore} from '../../../stores/layout/mapview.store';\nimport {TranslationStore} from '../../../stores/translation/translation.store';\nimport {\n ApDynGridStatusSwitchColumnConfig,\n IStateChange\n} from '../../../ap-dyngrids/config/ap-dyn-grid-status-switch-column.config';\nimport {Subscription} from 'rxjs';\nimport {UserGroupStore} from '../../../stores/settings/user.group.store';\nimport {GetPermissionPipe} from '../../../ap-permission/pipes/get-permission.pipe';\nimport IGroupMapping = Data.AccessPermission.IGroupMapping;\nimport IAccessPermissions = Data.AccessPermission.IAccessPermissions;\n\ninterface IAccessPermissionsGridData extends IGridData {\n Module: string;\n Feature: string;\n Admin: number;\n StatusClassAdmin: string;\n StatusDescAdmin: string;\n User: number;\n StatusClassUser: string;\n StatusDescUser: string;\n Consultant: number;\n StatusClassConsultant: string;\n StatusDescConsultant: string;\n}\n\n@Component({\n selector: 'ap-access-permissions',\n template: `\n `\n})\nexport class ApAccessPermissionsComponent implements AfterContentInit, OnDestroy {\n @ViewChild(ApDynComponentComponent, {static: true}) dynComponent: ApDynComponentComponent;\n columns: ApDynGridColumnConfigBase[] = [];\n public accessPermissionsLoading$ = this.permissionsStore.Listen(s => s.loading);\n public items$ = this.permissionsStore.Listen(s => s.data).pipe(\n filter(d => !!d),\n map(d => d.Convert(p => {\n const admin = this.getGroupAccessPermissions(p, 'Permission_Group_Administrator');\n const user = this.getGroupAccessPermissions(p, 'Permission_Group_User');\n const consultant = this.getGroupAccessPermissions(p, 'Permission_Group_Consultants');\n return {\n Id: p.Id,\n SourceItem: p,\n Module: this.translationStore.FindTranslationForSelectedLanguage(p.Featuremodul_Translationkey),\n Feature: this.translationStore.FindTranslationForSelectedLanguage(p.Feature_Translationkey),\n Admin: admin ? 1 : -1,\n StatusClassAdmin: admin ? 'ap-status-green' : 'ap-status-red',\n StatusDescAdmin: admin ? 'Global__Active' : 'Global__Inactive',\n User: user ? 1 : -1,\n StatusClassUser: user ? 'ap-status-green' : 'ap-status-red',\n StatusDescUser: user ? 'Global__Active' : 'Global__Inactive',\n Consultant: consultant ? 1 : -1,\n StatusClassConsultant: consultant ? 'ap-status-green' : 'ap-status-red',\n StatusDescConsultant: consultant ? 'Global__Active' : 'Global__Inactive'\n };\n })\n ));\n pager: ApDynGridPagerConfigBase;\n\n private _subscriptions: Subscription[] = [];\n\n constructor(private permissionsStore: AccessPermissionsStore,\n private mapViewStore: MapViewStore,\n private farmUsersStore: FarmUsersStore,\n private translationStore: TranslationStore,\n private userGroupStore: UserGroupStore,\n private permissionPipe: GetPermissionPipe) {\n this.mapViewStore.hideMapView();\n }\n\n ngAfterContentInit(): void {\n this.gridBuilder();\n }\n\n ngOnDestroy(): void {\n this._subscriptions.forEach(s => s.unsubscribe());\n }\n\n getGroupAccessPermissions(dataItem: IAccessPermissions, usergroupName: string): boolean {\n const firstGroup: IGroupMapping = find(dataItem.Groups, (i: IGroupMapping) => i.usergroup_name === usergroupName);\n if (!firstGroup) {\n return false;\n }\n return firstGroup.access_permission;\n }\n\n private gridBuilder(): void {\n this.permissionPipe.transform(ApPermissions.EDIT_ACCESS_RIGHTS).subscribe(permission => {\n this.columns = [\n new ApDynGridPropertyColumnConfig({\n field: 'Module',\n title: 'Global__Module',\n filterable: true,\n headerFilterable: true,\n width: 150,\n sortIndex: 0,\n sortDesc: false,\n groupIndex: 0,\n groupDesc: false\n }),\n new ApDynGridPropertyColumnConfig({\n field: 'Feature',\n title: 'Global_Access_Permission',\n filterable: true,\n headerFilterable: true,\n width: 150,\n sortIndex: 1,\n sortDesc: false,\n }),\n new ApDynGridStatusSwitchColumnConfig({\n field: 'Admin', title: 'Permission_Group_Administrator',\n disableGreen: !permission,\n disableRed: !permission,\n showYellowState: false,\n toolTipGreen: 'Global__Active',\n toolTipRed: 'Global__Inactive',\n stateChange: this._createEventEmitter(\n (event: IStateChange) => {\n switch (event.state) {\n case -1:\n this._setPermission(event.item['SourceItem'], false, 'Permission_Group_Administrator');\n break;\n case 1:\n this._setPermission(event.item['SourceItem'], true, 'Permission_Group_Administrator');\n break;\n }\n }),\n }),\n new ApDynGridStatusSwitchColumnConfig({\n field: 'User', title: 'Permission_Group_User',\n disableGreen: !permission,\n disableRed: !permission,\n showYellowState: false,\n toolTipGreen: 'Global__Active',\n toolTipRed: 'Global__Inactive',\n stateChange: this._createEventEmitter(\n (event: IStateChange) => {\n switch (event.state) {\n case -1:\n this._setPermission(event.item['SourceItem'], false, 'Permission_Group_User');\n break;\n case 1:\n this._setPermission(event.item['SourceItem'], true, 'Permission_Group_User');\n break;\n }\n }),\n }),\n new ApDynGridStatusSwitchColumnConfig({\n field: 'Consultant', title: 'Permission_Group_Consultants',\n disableGreen: !permission,\n disableRed: !permission,\n showYellowState: false,\n toolTipGreen: 'Global__Active',\n toolTipRed: 'Global__Inactive',\n stateChange: this._createEventEmitter(\n (event: IStateChange) => {\n switch (event.state) {\n case -1:\n this._setPermission(event.item['SourceItem'], false, 'Permission_Group_Consultants');\n break;\n case 1:\n this._setPermission(event.item['SourceItem'], true, 'Permission_Group_Consultants');\n break;\n }\n }),\n }),\n new ApDynGridEditColumnConfig(\n {\n disabled: true\n }\n )\n ];\n });\n this.pager = new ApDynGridPagerWizardConfig(\n new ApDynGridPagerWizardSection(),\n new ApDynGridPagerWizardSection(),\n new ApDynGridPagerWizardSection()\n );\n }\n\n private _createEventEmitter(generatorOrNext): EventEmitter {\n const eventEmitter = new EventEmitter();\n this._subscriptions.push(eventEmitter.subscribe(generatorOrNext));\n return eventEmitter;\n }\n\n private _setPermission(data: IAccessPermissions, value: boolean, group: string): void {\n const userGroup = data.Groups.find(_ => _.usergroup_name === group);\n const groupPer = this.userGroupStore.getUserGroups().find(_ => _.Id === userGroup.usergroup_id);\n if (userGroup === undefined || userGroup === null) {\n return;\n }\n if (value) {\n this.permissionsStore.insertPermission(data.FarmId, groupPer, data.Feature_Id);\n } else {\n this.permissionsStore.deletePermission(data.FarmId, groupPer, data.Feature_Id);\n }\n }\n}\n","import {AfterContentInit, Component, OnDestroy, OnInit, ViewChild} from '@angular/core';\nimport {BehaviorSubject, combineLatest, Observable, of, Subscription} from 'rxjs';\nimport {ApDynformsComponent} from '../../../ap-dynforms/ap-dynforms.component';\nimport {\n ApDynformsConfigFieldset\n} from '../../../ap-dynforms/config/ap-dynforms-config-fieldset';\nimport {IApPermissionData} from '../../../ap-interface';\nimport {ApPermissions} from 'invoker-transport';\nimport {\n ApDynformsConfigTextbox\n} from '../../../ap-dynforms/config/ap-dynforms-config-textbox';\nimport {LoginStore} from '../../../stores/login/login.store';\nimport {MapViewStore} from '../../../stores/layout/mapview.store';\nimport {LanguageStore} from '../../../stores/translation/language.store';\nimport {map} from 'rxjs/operators';\nimport {\n ApDynformsConfigComboBox\n} from '../../../ap-dynforms/config/ap-dynforms-config-combobox';\nimport {ApDynformsValidator} from '../../../ap-dynforms/ap-dynforms-validator';\nimport {Validators} from '@angular/forms';\nimport {NotifyStore} from '../../../stores/dialog/notify.store';\nimport {UserStore} from '../../../stores/base-data/user.store';\nimport {ObjectFactory} from 'ts-tooling';\nimport IUser = Data.Authentication.IUser;\nimport ILanguage = Data.Language.ILanguage;\nimport ApValidationLevel = Data.Api.Validation.ApValidationLevel;\nimport IApValidationResult = Data.Api.Validation.IApValidationResult;\n\ntype UserProfileSaveState = {\n isUserProfileChanged: boolean;\n isUserProfileSaving: boolean;\n isLanguageChanged: boolean;\n};\n\n/**\n * Component for the edit userprofile\n * As per ticket APV49-1463 user profile edit is temporary disabled\n */\n@Component({\n selector: 'ap-edit-userprofile',\n template: `\n \n
\n \n
\n
`\n})\nexport class ApUserProfileEditComponent implements OnInit, AfterContentInit, OnDestroy {\n @ViewChild(ApDynformsComponent, {static: true}) dynForm: ApDynformsComponent;\n public formConfig: ApDynformsConfigFieldset[] = [];\n public loading$: Observable = of(true);\n public caption: string;\n public disabledButton: BehaviorSubject = new BehaviorSubject(false);\n\n protected ApPermissions = ApPermissions;\n protected apPermissionData: IApPermissionData;\n\n private _user: IUser;\n private _language: ILanguage;\n private _saveState: UserProfileSaveState | undefined;\n private _changeLanguageWarningKey = 'UserProfile__Change_Language_Warning';\n private _subscriptions: Subscription[] = [];\n\n constructor(private userStore: UserStore,\n private loginStore: LoginStore,\n private notifyStore: NotifyStore,\n private mapViewStore: MapViewStore,\n private languageStore: LanguageStore) {\n }\n\n public ngOnInit(): void {\n this.loading$ = this._getLoading();\n this.mapViewStore.hideMapView();\n this._saveState = undefined;\n this._user = ObjectFactory.Copy(this.loginStore.User);\n this._language = ObjectFactory.Copy(this.languageStore.SelectedLanguage);\n this.formConfig = this._getFormFieldSets();\n }\n\n public ngAfterContentInit(): void {\n this._subscriptions.push(combineLatest([\n this.userStore.Listen(x => x.saving),\n this.userStore.Listen(x => x.saved)\n ]).subscribe(([saving, _]) => {\n this._onDatabaseUpdate(saving);\n }));\n this._subscriptions.push(this.dynForm.initialized.subscribe((): void => {\n this._subscriptions.push(this.dynForm.form.valueChanges.subscribe(form => {\n this._onFormValuesChanges(form);\n }));\n }));\n }\n\n public ngOnDestroy(): void {\n this._subscriptions.forEach(d => d.unsubscribe());\n const warningNotification = this._getWarningNotification();\n if (warningNotification) {\n this.notifyStore.removeMessage(warningNotification);\n }\n }\n\n public onSubmit(): void {\n this.disabledButton.next(true);\n this._saveState = {\n isUserProfileChanged: false,\n isUserProfileSaving: false,\n isLanguageChanged: false\n };\n if (this._isUserDataChanged(this._user, this.dynForm.form.value)) {\n this._saveState.isUserProfileChanged = true;\n }\n if (this._isLanguageChanged(this.languageStore.SelectedLanguage, this.dynForm.form.value)) {\n this._saveState.isLanguageChanged = true;\n }\n if (this._saveState.isUserProfileChanged) {\n this.userStore.updateUserFullName(\n this.loginStore.UserId,\n this.dynForm.form.value['Forename'],\n this.dynForm.form.value['Surname']\n );\n } else {\n this._afterDatabaseOperation();\n this.disabledButton.next(false);\n }\n }\n\n private _getLoading(): Observable {\n return combineLatest([\n this.languageStore.Listen(x => x.loading),\n this.loginStore.Listen(x => x.login.loading)\n ]).pipe(\n map(x => x.some(y => y))\n );\n }\n\n private _getFormFieldSets(): ApDynformsConfigFieldset[] {\n return [\n new ApDynformsConfigFieldset({\n key: 'user_profile_fieldset',\n config: [\n new ApDynformsConfigTextbox({\n key: 'Forename',\n label: 'Global__Forename',\n value: this._user.Forename,\n validators: [\n new ApDynformsValidator({\n validator: Validators.required,\n errorKey: 'Settings__Msg_Vali_Value_Required'\n })\n ]\n }),\n new ApDynformsConfigTextbox({\n key: 'Surname',\n label: 'Global__Surname',\n value: this._user.Surname,\n validators: [\n new ApDynformsValidator({\n validator: Validators.required,\n errorKey: 'Settings__Msg_Vali_Value_Required'\n })\n ]\n }),\n new ApDynformsConfigTextbox({\n key: 'EMail',\n label: 'Global__Email',\n value: this._user.EMail,\n disabled: true\n }),\n new ApDynformsConfigComboBox({\n key: 'Language',\n label: 'Language',\n valueField: 'Key',\n textField: 'LanguageName',\n value: this._language,\n options: this.languageStore.Listen(x => x.data),\n valuePrimitive: false\n })\n ]\n })\n ];\n }\n\n private _onDatabaseUpdate(saving: boolean): void {\n if (!this._saveState || !this._saveState.isUserProfileChanged || !this.disabledButton.getValue()) {\n return;\n }\n if (this._saveState.isUserProfileSaving) {\n this._afterDatabaseOperation();\n this.disabledButton.next(false);\n return;\n }\n this._saveState.isUserProfileSaving = saving;\n }\n\n private _afterDatabaseOperation(): void {\n if (this._saveState?.isLanguageChanged) {\n const selectedLanguage = this.dynForm.form.value['Language'] as ILanguage;\n this.languageStore.SelectLanguage(selectedLanguage);\n this.languageStore.saveSelectedLanguageToLocalStorage();\n if (!this._saveState.isUserProfileChanged) {\n this.notifyStore.showSaveSuccessMessage();\n }\n window.location.reload();\n }\n this._saveState = undefined;\n }\n\n private _onFormValuesChanges(form: any): void {\n if (form['Language']) {\n const warningNotification = this._getWarningNotification();\n const language = form['Language'] as ILanguage;\n if (!warningNotification && language.Key !== this.languageStore?.SelectedLanguage?.Key) {\n this.notifyStore.addMessage({\n ErrorKey: this._changeLanguageWarningKey,\n Level: ApValidationLevel.Warning,\n UserId: 0,\n UserName: '',\n Parameters: [],\n Counter: 1,\n DisplayTimeout: 0\n });\n return;\n }\n if (warningNotification) {\n this.notifyStore.removeMessage(warningNotification);\n }\n }\n }\n\n private _getWarningNotification(): IApValidationResult | null {\n return this.notifyStore.getNotify().find(n => n.ErrorKey === this._changeLanguageWarningKey);\n }\n\n private _isUserDataChanged(userData: IUser | null, formValue: any): boolean {\n return userData?.Forename !== formValue['Forename'] ||\n userData?.Surname !== formValue['Surname'];\n }\n\n private _isLanguageChanged(selectedLanguage: ILanguage | null, formValue: any): boolean {\n return selectedLanguage?.Key !== formValue['Language']?.Key;\n }\n}\n","import {Component} from '@angular/core';\nimport {MapViewStore} from '../../stores/layout/mapview.store';\n\n\n///\n/// As per ticket APV49-1463 User profile edit is temporary disabled\n///\n\n/*export enum SettingsTabs {\n UserProfile = 0,\n UserSettings = 1,\n}*/\n\n@Component({\n selector: 'ap-userprofile-usersettings',\n templateUrl: './ap-userprofile-usersettings.component.html'\n})\nexport class ApUserProfileUserSettingsComponent {\n /*public apPermissionData: IApPermissionData;\n public ApPermissions = ApPermissions;\n\n @ViewChild(ApUserProfileEditComponent, {static: false})\n public userProfileComponent: ApUserProfileEditComponent;\n\n @ViewChild(ApUserSettingsComponent, {static: false})\n public userSettingsComponent: ApUserSettingsComponent;\n\n public selectedTab: SettingsTabs = SettingsTabs.UserProfile;*/\n\n constructor(/*private farmUsersStore: FarmUsersStore,\n private permissionsStore: AccessPermissionsStore,*/\n private mapViewStore: MapViewStore) {\n this.mapViewStore.hideMapView();\n }\n\n /*selectTab(e): void {\n switch (this.selectedTab) {\n case SettingsTabs.UserProfile:\n break;\n case SettingsTabs.UserSettings:\n break;\n }\n this.selectedTab = e.index;\n }*/\n}\n","\n\n\n","import {NgModule} from '@angular/core';\nimport {Route, RouterModule} from '@angular/router';\nimport {ApCropGroupsOverviewComponent} from './components/cropgroups/ap-cropgroups.component';\nimport {PageMode} from '../ap-interface';\nimport {ApLoggerSettingsComponent} from './components/ap-logger-settings.component';\nimport {ApLicenceComponent} from './components/licence-management/ap-licence.component';\nimport {ApAccessPermissionsComponent} from './components/access-permissions/ap-access-permissions.component';\nimport {ApPermissionGuard} from '../guards/ap-permission-guard.service';\nimport {ApUserProfileUserSettingsComponent} from './components/ap-userprofile-usersettings.component';\nimport {ApSettingsEditComponent} from '../entry-components/ap-settings-entry-components/ap-settings-edit.component';\n\nconst routes: Route[] = [\n {\n path: 'general',\n component: ApSettingsEditComponent,\n canActivate: [ApPermissionGuard],\n data: {\n login: true,\n layout: PageMode.HALFSCREEN,\n }\n },\n {\n path: 'presentation',\n component: ApCropGroupsOverviewComponent,\n canActivate: [ApPermissionGuard],\n data: {\n login: true,\n layout: PageMode.HALFSCREEN\n }\n },\n {\n path: 'logger',\n component: ApLoggerSettingsComponent,\n canActivate: [ApPermissionGuard],\n data: {\n login: true,\n layout: PageMode.HALFSCREEN,\n }\n },\n {\n path: 'license',\n component: ApLicenceComponent,\n canActivate: [ApPermissionGuard],\n data: {\n login: true,\n layout: PageMode.HALFSCREEN\n }\n },\n {\n path: 'groups-rights',\n component: ApAccessPermissionsComponent,\n canActivate: [ApPermissionGuard],\n data: {\n login: true,\n layout: PageMode.HALFSCREEN\n }\n },\n {\n path: 'user-profile',\n component: ApUserProfileUserSettingsComponent,\n data: {\n login: true,\n layout: PageMode.HALFSCREEN\n }\n },\n];\n\n@NgModule({\n imports: [\n RouterModule.forChild(routes)\n ],\n exports: [\n RouterModule\n ]\n})\nexport class ApSettingsRoutes {\n}\n","import {NgModule} from '@angular/core';\nimport {ApCropGroupsOverviewComponent} from './components/cropgroups/ap-cropgroups.component';\nimport {CommonModule} from '@angular/common';\nimport {ApCoreModule} from '../ap-core/ap-core.module';\nimport {\n BodyModule,\n GridModule,\n GroupModule,\n HeaderModule,\n PagerModule,\n SharedModule\n} from '@progress/kendo-angular-grid';\nimport {ApTranslationModule} from '../translation/ap-translation.module';\nimport {ButtonsModule} from '@progress/kendo-angular-buttons';\nimport {ApSettingsRoutes} from './ap-settings.routes';\nimport {ApLoggerComponent} from './components/logger/ap-logger.component';\nimport {ApMachinesLoggerComponent} from './components/machineslogger/ap-machines-logger.component';\nimport {ApLoggerSettingsComponent} from './components/ap-logger-settings.component';\nimport {TabStripModule} from '@progress/kendo-angular-layout';\nimport {ApDynformsModule} from '../ap-dynforms/ap-dynforms.module';\nimport {ApAccessPermissionsComponent} from './components/access-permissions/ap-access-permissions.component';\nimport {ApLicenceComponent} from './components/licence-management/ap-licence.component';\nimport {ReactiveFormsModule} from '@angular/forms';\nimport {ComboBoxModule} from '@progress/kendo-angular-dropdowns';\nimport {ApUtilsModule} from '../ap-utils';\nimport {ApResponsiveTextModule} from '../ap-responsive-text/ap-responsive-text.module';\nimport {ApSectionHeaderModule} from '../ap-section-header/ap-section-header.module';\nimport {ApTooltipModule} from '../ap-tooltip/ap-tooltip.module';\nimport {ApDynComponentModule} from '../ap-dyncomponent/ap-dyncomponent.module';\nimport {ApUserProfileEditComponent} from './components/user-profile/ap-userprofile-edit.component';\nimport {ApUserSettingsComponent} from './components/user-settings/ap-usersettings.component';\nimport {ApUserProfileUserSettingsComponent} from './components/ap-userprofile-usersettings.component';\nimport {ApPermissionModule} from '../ap-permission/ap-permission.module';\n\n@NgModule({\n declarations: [\n ApCropGroupsOverviewComponent,\n ApLoggerComponent,\n ApMachinesLoggerComponent,\n ApLoggerSettingsComponent,\n ApAccessPermissionsComponent,\n ApLicenceComponent,\n ApUserProfileEditComponent,\n ApUserSettingsComponent,\n ApUserProfileUserSettingsComponent\n ],\n imports: [\n CommonModule,\n GridModule,\n ApCoreModule,\n BodyModule,\n HeaderModule,\n SharedModule,\n ApTranslationModule,\n ButtonsModule,\n GroupModule,\n PagerModule,\n ApSettingsRoutes,\n TabStripModule,\n ApDynformsModule,\n ReactiveFormsModule,\n ComboBoxModule,\n ApUtilsModule,\n ApResponsiveTextModule,\n ApTooltipModule,\n ApSectionHeaderModule,\n ApDynComponentModule,\n ApPermissionModule,\n ],\n exports: [\n ApCropGroupsOverviewComponent,\n ApLoggerComponent,\n ApMachinesLoggerComponent,\n ApLoggerSettingsComponent,\n ApAccessPermissionsComponent,\n ApLicenceComponent,\n ApUserProfileEditComponent,\n ApUserSettingsComponent,\n ApUserProfileUserSettingsComponent\n ]\n})\nexport class ApSettingsModule {\n}\n"],"sourceRoot":"webpack:///","file":"834.aff004b43a126dc1.js"}