File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
src/app/device-model/device-model-edit Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -22,18 +22,18 @@ import { SupportedUnit } from '../supported-unit.model';
2222} )
2323export class DeviceModelEditComponent implements OnInit {
2424
25- public errorMessages : any ;
25+ public errorMessages : string [ ] ;
2626 public errorFields : string [ ] ;
2727 public deviceModel : DeviceModel = new DeviceModel ( ) ;
2828 public backButton : BackButton = { label : '' , routerLink : '/device-model' } ;
2929 public title = '' ;
3030 public formFailedSubmit = false ;
31- controlledPropperties = [ ] ;
32- categories = [ ] ;
31+ controlledPropperties : ControlledPropperty [ ] = [ ] ;
32+ categories : DeviceCategory [ ] = [ ] ;
3333 supportedUnits = new SupportedUnit ( ) ;
34- deviceFunctions = [ ] ;
34+ deviceFunctions : DeviceFunction [ ] = [ ] ;
3535 energyLimitationClass = new EnergyLimitationClass ( ) ;
36- supportedProtocol = [ ] ;
36+ supportedProtocol : SupportedProtocol [ ] = [ ] ;
3737
3838 constructor (
3939 private translate : TranslateService ,
@@ -55,6 +55,8 @@ export class DeviceModelEditComponent implements OnInit {
5555 if ( deviceModelId ) {
5656 this . getDeviceModel ( deviceModelId ) ;
5757 }
58+ this . supportedUnits . units . sort ( ( a , b ) => a . name . localeCompare ( b . name ) ) ;
59+ this . deviceFunctions . sort ( ( a , b ) => a . localeCompare ( b ) ) ;
5860 }
5961
6062 mapEnumsToArray ( ) {
You can’t perform that action at this time.
0 commit comments