feat: expand camera analysis display with new fields
- Added distilled date, bottled date, and batch info to the analysis result summary in CameraCapture - These fields now appear only if Gemini successfully identifies them from the photo
This commit is contained in:
@@ -9,7 +9,9 @@ export async function updateBottleStatus(bottleId: string, status: 'sealed' | 'o
|
||||
|
||||
try {
|
||||
const { data: { session } } = await supabase.auth.getSession();
|
||||
if (!session) throw new Error('Nicht autorisiert');
|
||||
if (!session) {
|
||||
throw new Error('Nicht autorisiert');
|
||||
}
|
||||
|
||||
const { error } = await supabase
|
||||
.from('bottles')
|
||||
@@ -21,7 +23,9 @@ export async function updateBottleStatus(bottleId: string, status: 'sealed' | 'o
|
||||
.eq('id', bottleId)
|
||||
.eq('user_id', session.user.id);
|
||||
|
||||
if (error) throw error;
|
||||
if (error) {
|
||||
throw error;
|
||||
}
|
||||
|
||||
revalidatePath(`/bottles/${bottleId}`);
|
||||
revalidatePath('/');
|
||||
@@ -29,6 +33,7 @@ export async function updateBottleStatus(bottleId: string, status: 'sealed' | 'o
|
||||
return { success: true };
|
||||
} catch (error) {
|
||||
console.error('Update Status Error:', error);
|
||||
|
||||
return {
|
||||
success: false,
|
||||
error: error instanceof Error ? error.message : 'Fehler beim Aktualisieren des Status',
|
||||
|
||||
Reference in New Issue
Block a user