sistemato deeplinking alla serviceformscreen, aggiunto logout e sistemate altre cose

This commit is contained in:
2026-04-19 10:57:55 +02:00
parent e9f3327f31
commit 023665ae58
17 changed files with 742 additions and 198 deletions

View File

@@ -10,16 +10,16 @@ class CustomerRepository {
final SupabaseClient _client = GetIt.I<SupabaseClient>();
// Crea un nuovo cliente
Future<CustomerModel> createCustomer(CustomerModel customer) async {
Future<CustomerModel> saveCustomer(CustomerModel customer) async {
try {
final response = await _client
.from('customer')
.insert(customer.toJson())
.upsert(customer.toJson())
.select()
.single();
return CustomerModel.fromJson(response);
} catch (e) {
throw 'Errore durante la creazione del cliente: $e';
throw 'Errore durante il salvataggio del cliente: $e';
}
}