Merge branch 'develop' into 'devops-staging'
Perbaikan Project PPOB See merge request empatnusabangsa/ppob/ppob-frontend!67
This commit is contained in:
commit
2e4274c9b8
|
@ -252,6 +252,17 @@ export const DetailUser = observer(() => {
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
const dataRoute = [
|
||||||
|
{
|
||||||
|
route: LINKS.MEMBERSHIP,
|
||||||
|
name: "Keanggotaan"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
route: LINKS.USER_DETAIL.replace(":id", id),
|
||||||
|
name: <span style={{ fontWeight: "bold" }}>Detail User</span>,
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
const styleSaldoTitle = store.ui.mediaQuery.isDesktop
|
const styleSaldoTitle = store.ui.mediaQuery.isDesktop
|
||||||
? {
|
? {
|
||||||
display: "flex",
|
display: "flex",
|
||||||
|
@ -275,13 +286,14 @@ export const DetailUser = observer(() => {
|
||||||
store.authentication.dataProfit.userDetail?.image_identity,
|
store.authentication.dataProfit.userDetail?.image_identity,
|
||||||
"detail"
|
"detail"
|
||||||
);
|
);
|
||||||
console.log(
|
console.log(store.authentication.listImage, "detail gambar");
|
||||||
store.authentication.listImage,
|
|
||||||
"detail gambar"
|
|
||||||
);
|
|
||||||
return (
|
return (
|
||||||
<div className={[""].join(" ")}>
|
<div className={[""].join(" ")}>
|
||||||
<BreadcumbComponent data={routeData} />
|
<BreadcumbComponent
|
||||||
|
data={
|
||||||
|
store.authentication.userData.role === "Admin" ? routeData : dataRoute
|
||||||
|
}
|
||||||
|
/>
|
||||||
<Card>
|
<Card>
|
||||||
<Row style={{ marginBottom: 10 }}>
|
<Row style={{ marginBottom: 10 }}>
|
||||||
<Title strong level={2}>
|
<Title strong level={2}>
|
||||||
|
@ -338,7 +350,8 @@ export const DetailUser = observer(() => {
|
||||||
store.membership.dataDetail.userDetail.image_identity
|
store.membership.dataDetail.userDetail.image_identity
|
||||||
);
|
);
|
||||||
console.log(
|
console.log(
|
||||||
store.membership.dataDetail.userDetail.image_store,"ini store"
|
store.membership.dataDetail.userDetail.image_store,
|
||||||
|
"ini store"
|
||||||
);
|
);
|
||||||
console.log(store.membership.dataDetail.username);
|
console.log(store.membership.dataDetail.username);
|
||||||
setVisibleModal(true);
|
setVisibleModal(true);
|
||||||
|
@ -523,7 +536,6 @@ export const DetailUser = observer(() => {
|
||||||
</Space>
|
</Space>
|
||||||
</Col>
|
</Col>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
</Row>
|
</Row>
|
||||||
|
|
||||||
<Row style={{ marginBottom: 20 }}>
|
<Row style={{ marginBottom: 20 }}>
|
||||||
|
@ -641,7 +653,7 @@ export const DetailUser = observer(() => {
|
||||||
? `${appConfig.apiUrl}/config/image/${item}`
|
? `${appConfig.apiUrl}/config/image/${item}`
|
||||||
: "https://st4.depositphotos.com/14953852/24787/v/600/depositphotos_247872612-stock-illustration-no-image-available-icon-vector.jpg"
|
: "https://st4.depositphotos.com/14953852/24787/v/600/depositphotos_247872612-stock-illustration-no-image-available-icon-vector.jpg"
|
||||||
}
|
}
|
||||||
style={{ width: "10vw",marginRight:15 }}
|
style={{ width: "10vw", marginRight: 15 }}
|
||||||
/>
|
/>
|
||||||
))}
|
))}
|
||||||
</Row>
|
</Row>
|
||||||
|
@ -679,7 +691,7 @@ export const DetailUser = observer(() => {
|
||||||
? `${appConfig.apiUrl}/config/image/${item}`
|
? `${appConfig.apiUrl}/config/image/${item}`
|
||||||
: "https://st4.depositphotos.com/14953852/24787/v/600/depositphotos_247872612-stock-illustration-no-image-available-icon-vector.jpg"
|
: "https://st4.depositphotos.com/14953852/24787/v/600/depositphotos_247872612-stock-illustration-no-image-available-icon-vector.jpg"
|
||||||
}
|
}
|
||||||
style={{ width: "10vw",marginRight:15 }}
|
style={{ width: "10vw", marginRight: 15 }}
|
||||||
/>
|
/>
|
||||||
))}
|
))}
|
||||||
</Row>
|
</Row>
|
||||||
|
|
|
@ -30,7 +30,6 @@ import { LINKS } from "../../routes/app";
|
||||||
import { useHistory } from "react-router-dom";
|
import { useHistory } from "react-router-dom";
|
||||||
import { ModalLoaderContext } from "../../utils/modal";
|
import { ModalLoaderContext } from "../../utils/modal";
|
||||||
|
|
||||||
|
|
||||||
export const Membership = observer(() => {
|
export const Membership = observer(() => {
|
||||||
const history = useHistory();
|
const history = useHistory();
|
||||||
const { Option } = Select;
|
const { Option } = Select;
|
||||||
|
@ -253,12 +252,19 @@ export const Membership = observer(() => {
|
||||||
name: <span style={{ fontWeight: "bold" }}>Keanggotaan</span>,
|
name: <span style={{ fontWeight: "bold" }}>Keanggotaan</span>,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
const dataRoute = [
|
||||||
|
{
|
||||||
|
route: LINKS.MEMBERSHIP,
|
||||||
|
name: "Keanggotaan"
|
||||||
|
},
|
||||||
|
];
|
||||||
const onSubmit = async (data, image, imageStore) => {
|
const onSubmit = async (data, image, imageStore) => {
|
||||||
data.superior = true;
|
data.superior = true;
|
||||||
console.log(imageStore, "Apa imageStore")
|
console.log(imageStore, "Apa imageStore");
|
||||||
|
|
||||||
if(!imageStore){
|
if (!imageStore) {
|
||||||
imageStore = []
|
imageStore = [];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (initialData.id) {
|
if (initialData.id) {
|
||||||
|
@ -325,7 +331,11 @@ export const Membership = observer(() => {
|
||||||
};
|
};
|
||||||
return (
|
return (
|
||||||
<div className={["ppob-container"].join(" ")}>
|
<div className={["ppob-container"].join(" ")}>
|
||||||
<BreadcumbComponent data={routeData} />
|
<BreadcumbComponent
|
||||||
|
data={
|
||||||
|
store.authentication.userData.role === "Admin" ? routeData : dataRoute
|
||||||
|
}
|
||||||
|
/>
|
||||||
<Card>
|
<Card>
|
||||||
<div>
|
<div>
|
||||||
<Row style={{ marginBottom: 20 }}>
|
<Row style={{ marginBottom: 20 }}>
|
||||||
|
@ -399,7 +409,7 @@ export const Membership = observer(() => {
|
||||||
pagination={{
|
pagination={{
|
||||||
onChange: async (page, pageSize) => {
|
onChange: async (page, pageSize) => {
|
||||||
store.membership.pageSize = pageSize;
|
store.membership.pageSize = pageSize;
|
||||||
store.membership.page = page -1;
|
store.membership.page = page - 1;
|
||||||
modalLoader.setLoading(true);
|
modalLoader.setLoading(true);
|
||||||
await getData();
|
await getData();
|
||||||
modalLoader.setLoading(false);
|
modalLoader.setLoading(false);
|
||||||
|
@ -442,7 +452,7 @@ export const Membership = observer(() => {
|
||||||
<small>Role : {item.roles?.name}</small> <br />
|
<small>Role : {item.roles?.name}</small> <br />
|
||||||
<small>Saldo : {item.coa?.amount}</small> <br />
|
<small>Saldo : {item.coa?.amount}</small> <br />
|
||||||
<Button
|
<Button
|
||||||
style={{ marginRight: 10,marginTop:7 }}
|
style={{ marginRight: 10, marginTop: 7 }}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
setDestination(item?.id);
|
setDestination(item?.id);
|
||||||
console.log(item?.id);
|
console.log(item?.id);
|
||||||
|
|
|
@ -182,6 +182,13 @@ export const Payback = observer(() => {
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
const dataRoute = [
|
||||||
|
{
|
||||||
|
route: LINKS.PAYBACK,
|
||||||
|
name: "Konfirmasi Pembayaran"
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
const handleAction = async (id, type) => {
|
const handleAction = async (id, type) => {
|
||||||
modalLoader.setLoading(true);
|
modalLoader.setLoading(true);
|
||||||
try {
|
try {
|
||||||
|
@ -222,7 +229,7 @@ export const Payback = observer(() => {
|
||||||
store.payback.visibleModalFilterPayback = false;
|
store.payback.visibleModalFilterPayback = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleCancelFilter = async() => {
|
const handleCancelFilter = async () => {
|
||||||
//setFilterMembership([]);
|
//setFilterMembership([]);
|
||||||
//form.resetFields();
|
//form.resetFields();
|
||||||
store.payback.filterMembership = null;
|
store.payback.filterMembership = null;
|
||||||
|
@ -236,8 +243,12 @@ export const Payback = observer(() => {
|
||||||
const data = form.getFieldsValue();
|
const data = form.getFieldsValue();
|
||||||
//console.log(data);
|
//console.log(data);
|
||||||
store.payback.filterMembership = filterMembership;
|
store.payback.filterMembership = filterMembership;
|
||||||
store.payback.filterStart = data.start_date ? (moment(data.start_date).format('YYYY-MM-DD') + ' 00:00:00') : null;
|
store.payback.filterStart = data.start_date
|
||||||
store.payback.filterEnd = data.end_date ? (moment(data.end_date).format('YYYY-MM-DD') + ' 23:59:59') : null;
|
? moment(data.start_date).format("YYYY-MM-DD") + " 00:00:00"
|
||||||
|
: null;
|
||||||
|
store.payback.filterEnd = data.end_date
|
||||||
|
? moment(data.end_date).format("YYYY-MM-DD") + " 23:59:59"
|
||||||
|
: null;
|
||||||
modalLoader.setLoading(true);
|
modalLoader.setLoading(true);
|
||||||
await store.payback.getDataConfirmation();
|
await store.payback.getDataConfirmation();
|
||||||
modalLoader.setLoading(false);
|
modalLoader.setLoading(false);
|
||||||
|
@ -281,7 +292,11 @@ export const Payback = observer(() => {
|
||||||
];
|
];
|
||||||
return (
|
return (
|
||||||
<div className={["ppob-container"].join(" ")}>
|
<div className={["ppob-container"].join(" ")}>
|
||||||
<BreadcumbComponent data={routeData} />
|
<BreadcumbComponent
|
||||||
|
data={
|
||||||
|
store.authentication.userData.role === "Admin" ? routeData : dataRoute
|
||||||
|
}
|
||||||
|
/>
|
||||||
<Card>
|
<Card>
|
||||||
<div>
|
<div>
|
||||||
<Row style={{ marginBottom: 20 }}>
|
<Row style={{ marginBottom: 20 }}>
|
||||||
|
@ -470,7 +485,7 @@ export const Payback = observer(() => {
|
||||||
visible={store.payback.visibleModalFilterPayback}
|
visible={store.payback.visibleModalFilterPayback}
|
||||||
title={"Filter"}
|
title={"Filter"}
|
||||||
footer={footerLayoutFilter}
|
footer={footerLayoutFilter}
|
||||||
onCancel={async() => {
|
onCancel={async () => {
|
||||||
//form.resetFields();
|
//form.resetFields();
|
||||||
//setFilterMembership([]);
|
//setFilterMembership([]);
|
||||||
store.payback.filterMembership = null;
|
store.payback.filterMembership = null;
|
||||||
|
|
|
@ -133,6 +133,14 @@ export const PaybackCreated = observer(() => {
|
||||||
name: <span style={{ fontWeight: "bold" }}>Buat Pembayaran</span>,
|
name: <span style={{ fontWeight: "bold" }}>Buat Pembayaran</span>,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
const dataRoute = [
|
||||||
|
{
|
||||||
|
route: LINKS.PAYBACK_CREATED,
|
||||||
|
name: "Buat Pembayaran"
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
const handleRemoveFilter = async () => {
|
const handleRemoveFilter = async () => {
|
||||||
store.payback.filterStart = null;
|
store.payback.filterStart = null;
|
||||||
store.payback.filterEnd = null;
|
store.payback.filterEnd = null;
|
||||||
|
@ -209,7 +217,11 @@ export const PaybackCreated = observer(() => {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={["ppob-container"].join(" ")}>
|
<div className={["ppob-container"].join(" ")}>
|
||||||
<BreadcumbComponent data={routeData} />
|
<BreadcumbComponent
|
||||||
|
data={
|
||||||
|
store.authentication.userData.role === "Admin" ? routeData : dataRoute
|
||||||
|
}
|
||||||
|
/>
|
||||||
<Card>
|
<Card>
|
||||||
<div>
|
<div>
|
||||||
<Row style={{ marginBottom: 20 }}>
|
<Row style={{ marginBottom: 20 }}>
|
||||||
|
@ -307,10 +319,10 @@ export const PaybackCreated = observer(() => {
|
||||||
className={[""].join(" ")}
|
className={[""].join(" ")}
|
||||||
title={item.name}
|
title={item.name}
|
||||||
description={
|
description={
|
||||||
<div style={{marginBottom:10}}>
|
<div style={{ marginBottom: 10 }}>
|
||||||
<small>Amount: {item.amount}</small>
|
<small>Amount: {item.amount}</small>
|
||||||
<br/>
|
<br />
|
||||||
<div style={{marginTop:5}}>
|
<div style={{ marginTop: 5 }}>
|
||||||
<small>Status : </small>
|
<small>Status : </small>
|
||||||
<Tag
|
<Tag
|
||||||
color={
|
color={
|
||||||
|
@ -336,7 +348,6 @@ export const PaybackCreated = observer(() => {
|
||||||
: "Rejected"}
|
: "Rejected"}
|
||||||
</Tag>
|
</Tag>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
|
|
@ -1,15 +1,30 @@
|
||||||
import React, {useContext, useEffect, useState} from "react";
|
import React, { useContext, useEffect, useState } from "react";
|
||||||
import {Button, Card, Col, Form, Input, message, Modal, Row, Select, Upload} from "antd";
|
import {
|
||||||
import {FilterOutlined, PlusOutlined, UploadOutlined,} from "@ant-design/icons";
|
Button,
|
||||||
import {BreadcumbComponent} from "../../component/BreadcumbComponent";
|
Card,
|
||||||
import {useStore} from "../../utils/useStore";
|
Col,
|
||||||
import {observer} from "mobx-react-lite";
|
Form,
|
||||||
import {ProductComponent} from "../../component/ProductComponent";
|
Input,
|
||||||
import {LINKS} from "../../routes/app";
|
message,
|
||||||
import {ModalLoaderContext} from "../../utils/modal";
|
Modal,
|
||||||
|
Row,
|
||||||
|
Select,
|
||||||
|
Upload,
|
||||||
|
} from "antd";
|
||||||
|
import {
|
||||||
|
FilterOutlined,
|
||||||
|
PlusOutlined,
|
||||||
|
UploadOutlined,
|
||||||
|
} from "@ant-design/icons";
|
||||||
|
import { BreadcumbComponent } from "../../component/BreadcumbComponent";
|
||||||
|
import { useStore } from "../../utils/useStore";
|
||||||
|
import { observer } from "mobx-react-lite";
|
||||||
|
import { ProductComponent } from "../../component/ProductComponent";
|
||||||
|
import { LINKS } from "../../routes/app";
|
||||||
|
import { ModalLoaderContext } from "../../utils/modal";
|
||||||
|
|
||||||
const {Search} = Input;
|
const { Search } = Input;
|
||||||
const {Option} = Select;
|
const { Option } = Select;
|
||||||
|
|
||||||
export const Product = observer(() => {
|
export const Product = observer(() => {
|
||||||
const store = useStore();
|
const store = useStore();
|
||||||
|
@ -30,7 +45,7 @@ export const Product = observer(() => {
|
||||||
store.supplier.getData(),
|
store.supplier.getData(),
|
||||||
store.category.getData(),
|
store.category.getData(),
|
||||||
store.product.getDataSubCategories(),
|
store.product.getDataSubCategories(),
|
||||||
store.product.getProductPartner()
|
store.product.getProductPartner(),
|
||||||
]);
|
]);
|
||||||
await store.product.getData();
|
await store.product.getData();
|
||||||
modalLoader.setLoading(false);
|
modalLoader.setLoading(false);
|
||||||
|
@ -58,18 +73,26 @@ export const Product = observer(() => {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
route: LINKS.PRODUCT,
|
route: LINKS.PRODUCT,
|
||||||
name: <span style={{fontWeight: "bold"}}>Produk</span>,
|
name: <span style={{ fontWeight: "bold" }}>Produk</span>,
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
const dataRoute = [
|
||||||
|
{
|
||||||
|
route: LINKS.PRODUCT,
|
||||||
|
name: "Produk",
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
const beforeUpload = (file) => {
|
const beforeUpload = (file) => {
|
||||||
let isLt2M;
|
let isLt2M;
|
||||||
let allowedFile = [
|
let allowedFile = [
|
||||||
"text/csv", "application/csv",
|
"text/csv",
|
||||||
|
"application/csv",
|
||||||
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
||||||
"application/vnd.ms-excel.sheet.binary.macroEnabled.12",
|
"application/vnd.ms-excel.sheet.binary.macroEnabled.12",
|
||||||
"application/vnd.ms-excel",
|
"application/vnd.ms-excel",
|
||||||
"application/vnd.ms-excel.sheet.macroEnabled.12"
|
"application/vnd.ms-excel.sheet.macroEnabled.12",
|
||||||
];
|
];
|
||||||
let isValid = allowedFile.includes(file.type);
|
let isValid = allowedFile.includes(file.type);
|
||||||
if (!isValid) {
|
if (!isValid) {
|
||||||
|
@ -93,12 +116,14 @@ export const Product = observer(() => {
|
||||||
message.error("Failed upload excel!");
|
message.error("Failed upload excel!");
|
||||||
}
|
}
|
||||||
|
|
||||||
setFileList([{
|
setFileList([
|
||||||
uid: '-1',
|
{
|
||||||
|
uid: "-1",
|
||||||
name: response.body.filename,
|
name: response.body.filename,
|
||||||
status: 'done',
|
status: "done",
|
||||||
url: '',
|
url: "",
|
||||||
}]);
|
},
|
||||||
|
]);
|
||||||
setExcel(response.body.filename);
|
setExcel(response.body.filename);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
setLoading(false);
|
setLoading(false);
|
||||||
|
@ -107,10 +132,10 @@ export const Product = observer(() => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleChange = (info) => {
|
const handleChange = (info) => {
|
||||||
if (info.file.status === 'uploading') {
|
if (info.file.status === "uploading") {
|
||||||
setLoading(true);
|
setLoading(true);
|
||||||
} else {
|
} else {
|
||||||
setLoading(false)
|
setLoading(false);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -140,7 +165,7 @@ export const Product = observer(() => {
|
||||||
const handleSubmit = async (data) => {
|
const handleSubmit = async (data) => {
|
||||||
const request = {
|
const request = {
|
||||||
fileName: excel,
|
fileName: excel,
|
||||||
supplierCode: data.supplierCode
|
supplierCode: data.supplierCode,
|
||||||
};
|
};
|
||||||
const responseUploadProduct = await handleUploadProduct(request);
|
const responseUploadProduct = await handleUploadProduct(request);
|
||||||
|
|
||||||
|
@ -153,17 +178,24 @@ export const Product = observer(() => {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={[""].join(" ")}>
|
<div className={[""].join(" ")}>
|
||||||
<BreadcumbComponent data={routeData}/>
|
<BreadcumbComponent
|
||||||
|
data={
|
||||||
|
store.authentication.userData.role === "Admin" ||
|
||||||
|
store.authentication.userData.role === "Admin Partner"
|
||||||
|
? routeData
|
||||||
|
: dataRoute
|
||||||
|
}
|
||||||
|
/>
|
||||||
<Card>
|
<Card>
|
||||||
<div>
|
<div>
|
||||||
<Row style={{marginBottom: 20}}>
|
<Row style={{ marginBottom: 20 }}>
|
||||||
<Col span={12}>
|
<Col span={12}>
|
||||||
<Button
|
<Button
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
store.product.visibleModalFilterProduct = true;
|
store.product.visibleModalFilterProduct = true;
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<FilterOutlined/>
|
<FilterOutlined />
|
||||||
Filter
|
Filter
|
||||||
</Button>
|
</Button>
|
||||||
</Col>
|
</Col>
|
||||||
|
@ -184,7 +216,8 @@ export const Product = observer(() => {
|
||||||
}}
|
}}
|
||||||
/> */}
|
/> */}
|
||||||
|
|
||||||
{store.authentication.userData.role == "Admin" && <div
|
{store.authentication.userData.role == "Admin" && (
|
||||||
|
<div
|
||||||
style={{
|
style={{
|
||||||
display: store.ui.mediaQuery.isMobile ? "" : "flex",
|
display: store.ui.mediaQuery.isMobile ? "" : "flex",
|
||||||
justifyContent: "flex-end",
|
justifyContent: "flex-end",
|
||||||
|
@ -197,17 +230,18 @@ export const Product = observer(() => {
|
||||||
marginRight: store.ui.mediaQuery.isMobile ? 0 : 10,
|
marginRight: store.ui.mediaQuery.isMobile ? 0 : 10,
|
||||||
marginBottom: store.ui.mediaQuery.isMobile ? 10 : 10,
|
marginBottom: store.ui.mediaQuery.isMobile ? 10 : 10,
|
||||||
}}
|
}}
|
||||||
icon={<PlusOutlined/>}
|
icon={<PlusOutlined />}
|
||||||
onClick={() => setVisibleModalUpload(true)}
|
onClick={() => setVisibleModalUpload(true)}
|
||||||
>
|
>
|
||||||
Tambah Produk
|
Tambah Produk
|
||||||
</Button>
|
</Button>
|
||||||
</div>}
|
</div>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
</Col>
|
</Col>
|
||||||
</Row>
|
</Row>
|
||||||
</div>
|
</div>
|
||||||
<ProductComponent/>
|
<ProductComponent />
|
||||||
</Card>
|
</Card>
|
||||||
|
|
||||||
<Modal
|
<Modal
|
||||||
|
@ -236,7 +270,9 @@ export const Product = observer(() => {
|
||||||
<Form.Item
|
<Form.Item
|
||||||
name="fileName"
|
name="fileName"
|
||||||
label="Upload Excel Product"
|
label="Upload Excel Product"
|
||||||
rules={[{required: true, message: "Please Upload Excel Product!"}]}
|
rules={[
|
||||||
|
{ required: true, message: "Please Upload Excel Product!" },
|
||||||
|
]}
|
||||||
>
|
>
|
||||||
<Upload
|
<Upload
|
||||||
fileList={fileList}
|
fileList={fileList}
|
||||||
|
@ -261,7 +297,7 @@ export const Product = observer(() => {
|
||||||
style={{
|
style={{
|
||||||
marginRight: store.ui.mediaQuery.isMobile ? 0 : 10,
|
marginRight: store.ui.mediaQuery.isMobile ? 0 : 10,
|
||||||
}}
|
}}
|
||||||
icon={<UploadOutlined/>}
|
icon={<UploadOutlined />}
|
||||||
>
|
>
|
||||||
Upload Product
|
Upload Product
|
||||||
</Button>
|
</Button>
|
||||||
|
@ -271,10 +307,10 @@ export const Product = observer(() => {
|
||||||
<Form.Item
|
<Form.Item
|
||||||
name="supplierCode"
|
name="supplierCode"
|
||||||
label="Supplier Code"
|
label="Supplier Code"
|
||||||
rules={[{required: true, message: "Please input Supplier Code!"}]}
|
rules={[{ required: true, message: "Please input Supplier Code!" }]}
|
||||||
>
|
>
|
||||||
<Select>
|
<Select>
|
||||||
{store.supplier.data.map(data => (
|
{store.supplier.data.map((data) => (
|
||||||
<Option key={data.id} value={data.code}>
|
<Option key={data.id} value={data.code}>
|
||||||
{data.name}
|
{data.name}
|
||||||
</Option>
|
</Option>
|
||||||
|
|
|
@ -38,7 +38,7 @@ export const Profile = observer(() => {
|
||||||
const routeData = [
|
const routeData = [
|
||||||
{
|
{
|
||||||
route: LINKS.HOME,
|
route: LINKS.HOME,
|
||||||
name: "Home",
|
name: "Beranda",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
route: LINKS.PROFILE,
|
route: LINKS.PROFILE,
|
||||||
|
@ -46,6 +46,13 @@ export const Profile = observer(() => {
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
const dataRoute = [
|
||||||
|
{
|
||||||
|
route: LINKS.PROFILE,
|
||||||
|
name: "Profil",
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
(async () => {
|
(async () => {
|
||||||
modalLoader.setLoading(true);
|
modalLoader.setLoading(true);
|
||||||
|
@ -214,7 +221,14 @@ export const Profile = observer(() => {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={["ppob-container"].join(" ")}>
|
<div className={["ppob-container"].join(" ")}>
|
||||||
<BreadcumbComponent data={routeData} />
|
<BreadcumbComponent
|
||||||
|
data={
|
||||||
|
store.authentication.userData.role === "Admin" ||
|
||||||
|
store.authentication.userData.role === "Admin Partner"
|
||||||
|
? routeData
|
||||||
|
: dataRoute
|
||||||
|
}
|
||||||
|
/>
|
||||||
<Card>
|
<Card>
|
||||||
<Title strong>Profile</Title>
|
<Title strong>Profile</Title>
|
||||||
<Row style={{ marginBottom: 20 }}>
|
<Row style={{ marginBottom: 20 }}>
|
||||||
|
@ -362,7 +376,7 @@ export const Profile = observer(() => {
|
||||||
? `${appConfig.apiUrl}/config/image/${item}`
|
? `${appConfig.apiUrl}/config/image/${item}`
|
||||||
: "https://st4.depositphotos.com/14953852/24787/v/600/depositphotos_247872612-stock-illustration-no-image-available-icon-vector.jpg"
|
: "https://st4.depositphotos.com/14953852/24787/v/600/depositphotos_247872612-stock-illustration-no-image-available-icon-vector.jpg"
|
||||||
}
|
}
|
||||||
style={{ width: "10vw",marginRight:15 }}
|
style={{ width: "10vw", marginRight: 15 }}
|
||||||
/>
|
/>
|
||||||
))}
|
))}
|
||||||
</Row>
|
</Row>
|
||||||
|
|
|
@ -55,13 +55,9 @@ export const Transaction = observer(() => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const routeData = [
|
const routeData = [
|
||||||
{
|
|
||||||
route: LINKS.HOME,
|
|
||||||
name: "Beranda",
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
route: LINKS.TRANSACTION,
|
route: LINKS.TRANSACTION,
|
||||||
name: <span style={{ fontWeight: "bold" }}>Transaksi</span>,
|
name: "Transaksi"
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user