@litusarchieve18/agricore-utils 1.0.20 → 1.0.22
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 +10 -0
- package/dist/{chunk-XD36URZU.mjs → chunk-V2DL7OTH.mjs} +70 -13
- package/dist/{constants-C_Pwif6Q.d.mts → constants-lhTP4wzB.d.mts} +51 -12
- package/dist/{constants-C_Pwif6Q.d.ts → constants-lhTP4wzB.d.ts} +51 -12
- package/dist/constants.d.mts +1 -1
- package/dist/constants.d.ts +1 -1
- package/dist/constants.js +71 -13
- package/dist/constants.mjs +3 -1
- package/dist/index.d.mts +17 -15
- package/dist/index.d.ts +17 -15
- package/dist/index.js +196 -62
- package/dist/index.mjs +120 -45
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -183,6 +183,16 @@ Run the publish command:
|
|
|
183
183
|
Bash
|
|
184
184
|
npm publish --access public
|
|
185
185
|
📝 Version History
|
|
186
|
+
V1.0.25 —
|
|
187
|
+
|
|
188
|
+
V1.0.24 —
|
|
189
|
+
|
|
190
|
+
V1.0.23 —
|
|
191
|
+
|
|
192
|
+
V1.0.22 — refactor session object to include multiple roles and privileges
|
|
193
|
+
|
|
194
|
+
V1.0.21 — add finance access and some top menu section that were missing
|
|
195
|
+
|
|
186
196
|
V1.0.20 — add inventory access reconcile
|
|
187
197
|
|
|
188
198
|
V1.0.19 — refactor inventory access in RESOURCE_PATHS
|
|
@@ -84,6 +84,34 @@ var AccessLevel = {
|
|
|
84
84
|
READ: "READ",
|
|
85
85
|
WRITE: "WRITE"
|
|
86
86
|
};
|
|
87
|
+
var SESSION_SCHEMA = [
|
|
88
|
+
{ key: "u", path: "userId", type: "scalar" },
|
|
89
|
+
{ key: "n", path: "userName", type: "scalar" },
|
|
90
|
+
{ key: "e", path: "userEmail", type: "scalar" },
|
|
91
|
+
{ key: "c", path: "companyId", type: "scalar" },
|
|
92
|
+
{ key: "a", path: "activeScopeId", type: "scalar" },
|
|
93
|
+
{
|
|
94
|
+
key: "cc",
|
|
95
|
+
path: "companyConfig",
|
|
96
|
+
type: "object",
|
|
97
|
+
fields: [{ key: "me", path: "isMultiEntity", type: "scalar" }]
|
|
98
|
+
},
|
|
99
|
+
{ key: "m", path: "enabledModules", type: "scalar" },
|
|
100
|
+
{ key: "ra", path: "roleAssignments", type: "scalar" },
|
|
101
|
+
{
|
|
102
|
+
key: "as",
|
|
103
|
+
path: "availableScopes",
|
|
104
|
+
type: "recordArray",
|
|
105
|
+
fields: [
|
|
106
|
+
{ key: "ai", path: "authScopeId", type: "scalar" },
|
|
107
|
+
{ key: "bi", path: "base44Id", type: "scalar" },
|
|
108
|
+
{ key: "t", path: "type", type: "scalar", enum: ["company", "legalEntity", "facility"] },
|
|
109
|
+
{ key: "nm", path: "name", type: "scalar" },
|
|
110
|
+
{ key: "pi", path: "parentId", type: "scalar" }
|
|
111
|
+
]
|
|
112
|
+
},
|
|
113
|
+
{ key: "ro", path: "resourceOverrides", type: "scalar" }
|
|
114
|
+
];
|
|
87
115
|
var EnabledModule = {
|
|
88
116
|
FARM_MANAGEMENT: "farm_management",
|
|
89
117
|
PACKHOUSE: "packhouse",
|
|
@@ -345,38 +373,47 @@ var RESOURCE_PATHS = {
|
|
|
345
373
|
// ── Operations ────────────────────────────────────────────────────────────
|
|
346
374
|
farmManagement: "operations.farmManagement",
|
|
347
375
|
packhouse: "operations.packhouse",
|
|
376
|
+
accommodation: "operations.accommodation",
|
|
348
377
|
// ── Inventory ────────────────────────────────────────────────────────────
|
|
349
378
|
// === Consumables ===
|
|
379
|
+
inventory: "inventory",
|
|
380
|
+
inventoryConsumable: "inventory.consumable",
|
|
350
381
|
inventoryConsumableProduct: "inventory.consumable.product",
|
|
351
382
|
inventoryConsumableStock: "inventory.consumable.stock",
|
|
352
383
|
inventoryConsumableStockEditThreshold: "inventory.consumable.stock.editThreshold",
|
|
353
384
|
inventoryConsumableStockReconcile: "inventory.consumable.stock.reconcile",
|
|
354
385
|
inventoryConsumableStockMovement: "inventory.consumable.stockMovement",
|
|
355
386
|
inventoryConsumableStockMovementTransfer: "inventory.consumable.stockMovement.transfer",
|
|
356
|
-
inventoryConsumableStockMovementPurchase: "inventory.consumable.stockMovement.purchase",
|
|
387
|
+
// inventoryConsumableStockMovementPurchase: "inventory.consumable.stockMovement.purchase",
|
|
357
388
|
// === Chemicals ===
|
|
389
|
+
inventoryChemical: "inventory.chemical",
|
|
358
390
|
inventoryChemicalProduct: "inventory.chemical.product",
|
|
359
391
|
inventoryChemicalStock: "inventory.chemical.stock",
|
|
360
392
|
inventoryChemicalStockEditThreshold: "inventory.chemical.stock.editThreshold",
|
|
361
393
|
inventoryChemicalStockReconcile: "inventory.chemical.stock.reconcile",
|
|
362
394
|
inventoryChemicalStockMovement: "inventory.chemical.stockMovement",
|
|
363
395
|
inventoryChemicalStockMovementTransfer: "inventory.chemical.stockMovement.transfer",
|
|
364
|
-
inventoryChemicalStockMovementPurchase: "inventory.chemical.stockMovement.purchase",
|
|
396
|
+
// inventoryChemicalStockMovementPurchase: "inventory.chemical.stockMovement.purchase",
|
|
365
397
|
// === Maintenance Parts ===
|
|
398
|
+
inventoryMaintenancePart: "inventory.maintenancePart",
|
|
366
399
|
inventoryMaintenancePartProduct: "inventory.maintenancePart.product",
|
|
367
400
|
inventoryMaintenancePartStock: "inventory.maintenancePart.stock",
|
|
368
401
|
inventoryMaintenancePartStockEditThreshold: "inventory.maintenancePart.stock.editThreshold",
|
|
369
402
|
inventoryMaintenancePartStockReconcile: "inventory.maintenancePart.stock.reconcile",
|
|
370
403
|
inventoryMaintenancePartStockMovement: "inventory.maintenancePart.stockMovement",
|
|
371
404
|
inventoryMaintenancePartStockMovementTransfer: "inventory.maintenancePart.stockMovement.transfer",
|
|
372
|
-
inventoryMaintenancePartStockMovementPurchase: "inventory.maintenancePart.stockMovement.purchase",
|
|
373
|
-
accommodation: "operations.accommodation",
|
|
405
|
+
// inventoryMaintenancePartStockMovementPurchase: "inventory.maintenancePart.stockMovement.purchase",
|
|
374
406
|
// ── Equipment & Fleet ──────────────────────────────────────────────────────
|
|
375
407
|
equipPreStart: "equipment.preStart",
|
|
376
408
|
equipMaintenance: "equipment.maintenance",
|
|
377
409
|
equipFuelRegister: "equipment.fuelRegister",
|
|
378
410
|
equipCalibration: "equipment.calibration",
|
|
379
411
|
equipFleet: "equipment.fleetManagement",
|
|
412
|
+
finance: "finance",
|
|
413
|
+
financeProductRequisition: "finance.product.requistion",
|
|
414
|
+
financeDashboard: "finance.dashboard",
|
|
415
|
+
financeTransaction: "finance.transaction",
|
|
416
|
+
financeBudgetAllocation: "finance.budgetAllocation",
|
|
380
417
|
// ── Safety, Quality & Compliance ──────────────────────────────────────────
|
|
381
418
|
safetyAuditing: "safety.auditing",
|
|
382
419
|
safetyFood: "safety.foodSafety",
|
|
@@ -402,14 +439,20 @@ var RESOURCE_MODULE_MAP = {
|
|
|
402
439
|
[RESOURCE_PATHS.equipment]: ALL_OPERATIONS,
|
|
403
440
|
[RESOURCE_PATHS.safety]: ALL_OPERATIONS,
|
|
404
441
|
[RESOURCE_PATHS.team]: ALL_OPERATIONS,
|
|
442
|
+
[RESOURCE_PATHS.inventory]: ALL_OPERATIONS,
|
|
443
|
+
[RESOURCE_PATHS.finance]: ALL_OPERATIONS,
|
|
405
444
|
[RESOURCE_PATHS.records]: ALL_OPERATIONS,
|
|
406
445
|
[RESOURCE_PATHS.adminSettings]: ALL_OPERATIONS,
|
|
407
446
|
// ── Inventory ──────────────────────────────────────────────────────
|
|
447
|
+
[RESOURCE_PATHS.inventoryConsumable]: ALL_OPERATIONS,
|
|
408
448
|
[RESOURCE_PATHS.inventoryConsumableProduct]: ALL_OPERATIONS,
|
|
409
449
|
[RESOURCE_PATHS.inventoryConsumableStock]: ALL_OPERATIONS,
|
|
410
450
|
[RESOURCE_PATHS.inventoryConsumableStockMovement]: ALL_OPERATIONS,
|
|
451
|
+
[RESOURCE_PATHS.inventoryChemical]: ALL_OPERATIONS,
|
|
411
452
|
[RESOURCE_PATHS.inventoryChemicalProduct]: ALL_OPERATIONS,
|
|
412
453
|
[RESOURCE_PATHS.inventoryChemicalStock]: ALL_OPERATIONS,
|
|
454
|
+
[RESOURCE_PATHS.inventoryChemicalStockMovement]: ALL_OPERATIONS,
|
|
455
|
+
[RESOURCE_PATHS.inventoryMaintenancePart]: ALL_OPERATIONS,
|
|
413
456
|
[RESOURCE_PATHS.inventoryMaintenancePartProduct]: ALL_OPERATIONS,
|
|
414
457
|
[RESOURCE_PATHS.inventoryMaintenancePartStock]: ALL_OPERATIONS,
|
|
415
458
|
[RESOURCE_PATHS.inventoryMaintenancePartStockMovement]: ALL_OPERATIONS,
|
|
@@ -498,9 +541,9 @@ var RESOURCE_REQUIREMENTS = {
|
|
|
498
541
|
[RESOURCE_PATHS.inventoryConsumableStockMovementTransfer]: {
|
|
499
542
|
allowedRoles: [UserRole.OWNER, UserRole.MANAGER, UserRole.SUPERVISOR]
|
|
500
543
|
},
|
|
501
|
-
[RESOURCE_PATHS.inventoryConsumableStockMovementPurchase]: {
|
|
502
|
-
|
|
503
|
-
},
|
|
544
|
+
// [RESOURCE_PATHS.inventoryConsumableStockMovementPurchase]: {
|
|
545
|
+
// allowedRoles: [UserRole.OWNER, UserRole.MANAGER]
|
|
546
|
+
// },
|
|
504
547
|
// CHEMICALS PERMISSIONS
|
|
505
548
|
[RESOURCE_PATHS.inventoryChemicalProduct]: {
|
|
506
549
|
allowedRoles: [UserRole.OWNER, UserRole.MANAGER, UserRole.SUPERVISOR]
|
|
@@ -516,9 +559,9 @@ var RESOURCE_REQUIREMENTS = {
|
|
|
516
559
|
[RESOURCE_PATHS.inventoryChemicalStockMovementTransfer]: {
|
|
517
560
|
allowedRoles: [UserRole.OWNER, UserRole.MANAGER, UserRole.SUPERVISOR]
|
|
518
561
|
},
|
|
519
|
-
[RESOURCE_PATHS.inventoryChemicalStockMovementPurchase]: {
|
|
520
|
-
|
|
521
|
-
},
|
|
562
|
+
// [RESOURCE_PATHS.inventoryChemicalStockMovementPurchase]: {
|
|
563
|
+
// allowedRoles: [UserRole.OWNER, UserRole.MANAGER]
|
|
564
|
+
// },
|
|
522
565
|
[RESOURCE_PATHS.inventoryMaintenancePartProduct]: {
|
|
523
566
|
allowedRoles: [UserRole.OWNER, UserRole.MANAGER, UserRole.SUPERVISOR]
|
|
524
567
|
},
|
|
@@ -530,11 +573,24 @@ var RESOURCE_REQUIREMENTS = {
|
|
|
530
573
|
allowedRoles: [UserRole.OWNER, UserRole.MANAGER, UserRole.SUPERVISOR]
|
|
531
574
|
},
|
|
532
575
|
[RESOURCE_PATHS.inventoryMaintenancePartStockMovement]: { allowedRoles: EVERYONE },
|
|
533
|
-
[RESOURCE_PATHS.inventoryMaintenancePartStockMovementPurchase]: {
|
|
576
|
+
// [RESOURCE_PATHS.inventoryMaintenancePartStockMovementPurchase]: {
|
|
577
|
+
// allowedRoles: [UserRole.OWNER, UserRole.MANAGER]
|
|
578
|
+
// },
|
|
579
|
+
// ── Finance ────────────────────────────────────────────────────────────────
|
|
580
|
+
[RESOURCE_PATHS.financeProductRequisition]: {
|
|
534
581
|
allowedRoles: [UserRole.OWNER, UserRole.MANAGER]
|
|
535
582
|
},
|
|
536
|
-
[RESOURCE_PATHS.
|
|
537
|
-
allowedRoles: [UserRole.OWNER,
|
|
583
|
+
[RESOURCE_PATHS.financeBudgetAllocation]: {
|
|
584
|
+
allowedRoles: [UserRole.OWNER],
|
|
585
|
+
requiredPrivileges: [UserPrivilege.FINANCE]
|
|
586
|
+
},
|
|
587
|
+
[RESOURCE_PATHS.financeDashboard]: {
|
|
588
|
+
allowedRoles: [UserRole.OWNER],
|
|
589
|
+
requiredPrivileges: [UserPrivilege.FINANCE]
|
|
590
|
+
},
|
|
591
|
+
[RESOURCE_PATHS.financeTransaction]: {
|
|
592
|
+
allowedRoles: [UserRole.OWNER],
|
|
593
|
+
requiredPrivileges: [UserPrivilege.FINANCE]
|
|
538
594
|
},
|
|
539
595
|
// ── Admin Settings ─────────────────────────────────────────────────────────
|
|
540
596
|
[RESOURCE_PATHS.adminUserRoster]: {
|
|
@@ -904,6 +960,7 @@ export {
|
|
|
904
960
|
UserRole,
|
|
905
961
|
UserPrivilege,
|
|
906
962
|
AccessLevel,
|
|
963
|
+
SESSION_SCHEMA,
|
|
907
964
|
EnabledModule,
|
|
908
965
|
FacilityType,
|
|
909
966
|
LinkedStatus,
|
|
@@ -7,6 +7,10 @@ interface AvailableScope {
|
|
|
7
7
|
name: string;
|
|
8
8
|
parentId: string | null;
|
|
9
9
|
}
|
|
10
|
+
interface RoleAssignment {
|
|
11
|
+
role: string;
|
|
12
|
+
privileges: string[];
|
|
13
|
+
}
|
|
10
14
|
interface CompanyConfig {
|
|
11
15
|
isMultiEntity: boolean;
|
|
12
16
|
}
|
|
@@ -28,15 +32,43 @@ interface AgriCoreSession {
|
|
|
28
32
|
userName: string;
|
|
29
33
|
userEmail: string;
|
|
30
34
|
companyId: string;
|
|
31
|
-
activeScopeId: string
|
|
32
|
-
companyConfig:
|
|
33
|
-
|
|
34
|
-
|
|
35
|
+
activeScopeId: string;
|
|
36
|
+
companyConfig: {
|
|
37
|
+
isMultiEntity: boolean;
|
|
38
|
+
};
|
|
35
39
|
enabledModules: string[];
|
|
36
|
-
|
|
37
|
-
writeScopes: string[];
|
|
40
|
+
roleAssignments: Record<string, RoleAssignment>;
|
|
38
41
|
availableScopes: AvailableScope[];
|
|
39
|
-
resourceOverrides:
|
|
42
|
+
resourceOverrides: Record<string, Record<string, PermissionLevel>>;
|
|
43
|
+
}
|
|
44
|
+
type WireAvailableScope = [
|
|
45
|
+
authScopeId: string,
|
|
46
|
+
base44Id: string,
|
|
47
|
+
typeCode: number,
|
|
48
|
+
name: string,
|
|
49
|
+
parentId: string | null
|
|
50
|
+
];
|
|
51
|
+
interface WireSession {
|
|
52
|
+
u: string;
|
|
53
|
+
n: string;
|
|
54
|
+
e: string;
|
|
55
|
+
c: string;
|
|
56
|
+
a: string;
|
|
57
|
+
cc: {
|
|
58
|
+
me: boolean;
|
|
59
|
+
};
|
|
60
|
+
m: string[];
|
|
61
|
+
ra: Record<string, RoleAssignment>;
|
|
62
|
+
as: WireAvailableScope[];
|
|
63
|
+
ro: Record<string, Record<string, PermissionLevel>>;
|
|
64
|
+
}
|
|
65
|
+
type FieldType = "scalar" | "object" | "recordArray";
|
|
66
|
+
interface SchemaField {
|
|
67
|
+
key: string;
|
|
68
|
+
path: string;
|
|
69
|
+
type: FieldType;
|
|
70
|
+
fields?: SchemaField[];
|
|
71
|
+
enum?: readonly string[];
|
|
40
72
|
}
|
|
41
73
|
interface ResolvedError {
|
|
42
74
|
title: string;
|
|
@@ -216,6 +248,7 @@ declare const AccessLevel: {
|
|
|
216
248
|
readonly READ: "READ";
|
|
217
249
|
readonly WRITE: "WRITE";
|
|
218
250
|
};
|
|
251
|
+
declare const SESSION_SCHEMA: SchemaField[];
|
|
219
252
|
declare const EnabledModule: {
|
|
220
253
|
readonly FARM_MANAGEMENT: "farm_management";
|
|
221
254
|
readonly PACKHOUSE: "packhouse";
|
|
@@ -430,33 +463,39 @@ declare const RESOURCE_PATHS: {
|
|
|
430
463
|
adminCompanySettings: string;
|
|
431
464
|
farmManagement: string;
|
|
432
465
|
packhouse: string;
|
|
466
|
+
accommodation: string;
|
|
467
|
+
inventory: string;
|
|
468
|
+
inventoryConsumable: string;
|
|
433
469
|
inventoryConsumableProduct: string;
|
|
434
470
|
inventoryConsumableStock: string;
|
|
435
471
|
inventoryConsumableStockEditThreshold: string;
|
|
436
472
|
inventoryConsumableStockReconcile: string;
|
|
437
473
|
inventoryConsumableStockMovement: string;
|
|
438
474
|
inventoryConsumableStockMovementTransfer: string;
|
|
439
|
-
|
|
475
|
+
inventoryChemical: string;
|
|
440
476
|
inventoryChemicalProduct: string;
|
|
441
477
|
inventoryChemicalStock: string;
|
|
442
478
|
inventoryChemicalStockEditThreshold: string;
|
|
443
479
|
inventoryChemicalStockReconcile: string;
|
|
444
480
|
inventoryChemicalStockMovement: string;
|
|
445
481
|
inventoryChemicalStockMovementTransfer: string;
|
|
446
|
-
|
|
482
|
+
inventoryMaintenancePart: string;
|
|
447
483
|
inventoryMaintenancePartProduct: string;
|
|
448
484
|
inventoryMaintenancePartStock: string;
|
|
449
485
|
inventoryMaintenancePartStockEditThreshold: string;
|
|
450
486
|
inventoryMaintenancePartStockReconcile: string;
|
|
451
487
|
inventoryMaintenancePartStockMovement: string;
|
|
452
488
|
inventoryMaintenancePartStockMovementTransfer: string;
|
|
453
|
-
inventoryMaintenancePartStockMovementPurchase: string;
|
|
454
|
-
accommodation: string;
|
|
455
489
|
equipPreStart: string;
|
|
456
490
|
equipMaintenance: string;
|
|
457
491
|
equipFuelRegister: string;
|
|
458
492
|
equipCalibration: string;
|
|
459
493
|
equipFleet: string;
|
|
494
|
+
finance: string;
|
|
495
|
+
financeProductRequisition: string;
|
|
496
|
+
financeDashboard: string;
|
|
497
|
+
financeTransaction: string;
|
|
498
|
+
financeBudgetAllocation: string;
|
|
460
499
|
safetyAuditing: string;
|
|
461
500
|
safetyFood: string;
|
|
462
501
|
safetyWhs: string;
|
|
@@ -628,4 +667,4 @@ declare const StockPolicyTier: {
|
|
|
628
667
|
readonly BY_LOCATION: 3;
|
|
629
668
|
};
|
|
630
669
|
|
|
631
|
-
export { NettingType as $, ACCESS_RANK as A, BarcodeNamespace as B, CAR_SUPPORTED_EVIDENCE_MIME_TYPES as C, type CorrectiveActionCompileTaskMetadata as D, type CorrectiveActionGenerationSource as E, type CorrectiveActionStatus as F, CropCycleStatus as G, DOCUMENT_DISPLAY_INFO as H, DOCUMENT_MENU_MAP as I, DocumentCategory as J, DocumentType as K, ERROR_DICTIONARY as L, EVERYONE as M, EmitterType as N, EnabledModule as O, FORM_REGISTRY as P, FacilityType as Q, type FileUploadTaskType as R, type FormMeta as S, HarvestMethod as T, type InfrastructureFields as U, LinkedStatus as V, MOD as W, MODULE_LABELS as X, MicroclimateZone as Y, MimeType as Z, type ModCode as _, ACT as a, type NormalizedSignatureValue as a0, NotificationMode as a1, OrderStatus as a2, type PermissionLevel as a3, PhysicalState as a4, PlantingMethod as a5, ProductType as a6, type ProductTypeType as a7, ProductUnit as a8, type ProductUnitType as a9, type TemplateScopeLevel as
|
|
670
|
+
export { NettingType as $, ACCESS_RANK as A, BarcodeNamespace as B, CAR_SUPPORTED_EVIDENCE_MIME_TYPES as C, type CorrectiveActionCompileTaskMetadata as D, type CorrectiveActionGenerationSource as E, type CorrectiveActionStatus as F, CropCycleStatus as G, DOCUMENT_DISPLAY_INFO as H, DOCUMENT_MENU_MAP as I, DocumentCategory as J, DocumentType as K, ERROR_DICTIONARY as L, EVERYONE as M, EmitterType as N, EnabledModule as O, FORM_REGISTRY as P, FacilityType as Q, type FileUploadTaskType as R, type FormMeta as S, HarvestMethod as T, type InfrastructureFields as U, LinkedStatus as V, MOD as W, MODULE_LABELS as X, MicroclimateZone as Y, MimeType as Z, type ModCode as _, ACT as a, type NormalizedSignatureValue as a0, NotificationMode as a1, OrderStatus as a2, type PermissionLevel as a3, PhysicalState as a4, PlantingMethod as a5, ProductType as a6, type ProductTypeType as a7, ProductUnit as a8, type ProductUnitType as a9, TaskStatus as aA, TaskType as aB, type TaskTypeConfig as aC, type TemplateScopeLevel as aD, TransactionType as aE, TrellisType as aF, UserPrivilege as aG, UserRole as aH, type UserRoleType as aI, VigorRating as aJ, WaterSource as aK, type WireSession as aL, RESOURCE_MODULE_MAP as aa, RESOURCE_PATHS as ab, RESOURCE_REQUIREMENTS as ac, ROLE_SECTIONS_BY_KEY as ad, RelationshipType as ae, type ResolvedError as af, type ResourceOverrides as ag, type ResourceRequirement as ah, type RoleAssignment as ai, RowOrientation as aj, SENTINEL_UUID as ak, SESSION_SCHEMA as al, SIGNATURE_MODES as am, type SchemaField as an, type ScopeType as ao, type SignatureInput as ap, type SignatureMode as aq, SoilTexture as ar, StockPolicyTier as as, type StockPolicyTierType as at, StoragePhases as au, type StorageType as av, TASK_TYPE_REGISTRY as aw, TEMPLATE_SCOPE_LEVELS as ax, type TabConfig as ay, TargetEntityType as az, AccessLevel as b, type AccessLevelType as c, type AgriCoreSession as d, ApprovalStatus as e, ApprovalType as f, AuditStatus as g, AuditType as h, type AuthScopeFields as i, type AvailableScope as j, type BarcodeNamespaceType as k, BarcodeType as l, type BarcodeTypeType as m, type Base44Id as n, CAR_SUPPORTED_SIGNATURE_MIME_TYPES as o, CAT as p, CATEGORY_TABS as q, CORRECTIVE_ACTION_GENERATION_SOURCES as r, CORRECTIVE_ACTION_STATUSES as s, type CanonicalId as t, type CarSupportedEvidenceMimeType as u, type CarSupportedSignatureMimeType as v, type CarTemplateFileMetadata as w, CatalogSyncStatus as x, type CatalogSyncStatusType as y, type CompanyConfig as z };
|
|
@@ -7,6 +7,10 @@ interface AvailableScope {
|
|
|
7
7
|
name: string;
|
|
8
8
|
parentId: string | null;
|
|
9
9
|
}
|
|
10
|
+
interface RoleAssignment {
|
|
11
|
+
role: string;
|
|
12
|
+
privileges: string[];
|
|
13
|
+
}
|
|
10
14
|
interface CompanyConfig {
|
|
11
15
|
isMultiEntity: boolean;
|
|
12
16
|
}
|
|
@@ -28,15 +32,43 @@ interface AgriCoreSession {
|
|
|
28
32
|
userName: string;
|
|
29
33
|
userEmail: string;
|
|
30
34
|
companyId: string;
|
|
31
|
-
activeScopeId: string
|
|
32
|
-
companyConfig:
|
|
33
|
-
|
|
34
|
-
|
|
35
|
+
activeScopeId: string;
|
|
36
|
+
companyConfig: {
|
|
37
|
+
isMultiEntity: boolean;
|
|
38
|
+
};
|
|
35
39
|
enabledModules: string[];
|
|
36
|
-
|
|
37
|
-
writeScopes: string[];
|
|
40
|
+
roleAssignments: Record<string, RoleAssignment>;
|
|
38
41
|
availableScopes: AvailableScope[];
|
|
39
|
-
resourceOverrides:
|
|
42
|
+
resourceOverrides: Record<string, Record<string, PermissionLevel>>;
|
|
43
|
+
}
|
|
44
|
+
type WireAvailableScope = [
|
|
45
|
+
authScopeId: string,
|
|
46
|
+
base44Id: string,
|
|
47
|
+
typeCode: number,
|
|
48
|
+
name: string,
|
|
49
|
+
parentId: string | null
|
|
50
|
+
];
|
|
51
|
+
interface WireSession {
|
|
52
|
+
u: string;
|
|
53
|
+
n: string;
|
|
54
|
+
e: string;
|
|
55
|
+
c: string;
|
|
56
|
+
a: string;
|
|
57
|
+
cc: {
|
|
58
|
+
me: boolean;
|
|
59
|
+
};
|
|
60
|
+
m: string[];
|
|
61
|
+
ra: Record<string, RoleAssignment>;
|
|
62
|
+
as: WireAvailableScope[];
|
|
63
|
+
ro: Record<string, Record<string, PermissionLevel>>;
|
|
64
|
+
}
|
|
65
|
+
type FieldType = "scalar" | "object" | "recordArray";
|
|
66
|
+
interface SchemaField {
|
|
67
|
+
key: string;
|
|
68
|
+
path: string;
|
|
69
|
+
type: FieldType;
|
|
70
|
+
fields?: SchemaField[];
|
|
71
|
+
enum?: readonly string[];
|
|
40
72
|
}
|
|
41
73
|
interface ResolvedError {
|
|
42
74
|
title: string;
|
|
@@ -216,6 +248,7 @@ declare const AccessLevel: {
|
|
|
216
248
|
readonly READ: "READ";
|
|
217
249
|
readonly WRITE: "WRITE";
|
|
218
250
|
};
|
|
251
|
+
declare const SESSION_SCHEMA: SchemaField[];
|
|
219
252
|
declare const EnabledModule: {
|
|
220
253
|
readonly FARM_MANAGEMENT: "farm_management";
|
|
221
254
|
readonly PACKHOUSE: "packhouse";
|
|
@@ -430,33 +463,39 @@ declare const RESOURCE_PATHS: {
|
|
|
430
463
|
adminCompanySettings: string;
|
|
431
464
|
farmManagement: string;
|
|
432
465
|
packhouse: string;
|
|
466
|
+
accommodation: string;
|
|
467
|
+
inventory: string;
|
|
468
|
+
inventoryConsumable: string;
|
|
433
469
|
inventoryConsumableProduct: string;
|
|
434
470
|
inventoryConsumableStock: string;
|
|
435
471
|
inventoryConsumableStockEditThreshold: string;
|
|
436
472
|
inventoryConsumableStockReconcile: string;
|
|
437
473
|
inventoryConsumableStockMovement: string;
|
|
438
474
|
inventoryConsumableStockMovementTransfer: string;
|
|
439
|
-
|
|
475
|
+
inventoryChemical: string;
|
|
440
476
|
inventoryChemicalProduct: string;
|
|
441
477
|
inventoryChemicalStock: string;
|
|
442
478
|
inventoryChemicalStockEditThreshold: string;
|
|
443
479
|
inventoryChemicalStockReconcile: string;
|
|
444
480
|
inventoryChemicalStockMovement: string;
|
|
445
481
|
inventoryChemicalStockMovementTransfer: string;
|
|
446
|
-
|
|
482
|
+
inventoryMaintenancePart: string;
|
|
447
483
|
inventoryMaintenancePartProduct: string;
|
|
448
484
|
inventoryMaintenancePartStock: string;
|
|
449
485
|
inventoryMaintenancePartStockEditThreshold: string;
|
|
450
486
|
inventoryMaintenancePartStockReconcile: string;
|
|
451
487
|
inventoryMaintenancePartStockMovement: string;
|
|
452
488
|
inventoryMaintenancePartStockMovementTransfer: string;
|
|
453
|
-
inventoryMaintenancePartStockMovementPurchase: string;
|
|
454
|
-
accommodation: string;
|
|
455
489
|
equipPreStart: string;
|
|
456
490
|
equipMaintenance: string;
|
|
457
491
|
equipFuelRegister: string;
|
|
458
492
|
equipCalibration: string;
|
|
459
493
|
equipFleet: string;
|
|
494
|
+
finance: string;
|
|
495
|
+
financeProductRequisition: string;
|
|
496
|
+
financeDashboard: string;
|
|
497
|
+
financeTransaction: string;
|
|
498
|
+
financeBudgetAllocation: string;
|
|
460
499
|
safetyAuditing: string;
|
|
461
500
|
safetyFood: string;
|
|
462
501
|
safetyWhs: string;
|
|
@@ -628,4 +667,4 @@ declare const StockPolicyTier: {
|
|
|
628
667
|
readonly BY_LOCATION: 3;
|
|
629
668
|
};
|
|
630
669
|
|
|
631
|
-
export { NettingType as $, ACCESS_RANK as A, BarcodeNamespace as B, CAR_SUPPORTED_EVIDENCE_MIME_TYPES as C, type CorrectiveActionCompileTaskMetadata as D, type CorrectiveActionGenerationSource as E, type CorrectiveActionStatus as F, CropCycleStatus as G, DOCUMENT_DISPLAY_INFO as H, DOCUMENT_MENU_MAP as I, DocumentCategory as J, DocumentType as K, ERROR_DICTIONARY as L, EVERYONE as M, EmitterType as N, EnabledModule as O, FORM_REGISTRY as P, FacilityType as Q, type FileUploadTaskType as R, type FormMeta as S, HarvestMethod as T, type InfrastructureFields as U, LinkedStatus as V, MOD as W, MODULE_LABELS as X, MicroclimateZone as Y, MimeType as Z, type ModCode as _, ACT as a, type NormalizedSignatureValue as a0, NotificationMode as a1, OrderStatus as a2, type PermissionLevel as a3, PhysicalState as a4, PlantingMethod as a5, ProductType as a6, type ProductTypeType as a7, ProductUnit as a8, type ProductUnitType as a9, type TemplateScopeLevel as
|
|
670
|
+
export { NettingType as $, ACCESS_RANK as A, BarcodeNamespace as B, CAR_SUPPORTED_EVIDENCE_MIME_TYPES as C, type CorrectiveActionCompileTaskMetadata as D, type CorrectiveActionGenerationSource as E, type CorrectiveActionStatus as F, CropCycleStatus as G, DOCUMENT_DISPLAY_INFO as H, DOCUMENT_MENU_MAP as I, DocumentCategory as J, DocumentType as K, ERROR_DICTIONARY as L, EVERYONE as M, EmitterType as N, EnabledModule as O, FORM_REGISTRY as P, FacilityType as Q, type FileUploadTaskType as R, type FormMeta as S, HarvestMethod as T, type InfrastructureFields as U, LinkedStatus as V, MOD as W, MODULE_LABELS as X, MicroclimateZone as Y, MimeType as Z, type ModCode as _, ACT as a, type NormalizedSignatureValue as a0, NotificationMode as a1, OrderStatus as a2, type PermissionLevel as a3, PhysicalState as a4, PlantingMethod as a5, ProductType as a6, type ProductTypeType as a7, ProductUnit as a8, type ProductUnitType as a9, TaskStatus as aA, TaskType as aB, type TaskTypeConfig as aC, type TemplateScopeLevel as aD, TransactionType as aE, TrellisType as aF, UserPrivilege as aG, UserRole as aH, type UserRoleType as aI, VigorRating as aJ, WaterSource as aK, type WireSession as aL, RESOURCE_MODULE_MAP as aa, RESOURCE_PATHS as ab, RESOURCE_REQUIREMENTS as ac, ROLE_SECTIONS_BY_KEY as ad, RelationshipType as ae, type ResolvedError as af, type ResourceOverrides as ag, type ResourceRequirement as ah, type RoleAssignment as ai, RowOrientation as aj, SENTINEL_UUID as ak, SESSION_SCHEMA as al, SIGNATURE_MODES as am, type SchemaField as an, type ScopeType as ao, type SignatureInput as ap, type SignatureMode as aq, SoilTexture as ar, StockPolicyTier as as, type StockPolicyTierType as at, StoragePhases as au, type StorageType as av, TASK_TYPE_REGISTRY as aw, TEMPLATE_SCOPE_LEVELS as ax, type TabConfig as ay, TargetEntityType as az, AccessLevel as b, type AccessLevelType as c, type AgriCoreSession as d, ApprovalStatus as e, ApprovalType as f, AuditStatus as g, AuditType as h, type AuthScopeFields as i, type AvailableScope as j, type BarcodeNamespaceType as k, BarcodeType as l, type BarcodeTypeType as m, type Base44Id as n, CAR_SUPPORTED_SIGNATURE_MIME_TYPES as o, CAT as p, CATEGORY_TABS as q, CORRECTIVE_ACTION_GENERATION_SOURCES as r, CORRECTIVE_ACTION_STATUSES as s, type CanonicalId as t, type CarSupportedEvidenceMimeType as u, type CarSupportedSignatureMimeType as v, type CarTemplateFileMetadata as w, CatalogSyncStatus as x, type CatalogSyncStatusType as y, type CompanyConfig as z };
|
package/dist/constants.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { A as ACCESS_RANK, a as ACT, b as AccessLevel, e as ApprovalStatus, f as ApprovalType, g as AuditStatus, h as AuditType, B as BarcodeNamespace, l as BarcodeType, C as CAR_SUPPORTED_EVIDENCE_MIME_TYPES, o as CAR_SUPPORTED_SIGNATURE_MIME_TYPES, p as CAT, q as CATEGORY_TABS, r as CORRECTIVE_ACTION_GENERATION_SOURCES, s as CORRECTIVE_ACTION_STATUSES, x as CatalogSyncStatus, G as CropCycleStatus, H as DOCUMENT_DISPLAY_INFO, I as DOCUMENT_MENU_MAP, J as DocumentCategory, K as DocumentType, L as ERROR_DICTIONARY, M as EVERYONE, N as EmitterType, O as EnabledModule, P as FORM_REGISTRY, Q as FacilityType, T as HarvestMethod, V as LinkedStatus, W as MOD, X as MODULE_LABELS, Y as MicroclimateZone, Z as MimeType, _ as ModCode, $ as NettingType, a1 as NotificationMode, a2 as OrderStatus, a4 as PhysicalState, a5 as PlantingMethod, a6 as ProductType, a8 as ProductUnit, aa as RESOURCE_MODULE_MAP, ab as RESOURCE_PATHS, ac as RESOURCE_REQUIREMENTS, ad as ROLE_SECTIONS_BY_KEY, ae as RelationshipType, ah as ResourceRequirement,
|
|
1
|
+
export { A as ACCESS_RANK, a as ACT, b as AccessLevel, e as ApprovalStatus, f as ApprovalType, g as AuditStatus, h as AuditType, B as BarcodeNamespace, l as BarcodeType, C as CAR_SUPPORTED_EVIDENCE_MIME_TYPES, o as CAR_SUPPORTED_SIGNATURE_MIME_TYPES, p as CAT, q as CATEGORY_TABS, r as CORRECTIVE_ACTION_GENERATION_SOURCES, s as CORRECTIVE_ACTION_STATUSES, x as CatalogSyncStatus, G as CropCycleStatus, H as DOCUMENT_DISPLAY_INFO, I as DOCUMENT_MENU_MAP, J as DocumentCategory, K as DocumentType, L as ERROR_DICTIONARY, M as EVERYONE, N as EmitterType, O as EnabledModule, P as FORM_REGISTRY, Q as FacilityType, T as HarvestMethod, V as LinkedStatus, W as MOD, X as MODULE_LABELS, Y as MicroclimateZone, Z as MimeType, _ as ModCode, $ as NettingType, a1 as NotificationMode, a2 as OrderStatus, a4 as PhysicalState, a5 as PlantingMethod, a6 as ProductType, a8 as ProductUnit, aa as RESOURCE_MODULE_MAP, ab as RESOURCE_PATHS, ac as RESOURCE_REQUIREMENTS, ad as ROLE_SECTIONS_BY_KEY, ae as RelationshipType, ah as ResourceRequirement, aj as RowOrientation, ak as SENTINEL_UUID, al as SESSION_SCHEMA, am as SIGNATURE_MODES, ar as SoilTexture, as as StockPolicyTier, au as StoragePhases, aw as TASK_TYPE_REGISTRY, ax as TEMPLATE_SCOPE_LEVELS, az as TargetEntityType, aA as TaskStatus, aB as TaskType, aE as TransactionType, aF as TrellisType, aG as UserPrivilege, aH as UserRole, aJ as VigorRating, aK as WaterSource } from './constants-lhTP4wzB.mjs';
|
package/dist/constants.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { A as ACCESS_RANK, a as ACT, b as AccessLevel, e as ApprovalStatus, f as ApprovalType, g as AuditStatus, h as AuditType, B as BarcodeNamespace, l as BarcodeType, C as CAR_SUPPORTED_EVIDENCE_MIME_TYPES, o as CAR_SUPPORTED_SIGNATURE_MIME_TYPES, p as CAT, q as CATEGORY_TABS, r as CORRECTIVE_ACTION_GENERATION_SOURCES, s as CORRECTIVE_ACTION_STATUSES, x as CatalogSyncStatus, G as CropCycleStatus, H as DOCUMENT_DISPLAY_INFO, I as DOCUMENT_MENU_MAP, J as DocumentCategory, K as DocumentType, L as ERROR_DICTIONARY, M as EVERYONE, N as EmitterType, O as EnabledModule, P as FORM_REGISTRY, Q as FacilityType, T as HarvestMethod, V as LinkedStatus, W as MOD, X as MODULE_LABELS, Y as MicroclimateZone, Z as MimeType, _ as ModCode, $ as NettingType, a1 as NotificationMode, a2 as OrderStatus, a4 as PhysicalState, a5 as PlantingMethod, a6 as ProductType, a8 as ProductUnit, aa as RESOURCE_MODULE_MAP, ab as RESOURCE_PATHS, ac as RESOURCE_REQUIREMENTS, ad as ROLE_SECTIONS_BY_KEY, ae as RelationshipType, ah as ResourceRequirement,
|
|
1
|
+
export { A as ACCESS_RANK, a as ACT, b as AccessLevel, e as ApprovalStatus, f as ApprovalType, g as AuditStatus, h as AuditType, B as BarcodeNamespace, l as BarcodeType, C as CAR_SUPPORTED_EVIDENCE_MIME_TYPES, o as CAR_SUPPORTED_SIGNATURE_MIME_TYPES, p as CAT, q as CATEGORY_TABS, r as CORRECTIVE_ACTION_GENERATION_SOURCES, s as CORRECTIVE_ACTION_STATUSES, x as CatalogSyncStatus, G as CropCycleStatus, H as DOCUMENT_DISPLAY_INFO, I as DOCUMENT_MENU_MAP, J as DocumentCategory, K as DocumentType, L as ERROR_DICTIONARY, M as EVERYONE, N as EmitterType, O as EnabledModule, P as FORM_REGISTRY, Q as FacilityType, T as HarvestMethod, V as LinkedStatus, W as MOD, X as MODULE_LABELS, Y as MicroclimateZone, Z as MimeType, _ as ModCode, $ as NettingType, a1 as NotificationMode, a2 as OrderStatus, a4 as PhysicalState, a5 as PlantingMethod, a6 as ProductType, a8 as ProductUnit, aa as RESOURCE_MODULE_MAP, ab as RESOURCE_PATHS, ac as RESOURCE_REQUIREMENTS, ad as ROLE_SECTIONS_BY_KEY, ae as RelationshipType, ah as ResourceRequirement, aj as RowOrientation, ak as SENTINEL_UUID, al as SESSION_SCHEMA, am as SIGNATURE_MODES, ar as SoilTexture, as as StockPolicyTier, au as StoragePhases, aw as TASK_TYPE_REGISTRY, ax as TEMPLATE_SCOPE_LEVELS, az as TargetEntityType, aA as TaskStatus, aB as TaskType, aE as TransactionType, aF as TrellisType, aG as UserPrivilege, aH as UserRole, aJ as VigorRating, aK as WaterSource } from './constants-lhTP4wzB.js';
|
package/dist/constants.js
CHANGED
|
@@ -67,6 +67,7 @@ __export(constants_exports, {
|
|
|
67
67
|
RelationshipType: () => RelationshipType,
|
|
68
68
|
RowOrientation: () => RowOrientation,
|
|
69
69
|
SENTINEL_UUID: () => SENTINEL_UUID,
|
|
70
|
+
SESSION_SCHEMA: () => SESSION_SCHEMA,
|
|
70
71
|
SIGNATURE_MODES: () => SIGNATURE_MODES,
|
|
71
72
|
SoilTexture: () => SoilTexture,
|
|
72
73
|
StockPolicyTier: () => StockPolicyTier,
|
|
@@ -169,6 +170,34 @@ var AccessLevel = {
|
|
|
169
170
|
READ: "READ",
|
|
170
171
|
WRITE: "WRITE"
|
|
171
172
|
};
|
|
173
|
+
var SESSION_SCHEMA = [
|
|
174
|
+
{ key: "u", path: "userId", type: "scalar" },
|
|
175
|
+
{ key: "n", path: "userName", type: "scalar" },
|
|
176
|
+
{ key: "e", path: "userEmail", type: "scalar" },
|
|
177
|
+
{ key: "c", path: "companyId", type: "scalar" },
|
|
178
|
+
{ key: "a", path: "activeScopeId", type: "scalar" },
|
|
179
|
+
{
|
|
180
|
+
key: "cc",
|
|
181
|
+
path: "companyConfig",
|
|
182
|
+
type: "object",
|
|
183
|
+
fields: [{ key: "me", path: "isMultiEntity", type: "scalar" }]
|
|
184
|
+
},
|
|
185
|
+
{ key: "m", path: "enabledModules", type: "scalar" },
|
|
186
|
+
{ key: "ra", path: "roleAssignments", type: "scalar" },
|
|
187
|
+
{
|
|
188
|
+
key: "as",
|
|
189
|
+
path: "availableScopes",
|
|
190
|
+
type: "recordArray",
|
|
191
|
+
fields: [
|
|
192
|
+
{ key: "ai", path: "authScopeId", type: "scalar" },
|
|
193
|
+
{ key: "bi", path: "base44Id", type: "scalar" },
|
|
194
|
+
{ key: "t", path: "type", type: "scalar", enum: ["company", "legalEntity", "facility"] },
|
|
195
|
+
{ key: "nm", path: "name", type: "scalar" },
|
|
196
|
+
{ key: "pi", path: "parentId", type: "scalar" }
|
|
197
|
+
]
|
|
198
|
+
},
|
|
199
|
+
{ key: "ro", path: "resourceOverrides", type: "scalar" }
|
|
200
|
+
];
|
|
172
201
|
var EnabledModule = {
|
|
173
202
|
FARM_MANAGEMENT: "farm_management",
|
|
174
203
|
PACKHOUSE: "packhouse",
|
|
@@ -430,38 +459,47 @@ var RESOURCE_PATHS = {
|
|
|
430
459
|
// ── Operations ────────────────────────────────────────────────────────────
|
|
431
460
|
farmManagement: "operations.farmManagement",
|
|
432
461
|
packhouse: "operations.packhouse",
|
|
462
|
+
accommodation: "operations.accommodation",
|
|
433
463
|
// ── Inventory ────────────────────────────────────────────────────────────
|
|
434
464
|
// === Consumables ===
|
|
465
|
+
inventory: "inventory",
|
|
466
|
+
inventoryConsumable: "inventory.consumable",
|
|
435
467
|
inventoryConsumableProduct: "inventory.consumable.product",
|
|
436
468
|
inventoryConsumableStock: "inventory.consumable.stock",
|
|
437
469
|
inventoryConsumableStockEditThreshold: "inventory.consumable.stock.editThreshold",
|
|
438
470
|
inventoryConsumableStockReconcile: "inventory.consumable.stock.reconcile",
|
|
439
471
|
inventoryConsumableStockMovement: "inventory.consumable.stockMovement",
|
|
440
472
|
inventoryConsumableStockMovementTransfer: "inventory.consumable.stockMovement.transfer",
|
|
441
|
-
inventoryConsumableStockMovementPurchase: "inventory.consumable.stockMovement.purchase",
|
|
473
|
+
// inventoryConsumableStockMovementPurchase: "inventory.consumable.stockMovement.purchase",
|
|
442
474
|
// === Chemicals ===
|
|
475
|
+
inventoryChemical: "inventory.chemical",
|
|
443
476
|
inventoryChemicalProduct: "inventory.chemical.product",
|
|
444
477
|
inventoryChemicalStock: "inventory.chemical.stock",
|
|
445
478
|
inventoryChemicalStockEditThreshold: "inventory.chemical.stock.editThreshold",
|
|
446
479
|
inventoryChemicalStockReconcile: "inventory.chemical.stock.reconcile",
|
|
447
480
|
inventoryChemicalStockMovement: "inventory.chemical.stockMovement",
|
|
448
481
|
inventoryChemicalStockMovementTransfer: "inventory.chemical.stockMovement.transfer",
|
|
449
|
-
inventoryChemicalStockMovementPurchase: "inventory.chemical.stockMovement.purchase",
|
|
482
|
+
// inventoryChemicalStockMovementPurchase: "inventory.chemical.stockMovement.purchase",
|
|
450
483
|
// === Maintenance Parts ===
|
|
484
|
+
inventoryMaintenancePart: "inventory.maintenancePart",
|
|
451
485
|
inventoryMaintenancePartProduct: "inventory.maintenancePart.product",
|
|
452
486
|
inventoryMaintenancePartStock: "inventory.maintenancePart.stock",
|
|
453
487
|
inventoryMaintenancePartStockEditThreshold: "inventory.maintenancePart.stock.editThreshold",
|
|
454
488
|
inventoryMaintenancePartStockReconcile: "inventory.maintenancePart.stock.reconcile",
|
|
455
489
|
inventoryMaintenancePartStockMovement: "inventory.maintenancePart.stockMovement",
|
|
456
490
|
inventoryMaintenancePartStockMovementTransfer: "inventory.maintenancePart.stockMovement.transfer",
|
|
457
|
-
inventoryMaintenancePartStockMovementPurchase: "inventory.maintenancePart.stockMovement.purchase",
|
|
458
|
-
accommodation: "operations.accommodation",
|
|
491
|
+
// inventoryMaintenancePartStockMovementPurchase: "inventory.maintenancePart.stockMovement.purchase",
|
|
459
492
|
// ── Equipment & Fleet ──────────────────────────────────────────────────────
|
|
460
493
|
equipPreStart: "equipment.preStart",
|
|
461
494
|
equipMaintenance: "equipment.maintenance",
|
|
462
495
|
equipFuelRegister: "equipment.fuelRegister",
|
|
463
496
|
equipCalibration: "equipment.calibration",
|
|
464
497
|
equipFleet: "equipment.fleetManagement",
|
|
498
|
+
finance: "finance",
|
|
499
|
+
financeProductRequisition: "finance.product.requistion",
|
|
500
|
+
financeDashboard: "finance.dashboard",
|
|
501
|
+
financeTransaction: "finance.transaction",
|
|
502
|
+
financeBudgetAllocation: "finance.budgetAllocation",
|
|
465
503
|
// ── Safety, Quality & Compliance ──────────────────────────────────────────
|
|
466
504
|
safetyAuditing: "safety.auditing",
|
|
467
505
|
safetyFood: "safety.foodSafety",
|
|
@@ -487,14 +525,20 @@ var RESOURCE_MODULE_MAP = {
|
|
|
487
525
|
[RESOURCE_PATHS.equipment]: ALL_OPERATIONS,
|
|
488
526
|
[RESOURCE_PATHS.safety]: ALL_OPERATIONS,
|
|
489
527
|
[RESOURCE_PATHS.team]: ALL_OPERATIONS,
|
|
528
|
+
[RESOURCE_PATHS.inventory]: ALL_OPERATIONS,
|
|
529
|
+
[RESOURCE_PATHS.finance]: ALL_OPERATIONS,
|
|
490
530
|
[RESOURCE_PATHS.records]: ALL_OPERATIONS,
|
|
491
531
|
[RESOURCE_PATHS.adminSettings]: ALL_OPERATIONS,
|
|
492
532
|
// ── Inventory ──────────────────────────────────────────────────────
|
|
533
|
+
[RESOURCE_PATHS.inventoryConsumable]: ALL_OPERATIONS,
|
|
493
534
|
[RESOURCE_PATHS.inventoryConsumableProduct]: ALL_OPERATIONS,
|
|
494
535
|
[RESOURCE_PATHS.inventoryConsumableStock]: ALL_OPERATIONS,
|
|
495
536
|
[RESOURCE_PATHS.inventoryConsumableStockMovement]: ALL_OPERATIONS,
|
|
537
|
+
[RESOURCE_PATHS.inventoryChemical]: ALL_OPERATIONS,
|
|
496
538
|
[RESOURCE_PATHS.inventoryChemicalProduct]: ALL_OPERATIONS,
|
|
497
539
|
[RESOURCE_PATHS.inventoryChemicalStock]: ALL_OPERATIONS,
|
|
540
|
+
[RESOURCE_PATHS.inventoryChemicalStockMovement]: ALL_OPERATIONS,
|
|
541
|
+
[RESOURCE_PATHS.inventoryMaintenancePart]: ALL_OPERATIONS,
|
|
498
542
|
[RESOURCE_PATHS.inventoryMaintenancePartProduct]: ALL_OPERATIONS,
|
|
499
543
|
[RESOURCE_PATHS.inventoryMaintenancePartStock]: ALL_OPERATIONS,
|
|
500
544
|
[RESOURCE_PATHS.inventoryMaintenancePartStockMovement]: ALL_OPERATIONS,
|
|
@@ -583,9 +627,9 @@ var RESOURCE_REQUIREMENTS = {
|
|
|
583
627
|
[RESOURCE_PATHS.inventoryConsumableStockMovementTransfer]: {
|
|
584
628
|
allowedRoles: [UserRole.OWNER, UserRole.MANAGER, UserRole.SUPERVISOR]
|
|
585
629
|
},
|
|
586
|
-
[RESOURCE_PATHS.inventoryConsumableStockMovementPurchase]: {
|
|
587
|
-
|
|
588
|
-
},
|
|
630
|
+
// [RESOURCE_PATHS.inventoryConsumableStockMovementPurchase]: {
|
|
631
|
+
// allowedRoles: [UserRole.OWNER, UserRole.MANAGER]
|
|
632
|
+
// },
|
|
589
633
|
// CHEMICALS PERMISSIONS
|
|
590
634
|
[RESOURCE_PATHS.inventoryChemicalProduct]: {
|
|
591
635
|
allowedRoles: [UserRole.OWNER, UserRole.MANAGER, UserRole.SUPERVISOR]
|
|
@@ -601,9 +645,9 @@ var RESOURCE_REQUIREMENTS = {
|
|
|
601
645
|
[RESOURCE_PATHS.inventoryChemicalStockMovementTransfer]: {
|
|
602
646
|
allowedRoles: [UserRole.OWNER, UserRole.MANAGER, UserRole.SUPERVISOR]
|
|
603
647
|
},
|
|
604
|
-
[RESOURCE_PATHS.inventoryChemicalStockMovementPurchase]: {
|
|
605
|
-
|
|
606
|
-
},
|
|
648
|
+
// [RESOURCE_PATHS.inventoryChemicalStockMovementPurchase]: {
|
|
649
|
+
// allowedRoles: [UserRole.OWNER, UserRole.MANAGER]
|
|
650
|
+
// },
|
|
607
651
|
[RESOURCE_PATHS.inventoryMaintenancePartProduct]: {
|
|
608
652
|
allowedRoles: [UserRole.OWNER, UserRole.MANAGER, UserRole.SUPERVISOR]
|
|
609
653
|
},
|
|
@@ -615,11 +659,24 @@ var RESOURCE_REQUIREMENTS = {
|
|
|
615
659
|
allowedRoles: [UserRole.OWNER, UserRole.MANAGER, UserRole.SUPERVISOR]
|
|
616
660
|
},
|
|
617
661
|
[RESOURCE_PATHS.inventoryMaintenancePartStockMovement]: { allowedRoles: EVERYONE },
|
|
618
|
-
[RESOURCE_PATHS.inventoryMaintenancePartStockMovementPurchase]: {
|
|
662
|
+
// [RESOURCE_PATHS.inventoryMaintenancePartStockMovementPurchase]: {
|
|
663
|
+
// allowedRoles: [UserRole.OWNER, UserRole.MANAGER]
|
|
664
|
+
// },
|
|
665
|
+
// ── Finance ────────────────────────────────────────────────────────────────
|
|
666
|
+
[RESOURCE_PATHS.financeProductRequisition]: {
|
|
619
667
|
allowedRoles: [UserRole.OWNER, UserRole.MANAGER]
|
|
620
668
|
},
|
|
621
|
-
[RESOURCE_PATHS.
|
|
622
|
-
allowedRoles: [UserRole.OWNER,
|
|
669
|
+
[RESOURCE_PATHS.financeBudgetAllocation]: {
|
|
670
|
+
allowedRoles: [UserRole.OWNER],
|
|
671
|
+
requiredPrivileges: [UserPrivilege.FINANCE]
|
|
672
|
+
},
|
|
673
|
+
[RESOURCE_PATHS.financeDashboard]: {
|
|
674
|
+
allowedRoles: [UserRole.OWNER],
|
|
675
|
+
requiredPrivileges: [UserPrivilege.FINANCE]
|
|
676
|
+
},
|
|
677
|
+
[RESOURCE_PATHS.financeTransaction]: {
|
|
678
|
+
allowedRoles: [UserRole.OWNER],
|
|
679
|
+
requiredPrivileges: [UserPrivilege.FINANCE]
|
|
623
680
|
},
|
|
624
681
|
// ── Admin Settings ─────────────────────────────────────────────────────────
|
|
625
682
|
[RESOURCE_PATHS.adminUserRoster]: {
|
|
@@ -1027,6 +1084,7 @@ var StockPolicyTier = {
|
|
|
1027
1084
|
RelationshipType,
|
|
1028
1085
|
RowOrientation,
|
|
1029
1086
|
SENTINEL_UUID,
|
|
1087
|
+
SESSION_SCHEMA,
|
|
1030
1088
|
SIGNATURE_MODES,
|
|
1031
1089
|
SoilTexture,
|
|
1032
1090
|
StockPolicyTier,
|