feat: actions for services and categories

This commit is contained in:
2025-09-28 12:46:57 +04:00
parent 47533ad7f5
commit 61f0a9069b
12 changed files with 178 additions and 88 deletions

View File

@ -6,6 +6,7 @@ import useServicesOuterTableColumns from "@/app/services/components/shared/Servi
import { GroupedServices } from "@/app/services/components/shared/ServicesTable/types/GroupedServices";
import { useServicesContext } from "@/app/services/contexts/ServicesContext";
import BaseTable from "@/components/ui/BaseTable/BaseTable";
import useIsMobile from "@/hooks/utils/useIsMobile";
import { ServiceType } from "@/modules/dealModularEditorTabs/FulfillmentBase/shared/types/service";
type Props = {
@ -14,6 +15,7 @@ type Props = {
const ServicesTable: FC<Props> = ({ serviceType }) => {
const { servicesList } = useServicesContext();
const isMobile = useIsMobile();
const [expandedCategoryIds, setExpandedCategoryIds] = useState<number[]>(
[]
@ -53,6 +55,9 @@ const ServicesTable: FC<Props> = ({ serviceType }) => {
verticalSpacing={"md"}
groups={undefined}
idAccessor={"category.id"}
styles={{
header: { zIndex: 1000 },
}}
rowExpansion={{
allowMultiple: true,
expanded: {
@ -69,6 +74,9 @@ const ServicesTable: FC<Props> = ({ serviceType }) => {
/>
),
}}
style={{
marginInline: isMobile ? "var(--mantine-spacing-xs)" : "0",
}}
/>
);
};