feat: soft delete (#6576)

Implement soft delete on standards and custom objects.
This is a temporary solution, when we drop `pg_graphql` we should rely
on the `softDelete` functions of TypeORM.

---------

Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
This commit is contained in:
Jérémy M
2024-08-16 21:20:02 +02:00
committed by GitHub
parent 20d84755bb
commit db54469c8a
118 changed files with 1675 additions and 492 deletions

View File

@ -1,9 +1,10 @@
import styled from '@emotion/styled';
const StyledBanner = styled.div`
const StyledBanner = styled.div<{ variant?: BannerVariant }>`
align-items: center;
backdrop-filter: blur(5px);
background: ${({ theme }) => theme.color.blue};
background: ${({ theme, variant }) =>
variant === 'danger' ? theme.color.red : theme.color.blue};
display: flex;
gap: ${({ theme }) => theme.spacing(3)};
height: 40px;
@ -19,4 +20,14 @@ const StyledBanner = styled.div`
box-sizing: border-box;
`;
export { StyledBanner as Banner };
export type BannerVariant = 'danger' | 'default';
export const Banner = ({
variant = 'default',
children,
}: {
variant?: BannerVariant;
children: React.ReactNode;
} & React.HTMLAttributes<HTMLDivElement>) => (
<StyledBanner variant={variant}>{children}</StyledBanner>
);

View File

@ -146,6 +146,7 @@ export {
IconRelationOneToOne,
IconReload,
IconRepeat,
IconRestore,
IconRocket,
IconRotate,
IconSearch,
@ -174,4 +175,5 @@ export {
IconWorld,
IconX,
} from '@tabler/icons-react';
export type { TablerIconsProps } from '@tabler/icons-react';