TF-48 Create and update object for compose email
This commit is contained in:
@@ -1,8 +0,0 @@
|
||||
import 'package:model/model.dart';
|
||||
import 'package:tmail_ui_user/features/login/data/model/response/presentation_account_response.dart';
|
||||
|
||||
extension PresentationAccountExtension on PresentationAccount {
|
||||
PresentationAccountResponse toPresentationAccountResponse() {
|
||||
return PresentationAccountResponse(emails, preferredEmailIndex, type);
|
||||
}
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
import 'package:model/model.dart';
|
||||
import 'package:tmail_ui_user/features/login/data/model/response/user_profile_response.dart';
|
||||
import 'package:tmail_ui_user/features/login/data/extensions/presentation_account_extension.dart';
|
||||
|
||||
extension UserProfileExtension on UserProfile {
|
||||
UserProfileResponse toUserProfileResponse() {
|
||||
return UserProfileResponse(
|
||||
id,
|
||||
firstName,
|
||||
lastName,
|
||||
jobTitle,
|
||||
service,
|
||||
buildingLocation,
|
||||
officeLocation,
|
||||
mainPhone,
|
||||
description,
|
||||
currentAvatar,
|
||||
avatars,
|
||||
accounts.map((account) => account.toPresentationAccountResponse()).toList()
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user