@lambda-development/erp-core 0.7.1 → 0.8.0
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/dist/api/client.d.ts +61 -0
- package/dist/hooks/use-rentals.d.ts +7 -0
- package/dist/index.js +2319 -2060
- package/dist/index.js.map +1 -1
- package/dist/pages/rentals/fleet-calendar.d.ts +1 -0
- package/package.json +1 -1
package/dist/api/client.d.ts
CHANGED
|
@@ -5,6 +5,54 @@ export declare class ApiError extends Error {
|
|
|
5
5
|
constructor(status: number, message: string);
|
|
6
6
|
}
|
|
7
7
|
export declare function request<T>(path: string, options?: RequestInit): Promise<T>;
|
|
8
|
+
export interface AvailabilityAsset {
|
|
9
|
+
name: string;
|
|
10
|
+
asset_tag: string | null;
|
|
11
|
+
warehouse: string | null;
|
|
12
|
+
status: string | null;
|
|
13
|
+
meter_reading: number | null;
|
|
14
|
+
}
|
|
15
|
+
export interface AvailabilityResult {
|
|
16
|
+
item_code: string;
|
|
17
|
+
warehouse: string | null;
|
|
18
|
+
from: string;
|
|
19
|
+
to: string;
|
|
20
|
+
capacity: number;
|
|
21
|
+
committed: number;
|
|
22
|
+
available_qty: number;
|
|
23
|
+
available: boolean;
|
|
24
|
+
available_assets: AvailabilityAsset[];
|
|
25
|
+
overlapping: unknown[];
|
|
26
|
+
}
|
|
27
|
+
export interface CalendarAsset {
|
|
28
|
+
name: string;
|
|
29
|
+
asset_tag: string | null;
|
|
30
|
+
item_code: string | null;
|
|
31
|
+
warehouse: string | null;
|
|
32
|
+
status: string | null;
|
|
33
|
+
meter_reading: number | null;
|
|
34
|
+
}
|
|
35
|
+
export interface CalendarReservation {
|
|
36
|
+
name: string;
|
|
37
|
+
item_code: string | null;
|
|
38
|
+
asset: string | null;
|
|
39
|
+
warehouse: string | null;
|
|
40
|
+
qty: number | null;
|
|
41
|
+
from_datetime: string;
|
|
42
|
+
to_datetime: string;
|
|
43
|
+
status: string | null;
|
|
44
|
+
party_type: string | null;
|
|
45
|
+
party: string | null;
|
|
46
|
+
purpose: string | null;
|
|
47
|
+
}
|
|
48
|
+
export interface FleetCalendarFeed {
|
|
49
|
+
from: string;
|
|
50
|
+
to: string;
|
|
51
|
+
warehouse: string | null;
|
|
52
|
+
item_code: string | null;
|
|
53
|
+
assets: CalendarAsset[];
|
|
54
|
+
reservations: CalendarReservation[];
|
|
55
|
+
}
|
|
8
56
|
export declare const api: {
|
|
9
57
|
request: typeof request;
|
|
10
58
|
uploadChatAttachment: (sessionId: string, file: File) => Promise<{
|
|
@@ -101,6 +149,19 @@ export declare const api: {
|
|
|
101
149
|
stockBalance: (params?: Record<string, string>) => Promise<{
|
|
102
150
|
rows: any[];
|
|
103
151
|
}>;
|
|
152
|
+
availability: (params: {
|
|
153
|
+
item_code: string;
|
|
154
|
+
from: string;
|
|
155
|
+
to: string;
|
|
156
|
+
warehouse?: string;
|
|
157
|
+
exclude?: string;
|
|
158
|
+
}) => Promise<AvailabilityResult>;
|
|
159
|
+
fleetCalendar: (params: {
|
|
160
|
+
from: string;
|
|
161
|
+
to: string;
|
|
162
|
+
warehouse?: string;
|
|
163
|
+
item_code?: string;
|
|
164
|
+
}) => Promise<FleetCalendarFeed>;
|
|
104
165
|
dashboardSummary: (company?: string) => Promise<any>;
|
|
105
166
|
profitAndLoss: (params?: Record<string, string>) => Promise<any>;
|
|
106
167
|
balanceSheet: (params?: Record<string, string>) => Promise<any>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/** Fleet availability timeline feed: asset lanes + overlapping reservation bars. */
|
|
2
|
+
export declare function useFleetCalendar(params: {
|
|
3
|
+
from: string;
|
|
4
|
+
to: string;
|
|
5
|
+
warehouse?: string;
|
|
6
|
+
item_code?: string;
|
|
7
|
+
}): import('@tanstack/react-query').UseQueryResult<import('../api/client').FleetCalendarFeed, Error>;
|