Move console to a relay multi project config

Signed-off-by: Émile Ré <nemile.re@gmail.com>
This commit is contained in:
Émile Ré
2025-12-30 10:37:23 +01:00
committed by Bryan Frimin
parent c1df98cec1
commit 6b2864e160
572 changed files with 6400 additions and 4263 deletions

View File

@@ -10,13 +10,12 @@ import {
Tbody,
Th,
IconChevronDown,
IconTrashCan,
TrButton,
} from "@probo/ui";
import { MeasureBadge } from "@probo/ui/src/Molecules/Badge/MeasureBadge";
import { useTranslate } from "@probo/i18n";
import type { LinkedMeasuresCardFragment$key } from "./__generated__/LinkedMeasuresCardFragment.graphql";
import type { LinkedMeasuresCardFragment$key } from "/__generated__/core/LinkedMeasuresCardFragment.graphql";
import { useFragment } from "react-relay";
import { useMemo, useState } from "react";
import { sprintf } from "@probo/helpers";
@@ -64,7 +63,7 @@ type Props<Params> = {
export function LinkedMeasuresCard<Params>(props: Props<Params>) {
const { __ } = useTranslate();
const [limit, setLimit] = useState<number | null>(
props.variant === "card" ? 4 : null
props.variant === "card" ? 4 : null,
);
const measures = useMemo(() => {
return limit ? props.measures.slice(0, limit) : props.measures;
@@ -129,13 +128,21 @@ export function LinkedMeasuresCard<Params>(props: Props<Params>) {
<Tbody>
{measures.length === 0 && (
<Tr>
<Td colSpan={props.readOnly ? 2 : 3} className="text-center text-txt-secondary">
<Td
colSpan={props.readOnly ? 2 : 3}
className="text-center text-txt-secondary"
>
{__("No measures linked")}
</Td>
</Tr>
)}
{measures.map((measure) => (
<MeasureRow key={measure.id} measure={measure} onClick={onDetach} readOnly={props.readOnly} />
<MeasureRow
key={measure.id}
measure={measure}
onClick={onDetach}
readOnly={props.readOnly}
/>
))}
{variant === "table" && !props.readOnly && (
<LinkedMeasureDialog

View File

@@ -1,59 +0,0 @@
/**
* @generated SignedSource<<b7482b43ce0f4dfab470c35e806acf50>>
* @lightSyntaxTransform
* @nogrep
*/
/* tslint:disable */
/* eslint-disable */
// @ts-nocheck
import { ReaderFragment } from 'relay-runtime';
export type MeasureState = "IMPLEMENTED" | "IN_PROGRESS" | "NOT_APPLICABLE" | "NOT_STARTED";
import { FragmentRefs } from "relay-runtime";
export type LinkedMeasuresCardFragment$data = {
readonly id: string;
readonly name: string;
readonly state: MeasureState;
readonly " $fragmentType": "LinkedMeasuresCardFragment";
};
export type LinkedMeasuresCardFragment$key = {
readonly " $data"?: LinkedMeasuresCardFragment$data;
readonly " $fragmentSpreads": FragmentRefs<"LinkedMeasuresCardFragment">;
};
const node: ReaderFragment = {
"argumentDefinitions": [],
"kind": "Fragment",
"metadata": null,
"name": "LinkedMeasuresCardFragment",
"selections": [
{
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "id",
"storageKey": null
},
{
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "name",
"storageKey": null
},
{
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "state",
"storageKey": null
}
],
"type": "Measure",
"abstractKey": null
};
(node as any).hash = "741a216c02732c1ff97b265ac8dbf39b";
export default node;