-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTypes-Interfaces.tsx
117 lines (108 loc) · 2.31 KB
/
Types-Interfaces.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
export interface IAllState {
User?: {
Info?: IBasicUserInfo & {
user: {
_departament: string,
_cost_center: string,
_location: string,
_domain: string,
_username: string,
}
profile_type: string
},
Session?: {
token: string
}
Projects?: IProject[],
Certifications?: ICertification[],
},
Inventory?: {
Consumables: Map<IConsumable['serial'], IConsumable>,
Equipaments: Map<IEquipament['serial'], IEquipament>,
Projects?: Map<IProject['serial'], IProject>
},
Configuration: {
MainStatus: IStatus['validation']
}
}
export interface IProject extends IItemData {
manager_email: string,
chef: string,
status: number,
members: string[],
date: {
expiration: string,
init?: string
}
history?: {
message: string,
id: { user: string }
time: { created: string }
}[]
}
export interface IOrderData {
id: {
item: {
serial?: string,
name?: string,
description?: string
},
project: {
serial?: number,
name?: string
}
user: {
email?: string,
name?: string
},
},
amount: number,
time?: {
returned?: string
created: string
}
}
export interface IBasicUserInfo {
email: string,
name: {
first: string,
last?: string,
full: string
}
}
export interface IItemData {
serial: string,
name: string,
description: string
}
export interface ICertification extends IItemData {
date: {
expiration: string
}
}
export interface IEquipament extends IItemData{
type: string,
stock: {
actual: number
}
};
export interface IConsumable extends IItemData {
stock: {
actual: number,
minimal: number
},
type: string,
price: IPrice
}
// Global Interfaces
export interface IPrice {
unit: number,
currency: 'EUR' | 'MXN' | 'USD';
}
export interface IStatus {
validation: {
type: '' | 'Success' | 'Error' | 'Normal' | 'Warn' | 'Loading',
message: string,
timeout: number
};
}