Refactor profile data handling and update UI components
- Changed references from companyProfileData to profileData across multiple profile page views for consistency. - Updated UI elements to display user-specific information such as username, email, role, department, and position. - Modified the profile screen to fetch user profile data instead of company profile data. - Added new string constants for user-related fields in ProfileStrings.
This commit is contained in:
@@ -28,7 +28,8 @@ class _ProfileScreenState extends State<ProfileScreen> {
|
||||
_tabService.addListener(_onTabChanged);
|
||||
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||
_viewModel.getCompanyProfile();
|
||||
// _viewModel.getCompanyProfile();
|
||||
_viewModel.getProfile();
|
||||
});
|
||||
}
|
||||
|
||||
@@ -41,7 +42,7 @@ class _ProfileScreenState extends State<ProfileScreen> {
|
||||
void _onTabChanged() {
|
||||
// Tab index 2 is Profile
|
||||
if (_tabService.currentTabIndex == 2 && mounted) {
|
||||
_viewModel.getCompanyProfile();
|
||||
_viewModel.getProfile();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user