feat(client_coverage): add client coverage feature with user session data use case and dashboard widgets
- Created `client_coverage` feature with necessary dependencies in `pubspec.yaml`. - Implemented `GetUserSessionDataUseCase` for retrieving user session data. - Developed `ClientHomeEditBanner` for edit mode instructions and reset functionality. - Added `ClientHomeHeader` to display user information and action buttons. - Built `DashboardWidgetBuilder` to render various dashboard widgets based on state. - Introduced `DraggableWidgetWrapper` for managing widget visibility and drag handles in edit mode. - Created `HeaderIconButton` for interactive header actions with optional badge support.
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import 'package:krow_domain/krow_domain.dart';
|
||||
import '../session/client_session_store.dart';
|
||||
|
||||
/// Mock implementation of data source for Home dashboard data.
|
||||
///
|
||||
@@ -18,4 +19,14 @@ class HomeRepositoryMock {
|
||||
totalFilled: 8,
|
||||
);
|
||||
}
|
||||
|
||||
/// Returns the current user's session data.
|
||||
///
|
||||
/// Returns a tuple of (businessName, photoUrl).
|
||||
(String, String?) getUserSession() {
|
||||
final session = ClientSessionStore.instance.session;
|
||||
final businessName = session?.business?.businessName ?? 'Your Company';
|
||||
final photoUrl = session?.userPhotoUrl;
|
||||
return (businessName, photoUrl);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user