Merge branch 'develop' into 'devops-production'
Bug Fixing See merge request empatnusabangsa/ppob/ppob-frontend!128
This commit is contained in:
commit
b9d7d2b301
|
@ -40,7 +40,7 @@ export const CategoryComponent = observer((props) => {
|
||||||
key: "code",
|
key: "code",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "Category Name",
|
title: "Kategori",
|
||||||
dataIndex: "name",
|
dataIndex: "name",
|
||||||
key: "name",
|
key: "name",
|
||||||
},
|
},
|
||||||
|
|
|
@ -23,7 +23,7 @@ export const CommissionComponent = observer((props) => {
|
||||||
|
|
||||||
const columns = [
|
const columns = [
|
||||||
{
|
{
|
||||||
title: "Name",
|
title: "Nama",
|
||||||
dataIndex: "name",
|
dataIndex: "name",
|
||||||
key: "name",
|
key: "name",
|
||||||
},
|
},
|
||||||
|
|
|
@ -71,7 +71,7 @@ export const PartnerComponent = observer((props) => {
|
||||||
|
|
||||||
const columns = [
|
const columns = [
|
||||||
{
|
{
|
||||||
title: "Name",
|
title: "Nama",
|
||||||
dataIndex: "name",
|
dataIndex: "name",
|
||||||
key: "name",
|
key: "name",
|
||||||
},
|
},
|
||||||
|
|
|
@ -241,10 +241,10 @@ export const ProductComponent = observer((props) => {
|
||||||
color: "#fff",
|
color: "#fff",
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
Remove Filter
|
Hapus Filter
|
||||||
</Button>,
|
</Button>,
|
||||||
<Button key={"cancel"} onClick={handleCancelFilter}>
|
<Button key={"cancel"} onClick={handleCancelFilter}>
|
||||||
Cancel
|
Batal
|
||||||
</Button>,
|
</Button>,
|
||||||
<Button
|
<Button
|
||||||
key={"submit"}
|
key={"submit"}
|
||||||
|
@ -254,7 +254,7 @@ export const ProductComponent = observer((props) => {
|
||||||
color: "#fff",
|
color: "#fff",
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
Apply
|
Terapkan
|
||||||
</Button>,
|
</Button>,
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
@ -42,17 +42,17 @@ export const SubcategoryComponent = observer((props) => {
|
||||||
|
|
||||||
const columns = [
|
const columns = [
|
||||||
{
|
{
|
||||||
title: "Code",
|
title: "Kode",
|
||||||
dataIndex: "code",
|
dataIndex: "code",
|
||||||
key: "code",
|
key: "code",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "Sub Category Name",
|
title: "Sub Kategori",
|
||||||
dataIndex: "name",
|
dataIndex: "name",
|
||||||
key: "name",
|
key: "name",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "Category",
|
title: "Kategori",
|
||||||
dataIndex: "categoryName",
|
dataIndex: "categoryName",
|
||||||
key: "categoryName",
|
key: "categoryName",
|
||||||
},
|
},
|
||||||
|
|
|
@ -65,7 +65,7 @@ export const SupplierComponent = observer((props) => {
|
||||||
|
|
||||||
const columns = [
|
const columns = [
|
||||||
{
|
{
|
||||||
title: "Name",
|
title: "Nama",
|
||||||
dataIndex: "name",
|
dataIndex: "name",
|
||||||
key: "name",
|
key: "name",
|
||||||
},
|
},
|
||||||
|
|
|
@ -177,7 +177,7 @@ export const DetailUser = observer(() => {
|
||||||
}).format(text),
|
}).format(text),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "Transaction Date",
|
title: "Tanggal Transaksi",
|
||||||
dataIndex: "transaction_date",
|
dataIndex: "transaction_date",
|
||||||
key: "transaction_date",
|
key: "transaction_date",
|
||||||
render: (text, record) => {
|
render: (text, record) => {
|
||||||
|
@ -197,7 +197,7 @@ export const DetailUser = observer(() => {
|
||||||
key: "name",
|
key: "name",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "Price",
|
title: "Harga",
|
||||||
dataIndex: "price",
|
dataIndex: "price",
|
||||||
key: "price",
|
key: "price",
|
||||||
render: (text) =>
|
render: (text) =>
|
||||||
|
@ -383,10 +383,10 @@ export const DetailUser = observer(() => {
|
||||||
color: "#fff",
|
color: "#fff",
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
Remove Filter
|
Hapus Filter
|
||||||
</Button>,
|
</Button>,
|
||||||
<Button key={"cancel"} onClick={handleCancelFilter}>
|
<Button key={"cancel"} onClick={handleCancelFilter}>
|
||||||
Cancel
|
Batal
|
||||||
</Button>,
|
</Button>,
|
||||||
<Button
|
<Button
|
||||||
key={"submit"}
|
key={"submit"}
|
||||||
|
@ -396,7 +396,7 @@ export const DetailUser = observer(() => {
|
||||||
color: "#fff",
|
color: "#fff",
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
Apply
|
Terapkan
|
||||||
</Button>,
|
</Button>,
|
||||||
];
|
];
|
||||||
return (
|
return (
|
||||||
|
@ -536,12 +536,12 @@ export const DetailUser = observer(() => {
|
||||||
<Col span={12}>
|
<Col span={12}>
|
||||||
<Text>{store.authentication.dataProfit.username}</Text>
|
<Text>{store.authentication.dataProfit.username}</Text>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={12}>
|
{/* <Col span={12}>
|
||||||
<Text strong>Role</Text>
|
<Text strong>Role</Text>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={12}>
|
<Col span={12}>
|
||||||
<Text>{store.authentication.dataProfit.roles?.name}</Text>
|
<Text>{store.authentication.dataProfit.roles?.name}</Text>
|
||||||
</Col>
|
</Col> */}
|
||||||
<Col span={12}>
|
<Col span={12}>
|
||||||
<Text strong>Phone Number</Text>
|
<Text strong>Phone Number</Text>
|
||||||
</Col>
|
</Col>
|
||||||
|
@ -585,7 +585,7 @@ export const DetailUser = observer(() => {
|
||||||
? `${appConfig.apiUrl}/config/image/${store.authentication.dataProfit.userDetail?.image_identity}`
|
? `${appConfig.apiUrl}/config/image/${store.authentication.dataProfit.userDetail?.image_identity}`
|
||||||
: "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" }}
|
style={{ width: "8vw" }}
|
||||||
/>
|
/>
|
||||||
</Text>
|
</Text>
|
||||||
</Col>
|
</Col>
|
||||||
|
@ -605,7 +605,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: "8vw", marginRight: 10 }}
|
||||||
/>
|
/>
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
@ -734,7 +734,7 @@ export const DetailUser = observer(() => {
|
||||||
<Row>
|
<Row>
|
||||||
<Col span={24}>
|
<Col span={24}>
|
||||||
<Tabs defaultActiveKey="1">
|
<Tabs defaultActiveKey="1">
|
||||||
<TabPane tab="History Top Up" key="1">
|
<TabPane tab="Riwayat Top Up" key="1">
|
||||||
{store.ui.mediaQuery.isDesktop && (
|
{store.ui.mediaQuery.isDesktop && (
|
||||||
<div>
|
<div>
|
||||||
<Button
|
<Button
|
||||||
|
@ -851,7 +851,7 @@ export const DetailUser = observer(() => {
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</TabPane>
|
</TabPane>
|
||||||
<TabPane tab="History Transaction" key="2">
|
<TabPane tab="Riwayat Transaksi" key="2">
|
||||||
{store.ui.mediaQuery.isDesktop && (
|
{store.ui.mediaQuery.isDesktop && (
|
||||||
<div>
|
<div>
|
||||||
<Button
|
<Button
|
||||||
|
|
|
@ -72,7 +72,7 @@ export const Konfirmasi = observer(() => {
|
||||||
|
|
||||||
const columns = [
|
const columns = [
|
||||||
{
|
{
|
||||||
title: "Name",
|
title: "Nama",
|
||||||
dataIndex: "username",
|
dataIndex: "username",
|
||||||
key: "username",
|
key: "username",
|
||||||
},
|
},
|
||||||
|
@ -98,8 +98,8 @@ export const Konfirmasi = observer(() => {
|
||||||
title: "Foto Toko",
|
title: "Foto Toko",
|
||||||
render: (text, record) =>
|
render: (text, record) =>
|
||||||
record.roles?.name !== "Sales" &&
|
record.roles?.name !== "Sales" &&
|
||||||
record.user_detail?.image_store !== "[]" &&
|
(record.user_detail?.image_store !== "[]" ||
|
||||||
record.user_detail?.image_store !== '""' ? (
|
record.user_detail?.image_store !== '""') ? (
|
||||||
<Button
|
<Button
|
||||||
onClick={async () => {
|
onClick={async () => {
|
||||||
setToko(record);
|
setToko(record);
|
||||||
|
|
|
@ -71,7 +71,8 @@ export const Membership = observer(() => {
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
const getData = async () => {
|
const getData = async () => {
|
||||||
store.authentication.userData.role === "Admin"
|
store.authentication.userData.role === "Admin" ||
|
||||||
|
store.authentication.userData.role === "Customer Service"
|
||||||
? await store.membership.getData()
|
? await store.membership.getData()
|
||||||
: await store.membership.getDataBySuperior();
|
: await store.membership.getDataBySuperior();
|
||||||
};
|
};
|
||||||
|
@ -111,10 +112,10 @@ export const Membership = observer(() => {
|
||||||
color: "#fff",
|
color: "#fff",
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
Remove Filter
|
Hapus Filter
|
||||||
</Button>,
|
</Button>,
|
||||||
<Button key={"cancel"} onClick={handleCancelFilter}>
|
<Button key={"cancel"} onClick={handleCancelFilter}>
|
||||||
Cancel
|
Batal
|
||||||
</Button>,
|
</Button>,
|
||||||
<Button
|
<Button
|
||||||
key={"submit"}
|
key={"submit"}
|
||||||
|
@ -124,7 +125,7 @@ export const Membership = observer(() => {
|
||||||
color: "#fff",
|
color: "#fff",
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
Apply
|
Terapkan
|
||||||
</Button>,
|
</Button>,
|
||||||
];
|
];
|
||||||
const handleCancelTransaction = () => {
|
const handleCancelTransaction = () => {
|
||||||
|
@ -225,6 +226,7 @@ export const Membership = observer(() => {
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
if (store.authentication.userData.role === "Customer Service") columns.pop();
|
||||||
const routeData = [
|
const routeData = [
|
||||||
{
|
{
|
||||||
route: LINKS.HOME,
|
route: LINKS.HOME,
|
||||||
|
@ -362,16 +364,18 @@ export const Membership = observer(() => {
|
||||||
key="1"
|
key="1"
|
||||||
hasEmpty
|
hasEmpty
|
||||||
columns={columns}
|
columns={columns}
|
||||||
style={{ cursor: "pointer" }}
|
//style={{ cursor: "pointer" }}
|
||||||
dataSource={
|
dataSource={
|
||||||
store.authentication.userData.role === "Admin"
|
store.authentication.userData.role === "Admin" ||
|
||||||
|
store.authentication.userData.role === "Customer Service"
|
||||||
? store.membership.dataMember
|
? store.membership.dataMember
|
||||||
: store.membership.data
|
: store.membership.data
|
||||||
}
|
}
|
||||||
pagination={{
|
pagination={{
|
||||||
pageSize: store.membership.pageSize,
|
pageSize: store.membership.pageSize,
|
||||||
total:
|
total:
|
||||||
store.authentication.userData.role === "Admin"
|
store.authentication.userData.role === "Admin" ||
|
||||||
|
store.authentication.userData.role === "Customer Service"
|
||||||
? store.membership.dataTotal
|
? store.membership.dataTotal
|
||||||
: store.membership.total_data,
|
: store.membership.total_data,
|
||||||
current: store.membership.page + 1,
|
current: store.membership.page + 1,
|
||||||
|
@ -404,14 +408,16 @@ export const Membership = observer(() => {
|
||||||
},
|
},
|
||||||
pageSize: store.membership.pageSize,
|
pageSize: store.membership.pageSize,
|
||||||
total:
|
total:
|
||||||
store.authentication.userData.role === "Admin"
|
store.authentication.userData.role === "Admin" ||
|
||||||
|
store.authentication.userData.role === "Customer Service"
|
||||||
? store.membership.dataTotal
|
? store.membership.dataTotal
|
||||||
: store.membership.total_data,
|
: store.membership.total_data,
|
||||||
current: store.membership.page + 1,
|
current: store.membership.page + 1,
|
||||||
style: { marginBottom: "1rem", marginRight: "1rem" },
|
style: { marginBottom: "1rem", marginRight: "1rem" },
|
||||||
}}
|
}}
|
||||||
dataSource={
|
dataSource={
|
||||||
store.authentication.userData.role === "Admin"
|
store.authentication.userData.role === "Admin" ||
|
||||||
|
store.authentication.userData.role === "Customer Service"
|
||||||
? store.membership.dataMember
|
? store.membership.dataMember
|
||||||
: store.membership.data
|
: store.membership.data
|
||||||
}
|
}
|
||||||
|
|
|
@ -67,7 +67,7 @@ export const Payback = observer(() => {
|
||||||
|
|
||||||
const columns = [
|
const columns = [
|
||||||
{
|
{
|
||||||
title: "Name",
|
title: "Nama",
|
||||||
dataIndex: "userData_name",
|
dataIndex: "userData_name",
|
||||||
key: "userData_name",
|
key: "userData_name",
|
||||||
},
|
},
|
||||||
|
@ -254,10 +254,10 @@ export const Payback = observer(() => {
|
||||||
color: "#fff",
|
color: "#fff",
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
Remove Filter
|
Hapus Filter
|
||||||
</Button>,
|
</Button>,
|
||||||
<Button key={"cancel"} onClick={handleCancelFilter}>
|
<Button key={"cancel"} onClick={handleCancelFilter}>
|
||||||
Cancel
|
Batal
|
||||||
</Button>,
|
</Button>,
|
||||||
<Button
|
<Button
|
||||||
key={"submit"}
|
key={"submit"}
|
||||||
|
@ -267,7 +267,7 @@ export const Payback = observer(() => {
|
||||||
color: "#fff",
|
color: "#fff",
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
Apply
|
Terapkan
|
||||||
</Button>,
|
</Button>,
|
||||||
];
|
];
|
||||||
return (
|
return (
|
||||||
|
|
|
@ -84,7 +84,7 @@ export const Profile = observer(() => {
|
||||||
)
|
)
|
||||||
: await store.transaction.getDataHistoryTransaction();
|
: await store.transaction.getDataHistoryTransaction();
|
||||||
store.transaction.visibleModalFilterTransaction = false;
|
store.transaction.visibleModalFilterTransaction = false;
|
||||||
setAction(false)
|
setAction(false);
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleCancelFilter = async () => {
|
const handleCancelFilter = async () => {
|
||||||
|
@ -97,18 +97,18 @@ export const Profile = observer(() => {
|
||||||
store.authentication.profileData?.id
|
store.authentication.profileData?.id
|
||||||
)
|
)
|
||||||
: await store.transaction.getDataHistoryTransaction();
|
: await store.transaction.getDataHistoryTransaction();
|
||||||
setAction(false)
|
setAction(false);
|
||||||
//await store.transaction.getDataHistoryTransaction();
|
//await store.transaction.getDataHistoryTransaction();
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleSubmitFilter = async () => {
|
const handleSubmitFilter = async () => {
|
||||||
const data = form.getFieldsValue();
|
const data = form.getFieldsValue();
|
||||||
const awal = (store.transaction.filterStart = moment(
|
store.transaction.filterStart = moment(data.start_date).format(
|
||||||
data.start_date
|
|
||||||
).format("YYYY-MM-DD HH:mm:ss"));
|
|
||||||
const akhir = (store.transaction.filterEnd = moment(data.end_date).format(
|
|
||||||
"YYYY-MM-DD HH:mm:ss"
|
"YYYY-MM-DD HH:mm:ss"
|
||||||
));
|
);
|
||||||
|
store.transaction.filterEnd = moment(data.end_date).format(
|
||||||
|
"YYYY-MM-DD HH:mm:ss"
|
||||||
|
);
|
||||||
modalLoader.setLoading(true);
|
modalLoader.setLoading(true);
|
||||||
actionFilter === true
|
actionFilter === true
|
||||||
? await store.transaction.getDataHistoryTopUpProfile(
|
? await store.transaction.getDataHistoryTopUpProfile(
|
||||||
|
@ -120,7 +120,7 @@ export const Profile = observer(() => {
|
||||||
store.transaction.filterEnd = null;
|
store.transaction.filterEnd = null;
|
||||||
//form.resetFields();
|
//form.resetFields();
|
||||||
store.transaction.visibleModalFilterTransaction = false;
|
store.transaction.visibleModalFilterTransaction = false;
|
||||||
setAction(false)
|
setAction(false);
|
||||||
};
|
};
|
||||||
|
|
||||||
const footerLayoutFilter = [
|
const footerLayoutFilter = [
|
||||||
|
@ -132,10 +132,10 @@ export const Profile = observer(() => {
|
||||||
color: "#fff",
|
color: "#fff",
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
Remove Filter
|
Hapus Filter
|
||||||
</Button>,
|
</Button>,
|
||||||
<Button key={"cancel"} onClick={handleCancelFilter}>
|
<Button key={"cancel"} onClick={handleCancelFilter}>
|
||||||
Cancel
|
Batal
|
||||||
</Button>,
|
</Button>,
|
||||||
<Button
|
<Button
|
||||||
key={"submit"}
|
key={"submit"}
|
||||||
|
@ -145,17 +145,17 @@ export const Profile = observer(() => {
|
||||||
color: "#fff",
|
color: "#fff",
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
Apply
|
Terapkan
|
||||||
</Button>,
|
</Button>,
|
||||||
];
|
];
|
||||||
const columns = [
|
const columns = [
|
||||||
{
|
{
|
||||||
title: "Name Produk",
|
title: "Nama Produk",
|
||||||
dataIndex: "name",
|
dataIndex: "name",
|
||||||
key: "name",
|
key: "name",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "Price",
|
title: "Harga",
|
||||||
dataIndex: "price",
|
dataIndex: "price",
|
||||||
key: "price",
|
key: "price",
|
||||||
render: (text) =>
|
render: (text) =>
|
||||||
|
@ -251,7 +251,7 @@ export const Profile = observer(() => {
|
||||||
}).format(text),
|
}).format(text),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "Transaction Date",
|
title: "Tanggal Transaksi",
|
||||||
dataIndex: "transaction_date",
|
dataIndex: "transaction_date",
|
||||||
key: "transaction_date",
|
key: "transaction_date",
|
||||||
render: (text, record) => {
|
render: (text, record) => {
|
||||||
|
@ -314,12 +314,12 @@ export const Profile = observer(() => {
|
||||||
<Col span={12}>
|
<Col span={12}>
|
||||||
<Text>{store.authentication.profileData?.username}</Text>
|
<Text>{store.authentication.profileData?.username}</Text>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={12}>
|
{/* <Col span={12}>
|
||||||
<Text strong>Role</Text>
|
<Text strong>Role</Text>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={12}>
|
<Col span={12}>
|
||||||
<Text>{store.authentication.profileData.roles?.name}</Text>
|
<Text>{store.authentication.profileData.roles?.name}</Text>
|
||||||
</Col>
|
</Col> */}
|
||||||
<Col span={12}>
|
<Col span={12}>
|
||||||
<Text strong>Upline</Text>
|
<Text strong>Upline</Text>
|
||||||
</Col>
|
</Col>
|
||||||
|
@ -411,7 +411,7 @@ export const Profile = observer(() => {
|
||||||
<Row>
|
<Row>
|
||||||
<Col span={24}>
|
<Col span={24}>
|
||||||
<Tabs defaultActiveKey="1">
|
<Tabs defaultActiveKey="1">
|
||||||
<TabPane tab="History Top Up" key="1">
|
<TabPane tab="Riwayat Top Up" key="1">
|
||||||
<Button
|
<Button
|
||||||
style={{ marginBottom: "1rem", marginLeft: 5 }}
|
style={{ marginBottom: "1rem", marginLeft: 5 }}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
|
@ -526,7 +526,7 @@ export const Profile = observer(() => {
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</TabPane>
|
</TabPane>
|
||||||
<TabPane tab="History Transaction" key="2">
|
<TabPane tab="Riwayat Transaksi" key="2">
|
||||||
<Button
|
<Button
|
||||||
style={{ marginBottom: "1rem", marginLeft: 5 }}
|
style={{ marginBottom: "1rem", marginLeft: 5 }}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user