6d674a4a1b
- 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.
24 lines
553 B
Dart
24 lines
553 B
Dart
class YourTendersApi {
|
|
static const String tenderApproval = '/api/v1/tender-approvals';
|
|
|
|
static String getTenders({
|
|
required int limit,
|
|
required int offset,
|
|
required String createdFrom,
|
|
required String createdTo,
|
|
required String status,
|
|
}) {
|
|
String url = '$tenderApproval?limit=$limit&offset=$offset';
|
|
|
|
if (createdFrom.isNotEmpty && createdTo.isNotEmpty) {
|
|
url += '&created_from=$createdFrom&created_to=$createdTo';
|
|
}
|
|
|
|
if (status.isNotEmpty) {
|
|
url += '&status=$status';
|
|
}
|
|
|
|
return url;
|
|
}
|
|
}
|