Update dependencies and enhance tender approval status handling

- Updated `pubspec.lock` to reflect new versions for several packages, including `async`, `fake_async`, `leak_tracker`, and `vm_service`.
- Modified `TenderApprovalStatus` enum to include a new status `approved`.
- Updated routing for `YourTendersRouteData` to accept a status parameter and pass it to the `YourTendersScreen`.
- Adjusted API calls and view models to utilize the new status handling, ensuring proper filtering and display of tender data based on approval status.
- Enhanced filter dialog to support new status options and improved user feedback in the UI for submitted and approved tenders.
This commit is contained in:
amirrezaghabeli
2025-10-12 14:57:33 +03:30
parent cccd637771
commit 6d674a4a1b
14 changed files with 321 additions and 186 deletions
@@ -1,5 +1,6 @@
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:tm_app/core/constants/tender_approval_status.dart';
import 'package:tm_app/core/theme/colors.dart';
import 'package:tm_app/core/utils/size_config.dart';
import 'package:tm_app/view_models/your_tenders_view_model.dart';
@@ -57,12 +58,24 @@ class _TendersSubmittedState extends State<TendersSubmitted> {
return Consumer<YourTendersViewModel>(
builder: (context, viewModel, child) {
if (widget.approvedTenders.data == null) {
return const Center(child: Text('No submitted projects yet.'));
return Center(
child: Text(
viewModel.selectedStatus == TenderApprovalStatus.approved.value
? 'No Approved data.'
: 'No Submitted data.',
),
);
}
final tenders = widget.approvedTenders.data!.tenders ?? [];
if (tenders.isEmpty) {
return const Center(child: Text('No submitted projects yet.'));
return Center(
child: Text(
viewModel.selectedStatus == TenderApprovalStatus.approved.value
? 'No Approved data.'
: 'No Submitted data.',
),
);
}
final itemCount =