From 6c48dd4a05749a38850295e846616d64be354892 Mon Sep 17 00:00:00 2001 From: baslani Date: Wed, 19 Nov 2025 15:47:46 +0330 Subject: [PATCH] fixed date issue and active status for toll houses --- .../tollHouse/Form/CreateTollHouse/TollHouseInfo.jsx | 4 ++-- src/components/infrastructure/tollHouse/TollHouseList.jsx | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/components/infrastructure/tollHouse/Form/CreateTollHouse/TollHouseInfo.jsx b/src/components/infrastructure/tollHouse/Form/CreateTollHouse/TollHouseInfo.jsx index dc56843..5d53fdf 100644 --- a/src/components/infrastructure/tollHouse/Form/CreateTollHouse/TollHouseInfo.jsx +++ b/src/components/infrastructure/tollHouse/Form/CreateTollHouse/TollHouseInfo.jsx @@ -82,8 +82,8 @@ const TollHouseInfo = ({ control }) => { value={field.value} label="وضعیت" selectors={[ - { id: 0, name: "فعال" }, - { id: 1, name: "غیر فعال" }, + { id: 1, name: "فعال" }, + { id: 0, name: "غیر فعال" }, ]} schema={{ name: "name", value: "id" }} error={error} diff --git a/src/components/infrastructure/tollHouse/TollHouseList.jsx b/src/components/infrastructure/tollHouse/TollHouseList.jsx index 4ef1674..11536b8 100644 --- a/src/components/infrastructure/tollHouse/TollHouseList.jsx +++ b/src/components/infrastructure/tollHouse/TollHouseList.jsx @@ -384,7 +384,8 @@ const TollHouseList = () => { ], }, { - accessorFn: (row) => moment(row.created_at).locale("fa").format("HH:mm | yyyy/MM/DD"), + accessorFn: (row) => + row.created_at ? moment(row.created_at).locale("fa").format("HH:mm | yyyy/MM/DD") : "-", header: "تاریخ ثبت", id: "created_at", enableColumnFilter: true,