From 797f6c238377a656bebde8c6c0af0acd15a251dc Mon Sep 17 00:00:00 2001 From: Rafiafrzl Date: Tue, 23 Dec 2025 20:10:33 +0700 Subject: [PATCH 1/4] refactor: clean up comments and streamline payload handling in user detail form --- src/pages/contact/component/ListContact.jsx | 8 ++------ src/pages/user/component/DetailUser.jsx | 19 ++++--------------- 2 files changed, 6 insertions(+), 21 deletions(-) diff --git a/src/pages/contact/component/ListContact.jsx b/src/pages/contact/component/ListContact.jsx index 84ab232..cc443b8 100644 --- a/src/pages/contact/component/ListContact.jsx +++ b/src/pages/contact/component/ListContact.jsx @@ -267,9 +267,6 @@ const ListContact = memo(function ListContact(props) { } } - // Backend doesn't support is_active filter or order parameter - // Contact hanya supports: criteria, name, code, limit, page - const queryParams = new URLSearchParams(); Object.entries(searchParams).forEach(([key, value]) => { if (value !== '' && value !== null && value !== undefined) { @@ -309,11 +306,10 @@ const ListContact = memo(function ListContact(props) { // Listen for saved contact data useEffect(() => { if (props.lastSavedContact) { - fetchContacts(); // Refetch all contacts when data is saved + fetchContacts(); } }, [props.lastSavedContact]); - // Get contacts (already filtered by backend) const getFilteredContacts = () => { return filteredContacts; }; @@ -326,7 +322,7 @@ const ListContact = memo(function ListContact(props) { const showAddModal = () => { props.setSelectedData(null); props.setActionMode('add'); - // Pass the current active tab to determine contact type + props.setContactType?.(activeTab); }; diff --git a/src/pages/user/component/DetailUser.jsx b/src/pages/user/component/DetailUser.jsx index 1304fae..e829949 100644 --- a/src/pages/user/component/DetailUser.jsx +++ b/src/pages/user/component/DetailUser.jsx @@ -220,32 +220,24 @@ const DetailUser = (props) => { // For update mode: only send email if it has changed if (FormData.user_id) { - // Only include email if it has changed from original if (FormData.user_email !== originalEmail) { payload.user_email = FormData.user_email; } - // Add is_active for update mode + payload.is_active = FormData.is_active; } else { - // For create mode: always send email payload.user_email = FormData.user_email; } - // Only add role_id if it exists (backend requires number >= 1, no null) if (FormData.role_id) { payload.role_id = FormData.role_id; } // Add password and name for new user (create mode) if (!FormData.user_id) { - payload.user_name = FormData.user_name; // Username only for create - payload.user_password = FormData.password; // Backend expects 'user_password' - // Don't send confirmPassword, is_sa for create + payload.user_name = FormData.user_name; + payload.user_password = FormData.password; } - // For update mode: - // - Don't send 'user_name' (username is immutable) - // - is_active is now sent for update mode - // - Only send email if it has changed try { console.log('Payload being sent:', payload); @@ -261,7 +253,6 @@ const DetailUser = (props) => { // Check if response is successful if (response && (response.statusCode === 200 || response.statusCode === 201)) { - // If in edit mode and newPassword is provided, change password if (FormData.user_id && FormData.newPassword) { try { const passwordResponse = await changePassword( @@ -1146,9 +1137,7 @@ const DetailUser = (props) => { ))} {errors.role_id && ( - - {errors.role_id} - + {errors.role_id} )} From beb8ccbaeeb41e7420b14a2a85e4479ed4de88ae Mon Sep 17 00:00:00 2001 From: Rafiafrzl Date: Tue, 23 Dec 2025 22:10:11 +0700 Subject: [PATCH 2/4] feat: integration notification functionality and user history fetching --- src/api/notification.jsx | 12 +- .../component/ListNotification.jsx | 175 ++++++++++++------ .../IndexNotificationDetail.jsx | 105 +++++++---- 3 files changed, 199 insertions(+), 93 deletions(-) diff --git a/src/api/notification.jsx b/src/api/notification.jsx index 2e04cf8..67daa9a 100644 --- a/src/api/notification.jsx +++ b/src/api/notification.jsx @@ -46,10 +46,20 @@ const getNotificationLogByNotificationId = async (notificationId) => { return response.data; }; +// Resend notification to specific user +const resendNotificationToUser = async (notificationId, userId) => { + const response = await SendRequest({ + method: 'post', + prefix: `notification/${notificationId}/resend/${userId}`, + }); + return response.data; +}; + export { getAllNotification, getNotificationById, getNotificationDetail, createNotificationLog, - getNotificationLogByNotificationId + getNotificationLogByNotificationId, + resendNotificationToUser, }; diff --git a/src/pages/notification/component/ListNotification.jsx b/src/pages/notification/component/ListNotification.jsx index a959cd9..88df8de 100644 --- a/src/pages/notification/component/ListNotification.jsx +++ b/src/pages/notification/component/ListNotification.jsx @@ -38,7 +38,11 @@ import { SearchOutlined, } from '@ant-design/icons'; import { useNavigate, Link as RouterLink } from 'react-router-dom'; -import { getAllNotification, getNotificationLogByNotificationId } from '../../../api/notification'; +import { + getAllNotification, + getNotificationLogByNotificationId, + getNotificationDetail, +} from '../../../api/notification'; const { Text, Paragraph, Link: AntdLink } = Typography; @@ -77,31 +81,6 @@ const transformNotificationData = (apiData) => { })); }; -// Dummy data untuk user history -const userHistoryData = [ - { - id: '1', - name: 'John Doe', - phone: '081234567890', - status: 'Delivered', - timestamp: '04-11-2025 11:40 WIB', - }, - { - id: '2', - name: 'Jane Smith', - phone: '087654321098', - status: 'Delivered', - timestamp: '04-11-2025 11:41 WIB', - }, - { - id: '3', - name: 'Peter Jones', - phone: '082345678901', - status: 'Delivered', - timestamp: '04-11-2025 11:42 WIB', - }, -]; - const ListNotification = memo(function ListNotification(props) { const [notifications, setNotifications] = useState([]); const [activeTab, setActiveTab] = useState('all'); @@ -113,6 +92,8 @@ const ListNotification = memo(function ListNotification(props) { const [selectedNotification, setSelectedNotification] = useState(null); const [logHistoryData, setLogHistoryData] = useState([]); const [logLoading, setLogLoading] = useState(false); + const [userHistoryData, setUserHistoryData] = useState([]); + const [userLoading, setUserLoading] = useState(false); const [pagination, setPagination] = useState({ current_page: 1, current_limit: 10, @@ -290,6 +271,42 @@ const ListNotification = memo(function ListNotification(props) { } }; + // Fetch user history from API + const fetchUserHistory = async (notificationId) => { + try { + setUserLoading(true); + + const response = await getNotificationDetail(notificationId); + + if (response && response.data && response.data.users) { + // Transform API data to component format + const transformedUsers = response.data.users.map((user) => ({ + id: user.notification_error_user_id.toString(), + name: user.contact_name, + phone: user.contact_phone, + status: user.is_send ? 'Delivered' : 'Pending', + timestamp: user.created_at + ? new Date(user.created_at).toLocaleString('id-ID', { + day: '2-digit', + month: '2-digit', + year: 'numeric', + hour: '2-digit', + minute: '2-digit', + }) + ' WIB' + : 'N/A', + })); + setUserHistoryData(transformedUsers); + } else { + setUserHistoryData([]); + } + } catch (err) { + console.error('Error fetching user history:', err); + setUserHistoryData([]); // Set empty array on error + } finally { + setUserLoading(false); + } + }; + const tabButtonStyle = (isActive) => ({ padding: '12px 16px', border: 'none', @@ -467,8 +484,18 @@ const ListNotification = memo(function ListNotification(props) { border: '1px solid #1890ff', borderRadius: '4px', }} - onClick={(e) => { + onClick={async (e) => { e.stopPropagation(); + + setSelectedNotification(notification); + + // Extract notification ID from the notification object + const notificationId = + notification.id.split('-')[1]; + + // Fetch user history for the selected notification + await fetchUserHistory(notificationId); + setModalContent('user'); }} /> @@ -535,37 +562,69 @@ const ListNotification = memo(function ListNotification(props) { const renderUserHistory = () => ( <> - - {userHistoryData.map((user) => ( - - - - - {user.name} - | - - {user.phone} - - | - - - - - - - Success Delivered at {user.timestamp} - - - - - - - - - ))} - + {userLoading ? ( +
+ +
+ ) : ( + + {userHistoryData.map((user) => ( + + + + + {user.name} + | + + {user.phone} + + | + + + + + {user.status === 'Delivered' ? ( + + ) : ( + + )} + + {user.status === 'Delivered' + ? 'Success Delivered at' + : 'Status '}{' '} + {user.timestamp} + + + + + + + + + ))} + {userHistoryData.length === 0 && ( +
+ No user history available +
+ )} +
+ )} ); diff --git a/src/pages/notificationDetail/IndexNotificationDetail.jsx b/src/pages/notificationDetail/IndexNotificationDetail.jsx index 1a43f09..a3eb466 100644 --- a/src/pages/notificationDetail/IndexNotificationDetail.jsx +++ b/src/pages/notificationDetail/IndexNotificationDetail.jsx @@ -38,6 +38,7 @@ import { getNotificationDetail, createNotificationLog, getNotificationLogByNotificationId, + resendNotificationToUser, } from '../../api/notification'; const { Content } = Layout; @@ -94,38 +95,21 @@ const transformNotificationData = (apiData) => { device_location: apiData.device_location, brand_name: apiData.brand_name, }, + users: apiData.users || [], }; }; -// Dummy data baru untuk user history -const getDummyUsers = (notification) => { - if (!notification) return []; - return [ - { - id: '1', - name: 'John Doe', - phone: '081234567890', - status: 'delivered', - }, - { - id: '2', - name: 'Jane Smith', - phone: '082345678901', - status: 'sent', - }, - { - id: '3', - name: 'Bob Johnson', - phone: '083456789012', - status: 'failed', - }, - { - id: '4', - name: 'Alice Brown', - phone: '084567890123', - status: 'delivered', - }, - ]; +// Function to get actual users from notification data +const getUsersFromNotification = (notification) => { + if (!notification || !notification.users) return []; + + return notification.users.map((user) => ({ + id: user.notification_error_user_id.toString(), + name: user.contact_name, + phone: user.contact_phone, + status: user.is_send ? 'sent' : 'pending', + loading: user.loading || false, + })); }; const getStatusTag = (status) => { @@ -469,7 +453,7 @@ const NotificationDetailTab = (props) => { size={2} style={{ width: '100%' }} > - {getDummyUsers(notification).map((user) => ( + {getUsersFromNotification(notification).map((user) => ( { type="primary" icon={} size="small" - onClick={(e) => { + loading={user.loading} + onClick={async (e) => { e.stopPropagation(); - console.log( - `Resend to ${user.name}` - ); + const userId = parseInt(user.id); + try { + // Update user status to show loading + const updatedUsers = notification.users.map(u => + u.notification_error_user_id === userId + ? { ...u, loading: true } + : u + ); + setNotification({ + ...notification, + users: updatedUsers + }); + + // Call the resend API + const response = await resendNotificationToUser( + notification.notification_error_id, + userId + ); + + if (response && response.statusCode === 200) { + message.success(`Notification resent to ${user.name}`); + + // Update user status + const updatedUsersAfterSuccess = notification.users.map(u => + u.notification_error_user_id === userId + ? { + ...u, + is_send: true, + status: 'sent', + loading: false + } + : { ...u, loading: false } + ); + setNotification({ + ...notification, + users: updatedUsersAfterSuccess + }); + } else { + throw new Error(response?.message || 'Failed to resend notification'); + } + } catch (error) { + console.error('Error resending notification:', error); + message.error(error.message || 'Failed to resend notification'); + + // Reset loading state + const resetUsers = notification.users.map(u => + u.notification_error_user_id === userId + ? { ...u, loading: false } + : u + ); + setNotification({ + ...notification, + users: resetUsers + }); + } }} > Resend From 167abcaa438f6e468a8795b07c4bd7af83700fde Mon Sep 17 00:00:00 2001 From: Rafiafrzl Date: Wed, 24 Dec 2025 11:51:39 +0700 Subject: [PATCH 3/4] refactor: enhance notification log layout and styling for better readability --- .../component/ListNotification.jsx | 181 ++++++++++-------- 1 file changed, 96 insertions(+), 85 deletions(-) diff --git a/src/pages/notification/component/ListNotification.jsx b/src/pages/notification/component/ListNotification.jsx index 88df8de..9889007 100644 --- a/src/pages/notification/component/ListNotification.jsx +++ b/src/pages/notification/component/ListNotification.jsx @@ -639,97 +639,108 @@ const ListNotification = memo(function ListNotification(props) { Tidak ada log history ) : ( -
- {/* Garis vertikal yang menyambung */} -
+
+
+ {/* Garis vertikal yang menyambung */} +
- {logHistoryData.map((log, index) => ( - - {/* Kolom Kiri: Branch/Timeline */} - ( + -
- + > +
+ - {/* Kolom Kanan: Card */} - - - - - - - - - Added at {log.timestamp} - + {/* Kolom Kanan: Card */} + + + + + + + + + Added at {log.timestamp} + + +
+ Added by: {log.addedBy.name} + + {log.addedBy.phone} + +
-
- Added by: {log.addedBy.name} - - {log.addedBy.phone} - -
-
- - - - {log.description} - - -
-
- -
- ))} + + + + {log.description} + + +
+ + + + ))} +
)} From b6d941ba2d3e3c9b31d556cd1cbc12e2a7717b5c Mon Sep 17 00:00:00 2001 From: vinix Date: Mon, 29 Dec 2025 10:58:03 +0700 Subject: [PATCH 4/4] refactor: comment out console logs for cleaner production code --- src/components/Global/ApiRequest.jsx | 29 +++++++------------ .../component/DetailPlantSubSection.jsx | 26 ++++++++++------- .../master/shift/component/DetailShift.jsx | 6 ++-- .../sparepart/component/DetailSparepart.jsx | 15 ++++++---- src/pages/master/unit/component/ListUnit.jsx | 2 +- .../user/component/ChangePasswordModal.jsx | 2 +- src/pages/user/component/DetailUser.jsx | 14 ++++----- 7 files changed, 47 insertions(+), 47 deletions(-) diff --git a/src/components/Global/ApiRequest.jsx b/src/components/Global/ApiRequest.jsx index 2a6fedd..73a9a78 100644 --- a/src/components/Global/ApiRequest.jsx +++ b/src/components/Global/ApiRequest.jsx @@ -30,18 +30,18 @@ instance.interceptors.response.use( originalRequest._retry = true; try { - console.log('🔄 Refresh token dipanggil...'); + // console.log('🔄 Refresh token dipanggil...'); const refreshRes = await refreshApi.post('/auth/refresh-token'); const newAccessToken = refreshRes.data.data.accessToken; localStorage.setItem('token', newAccessToken); - console.log('✅ Token refreshed successfully'); + // console.log('✅ Token refreshed successfully'); // update token di header instance.defaults.headers.common['Authorization'] = `Bearer ${newAccessToken}`; originalRequest.headers['Authorization'] = `Bearer ${newAccessToken}`; - console.log('🔁 Retrying original request...'); + // console.log('🔁 Retrying original request...'); return instance(originalRequest); } catch (refreshError) { console.error( @@ -81,24 +81,24 @@ async function ApiRequest({ method = 'GET', params = {}, prefix = '/', token = t rawToken = localStorage.getItem('token'); // console.log(`localStorage: ${rawToken}`); } - + if (token && rawToken) { const cleanToken = rawToken.replace(/"/g, ''); request.headers['Authorization'] = `Bearer ${cleanToken}`; - console.log('🔐 Sending request with token:', cleanToken.substring(0, 20) + '...'); + // console.log('🔐 Sending request with token:', cleanToken.substring(0, 20) + '...'); } else { console.warn('⚠️ No token found in localStorage'); } - console.log('📤 API Request:', { method, url: prefix, hasToken: !!rawToken }); + // console.log('📤 API Request:', { method, url: prefix, hasToken: !!rawToken }); try { const response = await instance(request); - console.log('✅ API Response:', { - url: prefix, - status: response.status, - statusCode: response.data?.statusCode, - }); + // console.log('✅ API Response:', { + // url: prefix, + // status: response.status, + // statusCode: response.data?.statusCode, + // }); return { ...response, error: false }; } catch (error) { const status = error?.response?.status || 500; @@ -143,17 +143,10 @@ async function cekError(status, message = '') { const SendRequest = async (queryParams) => { try { const response = await ApiRequest(queryParams); - console.log('📦 SendRequest response:', { - hasError: response.error, - status: response.status, - statusCode: response.data?.statusCode, - data: response.data, - }); // If ApiRequest returned error flag, return error structure if (response.error) { const errorMsg = response.data?.message || response.statusText || 'Request failed'; - console.error('❌ SendRequest error response:', errorMsg); // Return consistent error structure instead of empty array return { diff --git a/src/pages/master/plantSubSection/component/DetailPlantSubSection.jsx b/src/pages/master/plantSubSection/component/DetailPlantSubSection.jsx index 5c942a1..458771a 100644 --- a/src/pages/master/plantSubSection/component/DetailPlantSubSection.jsx +++ b/src/pages/master/plantSubSection/component/DetailPlantSubSection.jsx @@ -38,7 +38,7 @@ const DetailPlantSubSection = (props) => { return; } - console.log(`📝 Input change: ${name} = ${value}`); + // console.log(`📝 Input change: ${name} = ${value}`); if (name) { setFormData((prev) => ({ @@ -74,16 +74,20 @@ const DetailPlantSubSection = (props) => { return; try { - console.log('💾 Current formData before save:', formData); + // console.log('💾 Current formData before save:', formData); const payload = { plant_sub_section_name: formData.plant_sub_section_name, - plant_sub_section_description: (formData.plant_sub_section_description && formData.plant_sub_section_description.trim() !== '') ? formData.plant_sub_section_description : ' ', + plant_sub_section_description: + formData.plant_sub_section_description && + formData.plant_sub_section_description.trim() !== '' + ? formData.plant_sub_section_description + : ' ', table_name_value: formData.table_name_value, // Fix field name is_active: formData.is_active, }; - console.log('📤 Payload to be sent:', payload); + // console.log('📤 Payload to be sent:', payload); const response = props.actionMode === 'edit' @@ -126,17 +130,17 @@ const DetailPlantSubSection = (props) => { }; useEffect(() => { - console.log('🔄 Modal state changed:', { - showModal: props.showModal, - actionMode: props.actionMode, - selectedData: props.selectedData, - }); + // console.log('🔄 Modal state changed:', { + // showModal: props.showModal, + // actionMode: props.actionMode, + // selectedData: props.selectedData, + // }); if (props.selectedData) { - console.log('📋 Setting form data from selectedData:', props.selectedData); + // console.log('📋 Setting form data from selectedData:', props.selectedData); setFormData(props.selectedData); } else { - console.log('📋 Resetting to default data'); + // console.log('📋 Resetting to default data'); setFormData(defaultData); } }, [props.showModal, props.selectedData, props.actionMode]); diff --git a/src/pages/master/shift/component/DetailShift.jsx b/src/pages/master/shift/component/DetailShift.jsx index ab2d3bc..ec728d4 100644 --- a/src/pages/master/shift/component/DetailShift.jsx +++ b/src/pages/master/shift/component/DetailShift.jsx @@ -112,9 +112,9 @@ const DetailShift = (props) => { is_active: formData.is_active, }; - console.log('Payload yang dikirim:', payload); - console.log('Type start_time:', typeof payload.start_time, payload.start_time); - console.log('Type end_time:', typeof payload.end_time, payload.end_time); + // console.log('Payload yang dikirim:', payload); + // console.log('Type start_time:', typeof payload.start_time, payload.start_time); + // console.log('Type end_time:', typeof payload.end_time, payload.end_time); const response = props.actionMode === 'edit' diff --git a/src/pages/master/sparepart/component/DetailSparepart.jsx b/src/pages/master/sparepart/component/DetailSparepart.jsx index d68c864..85482b6 100644 --- a/src/pages/master/sparepart/component/DetailSparepart.jsx +++ b/src/pages/master/sparepart/component/DetailSparepart.jsx @@ -95,11 +95,11 @@ const DetailSparepart = (props) => { const newFile = fileList.length > 0 ? fileList[0] : null; if (newFile && newFile.originFileObj) { - console.log('Uploading file:', newFile.originFileObj); + // console.log('Uploading file:', newFile.originFileObj); const uploadResponse = await uploadFile(newFile.originFileObj, 'images'); // Log untuk debugging - console.log('Upload response:', uploadResponse); + // console.log('Upload response:', uploadResponse); // Cek berbagai kemungkinan struktur respons dari API let uploadedUrl = null; @@ -169,7 +169,7 @@ const DetailSparepart = (props) => { } if (uploadedUrl) { - console.log('Successfully extracted image URL:', uploadedUrl); + // console.log('Successfully extracted image URL:', uploadedUrl); imageUrl = uploadedUrl; } else { console.error('Upload response structure:', uploadResponse); @@ -209,7 +209,10 @@ const DetailSparepart = (props) => { sparepart_name: formData.sparepart_name, // Wajib }; - payload.sparepart_description = (formData.sparepart_description && formData.sparepart_description.trim() !== '') ? formData.sparepart_description : ' '; + payload.sparepart_description = + formData.sparepart_description && formData.sparepart_description.trim() !== '' + ? formData.sparepart_description + : ' '; if (formData.sparepart_model && formData.sparepart_model.trim() !== '') { payload.sparepart_model = formData.sparepart_model; } @@ -233,13 +236,13 @@ const DetailSparepart = (props) => { payload.sparepart_foto = imageUrl; } - console.log('Sending payload:', payload); + // console.log('Sending payload:', payload); const response = formData.sparepart_id ? await updateSparepart(formData.sparepart_id, payload) : await createSparepart(payload); - console.log('API response:', response); + // console.log('API response:', response); if (response && (response.statusCode === 200 || response.statusCode === 201)) { NotifOk({ diff --git a/src/pages/master/unit/component/ListUnit.jsx b/src/pages/master/unit/component/ListUnit.jsx index 2181f64..ada8871 100644 --- a/src/pages/master/unit/component/ListUnit.jsx +++ b/src/pages/master/unit/component/ListUnit.jsx @@ -164,7 +164,7 @@ const ListUnit = memo(function ListUnit(props) { const handleDelete = async (param) => { try { const response = await deleteUnit(param.unit_id); - console.log('deleteUnit response:', response); + // console.log('deleteUnit response:', response); if (response.statusCode === 200) { NotifAlert({ diff --git a/src/pages/user/component/ChangePasswordModal.jsx b/src/pages/user/component/ChangePasswordModal.jsx index 826359b..28ccff1 100644 --- a/src/pages/user/component/ChangePasswordModal.jsx +++ b/src/pages/user/component/ChangePasswordModal.jsx @@ -115,7 +115,7 @@ const ChangePasswordModal = (props) => { try { const response = await changePassword(props.selectedUser.user_id, formData.newPassword); - console.log('Change Password Response:', response); + // console.log('Change Password Response:', response); if (response && response.statusCode === 200) { NotifOk({ diff --git a/src/pages/user/component/DetailUser.jsx b/src/pages/user/component/DetailUser.jsx index e829949..c58db9b 100644 --- a/src/pages/user/component/DetailUser.jsx +++ b/src/pages/user/component/DetailUser.jsx @@ -240,7 +240,7 @@ const DetailUser = (props) => { } try { - console.log('Payload being sent:', payload); + // console.log('Payload being sent:', payload); let response; if (!FormData.user_id) { @@ -249,7 +249,7 @@ const DetailUser = (props) => { response = await updateUser(FormData.user_id, payload); } - console.log('Save User Response:', response); + // console.log('Save User Response:', response); // Check if response is successful if (response && (response.statusCode === 200 || response.statusCode === 201)) { @@ -376,9 +376,9 @@ const DetailUser = (props) => { search: '', }); - console.log('Fetching roles with params:', queryParams.toString()); + // console.log('Fetching roles with params:', queryParams.toString()); const response = await getAllRole(queryParams); - console.log('Fetched roles response:', response); + // console.log('Fetched roles response:', response); // Handle different response structures if (response && response.data) { @@ -399,7 +399,7 @@ const DetailUser = (props) => { } setRoleList(roles); - console.log('Setting role list:', roles); + // console.log('Setting role list:', roles); } else { // Add mock data as fallback console.warn('No response data, using mock data'); @@ -409,7 +409,7 @@ const DetailUser = (props) => { { role_id: 3, role_name: 'User', role_level: 3 }, ]; setRoleList(mockRoles); - console.log('Setting mock role list:', mockRoles); + // console.log('Setting mock role list:', mockRoles); } } catch (error) { console.error('Error fetching roles:', error); @@ -420,7 +420,7 @@ const DetailUser = (props) => { { role_id: 3, role_name: 'User', role_level: 3 }, ]; setRoleList(mockRoles); - console.log('Setting mock role list due to error:', mockRoles); + // console.log('Setting mock role list due to error:', mockRoles); // Only show error notification if we don't have fallback data if (process.env.NODE_ENV === 'development') {