@nice2dev/ui-erp 1.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +232 -0
- package/dist/index.cjs +1271 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +289 -0
- package/dist/index.mjs +1271 -0
- package/dist/index.mjs.map +1 -0
- package/dist/style.css +1404 -0
- package/package.json +64 -0
package/README.md
ADDED
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
# @nice2dev/ui-erp
|
|
2
|
+
|
|
3
|
+
Enterprise Resource Planning components for Nice2Dev UI library.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @nice2dev/ui-erp
|
|
9
|
+
# or
|
|
10
|
+
pnpm add @nice2dev/ui-erp
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Components
|
|
14
|
+
|
|
15
|
+
### NiceGanttChart
|
|
16
|
+
|
|
17
|
+
Interactive Gantt chart for project management with task dependencies, progress tracking, and timeline visualization.
|
|
18
|
+
|
|
19
|
+
```tsx
|
|
20
|
+
import { NiceGanttChart } from '@nice2dev/ui-erp';
|
|
21
|
+
import '@nice2dev/ui-erp/style.css';
|
|
22
|
+
|
|
23
|
+
const project = {
|
|
24
|
+
id: 'project-1',
|
|
25
|
+
name: 'Website Redesign',
|
|
26
|
+
startDate: new Date('2024-01-01'),
|
|
27
|
+
endDate: new Date('2024-03-31'),
|
|
28
|
+
tasks: [
|
|
29
|
+
{
|
|
30
|
+
id: 'task-1',
|
|
31
|
+
name: 'Requirements Gathering',
|
|
32
|
+
start: new Date('2024-01-01'),
|
|
33
|
+
end: new Date('2024-01-14'),
|
|
34
|
+
progress: 100,
|
|
35
|
+
status: 'completed',
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
id: 'task-2',
|
|
39
|
+
name: 'UI/UX Design',
|
|
40
|
+
start: new Date('2024-01-15'),
|
|
41
|
+
end: new Date('2024-02-15'),
|
|
42
|
+
progress: 75,
|
|
43
|
+
status: 'in-progress',
|
|
44
|
+
dependencies: [{ taskId: 'task-1', type: 'finish-to-start' }],
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
id: 'task-3',
|
|
48
|
+
name: 'Development',
|
|
49
|
+
start: new Date('2024-02-01'),
|
|
50
|
+
end: new Date('2024-03-15'),
|
|
51
|
+
progress: 25,
|
|
52
|
+
status: 'in-progress',
|
|
53
|
+
parentId: 'task-2',
|
|
54
|
+
},
|
|
55
|
+
],
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
function ProjectTimeline() {
|
|
59
|
+
return (
|
|
60
|
+
<NiceGanttChart
|
|
61
|
+
project={project}
|
|
62
|
+
viewConfig={{
|
|
63
|
+
timeUnit: 'week',
|
|
64
|
+
showDependencies: true,
|
|
65
|
+
showProgress: true,
|
|
66
|
+
todayMarker: true,
|
|
67
|
+
}}
|
|
68
|
+
onTaskUpdate={(task) => console.log('Task updated:', task)}
|
|
69
|
+
onTaskClick={(task) => console.log('Task clicked:', task)}
|
|
70
|
+
/>
|
|
71
|
+
);
|
|
72
|
+
}
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### NiceResourceAllocation
|
|
76
|
+
|
|
77
|
+
Resource capacity planning grid with utilization tracking and conflict detection.
|
|
78
|
+
|
|
79
|
+
```tsx
|
|
80
|
+
import { NiceResourceAllocation } from '@nice2dev/ui-erp';
|
|
81
|
+
import '@nice2dev/ui-erp/style.css';
|
|
82
|
+
|
|
83
|
+
const resources = [
|
|
84
|
+
{
|
|
85
|
+
id: 'res-1',
|
|
86
|
+
name: 'John Developer',
|
|
87
|
+
type: 'human',
|
|
88
|
+
department: 'Engineering',
|
|
89
|
+
maxCapacity: 8,
|
|
90
|
+
availability: {
|
|
91
|
+
workingDays: [1, 2, 3, 4, 5],
|
|
92
|
+
workingHours: { start: '09:00', end: '17:00' },
|
|
93
|
+
},
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
id: 'res-2',
|
|
97
|
+
name: 'Conference Room A',
|
|
98
|
+
type: 'room',
|
|
99
|
+
maxCapacity: 10,
|
|
100
|
+
availability: {
|
|
101
|
+
workingDays: [1, 2, 3, 4, 5],
|
|
102
|
+
workingHours: { start: '08:00', end: '20:00' },
|
|
103
|
+
},
|
|
104
|
+
},
|
|
105
|
+
];
|
|
106
|
+
|
|
107
|
+
const allocations = [
|
|
108
|
+
{
|
|
109
|
+
id: 'alloc-1',
|
|
110
|
+
resourceId: 'res-1',
|
|
111
|
+
projectId: 'project-1',
|
|
112
|
+
start: new Date('2024-01-15'),
|
|
113
|
+
end: new Date('2024-01-31'),
|
|
114
|
+
hoursPerDay: 6,
|
|
115
|
+
status: 'confirmed',
|
|
116
|
+
},
|
|
117
|
+
];
|
|
118
|
+
|
|
119
|
+
function ResourcePlanning() {
|
|
120
|
+
return (
|
|
121
|
+
<NiceResourceAllocation
|
|
122
|
+
resources={resources}
|
|
123
|
+
allocations={allocations}
|
|
124
|
+
dateRange={{
|
|
125
|
+
start: new Date('2024-01-01'),
|
|
126
|
+
end: new Date('2024-03-31'),
|
|
127
|
+
}}
|
|
128
|
+
viewConfig={{
|
|
129
|
+
timeUnit: 'week',
|
|
130
|
+
showUtilization: true,
|
|
131
|
+
showConflicts: true,
|
|
132
|
+
}}
|
|
133
|
+
onAllocationCreate={(alloc) => console.log('New allocation:', alloc)}
|
|
134
|
+
onAllocationUpdate={(alloc) => console.log('Updated:', alloc)}
|
|
135
|
+
/>
|
|
136
|
+
);
|
|
137
|
+
}
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
### NiceInventoryManager
|
|
141
|
+
|
|
142
|
+
Inventory management with multiple views, transactions, and reorder alerts.
|
|
143
|
+
|
|
144
|
+
```tsx
|
|
145
|
+
import { NiceInventoryManager } from '@nice2dev/ui-erp';
|
|
146
|
+
import '@nice2dev/ui-erp/style.css';
|
|
147
|
+
|
|
148
|
+
const items = [
|
|
149
|
+
{
|
|
150
|
+
id: 'item-1',
|
|
151
|
+
sku: 'WIDGET-001',
|
|
152
|
+
name: 'Premium Widget',
|
|
153
|
+
category: 'Widgets',
|
|
154
|
+
unit: 'pcs',
|
|
155
|
+
quantity: 150,
|
|
156
|
+
reorderLevel: 50,
|
|
157
|
+
reorderQuantity: 200,
|
|
158
|
+
cost: { amount: 25.0, currency: { code: 'USD', symbol: '$', decimalPlaces: 2 } },
|
|
159
|
+
status: 'in-stock',
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
id: 'item-2',
|
|
163
|
+
sku: 'GADGET-002',
|
|
164
|
+
name: 'Basic Gadget',
|
|
165
|
+
category: 'Gadgets',
|
|
166
|
+
unit: 'pcs',
|
|
167
|
+
quantity: 30,
|
|
168
|
+
reorderLevel: 50,
|
|
169
|
+
reorderQuantity: 100,
|
|
170
|
+
cost: { amount: 15.0, currency: { code: 'USD', symbol: '$', decimalPlaces: 2 } },
|
|
171
|
+
status: 'low-stock',
|
|
172
|
+
},
|
|
173
|
+
];
|
|
174
|
+
|
|
175
|
+
function InventoryDashboard() {
|
|
176
|
+
return (
|
|
177
|
+
<NiceInventoryManager
|
|
178
|
+
items={items}
|
|
179
|
+
viewConfig={{
|
|
180
|
+
view: 'grid',
|
|
181
|
+
showImages: true,
|
|
182
|
+
sortBy: 'name',
|
|
183
|
+
}}
|
|
184
|
+
onItemUpdate={(item) => console.log('Item updated:', item)}
|
|
185
|
+
onTransactionCreate={(tx) => console.log('Transaction:', tx)}
|
|
186
|
+
onItemClick={(item) => console.log('View item:', item)}
|
|
187
|
+
/>
|
|
188
|
+
);
|
|
189
|
+
}
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
## Features
|
|
193
|
+
|
|
194
|
+
### Gantt Chart
|
|
195
|
+
|
|
196
|
+
- Drag-and-drop task scheduling
|
|
197
|
+
- Task dependencies (finish-to-start, start-to-start, etc.)
|
|
198
|
+
- Progress tracking and visualization
|
|
199
|
+
- Collapsible task hierarchy
|
|
200
|
+
- Multiple time units (day, week, month)
|
|
201
|
+
- Today marker and critical path
|
|
202
|
+
- Milestones support
|
|
203
|
+
- Baseline comparison
|
|
204
|
+
|
|
205
|
+
### Resource Allocation
|
|
206
|
+
|
|
207
|
+
- Visual capacity planning
|
|
208
|
+
- Utilization heatmap
|
|
209
|
+
- Conflict detection and alerts
|
|
210
|
+
- Multiple resource types
|
|
211
|
+
- Drag-to-allocate functionality
|
|
212
|
+
- Department grouping
|
|
213
|
+
- Working hours configuration
|
|
214
|
+
|
|
215
|
+
### Inventory Management
|
|
216
|
+
|
|
217
|
+
- Grid, list, and kanban views
|
|
218
|
+
- Real-time stock tracking
|
|
219
|
+
- Low stock alerts
|
|
220
|
+
- Transaction history
|
|
221
|
+
- Reorder management
|
|
222
|
+
- Barcode/SKU support
|
|
223
|
+
- Multi-location tracking
|
|
224
|
+
- Category filtering
|
|
225
|
+
|
|
226
|
+
## API Reference
|
|
227
|
+
|
|
228
|
+
See the [TypeScript definitions](./src/types.ts) for complete API documentation.
|
|
229
|
+
|
|
230
|
+
## License
|
|
231
|
+
|
|
232
|
+
MIT
|