feat(swagger link): added in prod swagger link to admin panel
This commit is contained in:
@@ -27,6 +27,7 @@ import {
|
||||
CollapsibleTrigger,
|
||||
} from "../../ui/collapsible";
|
||||
import { useSubModuleStore } from "@/lib/store/useSubModuleStore";
|
||||
import { useSettingStore } from "@/lib/store/useSettings";
|
||||
|
||||
const iconMap: any = {
|
||||
ShieldCheck: ShieldCheck,
|
||||
@@ -41,6 +42,9 @@ const iconMap: any = {
|
||||
|
||||
export function AdminSideBar() {
|
||||
const { subModules } = useSubModuleStore();
|
||||
const { settings } = useSettingStore();
|
||||
|
||||
const plantToken = settings.filter((n) => n.name === "plantToken");
|
||||
|
||||
const items = subModules.filter((m) => m.moduleName === "admin");
|
||||
return (
|
||||
@@ -87,7 +91,10 @@ export function AdminSideBar() {
|
||||
>
|
||||
<a
|
||||
href={
|
||||
i.link
|
||||
i.name ===
|
||||
"Swagger"
|
||||
? `https://${plantToken[0].value}prod.alpla.net/application/swagger/index.html`
|
||||
: i.link
|
||||
}
|
||||
target={
|
||||
i.newWindow
|
||||
|
||||
Reference in New Issue
Block a user