diff --git a/frontend/src/routes/dashboard/customs_brokers/+page.svelte b/frontend/src/routes/dashboard/customs_brokers/+page.svelte index b926ce5f..a6f35421 100644 --- a/frontend/src/routes/dashboard/customs_brokers/+page.svelte +++ b/frontend/src/routes/dashboard/customs_brokers/+page.svelte @@ -5,7 +5,7 @@ import { Button } from '$lib/components/ui/button'; import { Input } from '$lib/components/ui/input'; import { Label } from '$lib/components/ui/label'; - import { Plus, RefreshCw, Building2, MapPin, Mail, Phone, FileText, Hash } from 'lucide-svelte'; + import { Plus, RefreshCw, Building2, MapPin, Mail, Phone, FileText, Hash, LoaderCircle } from 'lucide-svelte'; import * as Tabs from '$lib/components/ui/tabs'; import { toast } from 'svelte-sonner'; import { companyStore } from '$lib/stores/company.svelte'; @@ -14,7 +14,7 @@ import { page } from '$app/stores'; import { useShortcuts } from '$lib/hooks/use-shortcuts'; import { obtenerAtajosListaAgentes } from '$lib/config/shortcuts/dashboard/customs_brokers/list'; - import { currentUser } from '$lib/auth'; + import { currentUser, permissionsHydrated } from '$lib/auth'; import { canViewCustomsBrokers, canCreateCustomsBrokers, @@ -236,7 +236,14 @@ const brokerColumns = createBrokerColumns(handleActionSuccess); -{#if !canViewBrokerList} +{#if !$permissionsHydrated} +
+{:else if !canViewBrokerList}