Rename; Added EMS server; redis compose
This commit is contained in:
39
client/src/interfaces/auth.ts
Normal file
39
client/src/interfaces/auth.ts
Normal file
@ -0,0 +1,39 @@
|
||||
export interface User {
|
||||
id: number;
|
||||
}
|
||||
|
||||
export interface UserData extends User {
|
||||
email: string;
|
||||
login: string;
|
||||
phone: string;
|
||||
name: string;
|
||||
surname: string;
|
||||
is_active: boolean;
|
||||
role_id: number;
|
||||
}
|
||||
|
||||
export interface UserCreds extends User {
|
||||
password: string;
|
||||
}
|
||||
|
||||
export interface AuthState {
|
||||
isAuthenticated: boolean;
|
||||
token: string | null;
|
||||
userData: UserData | null;
|
||||
}
|
||||
|
||||
export interface LoginFormData {
|
||||
username: string;
|
||||
password: string;
|
||||
grant_type: string;
|
||||
scope?: string;
|
||||
client_id?: string;
|
||||
client_secret?: string;
|
||||
}
|
||||
|
||||
export interface ApiResponse {
|
||||
access_token: string;
|
||||
data: JSON;
|
||||
status: number;
|
||||
statusText: string;
|
||||
}
|
||||
35
client/src/interfaces/create.ts
Normal file
35
client/src/interfaces/create.ts
Normal file
@ -0,0 +1,35 @@
|
||||
import { Validate } from "react-hook-form";
|
||||
|
||||
export interface CreateFieldTypes {
|
||||
string: 'string';
|
||||
number: 'number';
|
||||
date: 'date';
|
||||
dateTime: 'dateTime';
|
||||
boolean: 'boolean';
|
||||
singleSelect: 'singleSelect';
|
||||
actions: 'actions';
|
||||
custom: 'custom';
|
||||
}
|
||||
|
||||
export interface InputTypes {
|
||||
password: 'password';
|
||||
}
|
||||
|
||||
export type CreateFieldType = CreateFieldTypes[keyof CreateFieldTypes]
|
||||
export type InputType = InputTypes[keyof InputTypes]
|
||||
|
||||
export interface CreateField {
|
||||
key: string;
|
||||
headerName?: string;
|
||||
type: CreateFieldType;
|
||||
required?: boolean;
|
||||
defaultValue?: any;
|
||||
inputType?: InputType;
|
||||
validate?: Validate<string, boolean>;
|
||||
/** Watch for field */
|
||||
watch?: string;
|
||||
/** Message on watch */
|
||||
watchMessage?: string;
|
||||
/** Should field be included in the request */
|
||||
include?: boolean;
|
||||
}
|
||||
65
client/src/interfaces/documents.ts
Normal file
65
client/src/interfaces/documents.ts
Normal file
@ -0,0 +1,65 @@
|
||||
// owner_id relates to other companies
|
||||
export interface ICompany {
|
||||
name: string;
|
||||
fullname: string;
|
||||
description: string;
|
||||
owner_id: number;
|
||||
}
|
||||
|
||||
export interface IDepartment {
|
||||
name: string;
|
||||
fullname: string;
|
||||
description: string;
|
||||
company_id: number;
|
||||
owner_id: number;
|
||||
}
|
||||
|
||||
export interface IDocumentFolder {
|
||||
id: number;
|
||||
name: string;
|
||||
description: string;
|
||||
create_date: string;
|
||||
}
|
||||
|
||||
export interface IDocument {
|
||||
id: number;
|
||||
document_folder_id: number,
|
||||
name: string;
|
||||
description: string;
|
||||
department_id: number;
|
||||
create_date: string;
|
||||
}
|
||||
|
||||
export interface IBank {
|
||||
name: string;
|
||||
bik: string;
|
||||
corschet: string;
|
||||
activ: boolean;
|
||||
id_1c: string;
|
||||
}
|
||||
|
||||
export interface IOrganization {
|
||||
full_name: string;
|
||||
name: string;
|
||||
inn: string;
|
||||
ogrn: string;
|
||||
kpp: string;
|
||||
okopf: string;
|
||||
legal_address: string;
|
||||
actual_address: string;
|
||||
mail_address: string;
|
||||
id_budget: number;
|
||||
fio_dir: string;
|
||||
phone: string;
|
||||
email: string;
|
||||
comment: string;
|
||||
id_bank: string;
|
||||
id_1c: string;
|
||||
active: boolean;
|
||||
}
|
||||
|
||||
export interface IOrganizationBank {
|
||||
id_organization: string;
|
||||
id_banks: string;
|
||||
rasch_schet: string;
|
||||
}
|
||||
18
client/src/interfaces/fuel.ts
Normal file
18
client/src/interfaces/fuel.ts
Normal file
@ -0,0 +1,18 @@
|
||||
export interface IRegion {
|
||||
id: number;
|
||||
name: string;
|
||||
}
|
||||
|
||||
export interface ICity {
|
||||
id: number;
|
||||
name: string;
|
||||
}
|
||||
|
||||
export interface IBoiler {
|
||||
id: string;
|
||||
id_object: string;
|
||||
boiler_name: string;
|
||||
boiler_code: string;
|
||||
id_city: number;
|
||||
activity: boolean;
|
||||
}
|
||||
3
client/src/interfaces/preferences.ts
Normal file
3
client/src/interfaces/preferences.ts
Normal file
@ -0,0 +1,3 @@
|
||||
export interface PreferencesState {
|
||||
darkMode: boolean;
|
||||
}
|
||||
10
client/src/interfaces/role.ts
Normal file
10
client/src/interfaces/role.ts
Normal file
@ -0,0 +1,10 @@
|
||||
export interface IRole {
|
||||
name: string;
|
||||
description?: string | null;
|
||||
id: number;
|
||||
}
|
||||
|
||||
export interface IRoleCreate {
|
||||
name: string;
|
||||
description?: string | null;
|
||||
}
|
||||
33
client/src/interfaces/servers.ts
Normal file
33
client/src/interfaces/servers.ts
Normal file
@ -0,0 +1,33 @@
|
||||
export interface IServer {
|
||||
id: number;
|
||||
name: string;
|
||||
region_id: number;
|
||||
}
|
||||
|
||||
export interface IServersInfo extends IServer {
|
||||
servers_count: number;
|
||||
IPs_count: number;
|
||||
status: string;
|
||||
}
|
||||
|
||||
export interface IServerIP {
|
||||
name: string;
|
||||
is_actual: boolean;
|
||||
ip: string;
|
||||
server_id: number;
|
||||
}
|
||||
|
||||
export interface IHardware {
|
||||
name: string;
|
||||
os_info: string;
|
||||
ram: string;
|
||||
processor: string;
|
||||
server_id: number;
|
||||
}
|
||||
|
||||
export interface IStorage {
|
||||
name: string;
|
||||
size: string;
|
||||
storage_type: string;
|
||||
hardware_id: number;
|
||||
}
|
||||
10
client/src/interfaces/user.ts
Normal file
10
client/src/interfaces/user.ts
Normal file
@ -0,0 +1,10 @@
|
||||
export interface IUser {
|
||||
id: number;
|
||||
password: string;
|
||||
email: string;
|
||||
login: string;
|
||||
phone: string;
|
||||
name: string;
|
||||
surname: string;
|
||||
is_active: boolean;
|
||||
}
|
||||
Reference in New Issue
Block a user