Initial commit: unionflow-mobile-apps
Application Flutter complète (sans build artifacts). Signed-off-by: lions dev Team
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
/// Use case: Récupérer les budgets
|
||||
library get_budgets;
|
||||
|
||||
import 'package:dartz/dartz.dart';
|
||||
import 'package:injectable/injectable.dart';
|
||||
import '../../../../core/error/failures.dart';
|
||||
import '../entities/budget.dart';
|
||||
import '../repositories/finance_workflow_repository.dart';
|
||||
|
||||
@lazySingleton
|
||||
class GetBudgets {
|
||||
final FinanceWorkflowRepository repository;
|
||||
|
||||
GetBudgets(this.repository);
|
||||
|
||||
Future<Either<Failure, List<Budget>>> call({
|
||||
String? organizationId,
|
||||
BudgetStatus? status,
|
||||
int? year,
|
||||
}) async {
|
||||
return await repository.getBudgets(
|
||||
organizationId: organizationId,
|
||||
status: status,
|
||||
year: year,
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user