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