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:
amirrezaghabeli
2025-11-20 17:33:30 +03:30
parent 64a1c30e6c
commit d01e028dc1
6 changed files with 76 additions and 52 deletions
+3 -2
View File
@@ -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();
}
}