feat(tables): integrate EmptyListWrapper component for improved empty state handling

- Add EmptyListWrapper to various tables (Admins, Companies, Customers, Feedback, Notification History, Tenders) to provide a consistent empty state message when no data is available.
- Update phone number and status display logic in the Profile page to handle null values gracefully.
- Introduce worktree setup configuration in worktrees.json for easier project setup.
This commit is contained in:
AmirReza Jamali
2026-02-10 18:19:49 +03:30
parent 7755384d51
commit da82399d07
13 changed files with 240 additions and 202 deletions
+9 -10
View File
@@ -1,4 +1,5 @@
import { ExclamationIcon } from "@/assets/icons";
import EmptyListWrapper from "@/components/HOC/EmptyListWrapper";
import {
Table,
TableBody,
@@ -48,14 +49,12 @@ const FeedbackTable = ({ id, paramKey }: IProps) => {
{isLoading && <TableSkeleton column={columns.length} />}
<TableBody>
{!feedback?.length ? (
<TableRow className="w-full">
<TableCell colSpan={500} className="text-center">
<h2>No feedback</h2>
</TableCell>
</TableRow>
) : (
feedback?.map((item, index) => (
<EmptyListWrapper
list={feedback ?? []}
columns={columns}
emptyMessage="No feedback were found"
>
{(feedback ?? []).map((item, index) => (
<TableRow
key={item.id}
className="odd:bg-gray-2 dark:odd:bg-gray-7"
@@ -87,8 +86,8 @@ const FeedbackTable = ({ id, paramKey }: IProps) => {
</button>
</TableCell>
</TableRow>
))
)}
))}
</EmptyListWrapper>
</TableBody>
</Table>
</ShowcaseSection>