j
This commit is contained in:
@@ -3,13 +3,11 @@ import 'package:flux/core/utils/extensions.dart';
|
||||
import 'package:flux/features/attachments/models/attachment_model.dart';
|
||||
|
||||
enum OperationStatus {
|
||||
ok('ok'),
|
||||
waitingforaction('waiting_for_action'),
|
||||
waitingforsupport('waiting_for_support'),
|
||||
waitingfordeployment('waiting_for_deployment'),
|
||||
ko('ko'),
|
||||
draft('draft'),
|
||||
canceled('canceled');
|
||||
success('success', 'OK'),
|
||||
waitingForAction('waiting_for_action', 'In attesa di azione'),
|
||||
waitingForSupport('waiting_for_support', 'In attesa di supporto'),
|
||||
failure('failure', 'KO'),
|
||||
draft('draft', 'Bozza');
|
||||
|
||||
static OperationStatus fromString(String value) {
|
||||
final normalizedValue = value.replaceAll('_', '').toLowerCase();
|
||||
@@ -19,8 +17,9 @@ enum OperationStatus {
|
||||
}
|
||||
|
||||
final String supabaseName;
|
||||
final String displayName;
|
||||
|
||||
const OperationStatus(this.supabaseName);
|
||||
const OperationStatus(this.supabaseName, this.displayName);
|
||||
}
|
||||
|
||||
class OperationModel extends Equatable {
|
||||
@@ -163,8 +162,8 @@ class OperationModel extends Equatable {
|
||||
attachments,
|
||||
];
|
||||
|
||||
factory OperationModel.empty({required String companyId}) {
|
||||
return OperationModel(id: null, createdAt: null, companyId: companyId);
|
||||
factory OperationModel.empty() {
|
||||
return OperationModel(id: null, createdAt: null, companyId: '');
|
||||
}
|
||||
|
||||
factory OperationModel.fromMap(Map<String, dynamic> map) {
|
||||
|
||||
Reference in New Issue
Block a user