From cbd274dbc9b0adbca7f2993cf422b5a5fb527ece Mon Sep 17 00:00:00 2001 From: sergesoroka Date: Thu, 27 Feb 2025 09:56:40 +0200 Subject: [PATCH 1/2] Fixed: search by human readble category --- src/DataTable/CategoryLookUp.js | 2 +- src/DataTable/TemplateTable.tsx | 4 ++-- src/StartScreenComp/StartScreenComp.tsx | 11 ++++++++++- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/src/DataTable/CategoryLookUp.js b/src/DataTable/CategoryLookUp.js index 5b321e1..e8a46c9 100644 --- a/src/DataTable/CategoryLookUp.js +++ b/src/DataTable/CategoryLookUp.js @@ -7389,6 +7389,6 @@ var lookup = { ENVO_00003895: "Manufactured product/paper product", }; -export function ontLookup(val) { +export function onLookup(val) { return lookup[val] === undefined ? val : lookup[val]; } diff --git a/src/DataTable/TemplateTable.tsx b/src/DataTable/TemplateTable.tsx index 97607f0..03a7a5b 100644 --- a/src/DataTable/TemplateTable.tsx +++ b/src/DataTable/TemplateTable.tsx @@ -12,7 +12,7 @@ import { useEffect, useState } from "react"; import { RowsIcon } from "lucide-react"; import { useSetIsShosen } from "../store/store"; -import { ontLookup } from "./CategoryLookUp"; +import { onLookup } from "./CategoryLookUp"; import SortingIcon from "@/IconsComponents/SortingIcon"; const columns = [ @@ -46,7 +46,7 @@ const columns = [ { accessorKey: "PROTOCOL_CATEGORY_CODE", header: "Category", - cell: (props) => ontLookup(props.getValue()), + cell: (props) => onLookup(props.getValue()), }, { accessorKey: "timestamp", diff --git a/src/StartScreenComp/StartScreenComp.tsx b/src/StartScreenComp/StartScreenComp.tsx index b52b90b..5981a0b 100644 --- a/src/StartScreenComp/StartScreenComp.tsx +++ b/src/StartScreenComp/StartScreenComp.tsx @@ -4,6 +4,8 @@ import { Navigate } from "react-router-dom"; import MakeCopyDialog from "../DialogComp/MakeCopyDialog"; import Notification from "../DialogComp/Notification"; +import { onLookup } from "../DataTable/CategoryLookUp"; + import LogoBar from "../MenuBar/LogoBar"; import Button from "../ui/Button"; import config from "../utils/config"; @@ -53,9 +55,16 @@ export default function StartScreenComp({}) { cachePolicy: "no-cache", }); + const mappedCategoryData = + data && + data.template.map((item) => ({ + ...item, + PROTOCOL_CATEGORY_CODE: onLookup(item["PROTOCOL_CATEGORY_CODE"]), + })); + const templateData = []; data && - data.template.map((item) => { + mappedCategoryData.map((item) => { if (mode == "Finalized" && item.template_status == "FINALIZED") { return templateData.push(item); } From 5cd4ae8c42f43e97b4f9dc3d2309f0ee15984785 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 24 Feb 2025 20:14:03 +0000 Subject: [PATCH 2/2] Bump actions/upload-artifact from 4.6.0 to 4.6.1 Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4.6.0 to 4.6.1. - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](https://github.com/actions/upload-artifact/compare/v4.6.0...v4.6.1) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- .github/workflows/docker-publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 676ed88..8569446 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -113,7 +113,7 @@ jobs: tags: ${{ steps.meta.outputs.tags }} - name: Upload the built image as artifact for download - uses: actions/upload-artifact@v4.6.0 + uses: actions/upload-artifact@v4.6.1 with: name: template-designer.tar path: template-designer.tar