From d4cf4d3f31c73bd93e60d4e26235077c4ce4dd52 Mon Sep 17 00:00:00 2001 From: gaspard Date: Wed, 7 Aug 2024 15:17:04 +0200 Subject: [PATCH] feat: add i18n & mock --- .../accessories/admin/users/editUser/EditUserForm.tsx | 4 ++-- src/mockServer/routes/users.js | 3 +++ src/resources/i18n/en.json | 2 ++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/components/accessories/admin/users/editUser/EditUserForm.tsx b/src/components/accessories/admin/users/editUser/EditUserForm.tsx index 0eab6b457..c71e835af 100644 --- a/src/components/accessories/admin/users/editUser/EditUserForm.tsx +++ b/src/components/accessories/admin/users/editUser/EditUserForm.tsx @@ -164,9 +164,9 @@ export const EditUserForm = ({ { navigate(PATHS.admin_users); diff --git a/src/mockServer/routes/users.js b/src/mockServer/routes/users.js index cb84f5212..848ccef6f 100644 --- a/src/mockServer/routes/users.js +++ b/src/mockServer/routes/users.js @@ -22,5 +22,8 @@ export const userRoutes = (server) => { server.post("/").intercept((_req, res) => { res.status(200).json(usersDTO[0]); }); + server.put("/").intercept((_req, res) => { + res.status(200).json(usersDTO[0]); + }); }); }; diff --git a/src/resources/i18n/en.json b/src/resources/i18n/en.json index 14841dae9..b00fc1119 100644 --- a/src/resources/i18n/en.json +++ b/src/resources/i18n/en.json @@ -29,6 +29,8 @@ "addUser": "New user", "createdSuccessTitle": "User created", "createdSuccessMessage": "User has been created successfully!", + "updatedSuccessTitle": "User updated", + "updatedSuccessMessage": "User has been updated successfully!", "validateUserNeedsGroup": "Each user should belong to a group", "validatePasswordNeeded": "No password provided.", "validatePasswordTooShort": "Password is too short - should be 5 chars minimum.",