sistemati ticket
This commit is contained in:
@@ -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,
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user