diff --git a/xroom-dashboard/src/pages/SmsVerification.vue b/xroom-dashboard/src/pages/SmsVerification.vue index 2ad0410..79fec5a 100644 --- a/xroom-dashboard/src/pages/SmsVerification.vue +++ b/xroom-dashboard/src/pages/SmsVerification.vue @@ -171,12 +171,12 @@ export default { // }); if (response.status == 200) { - alert('رمز عبور با موفقیت بازنشانی شد.'); + alert('حد صحیح است'); this.$router.push('/dashboard'); } } catch (error) { console.error('Error resetting password:', error); - alert('خطا در بازنشانی رمز عبور. لطفاً کد یا رمز عبور را بررسی کنید.'); + alert('کد خطا دارد'); } }, }, diff --git a/xroom-dashboard/src/pages/dashboard/EditProfile.vue b/xroom-dashboard/src/pages/dashboard/EditProfile.vue index d2bc885..c57182e 100644 --- a/xroom-dashboard/src/pages/dashboard/EditProfile.vue +++ b/xroom-dashboard/src/pages/dashboard/EditProfile.vue @@ -133,7 +133,7 @@ export default { userProfilePicUrl() { const customer = JSON.parse(localStorage.getItem('customer') || {}); if (!customer.profile_img) return this.defaultProfileImage; - return `http://194.62.43.230:8000/media/${customer.profile_img}`; + return `${customer.profile_img}`; } }, methods: { @@ -145,7 +145,7 @@ export default { first_name: response.data.user.first_name, last_name: response.data.user.last_name, email: response.data.user.email, - userAvatarUrl: this.baseUrl+ "/"+ response.data.customer.profile_img + userAvatarUrl: response.data.customer.profile_img }; } catch (error) { console.error('Error fetching user data:', error); diff --git a/xroom-dashboard/src/pages/dashboard/readyPlayer.vue b/xroom-dashboard/src/pages/dashboard/readyPlayer.vue index af329d1..0094a63 100644 --- a/xroom-dashboard/src/pages/dashboard/readyPlayer.vue +++ b/xroom-dashboard/src/pages/dashboard/readyPlayer.vue @@ -148,6 +148,8 @@ import AppHeader from '@/components/Header.vue'; await this.saveAvatarUrl(json.data.url); alert('آواتار با موفقیت ذخیره شد'); + this.$router.push('/dashboard'); + } catch (error) { console.error('Error saving avatar:', error); alert('خطا در ذخیره آواتار'); @@ -173,7 +175,9 @@ import AppHeader from '@/components/Header.vue'; try { await this.saveAvatarUrl(avatar.src); this.avatarUrl = avatar.src; - alert('آواتار پیش‌فرض با موفقیت انتخاب شد'); + alert('آواتار با موفقیت انتخاب شد'); + this.$router.push('/dashboard'); + } catch (error) { console.error('Error selecting avatar:', error); alert(error.response?.data?.detail || error.message || 'خطا در انتخاب آواتار'); diff --git a/xroom-dashboard/src/pages/dashboard/team.vue b/xroom-dashboard/src/pages/dashboard/team.vue index 17f9858..4a3b583 100644 --- a/xroom-dashboard/src/pages/dashboard/team.vue +++ b/xroom-dashboard/src/pages/dashboard/team.vue @@ -64,22 +64,26 @@
➕ اضافه کردن کاربر جدید
+ +
-
-
{{ user.role }}
-
{{ user.version }}
-
{{ user.email }}
-
{{ user.name }}
- avatar -
- +
+ avatar + +
+ +
@@ -269,21 +273,21 @@ export default { email: 'aminimperator@gmail.com', role: 'نسخه آزمایشی', version: '', - avatar: 'https://via.placeholder.com/60', + avatar: 'https://models.readyplayer.me/681f59760bc631a87ad25172.png', }, { name: 'امین رمضانی', email: 'aminimperator@gmail.com', role: 'مدیر', version: 'نسخه آزمایشی', - avatar: 'https://via.placeholder.com/60', + avatar: 'https://models.readyplayer.me/681f59760bc631a87ad25172.png', }, { name: 'نوید رمضانی', email: 'aminimperator@gmail.com', role: 'مدیر', version: 'نسخه آزمایشی', - avatar: 'https://via.placeholder.com/60', + avatar: 'https://models.readyplayer.me/681f59760bc631a87ad25172.png', } ] , @@ -1328,7 +1332,8 @@ submitNewUser() { background: #fff; border-radius: 16px; box-shadow: 0 2px 10px rgba(0,0,0,0.05); - width: 300px; + width: 440px; + height: 158px; display: flex; flex-direction: column; justify-content: space-between; @@ -1560,5 +1565,94 @@ submitNewUser() { } /* tab 2 */ - + + + + + + + + + + + + + + +.user-card { + background: #fff; + border-radius: 16px; + box-shadow: 0 2px 10px rgba(0,0,0,0.05); + width: 440px; + display: flex; + flex-direction: column; + justify-content: space-between; + padding: 20px; + position: relative; +} + +.user-card-header { + display: flex; + justify-content: space-between; + align-items: flex-start; + gap: 16px; +} + +.user-avatar { + width: 70px; + height: 70px; + border-radius: 50%; + object-fit: cover; + flex-shrink: 0; +} + +.user-info-box { + display: flex; + flex-direction: column; + justify-content: flex-start; + align-items: flex-end; + flex: 1; + text-align: right; + gap: 4px; +} + +.user-name { + font-weight: 700; + font-size: 16px; +} + +.user-email, .user-role, .user-version { + font-size: 14px; + color: #4a5568; +} + +.user-footer { + background: #3a57e8; + color: #fff; + border-radius: 0 0 12px 12px; + padding: 10px; + display: flex; + justify-content: space-between; + align-items: center; + margin-top: 20px; +} + +.user-actions button { + background: none; + border: none; + color: white; + font-size: 16px; + cursor: pointer; +} + + + + + + + + + + + \ No newline at end of file