diff --git a/locale/defaultMessages.json b/locale/defaultMessages.json index 3f9a2fde5..5e68dc42f 100644 --- a/locale/defaultMessages.json +++ b/locale/defaultMessages.json @@ -1849,13 +1849,6 @@ "src_dot_components_dot_AddressEdit_dot_944851093": { "string": "Country area" }, - "src_dot_components_dot_AppStatus_dot_1624959454": { - "string": "If you want to disable this App please uncheck the box below." - }, - "src_dot_components_dot_AppStatus_dot_1750277107": { - "context": "section header", - "string": "App Status" - }, "src_dot_components_dot_AssignAttributeDialog_dot_2173976534": { "context": "button", "string": "Assign attributes" @@ -7125,7 +7118,7 @@ "context": "dialog header", "string": "Permissions" }, - "src_dot_staff_dot_components_dot_StaffDetailsPage_dot_881953347": { + "src_dot_staff_dot_components_dot_StaffDetailsPage_dot_userStatusActive": { "context": "checkbox label", "string": "User is active" }, @@ -7232,6 +7225,13 @@ "context": "button", "string": "Delete photo" }, + "src_dot_staff_dot_components_dot_UserStatus_dot_userDisableInstruction": { + "string": "If you want to disable this User please uncheck the box below." + }, + "src_dot_staff_dot_components_dot_UserStatus_dot_userStatus": { + "context": "section header", + "string": "User Status" + }, "src_dot_staff_dot_views_dot_1308770978": { "context": "dialog header", "string": "delete Staff User" diff --git a/src/components/AppStatus/index.ts b/src/components/AppStatus/index.ts deleted file mode 100644 index 567fca42a..000000000 --- a/src/components/AppStatus/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export { default } from "./AppStatus"; -export * from "./AppStatus"; diff --git a/src/staff/components/StaffDetailsPage/StaffDetailsPage.tsx b/src/staff/components/StaffDetailsPage/StaffDetailsPage.tsx index 64ce5961e..da1f5bfa5 100644 --- a/src/staff/components/StaffDetailsPage/StaffDetailsPage.tsx +++ b/src/staff/components/StaffDetailsPage/StaffDetailsPage.tsx @@ -1,6 +1,5 @@ import { Card, CardContent, Typography } from "@material-ui/core"; import AccountPermissionGroups from "@saleor/components/AccountPermissionGroups"; -import AccountStatus from "@saleor/components/AppStatus"; import CardSpacer from "@saleor/components/CardSpacer"; import CardTitle from "@saleor/components/CardTitle"; import { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; @@ -18,6 +17,7 @@ import { sectionNames } from "@saleor/intl"; import { Backlink } from "@saleor/macaw-ui"; import { getUserName } from "@saleor/misc"; import { SearchPermissionGroups_search_edges_node } from "@saleor/searches/types/SearchPermissionGroups"; +import UserStatus from "@saleor/staff/components/UserStatus"; import { FetchMoreProps, SearchPageProps } from "@saleor/types"; import createMultiAutocompleteSelectHandler from "@saleor/utils/handlers/multiAutocompleteSelectChangeHandler"; import React from "react"; @@ -27,6 +27,7 @@ import { StaffMemberDetails_user } from "../../types/StaffMemberDetails"; import StaffPassword from "../StaffPassword/StaffPassword"; import StaffPreferences from "../StaffPreferences"; import StaffProperties from "../StaffProperties/StaffProperties"; +import { staffDetailsPageMessages as messages } from "./messages"; export interface StaffDetailsFormData { email: string; @@ -143,6 +144,13 @@ const StaffDetailsPage: React.FC = ({ )} {canEditStatus && ( <> + + = ({ /> - - )} diff --git a/src/staff/components/StaffDetailsPage/messages.ts b/src/staff/components/StaffDetailsPage/messages.ts new file mode 100644 index 000000000..c301440ed --- /dev/null +++ b/src/staff/components/StaffDetailsPage/messages.ts @@ -0,0 +1,8 @@ +import { defineMessages } from "react-intl"; + +export const staffDetailsPageMessages = defineMessages({ + userStatusActive: { + defaultMessage: "User is active", + description: "checkbox label" + } +}); diff --git a/src/components/AppStatus/AppStatus.tsx b/src/staff/components/UserStatus/UserStatus.tsx similarity index 73% rename from src/components/AppStatus/AppStatus.tsx rename to src/staff/components/UserStatus/UserStatus.tsx index d2cf31769..02c08cca0 100644 --- a/src/components/AppStatus/AppStatus.tsx +++ b/src/staff/components/UserStatus/UserStatus.tsx @@ -2,7 +2,9 @@ import { Card, CardContent, Typography } from "@material-ui/core"; import CardTitle from "@saleor/components/CardTitle"; import { ControlledCheckbox } from "@saleor/components/ControlledCheckbox"; import React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; +import { useIntl } from "react-intl"; + +import { userStatusMessages as messages } from "./messages"; interface AppStatusProps { data: { @@ -23,15 +25,10 @@ const AppStatus: React.FC = ({ return ( - + - + {intl.formatMessage(messages.userDisableInstruction)}
+
+
+ + User Status + +
+
+
+
+
+
+ If you want to disable this User please uncheck the box below. +
+ +
+
+
@@ -251350,75 +251419,6 @@ exports[`Storyshots Views / Staff / Staff member details default 1`] = `
-
-
-
- - App Status - -
-
-
-
-
-
- If you want to disable this App please uncheck the box below. -
- -
-
@@ -251980,6 +251980,76 @@ exports[`Storyshots Views / Staff / Staff member details loading 1`] = `
+
+
+ + User Status + +
+
+
+
+
+
+ If you want to disable this User please uncheck the box below. +
+ +
+
+
@@ -252073,76 +252143,6 @@ exports[`Storyshots Views / Staff / Staff member details loading 1`] = ` />
-
-
-
- - App Status - -
-
-
-
-
-
- If you want to disable this App please uncheck the box below. -
- -
-