feat: modules file generation using template with specifying host and port asa args

This commit is contained in:
2025-03-12 21:12:48 +04:00
parent 7dcb646b82
commit 1247a80eb6
7 changed files with 106 additions and 131 deletions

View File

@@ -1,21 +1,57 @@
import { IconUser, IconBox, IconCubeSend, IconUsersGroup, IconUserCog } from "@tabler/icons-react"
import {
IconUser,
IconBox,
IconCubeSend,
IconUsersGroup,
IconUserCog,
} from "@tabler/icons-react";
import ModulesType from "./types.tsx";
import connectModules from "./connectModules.tsx";
export enum ModuleNames {
CLIENTS = "clients",
SERVICES_AND_PRODUCTS = "servicesAndProducts",
SHIPMENT = "shipment",
EMPLOYEES = "employees",
MANAGERS = "managers"
CLIENTS = "clients",
SERVICES_AND_PRODUCTS = "servicesAndProducts",
SHIPMENT = "shipment",
EMPLOYEES = "employees",
MANAGERS = "managers",
}
const modules: ModulesType = {
[ModuleNames.CLIENTS]: { info: { label: "Клиенты", key: "clients", icon: <IconUser /> } },
[ModuleNames.SERVICES_AND_PRODUCTS]: { info: { label: "Товары и услуги", key: "servicesAndProducts", icon: <IconBox /> } },
[ModuleNames.SHIPMENT]: { info: { label: "Отгрузка", key: "shipment", icon: <IconCubeSend /> } },
[ModuleNames.EMPLOYEES]: { info: { label: "Сотрудники", key: "employees", icon: <IconUsersGroup /> } },
[ModuleNames.MANAGERS]: { info: { label: "Менеджер", key: "managers", icon: <IconUserCog /> } }
[ModuleNames.CLIENTS]: {
info: {
label: "Клиенты",
key: "clients",
icon: <IconUser />,
}
},
[ModuleNames.SERVICES_AND_PRODUCTS]: {
info: {
label: "Товары и услуги",
key: "servicesAndProducts",
icon: <IconBox />,
}
},
[ModuleNames.SHIPMENT]: {
info: {
label: "Отгрузка",
key: "shipment",
icon: <IconCubeSend />,
}
},
[ModuleNames.EMPLOYEES]: {
info: {
label: "Сотрудники",
key: "employees",
icon: <IconUsersGroup />,
}
},
[ModuleNames.MANAGERS]: {
info: {
label: "Менеджер",
key: "managers",
icon: <IconUserCog />,
}
},
};
export const MODULES = connectModules(modules);
export const MODULES = connectModules(modules);