From 95d685f3b072ac888ff0bc5aa41527f89fa48d87 Mon Sep 17 00:00:00 2001 From: Hege Aalvik Date: Fri, 29 Sep 2023 15:08:07 +0200 Subject: [PATCH] fix: css fix --- .../codes-editor/codes-editor.module.css | 9 + .../components/codes-editor/index.tsx | 193 +++++++++--------- 2 files changed, 104 insertions(+), 98 deletions(-) diff --git a/apps/catalog-admin/components/codes-editor/codes-editor.module.css b/apps/catalog-admin/components/codes-editor/codes-editor.module.css index e56c28ca8..b82747e83 100644 --- a/apps/catalog-admin/components/codes-editor/codes-editor.module.css +++ b/apps/catalog-admin/components/codes-editor/codes-editor.module.css @@ -68,6 +68,11 @@ cursor: pointer; } +.buttonRow { + display: flex; + gap: 20px; +} + .toggleButton { background: none; border: none; @@ -84,6 +89,10 @@ border-top-right-radius: 7px; } +.codeListEditor { + padding-bottom: 20px; +} + .headerText { padding-top: 20px; width: 100px; diff --git a/apps/catalog-admin/components/codes-editor/index.tsx b/apps/catalog-admin/components/codes-editor/index.tsx index 162370ded..0e374633d 100644 --- a/apps/catalog-admin/components/codes-editor/index.tsx +++ b/apps/catalog-admin/components/codes-editor/index.tsx @@ -76,11 +76,6 @@ export const CodesEditor = ({ codeList: dbCodeList }: Props) => { }; const updateAndAddCode = (code: Code, codeList?: CodeList) => { - if (code.name.nb === '') { - window.alert(localization.alert.codeMustHaveName); - return; - } - const codeListId = codeList?.id || '0'; const existingCodes = updatedCodes[codeListId] ? [...updatedCodes[codeListId]] : []; const index = existingCodes.findIndex((c) => c.id === code.id); @@ -152,7 +147,7 @@ export const CodesEditor = ({ codeList: dbCodeList }: Props) => { } function FolderIcon({ node }: { node: NodeApi }) { - if (node.isLeaf) return ; + if (node.isLeaf) return ; return ( + + + + + )} + ); };