Skip to content

Commit 0bf1dec

Browse files
committed
chore(systems): tweak value shown for invalid module types
1 parent 59cb33e commit 0bf1dec

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

apps/backoffice/src/app/systems/system-modules.component.ts

+5-3
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ import { SystemStateService } from './system-state.service';
320320
}
321321
`,
322322
],
323-
standalone: false
323+
standalone: false,
324324
})
325325
export class SystemModulesComponent extends AsyncHandler {
326326
/** Whether a device should be listened to */
@@ -443,7 +443,7 @@ export class SystemModulesComponent extends AsyncHandler {
443443
public readonly addToSystem = (d) => this._service.addModuleToSystem(d);
444444

445445
public driver_type(role: PlaceDriverRole): string {
446-
if (role == null) return '';
446+
if (!role && role != 0) return '';
447447
switch (role) {
448448
case PlaceDriverRole.Device:
449449
return i18n('DRIVERS.DEVICE');
@@ -453,8 +453,10 @@ export class SystemModulesComponent extends AsyncHandler {
453453
return i18n('DRIVERS.SERVICE');
454454
case PlaceDriverRole.Websocket:
455455
return i18n('DRIVERS.WEBSOCKET');
456+
case PlaceDriverRole.Logic:
457+
return i18n('DRIVERS.LOGIC');
456458
}
457-
return i18n('DRIVERS.LOGIC');
459+
return i18n('DRIVERS.UNKNOWN');
458460
}
459461

460462
public get item(): PlaceSystem {

apps/backoffice/src/assets/locale/en.json

+1
Original file line numberDiff line numberDiff line change
@@ -391,6 +391,7 @@
391391
"SERVICE": "Service",
392392
"WEBSOCKET": "Websocket",
393393
"LOGIC": "Logic",
394+
"UNKNOWN": "Unknown",
394395
"SEARCH": "Search for drivers...",
395396
"ADD": "Add driver",
396397
"EDIT": "Edit driver",

0 commit comments

Comments
 (0)