bug 2004, sorting fixed with dashboard multi filter.

export_module_ui_ux_enhancement
Sikander Saleem 1 week ago
parent 7aa6637cba
commit 2a49a0dbcb

@ -727,6 +727,7 @@ class AllRequestsProvider extends ChangeNotifier {
List<int>? statusTransaction, List<int>? statusTransaction,
List<int>? priority, List<int>? priority,
List<int>? displayData, List<int>? displayData,
bool? isAscending,
}) async { }) async {
if (isMultiFilterLoading == true) return -2; if (isMultiFilterLoading == true) return -2;
if (_allRequestsAndCount == null || pagination) { if (_allRequestsAndCount == null || pagination) {
@ -743,6 +744,7 @@ class AllRequestsProvider extends ChangeNotifier {
body["pageNumber"] = pageNum++; body["pageNumber"] = pageNum++;
body["pageSize"] = pageItemNumber; body["pageSize"] = pageItemNumber;
} }
if (isAscending != null) body["isAscending"] = isAscending;
response = await ApiManager.instance.post(URLs.getAllRequestsAndCount, body: body); response = await ApiManager.instance.post(URLs.getAllRequestsAndCount, body: body);
stateCode = response.statusCode; stateCode = response.statusCode;

@ -347,6 +347,7 @@ class DashBoardProvider extends ChangeNotifier {
statusTransaction: statusTransaction, statusTransaction: statusTransaction,
priority: priority, priority: priority,
displayData: displayData, displayData: displayData,
isAscending: isAscending,
); );
} }

@ -79,10 +79,11 @@ class _RequestCategoryFragmentState extends State<RequestCategoryFragment> with
// Reload data with new sort order // Reload data with new sort order
dashboardProvider.resetRequestDataList(); dashboardProvider.resetRequestDataList();
Provider.of<AllRequestsProvider>(context, listen: false).reset();
if (dashboardProvider.listIndex.isEmpty) { if (dashboardProvider.listIndex.isEmpty) {
// No category selected - do nothing or could reload default // No category selected - reload default data with sorting
return; Provider.of<AllRequestsProvider>(context, listen: false).getAllRequests(context, isAscending: isAscending);
} else if (dashboardProvider.listIndex.length == 1 && dashboardProvider.isUnassignedTab(dashboardProvider.listIndex[0])) { } else if (dashboardProvider.listIndex.length == 1 && dashboardProvider.isUnassignedTab(dashboardProvider.listIndex[0])) {
// UnAssigned only - check by requestType, not by index // UnAssigned only - check by requestType, not by index
int index = dashboardProvider.listIndex[0]; int index = dashboardProvider.listIndex[0];

@ -37,6 +37,7 @@ class AAlertDialog extends StatelessWidget {
) )
: AlertDialog( : AlertDialog(
backgroundColor: AppColor.background(context), backgroundColor: AppColor.background(context),
actionsPadding: const EdgeInsets.only(bottom: 12, left: 24, right: 24),
title: title != null ? Text(title!) : null, title: title != null ? Text(title!) : null,
content: content != null ? Text(content!) : null, content: content != null ? Text(content!) : null,
// contentTextStyle: AppTextStyles.bodyText.copyWith(color: (context.isDark ? AppColor.neutral30 : AppColor.neutral50)), // contentTextStyle: AppTextStyles.bodyText.copyWith(color: (context.isDark ? AppColor.neutral30 : AppColor.neutral50)),

Loading…
Cancel
Save