diff --git a/docs/user.sh b/docs/user.sh
index af94437..2beb56b 100644
--- a/docs/user.sh
+++ b/docs/user.sh
@@ -4,3 +4,40 @@ curl --location --request POST 'https://land.dbiz.com//api/method/building_mater
--header 'X-Frappe-Csrf-Token: a22fa53eeaa923f71f2fd879d2863a0985a6f2107f5f7f66d34cd62d' \
--data ''
+#response user info
+{
+ "message": {
+ "full_name": "phuoc",
+ "phone": "0978113710",
+ "email": "vodanh.2901@gmail.com",
+ "date_of_birth": null,
+ "gender": null,
+ "avatar": "https://secure.gravatar.com/avatar/753a0e2601b9bd87aed417e2ad123bf8?d=404&s=200",
+ "company_name": "phuoc",
+ "tax_code": null,
+ "id_card_front": null,
+ "id_card_back": null,
+ "certificates": [],
+ "membership_status": "Đã được phê duyệt",
+ "membership_status_color": "Success",
+ "is_verified": true,
+ "credential_display": false
+ }
+}
+
+#update user info
+curl --location 'https://land.dbiz.com//api/method/building_material.building_material.api.user.update_user_info' \
+--header 'Cookie: sid=a0c9a51c8d1fbbec824283115094bdca939bb829345e0005334aa99f; full_name=phuoc; sid=a0c9a51c8d1fbbec824283115094bdca939bb829345e0005334aa99f; system_user=no; user_id=vodanh.2901%40gmail.com; user_image=https%3A//secure.gravatar.com/avatar/753a0e2601b9bd87aed417e2ad123bf8%3Fd%3D404%26s%3D200' \
+--header 'X-Frappe-Csrf-Token: a22fa53eeaa923f71f2fd879d2863a0985a6f2107f5f7f66d34cd62d' \
+--header 'Content-Type: application/json' \
+--data '{
+ "full_name" : "Ha Duy Lam",
+ "date_of_birth" : "2025-12-30",
+ "gender" : "Male",
+ "company_name" : "Ha Duy Lam",
+ "tax_code" : "0912313232",
+ "avatar_base64": null,
+ "id_card_front_base64: null,
+ "id_card_back_base64: null,
+ "certificates_base64": []
+}'
\ No newline at end of file
diff --git a/ios/Runner/Info.plist b/ios/Runner/Info.plist
index a5f3c80..20bc755 100644
--- a/ios/Runner/Info.plist
+++ b/ios/Runner/Info.plist
@@ -29,9 +29,11 @@
UIMainStoryboardFile
Main
NSCameraUsageDescription
- This app needs camera access to scan QR codes
- NSPhotoLibraryUsageDescription
- This app needs photos access to get QR code from photo library
+ Ứng dụng cần quyền truy cập camera để quét mã QR và chụp ảnh giấy tờ xác thực (CCCD/CMND, chứng chỉ hành nghề)
+ NSPhotoLibraryUsageDescription
+ Ứng dụng cần quyền truy cập thư viện ảnh để chọn ảnh giấy tờ xác thực và mã QR từ thiết bị của bạn
+ NSMicrophoneUsageDescription
+ Ứng dụng cần quyền truy cập microphone để ghi âm video nếu cần
UISupportedInterfaceOrientations
UIInterfaceOrientationPortrait
diff --git a/lib/features/account/data/datasources/user_info_remote_datasource.dart b/lib/features/account/data/datasources/user_info_remote_datasource.dart
index 53deaf4..c15da6c 100644
--- a/lib/features/account/data/datasources/user_info_remote_datasource.dart
+++ b/lib/features/account/data/datasources/user_info_remote_datasource.dart
@@ -128,4 +128,95 @@ class UserInfoRemoteDataSource {
// Could add cache-busting headers in the future if needed
return getUserInfo();
}
+
+ /// Update User Info
+ ///
+ /// Updates the current user's profile information.
+ ///
+ /// API: POST https://land.dbiz.com/api/method/building_material.building_material.api.user.update_user_info
+ ///
+ /// Request body:
+ /// ```json
+ /// {
+ /// "full_name": "...",
+ /// "date_of_birth": "YYYY-MM-DD",
+ /// "gender": "Male/Female",
+ /// "company_name": "...",
+ /// "tax_code": "...",
+ /// "avatar_base64": null | base64_string,
+ /// "id_card_front_base64": null | base64_string,
+ /// "id_card_back_base64": null | base64_string,
+ /// "certificates_base64": [] | [base64_string, ...]
+ /// }
+ /// ```
+ ///
+ /// Throws:
+ /// - [UnauthorizedException] if user not authenticated (401)
+ /// - [ServerException] if server error occurs (500+)
+ /// - [NetworkException] for other network errors
+ Future updateUserInfo(Map data) async {
+ try {
+ debugPrint('🔵 [UserInfoDataSource] Updating user info...');
+ debugPrint('🔵 [UserInfoDataSource] Data: $data');
+ final startTime = DateTime.now();
+
+ // Make POST request with update data
+ final response = await _dioClient.post