Skip to content

Commit

Permalink
fixes listing issues tenant templates
Browse files Browse the repository at this point in the history
  • Loading branch information
KelvinTegelaar committed Jan 21, 2025
1 parent ddfd9b7 commit ea38c26
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 18 deletions.
1 change: 0 additions & 1 deletion src/layouts/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,6 @@ export const nativeMenuItems = [
{ title: "Autopilot Devices", path: "/endpoint/autopilot/list-devices" },
{ title: "Add Autopilot Device", path: "/endpoint/autopilot/add-device" },
{ title: "Profiles", path: "/endpoint/autopilot/list-profiles" },
{ title: "Add Profile", path: "/endpoint/autopilot/add-profile" },
{ title: "Status Pages", path: "/endpoint/autopilot/list-status-pages" },
{ title: "Add Status Page", path: "/endpoint/autopilot/add-status-page" },
],
Expand Down
17 changes: 0 additions & 17 deletions src/pages/endpoint/autopilot/add-profile/index.js

This file was deleted.

1 change: 1 addition & 0 deletions src/pages/tenant/standards/list-standards/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ const Page = () => {
"updatedAt",
"updatedBy",
"runManually",
"standards",
]}
queryKey="listStandardTemplates"
/>
Expand Down
8 changes: 8 additions & 0 deletions src/pages/tenant/standards/template.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,14 @@ const Page = () => {
};

const handleAddMultipleStandard = (standardName) => {
//if the standardname contains an array qualifier,e.g standardName[0], strip that away.
const arrayPattern = /(.*)\[(\d+)\]$/;
const match = standardName.match(arrayPattern);
if (match) {
standardName = match[1];
}
console.log("Adding multiple", standardName);

setSelectedStandards((prev) => {
const existingInstances = Object.keys(prev).filter((name) => name.startsWith(standardName));
const newIndex = existingInstances.length;
Expand Down

0 comments on commit ea38c26

Please sign in to comment.