Mentions légales du service

Skip to content
Snippets Groups Projects

Fix 118: unified colors in the Studio + add more entity types in Pathways

Merged Nelly BARRET requested to merge fix-118 into main
8 files
+ 191
225
Compare changes
  • Side-by-side
  • Inline
Files
8
@@ -16,6 +16,7 @@ import {
import { styled } from "@mui/material/styles";
import { EntityIcon } from "../../utils/entities";
import { useLang } from "../../context/Lang";
const ListIconEntity = styled(ListItemIcon)(() => ({
marginTop: "auto",
@@ -24,10 +25,27 @@ const ListIconEntity = styled(ListItemIcon)(() => ({
marginRight: 15,
}));
const trans = {
labelled: {
en: "labelled",
fr: "nommés",
},
records: {
en: "records",
fr: "tuples"
},
record: {
en: "record",
fr: "tuple"
}
};
function AbstraHeader({ data }) {
let recordLabel = "records";
const { activeLang } = useLang();
let recordLabel = trans.records[activeLang];
if(data.collection_size === 1) {
recordLabel = "record"
recordLabel = trans.record[activeLang]
}
return (
<Box sx={{ display: "flex", backgroundColor: data.color, px: 1 }}>
@@ -36,7 +54,7 @@ function AbstraHeader({ data }) {
</ListIconEntity>
<Box sx={{ my: 0.5 }}>
<Typography variant="h6" component="div" fontSize={18}>
{data.collection_size} {recordLabel} (labelled "{data.label}")
{data.collection_size} {recordLabel} (trans.labelled[activeLang] "{data.label}")
</Typography>
<Typography fontSize={14} color="text.secondary">
{data.categoryLabel}
@@ -118,7 +136,7 @@ function NestedList({ data }) {
function AbstraTable({ id, data }) {
return (
<Box sx={{ p: 0.5, backgroundColor: data.color, borderRadius: "5px" }}>
<NestedList data={data}></NestedList>
<NestedList data={data} ></NestedList>
<Handle type="source" id="source-float" />
<Handle type="target" id="target-float" />
<Handle
Loading