@apptimate/core-lib 6.8.0 → 7.0.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/package.json +1 -1
- package/src/api-services/entity-extensions.client.ts +130 -0
- package/src/api-services/inventory/items.client.ts +3 -2
- package/src/api-services/inventory/sku-components.client.ts +106 -0
- package/src/api-services/users.client.ts +64 -0
- package/src/constants/menus.ts +7 -3
- package/src/index.ts +3 -0
package/package.json
CHANGED
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import { sendRequest, IApiResponse } from "@apptimate/core-lib";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Normalise a backend response that may come in either of two shapes:
|
|
5
|
+
* • Standard: { is_success, result, message } (ResponseService)
|
|
6
|
+
* • Raw: { data, message } (Extension controllers)
|
|
7
|
+
* Returns a consistent { is_success, result, message } object.
|
|
8
|
+
*/
|
|
9
|
+
function normalise(raw: any, okStatus: boolean): IApiResponse {
|
|
10
|
+
if (typeof raw?.is_success === "boolean") return raw; // already standard
|
|
11
|
+
return {
|
|
12
|
+
is_success: okStatus,
|
|
13
|
+
result: raw?.data ?? raw,
|
|
14
|
+
message: raw?.message ?? "",
|
|
15
|
+
system_code: raw?.system_code ?? "",
|
|
16
|
+
} as IApiResponse;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
// ── Activity Logs (scoped to an entity) ─────────────────────────────────────
|
|
20
|
+
export async function getActivityLogsForEntity(entityId: number): Promise<IApiResponse> {
|
|
21
|
+
const res = await sendRequest({ url: `${process.env.NEXT_PUBLIC_API_URL}/api/activity-logs/entity/${entityId}`, method: "GET" });
|
|
22
|
+
return normalise(res.responseData, res.ok);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
// ── Notes ───────────────────────────────────────────────────────────────────
|
|
26
|
+
export async function getNotesForEntity(entityId: number): Promise<IApiResponse> {
|
|
27
|
+
const res = await sendRequest({ url: `${process.env.NEXT_PUBLIC_API_URL}/api/entities/${entityId}/notes`, method: "GET" });
|
|
28
|
+
return normalise(res.responseData, res.ok);
|
|
29
|
+
}
|
|
30
|
+
export async function addNote(entityId: number, note: string): Promise<IApiResponse> {
|
|
31
|
+
const res = await sendRequest({ url: `${process.env.NEXT_PUBLIC_API_URL}/api/entities/${entityId}/notes`, method: "POST", data: { note } });
|
|
32
|
+
return normalise(res.responseData, res.ok);
|
|
33
|
+
}
|
|
34
|
+
export async function updateNote(noteId: number, note: string): Promise<IApiResponse> {
|
|
35
|
+
const res = await sendRequest({ url: `${process.env.NEXT_PUBLIC_API_URL}/api/entity-notes/${noteId}`, method: "PUT", data: { note } });
|
|
36
|
+
return normalise(res.responseData, res.ok);
|
|
37
|
+
}
|
|
38
|
+
export async function deleteNote(noteId: number): Promise<IApiResponse> {
|
|
39
|
+
const res = await sendRequest({ url: `${process.env.NEXT_PUBLIC_API_URL}/api/entity-notes/${noteId}`, method: "DELETE" });
|
|
40
|
+
return normalise(res.responseData, res.ok);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
// ── Comments ────────────────────────────────────────────────────────────────
|
|
44
|
+
export async function getCommentsForEntity(entityId: number): Promise<IApiResponse> {
|
|
45
|
+
const res = await sendRequest({ url: `${process.env.NEXT_PUBLIC_API_URL}/api/entities/${entityId}/comments`, method: "GET" });
|
|
46
|
+
return normalise(res.responseData, res.ok);
|
|
47
|
+
}
|
|
48
|
+
export async function addComment(entityId: number, comment: string): Promise<IApiResponse> {
|
|
49
|
+
const res = await sendRequest({ url: `${process.env.NEXT_PUBLIC_API_URL}/api/entities/${entityId}/comments`, method: "POST", data: { comment } });
|
|
50
|
+
return normalise(res.responseData, res.ok);
|
|
51
|
+
}
|
|
52
|
+
export async function updateComment(commentId: number, comment: string): Promise<IApiResponse> {
|
|
53
|
+
const res = await sendRequest({ url: `${process.env.NEXT_PUBLIC_API_URL}/api/entity-comments/${commentId}`, method: "PUT", data: { comment } });
|
|
54
|
+
return normalise(res.responseData, res.ok);
|
|
55
|
+
}
|
|
56
|
+
export async function deleteComment(commentId: number): Promise<IApiResponse> {
|
|
57
|
+
const res = await sendRequest({ url: `${process.env.NEXT_PUBLIC_API_URL}/api/entity-comments/${commentId}`, method: "DELETE" });
|
|
58
|
+
return normalise(res.responseData, res.ok);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
// ── Tags ────────────────────────────────────────────────────────────────────
|
|
62
|
+
export async function getTagsForEntity(entityId: number): Promise<IApiResponse> {
|
|
63
|
+
const res = await sendRequest({ url: `${process.env.NEXT_PUBLIC_API_URL}/api/entities/${entityId}/tags`, method: "GET" });
|
|
64
|
+
return normalise(res.responseData, res.ok);
|
|
65
|
+
}
|
|
66
|
+
export async function attachTag(entityId: number, tagId: number): Promise<IApiResponse> {
|
|
67
|
+
const res = await sendRequest({ url: `${process.env.NEXT_PUBLIC_API_URL}/api/entities/${entityId}/tags`, method: "POST", data: { tag_id: tagId } });
|
|
68
|
+
return normalise(res.responseData, res.ok);
|
|
69
|
+
}
|
|
70
|
+
export async function detachTag(entityId: number, tagId: number): Promise<IApiResponse> {
|
|
71
|
+
const res = await sendRequest({ url: `${process.env.NEXT_PUBLIC_API_URL}/api/entities/${entityId}/tags/${tagId}`, method: "DELETE" });
|
|
72
|
+
return normalise(res.responseData, res.ok);
|
|
73
|
+
}
|
|
74
|
+
export async function getAllTags(): Promise<IApiResponse> {
|
|
75
|
+
const res = await sendRequest({ url: `${process.env.NEXT_PUBLIC_API_URL}/api/tags`, method: "GET" });
|
|
76
|
+
return normalise(res.responseData, res.ok);
|
|
77
|
+
}
|
|
78
|
+
export async function createTag(name: string): Promise<IApiResponse> {
|
|
79
|
+
const code = name.toLowerCase().replace(/[^a-z0-9]+/g, "_").replace(/^_|_$/g, "");
|
|
80
|
+
const res = await sendRequest({ url: `${process.env.NEXT_PUBLIC_API_URL}/api/tags`, method: "POST", data: { name, code, color: "#6366f1" } });
|
|
81
|
+
return normalise(res.responseData, res.ok);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
// ── Approvals ────────────────────────────────────────────────────────────────
|
|
85
|
+
export async function getApprovalsForEntity(entityId: number): Promise<IApiResponse> {
|
|
86
|
+
const res = await sendRequest({ url: `${process.env.NEXT_PUBLIC_API_URL}/api/approvals/entity/${entityId}`, method: "GET" });
|
|
87
|
+
return normalise(res.responseData, res.ok);
|
|
88
|
+
}
|
|
89
|
+
export async function requestApproval(entityId: number, approverIds: number[], approvalType: string = 'general'): Promise<IApiResponse> {
|
|
90
|
+
const res = await sendRequest({
|
|
91
|
+
url: `${process.env.NEXT_PUBLIC_API_URL}/api/approvals`,
|
|
92
|
+
method: "POST",
|
|
93
|
+
data: { entity_id: entityId, approver_ids: approverIds, approval_type: approvalType }
|
|
94
|
+
});
|
|
95
|
+
return normalise(res.responseData, res.ok);
|
|
96
|
+
}
|
|
97
|
+
export async function approveStep(stepId: number, remarks?: string): Promise<IApiResponse> {
|
|
98
|
+
const res = await sendRequest({ url: `${process.env.NEXT_PUBLIC_API_URL}/api/approval-steps/${stepId}/approve`, method: "POST", data: { remarks } });
|
|
99
|
+
return normalise(res.responseData, res.ok);
|
|
100
|
+
}
|
|
101
|
+
export async function rejectStep(stepId: number, remarks?: string): Promise<IApiResponse> {
|
|
102
|
+
const res = await sendRequest({ url: `${process.env.NEXT_PUBLIC_API_URL}/api/approval-steps/${stepId}/reject`, method: "POST", data: { remarks } });
|
|
103
|
+
return normalise(res.responseData, res.ok);
|
|
104
|
+
}
|
|
105
|
+
export async function sendBackStep(stepId: number, remarks?: string): Promise<IApiResponse> {
|
|
106
|
+
const res = await sendRequest({ url: `${process.env.NEXT_PUBLIC_API_URL}/api/approval-steps/${stepId}/send-back`, method: "POST", data: { remarks } });
|
|
107
|
+
return normalise(res.responseData, res.ok);
|
|
108
|
+
}
|
|
109
|
+
export async function requestApprovalFromWorkflow(entityId: number, approvalType: string): Promise<IApiResponse> {
|
|
110
|
+
const res = await sendRequest({
|
|
111
|
+
url: `${process.env.NEXT_PUBLIC_API_URL}/api/approvals/workflow`,
|
|
112
|
+
method: "POST",
|
|
113
|
+
data: { entity_id: entityId, approval_type: approvalType }
|
|
114
|
+
});
|
|
115
|
+
return normalise(res.responseData, res.ok);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
// ── Properties (unstructured JSON) ──────────────────────────────────────────
|
|
119
|
+
export async function getEntityProperties(entityId: number): Promise<IApiResponse> {
|
|
120
|
+
const res = await sendRequest({ url: `${process.env.NEXT_PUBLIC_API_URL}/api/entities/${entityId}/properties`, method: "GET" });
|
|
121
|
+
return normalise(res.responseData, res.ok);
|
|
122
|
+
}
|
|
123
|
+
export async function updateEntityProperties(entityId: number, properties: any): Promise<IApiResponse> {
|
|
124
|
+
const res = await sendRequest({
|
|
125
|
+
url: `${process.env.NEXT_PUBLIC_API_URL}/api/entities/${entityId}/properties`,
|
|
126
|
+
method: "PUT",
|
|
127
|
+
data: { properties }
|
|
128
|
+
});
|
|
129
|
+
return normalise(res.responseData, res.ok);
|
|
130
|
+
}
|
|
@@ -14,8 +14,9 @@ export async function getItem(id: number): Promise<IApiResponse> {
|
|
|
14
14
|
return response.responseData as IApiResponse;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
export async function
|
|
18
|
-
const
|
|
17
|
+
export async function getItemCount(categoryId?: number): Promise<IApiResponse> {
|
|
18
|
+
const url = categoryId ? `${BASE}/count?category_id=${categoryId}` : `${BASE}/count`;
|
|
19
|
+
const response = await sendRequest({ url, method: "GET" });
|
|
19
20
|
return response.responseData as IApiResponse;
|
|
20
21
|
}
|
|
21
22
|
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { sendRequest } from "../../utils/httpClient";
|
|
4
|
+
import { IApiResponse } from "../../common/interfaces/ICommon";
|
|
5
|
+
|
|
6
|
+
const BASE_URL = process.env.NEXT_PUBLIC_API_URL || "http://localhost:8000";
|
|
7
|
+
|
|
8
|
+
// ── SKU Component Fields ──
|
|
9
|
+
|
|
10
|
+
export async function getSkuComponentFields(params?: { search?: string; status?: string; per_page?: number; page?: number }): Promise<IApiResponse> {
|
|
11
|
+
const searchParams = new URLSearchParams();
|
|
12
|
+
if (params?.search) searchParams.set("search", params.search);
|
|
13
|
+
if (params?.status) searchParams.set("status", params.status);
|
|
14
|
+
if (params?.per_page) searchParams.set("per_page", String(params.per_page));
|
|
15
|
+
if (params?.page) searchParams.set("page", String(params.page));
|
|
16
|
+
const qs = searchParams.toString();
|
|
17
|
+
const response = await sendRequest({ url: `${BASE_URL}/api/inventory/sku-fields${qs ? `?${qs}` : ""}`, method: "GET" });
|
|
18
|
+
return response.responseData as IApiResponse;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export async function getSkuComponentField(id: number): Promise<IApiResponse> {
|
|
22
|
+
const response = await sendRequest({ url: `${BASE_URL}/api/inventory/sku-fields/${id}`, method: "GET" });
|
|
23
|
+
return response.responseData as IApiResponse;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export async function createSkuComponentField(data: {
|
|
27
|
+
name: string;
|
|
28
|
+
code?: string;
|
|
29
|
+
description?: string;
|
|
30
|
+
applicable_to?: string;
|
|
31
|
+
options: { label: string; code: string; sort_order?: number }[];
|
|
32
|
+
}): Promise<IApiResponse> {
|
|
33
|
+
const response = await sendRequest({ url: `${BASE_URL}/api/inventory/sku-fields`, method: "POST", data });
|
|
34
|
+
return response.responseData as IApiResponse;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export async function updateSkuComponentField(id: number, data: {
|
|
38
|
+
name?: string;
|
|
39
|
+
description?: string;
|
|
40
|
+
status?: string;
|
|
41
|
+
applicable_to?: string;
|
|
42
|
+
options?: { id?: number; label: string; code: string; sort_order?: number }[];
|
|
43
|
+
}): Promise<IApiResponse> {
|
|
44
|
+
const response = await sendRequest({ url: `${BASE_URL}/api/inventory/sku-fields/${id}`, method: "PUT", data });
|
|
45
|
+
return response.responseData as IApiResponse;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export async function deleteSkuComponentField(id: number): Promise<IApiResponse> {
|
|
49
|
+
const response = await sendRequest({ url: `${BASE_URL}/api/inventory/sku-fields/${id}`, method: "DELETE" });
|
|
50
|
+
return response.responseData as IApiResponse;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export async function lookupSkuComponentFields(params?: { applicable_to?: string }): Promise<IApiResponse> {
|
|
54
|
+
const searchParams = new URLSearchParams();
|
|
55
|
+
if (params?.applicable_to) searchParams.set("applicable_to", params.applicable_to);
|
|
56
|
+
const qs = searchParams.toString();
|
|
57
|
+
const response = await sendRequest({ url: `${BASE_URL}/api/inventory/sku-fields/lookup${qs ? `?${qs}` : ""}`, method: "GET" });
|
|
58
|
+
return response.responseData as IApiResponse;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
// ── SKU Component Templates ──
|
|
62
|
+
|
|
63
|
+
export async function getSkuComponentTemplates(params?: { search?: string; status?: string; applicable_to?: string; per_page?: number; page?: number }): Promise<IApiResponse> {
|
|
64
|
+
const searchParams = new URLSearchParams();
|
|
65
|
+
if (params?.search) searchParams.set("search", params.search);
|
|
66
|
+
if (params?.status) searchParams.set("status", params.status);
|
|
67
|
+
if (params?.applicable_to) searchParams.set("applicable_to", params.applicable_to);
|
|
68
|
+
if (params?.per_page) searchParams.set("per_page", String(params.per_page));
|
|
69
|
+
if (params?.page) searchParams.set("page", String(params.page));
|
|
70
|
+
const qs = searchParams.toString();
|
|
71
|
+
const response = await sendRequest({ url: `${BASE_URL}/api/inventory/sku-templates${qs ? `?${qs}` : ""}`, method: "GET" });
|
|
72
|
+
return response.responseData as IApiResponse;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export async function getSkuComponentTemplate(id: number): Promise<IApiResponse> {
|
|
76
|
+
const response = await sendRequest({ url: `${BASE_URL}/api/inventory/sku-templates/${id}`, method: "GET" });
|
|
77
|
+
return response.responseData as IApiResponse;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export async function createSkuComponentTemplate(data: {
|
|
81
|
+
name: string;
|
|
82
|
+
description?: string;
|
|
83
|
+
config: any;
|
|
84
|
+
is_default?: boolean;
|
|
85
|
+
applicable_to?: string;
|
|
86
|
+
}): Promise<IApiResponse> {
|
|
87
|
+
const response = await sendRequest({ url: `${BASE_URL}/api/inventory/sku-templates`, method: "POST", data });
|
|
88
|
+
return response.responseData as IApiResponse;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export async function updateSkuComponentTemplate(id: number, data: {
|
|
92
|
+
name?: string;
|
|
93
|
+
description?: string;
|
|
94
|
+
config?: any;
|
|
95
|
+
is_default?: boolean;
|
|
96
|
+
status?: string;
|
|
97
|
+
applicable_to?: string;
|
|
98
|
+
}): Promise<IApiResponse> {
|
|
99
|
+
const response = await sendRequest({ url: `${BASE_URL}/api/inventory/sku-templates/${id}`, method: "PUT", data });
|
|
100
|
+
return response.responseData as IApiResponse;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
export async function deleteSkuComponentTemplate(id: number): Promise<IApiResponse> {
|
|
104
|
+
const response = await sendRequest({ url: `${BASE_URL}/api/inventory/sku-templates/${id}`, method: "DELETE" });
|
|
105
|
+
return response.responseData as IApiResponse;
|
|
106
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { sendRequest, IApiResponse } from "@apptimate/core-lib";
|
|
2
|
+
|
|
3
|
+
export async function getUsers(params: Record<string, string | number> = {}): Promise<IApiResponse> {
|
|
4
|
+
const queryParams = new URLSearchParams(params as Record<string, string>).toString();
|
|
5
|
+
const url = `${process.env.NEXT_PUBLIC_API_URL}/api/users${queryParams ? `?${queryParams}` : ""}`;
|
|
6
|
+
|
|
7
|
+
const response = await sendRequest({
|
|
8
|
+
url,
|
|
9
|
+
method: "GET",
|
|
10
|
+
});
|
|
11
|
+
return response.responseData as IApiResponse;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export async function createUser(data: any): Promise<IApiResponse> {
|
|
15
|
+
const response = await sendRequest({
|
|
16
|
+
url: `${process.env.NEXT_PUBLIC_API_URL}/api/users`,
|
|
17
|
+
method: "POST",
|
|
18
|
+
data,
|
|
19
|
+
});
|
|
20
|
+
return response.responseData as IApiResponse;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export async function updateUser(id: number, data: any): Promise<IApiResponse> {
|
|
24
|
+
const response = await sendRequest({
|
|
25
|
+
url: `${process.env.NEXT_PUBLIC_API_URL}/api/users/${id}`,
|
|
26
|
+
method: "PUT",
|
|
27
|
+
data,
|
|
28
|
+
});
|
|
29
|
+
return response.responseData as IApiResponse;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export async function deleteUser(id: number): Promise<IApiResponse> {
|
|
33
|
+
const response = await sendRequest({
|
|
34
|
+
url: `${process.env.NEXT_PUBLIC_API_URL}/api/users/${id}`,
|
|
35
|
+
method: "DELETE",
|
|
36
|
+
});
|
|
37
|
+
return response.responseData as IApiResponse;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export async function deactivateUser(id: number, status: string): Promise<IApiResponse> {
|
|
41
|
+
const response = await sendRequest({
|
|
42
|
+
url: `${process.env.NEXT_PUBLIC_API_URL}/api/users/${id}`,
|
|
43
|
+
method: "PUT",
|
|
44
|
+
data: { status }
|
|
45
|
+
});
|
|
46
|
+
return response.responseData as IApiResponse;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export async function getUserDetails(id: number): Promise<IApiResponse> {
|
|
50
|
+
const response = await sendRequest({
|
|
51
|
+
url: `${process.env.NEXT_PUBLIC_API_URL}/api/users/${id}`,
|
|
52
|
+
method: "GET",
|
|
53
|
+
});
|
|
54
|
+
return response.responseData as IApiResponse;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export async function getUserPermissions(id: number): Promise<IApiResponse> {
|
|
58
|
+
const response = await sendRequest({
|
|
59
|
+
url: `${process.env.NEXT_PUBLIC_API_URL}/api/users/${id}/permissions`,
|
|
60
|
+
method: "GET",
|
|
61
|
+
});
|
|
62
|
+
return response.responseData as IApiResponse;
|
|
63
|
+
}
|
|
64
|
+
|
package/src/constants/menus.ts
CHANGED
|
@@ -114,6 +114,7 @@ export const MENU_ITEM_REGISTRY: RegistryItem[] = [
|
|
|
114
114
|
{ key: 'inventory__transfers', label: 'Transfers', path: '/inventory/transfers', module: 'Inventory', defaultGroup: 'Operations', permission: null },
|
|
115
115
|
{ key: 'inventory__serials', label: 'Serial Numbers', path: '/inventory/serials', module: 'Inventory', defaultGroup: 'Stock', permission: null },
|
|
116
116
|
{ key: 'inventory__settings', label: 'Settings', path: '/inventory/settings', module: 'Inventory', defaultGroup: 'Settings', permission: 'inventory_setting.view' },
|
|
117
|
+
{ key: 'inventory__sku_components', label: 'SKU Configuration', path: '/inventory/settings/sku-components', module: 'Inventory', defaultGroup: 'Settings', permission: 'inventory_setting.view' },
|
|
117
118
|
|
|
118
119
|
// ── Sales Module ──
|
|
119
120
|
{ key: 'sales__price_lists', label: 'Price Lists', path: '/sales/price-lists', module: 'Sales', defaultGroup: 'Master Data', permission: null },
|
|
@@ -160,13 +161,14 @@ export const MENU_ITEM_REGISTRY: RegistryItem[] = [
|
|
|
160
161
|
{ key: 'jewelry__items', label: 'Jewelry Items', path: '/jewelry/items', module: 'Jewelry', defaultGroup: 'Catalog', permission: 'jewelry.items.view' },
|
|
161
162
|
|
|
162
163
|
{ key: 'jewelry__categories', label: 'Categories', path: '/jewelry/categories', module: 'Jewelry', defaultGroup: 'Catalog', permission: 'jewelry.categories.view' },
|
|
164
|
+
{ key: 'jewelry__services_master', label: 'Services', path: '/jewelry/services', module: 'Jewelry', defaultGroup: 'Catalog', permission: 'jewelry.services.view' },
|
|
163
165
|
{ key: 'jewelry__material_types', label: 'Material Types', path: '/jewelry/material-types', module: 'Jewelry', defaultGroup: 'Master Data', permission: 'jewelry.material_types.view' },
|
|
164
166
|
{ key: 'jewelry__purities', label: 'Purities', path: '/jewelry/purities', module: 'Jewelry', defaultGroup: 'Master Data', permission: 'jewelry.purities.view' },
|
|
165
167
|
{ key: 'jewelry__metal_rates', label: 'Metal Rates', path: '/jewelry/metal-rates', module: 'Jewelry', defaultGroup: 'Master Data', permission: 'jewelry.metal_rates.view' },
|
|
166
168
|
{ key: 'jewelry__purchase_orders', label: 'Purchase Orders', path: '/jewelry/procurement/orders', module: 'Jewelry', defaultGroup: 'Procurement', permission: 'jewelry.purchase_orders.view' },
|
|
167
169
|
{ key: 'jewelry__grn', label: 'Goods Receipt', path: '/jewelry/procurement/grn', module: 'Jewelry', defaultGroup: 'Procurement', permission: 'jewelry.grn.view' },
|
|
168
170
|
{ key: 'jewelry__custom_orders', label: 'Custom Orders', path: '/jewelry/custom-orders', module: 'Jewelry', defaultGroup: 'Procurement', permission: 'jewelry.custom_orders.view' },
|
|
169
|
-
{ key: 'jewelry__service_orders', label: 'Service Orders', path: '/jewelry/service-orders', module: 'Jewelry', defaultGroup: 'Procurement', permission: 'jewelry.
|
|
171
|
+
{ key: 'jewelry__service_orders', label: 'Service Orders', path: '/jewelry/service-orders', module: 'Jewelry', defaultGroup: 'Procurement', permission: 'jewelry.service_orders.view' },
|
|
170
172
|
{ key: 'jewelry__opening_stock', label: 'Opening Stock', path: '/jewelry/procurement/opening_stock', module: 'Jewelry', defaultGroup: 'Procurement', permission: 'jewelry.opening_stock.view' },
|
|
171
173
|
{ key: 'jewelry__transformations', label: 'Transformations', path: '/jewelry/procurement/transformations', module: 'Jewelry', defaultGroup: 'Procurement', permission: 'jewelry.transformations.view' },
|
|
172
174
|
{ key: 'jewelry__old_gold_purchases', label: 'Old Material Purchases', path: '/jewelry/old-gold-purchases', module: 'Jewelry', defaultGroup: 'Buying', permission: 'jewelry.old_gold_purchases.view' },
|
|
@@ -229,6 +231,7 @@ export const MENU_ITEM_REGISTRY: RegistryItem[] = [
|
|
|
229
231
|
{ key: 'money_exchange__denominations', label: 'Denomination', path: '/money-exchange/denominations', module: 'Money Exchange', defaultGroup: 'Config', permission: 'money_exchange.denominations.view' },
|
|
230
232
|
{ key: 'money_exchange__till_thresholds', label: 'Till Thresholds', path: '/money-exchange/till-thresholds', module: 'Money Exchange', defaultGroup: 'Config', permission: 'money_exchange.till_thresholds.view' },
|
|
231
233
|
{ key: 'money_exchange__cross_currency', label: 'Margin Rate', path: '/money-exchange/cross-currency', module: 'Money Exchange', defaultGroup: 'Config', permission: 'money_exchange.cross_currency.view' },
|
|
234
|
+
{ key: 'money_exchange__currency_adjustments', label: 'Currency Adjustments', path: '/money-exchange/currency-adjustments', module: 'Money Exchange', defaultGroup: 'Config', permission: 'money_exchange.currency_adjustments.view' },
|
|
232
235
|
|
|
233
236
|
// ── Reports Module (Admin/General) ──
|
|
234
237
|
{ key: 'reports__jewelry', label: 'Jewelry', path: '/reports/jewelry', module: 'Reporting', defaultGroup: 'Dashboards', permission: null },
|
|
@@ -415,7 +418,7 @@ export const MENU_PRESETS: MenuPreset[] = [
|
|
|
415
418
|
'inventory__items', 'inventory__categories', 'inventory__brands', 'inventory__uom',
|
|
416
419
|
'inventory__stock', 'inventory__ledger',
|
|
417
420
|
'inventory__opening_stock', 'inventory__adjustments', 'inventory__transfers', 'inventory__serials',
|
|
418
|
-
'inventory__settings'
|
|
421
|
+
'inventory__settings', 'inventory__sku_components'
|
|
419
422
|
],
|
|
420
423
|
},
|
|
421
424
|
{
|
|
@@ -456,7 +459,7 @@ export const MENU_PRESETS: MenuPreset[] = [
|
|
|
456
459
|
label: 'Jewelry',
|
|
457
460
|
iconName: 'Gem',
|
|
458
461
|
secondaryItems: [
|
|
459
|
-
'jewelry__items', 'jewelry__categories',
|
|
462
|
+
'jewelry__items', 'jewelry__categories', 'jewelry__services_master',
|
|
460
463
|
'jewelry__material_types', 'jewelry__purities', 'jewelry__metal_rates',
|
|
461
464
|
'jewelry__purchase_orders', 'jewelry__grn', 'jewelry__opening_stock', 'jewelry__custom_orders', 'jewelry__service_orders', 'jewelry__transformations',
|
|
462
465
|
'jewelry__old_gold_purchases',
|
|
@@ -502,6 +505,7 @@ export const MENU_PRESETS: MenuPreset[] = [
|
|
|
502
505
|
'money_exchange__denominations',
|
|
503
506
|
'money_exchange__till_thresholds',
|
|
504
507
|
'money_exchange__cross_currency',
|
|
508
|
+
'money_exchange__currency_adjustments',
|
|
505
509
|
],
|
|
506
510
|
},
|
|
507
511
|
{
|
package/src/index.ts
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
export * from './client';
|
|
4
4
|
// Inventory API Services
|
|
5
5
|
export * from './api-services/inventory/inventory-settings.client';
|
|
6
|
+
export * from './api-services/inventory/sku-components.client';
|
|
6
7
|
export * from './api-services/inventory/items.client';
|
|
7
8
|
export * from './api-services/inventory/categories.client';
|
|
8
9
|
export * from './api-services/inventory/brands.client';
|
|
@@ -18,3 +19,5 @@ export * from './api-services/hr-employees.client';
|
|
|
18
19
|
export * from './api-services/email-services.client';
|
|
19
20
|
export * from './api-services/email-templates.client';
|
|
20
21
|
export * from "./api-services/finance-shared.client";
|
|
22
|
+
export * from './api-services/users.client';
|
|
23
|
+
export * from './api-services/entity-extensions.client';
|