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 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); }