@7365admin1/layer-common 4.17.1-staging.330 → 4.17.1-staging.331

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.
@@ -30,10 +30,12 @@ export default function useMechanicalElectricalPermission() {
30
30
  workOrderPermissions,
31
31
  bulletinBoardPermissions,
32
32
 
33
+ inventoryPermissions,
33
34
  } = useCommonPermissions();
34
35
  const { permissions: schedulePermissions } = useCleaningPermission();
35
36
 
36
37
  const permissions: TPermissions = {
38
+ inventory: inventoryPermissions,
37
39
  members: memberPermissions,
38
40
  roles: rolePermissions,
39
41
  invitations: invitationPermissions,
@@ -30,8 +30,10 @@ export default function usePestControlPermission() {
30
30
  bulletinBoardPermissions,
31
31
  serviceProviderPermissions,
32
32
 
33
+ inventoryPermissions,
33
34
  } = useCommonPermissions();
34
35
  const permissions: TPermissions = {
36
+ inventory: inventoryPermissions,
35
37
  members: memberPermissions,
36
38
  roles: rolePermissions,
37
39
  invitations: invitationPermissions,
@@ -30,8 +30,10 @@ export default function usePoolMaintenancePermission() {
30
30
  bulletinBoardPermissions,
31
31
  serviceProviderPermissions,
32
32
 
33
+ inventoryPermissions,
33
34
  } = useCommonPermissions();
34
35
  const permissions: TPermissions = {
36
+ inventory: inventoryPermissions,
35
37
  members: memberPermissions,
36
38
  roles: rolePermissions,
37
39
  invitations: invitationPermissions,
@@ -41,10 +41,12 @@ export default function usePropertyPermission() {
41
41
  buildingUnitManagementPermissions,
42
42
  siteSettingsPermissions,
43
43
 
44
+ inventoryPermissions,
44
45
  } = useCommonPermissions();
45
46
 
46
47
 
47
48
  const permissions: TPermissions = {
49
+ inventory: inventoryPermissions,
48
50
  members: memberPermissions,
49
51
  roles: rolePermissions,
50
52
  invitations: invitationPermissions,
@@ -32,9 +32,11 @@ export default function useSecurityPermission() {
32
32
  siteSettingsPermissions,
33
33
  bulletinBoardPermissions,
34
34
 
35
+ inventoryPermissions,
35
36
  } = useCommonPermissions();
36
37
 
37
38
  const permissions: TPermissions = {
39
+ inventory: inventoryPermissions,
38
40
  feedbacks: {
39
41
  "add-feedback": {
40
42
  check: true,
@@ -169,6 +169,7 @@ export const PERMISSIONS = {
169
169
  "import-units",
170
170
  "delete-unit",
171
171
  ],
172
+ inventory: ["view-inventory", "request-stock", "approve-requests", "manage-inventory"],
172
173
  "supply-mgmt": [
173
174
  "see-all-supplies",
174
175
  "add-supply",
@@ -199,7 +200,6 @@ export const PERMISSIONS = {
199
200
  "manage-attendance-settings",
200
201
  ],
201
202
  "my-attendance": ["see-own-attendance", "check-in-out"],
202
- inventory: ["view-inventory"],
203
203
  toilet_locations: ["create-toilet-location"],
204
204
 
205
205
  // ---- per-trade schedules ----
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@7365admin1/layer-common",
3
3
  "license": "MIT",
4
4
  "type": "module",
5
- "version": "4.17.1-staging.330",
5
+ "version": "4.17.1-staging.331",
6
6
  "author": "7365admin1",
7
7
  "main": "./nuxt.config.ts",
8
8
  "//files": "What a consumer extending this layer actually loads. Without this npm ships the whole working tree - the changesets, the CI workflows, the render harness in tools/ and any scratch directory that happened to exist at publish time. Nuxt resolves a layer by directory, so every runtime directory below has to stay listed; adding a new top-level runtime directory means adding it here too.",
@@ -0,0 +1,89 @@
1
+ declare type TInventoryAccess = {
2
+ canView: boolean;
3
+ canManage: boolean;
4
+ canApprove: boolean;
5
+ canRequest: boolean;
6
+ };
7
+
8
+ declare type TInventoryStore = {
9
+ _id: string;
10
+ org: string;
11
+ orgName?: string;
12
+ ownerType: "property" | "service_provider";
13
+ name: string;
14
+ sites: string[];
15
+ showInResidentApp: boolean;
16
+ showCostInResidentApp: boolean;
17
+ access: TInventoryAccess;
18
+ };
19
+
20
+ declare type TInventoryItem = {
21
+ _id: string;
22
+ store: string;
23
+ name: string;
24
+ code: string;
25
+ category: string;
26
+ unit: string;
27
+ description: string;
28
+ photo: string;
29
+ reorderLevel: number;
30
+ unitCost?: number;
31
+ onHand: number;
32
+ status: "active" | "inactive";
33
+ lowStock: boolean;
34
+ };
35
+
36
+ declare type TInventoryLine = { item: string; qty: number };
37
+
38
+ declare type TInventoryRequest = {
39
+ _id: string;
40
+ store: string;
41
+ site: string;
42
+ requestedBy: string;
43
+ requestedByName: string;
44
+ lines: { item: string; itemName: string; unit: string; qty: number; issuedQty: number }[];
45
+ reference: string;
46
+ remarks: string;
47
+ status: "pending" | "issued" | "rejected" | "cancelled";
48
+ decidedByName?: string;
49
+ decidedAt?: string;
50
+ decisionRemarks?: string;
51
+ createdAt: string;
52
+ };
53
+
54
+ declare type TInventoryHolding = {
55
+ _id: string;
56
+ item: string;
57
+ itemName: string;
58
+ unit: string;
59
+ photo: string;
60
+ holder: string;
61
+ holderName: string;
62
+ qty: number;
63
+ };
64
+
65
+ declare type TInventoryTransaction = {
66
+ _id: string;
67
+ item: string;
68
+ itemName: string;
69
+ unit: string;
70
+ type: "opening" | "receive" | "issue" | "use" | "return" | "adjust";
71
+ qty: number;
72
+ storeChange: number;
73
+ storeBalance: number;
74
+ holderName?: string;
75
+ holderChange?: number;
76
+ holderBalance?: number;
77
+ site?: string;
78
+ location?: { type: "common_area" | "tenant_unit"; area?: string; unitName?: string; tenantName?: string };
79
+ reference?: string;
80
+ supplier?: string;
81
+ unitCost: number;
82
+ totalCost: number;
83
+ photos?: { before: string[]; after: string[]; other: string[] };
84
+ remarks?: string;
85
+ date: string;
86
+ createdByName: string;
87
+ };
88
+
89
+ declare type TInventoryPeriod = { from: string; to: string; site?: string; locationType?: string };
@@ -70,6 +70,7 @@ export const MODULE_ROUTES: Readonly<Record<string, string>> = Object.freeze({
70
70
  "org-site-soa-mgmt": "SOA-mgmt",
71
71
  "org-site-people-mgmt": "people-mgmt",
72
72
  "org-site-supply-mgmt": "supply-mgmt",
73
+ "org-site-inventory": "inventory",
73
74
  "org-site-facility": "facility-mgmt",
74
75
  "org-site-facility-mgmt": "facility-mgmt",
75
76
  "org-site-facility-booking": "facility-booking-mgmt",