From eff829471a03cd8da2076dd385cf5037da50ef03 Mon Sep 17 00:00:00 2001 From: Sylvain Date: Mon, 9 Jan 2023 12:26:43 +0100 Subject: [PATCH] (bug) event in negative timezone --- CHANGELOG.md | 1 + app/frontend/src/javascript/lib/api.ts | 2 +- package.json | 2 +- yarn.lock | 5 ++--- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f0ae40bec..1e21d1988 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ # Changelog Fab-manager - Improved fix_invoice_item task +- Fix a bug: unable to set some dates for the events if user is in negative timezone - Fix a bug: events are shown as over and unbookable, starting from midnight at the event end's day - Fix a bug: updating a space/machine/event/training removes the image - Fix a bug: cryptic error message when failed to create a manager diff --git a/app/frontend/src/javascript/lib/api.ts b/app/frontend/src/javascript/lib/api.ts index 29c5374d6..b90cb27ce 100644 --- a/app/frontend/src/javascript/lib/api.ts +++ b/app/frontend/src/javascript/lib/api.ts @@ -18,7 +18,7 @@ export default class ApiLib { ...object, ...attachmentAttributes.reduce((a, name) => { return { ...a, [name]: null }; }, {}) } - }); + }, { dateWithTimezone: true }); attachmentAttributes.forEach((attr) => { data.delete(`${name}[${attr}]`); if (Array.isArray(object[attr])) { diff --git a/package.json b/package.json index 45aa16646..45ce867d8 100644 --- a/package.json +++ b/package.json @@ -151,7 +151,7 @@ "ngUpload": "0.5", "ngtemplate-loader": "^2.1.0", "nvd3": "1.8", - "object-to-formdata": "^4.4.2", + "object-to-formdata": "https://github.com/sylvainbx/object-to-formdata.git#master", "phosphor-react": "^1.4.0", "process": "^0.11.10", "prop-types": "^15.7.2", diff --git a/yarn.lock b/yarn.lock index b63e8d438..43654e7c3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8311,10 +8311,9 @@ object-keys@^1.0.12, object-keys@^1.1.1: resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== -object-to-formdata@^4.4.2: +"object-to-formdata@https://github.com/sylvainbx/object-to-formdata.git#master": version "4.4.2" - resolved "https://registry.yarnpkg.com/object-to-formdata/-/object-to-formdata-4.4.2.tgz#f89013f90493c58cb5f6ab9f50b7aeec30745ea6" - integrity sha512-fu6UDjsqIfFUu/B3GXJ2IFnNAL/YbsC1PPzqDIFXcfkhdYjTD3K4zqhyD/lZ6+KdP9O/64YIPckIOiS5ouXwLA== + resolved "https://github.com/sylvainbx/object-to-formdata.git#4c00be9626e64653e0e2fdfbefca99b3fb3de511" object.assign@^4.1.0, object.assign@^4.1.2: version "4.1.2"