added singleUserMode and removed StaffSection from forms
This commit is contained in:
@@ -187,7 +187,9 @@ class _OperationFormScreenState extends State<OperationFormScreen> {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: Text(
|
||||
state.operation.id == null ? 'Nuova Pratica' : 'Modifica Pratica',
|
||||
state.operation.id == null
|
||||
? 'Nuova Pratica - Operatore: ${state.operation.staffDisplayName}'
|
||||
: 'Modifica Pratica - Operatore: ${state.operation.staffDisplayName}',
|
||||
),
|
||||
// Mettiamo un piccolo indicatore visivo anche nella AppBar se non è OK
|
||||
actions:
|
||||
@@ -570,8 +572,8 @@ class _OperationFormScreenState extends State<OperationFormScreen> {
|
||||
return Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
_buildStaffSection(state),
|
||||
const Divider(height: 50),
|
||||
/* _buildStaffSection(state),
|
||||
const Divider(height: 50), */
|
||||
_buildOperationStatusSection(state),
|
||||
const Divider(height: 32),
|
||||
_buildCustomerSection(state),
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:flux/core/routes/routes.dart';
|
||||
import 'package:flux/core/widgets/staff_selector_modal.dart';
|
||||
import 'package:flux/features/master_data/staff/models/staff_member_model.dart';
|
||||
import 'package:flux/features/operations/blocs/operation_list_cubit.dart';
|
||||
import 'package:flux/features/operations/models/operation_model.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
@@ -113,7 +116,15 @@ class _OperationListScreenState extends State<OperationListScreen> {
|
||||
},
|
||||
),
|
||||
floatingActionButton: FloatingActionButton(
|
||||
onPressed: () => startNewOperation(context),
|
||||
onPressed: () async {
|
||||
StaffMemberModel? createdBy = await getStaffMember(context);
|
||||
if (createdBy == null || !context.mounted) return;
|
||||
context.pushNamed(
|
||||
Routes.operationForm,
|
||||
pathParameters: {'id': 'new'},
|
||||
extra: (createdBy: createdBy, operation: null),
|
||||
);
|
||||
},
|
||||
child: const Icon(Icons.add),
|
||||
),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user