feat: Sorts receptions by name descending
Improves the display of receptions by sorting them alphabetically in reverse order based on their name. This ensures a consistent and organized view. Includes a minor version increment.
This commit is contained in:
parent
35f76b919a
commit
5668f31cbe
@ -1,3 +1,4 @@
|
|||||||
|
import 'package:collection/collection.dart';
|
||||||
import 'package:e_scan/backend/api/api_calls.dart';
|
import 'package:e_scan/backend/api/api_calls.dart';
|
||||||
import 'package:e_scan/backend/objectbox/entities/stock_picking/stock_picking_record_entity.dart';
|
import 'package:e_scan/backend/objectbox/entities/stock_picking/stock_picking_record_entity.dart';
|
||||||
import 'package:e_scan/backend/objectbox/objectbox_manager.dart';
|
import 'package:e_scan/backend/objectbox/objectbox_manager.dart';
|
||||||
@ -96,6 +97,7 @@ class ReceptionPageModel extends StateNotifier<ReceptionPageState> {
|
|||||||
final res = await ApiCalls.getAllStockPiking();
|
final res = await ApiCalls.getAllStockPiking();
|
||||||
res.when(
|
res.when(
|
||||||
(data) {
|
(data) {
|
||||||
|
data.sort((a, b) => (b.name ?? '').compareTo((a.name ?? '')));
|
||||||
state = state.copyWith(receptions: data, loadingReceptions: false);
|
state = state.copyWith(receptions: data, loadingReceptions: false);
|
||||||
},
|
},
|
||||||
(error) {
|
(error) {
|
||||||
@ -114,6 +116,7 @@ class ReceptionPageModel extends StateNotifier<ReceptionPageState> {
|
|||||||
final res = await ApiCalls.getAllStockPiking();
|
final res = await ApiCalls.getAllStockPiking();
|
||||||
res.when(
|
res.when(
|
||||||
(data) {
|
(data) {
|
||||||
|
data.sort((a, b) => (b.name ?? '').compareTo((a.name ?? '')));
|
||||||
state = state.copyWith(receptions: data, loadingReceptions: false);
|
state = state.copyWith(receptions: data, loadingReceptions: false);
|
||||||
},
|
},
|
||||||
(error) {
|
(error) {
|
||||||
|
@ -16,7 +16,7 @@ publish_to: "none" # Remove this line if you wish to publish to pub.dev
|
|||||||
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
|
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
|
||||||
# In Windows, build-name is used as the major, minor, and patch parts
|
# In Windows, build-name is used as the major, minor, and patch parts
|
||||||
# of the product and file versions while build-number is used as the build suffix.
|
# of the product and file versions while build-number is used as the build suffix.
|
||||||
version: 0.3.0+9
|
version: 0.4.0+10
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: ^3.8.1
|
sdk: ^3.8.1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user