Enable all users to view supplier information across modules

Update query logic in delivery and order creation/editing modals, and the suppliers page, to allow all users to access supplier data, removing role-based restrictions.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: b163d4c0-de5e-4f4e-a9c0-aed4c7049718
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/b163d4c0-de5e-4f4e-a9c0-aed4c7049718/kdCs97W
This commit is contained in:
michaelschal committed 2025-08-12 08:25:45 +00:00
1 parent d4878e6c8f
commit 09a7bebc73
5 files changed
+8 -13

No files matched your search

-3
View File
@@ -42,17 +42,14 @@ export default function Suppliers() {
const { data: suppliers = [], isLoading } = useQuery<Supplier[]>({
queryKey: ['/api/suppliers'],
enabled: user?.role === 'admin' || user?.role === 'manager',
});
const { data: orders = [] } = useQuery({
queryKey: ['/api/orders'],
enabled: user?.role === 'admin' || user?.role === 'manager',
});
const { data: deliveries = [] } = useQuery({
queryKey: ['/api/deliveries'],
enabled: user?.role === 'admin' || user?.role === 'manager',
});
const createMutation = useMutation({