feat: Add localization for staff main tabs and enhance profile UI components
This commit is contained in:
@@ -367,6 +367,15 @@
|
||||
}
|
||||
,
|
||||
"staff": {
|
||||
"main": {
|
||||
"tabs": {
|
||||
"shifts": "Shifts",
|
||||
"payments": "Payments",
|
||||
"home": "Home",
|
||||
"clock_in": "Clock In",
|
||||
"profile": "Profile"
|
||||
}
|
||||
},
|
||||
"home": {
|
||||
"header": {
|
||||
"welcome_back": "Welcome back",
|
||||
|
||||
@@ -367,6 +367,15 @@
|
||||
}
|
||||
,
|
||||
"staff": {
|
||||
"main": {
|
||||
"tabs": {
|
||||
"shifts": "Turnos",
|
||||
"payments": "Pagos",
|
||||
"home": "Inicio",
|
||||
"clock_in": "Marcar Entrada",
|
||||
"profile": "Perfil"
|
||||
}
|
||||
},
|
||||
"home": {
|
||||
"header": {
|
||||
"welcome_back": "Welcome back",
|
||||
@@ -452,15 +461,51 @@
|
||||
"refer": { "title": "Refer a Friend", "page": "/worker-profile" }
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"staff_main": {
|
||||
"tabs": {
|
||||
"shifts": "Shifts",
|
||||
"payments": "Payments",
|
||||
"home": "Home",
|
||||
"clock_in": "Clock In",
|
||||
"profile": "Profile"
|
||||
},
|
||||
"profile": {
|
||||
"header": {
|
||||
"title": "Perfil",
|
||||
"sign_out": "CERRAR SESIÓN"
|
||||
},
|
||||
"reliability_stats": {
|
||||
"shifts": "Turnos",
|
||||
"rating": "Calificación",
|
||||
"on_time": "A Tiempo",
|
||||
"no_shows": "Faltas",
|
||||
"cancellations": "Cancel."
|
||||
},
|
||||
"reliability_score": {
|
||||
"title": "Puntuación de Confiabilidad",
|
||||
"description": "Mantén tu puntuación por encima del 45% para continuar aceptando turnos."
|
||||
},
|
||||
"sections": {
|
||||
"onboarding": "INCORPORACIÓN",
|
||||
"compliance": "CUMPLIMIENTO",
|
||||
"level_up": "MEJORAR NIVEL",
|
||||
"finance": "FINANZAS",
|
||||
"support": "SOPORTE"
|
||||
},
|
||||
"menu_items": {
|
||||
"personal_info": "Información Personal",
|
||||
"emergency_contact": "Contacto de Emergencia",
|
||||
"experience": "Experiencia",
|
||||
"attire": "Vestimenta",
|
||||
"documents": "Documentos",
|
||||
"certificates": "Certificados",
|
||||
"tax_forms": "Formularios Fiscales",
|
||||
"krow_university": "Krow University",
|
||||
"trainings": "Capacitaciones",
|
||||
"leaderboard": "Tabla de Clasificación",
|
||||
"bank_account": "Cuenta Bancaria",
|
||||
"payments": "Pagos",
|
||||
"timecard": "Tarjeta de Tiempo",
|
||||
"faqs": "Preguntas Frecuentes",
|
||||
"privacy_security": "Privacidad y Seguridad",
|
||||
"messages": "Mensajes"
|
||||
},
|
||||
"logout": {
|
||||
"button": "Cerrar Sesión"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart' hide ReadContext;
|
||||
import 'package:flutter_modular/flutter_modular.dart';
|
||||
import 'package:lucide_icons/lucide_icons.dart';
|
||||
import 'package:core_localization/core_localization.dart';
|
||||
import 'package:design_system/design_system.dart';
|
||||
|
||||
@@ -63,7 +62,7 @@ class StaffProfilePage extends StatelessWidget {
|
||||
}
|
||||
|
||||
return SingleChildScrollView(
|
||||
padding: const EdgeInsets.only(bottom: 100),
|
||||
padding: const EdgeInsets.only(bottom: UiConstants.space16),
|
||||
child: Column(
|
||||
children: [
|
||||
ProfileHeader(
|
||||
@@ -99,25 +98,25 @@ class StaffProfilePage extends StatelessWidget {
|
||||
ProfileMenuGrid(
|
||||
children: [
|
||||
ProfileMenuItem(
|
||||
icon: LucideIcons.user,
|
||||
icon: UiIcons.user,
|
||||
label: i18n.menu_items.personal_info,
|
||||
completed: profile.hasPersonalInfo,
|
||||
onTap: () => Modular.to.pushPersonalInfo(),
|
||||
),
|
||||
ProfileMenuItem(
|
||||
icon: LucideIcons.phone,
|
||||
icon: UiIcons.phone,
|
||||
label: i18n.menu_items.emergency_contact,
|
||||
completed: profile.hasEmergencyContact,
|
||||
onTap: () => Modular.to.pushEmergencyContact(),
|
||||
),
|
||||
ProfileMenuItem(
|
||||
icon: LucideIcons.briefcase,
|
||||
icon: UiIcons.briefcase,
|
||||
label: i18n.menu_items.experience,
|
||||
completed: profile.hasExperience,
|
||||
onTap: () => Modular.to.pushExperience(),
|
||||
),
|
||||
ProfileMenuItem(
|
||||
icon: LucideIcons.shirt,
|
||||
icon: UiIcons.user,
|
||||
label: i18n.menu_items.attire,
|
||||
completed: profile.hasAttire,
|
||||
onTap: () => Modular.to.pushAttire(),
|
||||
@@ -130,19 +129,19 @@ class StaffProfilePage extends StatelessWidget {
|
||||
crossAxisCount: 3,
|
||||
children: [
|
||||
ProfileMenuItem(
|
||||
icon: LucideIcons.fileText,
|
||||
icon: UiIcons.file,
|
||||
label: i18n.menu_items.documents,
|
||||
completed: profile.hasDocuments,
|
||||
onTap: () => Modular.to.pushDocuments(),
|
||||
),
|
||||
ProfileMenuItem(
|
||||
icon: LucideIcons.award,
|
||||
icon: UiIcons.shield,
|
||||
label: i18n.menu_items.certificates,
|
||||
completed: profile.hasCertificates,
|
||||
onTap: () => Modular.to.pushCertificates(),
|
||||
),
|
||||
ProfileMenuItem(
|
||||
icon: LucideIcons.fileText,
|
||||
icon: UiIcons.file,
|
||||
label: i18n.menu_items.tax_forms,
|
||||
completed: profile.hasTaxForms,
|
||||
onTap: () => Modular.to.pushTaxForms(),
|
||||
@@ -155,17 +154,17 @@ class StaffProfilePage extends StatelessWidget {
|
||||
crossAxisCount: 3,
|
||||
children: [
|
||||
ProfileMenuItem(
|
||||
icon: LucideIcons.graduationCap,
|
||||
icon: UiIcons.sparkles,
|
||||
label: i18n.menu_items.krow_university,
|
||||
onTap: () => Modular.to.pushKrowUniversity(),
|
||||
),
|
||||
ProfileMenuItem(
|
||||
icon: LucideIcons.bookOpen,
|
||||
icon: UiIcons.briefcase,
|
||||
label: i18n.menu_items.trainings,
|
||||
onTap: () => Modular.to.pushTrainings(),
|
||||
),
|
||||
ProfileMenuItem(
|
||||
icon: LucideIcons.award,
|
||||
icon: UiIcons.target,
|
||||
label: i18n.menu_items.leaderboard,
|
||||
onTap: () => Modular.to.pushLeaderboard(),
|
||||
),
|
||||
@@ -177,17 +176,17 @@ class StaffProfilePage extends StatelessWidget {
|
||||
crossAxisCount: 3,
|
||||
children: [
|
||||
ProfileMenuItem(
|
||||
icon: LucideIcons.building2,
|
||||
icon: UiIcons.building,
|
||||
label: i18n.menu_items.bank_account,
|
||||
onTap: () => Modular.to.pushBankAccount(),
|
||||
),
|
||||
ProfileMenuItem(
|
||||
icon: LucideIcons.creditCard,
|
||||
icon: UiIcons.creditCard,
|
||||
label: i18n.menu_items.payments,
|
||||
onTap: () => Modular.to.navigate('/payments'),
|
||||
),
|
||||
ProfileMenuItem(
|
||||
icon: LucideIcons.clock,
|
||||
icon: UiIcons.clock,
|
||||
label: i18n.menu_items.timecard,
|
||||
onTap: () => Modular.to.pushTimecard(),
|
||||
),
|
||||
@@ -199,17 +198,17 @@ class StaffProfilePage extends StatelessWidget {
|
||||
crossAxisCount: 3,
|
||||
children: [
|
||||
ProfileMenuItem(
|
||||
icon: LucideIcons.helpCircle,
|
||||
icon: UiIcons.help,
|
||||
label: i18n.menu_items.faqs,
|
||||
onTap: () => Modular.to.pushFaqs(),
|
||||
),
|
||||
ProfileMenuItem(
|
||||
icon: LucideIcons.shield,
|
||||
icon: UiIcons.shield,
|
||||
label: i18n.menu_items.privacy_security,
|
||||
onTap: () => Modular.to.pushPrivacy(),
|
||||
),
|
||||
ProfileMenuItem(
|
||||
icon: LucideIcons.messageCircle,
|
||||
icon: UiIcons.messageCircle,
|
||||
label: i18n.menu_items.messages,
|
||||
onTap: () => Modular.to.pushMessages(),
|
||||
),
|
||||
|
||||
@@ -18,12 +18,12 @@ class LogoutButton extends StatelessWidget {
|
||||
return Container(
|
||||
width: double.infinity,
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
color: UiColors.bgPopup,
|
||||
borderRadius: BorderRadius.circular(UiConstants.radiusBase),
|
||||
border: Border.all(color: UiColors.border),
|
||||
),
|
||||
child: Material(
|
||||
color: Colors.transparent,
|
||||
color: const Color(0x00000000),
|
||||
child: InkWell(
|
||||
onTap: onTap,
|
||||
borderRadius: BorderRadius.circular(UiConstants.radiusBase),
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:lucide_icons/lucide_icons.dart';
|
||||
import 'package:core_localization/core_localization.dart';
|
||||
import 'package:design_system/design_system.dart';
|
||||
|
||||
@@ -80,7 +79,7 @@ class ProfileHeader extends StatelessWidget {
|
||||
Container(
|
||||
width: 112,
|
||||
height: 112,
|
||||
padding: const EdgeInsets.all(4),
|
||||
padding: EdgeInsets.all(UiConstants.space1),
|
||||
decoration: BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
gradient: LinearGradient(
|
||||
@@ -155,7 +154,7 @@ class ProfileHeader extends StatelessWidget {
|
||||
],
|
||||
),
|
||||
child: const Icon(
|
||||
LucideIcons.camera,
|
||||
UiIcons.camera,
|
||||
size: 16,
|
||||
color: UiColors.primary,
|
||||
),
|
||||
|
||||
@@ -24,7 +24,7 @@ class ProfileMenuItem extends StatelessWidget {
|
||||
onTap: onTap,
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
color: UiColors.bgPopup,
|
||||
borderRadius: BorderRadius.circular(UiConstants.radiusBase),
|
||||
border: Border.all(color: UiColors.border),
|
||||
),
|
||||
|
||||
@@ -26,7 +26,7 @@ class ReliabilityStatsCard extends StatelessWidget {
|
||||
return Container(
|
||||
padding: EdgeInsets.all(UiConstants.space4),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
color: UiColors.bgPopup,
|
||||
borderRadius: BorderRadius.circular(UiConstants.radiusBase),
|
||||
border: Border.all(color: UiColors.border),
|
||||
boxShadow: [
|
||||
|
||||
@@ -75,35 +75,35 @@ class StaffMainBottomBar extends StatelessWidget {
|
||||
_buildNavItem(
|
||||
index: 0,
|
||||
icon: UiIcons.briefcase,
|
||||
label: t.staff_main.tabs.shifts,
|
||||
label: t.staff.main.tabs.shifts,
|
||||
activeColor: activeColor,
|
||||
inactiveColor: inactiveColor,
|
||||
),
|
||||
_buildNavItem(
|
||||
index: 1,
|
||||
icon: UiIcons.dollar,
|
||||
label: t.staff_main.tabs.payments,
|
||||
label: t.staff.main.tabs.payments,
|
||||
activeColor: activeColor,
|
||||
inactiveColor: inactiveColor,
|
||||
),
|
||||
_buildNavItem(
|
||||
index: 2,
|
||||
icon: UiIcons.home,
|
||||
label: t.staff_main.tabs.home,
|
||||
label: t.staff.main.tabs.home,
|
||||
activeColor: activeColor,
|
||||
inactiveColor: inactiveColor,
|
||||
),
|
||||
_buildNavItem(
|
||||
index: 3,
|
||||
icon: UiIcons.clock,
|
||||
label: t.staff_main.tabs.clock_in,
|
||||
label: t.staff.main.tabs.clock_in,
|
||||
activeColor: activeColor,
|
||||
inactiveColor: inactiveColor,
|
||||
),
|
||||
_buildNavItem(
|
||||
index: 4,
|
||||
icon: UiIcons.users,
|
||||
label: t.staff_main.tabs.profile,
|
||||
label: t.staff.main.tabs.profile,
|
||||
activeColor: activeColor,
|
||||
inactiveColor: inactiveColor,
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user