diff --git a/apps/backoffice/src/app/accounts/page.tsx b/apps/backoffice/src/app/accounts/page.tsx index 8cfb2ba..ce9aa4e 100644 --- a/apps/backoffice/src/app/accounts/page.tsx +++ b/apps/backoffice/src/app/accounts/page.tsx @@ -46,7 +46,7 @@ export const Components: FC = (): ReactElement => { return (
- {/* Dashboard Header */} + {/* Header */}

Data Akun

diff --git a/apps/backoffice/src/app/transactions/page.tsx b/apps/backoffice/src/app/transactions/page.tsx index cd1c262..c6a0ac4 100644 --- a/apps/backoffice/src/app/transactions/page.tsx +++ b/apps/backoffice/src/app/transactions/page.tsx @@ -1,17 +1,92 @@ -import { ArrowDownOutlined, PlusOutlined } from '@ant-design/icons'; -import { Button } from '@imphnen-frontend-service/ui/atoms'; -import { FC, ReactElement } from 'react'; +import { FC, ReactElement, useState } from 'react'; +import { FilterOutlined, SearchOutlined } from '@ant-design/icons'; +import { Button, Input } from '@imphnen-frontend-service/ui/atoms'; +import { Pagination } from '@imphnen-frontend-service/ui/molecules'; +import { DataTable } from '@imphnen-frontend-service/ui/organisms'; + +// Mock data for demonstration +const mockData = Array.from({ length: 20 }, (_, i) => ({ + id: i + 1, + name: i === 0 ? 'Ahmad Wijuana' : 'Nama Lengkap', + email: 'Fullname23@gmail.com', + phone: '081904423804', + address: 'Jl. Pantai Cibaduyut Indonesia', +})); export const Components: FC = (): ReactElement => { + const [searchQuery, setSearchQuery] = useState(''); + const [currentPage, setCurrentPage] = useState(1); + const itemsPerPage = 9; + + // Filter data based on search query + const filteredData = mockData.filter( + (item) => + item.name.toLowerCase().includes(searchQuery.toLowerCase()) || + item.email.toLowerCase().includes(searchQuery.toLowerCase()) + ); + + // Paginate data + const indexOfLastItem = currentPage * itemsPerPage; + const indexOfFirstItem = indexOfLastItem - itemsPerPage; + const currentItems = filteredData.slice(indexOfFirstItem, indexOfLastItem); + + const handleEdit = (id: number) => { + console.log(`Edit item with id: ${id}`); + // Implement edit functionality + }; + + const handlePageChange = (pageNumber: number) => { + setCurrentPage(pageNumber); + }; + + const handleSearch = (e: React.ChangeEvent) => { + setSearchQuery(e.target.value); + setCurrentPage(1); // Reset to first page when searching + }; + return (
- {/* Dashboard Header */} + {/* Header */}

Validasi Transaksi

- {/* Accounts Table Section */} -
+ {/* Account Table Section */} +
+ {/* Search and Filter */} +
+
+ +
+ +
+
+ + +
+ + {/* Table */} + + + {/* Pagination */} + +
); };