feat(scanner-ui): show community verification status in found-car sheet
- Include confirmation_count in global_cars lookup - Display verification state and confirmation count in found catalog bottom sheet - Improve trust/feedback loop for collaborative validation workflow
This commit is contained in:
parent
d4883c1d32
commit
360fd5a705
1 changed files with 10 additions and 1 deletions
|
|
@ -318,7 +318,7 @@ class ScanTabState extends State<ScanTab> {
|
|||
|
||||
final globalCar = await supabase
|
||||
.from('global_cars')
|
||||
.select('hw_id, name, series, year, color, is_verified')
|
||||
.select('hw_id, name, series, year, color, is_verified, confirmation_count')
|
||||
.eq('hw_id', hwId)
|
||||
.maybeSingle();
|
||||
|
||||
|
|
@ -443,6 +443,7 @@ class _FoundCarSheet extends StatelessWidget {
|
|||
final series = car['series'] as String?;
|
||||
final year = car['year'];
|
||||
final verified = car['is_verified'] == true;
|
||||
final confirmations = (car['confirmation_count'] as num?)?.toInt() ?? 0;
|
||||
|
||||
return Padding(
|
||||
padding: EdgeInsets.only(
|
||||
|
|
@ -479,6 +480,14 @@ class _FoundCarSheet extends StatelessWidget {
|
|||
fontSize: 12,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 4),
|
||||
Text(
|
||||
'$confirmations confirmation${confirmations == 1 ? '' : 's'}',
|
||||
style: const TextStyle(
|
||||
color: AppColors.textHint,
|
||||
fontSize: 12,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
SizedBox(
|
||||
width: double.infinity,
|
||||
|
|
|
|||
Loading…
Reference in a new issue