tagyoureit / nodejs-poolController

An application to control pool equipment from various manufacturers.
GNU Affero General Public License v3.0
327 stars 97 forks source link

[BUG] (minor visual) dashPanel Schedules panel does not respect 12/24 hour setting #812

Closed CodeSlinger69 closed 1 year ago

CodeSlinger69 commented 1 year ago

nodejs-poolController Version/commit

head

nodejs-poolController-dashPanel Version/commit

No response

relayEquipmentManager Version/commit

No response

Node Version

No response

Platform

No response

RS485 Adapter

No response

Are you using Docker?

OCP

No response

Pump(s)

No response

Chlorinator(s)

No response

What steps will reproduce the bug?

Change 12 or 24 hour clock setting.

What happens?

The schedules panel on the dashPanel main screen will continue to display 12hour clock values.

What should have happened?

24 hour clock values (i.e. HH:mm) should be displayed when the clock is set to the 24 hour option.

Additional information

This is a low priority, minor visual issue.

I attempted to fix this in nodejs-poolController-dashPanel/scripts/schedules.js, lines 109 & 110 as so:

el.find('.picStartTime').text(startTimeType.name !== 'manual' ? data.startTimeType.desc : startTime.formatTime((o.clockMode == 12 ? 'h:mmtt' : 'HH:mm'), '--:--'));
el.find('.picEndTime').text(endTimeType.name !== 'manual' ? data.endTimeType.desc : endTime.formatTime((o.clockMode == 12 ? 'h:mmtt' : 'HH:mm'), '--:--'));

But it does not work correctly. I'll readily admit to not being an expert in HTML coding, so maybe o.clockMode is not valid in this scope?

rstrouse commented 1 year ago

I’ll have a look

rstrouse commented 1 year ago

I fixed this in dashPanel. Pull njsPC and dashPanel.