Perbaikan Project PPOB
This commit is contained in:
@@ -30,7 +30,6 @@ import { LINKS } from "../../routes/app";
|
||||
import { useHistory } from "react-router-dom";
|
||||
import { ModalLoaderContext } from "../../utils/modal";
|
||||
|
||||
|
||||
export const Membership = observer(() => {
|
||||
const history = useHistory();
|
||||
const { Option } = Select;
|
||||
@@ -253,12 +252,19 @@ export const Membership = observer(() => {
|
||||
name: <span style={{ fontWeight: "bold" }}>Keanggotaan</span>,
|
||||
},
|
||||
];
|
||||
|
||||
const dataRoute = [
|
||||
{
|
||||
route: LINKS.MEMBERSHIP,
|
||||
name: "Keanggotaan"
|
||||
},
|
||||
];
|
||||
const onSubmit = async (data, image, imageStore) => {
|
||||
data.superior = true;
|
||||
console.log(imageStore, "Apa imageStore")
|
||||
console.log(imageStore, "Apa imageStore");
|
||||
|
||||
if(!imageStore){
|
||||
imageStore = []
|
||||
if (!imageStore) {
|
||||
imageStore = [];
|
||||
}
|
||||
|
||||
if (initialData.id) {
|
||||
@@ -325,7 +331,11 @@ export const Membership = observer(() => {
|
||||
};
|
||||
return (
|
||||
<div className={["ppob-container"].join(" ")}>
|
||||
<BreadcumbComponent data={routeData} />
|
||||
<BreadcumbComponent
|
||||
data={
|
||||
store.authentication.userData.role === "Admin" ? routeData : dataRoute
|
||||
}
|
||||
/>
|
||||
<Card>
|
||||
<div>
|
||||
<Row style={{ marginBottom: 20 }}>
|
||||
@@ -399,7 +409,7 @@ export const Membership = observer(() => {
|
||||
pagination={{
|
||||
onChange: async (page, pageSize) => {
|
||||
store.membership.pageSize = pageSize;
|
||||
store.membership.page = page -1;
|
||||
store.membership.page = page - 1;
|
||||
modalLoader.setLoading(true);
|
||||
await getData();
|
||||
modalLoader.setLoading(false);
|
||||
@@ -442,7 +452,7 @@ export const Membership = observer(() => {
|
||||
<small>Role : {item.roles?.name}</small> <br />
|
||||
<small>Saldo : {item.coa?.amount}</small> <br />
|
||||
<Button
|
||||
style={{ marginRight: 10,marginTop:7 }}
|
||||
style={{ marginRight: 10, marginTop: 7 }}
|
||||
onClick={() => {
|
||||
setDestination(item?.id);
|
||||
console.log(item?.id);
|
||||
|
||||
Reference in New Issue
Block a user