diff --git a/client/src/pages/contact-contributionbyobject-page/components/message-preview.tsx b/client/src/pages/contact-contributionbyobject-page/components/message-preview.tsx index d96c815..01644ed 100644 --- a/client/src/pages/contact-contributionbyobject-page/components/message-preview.tsx +++ b/client/src/pages/contact-contributionbyobject-page/components/message-preview.tsx @@ -108,7 +108,7 @@ const MessagePreview: React.FC = ({ )} - {["structures", "publications", "persons"].includes( + {["structures", "publications", "persons", "network"].includes( data?.objectType ) && ( @@ -172,6 +172,15 @@ const MessagePreview: React.FC = ({ )} + {data.objectType === "network" && ( + + Sur scanR + + )} )} diff --git a/client/src/utils/index.tsx b/client/src/utils/index.tsx index 4333280..baff7bb 100644 --- a/client/src/utils/index.tsx +++ b/client/src/utils/index.tsx @@ -16,6 +16,9 @@ export const BadgeColor = ({ type }) => { case "patent": badgeColor = "green-tilleul-verveine"; break; + case "network": + badgeColor = "orange-terre-battue"; + break; default: badgeColor = "purple-glycine"; } @@ -78,7 +81,9 @@ export const TypeLabel = ({ type }) => { case "projects": typeLabel = "Projets"; break; - + case "network": + typeLabel = "Network"; + break; default: typeLabel = ""; } @@ -103,7 +108,9 @@ export const typeIcon = ({ icon }) => { case "projects": typeIcon = "recycle-fill"; break; - + case "network": + typeIcon = "git-branch-line"; + break; default: typeIcon = ""; } diff --git a/server/schemas/post/contributionByObject.ts b/server/schemas/post/contributionByObject.ts index ff0fb4d..c253cb6 100644 --- a/server/schemas/post/contributionByObject.ts +++ b/server/schemas/post/contributionByObject.ts @@ -13,8 +13,9 @@ export const postContributionObjectSchema = t.Object( publications: "publications", project: "project", patent: "patent", + network: "network", }), extra: t.Optional(t.Record(t.String(), t.String())), }, { additionalProperties: false } -); +)