sistemati ticket

This commit is contained in:
2026-05-12 11:14:48 +02:00
parent 57061da20d
commit 2aab70aec5
14 changed files with 367 additions and 95 deletions

View File

@@ -265,23 +265,6 @@ class _OperationFormScreenState extends State<OperationFormScreen> {
padding: const EdgeInsets.all(16.0),
child: Row(
children: [
Expanded(
flex: 1,
child: OutlinedButton(
onPressed: state.status == OperationFormStatus.saving
? null
: () => _saveOperation(
keepAdding: true,
targetStatus:
displayStatus, // <-- Usiamo lo stato selezionato nel form!
),
child: const Text(
'Salva e Aggiungi Altro',
textAlign: TextAlign.center,
),
),
),
const SizedBox(width: 12),
Expanded(
flex: 1,
child: ElevatedButton(
@@ -317,6 +300,24 @@ class _OperationFormScreenState extends State<OperationFormScreen> {
: const Text('Salva ed Esci'),
),
),
const SizedBox(width: 12),
Expanded(
flex: 1,
child: OutlinedButton(
onPressed: state.status == OperationFormStatus.saving
? null
: () => _saveOperation(
keepAdding: true,
targetStatus:
displayStatus, // <-- Usiamo lo stato selezionato nel form!
),
child: const Text(
'Salva e Aggiungi Altro',
textAlign: TextAlign.center,
),
),
),
],
),
),
@@ -466,13 +467,9 @@ class _OperationFormScreenState extends State<OperationFormScreen> {
Widget _buildCustomerSection(OperationFormState state) {
return SharedCustomerSection(
customerId: state.operation.customerId,
customerName: state.operation.customerDisplayName,
customer: state.operation.customer,
onCustomerSelected: (customer) {
context.read<OperationFormCubit>().updateFields(
customerId: customer.id,
customerDisplayName: customer.name,
);
context.read<OperationFormCubit>().updateFields(customer: customer);
},
);
}
@@ -559,7 +556,7 @@ class _OperationFormScreenState extends State<OperationFormScreen> {
return SharedAttachmentsSection(
parentType: AttachmentParentType.operation,
parentId: state.operation.id,
titleForUpload: state.operation.customerDisplayName ?? 'Nuova pratica',
titleForUpload: state.operation.customer?.name ?? 'Nuova pratica',
onGenerateIdForQr: _generateIdForQr,
);
}

View File

@@ -130,7 +130,7 @@ class _OperationListScreenState extends State<OperationListScreen> {
children: [
Expanded(
child: Text(
operation.customerDisplayName ?? "Cliente sconosciuto",
operation.customer?.name ?? "Cliente sconosciuto",
style: const TextStyle(
fontWeight: FontWeight.bold,
fontSize: 16,