feat: localization, file restriction banners, test credentials, edit icon fix
- #553: Audit and verify localizations (en/es), replace hardcoded strings - #549: Incomplete profile banner in Find Shifts (staff app) - #550: File restriction banner on document upload page - #551: File restriction banner on certificate upload page - #552: File restriction banner on attire upload page - #492: Hide edit icon for past/completed orders (client app) - #524: Display worker benefits in staff app - Add test credentials to seed: testclient@gmail.com, staff +1-555-555-1234 - Fix document upload validation (context arg in _validatePdfFile on submit) - Add PR_LOCALIZATION.md Made-with: Cursor
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import 'package:firebase_data_connect/firebase_data_connect.dart';
|
||||
import 'package:firebase_data_connect/firebase_data_connect.dart';
|
||||
import 'package:krow_core/core.dart';
|
||||
import 'package:krow_data_connect/krow_data_connect.dart' as dc;
|
||||
import 'package:krow_domain/krow_domain.dart' as domain;
|
||||
@@ -198,11 +198,16 @@ class StaffConnectorRepositoryImpl implements StaffConnectorRepository {
|
||||
|
||||
return response.data.benefitsDatas
|
||||
.map(
|
||||
(dc.ListBenefitsDataByStaffIdBenefitsDatas e) => domain.Benefit(
|
||||
title: e.vendorBenefitPlan.title,
|
||||
entitlementHours: e.vendorBenefitPlan.total?.toDouble() ?? 0,
|
||||
usedHours: e.current.toDouble(),
|
||||
),
|
||||
(dc.ListBenefitsDataByStaffIdBenefitsDatas e) {
|
||||
final total =
|
||||
e.vendorBenefitPlan.total?.toDouble() ?? 0.0;
|
||||
final remaining = e.current.toDouble();
|
||||
return domain.Benefit(
|
||||
title: e.vendorBenefitPlan.title,
|
||||
entitlementHours: total,
|
||||
usedHours: (total - remaining).clamp(0.0, total),
|
||||
);
|
||||
},
|
||||
)
|
||||
.toList();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user