Skip to content

Commit

Permalink
Fix: purchase scan button (#423)
Browse files Browse the repository at this point in the history
  • Loading branch information
Rotheem authored Sep 10, 2024
1 parent bf5df39 commit a51321d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
12 changes: 3 additions & 9 deletions lib/purchases/providers/purchases_admin_provider.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,8 @@ final isPurchasesAdminProvider = StateProvider<bool>((ref) {
.contains("c1275229-46b2-4e53-a7c4-305513bb1a2a")) {
return true;
}
sellers.when(
data: (data) {
if (data.isNotEmpty) {
return true;
}
},
loading: () {},
error: (error, stackTrace) {},
return sellers.maybeWhen(
data: (data) => data.isNotEmpty,
orElse: () => false,
);
return false;
});
8 changes: 8 additions & 0 deletions lib/purchases/ui/pages/scan_page/scan_dialog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,14 @@ class ScanDialog extends HookConsumerWidget {
),
),
const SizedBox(height: 10),
Text(
"Variant : ${data.productVariant.nameFR}",
style: const TextStyle(
fontSize: 16,
color: Colors.black,
),
),
const SizedBox(height: 10),
Text(
"${data.scanLeft.toString()} / ${ticket.maxUse} ${PurchasesTextConstants.leftScan}",
style: const TextStyle(
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: myecl
description: MyECL est l'application des Centraliens de Lyon, conçue par ÉCLAIR

publish_to: "none"
version: 0.10.1+131
version: 0.10.2+132

environment:
sdk: ^3.3.0
Expand Down

0 comments on commit a51321d

Please sign in to comment.