feat: deal product services
This commit is contained in:
@@ -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}
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user