rinominati i campi in inglese per diminuire confusione

Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
2026-05-03 10:30:09 +02:00
parent 4580173edf
commit 4559db620d
13 changed files with 156 additions and 156 deletions

View File

@@ -37,14 +37,14 @@ class _CreateStoreScreenState extends State<CreateStoreScreen> {
final company = context.read<SessionCubit>().state.company;
if (company != null) {
setState(() {
_indirizzoController.text = company.indirizzo;
_capController.text = company.cap;
_indirizzoController.text = company.address;
_capController.text = company.zipCode;
_comuneController.text =
company.citta; // Nel DB company è 'citta', store è 'comune'
_provinciaController.text = company.provincia;
company.city; // Nel DB company è 'citta', store è 'comune'
_provinciaController.text = company.province;
// Suggeriamo anche un nome se vuoto
if (_nomeController.text.isEmpty) {
_nomeController.text = '${company.ragioneSociale} - Sede';
_nomeController.text = '${company.name} - Sede';
}
});
@@ -68,12 +68,12 @@ class _CreateStoreScreenState extends State<CreateStoreScreen> {
}
final store = StoreModel(
nome: _nomeController.text.trim(),
name: _nomeController.text.trim(),
companyId: company.id!,
indirizzo: _indirizzoController.text.trim(),
cap: _capController.text.trim(),
comune: _comuneController.text.trim(),
provincia: _provinciaController.text.trim().toUpperCase(),
address: _indirizzoController.text.trim(),
zipCode: _capController.text.trim(),
city: _comuneController.text.trim(),
province: _provinciaController.text.trim().toUpperCase(),
);
context.read<StoreCubit>().createStore(store);

View File

@@ -53,11 +53,11 @@ class _StoreCardState extends State<StoreCard> {
color: widget.store.isActive ? context.accent : Colors.grey,
),
title: Text(
widget.store.nome,
widget.store.name,
style: const TextStyle(fontWeight: FontWeight.bold),
),
subtitle: Text(
"${widget.store.comune} (${widget.store.provincia}) - ${widget.store.indirizzo}",
"${widget.store.city} (${widget.store.province}) - ${widget.store.address}",
),
trailing: Switch(
value: widget.store.isActive,
@@ -129,7 +129,7 @@ class _StoreCardState extends State<StoreCard> {
mainAxisSize: MainAxisSize.min,
children: [
Text(
"Personale di ${store.nome}",
"Personale di ${store.name}",
style: context.titleLarge,
),
const SizedBox(height: 16),
@@ -184,7 +184,7 @@ class _StoreCardState extends State<StoreCard> {
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
Text("Providers di ${store.nome}", style: context.titleLarge),
Text("Providers di ${store.name}", style: context.titleLarge),
const SizedBox(height: 16),
...state.allProviders.map((provider) {
final isAssociated = _tempAssociatedProviders.any(

View File

@@ -24,11 +24,11 @@ class _StoreFormState extends State<StoreForm> {
void initState() {
super.initState();
if (widget.store != null) {
nomeController.text = widget.store!.nome;
indirizzoController.text = widget.store!.indirizzo;
capController.text = widget.store!.cap;
comuneController.text = widget.store!.comune;
provinciaController.text = widget.store!.provincia;
nomeController.text = widget.store!.name;
indirizzoController.text = widget.store!.address;
capController.text = widget.store!.zipCode;
comuneController.text = widget.store!.city;
provinciaController.text = widget.store!.province;
}
}
@@ -124,11 +124,11 @@ class _StoreFormState extends State<StoreForm> {
id: widget
.store
?.id, // Se nullo, Supabase ne crea uno nuovo
nome: nomeController.text,
indirizzo: indirizzoController.text,
cap: capController.text,
comune: comuneController.text,
provincia: provinciaController.text,
name: nomeController.text,
address: indirizzoController.text,
zipCode: capController.text,
city: comuneController.text,
province: provinciaController.text,
companyId: context
.read<SessionCubit>()
.state