feat(settings): add domicilios and tarifas toggles in admin panel
Both flags are read by prosappweb from /settings to enable/disable delivery service and rate display. Saves via the existing PATCH /settings. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
4d98c7cb70
commit
1e0de51ec5
@@ -315,6 +315,37 @@ export default function SettingsPage() {
|
||||
</CardContent>
|
||||
</Card>
|
||||
|
||||
<Card>
|
||||
<CardHeader>
|
||||
<CardTitle className="text-base">Funcionalidades de la app</CardTitle>
|
||||
<CardDescription>Activa o desactiva funciones para todos los usuarios.</CardDescription>
|
||||
</CardHeader>
|
||||
<CardContent className="space-y-4">
|
||||
{[
|
||||
{ key: 'domicilios', label: 'Servicio a domicilio', description: 'Permite que los profesionales ofrezcan y los usuarios soliciten servicios a domicilio.' },
|
||||
{ key: 'tarifas', label: 'Mostrar tarifas', description: 'Muestra las tarifas de los profesionales en su perfil y en las búsquedas.' },
|
||||
].map(({ key, label, description }) => (
|
||||
<div key={key} className="flex items-center justify-between gap-4 py-1">
|
||||
<div>
|
||||
<p className="text-sm font-medium">{label}</p>
|
||||
<p className="text-xs text-muted-foreground">{description}</p>
|
||||
</div>
|
||||
<div className="flex items-center gap-3 shrink-0">
|
||||
<button
|
||||
onClick={() => setG(key, !global[key])}
|
||||
className={`relative inline-flex h-6 w-11 items-center rounded-full transition-colors ${global[key] ? 'bg-[#42A4EF]' : 'bg-muted-foreground/30'}`}
|
||||
>
|
||||
<span className={`inline-block h-4 w-4 transform rounded-full bg-white shadow transition-transform ${global[key] ? 'translate-x-6' : 'translate-x-1'}`} />
|
||||
</button>
|
||||
<Badge variant={global[key] ? 'default' : 'secondary'} className={global[key] ? 'bg-[#42A4EF]' : ''}>
|
||||
{global[key] ? 'Activo' : 'Inactivo'}
|
||||
</Badge>
|
||||
</div>
|
||||
</div>
|
||||
))}
|
||||
</CardContent>
|
||||
</Card>
|
||||
|
||||
<Card>
|
||||
<CardHeader>
|
||||
<CardTitle className="text-base">Modo mantenimiento</CardTitle>
|
||||
|
||||
Reference in New Issue
Block a user