Skip to content

Commit

Permalink
feat: add i18n & mock
Browse files Browse the repository at this point in the history
  • Loading branch information
gasp committed Aug 29, 2024
1 parent fc5d474 commit d4cf4d3
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -164,9 +164,9 @@ export const EditUserForm = ({
</form>
<ConfirmationDialog
isOpen={hasSucceeded}
title={t("user.groupUpdated")}
title={t("user.updatedSuccessTitle")}
icon={checkIcon}
info={t("user.groupUpdateSuccess")}
info={t("user.updatedSuccessMessage")}
primaryButtonLabel="Ok"
handlePrimaryButtonClick={() => {
navigate(PATHS.admin_users);
Expand Down
3 changes: 3 additions & 0 deletions src/mockServer/routes/users.js
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
});
});
};
2 changes: 2 additions & 0 deletions src/resources/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -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.",
Expand Down

0 comments on commit d4cf4d3

Please sign in to comment.