Fix #2343: Enable Save button when timezone changes

- Added timezone field to frontend validation schema
- Added timezone field to backend validation schema
- Fixed state synchronization in Settings component
This commit is contained in:
mohadeseh safari committed 2025-05-27 20:28:53 -04:00
1 parent 5b86d892c5
commit ed5d5986ff
3 files changed
+4

No files matched your search

+2
View File
@@ -85,6 +85,8 @@ const Settings = () => {
if (name === "timezone") {
dispatch(setTimezone({ timezone: value }));
// Make sure to update settingsData with the new timezone value
setSettingsData(newSettingsData);
}
if (name === "mode") {
+1
View File
@@ -277,6 +277,7 @@ const settingsValidation = joi.object({
}),
pagespeedApiKey: joi.string().allow("").optional(),
language: joi.string().required(),
timezone: joi.string().allow("").optional(),
systemEmailHost: joi.string().allow(""),
systemEmailPort: joi.number().allow(null, ""),
systemEmailAddress: joi.string().allow(""),
+1
View File
@@ -427,6 +427,7 @@ const updateAppSettingsBodyValidation = joi.object({
checkTTL: joi.number().allow(""),
pagespeedApiKey: joi.string().allow(""),
language: joi.string().allow(""),
timezone: joi.string().allow(""),
// showURL: joi.bool().required(),
systemEmailHost: joi.string().allow(""),
systemEmailPort: joi.number().allow(""),