Skip to content

Commit

Permalink
Support multiple position alarms
Browse files Browse the repository at this point in the history
  • Loading branch information
tananaev committed Aug 29, 2024
1 parent 0d850ec commit 32ed8c7
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/common/util/formatter.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,15 @@ export const formatTime = (value, format) => {
};

export const formatStatus = (value, t) => t(prefixString('deviceStatus', value));
export const formatAlarm = (value, t) => (value ? t(prefixString('alarm', value)) : '');

export const formatAlarm = (value, t) => {
if (value) {
return value.split(',')
.map((alarm) => t(prefixString('alarm', alarm)))
.join(', ');
}
return '';
}

Check failure on line 63 in src/common/util/formatter.js

View workflow job for this annotation

GitHub Actions / build

Missing semicolon

export const formatCourse = (value) => {
const courseValues = ['\u2191', '\u2197', '\u2192', '\u2198', '\u2193', '\u2199', '\u2190', '\u2196'];
Expand Down

0 comments on commit 32ed8c7

Please sign in to comment.