Pages Config

This commit is contained in:
2021-12-14 18:52:42 +07:00
parent f5903db03e
commit 558ca2a098
18 changed files with 421 additions and 342 deletions

View File

@@ -4,13 +4,13 @@ import {FilterOutlined, PlusSquareOutlined,} from "@ant-design/icons";
import {BreadcumbComponent} from "../../component/BreadcumbComponent";
import {useStore} from "../../utils/useStore";
import {observer} from "mobx-react-lite";
import {CommisionComponent} from "../../component/CommisionComponent";
import {CommissionComponent} from "../../component/CommissionComponent";
import {LINKS} from "../../routes/app";
const {TabPane} = Tabs;
const {Search} = Input;
export const Commision = observer(() => {
export const Commission = observer(() => {
const [isLoading, setIsLoading] = useState(false);
const store = useStore();
@@ -18,8 +18,8 @@ export const Commision = observer(() => {
const init = async () => {
try {
setIsLoading(true);
await store.partner.getDataCategories();
await store.partner.getData();
//await store.commission.getDataCategories();
await store.commission.getData();
setIsLoading(false);
} catch (e) {
setIsLoading(false);
@@ -29,10 +29,10 @@ export const Commision = observer(() => {
init();
}, []);
const handleChangeTabPane = async (key) => {
store.product.filterCategory = key;
console.log(key);
};
// const handleChangeTabPane = async (key) => {
// store.product.filterCategory = key;
// console.log(key);
// };
const routeData = [
{
@@ -40,8 +40,8 @@ export const Commision = observer(() => {
name: "Home",
},
{
route: LINKS.PARTNER,
name: <span style={{fontWeight: 'bold'}}>Partner</span>,
route: LINKS.COMMISSION,
name: <span style={{fontWeight: 'bold'}}>Commission</span>,
},
];
@@ -59,7 +59,11 @@ export const Commision = observer(() => {
<Col span={12} style={{textAlign: "right"}}>
<Search
placeholder="input search text"
style={{width: 200, marginRight: 10}}
style={{
width: store.ui.mediaQuery.isMobile ? 160 : 200,
marginRight: store.ui.mediaQuery.isMobile ? 0 : 10,
marginBottom: store.ui.mediaQuery.isMobile ? 10 : 0,
}}
/>
<Button onClick={() => store.partner.visibleModalPartner = true}>
<PlusSquareOutlined/> New
@@ -67,7 +71,7 @@ export const Commision = observer(() => {
</Col>
</Row>
<Tabs
onChange={handleChangeTabPane}
//onChange={handleChangeTabPane}
size="default"
tabBarGutter="50"
>
@@ -76,7 +80,7 @@ export const Commision = observer(() => {
tab="Commision"
key="1"
>
<CommisionComponent/>
<CommissionComponent/>
</TabPane>
))
</Tabs>

View File

@@ -18,7 +18,7 @@ export const Partner = observer(() => {
const init = async () => {
try {
setIsLoading(true);
await store.partner.getDataCategories();
//await store.partner.getDataCategories();
await store.partner.getData();
setIsLoading(false);
} catch (e) {
@@ -29,10 +29,10 @@ export const Partner = observer(() => {
init();
}, []);
const handleChangeTabPane = async (key) => {
store.product.filterCategory = key;
console.log(key);
};
// const handleChangeTabPane = async (key) => {
// store.partner.filterCategory = key;
// console.log(key);
// };
const routeData = [
{
@@ -59,7 +59,11 @@ export const Partner = observer(() => {
<Col span={12} style={{textAlign: "right"}}>
<Search
placeholder="input search text"
style={{width: 200, marginRight: 10}}
style={{
width: store.ui.mediaQuery.isMobile ? 160 : 200,
marginRight: store.ui.mediaQuery.isMobile ? 0 : 10,
marginBottom: store.ui.mediaQuery.isMobile ? 10 : 0,
}}
/>
<Button onClick={() => store.partner.visibleModalPartner = true}>
<PlusSquareOutlined/> New
@@ -67,7 +71,7 @@ export const Partner = observer(() => {
</Col>
</Row>
<Tabs
onChange={handleChangeTabPane}
//onChange={handleChangeTabPane}
size="default"
tabBarGutter="50"
>

View File

@@ -18,7 +18,7 @@ export const Supplier = observer(() => {
const init = async () => {
try {
setIsLoading(true);
await store.supplier.getDataCategories();
//await store.supplier.getDataCategories();
await store.supplier.getData();
setIsLoading(false);
} catch (e) {
@@ -29,10 +29,10 @@ export const Supplier = observer(() => {
init();
}, []);
const handleChangeTabPane = async (key) => {
store.product.filterCategory = key;
console.log(key);
};
// const handleChangeTabPane = async (key) => {
// store.product.filterCategory = key;
// console.log(key);
// };
const routeData = [
{
@@ -44,7 +44,7 @@ export const Supplier = observer(() => {
name: <span style={{fontWeight: 'bold'}}>Supplier</span>,
},
];
return (
<div className={["ppob-container"].join(" ")}>
<BreadcumbComponent data={routeData}/>
@@ -59,7 +59,12 @@ export const Supplier = observer(() => {
<Col span={12} style={{textAlign: "right"}}>
<Search
placeholder="input search text"
style={{width: 200, marginRight: 10}}
style={{
width: store.ui.mediaQuery.isMobile ? 160 : 200,
marginRight: store.ui.mediaQuery.isMobile ? 0 : 10,
marginBottom: store.ui.mediaQuery.isMobile ? 10 : 0,
}}
onSearch={value => console.log(value)}
/>
<Button onClick={() => store.supplier.visibleModalSupplier = true}>
<PlusSquareOutlined/> New
@@ -67,7 +72,7 @@ export const Supplier = observer(() => {
</Col>
</Row>
<Tabs
onChange={handleChangeTabPane}
//onChange={handleChangeTabPane}
size="default"
tabBarGutter="50"
>