Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
2026-05-03 12:44:51 +02:00
parent 6bb65e8296
commit eb66a707cc
3 changed files with 165 additions and 2 deletions

View File

@@ -89,6 +89,8 @@ class OperationsCubit extends Cubit<OperationsState> {
void initOperationForm({
OperationModel? existingOperation,
String? operationId,
String? staffId,
String? staffDisplayName,
}) async {
if (existingOperation != null) {
emit(
@@ -219,6 +221,8 @@ class OperationsCubit extends Cubit<OperationsState> {
int? quantity,
String? modelId,
String? modelDisplayName,
String? staffId,
String? staffDisplayName,
// Aggiungiamo questi flag per forzare la pulizia dei campi quando cambi tipo
bool clearProvider = false,
bool clearType = false,
@@ -262,6 +266,8 @@ class OperationsCubit extends Cubit<OperationsState> {
modelDisplayName: clearModel
? null
: (modelDisplayName ?? current.modelDisplayName),
staffId: staffId ?? current.staffId,
staffDisplayName: staffDisplayName ?? current.staffDisplayName,
);
emit(state.copyWith(currentOperation: updated));