add: active state
This commit is contained in:
@@ -10,6 +10,7 @@ import { Tooltip } from "../components/Tooltip/Tooltip";
|
||||
import Button from "../components/Button/Button";
|
||||
import { LiveStockAddLiveStock } from "../partials/live-stock/LiveStockAddLiveStock";
|
||||
import { useDrawerStore } from "../context/zustand-store/appStore";
|
||||
import { CheckCircleIcon, XCircleIcon } from "@heroicons/react/24/outline";
|
||||
|
||||
export default function LiveStocks() {
|
||||
const [pagesInfo, setPagesInfo] = useState({ page: 1, page_size: 10 });
|
||||
@@ -42,6 +43,19 @@ export default function LiveStocks() {
|
||||
item?.gender === 1 ? "نر" : "ماده",
|
||||
// item?.species?.name,
|
||||
item?.weight_type === "L" ? "سبک" : "سنگین",
|
||||
<span className="flex items-center gap-1">
|
||||
{item?.active ? (
|
||||
<>
|
||||
<span className="text-green-500">فعال</span>
|
||||
<CheckCircleIcon className="w-5 h-5 text-green-500" />
|
||||
</>
|
||||
) : (
|
||||
<>
|
||||
<span className="text-red-500">غیرفعال</span>
|
||||
<XCircleIcon className="w-5 h-5 text-red-500" />
|
||||
</>
|
||||
)}
|
||||
</span>,
|
||||
<Popover key={i}>
|
||||
<Tooltip title="ویرایش دام" position="right">
|
||||
<Button
|
||||
@@ -95,6 +109,7 @@ export default function LiveStocks() {
|
||||
"جنسیت",
|
||||
// "گونه",
|
||||
"دسته وزنی",
|
||||
"وضعیت",
|
||||
"عملیات",
|
||||
]}
|
||||
rows={pagesTableData}
|
||||
|
||||
Reference in New Issue
Block a user