Bug Fixing
This commit is contained in:
parent
7d1bf48fe9
commit
c019881070
|
@ -211,8 +211,8 @@ export const CategoryComponent = observer((props) => {
|
||||||
)}
|
)}
|
||||||
<Modal
|
<Modal
|
||||||
visible={store.category.visibleModalCategory}
|
visible={store.category.visibleModalCategory}
|
||||||
title={idData ? "Edit Category" : "Create a new Category"}
|
title={idData ? "Edit Kategori" : "Buat Kategori Baru"}
|
||||||
okText={idData ? "Edit" : "Create"}
|
okText={idData ? "Edit" : "Buat"}
|
||||||
cancelText="Batal"
|
cancelText="Batal"
|
||||||
onCancel={() => {
|
onCancel={() => {
|
||||||
form.resetFields();
|
form.resetFields();
|
||||||
|
|
|
@ -216,8 +216,8 @@ export const SubcategoryComponent = observer((props) => {
|
||||||
)}
|
)}
|
||||||
<Modal
|
<Modal
|
||||||
visible={store.subcategory.visibleModalSubcategory}
|
visible={store.subcategory.visibleModalSubcategory}
|
||||||
title={idData ? "Edit Sub Category" : "Create a new sub category"}
|
title={idData ? "Edit Sub Kategori" : "Buat Sub Kategori Baru"}
|
||||||
okText={idData ? "Edit" : "Create"}
|
okText={idData ? "Edit" : "Buat"}
|
||||||
cancelText="Batal"
|
cancelText="Batal"
|
||||||
onCancel={() => {
|
onCancel={() => {
|
||||||
form.resetFields();
|
form.resetFields();
|
||||||
|
|
|
@ -346,8 +346,8 @@ export const SupplierComponent = observer((props) => {
|
||||||
)}
|
)}
|
||||||
<Modal
|
<Modal
|
||||||
visible={store.supplier.visibleModalSupplier}
|
visible={store.supplier.visibleModalSupplier}
|
||||||
title={idData ? "Edit Supplier" : "Create a new Supplier"}
|
title={idData ? "Edit Supplier" : "Buat Supplier Baru"}
|
||||||
okText={idData ? "Edit" : "Create"}
|
okText={idData ? "Edit" : "Buat"}
|
||||||
cancelText="Batal"
|
cancelText="Batal"
|
||||||
onCancel={() => {
|
onCancel={() => {
|
||||||
form.resetFields();
|
form.resetFields();
|
||||||
|
|
|
@ -236,7 +236,10 @@ export const Konfirmasi = observer(() => {
|
||||||
<div className={["ppob-container"].join(" ")}>
|
<div className={["ppob-container"].join(" ")}>
|
||||||
<BreadcumbComponent
|
<BreadcumbComponent
|
||||||
data={
|
data={
|
||||||
store.authentication.userData.role === "Admin" ? routeData : dataRoute
|
store.authentication.userData.role === "Admin" ||
|
||||||
|
store.authentication.userData.role === "Customer Service"
|
||||||
|
? routeData
|
||||||
|
: dataRoute
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<Card>
|
<Card>
|
||||||
|
|
|
@ -323,7 +323,10 @@ export const Membership = observer(() => {
|
||||||
<div className={["ppob-container"].join(" ")}>
|
<div className={["ppob-container"].join(" ")}>
|
||||||
<BreadcumbComponent
|
<BreadcumbComponent
|
||||||
data={
|
data={
|
||||||
store.authentication.userData.role === "Admin" ? routeData : dataRoute
|
store.authentication.userData.role === "Admin" ||
|
||||||
|
store.authentication.userData.role === "Customer Service"
|
||||||
|
? routeData
|
||||||
|
: dataRoute
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<Card>
|
<Card>
|
||||||
|
@ -334,7 +337,7 @@ export const Membership = observer(() => {
|
||||||
<Button
|
<Button
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
store.membership.visibleModalFilterMembership = true;
|
store.membership.visibleModalFilterMembership = true;
|
||||||
store.membership.page=0;
|
store.membership.page = 0;
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<FilterOutlined />
|
<FilterOutlined />
|
||||||
|
@ -596,7 +599,7 @@ export const Membership = observer(() => {
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={24}>
|
<Col span={24}>
|
||||||
<Title level={5} type={"secondary"} strong>
|
<Title level={5} type={"secondary"} strong>
|
||||||
Type
|
Tipe
|
||||||
</Title>
|
</Title>
|
||||||
<Select
|
<Select
|
||||||
mode={"multiple"}
|
mode={"multiple"}
|
||||||
|
|
|
@ -189,10 +189,10 @@ export const MembershipModal = ({
|
||||||
visible={visible}
|
visible={visible}
|
||||||
title={
|
title={
|
||||||
initialData.isChangePassword
|
initialData.isChangePassword
|
||||||
? "Change Member Password"
|
? "Ganti Password Anggota"
|
||||||
: initialData.id
|
: initialData.id
|
||||||
? "Edit Member"
|
? "Edit Anggota"
|
||||||
: "Create a new Membership"
|
: "Buat Anggota Baru"
|
||||||
}
|
}
|
||||||
okText={initialData.id ? "Edit" : "Create"}
|
okText={initialData.id ? "Edit" : "Create"}
|
||||||
cancelText="Batal"
|
cancelText="Batal"
|
||||||
|
|
|
@ -35,7 +35,6 @@ import { capitalize } from "lodash";
|
||||||
import { PAYBACK_STATUS } from "../../constants/payback";
|
import { PAYBACK_STATUS } from "../../constants/payback";
|
||||||
import moment from "moment";
|
import moment from "moment";
|
||||||
|
|
||||||
|
|
||||||
export const Payback = observer(() => {
|
export const Payback = observer(() => {
|
||||||
const { Option } = Select;
|
const { Option } = Select;
|
||||||
const { Title } = Typography;
|
const { Title } = Typography;
|
||||||
|
@ -274,7 +273,10 @@ export const Payback = observer(() => {
|
||||||
<div className={["ppob-container"].join(" ")}>
|
<div className={["ppob-container"].join(" ")}>
|
||||||
<BreadcumbComponent
|
<BreadcumbComponent
|
||||||
data={
|
data={
|
||||||
store.authentication.userData.role === "Admin" ? routeData : dataRoute
|
store.authentication.userData.role === "Admin" ||
|
||||||
|
store.authentication.userData.role === "Customer Service"
|
||||||
|
? routeData
|
||||||
|
: dataRoute
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<Card>
|
<Card>
|
||||||
|
@ -501,7 +503,7 @@ export const Payback = observer(() => {
|
||||||
label="Dari Tanggal"
|
label="Dari Tanggal"
|
||||||
rules={[{ required: true, message: "Please input Date!" }]}
|
rules={[{ required: true, message: "Please input Date!" }]}
|
||||||
>
|
>
|
||||||
<DatePicker style={{ width: "100%" }}/>
|
<DatePicker style={{ width: "100%" }} />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
name="end_date"
|
name="end_date"
|
||||||
|
|
|
@ -98,8 +98,8 @@ export const PaybackModal = ({ initialData }) => {
|
||||||
return (
|
return (
|
||||||
<Modal
|
<Modal
|
||||||
visible={store.payback.visibleModalPayback}
|
visible={store.payback.visibleModalPayback}
|
||||||
title={"Create a new Created"}
|
title={"Buat Pembayaran Baru"}
|
||||||
okText={"Create"}
|
okText={"Buat"}
|
||||||
cancelText="Batal"
|
cancelText="Batal"
|
||||||
onCancel={handleCancel}
|
onCancel={handleCancel}
|
||||||
onOk={() => {
|
onOk={() => {
|
||||||
|
|
|
@ -183,7 +183,8 @@ export const Product = observer(() => {
|
||||||
<BreadcumbComponent
|
<BreadcumbComponent
|
||||||
data={
|
data={
|
||||||
store.authentication.userData.role === "Admin" ||
|
store.authentication.userData.role === "Admin" ||
|
||||||
store.authentication.userData.role === "Admin Partner"
|
store.authentication.userData.role === "Admin Partner" ||
|
||||||
|
store.authentication.userData.role === "Customer Service"
|
||||||
? routeData
|
? routeData
|
||||||
: dataRoute
|
: dataRoute
|
||||||
}
|
}
|
||||||
|
@ -195,7 +196,7 @@ export const Product = observer(() => {
|
||||||
<Button
|
<Button
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
store.product.visibleModalFilterProduct = true;
|
store.product.visibleModalFilterProduct = true;
|
||||||
store.product.page=0
|
store.product.page = 0;
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<FilterOutlined />
|
<FilterOutlined />
|
||||||
|
@ -249,8 +250,8 @@ export const Product = observer(() => {
|
||||||
|
|
||||||
<Modal
|
<Modal
|
||||||
visible={visibleModalUpload}
|
visible={visibleModalUpload}
|
||||||
title={"Upload Excel Product"}
|
title={"Upload Excel Produk"}
|
||||||
okText={"Create"}
|
okText={"Buat"}
|
||||||
cancelText="Batal"
|
cancelText="Batal"
|
||||||
onCancel={() => {
|
onCancel={() => {
|
||||||
form.resetFields();
|
form.resetFields();
|
||||||
|
|
|
@ -284,8 +284,8 @@ export const Profile = observer(() => {
|
||||||
try {
|
try {
|
||||||
modalLoader.setLoading(true);
|
modalLoader.setLoading(true);
|
||||||
const response = await store.membership.changePassword(id, data);
|
const response = await store.membership.changePassword(id, data);
|
||||||
console.log(id,"id yang masuk")
|
console.log(id, "id yang masuk");
|
||||||
console.log(data,"data yang masuk")
|
console.log(data, "data yang masuk");
|
||||||
message.success(response?.body?.message || "Berhasil Ganti Password");
|
message.success(response?.body?.message || "Berhasil Ganti Password");
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.log(e, "apa errornya");
|
console.log(e, "apa errornya");
|
||||||
|
@ -301,7 +301,8 @@ export const Profile = observer(() => {
|
||||||
<BreadcumbComponent
|
<BreadcumbComponent
|
||||||
data={
|
data={
|
||||||
store.authentication.userData.role === "Admin" ||
|
store.authentication.userData.role === "Admin" ||
|
||||||
store.authentication.userData.role === "Admin Partner"
|
store.authentication.userData.role === "Admin Partner" ||
|
||||||
|
store.authentication.userData.role === "Customer Service"
|
||||||
? routeData
|
? routeData
|
||||||
: dataRoute
|
: dataRoute
|
||||||
}
|
}
|
||||||
|
@ -430,16 +431,11 @@ export const Profile = observer(() => {
|
||||||
{store.authentication.userData.role === "Retail" && (
|
{store.authentication.userData.role === "Retail" && (
|
||||||
<Button
|
<Button
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
// setInitialData({
|
console.log(store.authentication.profileData?.id, "id nya");
|
||||||
// id: store.membership.dataDetail.id,
|
console.log(
|
||||||
// name: store.membership.dataDetail.userDetail.name,
|
store.authentication.profileData?.userDetail.id,
|
||||||
// username: store.membership.dataDetail.username,
|
"id member"
|
||||||
// phone_number:
|
);
|
||||||
// store.membership.dataDetail.userDetail.phone_number,
|
|
||||||
// roleId: store.membership.dataDetail.roles.id,
|
|
||||||
// isChangePassword: true,
|
|
||||||
console.log(store.authentication.profileData?.id,"id nya")
|
|
||||||
console.log(store.authentication.profileData?.userDetail.id,"id member")
|
|
||||||
setVisible(true);
|
setVisible(true);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
@ -455,7 +451,7 @@ export const Profile = observer(() => {
|
||||||
style={{ marginBottom: "1rem", marginLeft: 5 }}
|
style={{ marginBottom: "1rem", marginLeft: 5 }}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
store.transaction.visibleModalFilterTransaction = true;
|
store.transaction.visibleModalFilterTransaction = true;
|
||||||
store.transaction.page=0;
|
store.transaction.page = 0;
|
||||||
setAction(true);
|
setAction(true);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
@ -571,7 +567,7 @@ export const Profile = observer(() => {
|
||||||
style={{ marginBottom: "1rem", marginLeft: 5 }}
|
style={{ marginBottom: "1rem", marginLeft: 5 }}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
store.transaction.visibleModalFilterTransaction = true;
|
store.transaction.visibleModalFilterTransaction = true;
|
||||||
store.transaction.page=0
|
store.transaction.page = 0;
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<FilterOutlined />
|
<FilterOutlined />
|
||||||
|
@ -593,8 +589,7 @@ export const Profile = observer(() => {
|
||||||
}}
|
}}
|
||||||
onChange={async (page) => {
|
onChange={async (page) => {
|
||||||
let pageNumber = page.current;
|
let pageNumber = page.current;
|
||||||
store.transaction.pageSize =
|
store.transaction.pageSize = page.pageSize;
|
||||||
page.pageSize;
|
|
||||||
store.transaction.page = pageNumber - 1;
|
store.transaction.page = pageNumber - 1;
|
||||||
modalLoader.setLoading(true);
|
modalLoader.setLoading(true);
|
||||||
await store.transaction.getDataHistoryTransaction();
|
await store.transaction.getDataHistoryTransaction();
|
||||||
|
@ -612,8 +607,7 @@ export const Profile = observer(() => {
|
||||||
onChange: async (page, pageSize) => {
|
onChange: async (page, pageSize) => {
|
||||||
console.log(page, "Page");
|
console.log(page, "Page");
|
||||||
console.log(pageSize, "Page size");
|
console.log(pageSize, "Page size");
|
||||||
store.transaction.page =
|
store.transaction.page = pageSize;
|
||||||
pageSize;
|
|
||||||
store.transaction.page = page - 1;
|
store.transaction.page = page - 1;
|
||||||
modalLoader.setLoading(true);
|
modalLoader.setLoading(true);
|
||||||
await store.transaction.getDataHistoryTransaction();
|
await store.transaction.getDataHistoryTransaction();
|
||||||
|
@ -780,7 +774,7 @@ export const Profile = observer(() => {
|
||||||
<Form
|
<Form
|
||||||
form={form}
|
form={form}
|
||||||
layout="vertical"
|
layout="vertical"
|
||||||
initialValues={{ id : store.authentication.profileData?.id }}
|
initialValues={{ id: store.authentication.profileData?.id }}
|
||||||
>
|
>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
name="password"
|
name="password"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user