a5b01ffac4
- 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.
48 lines
1.7 KiB
Dart
48 lines
1.7 KiB
Dart
// GENERATED CODE - DO NOT MODIFY BY HAND
|
|
|
|
part of 'profile_data.dart';
|
|
|
|
// **************************************************************************
|
|
// JsonSerializableGenerator
|
|
// **************************************************************************
|
|
|
|
_ProfileData _$ProfileDataFromJson(Map<String, dynamic> json) => _ProfileData(
|
|
id: json['id'] as String?,
|
|
fullName: json['full_name'] as String?,
|
|
username: json['username'] as String?,
|
|
email: json['email'] as String?,
|
|
role: json['role'] as String?,
|
|
status: json['status'] as String?,
|
|
department: json['department'] as String?,
|
|
position: json['position'] as String?,
|
|
phone: json['phone'] as String?,
|
|
companies:
|
|
(json['companies'] as List<dynamic>?)
|
|
?.map((e) => CompanyProfileData.fromJson(e as Map<String, dynamic>))
|
|
.toList(),
|
|
profileImage: json['profile_image'] as String?,
|
|
isVerified: json['is_verified'] as bool?,
|
|
lastLoginAt: (json['last_login_at'] as num?)?.toInt(),
|
|
createdAt: (json['created_at'] as num?)?.toInt(),
|
|
updatedAt: (json['updated_at'] as num?)?.toInt(),
|
|
);
|
|
|
|
Map<String, dynamic> _$ProfileDataToJson(_ProfileData instance) =>
|
|
<String, dynamic>{
|
|
'id': instance.id,
|
|
'full_name': instance.fullName,
|
|
'username': instance.username,
|
|
'email': instance.email,
|
|
'role': instance.role,
|
|
'status': instance.status,
|
|
'department': instance.department,
|
|
'position': instance.position,
|
|
'phone': instance.phone,
|
|
'companies': instance.companies,
|
|
'profile_image': instance.profileImage,
|
|
'is_verified': instance.isVerified,
|
|
'last_login_at': instance.lastLoginAt,
|
|
'created_at': instance.createdAt,
|
|
'updated_at': instance.updatedAt,
|
|
};
|