From 9dae80e66e9183c94f6c61a5ee2e371596ed1935 Mon Sep 17 00:00:00 2001 From: Achintha Isuru Date: Sun, 25 Jan 2026 10:28:43 -0500 Subject: [PATCH] feat: add staff certificates feature with pubspec configuration - Created pubspec.yaml for the staff_certificates feature with dependencies including flutter_bloc, equatable, get_it, and flutter_modular. - Established paths for KROW dependencies: design_system, core_localization, krow_domain, krow_core, and krow_data_connect. - Added firebase_auth and firebase_data_connect as dependencies. - Generated pubspec.lock file to lock dependency versions. --- .../lib/src/l10n/en.i18n.json | 52 +- .../lib/src/l10n/es.i18n.json | 40 + .../design_system/lib/src/ui_icons.dart | 18 + .../auth_repository_impl.dart | 5 - .../certificates/analysis_options.yaml | 1 + .../certificates_repository_mock.dart | 43 + .../certificates_repository_impl.dart | 91 ++ .../repositories/certificates_repository.dart | 12 + .../usecases/get_certificates_usecase.dart | 21 + .../certificates/certificates_cubit.dart | 28 + .../certificates/certificates_state.dart | 39 + .../navigation/certificates_navigator.dart | 10 + .../presentation/pages/certificates_page.dart | 135 +++ .../widgets/add_certificate_card.dart | 54 + .../widgets/certificate_card.dart | 417 +++++++ .../widgets/certificate_upload_modal.dart | 158 +++ .../widgets/certificates_header.dart | 131 +++ .../lib/src/staff_certificates_module.dart | 28 + .../certificates/lib/staff_certificates.dart | 4 + .../compliance/certificates/pubspec.lock | 1002 +++++++++++++++++ .../compliance/certificates/pubspec.yaml | 35 + .../bank_account_repository_impl.dart | 64 ++ .../presentation/pages/bank_account_page.dart | 3 + .../widgets/add_account_form.dart | 7 +- 24 files changed, 2383 insertions(+), 15 deletions(-) create mode 100644 apps/mobile/packages/features/staff/profile_sections/compliance/certificates/analysis_options.yaml create mode 100644 apps/mobile/packages/features/staff/profile_sections/compliance/certificates/lib/src/data/repositories/certificates_repository_mock.dart create mode 100644 apps/mobile/packages/features/staff/profile_sections/compliance/certificates/lib/src/data/repositories_impl/certificates_repository_impl.dart create mode 100644 apps/mobile/packages/features/staff/profile_sections/compliance/certificates/lib/src/domain/repositories/certificates_repository.dart create mode 100644 apps/mobile/packages/features/staff/profile_sections/compliance/certificates/lib/src/domain/usecases/get_certificates_usecase.dart create mode 100644 apps/mobile/packages/features/staff/profile_sections/compliance/certificates/lib/src/presentation/blocs/certificates/certificates_cubit.dart create mode 100644 apps/mobile/packages/features/staff/profile_sections/compliance/certificates/lib/src/presentation/blocs/certificates/certificates_state.dart create mode 100644 apps/mobile/packages/features/staff/profile_sections/compliance/certificates/lib/src/presentation/navigation/certificates_navigator.dart create mode 100644 apps/mobile/packages/features/staff/profile_sections/compliance/certificates/lib/src/presentation/pages/certificates_page.dart create mode 100644 apps/mobile/packages/features/staff/profile_sections/compliance/certificates/lib/src/presentation/widgets/add_certificate_card.dart create mode 100644 apps/mobile/packages/features/staff/profile_sections/compliance/certificates/lib/src/presentation/widgets/certificate_card.dart create mode 100644 apps/mobile/packages/features/staff/profile_sections/compliance/certificates/lib/src/presentation/widgets/certificate_upload_modal.dart create mode 100644 apps/mobile/packages/features/staff/profile_sections/compliance/certificates/lib/src/presentation/widgets/certificates_header.dart create mode 100644 apps/mobile/packages/features/staff/profile_sections/compliance/certificates/lib/src/staff_certificates_module.dart create mode 100644 apps/mobile/packages/features/staff/profile_sections/compliance/certificates/lib/staff_certificates.dart create mode 100644 apps/mobile/packages/features/staff/profile_sections/compliance/certificates/pubspec.lock create mode 100644 apps/mobile/packages/features/staff/profile_sections/compliance/certificates/pubspec.yaml diff --git a/apps/mobile/packages/core_localization/lib/src/l10n/en.i18n.json b/apps/mobile/packages/core_localization/lib/src/l10n/en.i18n.json index ab65bce4..d7961da9 100644 --- a/apps/mobile/packages/core_localization/lib/src/l10n/en.i18n.json +++ b/apps/mobile/packages/core_localization/lib/src/l10n/en.i18n.json @@ -593,12 +593,52 @@ "error": "Error: $message" }, "card": { - "view": "View", - "upload": "Upload", - "verified": "Verified", - "pending": "Pending", - "missing": "Missing", - "rejected": "Rejected" + "view": "View", + "upload": "Upload", + "verified": "Verified", + "pending": "Pending", + "missing": "Missing", + "rejected": "Rejected" + } + }, + "staff_certificates": { + "title": "Certificates", + "progress": { + "title": "Your Progress", + "verified_count": "$completed of $total verified", + "active": "Compliance Active" + }, + "card": { + "expires_in_days": "Expires in $days days - Renew now", + "expired": "Expired - Renew now", + "verified": "Verified", + "expiring_soon": "Expiring Soon", + "exp": "Exp: $date", + "upload_button": "Upload Certificate", + "edit_expiry": "Edit Expiration Date", + "remove": "Remove Certificate", + "renew": "Renew", + "opened_snackbar": "Certificate opened in new tab" + }, + "add_more": { + "title": "Add Another Certificate", + "subtitle": "Upload additional certifications" + }, + "upload_modal": { + "title": "Upload Certificate", + "expiry_label": "Expiration Date (Optional)", + "select_date": "Select date", + "upload_file": "Upload File", + "drag_drop": "Drag and drop or click to upload", + "supported_formats": "PDF, JPG, PNG up to 10MB", + "cancel": "Cancel", + "save": "Save Certificate" + }, + "delete_modal": { + "title": "Remove Certificate?", + "message": "This action cannot be undone.", + "cancel": "Cancel", + "confirm": "Remove" } } } diff --git a/apps/mobile/packages/core_localization/lib/src/l10n/es.i18n.json b/apps/mobile/packages/core_localization/lib/src/l10n/es.i18n.json index 334f1011..ee71168b 100644 --- a/apps/mobile/packages/core_localization/lib/src/l10n/es.i18n.json +++ b/apps/mobile/packages/core_localization/lib/src/l10n/es.i18n.json @@ -599,5 +599,45 @@ "missing": "Missing", "rejected": "Rejected" } + }, + "staff_certificates": { + "title": "Certificates", + "progress": { + "title": "Your Progress", + "verified_count": "$completed of $total verified", + "active": "Compliance Active" + }, + "card": { + "expires_in_days": "Expires in $days days - Renew now", + "expired": "Expired - Renew now", + "verified": "Verified", + "expiring_soon": "Expiring Soon", + "exp": "Exp: $date", + "upload_button": "Upload Certificate", + "edit_expiry": "Edit Expiration Date", + "remove": "Remove Certificate", + "renew": "Renew", + "opened_snackbar": "Certificate opened in new tab" + }, + "add_more": { + "title": "Add Another Certificate", + "subtitle": "Upload additional certifications" + }, + "upload_modal": { + "title": "Upload Certificate", + "expiry_label": "Expiration Date (Optional)", + "select_date": "Select date", + "upload_file": "Upload File", + "drag_drop": "Drag and drop or click to upload", + "supported_formats": "PDF, JPG, PNG up to 10MB", + "cancel": "Cancel", + "save": "Save Certificate" + }, + "delete_modal": { + "title": "Remove Certificate?", + "message": "This action cannot be undone.", + "cancel": "Cancel", + "confirm": "Remove" + } } } diff --git a/apps/mobile/packages/design_system/lib/src/ui_icons.dart b/apps/mobile/packages/design_system/lib/src/ui_icons.dart index df7f72d2..e035bf63 100644 --- a/apps/mobile/packages/design_system/lib/src/ui_icons.dart +++ b/apps/mobile/packages/design_system/lib/src/ui_icons.dart @@ -201,4 +201,22 @@ class UiIcons { /// Download icon static const IconData download = _IconLib.download; + + /// Upload icon + static const IconData upload = _IconLib.upload; + + /// Upload Cloud icon + static const IconData uploadCloud = _IconLib.uploadCloud; + + /// File Check icon + static const IconData fileCheck = _IconLib.fileCheck; + + /// Utensils icon + static const IconData utensils = _IconLib.utensils; + + /// Wine icon + static const IconData wine = _IconLib.wine; + + /// Award icon + static const IconData award = _IconLib.award; } diff --git a/apps/mobile/packages/features/staff/authentication/lib/src/data/repositories_impl/auth_repository_impl.dart b/apps/mobile/packages/features/staff/authentication/lib/src/data/repositories_impl/auth_repository_impl.dart index 68530d6f..97a9bc24 100644 --- a/apps/mobile/packages/features/staff/authentication/lib/src/data/repositories_impl/auth_repository_impl.dart +++ b/apps/mobile/packages/features/staff/authentication/lib/src/data/repositories_impl/auth_repository_impl.dart @@ -38,17 +38,12 @@ class AuthRepositoryImpl implements AuthRepositoryInterface { Future signInWithPhone({required String phoneNumber}) async { final Completer completer = Completer(); - print('Starting phone number verification for $phoneNumber'); - await firebaseAuth.verifyPhoneNumber( phoneNumber: phoneNumber, verificationCompleted: (_) { - print('Phone verification completed automatically.'); - print(phoneNumber); }, verificationFailed: (FirebaseAuthException e) { if (!completer.isCompleted) { - print('Phone verification failed: ${e.message}'); completer.completeError( Exception(e.message ?? 'Phone verification failed.'), ); diff --git a/apps/mobile/packages/features/staff/profile_sections/compliance/certificates/analysis_options.yaml b/apps/mobile/packages/features/staff/profile_sections/compliance/certificates/analysis_options.yaml new file mode 100644 index 00000000..81e71ce5 --- /dev/null +++ b/apps/mobile/packages/features/staff/profile_sections/compliance/certificates/analysis_options.yaml @@ -0,0 +1 @@ +include: ../../../../../../analysis_options.yaml diff --git a/apps/mobile/packages/features/staff/profile_sections/compliance/certificates/lib/src/data/repositories/certificates_repository_mock.dart b/apps/mobile/packages/features/staff/profile_sections/compliance/certificates/lib/src/data/repositories/certificates_repository_mock.dart new file mode 100644 index 00000000..a5238a76 --- /dev/null +++ b/apps/mobile/packages/features/staff/profile_sections/compliance/certificates/lib/src/data/repositories/certificates_repository_mock.dart @@ -0,0 +1,43 @@ +import 'package:krow_domain/krow_domain.dart'; +import '../../domain/repositories/certificates_repository.dart'; + +class CertificatesRepositoryMock implements CertificatesRepository { + @override + Future> getCertificates() async { + final DateTime now = DateTime.now(); + + // Create copies with dynamic dates + final List dynamicDocuments = [ + StaffDocument( + id: '1', + documentId: 'background', + staffId: 'current_user', + name: 'Background Check', + description: 'Required for all shifts', + status: DocumentStatus.verified, + expiryDate: now.add(const Duration(days: 365)), + ), + StaffDocument( + id: '2', + documentId: 'food_handler', + staffId: 'current_user', + name: 'Food Handler', + description: 'Required for food service', + status: DocumentStatus.verified, + expiryDate: now.add(const Duration(days: 15)), + ), + const StaffDocument( + id: '3', + documentId: 'rbs', + staffId: 'current_user', + name: 'RBS Alcohol', + description: 'Required for bar shifts', + status: DocumentStatus.missing, + expiryDate: null, + ), + ]; + + await Future.delayed(const Duration(seconds: 1)); // Simulate network delay + return dynamicDocuments; + } +} diff --git a/apps/mobile/packages/features/staff/profile_sections/compliance/certificates/lib/src/data/repositories_impl/certificates_repository_impl.dart b/apps/mobile/packages/features/staff/profile_sections/compliance/certificates/lib/src/data/repositories_impl/certificates_repository_impl.dart new file mode 100644 index 00000000..18ce89df --- /dev/null +++ b/apps/mobile/packages/features/staff/profile_sections/compliance/certificates/lib/src/data/repositories_impl/certificates_repository_impl.dart @@ -0,0 +1,91 @@ +import 'package:firebase_auth/firebase_auth.dart'; +import 'package:firebase_data_connect/firebase_data_connect.dart'; +import 'package:krow_data_connect/krow_data_connect.dart'; +import 'package:krow_domain/krow_domain.dart' as domain; + +import '../../domain/repositories/certificates_repository.dart'; + +/// Implementation of [CertificatesRepository] using Data Connect. +/// +/// This class handles the communication with the backend via [ExampleConnector]. +/// It maps raw generated data types to clean [domain.StaffDocument] entities. +class CertificatesRepositoryImpl implements CertificatesRepository { + /// The generated Data Connect SDK client. + final ExampleConnector _dataConnect; + + /// The Firebase Authentication instance. + final FirebaseAuth _firebaseAuth; + + /// Creates a [CertificatesRepositoryImpl]. + /// + /// Requires [ExampleConnector] for data access and [FirebaseAuth] for user context. + CertificatesRepositoryImpl({ + required ExampleConnector dataConnect, + required FirebaseAuth firebaseAuth, + }) : _dataConnect = dataConnect, + _firebaseAuth = firebaseAuth; + + @override + Future> getCertificates() async { + final User? currentUser = _firebaseAuth.currentUser; + if (currentUser == null) { + throw Exception('User not authenticated'); + } + + try { + // Execute the query via DataConnect generated SDK + final QueryResult result = + await _dataConnect + .listStaffDocumentsByStaffId(staffId: currentUser.uid) + .execute(); + + // Map the generated SDK types to pure Domain entities + return result.data.staffDocuments + .map((ListStaffDocumentsByStaffIdStaffDocuments doc) => + _mapToDomain(doc)) + .toList(); + } catch (e) { + // In a real app, we would map specific exceptions to domain Failures here. + throw Exception('Failed to fetch certificates: $e'); + } + } + + /// Maps the Data Connect [ListStaffDocumentsByStaffIdStaffDocuments] to a domain [domain.StaffDocument]. + domain.StaffDocument _mapToDomain( + ListStaffDocumentsByStaffIdStaffDocuments doc, + ) { + return domain.StaffDocument( + id: doc.id, + staffId: doc.staffId, + documentId: doc.documentId, + name: doc.document.name, + description: null, // Description not available in this query response + status: _mapStatus(doc.status), + documentUrl: doc.documentUrl, + expiryDate: doc.expiryDate?.toDateTime(), + ); + } + + /// Maps the Data Connect [DocumentStatus] enum to the domain [domain.DocumentStatus]. + domain.DocumentStatus _mapStatus(EnumValue status) { + if (status is Known) { + switch (status.value) { + case DocumentStatus.VERIFIED: + return domain.DocumentStatus.verified; + case DocumentStatus.PENDING: + return domain.DocumentStatus.pending; + case DocumentStatus.MISSING: + return domain.DocumentStatus.missing; + case DocumentStatus.UPLOADED: + return domain.DocumentStatus.pending; + case DocumentStatus.EXPIRING: + // 'EXPIRING' in backend is treated as 'verified' in domain, + // as the document is strictly valid until the expiry date. + return domain.DocumentStatus.verified; + } + } + // Fallback for unknown status + return domain.DocumentStatus.pending; + } +} diff --git a/apps/mobile/packages/features/staff/profile_sections/compliance/certificates/lib/src/domain/repositories/certificates_repository.dart b/apps/mobile/packages/features/staff/profile_sections/compliance/certificates/lib/src/domain/repositories/certificates_repository.dart new file mode 100644 index 00000000..b87081df --- /dev/null +++ b/apps/mobile/packages/features/staff/profile_sections/compliance/certificates/lib/src/domain/repositories/certificates_repository.dart @@ -0,0 +1,12 @@ +import 'package:krow_domain/krow_domain.dart'; + +/// Interface for the certificates repository. +/// +/// Responsible for fetching staff compliance certificates. +/// Implementations must reside in the data layer. +abstract interface class CertificatesRepository { + /// Fetches the list of compliance certificates for the current staff member. + /// + /// Returns a list of [StaffDocument] entities. + Future> getCertificates(); +} diff --git a/apps/mobile/packages/features/staff/profile_sections/compliance/certificates/lib/src/domain/usecases/get_certificates_usecase.dart b/apps/mobile/packages/features/staff/profile_sections/compliance/certificates/lib/src/domain/usecases/get_certificates_usecase.dart new file mode 100644 index 00000000..e7f8f206 --- /dev/null +++ b/apps/mobile/packages/features/staff/profile_sections/compliance/certificates/lib/src/domain/usecases/get_certificates_usecase.dart @@ -0,0 +1,21 @@ +import 'package:krow_core/core.dart'; +import 'package:krow_domain/krow_domain.dart'; +import '../repositories/certificates_repository.dart'; + +/// Use case for fetching staff compliance certificates. +/// +/// Delegates the data retrieval to the [CertificatesRepository]. +/// Follows the strict one-to-one mapping between action and use case. +class GetCertificatesUseCase extends NoInputUseCase> { + final CertificatesRepository _repository; + + /// Creates a [GetCertificatesUseCase]. + /// + /// Requires a [CertificatesRepository] to access the certificates data source. + GetCertificatesUseCase(this._repository); + + @override + Future> call() { + return _repository.getCertificates(); + } +} diff --git a/apps/mobile/packages/features/staff/profile_sections/compliance/certificates/lib/src/presentation/blocs/certificates/certificates_cubit.dart b/apps/mobile/packages/features/staff/profile_sections/compliance/certificates/lib/src/presentation/blocs/certificates/certificates_cubit.dart new file mode 100644 index 00000000..717d2886 --- /dev/null +++ b/apps/mobile/packages/features/staff/profile_sections/compliance/certificates/lib/src/presentation/blocs/certificates/certificates_cubit.dart @@ -0,0 +1,28 @@ +import 'package:flutter_bloc/flutter_bloc.dart'; +import 'package:krow_domain/krow_domain.dart'; +import '../../../domain/usecases/get_certificates_usecase.dart'; +import 'certificates_state.dart'; + +class CertificatesCubit extends Cubit { + final GetCertificatesUseCase _getCertificatesUseCase; + + CertificatesCubit(this._getCertificatesUseCase) : super(const CertificatesState()) { + loadCertificates(); + } + + Future loadCertificates() async { + emit(state.copyWith(status: CertificatesStatus.loading)); + try { + final List certificates = await _getCertificatesUseCase(); + emit(state.copyWith( + status: CertificatesStatus.success, + certificates: certificates, + )); + } catch (e) { + emit(state.copyWith( + status: CertificatesStatus.failure, + errorMessage: e.toString(), + )); + } + } +} diff --git a/apps/mobile/packages/features/staff/profile_sections/compliance/certificates/lib/src/presentation/blocs/certificates/certificates_state.dart b/apps/mobile/packages/features/staff/profile_sections/compliance/certificates/lib/src/presentation/blocs/certificates/certificates_state.dart new file mode 100644 index 00000000..912b6ae9 --- /dev/null +++ b/apps/mobile/packages/features/staff/profile_sections/compliance/certificates/lib/src/presentation/blocs/certificates/certificates_state.dart @@ -0,0 +1,39 @@ +import 'package:equatable/equatable.dart'; +import 'package:krow_domain/krow_domain.dart'; + +enum CertificatesStatus { initial, loading, success, failure } + +class CertificatesState extends Equatable { + final CertificatesStatus status; + final List certificates; + final String? errorMessage; + + const CertificatesState({ + this.status = CertificatesStatus.initial, + List? certificates, + this.errorMessage, + }) : certificates = certificates ?? const []; + + CertificatesState copyWith({ + CertificatesStatus? status, + List? certificates, + String? errorMessage, + }) { + return CertificatesState( + status: status ?? this.status, + certificates: certificates ?? this.certificates, + errorMessage: errorMessage ?? this.errorMessage, + ); + } + + @override + List get props => [status, certificates, errorMessage]; + + /// The number of verified certificates. + int get completedCount => certificates + .where((doc) => doc.status == DocumentStatus.verified) + .length; + + /// The total number of certificates. + int get totalCount => certificates.length; +} diff --git a/apps/mobile/packages/features/staff/profile_sections/compliance/certificates/lib/src/presentation/navigation/certificates_navigator.dart b/apps/mobile/packages/features/staff/profile_sections/compliance/certificates/lib/src/presentation/navigation/certificates_navigator.dart new file mode 100644 index 00000000..afdab051 --- /dev/null +++ b/apps/mobile/packages/features/staff/profile_sections/compliance/certificates/lib/src/presentation/navigation/certificates_navigator.dart @@ -0,0 +1,10 @@ +import 'package:flutter_modular/flutter_modular.dart'; + +/// Extension on [IModularNavigator] to provide strongly-typed navigation +/// for the staff certificates feature. +extension CertificatesNavigator on IModularNavigator { + /// Navigates back. + void popCertificates() { + pop(); + } +} diff --git a/apps/mobile/packages/features/staff/profile_sections/compliance/certificates/lib/src/presentation/pages/certificates_page.dart b/apps/mobile/packages/features/staff/profile_sections/compliance/certificates/lib/src/presentation/pages/certificates_page.dart new file mode 100644 index 00000000..f9ac8f85 --- /dev/null +++ b/apps/mobile/packages/features/staff/profile_sections/compliance/certificates/lib/src/presentation/pages/certificates_page.dart @@ -0,0 +1,135 @@ +import 'package:design_system/design_system.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_bloc/flutter_bloc.dart'; +import 'package:flutter_modular/flutter_modular.dart'; +import 'package:krow_domain/krow_domain.dart'; +import 'package:core_localization/core_localization.dart'; + +import '../blocs/certificates/certificates_cubit.dart'; +import '../blocs/certificates/certificates_state.dart'; +import '../widgets/add_certificate_card.dart'; +import '../widgets/certificate_card.dart'; +import '../widgets/certificate_upload_modal.dart'; +import '../widgets/certificates_header.dart'; + +/// Page for viewing and managing staff certificates. +/// +/// Refactored to be stateless and follow clean architecture. +class CertificatesPage extends StatelessWidget { + const CertificatesPage({super.key}); + + @override + Widget build(BuildContext context) { + // Dependency Injection: Retrieve the Cubit + final CertificatesCubit cubit = Modular.get(); + + return BlocBuilder( + bloc: cubit, + builder: (BuildContext context, CertificatesState state) { + if (state.status == CertificatesStatus.loading || + state.status == CertificatesStatus.initial) { + return const Scaffold( + body: Center(child: CircularProgressIndicator()), + ); + } + + if (state.status == CertificatesStatus.failure) { + return Scaffold( + body: Center(child: Text('Error: ${state.errorMessage}')), + ); + } + + final List documents = state.certificates; + + return Scaffold( + backgroundColor: UiColors.background, // Matches 0xFFF8FAFC + body: SingleChildScrollView( + child: Column( + children: [ + CertificatesHeader( + completedCount: state.completedCount, + totalCount: state.totalCount, + ), + Transform.translate( + offset: const Offset(0, -48), + child: Padding( + padding: const EdgeInsets.symmetric(horizontal: 20), + child: Column( + children: [ + ...documents.map((StaffDocument doc) => CertificateCard( + document: doc, + onUpload: () => _showUploadModal(context, doc), + onEditExpiry: () => _showEditExpiryDialog(context, doc), + onRemove: () => _showRemoveConfirmation(context, doc), + onView: () { + ScaffoldMessenger.of(context).showSnackBar( + SnackBar( + content: Text(t.staff_certificates.card.opened_snackbar), + duration: const Duration(seconds: 2), + ), + ); + }, + )), + const SizedBox(height: 16), + AddCertificateCard( + onTap: () => _showUploadModal(context, null), + ), + const SizedBox(height: 32), + ], + ), + ), + ), + ], + ), + ), + ); + }, + ); + } + + void _showUploadModal(BuildContext context, StaffDocument? document) { + showModalBottomSheet( + context: context, + isScrollControlled: true, + backgroundColor: Colors.transparent, + builder: (BuildContext context) => CertificateUploadModal( + document: document, + onSave: () { + // TODO: Implement upload via Cubit + // Modular.get().uploadCertificate(...); + Navigator.pop(context); + }, + onCancel: () => Navigator.pop(context), + ), + ); + } + + void _showEditExpiryDialog(BuildContext context, StaffDocument document) { + _showUploadModal(context, document); + } + + void _showRemoveConfirmation(BuildContext context, StaffDocument document) { + showDialog( + context: context, + builder: (BuildContext context) => AlertDialog( + title: Text(t.staff_certificates.delete_modal.title), + content: Text(t.staff_certificates.delete_modal.message), + actions: [ + TextButton( + onPressed: () => Navigator.pop(context), + child: Text(t.staff_certificates.delete_modal.cancel), + ), + TextButton( + onPressed: () { + // TODO: Implement delete via Cubit + // Modular.get().deleteCertificate(document.id); + Navigator.pop(context); + }, + style: TextButton.styleFrom(foregroundColor: UiColors.destructive), + child: Text(t.staff_certificates.delete_modal.confirm), + ), + ], + ), + ); + } +} diff --git a/apps/mobile/packages/features/staff/profile_sections/compliance/certificates/lib/src/presentation/widgets/add_certificate_card.dart b/apps/mobile/packages/features/staff/profile_sections/compliance/certificates/lib/src/presentation/widgets/add_certificate_card.dart new file mode 100644 index 00000000..315e91ec --- /dev/null +++ b/apps/mobile/packages/features/staff/profile_sections/compliance/certificates/lib/src/presentation/widgets/add_certificate_card.dart @@ -0,0 +1,54 @@ +import 'package:design_system/design_system.dart'; +import 'package:flutter/material.dart'; +import 'package:core_localization/core_localization.dart'; + +class AddCertificateCard extends StatelessWidget { + final VoidCallback onTap; + + const AddCertificateCard({super.key, required this.onTap}); + + @override + Widget build(BuildContext context) { + return GestureDetector( + onTap: onTap, + child: Container( + padding: const EdgeInsets.all(20), + decoration: BoxDecoration( + gradient: LinearGradient( + begin: Alignment.topLeft, + end: Alignment.bottomRight, + colors: [Colors.grey[50]!, Colors.grey[100]!], // Keep prototype style + ), + borderRadius: BorderRadius.circular(16), + border: Border.all( + color: Colors.grey[300]!, + style: BorderStyle.solid, + ), + ), + child: Row( + children: [ + const Icon(UiIcons.add, color: UiColors.primary, size: 24), + const SizedBox(width: 16), + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + t.staff_certificates.add_more.title, + style: UiTypography.body1b.copyWith( // 16px Bold + color: UiColors.textPrimary, + ), + ), + Text( + t.staff_certificates.add_more.subtitle, + style: UiTypography.body3r.copyWith( // 12px Regular + color: UiColors.textSecondary, + ), + ), + ], + ), + ], + ), + ), + ); + } +} diff --git a/apps/mobile/packages/features/staff/profile_sections/compliance/certificates/lib/src/presentation/widgets/certificate_card.dart b/apps/mobile/packages/features/staff/profile_sections/compliance/certificates/lib/src/presentation/widgets/certificate_card.dart new file mode 100644 index 00000000..c1cca227 --- /dev/null +++ b/apps/mobile/packages/features/staff/profile_sections/compliance/certificates/lib/src/presentation/widgets/certificate_card.dart @@ -0,0 +1,417 @@ +import 'package:design_system/design_system.dart'; +import 'package:flutter/material.dart'; +import 'package:intl/intl.dart'; +import 'package:krow_domain/krow_domain.dart'; +import 'package:core_localization/core_localization.dart'; + +class CertificateCard extends StatelessWidget { + final StaffDocument document; + final VoidCallback? onUpload; + final VoidCallback? onEditExpiry; + final VoidCallback? onRemove; + final VoidCallback? onView; + + const CertificateCard({ + super.key, + required this.document, + this.onUpload, + this.onEditExpiry, + this.onRemove, + this.onView, + }); + + @override + Widget build(BuildContext context) { + // Determine UI state from document + final bool isComplete = document.status == DocumentStatus.verified; + // Todo: Better logic for expring. Assuming if expiryDate is close. + // Prototype used 'EXPIRING' status. We map this logic: + final bool isExpiring = _isExpiring(document.expiryDate); + final bool isExpired = _isExpired(document.expiryDate); + + // Override isComplete if expiring or expired + final bool showComplete = isComplete && !isExpired && !isExpiring; + + final bool isPending = document.status == DocumentStatus.pending; + final bool isNotStarted = document.status == DocumentStatus.missing || document.status == DocumentStatus.rejected; + + // UI Properties helper + final _CertificateUiProps uiProps = _getUiProps(document.documentId); + + return Container( + margin: const EdgeInsets.only(bottom: 16), + decoration: BoxDecoration( + color: UiColors.white, + borderRadius: BorderRadius.circular(UiConstants.space4), + boxShadow: [ + BoxShadow( + color: UiColors.black.withOpacity(0.05), + blurRadius: 4, + offset: const Offset(0, 2), + ), + ], + border: Border.all(color: UiColors.border), + ), + clipBehavior: Clip.hardEdge, + child: Column( + children: [ + if (isExpiring || isExpired) + Container( + padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 8), + decoration: BoxDecoration( + color: const Color(0xFFF9E547).withOpacity(0.2), // Yellow tint + border: const Border( + bottom: BorderSide(color: Color(0x66F9E547)), + ), + ), + child: Row( + children: [ + const Icon( + UiIcons.warning, + size: 16, + color: UiColors.textPrimary, + ), + const SizedBox(width: 8), + Text( + isExpired + ? t.staff_certificates.card.expired + : t.staff_certificates.card.expires_in_days(days: _daysUntilExpiry(document.expiryDate)), + style: UiTypography.body3m.copyWith( // 12px Medium + color: UiColors.textPrimary, + ), + ), + ], + ), + ), + + Padding( + padding: const EdgeInsets.all(20), + child: Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Stack( + clipBehavior: Clip.none, + children: [ + Container( + width: 64, + height: 64, + decoration: BoxDecoration( + color: uiProps.color.withOpacity(0.1), + borderRadius: BorderRadius.circular(16), + ), + child: Center( + child: Icon( + uiProps.icon, + color: uiProps.color, + size: 28, + ), + ), + ), + if (showComplete) + const Positioned( + bottom: -4, + right: -4, + child: CircleAvatar( + radius: 12, + backgroundColor: UiColors.primary, + child: Icon( + UiIcons.success, + color: UiColors.white, + size: 16, + ), + ), + ), + if (isPending) + const Positioned( + bottom: -4, + right: -4, + child: CircleAvatar( + radius: 12, + backgroundColor: UiColors.textPrimary, + child: Icon( + UiIcons.clock, + color: UiColors.white, + size: 16, + ), + ), + ), + ], + ), + const SizedBox(width: 16), + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + document.name, + style: UiTypography.body1m.copyWith( // 16px Medium + color: UiColors.textPrimary, + ), + ), + const SizedBox(height: 2), + Text( + document.description ?? '', // Optional description + style: UiTypography.body3r.copyWith( // 12px Regular + color: UiColors.textSecondary, + ), + ), + ], + ), + ), + const Icon( + UiIcons.chevronRight, + color: UiColors.textSecondary, + size: 20, + ), + ], + ), + const SizedBox(height: 16), + + if (showComplete) _buildCompleteStatus(document.expiryDate), + + if (isExpiring || isExpired) _buildExpiringStatus(context, document.expiryDate), + + if (isNotStarted) + SizedBox( + width: double.infinity, + child: ElevatedButton( + onPressed: onUpload, + style: ElevatedButton.styleFrom( + backgroundColor: UiColors.primary, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(12), + ), + padding: const EdgeInsets.symmetric(vertical: 12), + elevation: 0, + ), + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + const Icon( + UiIcons.upload, + size: 16, + color: UiColors.white, + ), + const SizedBox(width: 8), + Text( + t.staff_certificates.card.upload_button, + style: UiTypography.body2m.copyWith( // 14px Medium + color: UiColors.white, + ), + ), + ], + ), + ), + ), + + if (showComplete || isExpiring || isExpired) ...[ + const SizedBox(height: 12), + SizedBox( + width: double.infinity, + child: OutlinedButton.icon( + onPressed: onEditExpiry, + icon: const Icon(UiIcons.edit, size: 16), + label: Text(t.staff_certificates.card.edit_expiry), + style: OutlinedButton.styleFrom( + foregroundColor: UiColors.textPrimary, + side: const BorderSide(color: UiColors.border), + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(12), + ), + padding: const EdgeInsets.symmetric(vertical: 12), + ), + ), + ), + const SizedBox(height: 8), + SizedBox( + width: double.infinity, + child: TextButton.icon( + onPressed: onRemove, + icon: const Icon(UiIcons.delete, size: 16), + label: Text(t.staff_certificates.card.remove), + style: TextButton.styleFrom( + foregroundColor: UiColors.destructive, + padding: const EdgeInsets.symmetric(vertical: 12), + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(12), + ), + ), + ), + ), + ], + ], + ), + ), + ], + ), + ), + ], + ), + ); + } + + Widget _buildCompleteStatus(DateTime? expiryDate) { + return Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Row( + children: [ + Container( + width: 8, + height: 8, + decoration: const BoxDecoration( + color: UiColors.primary, + shape: BoxShape.circle, + ), + ), + const SizedBox(width: 8), + Text( + t.staff_certificates.card.verified, + style: UiTypography.body2m.copyWith( + color: UiColors.primary, + ), + ), + ], + ), + if (expiryDate != null) + Text( + t.staff_certificates.card.exp(date: DateFormat('MMM d, yyyy').format(expiryDate)), + style: UiTypography.body3r.copyWith(color: UiColors.textSecondary), + ), + ], + ); + } + + Widget _buildExpiringStatus(BuildContext context, DateTime? expiryDate) { + return Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + children: [ + Container( + width: 8, + height: 8, + decoration: const BoxDecoration( + color: UiColors.primary, + shape: BoxShape.circle, + ), + ), + const SizedBox(width: 8), + Text( + t.staff_certificates.card.expiring_soon, + style: UiTypography.body2m.copyWith( + color: UiColors.primary, + ), + ), + ], + ), + if (expiryDate != null) + Padding( + padding: const EdgeInsets.only(top: 4), + child: Text( + t.staff_certificates.card.exp(date: DateFormat('MMM d, yyyy').format(expiryDate)), + style: UiTypography.body3r.copyWith( + color: UiColors.textSecondary, + ), + ), + ), + ], + ), + Row( + children: [ + _buildIconButton(UiIcons.eye, onView), + const SizedBox(width: 8), + _buildSmallOutlineButton( + t.staff_certificates.card.renew, + onUpload, + ), + ], + ), + ], + ); + } + + Widget _buildIconButton(IconData icon, VoidCallback? onTap) { + return InkWell( + onTap: onTap, + borderRadius: BorderRadius.circular(16), + child: Container( + width: 32, + height: 32, + decoration: BoxDecoration( + shape: BoxShape.circle, + color: Colors.transparent, + border: Border.all( + color: Colors.transparent, + ), + ), + child: Center( + child: Icon(icon, size: 16, color: UiColors.textSecondary), + ), + ), + ); + } + + Widget _buildSmallOutlineButton(String label, VoidCallback? onTap) { + return OutlinedButton( + onPressed: onTap, + style: OutlinedButton.styleFrom( + side: const BorderSide(color: Color(0x660A39DF)), // Primary with opacity + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(20)), + padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 0), + minimumSize: const Size(0, 32), + ), + child: Text( + label, + style: UiTypography.body3m.copyWith(color: UiColors.primary), + ), + ); + } + + bool _isExpiring(DateTime? expiry) { + if (expiry == null) return false; + final int days = expiry.difference(DateTime.now()).inDays; + return days >= 0 && days <= 30; // Close to expiry but not expired + } + + bool _isExpired(DateTime? expiry) { + if (expiry == null) return false; + return expiry.difference(DateTime.now()).inDays < 0; + } + + int _daysUntilExpiry(DateTime? expiry) { + if (expiry == null) return 0; + return expiry.difference(DateTime.now()).inDays; + } + + // Mock mapping for UI props based on ID + _CertificateUiProps _getUiProps(String id) { + switch (id) { + case 'background': + return _CertificateUiProps(UiIcons.fileCheck, const Color(0xFF0A39DF)); + case 'food_handler': + return _CertificateUiProps(UiIcons.utensils, const Color(0xFF0A39DF)); + case 'rbs': + return _CertificateUiProps(UiIcons.wine, const Color(0xFF121826)); + default: + // Default generic icon + return _CertificateUiProps(UiIcons.award, UiColors.primary); + } + } +} + +class _CertificateUiProps { + final IconData icon; + final Color color; + _CertificateUiProps(this.icon, this.color); +} diff --git a/apps/mobile/packages/features/staff/profile_sections/compliance/certificates/lib/src/presentation/widgets/certificate_upload_modal.dart b/apps/mobile/packages/features/staff/profile_sections/compliance/certificates/lib/src/presentation/widgets/certificate_upload_modal.dart new file mode 100644 index 00000000..852038a2 --- /dev/null +++ b/apps/mobile/packages/features/staff/profile_sections/compliance/certificates/lib/src/presentation/widgets/certificate_upload_modal.dart @@ -0,0 +1,158 @@ +import 'package:core_localization/core_localization.dart'; +import 'package:design_system/design_system.dart'; +import 'package:flutter/material.dart'; + +/// Modal for uploading or editing a certificate expiry. +class CertificateUploadModal extends StatelessWidget { + /// The document being edited, or null for a new upload. + // ignore: unused_field + final dynamic document; // Using dynamic for now as we don't import domain here to avoid direct coupling if possible, but actually we should import domain. + // Ideally, widgets should be dumb. Let's import domain. + + final VoidCallback onSave; + final VoidCallback onCancel; + + const CertificateUploadModal({ + super.key, + this.document, + required this.onSave, + required this.onCancel, + }); + + @override + Widget build(BuildContext context) { + return Container( + height: MediaQuery.of(context).size.height * 0.75, + decoration: const BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.only( + topLeft: Radius.circular(24), + topRight: Radius.circular(24), + ), + ), + padding: const EdgeInsets.all(24), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text( + t.staff_certificates.upload_modal.title, + style: UiTypography.headline3m.copyWith(color: UiColors.textPrimary), + ), + IconButton( + onPressed: onCancel, + icon: const Icon(UiIcons.close, size: 24), + ), + ], + ), + const SizedBox(height: 32), + Text( + t.staff_certificates.upload_modal.expiry_label, + style: UiTypography.body1m, + ), + const SizedBox(height: 8), + Container( + padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 12), + decoration: BoxDecoration( + border: Border.all(color: UiColors.border), + borderRadius: BorderRadius.circular(12), + ), + child: Row( + children: [ + const Icon(UiIcons.calendar, size: 20, color: UiColors.textSecondary), + const SizedBox(width: 12), + Text( + t.staff_certificates.upload_modal.select_date, + style: UiTypography.body1m.copyWith(color: UiColors.textSecondary), + ), + ], + ), + ), + const SizedBox(height: 24), + Text( + t.staff_certificates.upload_modal.upload_file, + style: UiTypography.body1m, + ), + const SizedBox(height: 8), + Expanded( + child: Container( + width: double.infinity, + decoration: BoxDecoration( + border: Border.all( + color: UiColors.border, + style: BorderStyle.solid, + ), + borderRadius: BorderRadius.circular(16), + color: UiColors.background, + ), + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Container( + padding: const EdgeInsets.all(16), + decoration: const BoxDecoration( + color: Color(0xFFEFF6FF), // Light blue + shape: BoxShape.circle, + ), + child: const Icon( + UiIcons.uploadCloud, + size: 32, + color: UiColors.primary, + ), + ), + const SizedBox(height: 16), + Text( + t.staff_certificates.upload_modal.drag_drop, + style: UiTypography.body1m, + ), + const SizedBox(height: 4), + Text( + t.staff_certificates.upload_modal.supported_formats, + style: UiTypography.body3r.copyWith(color: UiColors.textSecondary), + ), + ], + ), + ), + ), + const SizedBox(height: 24), + Row( + children: [ + Expanded( + child: OutlinedButton( + onPressed: onCancel, + style: OutlinedButton.styleFrom( + padding: const EdgeInsets.symmetric(vertical: 16), + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(12), + ), + side: const BorderSide(color: UiColors.border), + ), + child: Text(t.staff_certificates.upload_modal.cancel, + style: UiTypography.body1m.copyWith(color: UiColors.textPrimary)), + ), + ), + const SizedBox(width: 16), + Expanded( + child: ElevatedButton( + onPressed: onSave, + style: ElevatedButton.styleFrom( + backgroundColor: UiColors.primary, + padding: const EdgeInsets.symmetric(vertical: 16), + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(12), + ), + elevation: 0, + ), + child: Text(t.staff_certificates.upload_modal.save, + style: UiTypography.body1m.copyWith(color: Colors.white)), + ), + ), + ], + ), + ], + ), + ); + } +} diff --git a/apps/mobile/packages/features/staff/profile_sections/compliance/certificates/lib/src/presentation/widgets/certificates_header.dart b/apps/mobile/packages/features/staff/profile_sections/compliance/certificates/lib/src/presentation/widgets/certificates_header.dart new file mode 100644 index 00000000..0d07100f --- /dev/null +++ b/apps/mobile/packages/features/staff/profile_sections/compliance/certificates/lib/src/presentation/widgets/certificates_header.dart @@ -0,0 +1,131 @@ +import 'package:design_system/design_system.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_modular/flutter_modular.dart'; +import 'package:core_localization/core_localization.dart'; + +class CertificatesHeader extends StatelessWidget { + final int completedCount; + final int totalCount; + + const CertificatesHeader({ + super.key, + required this.completedCount, + required this.totalCount, + }); + + @override + Widget build(BuildContext context) { + // Prevent division by zero + final double progressValue = totalCount == 0 ? 0 : completedCount / totalCount; + final int progressPercent = totalCount == 0 ? 0 : (progressValue * 100).round(); + + return Container( + padding: const EdgeInsets.fromLTRB(20, 60, 20, 80), + // Keeping gradient as per prototype layout requirement + decoration: const BoxDecoration( + gradient: LinearGradient( + begin: Alignment.topLeft, + end: Alignment.bottomRight, + colors: [UiColors.primary, Color(0xFF1E40AF)], // Using Primary and a darker shade + ), + ), + child: Column( + children: [ + Row( + children: [ + GestureDetector( + onTap: () => Modular.to.pop(), + child: Container( + width: 40, + height: 40, + decoration: BoxDecoration( + color: UiColors.white.withOpacity(0.1), + shape: BoxShape.circle, + ), + child: const Icon( + UiIcons.chevronLeft, // Swapped LucideIcons + color: UiColors.white, + size: 20, + ), + ), + ), + const SizedBox(width: 12), + Text( + t.staff_certificates.title, + style: UiTypography.headline3m.copyWith( // 18px Bold + color: UiColors.white, + ), + ), + ], + ), + const SizedBox(height: 32), + Row( + children: [ + SizedBox( + width: 96, + height: 96, + child: Stack( + fit: StackFit.expand, + children: [ + CircularProgressIndicator( + value: progressValue, + strokeWidth: 8, + backgroundColor: UiColors.white.withOpacity(0.2), + valueColor: const AlwaysStoppedAnimation( + Color(0xFFF9E547), // Yellow from prototype + ), + ), + Center( + child: Text( + '$progressPercent%', + style: UiTypography.display1b.copyWith( // 26px Bold + color: UiColors.white, + ), + ), + ), + ], + ), + ), + const SizedBox(width: 24), + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + t.staff_certificates.progress.title, + style: UiTypography.body1b.copyWith( // 16px Bold + color: UiColors.white, + ), + ), + const SizedBox(height: 4), + Text( + t.staff_certificates.progress.verified_count(completed: completedCount, total: totalCount), + style: UiTypography.body3r.copyWith( // 12px Regular + color: UiColors.white.withOpacity(0.7), + ), + ), + const SizedBox(height: 8), + Row( + children: [ + const Icon( + UiIcons.shield, + color: Color(0xFFF9E547), + size: 16, + ), + const SizedBox(width: 8), + Text( + t.staff_certificates.progress.active, + style: UiTypography.body3m.copyWith( // 12px Medium + color: const Color(0xFFF9E547), + ), + ), + ], + ), + ], + ), + ], + ), + ], + ), + ); + } +} diff --git a/apps/mobile/packages/features/staff/profile_sections/compliance/certificates/lib/src/staff_certificates_module.dart b/apps/mobile/packages/features/staff/profile_sections/compliance/certificates/lib/src/staff_certificates_module.dart new file mode 100644 index 00000000..a084e798 --- /dev/null +++ b/apps/mobile/packages/features/staff/profile_sections/compliance/certificates/lib/src/staff_certificates_module.dart @@ -0,0 +1,28 @@ +import 'package:firebase_auth/firebase_auth.dart'; +import 'package:flutter_modular/flutter_modular.dart'; +import 'package:krow_data_connect/krow_data_connect.dart'; + +import 'data/repositories_impl/certificates_repository_impl.dart'; +import 'domain/repositories/certificates_repository.dart'; +import 'domain/usecases/get_certificates_usecase.dart'; +import 'presentation/blocs/certificates/certificates_cubit.dart'; +import 'presentation/pages/certificates_page.dart'; + +class StaffCertificatesModule extends Module { + @override + void binds(Injector i) { + i.addLazySingleton( + () => CertificatesRepositoryImpl( + dataConnect: i.get(), // Assuming ExampleConnector is provided by parent module + firebaseAuth: FirebaseAuth.instance, + ), + ); + i.addLazySingleton(GetCertificatesUseCase.new); + i.addLazySingleton(CertificatesCubit.new); + } + + @override + void routes(RouteManager r) { + r.child('/', child: (_) => const CertificatesPage()); + } +} diff --git a/apps/mobile/packages/features/staff/profile_sections/compliance/certificates/lib/staff_certificates.dart b/apps/mobile/packages/features/staff/profile_sections/compliance/certificates/lib/staff_certificates.dart new file mode 100644 index 00000000..7db77246 --- /dev/null +++ b/apps/mobile/packages/features/staff/profile_sections/compliance/certificates/lib/staff_certificates.dart @@ -0,0 +1,4 @@ +library staff_certificates; + +export 'src/staff_certificates_module.dart'; +export 'src/presentation/navigation/certificates_navigator.dart'; // Export navigator extension diff --git a/apps/mobile/packages/features/staff/profile_sections/compliance/certificates/pubspec.lock b/apps/mobile/packages/features/staff/profile_sections/compliance/certificates/pubspec.lock new file mode 100644 index 00000000..7f71a701 --- /dev/null +++ b/apps/mobile/packages/features/staff/profile_sections/compliance/certificates/pubspec.lock @@ -0,0 +1,1002 @@ +# Generated by pub +# See https://dart.dev/tools/pub/glossary#lockfile +packages: + _fe_analyzer_shared: + dependency: transitive + description: + name: _fe_analyzer_shared + sha256: c209688d9f5a5f26b2fb47a188131a6fb9e876ae9e47af3737c0b4f58a93470d + url: "https://pub.dev" + source: hosted + version: "91.0.0" + _flutterfire_internals: + dependency: transitive + description: + name: _flutterfire_internals + sha256: ff0a84a2734d9e1089f8aedd5c0af0061b82fb94e95260d943404e0ef2134b11 + url: "https://pub.dev" + source: hosted + version: "1.3.59" + analyzer: + dependency: transitive + description: + name: analyzer + sha256: f51c8499b35f9b26820cfe914828a6a98a94efd5cc78b37bb7d03debae3a1d08 + url: "https://pub.dev" + source: hosted + version: "8.4.1" + archive: + dependency: transitive + description: + name: archive + sha256: cb6a278ef2dbb298455e1a713bda08524a175630ec643a242c399c932a0a1f7d + url: "https://pub.dev" + source: hosted + version: "3.6.1" + args: + dependency: transitive + description: + name: args + sha256: d0481093c50b1da8910eb0bb301626d4d8eb7284aa739614d2b394ee09e3ea04 + url: "https://pub.dev" + source: hosted + version: "2.7.0" + async: + dependency: transitive + description: + name: async + sha256: "758e6d74e971c3e5aceb4110bfd6698efc7f501675bcfe0c775459a8140750eb" + url: "https://pub.dev" + source: hosted + version: "2.13.0" + auto_injector: + dependency: transitive + description: + name: auto_injector + sha256: "1fc2624898e92485122eb2b1698dd42511d7ff6574f84a3a8606fc4549a1e8f8" + url: "https://pub.dev" + source: hosted + version: "2.1.1" + bloc: + dependency: transitive + description: + name: bloc + sha256: "106842ad6569f0b60297619e9e0b1885c2fb9bf84812935490e6c5275777804e" + url: "https://pub.dev" + source: hosted + version: "8.1.4" + bloc_test: + dependency: "direct dev" + description: + name: bloc_test + sha256: "165a6ec950d9252ebe36dc5335f2e6eb13055f33d56db0eeb7642768849b43d2" + url: "https://pub.dev" + source: hosted + version: "9.1.7" + boolean_selector: + dependency: transitive + description: + name: boolean_selector + sha256: "8aab1771e1243a5063b8b0ff68042d67334e3feab9e95b9490f9a6ebf73b42ea" + url: "https://pub.dev" + source: hosted + version: "2.1.2" + characters: + dependency: transitive + description: + name: characters + sha256: f71061c654a3380576a52b451dd5532377954cf9dbd272a78fc8479606670803 + url: "https://pub.dev" + source: hosted + version: "1.4.0" + cli_config: + dependency: transitive + description: + name: cli_config + sha256: ac20a183a07002b700f0c25e61b7ee46b23c309d76ab7b7640a028f18e4d99ec + url: "https://pub.dev" + source: hosted + version: "0.2.0" + clock: + dependency: transitive + description: + name: clock + sha256: fddb70d9b5277016c77a80201021d40a2247104d9f4aa7bab7157b7e3f05b84b + url: "https://pub.dev" + source: hosted + version: "1.1.2" + code_assets: + dependency: transitive + description: + name: code_assets + sha256: "83ccdaa064c980b5596c35dd64a8d3ecc68620174ab9b90b6343b753aa721687" + url: "https://pub.dev" + source: hosted + version: "1.0.0" + collection: + dependency: transitive + description: + name: collection + sha256: "2f5709ae4d3d59dd8f7cd309b4e023046b57d8a6c82130785d2b0e5868084e76" + url: "https://pub.dev" + source: hosted + version: "1.19.1" + convert: + dependency: transitive + description: + name: convert + sha256: b30acd5944035672bc15c6b7a8b47d773e41e2f17de064350988c5d02adb1c68 + url: "https://pub.dev" + source: hosted + version: "3.1.2" + core_localization: + dependency: "direct main" + description: + path: "../../../../../core_localization" + relative: true + source: path + version: "0.0.1" + coverage: + dependency: transitive + description: + name: coverage + sha256: "5da775aa218eaf2151c721b16c01c7676fbfdd99cebba2bf64e8b807a28ff94d" + url: "https://pub.dev" + source: hosted + version: "1.15.0" + crypto: + dependency: transitive + description: + name: crypto + sha256: c8ea0233063ba03258fbcf2ca4d6dadfefe14f02fab57702265467a19f27fadf + url: "https://pub.dev" + source: hosted + version: "3.0.7" + csv: + dependency: transitive + description: + name: csv + sha256: c6aa2679b2a18cb57652920f674488d89712efaf4d3fdf2e537215b35fc19d6c + url: "https://pub.dev" + source: hosted + version: "6.0.0" + design_system: + dependency: "direct main" + description: + path: "../../../../../design_system" + relative: true + source: path + version: "0.0.1" + diff_match_patch: + dependency: transitive + description: + name: diff_match_patch + sha256: "2efc9e6e8f449d0abe15be240e2c2a3bcd977c8d126cfd70598aee60af35c0a4" + url: "https://pub.dev" + source: hosted + version: "0.4.1" + equatable: + dependency: "direct main" + description: + name: equatable + sha256: "3e0141505477fd8ad55d6eb4e7776d3fe8430be8e497ccb1521370c3f21a3e2b" + url: "https://pub.dev" + source: hosted + version: "2.0.8" + fake_async: + dependency: transitive + description: + name: fake_async + sha256: "5368f224a74523e8d2e7399ea1638b37aecfca824a3cc4dfdf77bf1fa905ac44" + url: "https://pub.dev" + source: hosted + version: "1.3.3" + ffi: + dependency: transitive + description: + name: ffi + sha256: d07d37192dbf97461359c1518788f203b0c9102cfd2c35a716b823741219542c + url: "https://pub.dev" + source: hosted + version: "2.1.5" + file: + dependency: transitive + description: + name: file + sha256: a3b4f84adafef897088c160faf7dfffb7696046cb13ae90b508c2cbc95d3b8d4 + url: "https://pub.dev" + source: hosted + version: "7.0.1" + firebase_app_check: + dependency: transitive + description: + name: firebase_app_check + sha256: c4124632094a4062d7a1ff0a9f9c657ff54bece5d8393af4626cb191351a2aac + url: "https://pub.dev" + source: hosted + version: "0.3.2+10" + firebase_app_check_platform_interface: + dependency: transitive + description: + name: firebase_app_check_platform_interface + sha256: "4ca80bcc6c5c55289514d85e7c8ba8bc354342d23ab807b01c3f82e2fc7158e4" + url: "https://pub.dev" + source: hosted + version: "0.1.1+10" + firebase_app_check_web: + dependency: transitive + description: + name: firebase_app_check_web + sha256: b3150a78fe18c27525af05b149724ee33bd8592a5959e484fdfa5c98e25edb5f + url: "https://pub.dev" + source: hosted + version: "0.2.0+14" + firebase_auth: + dependency: "direct main" + description: + name: firebase_auth + sha256: "0fed2133bee1369ee1118c1fef27b2ce0d84c54b7819a2b17dada5cfec3b03ff" + url: "https://pub.dev" + source: hosted + version: "5.7.0" + firebase_auth_platform_interface: + dependency: transitive + description: + name: firebase_auth_platform_interface + sha256: "871c9df4ec9a754d1a793f7eb42fa3b94249d464cfb19152ba93e14a5966b386" + url: "https://pub.dev" + source: hosted + version: "7.7.3" + firebase_auth_web: + dependency: transitive + description: + name: firebase_auth_web + sha256: d9ada769c43261fd1b18decf113186e915c921a811bd5014f5ea08f4cf4bc57e + url: "https://pub.dev" + source: hosted + version: "5.15.3" + firebase_core: + dependency: transitive + description: + name: firebase_core + sha256: "7be63a3f841fc9663342f7f3a011a42aef6a61066943c90b1c434d79d5c995c5" + url: "https://pub.dev" + source: hosted + version: "3.15.2" + firebase_core_platform_interface: + dependency: transitive + description: + name: firebase_core_platform_interface + sha256: cccb4f572325dc14904c02fcc7db6323ad62ba02536833dddb5c02cac7341c64 + url: "https://pub.dev" + source: hosted + version: "6.0.2" + firebase_core_web: + dependency: transitive + description: + name: firebase_core_web + sha256: "0ed0dc292e8f9ac50992e2394e9d336a0275b6ae400d64163fdf0a8a8b556c37" + url: "https://pub.dev" + source: hosted + version: "2.24.1" + firebase_data_connect: + dependency: "direct main" + description: + name: firebase_data_connect + sha256: decc24f2ce21a305aa38f4840302aa893ad5cafd7ee4e05c2eb8a2808cb21c97 + url: "https://pub.dev" + source: hosted + version: "0.1.5+4" + fixnum: + dependency: transitive + description: + name: fixnum + sha256: b6dc7065e46c974bc7c5f143080a6764ec7a4be6da1285ececdc37be96de53be + url: "https://pub.dev" + source: hosted + version: "1.1.1" + flutter: + dependency: "direct main" + description: flutter + source: sdk + version: "0.0.0" + flutter_bloc: + dependency: "direct main" + description: + name: flutter_bloc + sha256: b594505eac31a0518bdcb4b5b79573b8d9117b193cc80cc12e17d639b10aa27a + url: "https://pub.dev" + source: hosted + version: "8.1.6" + flutter_localizations: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" + flutter_modular: + dependency: "direct main" + description: + name: flutter_modular + sha256: "33a63d9fe61429d12b3dfa04795ed890f17d179d3d38e988ba7969651fcd5586" + url: "https://pub.dev" + source: hosted + version: "6.4.1" + flutter_test: + dependency: "direct dev" + description: flutter + source: sdk + version: "0.0.0" + flutter_web_plugins: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" + font_awesome_flutter: + dependency: transitive + description: + name: font_awesome_flutter + sha256: b9011df3a1fa02993630b8fb83526368cf2206a711259830325bab2f1d2a4eb0 + url: "https://pub.dev" + source: hosted + version: "10.12.0" + frontend_server_client: + dependency: transitive + description: + name: frontend_server_client + sha256: f64a0333a82f30b0cca061bc3d143813a486dc086b574bfb233b7c1372427694 + url: "https://pub.dev" + source: hosted + version: "4.0.0" + get_it: + dependency: "direct main" + description: + name: get_it + sha256: d85128a5dae4ea777324730dc65edd9c9f43155c109d5cc0a69cab74139fbac1 + url: "https://pub.dev" + source: hosted + version: "7.7.0" + glob: + dependency: transitive + description: + name: glob + sha256: c3f1ee72c96f8f78935e18aa8cecced9ab132419e8625dc187e1c2408efc20de + url: "https://pub.dev" + source: hosted + version: "2.1.3" + google_fonts: + dependency: transitive + description: + name: google_fonts + sha256: "6996212014b996eaa17074e02b1b925b212f5e053832d9048970dc27255a8fb3" + url: "https://pub.dev" + source: hosted + version: "7.1.0" + google_identity_services_web: + dependency: transitive + description: + name: google_identity_services_web + sha256: "5d187c46dc59e02646e10fe82665fc3884a9b71bc1c90c2b8b749316d33ee454" + url: "https://pub.dev" + source: hosted + version: "0.3.3+1" + googleapis_auth: + dependency: transitive + description: + name: googleapis_auth + sha256: befd71383a955535060acde8792e7efc11d2fccd03dd1d3ec434e85b68775938 + url: "https://pub.dev" + source: hosted + version: "1.6.0" + grpc: + dependency: transitive + description: + name: grpc + sha256: e93ee3bce45c134bf44e9728119102358c7cd69de7832d9a874e2e74eb8cab40 + url: "https://pub.dev" + source: hosted + version: "3.2.4" + hooks: + dependency: transitive + description: + name: hooks + sha256: "5d309c86e7ce34cd8e37aa71cb30cb652d3829b900ab145e4d9da564b31d59f7" + url: "https://pub.dev" + source: hosted + version: "1.0.0" + http: + dependency: transitive + description: + name: http + sha256: "87721a4a50b19c7f1d49001e51409bddc46303966ce89a65af4f4e6004896412" + url: "https://pub.dev" + source: hosted + version: "1.6.0" + http2: + dependency: transitive + description: + name: http2 + sha256: "382d3aefc5bd6dc68c6b892d7664f29b5beb3251611ae946a98d35158a82bbfa" + url: "https://pub.dev" + source: hosted + version: "2.3.1" + http_multi_server: + dependency: transitive + description: + name: http_multi_server + sha256: aa6199f908078bb1c5efb8d8638d4ae191aac11b311132c3ef48ce352fb52ef8 + url: "https://pub.dev" + source: hosted + version: "3.2.2" + http_parser: + dependency: transitive + description: + name: http_parser + sha256: "178d74305e7866013777bab2c3d8726205dc5a4dd935297175b19a23a2e66571" + url: "https://pub.dev" + source: hosted + version: "4.1.2" + intl: + dependency: transitive + description: + name: intl + sha256: "3df61194eb431efc39c4ceba583b95633a403f46c9fd341e550ce0bfa50e9aa5" + url: "https://pub.dev" + source: hosted + version: "0.20.2" + io: + dependency: transitive + description: + name: io + sha256: dfd5a80599cf0165756e3181807ed3e77daf6dd4137caaad72d0b7931597650b + url: "https://pub.dev" + source: hosted + version: "1.0.5" + js: + dependency: transitive + description: + name: js + sha256: "53385261521cc4a0c4658fd0ad07a7d14591cf8fc33abbceae306ddb974888dc" + url: "https://pub.dev" + source: hosted + version: "0.7.2" + krow_core: + dependency: "direct main" + description: + path: "../../../../../core" + relative: true + source: path + version: "0.0.1" + krow_data_connect: + dependency: "direct main" + description: + path: "../../../../../data_connect" + relative: true + source: path + version: "0.0.1" + krow_domain: + dependency: "direct main" + description: + path: "../../../../../domain" + relative: true + source: path + version: "0.0.1" + leak_tracker: + dependency: transitive + description: + name: leak_tracker + sha256: "33e2e26bdd85a0112ec15400c8cbffea70d0f9c3407491f672a2fad47915e2de" + url: "https://pub.dev" + source: hosted + version: "11.0.2" + leak_tracker_flutter_testing: + dependency: transitive + description: + name: leak_tracker_flutter_testing + sha256: "1dbc140bb5a23c75ea9c4811222756104fbcd1a27173f0c34ca01e16bea473c1" + url: "https://pub.dev" + source: hosted + version: "3.0.10" + leak_tracker_testing: + dependency: transitive + description: + name: leak_tracker_testing + sha256: "8d5a2d49f4a66b49744b23b018848400d23e54caf9463f4eb20df3eb8acb2eb1" + url: "https://pub.dev" + source: hosted + version: "3.0.2" + logging: + dependency: transitive + description: + name: logging + sha256: c8245ada5f1717ed44271ed1c26b8ce85ca3228fd2ffdb75468ab01979309d61 + url: "https://pub.dev" + source: hosted + version: "1.3.0" + lucide_icons: + dependency: transitive + description: + name: lucide_icons + sha256: ad24d0fd65707e48add30bebada7d90bff2a1bba0a72d6e9b19d44246b0e83c4 + url: "https://pub.dev" + source: hosted + version: "0.257.0" + matcher: + dependency: transitive + description: + name: matcher + sha256: dc58c723c3c24bf8d3e2d3ad3f2f9d7bd9cf43ec6feaa64181775e60190153f2 + url: "https://pub.dev" + source: hosted + version: "0.12.17" + material_color_utilities: + dependency: transitive + description: + name: material_color_utilities + sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec + url: "https://pub.dev" + source: hosted + version: "0.11.1" + meta: + dependency: transitive + description: + name: meta + sha256: "23f08335362185a5ea2ad3a4e597f1375e78bce8a040df5c600c8d3552ef2394" + url: "https://pub.dev" + source: hosted + version: "1.17.0" + mime: + dependency: transitive + description: + name: mime + sha256: "41a20518f0cb1256669420fdba0cd90d21561e560ac240f26ef8322e45bb7ed6" + url: "https://pub.dev" + source: hosted + version: "2.0.0" + mocktail: + dependency: "direct dev" + description: + name: mocktail + sha256: "890df3f9688106f25755f26b1c60589a92b3ab91a22b8b224947ad041bf172d8" + url: "https://pub.dev" + source: hosted + version: "1.0.4" + modular_core: + dependency: transitive + description: + name: modular_core + sha256: "1db0420a0dfb8a2c6dca846e7cbaa4ffeb778e247916dbcb27fb25aa566e5436" + url: "https://pub.dev" + source: hosted + version: "3.4.1" + native_toolchain_c: + dependency: transitive + description: + name: native_toolchain_c + sha256: "89e83885ba09da5fdf2cdacc8002a712ca238c28b7f717910b34bcd27b0d03ac" + url: "https://pub.dev" + source: hosted + version: "0.17.4" + nested: + dependency: transitive + description: + name: nested + sha256: "03bac4c528c64c95c722ec99280375a6f2fc708eec17c7b3f07253b626cd2a20" + url: "https://pub.dev" + source: hosted + version: "1.0.0" + node_preamble: + dependency: transitive + description: + name: node_preamble + sha256: "6e7eac89047ab8a8d26cf16127b5ed26de65209847630400f9aefd7cd5c730db" + url: "https://pub.dev" + source: hosted + version: "2.0.2" + objective_c: + dependency: transitive + description: + name: objective_c + sha256: "7fd0c4d8ac8980011753b9bdaed2bf15111365924cdeeeaeb596214ea2b03537" + url: "https://pub.dev" + source: hosted + version: "9.2.4" + package_config: + dependency: transitive + description: + name: package_config + sha256: f096c55ebb7deb7e384101542bfba8c52696c1b56fca2eb62827989ef2353bbc + url: "https://pub.dev" + source: hosted + version: "2.2.0" + path: + dependency: transitive + description: + name: path + sha256: "75cca69d1490965be98c73ceaea117e8a04dd21217b37b292c9ddbec0d955bc5" + url: "https://pub.dev" + source: hosted + version: "1.9.1" + path_provider: + dependency: transitive + description: + name: path_provider + sha256: "50c5dd5b6e1aaf6fb3a78b33f6aa3afca52bf903a8a5298f53101fdaee55bbcd" + url: "https://pub.dev" + source: hosted + version: "2.1.5" + path_provider_android: + dependency: transitive + description: + name: path_provider_android + sha256: f2c65e21139ce2c3dad46922be8272bb5963516045659e71bb16e151c93b580e + url: "https://pub.dev" + source: hosted + version: "2.2.22" + path_provider_foundation: + dependency: transitive + description: + name: path_provider_foundation + sha256: "2a376b7d6392d80cd3705782d2caa734ca4727776db0b6ec36ef3f1855197699" + url: "https://pub.dev" + source: hosted + version: "2.6.0" + path_provider_linux: + dependency: transitive + description: + name: path_provider_linux + sha256: f7a1fe3a634fe7734c8d3f2766ad746ae2a2884abe22e241a8b301bf5cac3279 + url: "https://pub.dev" + source: hosted + version: "2.2.1" + path_provider_platform_interface: + dependency: transitive + description: + name: path_provider_platform_interface + sha256: "88f5779f72ba699763fa3a3b06aa4bf6de76c8e5de842cf6f29e2e06476c2334" + url: "https://pub.dev" + source: hosted + version: "2.1.2" + path_provider_windows: + dependency: transitive + description: + name: path_provider_windows + sha256: bd6f00dbd873bfb70d0761682da2b3a2c2fccc2b9e84c495821639601d81afe7 + url: "https://pub.dev" + source: hosted + version: "2.3.0" + platform: + dependency: transitive + description: + name: platform + sha256: "5d6b1b0036a5f331ebc77c850ebc8506cbc1e9416c27e59b439f917a902a4984" + url: "https://pub.dev" + source: hosted + version: "3.1.6" + plugin_platform_interface: + dependency: transitive + description: + name: plugin_platform_interface + sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02" + url: "https://pub.dev" + source: hosted + version: "2.1.8" + pool: + dependency: transitive + description: + name: pool + sha256: "978783255c543aa3586a1b3c21f6e9d720eb315376a915872c61ef8b5c20177d" + url: "https://pub.dev" + source: hosted + version: "1.5.2" + protobuf: + dependency: transitive + description: + name: protobuf + sha256: "68645b24e0716782e58948f8467fd42a880f255096a821f9e7d0ec625b00c84d" + url: "https://pub.dev" + source: hosted + version: "3.1.0" + provider: + dependency: transitive + description: + name: provider + sha256: "4e82183fa20e5ca25703ead7e05de9e4cceed1fbd1eadc1ac3cb6f565a09f272" + url: "https://pub.dev" + source: hosted + version: "6.1.5+1" + pub_semver: + dependency: transitive + description: + name: pub_semver + sha256: "5bfcf68ca79ef689f8990d1160781b4bad40a3bd5e5218ad4076ddb7f4081585" + url: "https://pub.dev" + source: hosted + version: "2.2.0" + result_dart: + dependency: transitive + description: + name: result_dart + sha256: "0666b21fbdf697b3bdd9986348a380aa204b3ebe7c146d8e4cdaa7ce735e6054" + url: "https://pub.dev" + source: hosted + version: "2.1.1" + shared_preferences: + dependency: transitive + description: + name: shared_preferences + sha256: "2939ae520c9024cb197fc20dee269cd8cdbf564c8b5746374ec6cacdc5169e64" + url: "https://pub.dev" + source: hosted + version: "2.5.4" + shared_preferences_android: + dependency: transitive + description: + name: shared_preferences_android + sha256: "83af5c682796c0f7719c2bbf74792d113e40ae97981b8f266fa84574573556bc" + url: "https://pub.dev" + source: hosted + version: "2.4.18" + shared_preferences_foundation: + dependency: transitive + description: + name: shared_preferences_foundation + sha256: "4e7eaffc2b17ba398759f1151415869a34771ba11ebbccd1b0145472a619a64f" + url: "https://pub.dev" + source: hosted + version: "2.5.6" + shared_preferences_linux: + dependency: transitive + description: + name: shared_preferences_linux + sha256: "580abfd40f415611503cae30adf626e6656dfb2f0cee8f465ece7b6defb40f2f" + url: "https://pub.dev" + source: hosted + version: "2.4.1" + shared_preferences_platform_interface: + dependency: transitive + description: + name: shared_preferences_platform_interface + sha256: "57cbf196c486bc2cf1f02b85784932c6094376284b3ad5779d1b1c6c6a816b80" + url: "https://pub.dev" + source: hosted + version: "2.4.1" + shared_preferences_web: + dependency: transitive + description: + name: shared_preferences_web + sha256: c49bd060261c9a3f0ff445892695d6212ff603ef3115edbb448509d407600019 + url: "https://pub.dev" + source: hosted + version: "2.4.3" + shared_preferences_windows: + dependency: transitive + description: + name: shared_preferences_windows + sha256: "94ef0f72b2d71bc3e700e025db3710911bd51a71cefb65cc609dd0d9a982e3c1" + url: "https://pub.dev" + source: hosted + version: "2.4.1" + shelf: + dependency: transitive + description: + name: shelf + sha256: e7dd780a7ffb623c57850b33f43309312fc863fb6aa3d276a754bb299839ef12 + url: "https://pub.dev" + source: hosted + version: "1.4.2" + shelf_packages_handler: + dependency: transitive + description: + name: shelf_packages_handler + sha256: "89f967eca29607c933ba9571d838be31d67f53f6e4ee15147d5dc2934fee1b1e" + url: "https://pub.dev" + source: hosted + version: "3.0.2" + shelf_static: + dependency: transitive + description: + name: shelf_static + sha256: c87c3875f91262785dade62d135760c2c69cb217ac759485334c5857ad89f6e3 + url: "https://pub.dev" + source: hosted + version: "1.1.3" + shelf_web_socket: + dependency: transitive + description: + name: shelf_web_socket + sha256: "3632775c8e90d6c9712f883e633716432a27758216dfb61bd86a8321c0580925" + url: "https://pub.dev" + source: hosted + version: "3.0.0" + sky_engine: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" + slang: + dependency: transitive + description: + name: slang + sha256: "13e3b6f07adc51ab751e7889647774d294cbce7a3382f81d9e5029acfe9c37b2" + url: "https://pub.dev" + source: hosted + version: "4.12.0" + slang_flutter: + dependency: transitive + description: + name: slang_flutter + sha256: "0a4545cca5404d6b7487cf61cf1fe56c52daeb08de56a7574ee8381fbad035a0" + url: "https://pub.dev" + source: hosted + version: "4.12.0" + source_map_stack_trace: + dependency: transitive + description: + name: source_map_stack_trace + sha256: c0713a43e323c3302c2abe2a1cc89aa057a387101ebd280371d6a6c9fa68516b + url: "https://pub.dev" + source: hosted + version: "2.1.2" + source_maps: + dependency: transitive + description: + name: source_maps + sha256: "190222579a448b03896e0ca6eca5998fa810fda630c1d65e2f78b3f638f54812" + url: "https://pub.dev" + source: hosted + version: "0.10.13" + source_span: + dependency: transitive + description: + name: source_span + sha256: "254ee5351d6cb365c859e20ee823c3bb479bf4a293c22d17a9f1bf144ce86f7c" + url: "https://pub.dev" + source: hosted + version: "1.10.1" + stack_trace: + dependency: transitive + description: + name: stack_trace + sha256: "8b27215b45d22309b5cddda1aa2b19bdfec9df0e765f2de506401c071d38d1b1" + url: "https://pub.dev" + source: hosted + version: "1.12.1" + stream_channel: + dependency: transitive + description: + name: stream_channel + sha256: "969e04c80b8bcdf826f8f16579c7b14d780458bd97f56d107d3950fdbeef059d" + url: "https://pub.dev" + source: hosted + version: "2.1.4" + string_scanner: + dependency: transitive + description: + name: string_scanner + sha256: "921cd31725b72fe181906c6a94d987c78e3b98c2e205b397ea399d4054872b43" + url: "https://pub.dev" + source: hosted + version: "1.4.1" + term_glyph: + dependency: transitive + description: + name: term_glyph + sha256: "7f554798625ea768a7518313e58f83891c7f5024f88e46e7182a4558850a4b8e" + url: "https://pub.dev" + source: hosted + version: "1.2.2" + test: + dependency: transitive + description: + name: test + sha256: "75906bf273541b676716d1ca7627a17e4c4070a3a16272b7a3dc7da3b9f3f6b7" + url: "https://pub.dev" + source: hosted + version: "1.26.3" + test_api: + dependency: transitive + description: + name: test_api + sha256: ab2726c1a94d3176a45960b6234466ec367179b87dd74f1611adb1f3b5fb9d55 + url: "https://pub.dev" + source: hosted + version: "0.7.7" + test_core: + dependency: transitive + description: + name: test_core + sha256: "0cc24b5ff94b38d2ae73e1eb43cc302b77964fbf67abad1e296025b78deb53d0" + url: "https://pub.dev" + source: hosted + version: "0.6.12" + typed_data: + dependency: transitive + description: + name: typed_data + sha256: f9049c039ebfeb4cf7a7104a675823cd72dba8297f264b6637062516699fa006 + url: "https://pub.dev" + source: hosted + version: "1.4.0" + uuid: + dependency: transitive + description: + name: uuid + sha256: a11b666489b1954e01d992f3d601b1804a33937b5a8fe677bd26b8a9f96f96e8 + url: "https://pub.dev" + source: hosted + version: "4.5.2" + vector_math: + dependency: transitive + description: + name: vector_math + sha256: d530bd74fea330e6e364cda7a85019c434070188383e1cd8d9777ee586914c5b + url: "https://pub.dev" + source: hosted + version: "2.2.0" + vm_service: + dependency: transitive + description: + name: vm_service + sha256: "45caa6c5917fa127b5dbcfbd1fa60b14e583afdc08bfc96dda38886ca252eb60" + url: "https://pub.dev" + source: hosted + version: "15.0.2" + watcher: + dependency: transitive + description: + name: watcher + sha256: "1398c9f081a753f9226febe8900fce8f7d0a67163334e1c94a2438339d79d635" + url: "https://pub.dev" + source: hosted + version: "1.2.1" + web: + dependency: transitive + description: + name: web + sha256: "868d88a33d8a87b18ffc05f9f030ba328ffefba92d6c127917a2ba740f9cfe4a" + url: "https://pub.dev" + source: hosted + version: "1.1.1" + web_socket: + dependency: transitive + description: + name: web_socket + sha256: "34d64019aa8e36bf9842ac014bb5d2f5586ca73df5e4d9bf5c936975cae6982c" + url: "https://pub.dev" + source: hosted + version: "1.0.1" + web_socket_channel: + dependency: transitive + description: + name: web_socket_channel + sha256: d645757fb0f4773d602444000a8131ff5d48c9e47adfe9772652dd1a4f2d45c8 + url: "https://pub.dev" + source: hosted + version: "3.0.3" + webkit_inspection_protocol: + dependency: transitive + description: + name: webkit_inspection_protocol + sha256: "87d3f2333bb240704cd3f1c6b5b7acd8a10e7f0bc28c28dcf14e782014f4a572" + url: "https://pub.dev" + source: hosted + version: "1.2.1" + xdg_directories: + dependency: transitive + description: + name: xdg_directories + sha256: "7a3f37b05d989967cdddcbb571f1ea834867ae2faa29725fd085180e0883aa15" + url: "https://pub.dev" + source: hosted + version: "1.1.0" + yaml: + dependency: transitive + description: + name: yaml + sha256: b9da305ac7c39faa3f030eccd175340f968459dae4af175130b3fc47e40d76ce + url: "https://pub.dev" + source: hosted + version: "3.1.3" +sdks: + dart: ">=3.10.7 <4.0.0" + flutter: ">=3.38.4" diff --git a/apps/mobile/packages/features/staff/profile_sections/compliance/certificates/pubspec.yaml b/apps/mobile/packages/features/staff/profile_sections/compliance/certificates/pubspec.yaml new file mode 100644 index 00000000..611d006e --- /dev/null +++ b/apps/mobile/packages/features/staff/profile_sections/compliance/certificates/pubspec.yaml @@ -0,0 +1,35 @@ +name: staff_certificates +description: Staff certificates feature +version: 0.0.1 +publish_to: none + +environment: + sdk: '>=3.0.0 <4.0.0' + +dependencies: + flutter: + sdk: flutter + flutter_bloc: ^8.1.0 + equatable: ^2.0.5 + get_it: ^7.6.0 + flutter_modular: ^6.3.0 + + # KROW Dependencies + design_system: + path: ../../../../../design_system + core_localization: + path: ../../../../../core_localization + krow_domain: + path: ../../../../../domain + krow_core: + path: ../../../../../core + krow_data_connect: + path: ../../../../../data_connect + firebase_auth: ^5.1.0 + firebase_data_connect: ^0.1.0 + +dev_dependencies: + flutter_test: + sdk: flutter + bloc_test: ^9.1.0 + mocktail: ^1.0.0 diff --git a/apps/mobile/packages/features/staff/profile_sections/finances/staff_bank_account/lib/src/data/repositories/bank_account_repository_impl.dart b/apps/mobile/packages/features/staff/profile_sections/finances/staff_bank_account/lib/src/data/repositories/bank_account_repository_impl.dart index e45681c8..abe63ddc 100644 --- a/apps/mobile/packages/features/staff/profile_sections/finances/staff_bank_account/lib/src/data/repositories/bank_account_repository_impl.dart +++ b/apps/mobile/packages/features/staff/profile_sections/finances/staff_bank_account/lib/src/data/repositories/bank_account_repository_impl.dart @@ -20,6 +20,70 @@ class BankAccountRepositoryImpl implements BankAccountRepository { final auth.User? user = firebaseAuth.currentUser; if (user == null) throw Exception('User not authenticated'); + // return some mock data for now + return [ + BankAccount( + id: '1', + userId: user.uid, + bankName: 'Mock Bank', + accountNumber: '****1234', + accountName: 'My Checking Account', + type: BankAccountType.checking, + last4: '1234', + isPrimary: true, + ), + BankAccount( + id: '2', + userId: user.uid, + bankName: 'Mock Bank', + accountNumber: '****5678', + accountName: 'My Savings Account', + type: BankAccountType.savings, + last4: '5678', + isPrimary: false, + ), + BankAccount( + id: '3', + userId: user.uid, + bankName: 'Mock Bank', + accountNumber: '****1234', + accountName: 'My Checking Account', + type: BankAccountType.checking, + last4: '1234', + isPrimary: true, + ), + BankAccount( + id: '4', + userId: user.uid, + bankName: 'Mock Bank', + accountNumber: '****5678', + accountName: 'My Savings Account', + type: BankAccountType.savings, + last4: '5678', + isPrimary: false, + ), + BankAccount( + id: '5', + userId: user.uid, + bankName: 'Mock Bank', + accountNumber: '****1234', + accountName: 'My Checking Account', + type: BankAccountType.checking, + last4: '1234', + isPrimary: true, + ), + BankAccount( + id: '6', + userId: user.uid, + bankName: 'Mock Bank', + accountNumber: '****5678', + accountName: 'My Savings Account', + type: BankAccountType.savings, + last4: '5678', + isPrimary: false, + ), + ]; + final QueryResult result = await dataConnect.getAccountsByOwnerId(ownerId: user.uid).execute(); return result.data.accounts.map((GetAccountsByOwnerIdAccounts account) { diff --git a/apps/mobile/packages/features/staff/profile_sections/finances/staff_bank_account/lib/src/presentation/pages/bank_account_page.dart b/apps/mobile/packages/features/staff/profile_sections/finances/staff_bank_account/lib/src/presentation/pages/bank_account_page.dart index 2951b35a..6d8bffae 100644 --- a/apps/mobile/packages/features/staff/profile_sections/finances/staff_bank_account/lib/src/presentation/pages/bank_account_page.dart +++ b/apps/mobile/packages/features/staff/profile_sections/finances/staff_bank_account/lib/src/presentation/pages/bank_account_page.dart @@ -82,6 +82,9 @@ class BankAccountPage extends StatelessWidget { accountNumber: account, type: type); }, + onCancel: () { + cubit.toggleForm(false); + } ), ], // Add extra padding at bottom diff --git a/apps/mobile/packages/features/staff/profile_sections/finances/staff_bank_account/lib/src/presentation/widgets/add_account_form.dart b/apps/mobile/packages/features/staff/profile_sections/finances/staff_bank_account/lib/src/presentation/widgets/add_account_form.dart index 61dc8cff..47d41d63 100644 --- a/apps/mobile/packages/features/staff/profile_sections/finances/staff_bank_account/lib/src/presentation/widgets/add_account_form.dart +++ b/apps/mobile/packages/features/staff/profile_sections/finances/staff_bank_account/lib/src/presentation/widgets/add_account_form.dart @@ -6,8 +6,9 @@ import '../blocs/bank_account_cubit.dart'; class AddAccountForm extends StatefulWidget { final dynamic strings; final Function(String routing, String account, String type) onSubmit; + final VoidCallback onCancel; - const AddAccountForm({super.key, required this.strings, required this.onSubmit}); + const AddAccountForm({super.key, required this.strings, required this.onSubmit, required this.onCancel}); @override State createState() => _AddAccountFormState(); @@ -79,9 +80,7 @@ class _AddAccountFormState extends State { Expanded( child: UiButton.text( text: widget.strings.cancel, - onPressed: () { - Modular.get().toggleForm(false); - }, + onPressed: () => widget.onCancel(), ), ), const SizedBox(width: UiConstants.space2),