Skip to content
This repository has been archived by the owner on Jun 6, 2024. It is now read-only.

Commit

Permalink
Nombre filtros servicios ajustados a BD
Browse files Browse the repository at this point in the history
  • Loading branch information
adriandrs committed Jun 4, 2024
1 parent 9dcd139 commit 6e8cc79
Showing 1 changed file with 79 additions and 79 deletions.
158 changes: 79 additions & 79 deletions client/src/components/ui/ServiciosYFiltro.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@ const filters = [
id: "Marca",
name: "Tipo de servicio",
options: [
{ value: "ponds", label: "Masajes", checked: false },
{ value: "hidraSense", label: "Faciales", checked: false },
{ value: "savasana", label: "Maquillaje", checked: false },
{ value: "ceraVe", label: "Servicio tradicional", checked: false },
{ value: "cetaphil", label: "Servicio con tecnología", checked: false },
{ value: "mizon", label: "Rejuvenecimiento", checked: false },
{ value: "Maquillaje", label: "Maquillaje", checked: false },
{ value: "Bronceado", label: "Bronceado", checked: false },
{ value: "Tratamientos capilares", label: "Tratamientos capilares", checked: false },
{ value: "Manos y Pies", label: "Manos y Pies", checked: false },
{ value: "Peinados", label: "Peinados", checked: false },
{ value: "Cuidado de Cejas y Pestañas", label: "Cuidado de Cejas y Pestañas", checked: false },
],
},
{
Expand Down Expand Up @@ -259,18 +259,18 @@ const ServiciosYFiltro = ({ servicios, log, idUser, st }) => {
>
{log
? subCategories.map((category) => (
<li key={category.name}>
<a
href={category.href}
onClick={() => {
setCategory(category.label);
}}
className="block px-2 py-3 cursor-pointer"
>
{category.name}
</a>
</li>
))
<li key={category.name}>
<a
href={category.href}
onClick={() => {
setCategory(category.label);
}}
className="block px-2 py-3 cursor-pointer"
>
{category.name}
</a>
</li>
))
: null}
</ul>

Expand Down Expand Up @@ -453,68 +453,68 @@ const ServiciosYFiltro = ({ servicios, log, idUser, st }) => {
<form className="hidden w-64 lg:block">
{log
? subCategories.map((section) => (
<Disclosure
as="div"
key={section.id}
className="py-6 border-b border-gray-200"
>
{({ open }) => (
<>
<h3 className="flow-root -my-3">
<Disclosure.Button className="flex items-center justify-between w-full py-3 text-sm text-gray-400 hover:text-gray-500">
<span className="font-medium text-gray-900">
{section.name}
</span>
<span className="flex items-center ml-6">
{open ? (
<MinusIcon
className="w-5 h-5"
aria-hidden="true"
/>
) : (
<PlusIcon
className="w-5 h-5"
aria-hidden="true"
/>
)}
</span>
</Disclosure.Button>
</h3>
<Disclosure.Panel className="pt-6">
<div className="space-y-4">
{section.options.map((option, optionIdx) => (
<div
key={option.value}
className="flex items-center"
<Disclosure
as="div"
key={section.id}
className="py-6 border-b border-gray-200"
>
{({ open }) => (
<>
<h3 className="flow-root -my-3">
<Disclosure.Button className="flex items-center justify-between w-full py-3 text-sm text-gray-400 hover:text-gray-500">
<span className="font-medium text-gray-900">
{section.name}
</span>
<span className="flex items-center ml-6">
{open ? (
<MinusIcon
className="w-5 h-5"
aria-hidden="true"
/>
) : (
<PlusIcon
className="w-5 h-5"
aria-hidden="true"
/>
)}
</span>
</Disclosure.Button>
</h3>
<Disclosure.Panel className="pt-6">
<div className="space-y-4">
{section.options.map((option, optionIdx) => (
<div
key={option.value}
className="flex items-center"
>
<input
onChange={(e) =>
handleCategoryChange(
option.label,
e.target.checked
)
}
id={`filter-${section.id}-${optionIdx}`}
name={`${section.id}[]`}
defaultValue={option.value}
type="checkbox"
defaultChecked={option.checked}
className="w-4 h-4 border-gray-300 rounded text-rose-400 focus:ring-rose-400 "
/>
<label
htmlFor={`filter-${section.id}-${optionIdx}`}
className="ml-3 text-sm text-gray-600"
>
<input
onChange={(e) =>
handleCategoryChange(
option.label,
e.target.checked
)
}
id={`filter-${section.id}-${optionIdx}`}
name={`${section.id}[]`}
defaultValue={option.value}
type="checkbox"
defaultChecked={option.checked}
className="w-4 h-4 border-gray-300 rounded text-rose-400 focus:ring-rose-400 "
/>
<label
htmlFor={`filter-${section.id}-${optionIdx}`}
className="ml-3 text-sm text-gray-600"
>
{option.label}
</label>
</div>
))}
</div>
</Disclosure.Panel>
</>
)}
</Disclosure>
))
{option.label}
</label>
</div>
))}
</div>
</Disclosure.Panel>
</>
)}
</Disclosure>
))
: null}

<Disclosure as="div" className="py-6 border-b border-gray-200">
Expand Down

0 comments on commit 6e8cc79

Please sign in to comment.