mirror of
https://github.com/FranP-code/inbox-negotiator.git
synced 2025-10-13 00:42:26 +00:00
Implement debt variable management with database integration in DebtCard component
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
import { createClient } from '@supabase/supabase-js';
|
||||
import { createClient } from "@supabase/supabase-js";
|
||||
|
||||
const supabaseUrl = import.meta.env.PUBLIC_SUPABASE_URL;
|
||||
const supabaseAnonKey = import.meta.env.PUBLIC_SUPABASE_ANON_KEY;
|
||||
|
||||
if (!supabaseUrl || !supabaseAnonKey) {
|
||||
throw new Error('Missing Supabase environment variables');
|
||||
throw new Error("Missing Supabase environment variables");
|
||||
}
|
||||
|
||||
export const supabase = createClient(supabaseUrl, supabaseAnonKey);
|
||||
@@ -22,7 +22,7 @@ export type Debt = {
|
||||
vendor: string;
|
||||
amount: number;
|
||||
raw_email: string | null;
|
||||
status: 'received' | 'negotiating' | 'settled' | 'failed' | 'opted_out';
|
||||
status: "received" | "negotiating" | "settled" | "failed" | "opted_out";
|
||||
negotiated_plan: string | null;
|
||||
projected_savings: number;
|
||||
user_id: string;
|
||||
@@ -66,4 +66,13 @@ export type EmailProcessingUsage = {
|
||||
emails_processed: number;
|
||||
created_at: string;
|
||||
updated_at: string;
|
||||
};
|
||||
};
|
||||
|
||||
export type DebtVariable = {
|
||||
id: string;
|
||||
debt_id: string;
|
||||
variable_name: string;
|
||||
variable_value: string | null;
|
||||
created_at: string;
|
||||
updated_at: string;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user