| @@ -163,8 +163,9 @@ | ||
| 163 | 163 | ); |
| 164 | 164 | }, |
| 165 | 165 | }); |
| 166 | 166 | |
| 167 | + // eslint-disable-next-line react-hooks/exhaustive-deps | |
| 167 | 168 | const categories = data?.data || []; |
| 168 | 169 | const total = data?.total || 0; |
| 169 | 170 | const totalPages = Math.ceil(total / 50); |
| 170 | 171 | const errorContext = getErrorContext(error); |
| @@ -389,9 +390,9 @@ | ||
| 389 | 390 | } catch (error) { |
| 390 | 391 | return null; |
| 391 | 392 | } |
| 392 | 393 | }, |
| 393 | - enabled: can("manage_yatra"), | |
| 394 | + enabled: can("yatra_access_admin"), | |
| 394 | 395 | staleTime: 5 * 60 * 1000, // Cache for 5 minutes |
| 395 | 396 | }); |
| 396 | 397 | |
| 397 | 398 | // Expand all parent categories that have subcategories by default |
| @@ -490,8 +491,9 @@ | ||
| 490 | 491 | return ( |
| 491 | 492 | <div className="w-8 h-8 rounded bg-gray-100 dark:bg-gray-800 flex items-center justify-center"> |
| 492 | 493 | <IconSelector |
| 493 | 494 | iconName={icon.value} |
| 495 | + provider={icon.provider ?? "yatra"} | |
| 494 | 496 | className="w-5 h-5 text-gray-600 dark:text-gray-400" |
| 495 | 497 | /> |
| 496 | 498 | </div> |
| 497 | 499 | ); |
| @@ -757,8 +759,9 @@ | ||
| 757 | 759 | sortable: true, |
| 758 | 760 | visible: visibleColumns.created_at, |
| 759 | 761 | }, |
| 760 | 762 | ], |
| 763 | + // eslint-disable-next-line react-hooks/exhaustive-deps | |
| 761 | 764 | [visibleColumns], |
| 762 | 765 | ); |
| 763 | 766 | |
| 764 | 767 | // Status mutation for individual actions |