Merge branch 'master' into feature/america
This commit is contained in:
@@ -16,6 +16,8 @@ import ShopInfoROStatusComponent from "./shop-info.rostatus.component";
|
||||
import ShopInfoSchedulingComponent from "./shop-info.scheduling.component";
|
||||
import ShopInfoSpeedPrint from "./shop-info.speedprint.component";
|
||||
import ShopInfoTaskPresets from "./shop-info.task-presets.component";
|
||||
import { useHistory, useLocation } from "react-router-dom";
|
||||
import queryString from "query-string";
|
||||
|
||||
const mapStateToProps = createStructuredSelector({
|
||||
bodyshop: selectBodyshop,
|
||||
@@ -32,6 +34,10 @@ export function ShopInfoComponent({ bodyshop, form, saveLoading }) {
|
||||
bodyshop.imexshopid
|
||||
);
|
||||
const { t } = useTranslation();
|
||||
const history = useHistory();
|
||||
const location = useLocation();
|
||||
const search = queryString.parse(location.search);
|
||||
|
||||
return (
|
||||
<Card
|
||||
extra={
|
||||
@@ -44,7 +50,12 @@ export function ShopInfoComponent({ bodyshop, form, saveLoading }) {
|
||||
</Button>
|
||||
}
|
||||
>
|
||||
<Tabs>
|
||||
<Tabs
|
||||
defaultActiveKey={search.subtab}
|
||||
onChange={(key) =>
|
||||
history.push({ search: `?tab=${search.tab}&subtab=${key}` })
|
||||
}
|
||||
>
|
||||
<Tabs.TabPane key="general" tab={t("bodyshop.labels.shopinfo")}>
|
||||
<ShopInfoGeneral form={form} />
|
||||
</Tabs.TabPane>
|
||||
|
||||
Reference in New Issue
Block a user