remote-access protocol collection; dashboard site timezone + badge alignment
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user