Improve the production frontend 3

This commit is contained in:
Urtzi Alfaro
2025-09-21 11:57:03 +02:00
parent 13ca3e90b4
commit 29065f5337
6 changed files with 13 additions and 590 deletions

View File

@@ -145,6 +145,12 @@
"cashier": "Cajero",
"assistant": "Asistente"
},
"global_roles": {
"user": "Usuario",
"admin": "Administrador",
"manager": "Gestor",
"super_admin": "Super Administrador"
},
"permissions": {
"read": "Lectura",
"write": "Escritura",

View File

@@ -7,6 +7,7 @@ import { useCurrentTenant } from '../../../../stores';
import { useToast } from '../../../../hooks/ui/useToast';
import { useAuthProfile, useUpdateProfile, useChangePassword } from '../../../../api/hooks/auth';
import { subscriptionService, type UsageSummary, type AvailablePlans } from '../../../../api';
import { useTranslation } from 'react-i18next';
interface ProfileFormData {
first_name: string;
@@ -78,6 +79,7 @@ interface NotificationPreferences {
const ProfilePage: React.FC = () => {
const user = useAuthUser();
const { t } = useTranslation('auth');
const { addToast } = useToast();
const { data: profile, isLoading: profileLoading, error: profileError } = useAuthProfile();
@@ -596,6 +598,11 @@ const ProfilePage: React.FC = () => {
{profileData.first_name} {profileData.last_name}
</h1>
<p className="text-text-secondary">{profileData.email}</p>
{user?.role && (
<p className="text-sm text-text-tertiary mt-1">
{t(`global_roles.${user.role}`)}
</p>
)}
<div className="flex items-center gap-2 mt-2">
<div className="w-2 h-2 bg-green-500 rounded-full"></div>
<span className="text-sm text-text-tertiary">En línea</span>