Update ProfileData model to include companies and enhance profile UI

- Added a new field for companies in the ProfileData model to store associated company information.
- Updated JSON serialization methods to handle the new companies field.
- Modified profile page views to display the user's full name and company name, replacing previous role and department fields for improved clarity.
- Introduced new string constants for full name and phone in ProfileStrings.
This commit is contained in:
amirrezaghabeli
2025-11-23 10:47:51 +03:30
parent ae8501dc36
commit a5b01ffac4
7 changed files with 74 additions and 45 deletions
+15 -9
View File
@@ -88,6 +88,11 @@ class _DesktopProfilePageState extends State<DesktopProfilePage> {
child: Column(
children: [
SizedBox(height: 36.0.h()),
TitleDescription(
title: ProfileStrings.fullname,
description:
viewModel.profileData!.fullName ?? '',
),
TitleDescription(
title: ProfileStrings.username,
description:
@@ -98,19 +103,20 @@ class _DesktopProfilePageState extends State<DesktopProfilePage> {
description: viewModel.profileData!.email ?? '',
),
TitleDescription(
title: ProfileStrings.role,
description: viewModel.profileData!.role ?? '',
title: ProfileStrings.phone,
description: viewModel.profileData!.phone ?? '',
),
TitleDescription(
title: ProfileStrings.department,
title: ProfileStrings.companyName,
description:
viewModel.profileData!.department ?? '',
),
TitleDescription(
title: ProfileStrings.position,
description:
viewModel.profileData!.position ?? '',
viewModel
.profileData!
.companies!
.first
.name ??
'',
),
SizedBox(height: 24.0.h()),
// Theme Toggle
Align(