basic style list bank

This commit is contained in:
Ehsan
2024-10-10 02:57:22 +03:30
parent 66d3395f59
commit 5e98297cd8
4 changed files with 183 additions and 8 deletions
+38
View File
@@ -0,0 +1,38 @@
function EditB() {
return (
<svg
xmlns="http://www.w3.org/2000/svg"
width="20"
height="20"
viewBox="0 0 20 20"
fill="none"
>
<path
d="M11.05 3.00002L4.20832 10.2417C3.94999 10.5167 3.69999 11.0584 3.64999 11.4334L3.34165 14.1334C3.23332 15.1084 3.93332 15.775 4.89999 15.6084L7.58332 15.15C7.95832 15.0834 8.48332 14.8084 8.74165 14.525L15.5833 7.28335C16.7667 6.03335 17.3 4.60835 15.4583 2.86668C13.625 1.14168 12.2333 1.75002 11.05 3.00002Z"
stroke="#5559CE"
stroke-width="1.5"
stroke-miterlimit="10"
stroke-linecap="round"
stroke-linejoin="round"
/>
<path
d="M9.90833 4.20801C10.2667 6.50801 12.1333 8.26634 14.45 8.49967"
stroke="#5559CE"
stroke-width="1.5"
stroke-miterlimit="10"
stroke-linecap="round"
stroke-linejoin="round"
/>
<path
d="M2.5 18.333H17.5"
stroke="#5559CE"
stroke-width="1.5"
stroke-miterlimit="10"
stroke-linecap="round"
stroke-linejoin="round"
/>
</svg>
);
}
export default EditB;
+49
View File
@@ -0,0 +1,49 @@
function TrashB() {
return (
<svg
xmlns="http://www.w3.org/2000/svg"
width="20"
height="20"
viewBox="0 0 20 20"
fill="none"
>
<path
d="M17.5 4.98307C14.725 4.70807 11.9333 4.56641 9.15 4.56641C7.5 4.56641 5.85 4.64974 4.2 4.81641L2.5 4.98307"
stroke="#FF5450"
stroke-width="1.5"
stroke-linecap="round"
stroke-linejoin="round"
/>
<path
d="M7.08334 4.14199L7.26668 3.05033C7.40001 2.25866 7.50001 1.66699 8.90834 1.66699H11.0917C12.5 1.66699 12.6083 2.29199 12.7333 3.05866L12.9167 4.14199"
stroke="#FF5450"
stroke-width="1.5"
stroke-linecap="round"
stroke-linejoin="round"
/>
<path
d="M15.7083 7.61621L15.1667 16.0079C15.075 17.3162 15 18.3329 12.675 18.3329H7.32499C4.99999 18.3329 4.92499 17.3162 4.83332 16.0079L4.29166 7.61621"
stroke="#FF5450"
stroke-width="1.5"
stroke-linecap="round"
stroke-linejoin="round"
/>
<path
d="M8.60834 13.75H11.3833"
stroke="#FF5450"
stroke-width="1.5"
stroke-linecap="round"
stroke-linejoin="round"
/>
<path
d="M7.91666 10.417H12.0833"
stroke="#FF5450"
stroke-width="1.5"
stroke-linecap="round"
stroke-linejoin="round"
/>
</svg>
);
}
export default TrashB;
+95 -5
View File
@@ -1,9 +1,99 @@
import React from 'react'
import CustomTable from "@/app/component/CustomTable";
import { Button, Switch, TableCell, TableRow } from "@mui/material";
import Image from "next/image";
import TextLoading from "@/app/component/loading/Text";
import CustomLoading from "@/app/component/loading/Custom";
import CircularLoading from "@/app/component/loading/Circular";
import TrashB from "@/components/icons/TrashB";
import EditB from "@/components/icons/EditB";
function List({ data, loading }) {
const tableHead = [
"ردیف",
"شناسه",
"نام پزشک",
"تاریخ",
"ساعت",
"مبلغ (تومان)",
"وضعیت",
];
const centerTable = [0, 4, 5];
function List() {
return (
<div>List</div>
)
<div className="!mt-[32px]">
<div className="hidden md:block w-full">
<CustomTable tableHead={tableHead} centerTable={centerTable}>
{data.map((row, idx) => (
<TableRow
key={idx}
className="!border-0 !border-b !border-[#DBDBDB]"
>
<TableCell className="!pr-[18px] !text-nowrap" align="center">
<TextLoading width={15} height={18} loading={loading}>
{idx + 1}
</TextLoading>
</TableCell>
<TableCell
className="!text-start !pr-[18px] !text-nowrap"
align="right"
>
<TextLoading width={30} height={18} loading={loading}>
{row.card_number}
</TextLoading>
</TableCell>
<TableCell
className="!text-start !pr-[18px] !text-nowrap"
align="right"
>
<TextLoading width={30} height={18} loading={loading}>
{row.shaba_number}
</TextLoading>
</TableCell>
<TableCell
className="!text-start !pr-[18px] !text-nowrap"
align="right"
>
<TextLoading width={30} height={18} loading={loading}>
{row.bank}
</TextLoading>
</TableCell>
<TableCell
className="!text-start !pr-[18px] !text-nowrap"
align="right"
>
<TextLoading width={30} height={18} loading={loading}>
{row.status ? "فعال" : "غیر فعال"}
</TextLoading>
</TableCell>
<TableCell
className="!text-start !pr-[18px] !text-nowrap"
align="right"
>
<TextLoading width={50} height={18} loading={loading}>
<Switch />
</TextLoading>
</TableCell>
<TableCell
className="!text-center !pr-[18px] !text-nowrap"
align="right"
>
<TextLoading width={50} height={18} loading={loading}>
<div className="flex items-center justify-center gap-[4px]">
<Button className="!min-w-fit !p-1" variant="text">
<TrashB />
</Button>
<Button className="!min-w-fit !p-1" variant="text">
<EditB />
</Button>
</div>
</TextLoading>
</TableCell>
</TableRow>
))}
</CustomTable>
</div>
</div>
);
}
export default List
export default List;
+1 -3
View File
@@ -2,12 +2,10 @@ import Head from "./head";
import List from "./List";
function Bank({ data }) {
console.log(data);
return (
<div>
<Head />
<List />
<List data={data} loading={false} />
</div>
);
}