Merge branch 'develop' of https://gitlab.com/empatnusabangsa/ppob/ppob-frontend into develop
This commit is contained in:
commit
ba01132cd4
|
@ -26,7 +26,7 @@
|
|||
work correctly both with client-side routing and a non-root public URL.
|
||||
Learn how to configure a non-root public URL by running `npm run build`.
|
||||
-->
|
||||
<title>React App</title>
|
||||
<title>PPOB</title>
|
||||
</head>
|
||||
<body>
|
||||
<noscript>You need to enable JavaScript to run this app.</noscript>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"short_name": "React App",
|
||||
"name": "Create React App Sample",
|
||||
"short_name": "PPOB",
|
||||
"name": "PPOB",
|
||||
"icons": [
|
||||
{
|
||||
"src": "favicon.ico",
|
||||
|
|
|
@ -106,8 +106,9 @@ export const Membership = observer(() => {
|
|||
const columns = [
|
||||
{
|
||||
title: "Name",
|
||||
dataIndex: "username",
|
||||
key: "username",
|
||||
dataIndex: "name",
|
||||
key: "name",
|
||||
render: (text, record) => record?.name ?? record?.username,
|
||||
},
|
||||
{
|
||||
title: "Username",
|
||||
|
@ -138,7 +139,7 @@ export const Membership = observer(() => {
|
|||
render: (text, record) => (
|
||||
<Space size="middle">
|
||||
<Button
|
||||
type={record?.status === true ? "danger" : "primary"}
|
||||
type={record?.isActive === true ? "danger" : "primary"}
|
||||
onClick={() => changeStatus(record?.id, record?.isActive)}
|
||||
>
|
||||
{record?.isActive === true ? "Inactive" : "Active"}
|
||||
|
|
|
@ -52,6 +52,15 @@ export const MembershipModal = ({
|
|||
initialValues={initialData}
|
||||
>
|
||||
{((initialData.id && !initialData.isChangePassword) || !initialData.id) && (
|
||||
<Form.Item
|
||||
name="name"
|
||||
label="Name"
|
||||
rules={[{ required: true, message: "Please input Name!" }]}
|
||||
>
|
||||
<Input />
|
||||
</Form.Item>
|
||||
)}
|
||||
{!initialData.id && (
|
||||
<Form.Item
|
||||
name="username"
|
||||
label="Username"
|
||||
|
|
|
@ -5,6 +5,7 @@ import {LINKS} from "../../routes/app";
|
|||
import {useStore} from "../../utils/useStore";
|
||||
import {observer} from "mobx-react-lite";
|
||||
import {FilterOutlined} from "@ant-design/icons";
|
||||
import {format, parseISO} from "date-fns";
|
||||
|
||||
const {Title, Text} = Typography;
|
||||
|
||||
|
@ -47,6 +48,11 @@ export const Profile = observer(() => {
|
|||
title: 'Transaction Date',
|
||||
dataIndex: 'created_at',
|
||||
key: 'created_at',
|
||||
render: (text, record) => {
|
||||
return (
|
||||
<Text>{format(parseISO(record.created_at), 'dd MMMM yyyy HH:mm')}</Text>
|
||||
)
|
||||
},
|
||||
},
|
||||
]
|
||||
|
||||
|
|
|
@ -17,9 +17,13 @@ export class Membership {
|
|||
|
||||
this.data = response.body.data.map((item, idx) => {
|
||||
item.key = idx;
|
||||
item.roleName = item.roles.name;
|
||||
item.name = item?.user_detail?.name;
|
||||
item.roleId = item?.roles.id;
|
||||
item.roleName = item?.roles.name;
|
||||
return item
|
||||
}) ?? []
|
||||
|
||||
console.log(JSON.stringify(this.data), "DATA");
|
||||
|
||||
this.total_data = response.body.total_data ?? 0
|
||||
}
|
||||
|
@ -28,7 +32,9 @@ export class Membership {
|
|||
const response = await http.get(`/users/find-by-supperior?page=${this.page}&pageSize=${this.pageSize}`);
|
||||
this.data = response.body.data.map((item, idx) => {
|
||||
item.key = idx;
|
||||
item.roleName = item.roles.name;
|
||||
item.name = item?.user_detail?.name;
|
||||
item.roleId = item?.roles.id;
|
||||
item.roleName = item?.roles?.name;
|
||||
return item
|
||||
}) ?? []
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user