UNPKG

armisa-models

Version:
36 lines (35 loc) 1.73 kB
/// <reference types="react" /> import { MainStateManager } from "../../MainStateManager"; import { INaming } from "../../NamingCaption"; import { IParentFormManager } from "../../Page/ElementsOfFormFactory"; import { AuthFactory } from "../AuthFactory"; import { MenuItemFactory } from "./2-MenuItemFactory"; export type ISystems = 'acc' | 'wrh' | 'sal' | 'pur' | 'pay' | 'aut' | 'ast' | 'war' | 'pro' | 'tre' | 'DD' | 'PM' | 'COG' | 'PMS' | 'WF'; export type ITypeOfFormForRoute = { id: number; code: number; name: string; }; export type IRoutes = { path: string; Page: React.ComponentType<{ parentFormManager: IParentFormManager; typeOfForm?: ITypeOfFormForRoute; }>; exact?: boolean; typeOfForm?: ITypeOfFormForRoute; }; export declare class MenuFactory { mainStateManager: MainStateManager; authFactory: AuthFactory; forceUpdate: () => void; forceUpdateAfterSystemsChange: () => void; visible: boolean; constructor(mainStateManager: MainStateManager, authFactory: AuthFactory); menuItems: MenuItemFactory[]; get visibleMenuItems(): MenuItemFactory[]; routes: IRoutes[]; addNewItem(caption: INaming | string, path?: string, Page?: React.ComponentType<{ parentFormManager: IParentFormManager; }>, exact?: boolean, onClick?: () => void, accounting?: boolean, purchase?: boolean, sale?: boolean, treasury?: boolean, warehouse?: boolean, produce?: boolean, pms?: boolean, costOfGoods?: boolean, payment?: boolean, asset?: boolean, warranty?: boolean, automation?: boolean, dailyDistribution?: boolean, preventindMaintainance?: boolean, workflow?: boolean, users?: number[]): MenuItemFactory; }