Compare commits

...

6 Commits

6 changed files with 20 additions and 7 deletions

View File

@@ -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

View File

@@ -35,7 +35,7 @@
}
},
"admConfig": {
"build": 305,
"build": 307,
"oldBuild": "backend-0.1.3.zip"
},
"devDependencies": {

View File

@@ -39,13 +39,13 @@ export const getOpenOrders = async (data: any | null) => {
} catch (error) {
return {
success: false,
message: "Current open orders",
data: orders.data,
message: "Errot getting current open orders",
data: [],
};
}
// add plant token in
const pOrders = orders.map((item: any) => {
const pOrders = orders.data.map((item: any) => {
// const dateCon = new Date(item.loadingDate).toLocaleString("en-US", {
// month: "numeric",
// day: "numeric",

View File

@@ -32,6 +32,7 @@ app.openapi(
);
if (error) {
console.log(error);
return c.json(
{
success: false,

View File

@@ -5,9 +5,14 @@ import { ppooQuery } from "../../../../sqlServer/querys/warehouse/ppooQuery.js";
export const getPPOO = async () => {
const { data, error } = await tryCatch(query(ppooQuery, "Get PPOO"));
const ppoo: any = data as any;
if (error) {
return { success: false, message: "Error getting ppoo", data: error };
}
return { success: true, message: "Current pallets in PPOO.", data: data };
return {
success: true,
message: "Current pallets in PPOO.",
data: ppoo.data,
};
};

View File

@@ -128,7 +128,7 @@ const newSubModules = [
name: "Swagger",
link: "#",
icon: "Webhook",
newWindow: false,
newWindow: true,
isActive: true,
},
{