Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/DataTable/CategoryLookUp.js
Original file line number Diff line number Diff line change
Expand Up @@ -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];
}
4 changes: 2 additions & 2 deletions src/DataTable/TemplateTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand Down Expand Up @@ -46,7 +46,7 @@ const columns = [
{
accessorKey: "PROTOCOL_CATEGORY_CODE",
header: "Category",
cell: (props) => ontLookup(props.getValue()),
cell: (props) => onLookup(props.getValue()),
},
{
accessorKey: "timestamp",
Expand Down
11 changes: 10 additions & 1 deletion src/StartScreenComp/StartScreenComp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -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);
}
Expand Down
Loading