diff --git a/src/types.ts b/src/types.ts index 8df52fb..1546868 100644 --- a/src/types.ts +++ b/src/types.ts @@ -1,4 +1,6 @@ +import { ProColumns } from "@ant-design/pro-table" import { SpinSize } from "antd/lib/spin" +import { DefaultOptionType } from "rc-cascader" export interface LoadingSpinnerProps { message?: string, @@ -73,15 +75,15 @@ export interface Renewable { } export interface Organization { - _id: string, + _id: string; name: string; description?: string; userId?: string; type?: Array; - icon?: string; + icon: string; customers?: Array; details?: any; - createAt?: Date; + createAt: Date; } export interface Building { @@ -96,6 +98,7 @@ export interface Building { lat: string; long: string; resources?: Array; + date?: Date; } export interface Bills { @@ -114,4 +117,141 @@ export interface Activity { } export type TimeStamp = "Weekly" | "Monthly" | "Yearly" | "" -export type EnergyType = "Solar" | "Hydro" | "Geo" | "Wind" \ No newline at end of file +export type EnergyType = "Solar" | "Hydro" | "Geo" | "Wind" + +export interface Bills { + totalElectric: number, + totalGas: number, + totalWater: number, + result: Array, + aggregated: any +} + +export interface Pages { + bills: Bills, + cost: Array +} + +export interface Data { + price: number, + name: string, + type: string, + organization: number, + earning: number, + organizationId: string, + resourcesType: any + buildings?: Array +} + +export interface ResourcesModal { + visible: boolean, + setVisible: (arg: boolean) => void, + data: Data, + options: string[] | DefaultOptionType[] | undefined +} +export interface ElementName { + name: string +} + +export interface ResourcesCard { + element: ElementName, + onClick: (React.MouseEventHandler & React.MouseEventHandler) | undefined +} + +export interface RenewableDetailsModal { + filter: string, + data: Data, + setVisible: (arg: boolean) => void, + visible: boolean +} + +export interface Step1 { + gas: boolean, + setGas: (arg: boolean) => void, + electric: boolean, + setElectric: (arg: boolean) => void, + water: boolean, + setWater: (arg: boolean) => void, + distributed: boolean, + setDistributed: (arg: boolean) => void, + setPrices: (arg: any) => void, + prices: Array, + +} + +export interface Step2 { + name: string, + setDescription: (arg: string) => void, + setIcon: (arg: any) => void, + description: string +} + +export interface Step3 { + name: string, + owner: string, + icon: any, + createAt: Date, + type: Array, + description: string, + prices: Array, + setData: (arg: Object) => void +} + +export interface OrganizationCard { + description: string, + title: string, + selected: boolean +} + +export interface EditCard { + data: any, + type: string +} + +export interface UsersCard { + openModal: (arg: any) => void +} + +export interface Customers { + organization: Organization +} + +export interface CarouselKpi { + loading: boolean, + gasSum: number, + kWhSum: number, + waterSum: number, + gasCost: number, + kWhCost: number, + waterCost: number, + sold: number, + renewable: number +} + +export interface CustomerModal { + visible: boolean, + user: UserProps, + setVisible: (arg: boolean) => void +} + +export interface CustomersBuildingTable { + data: readonly Record[] | undefined, + columns: any, + headerTitle?: React.ReactNode +} + +export interface ModalDetails { + visible: boolean, + setVisible: (arg:boolean) => void, + building: Building, + bills: Array; +} + +export interface CustomerDrawer { + visible: boolean, + buildingId: string, + setVisible: (arg: boolean) => void, + showWater?: boolean, + showElectric?: boolean, + showGas?: boolean +}