remote-access protocol collection; dashboard site timezone + badge alignment

This commit is contained in:
2026-08-10 08:36:39 -04:00
parent e68f522132
commit d9d08f53ac
4 changed files with 228 additions and 20 deletions

View File

@@ -11,6 +11,7 @@ from flask_jwt_extended import jwt_required
from shopdb.api import db, success_response, error_response, paginated_response, ErrorCodes, get_pagination_params, paginate_query
from ..models import Notification, NotificationType
from ..models.notification import _utc_iso
from shopdb.api import require_permission, Setting
@@ -792,8 +793,12 @@ def get_shopfloor_notifications():
result = {
'notificationid': n.notificationid,
'notification': n.notification,
'starttime': n.starttime.isoformat() if n.starttime else None,
'endtime': n.endtime.isoformat() if n.endtime else None,
# _utc_iso, not a bare isoformat: these are stored NAIVE but hold
# UTC, and an untagged string is read by the browser as LOCAL time,
# shifting every card on the board by the tz offset. The model's
# to_dict already learned this; the shopfloor feed had not.
'starttime': _utc_iso(n.starttime),
'endtime': _utc_iso(n.endtime),
'ticketnumber': n.ticketnumber,
'link': n.link,
'isactive': n.isactive,