Add support for company logos, including schema adjustments, validation, assets handling, and UI display enhancements.

This commit is contained in:
JonCSykes
2026-03-06 16:39:35 -05:00
parent b155415d7d
commit b19d0b6f3b
17 changed files with 6211 additions and 26 deletions

View File

@@ -29,6 +29,7 @@ interface CompanyContextValue {
name: string;
description?: string | null;
budgetMonthlyCents?: number;
logoUrl?: string | null;
}) => Promise<Company>;
}
@@ -86,7 +87,12 @@ export function CompanyProvider({ children }: { children: ReactNode }) {
}, [queryClient]);
const createMutation = useMutation({
mutationFn: (data: { name: string; description?: string | null; budgetMonthlyCents?: number }) =>
mutationFn: (data: {
name: string;
description?: string | null;
budgetMonthlyCents?: number;
logoUrl?: string | null;
}) =>
companiesApi.create(data),
onSuccess: (company) => {
queryClient.invalidateQueries({ queryKey: queryKeys.companies.all });
@@ -95,7 +101,12 @@ export function CompanyProvider({ children }: { children: ReactNode }) {
});
const createCompany = useCallback(
async (data: { name: string; description?: string | null; budgetMonthlyCents?: number }) => {
async (data: {
name: string;
description?: string | null;
budgetMonthlyCents?: number;
logoUrl?: string | null;
}) => {
return createMutation.mutateAsync(data);
},
[createMutation],