diff --git a/src/pages/Membership/DetailUser.js b/src/pages/Membership/DetailUser.js index c0afcee..1301340 100644 --- a/src/pages/Membership/DetailUser.js +++ b/src/pages/Membership/DetailUser.js @@ -1,5 +1,5 @@ import React, {useContext, useEffect, useState} from "react"; -import {Button, Card, Col, message, Row, Space, Table, Tag, Typography,} from "antd"; +import {Button, Card, Col, message, Row, Space, Table, Typography,} from "antd"; import {BreadcumbComponent} from "../../component/BreadcumbComponent"; import {LINKS} from "../../routes/app"; import {useStore} from "../../utils/useStore"; @@ -104,6 +104,11 @@ export const DetailUser = observer(() => { title: "Amount", dataIndex: "amount", key: "amount", + render: (text) => + new Intl.NumberFormat("id-ID", { + style: "currency", + currency: "IDR", + }).format(text), }, { title: "Transaction Date", @@ -112,24 +117,11 @@ export const DetailUser = observer(() => { render: (text, record) => { return ( - {format(parseISO(record.transaction_date), "dd MMMM yyyy ")} + {format(parseISO(record.transaction_date), "dd MMMM yyyy")} ); }, }, - { - title: "Status", - dataIndex: "isActive", - key: "isActive", - render: (text, record) => ( - - {store.membership.dataDetail.isActive === true ? " ACTIVE" : "INACTIVE"} - - ), - }, ]; const routeData = [ @@ -142,8 +134,8 @@ export const DetailUser = observer(() => { name: Keanggotaan, }, { - route: LINKS.USER_DETAIL, - name: Detail Anggota, + route: LINKS.USER_DETAIL.replace(":id", id), + name: Detail User, }, ]; @@ -194,56 +186,50 @@ export const DetailUser = observer(() => { - Action User Detail - Action User Detail} + {store.authentication.userData.role === "Admin" && - {store.authentication.userData.role === "Admin" && - - } - {store.authentication.userData.role === "Admin" && - - } - {store.authentication.userData.role === "Admin" && - - } - + + + + } diff --git a/src/pages/Product/ProductDetail.js b/src/pages/Product/ProductDetail.js index a62d047..e30aa91 100644 --- a/src/pages/Product/ProductDetail.js +++ b/src/pages/Product/ProductDetail.js @@ -25,8 +25,8 @@ export const ProductDetail = observer(() => { name: Produk, }, { - route: LINKS.PRODUCT_DETAIL, - name: Detail Produk, + route: LINKS.PRODUCT_DETAIL.replace(':id', `${id}`), + name: Detail Produk, }, ];