Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Add staff views titles
dominik-zeglenad8bcf30e62c
diff --git a/saleor/static/dashboard-next/staff/index.tsx b/saleor/static/dashboard-next/staff/index.tsxindex d17816051e..b84e65c2eb 100644--- a/saleor/static/dashboard-next/staff/index.tsx+++ b/saleor/static/dashboard-next/staff/index.tsx@@ -2,6 +2,8 @@ import { parse as parseQs } from "qs";import * as React from "react";import { Route, RouteComponentProps, Switch } from "react-router-dom";+import { WindowTitle } from "../components/WindowTitle";+import i18n from "../i18n";import StaffDetailsComponent from "./views/StaffDetails";import StaffListComponent, { StaffListQueryParams } from "./views/StaffList";@@ -26,10 +28,13 @@ const StaffDetails: React.StatelessComponent<);const Component = ({ match }) => (- <Switch>- <Route exact path={match.url} component={StaffList} />- <Route exact path={`${match.url}/:id/`} component={StaffDetails} />- </Switch>+ <>+ <WindowTitle title={i18n.t("Staff")} />+ <Switch>+ <Route exact path={match.url} component={StaffList} />+ <Route exact path={`${match.url}/:id/`} component={StaffDetails} />+ </Switch>+ </>);export const staffListUrl = "/staff/";diff --git a/saleor/static/dashboard-next/staff/views/StaffDetails.tsx b/saleor/static/dashboard-next/staff/views/StaffDetails.tsxindex 10554e8271..ffd6ac4eb2 100644--- a/saleor/static/dashboard-next/staff/views/StaffDetails.tsx+++ b/saleor/static/dashboard-next/staff/views/StaffDetails.tsx@@ -3,6 +3,7 @@ import * as React from "react";import { staffListUrl } from "..";import Messages from "../../components/messages";import Navigator from "../../components/Navigator";+import { WindowTitle } from "../../components/WindowTitle";import i18n from "../../i18n";import { maybe } from "../../misc";import StaffDetailsPage from "../components/StaffDetailsPage/StaffDetailsPage";@@ -52,24 +53,27 @@ export const StaffDetails: React.StatelessComponent<OrderListProps> = ({onCompleted={handleStaffMemberDelete}>{deleteStaffMember => (- <StaffDetailsPage- disabled={loading}- onBack={() => navigate(staffListUrl)}- onDelete={deleteStaffMember}- onSubmit={variables =>- updateStaffMember({- variables: {- id,- input: {- isActive: variables.isActive,- permissions: variables.permissions+ <>+ <WindowTitle title={maybe(() => data.user.email)} />+ <StaffDetailsPage+ disabled={loading}+ onBack={() => navigate(staffListUrl)}+ onDelete={deleteStaffMember}+ onSubmit={variables =>+ updateStaffMember({+ variables: {+ id,+ input: {+ isActive: variables.isActive,+ permissions: variables.permissions+ }}- }- })- }- permissions={maybe(() => data.shop.permissions)}- staffMember={maybe(() => data.user)}- />+ })+ }+ permissions={maybe(() => data.shop.permissions)}+ staffMember={maybe(() => data.user)}+ />+ </>)}</TypedStaffMemberDeleteMutation>)}