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
+9 -8
View File
@@ -85,6 +85,10 @@ class _TabletProfilePageState extends State<TabletProfilePage> {
child: Column(
children: [
SizedBox(height: 128.0.h()),
TitleDescription(
title: ProfileStrings.fullname,
description: viewModel.profileData!.fullName ?? '',
),
TitleDescription(
title: ProfileStrings.username,
description: viewModel.profileData!.username ?? '',
@@ -94,16 +98,13 @@ class _TabletProfilePageState extends State<TabletProfilePage> {
description: viewModel.profileData!.email ?? '',
),
TitleDescription(
title: ProfileStrings.role,
description: viewModel.profileData!.role ?? '',
title: ProfileStrings.phone,
description: viewModel.profileData!.phone ?? '',
),
TitleDescription(
title: ProfileStrings.department,
description: viewModel.profileData!.department ?? '',
),
TitleDescription(
title: ProfileStrings.position,
description: viewModel.profileData!.position ?? '',
title: ProfileStrings.companyName,
description:
viewModel.profileData!.companies!.first.name ?? '',
),
// TitleDescription(
// title: ProfileStrings.companyName,