feat: deal product services

This commit is contained in:
2024-05-18 07:01:08 +03:00
parent 2f589edacc
commit b0cfaf3a8b
13 changed files with 334 additions and 96 deletions

View File

@@ -13,12 +13,14 @@ type Props = Omit<ObjectSelectProps<ServiceSchema>, 'data'> & RestProps;
const ServiceSelectNew: FC<Props> = (props: Props) => {
const {services} = useServicesList();
const data = props.filterType ? services.filter(service => service.serviceType === props.filterType) : services;
const restProps = omit(props, ['filterType']);
return (
<ObjectSelect
{...restProps}
data={data}
groupBy={item => item.category.name}
/>
)
}