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 b82747e83..e56c28ca8 100644 --- a/apps/catalog-admin/components/codes-editor/codes-editor.module.css +++ b/apps/catalog-admin/components/codes-editor/codes-editor.module.css @@ -68,11 +68,6 @@ cursor: pointer; } -.buttonRow { - display: flex; - gap: 20px; -} - .toggleButton { background: none; border: none; @@ -89,10 +84,6 @@ 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 321077938..162370ded 100644 --- a/apps/catalog-admin/components/codes-editor/index.tsx +++ b/apps/catalog-admin/components/codes-editor/index.tsx @@ -213,107 +213,105 @@ export const CodesEditor = ({ codeList: dbCodeList }: Props) => { return ( <> -
- - -
- - data={convertCodeListToTreeNodes(codes)} - idAccessor={(node) => node.value} - selectionFollowsFocus={false} - padding={15} - rowHeight={30} - height={441} - width={453} - onActivate={handleOnClick} - disableEdit + + +
+ + data={convertCodeListToTreeNodes(codes)} + idAccessor={(node) => node.value} + selectionFollowsFocus={false} + padding={15} + rowHeight={30} + height={441} + width={453} + onActivate={handleOnClick} + disableEdit + > + {Node} + + { + createNewCode(); + setIsEditViewOpen(true); + }} + variant='outline' + > + {localization.catalogAdmin.createCode} + +
+
+
+ {isEditViewOpen && ( + +
+

{localization.catalogAdmin.editCode}

+ setIsEditViewOpen(false)} + /> +
+
ID: {selectedCode?.id}
+ +
+ ) => { + updateCodeName('nb', event.target.value); + }} + /> +
+
+ ) => { + updateCodeName('nn', event.target.value); + }} + /> +
+
+ ) => { + updateCodeName('en', event.target.value); + }} + /> +
+
+ -
- -
- - -
-
-
- )} -
+ )} ); };