@litusarchieve18/agricore-utils 1.0.13 → 1.0.14

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 CHANGED
@@ -183,7 +183,9 @@ Run the publish command:
183
183
  Bash
184
184
  npm publish --access public
185
185
  📝 Version History
186
- V1.0.12 — add DocumentMenuMap and refactoring library code to export enum
186
+ V1.0.14 — add DOCUMENT_DISPLAY_INFO do manage the grouping and a little description for UI
187
+
188
+ V1.0.13 — add DocumentMenuMap and refactoring library code to export enum
187
189
 
188
190
  V1.0.12 — add some functionality to add a file tag
189
191
 
@@ -499,6 +499,194 @@ var DocumentType = /* @__PURE__ */ ((DocumentType2) => {
499
499
  DocumentType2["SENSITIVE_IDENTITY"] = "SENSITIVE_IDENTITY";
500
500
  return DocumentType2;
501
501
  })(DocumentType || {});
502
+ var DocumentCategory = /* @__PURE__ */ ((DocumentCategory2) => {
503
+ DocumentCategory2["AGRONOMY_TESTING"] = "Agronomy & Testing";
504
+ DocumentCategory2["FARM_OPERATIONS"] = "Farm Operations";
505
+ DocumentCategory2["COMPLIANCE_QA"] = "Compliance & Quality";
506
+ DocumentCategory2["INVENTORY_LOG"] = "Inventory & Logistics";
507
+ DocumentCategory2["ASSETS_MAINT"] = "Assets & Maintenance";
508
+ DocumentCategory2["HR_LEGAL_SAFETY"] = "HR, Legal & Safety";
509
+ DocumentCategory2["FINANCE_ADMIN"] = "Finance & Admin";
510
+ return DocumentCategory2;
511
+ })(DocumentCategory || {});
512
+ var DOCUMENT_DISPLAY_INFO = {
513
+ // --- AGRONOMY & TESTING ---
514
+ ["SOIL_TEST" /* SOIL_TEST */]: {
515
+ label: "Soil Analysis",
516
+ description: "Detailed lab results for soil nutrients, pH, and health.",
517
+ category: "Agronomy & Testing" /* AGRONOMY_TESTING */
518
+ },
519
+ ["LEAF_TEST" /* LEAF_TEST */]: {
520
+ label: "Leaf & Tissue Test",
521
+ description: "Nutrient analysis of plant tissue samples.",
522
+ category: "Agronomy & Testing" /* AGRONOMY_TESTING */
523
+ },
524
+ ["WATER_TEST" /* WATER_TEST */]: {
525
+ label: "Water Quality Test",
526
+ description: "Testing for irrigation suitability and microbial levels.",
527
+ category: "Agronomy & Testing" /* AGRONOMY_TESTING */
528
+ },
529
+ ["MRL_TESTING" /* MRL_TESTING */]: {
530
+ label: "MRL Residue Analysis",
531
+ description: "Maximum Residue Limit reports for chemical compliance.",
532
+ category: "Agronomy & Testing" /* AGRONOMY_TESTING */
533
+ },
534
+ ["HEAVY_METAL" /* HEAVY_METAL */]: {
535
+ label: "Heavy Metal Analysis",
536
+ description: "Testing for lead, cadmium, and other metal contaminants.",
537
+ category: "Agronomy & Testing" /* AGRONOMY_TESTING */
538
+ },
539
+ ["MICROBIAL" /* MICROBIAL */]: {
540
+ label: "Microbial Testing",
541
+ description: "Pathogen detection reports (e.g., E. coli, Salmonella).",
542
+ category: "Agronomy & Testing" /* AGRONOMY_TESTING */
543
+ },
544
+ // --- FARM OPERATIONS ---
545
+ ["SPRAY_RECORD" /* SPRAY_RECORD */]: {
546
+ label: "Spray Operations",
547
+ description: "Chemical application logs and weather conditions.",
548
+ category: "Farm Operations" /* FARM_OPERATIONS */
549
+ },
550
+ ["FERTIGATION_RECORD" /* FERTIGATION_RECORD */]: {
551
+ label: "Fertigation Logs",
552
+ description: "Records of liquid fertilizer applied via irrigation.",
553
+ category: "Farm Operations" /* FARM_OPERATIONS */
554
+ },
555
+ ["FERTILIZER_RECORD" /* FERTILIZER_RECORD */]: {
556
+ label: "Fertilizer Records",
557
+ description: "Manual granular or bulk fertilizer application logs.",
558
+ category: "Farm Operations" /* FARM_OPERATIONS */
559
+ },
560
+ ["HARVEST_LOG" /* HARVEST_LOG */]: {
561
+ label: "Harvest Manifests",
562
+ description: "Daily picking volumes and block yield data.",
563
+ category: "Farm Operations" /* FARM_OPERATIONS */
564
+ },
565
+ ["PACKHOUSE_INSPECTION" /* PACKHOUSE_INSPECTION */]: {
566
+ label: "Packhouse Inspections",
567
+ description: "Quality and hygiene checks conducted in the packhouse.",
568
+ category: "Farm Operations" /* FARM_OPERATIONS */
569
+ },
570
+ ["MAPPING_TRAFIC_MANAGEMENT" /* MAPPING_TRAFIC_MANAGEMENT */]: {
571
+ label: "Traffic Management",
572
+ description: "Maps and rules for vehicle and heavy machinery movement.",
573
+ category: "Farm Operations" /* FARM_OPERATIONS */
574
+ },
575
+ // --- COMPLIANCE & QUALITY ---
576
+ ["QA" /* QA */]: {
577
+ label: "Quality Assurance",
578
+ description: "General product quality checks and grading standards.",
579
+ category: "Compliance & Quality" /* COMPLIANCE_QA */
580
+ },
581
+ ["PEST" /* PEST */]: {
582
+ label: "Pest & Disease Monitoring",
583
+ description: "Scouting reports and pest pressure assessments.",
584
+ category: "Compliance & Quality" /* COMPLIANCE_QA */
585
+ },
586
+ ["AUDIT_REPORT" /* AUDIT_REPORT */]: {
587
+ label: "External Audit Reports",
588
+ description: "Final results from Freshcare, GlobalGAP, or Organic audits.",
589
+ category: "Compliance & Quality" /* COMPLIANCE_QA */
590
+ },
591
+ ["RISK_ASSESSMENTS" /* RISK_ASSESSMENTS */]: {
592
+ label: "Risk Assessments",
593
+ description: "Operational hazard identification and safety mitigations.",
594
+ category: "Compliance & Quality" /* COMPLIANCE_QA */
595
+ },
596
+ // --- ASSETS & MAINTENANCE ---
597
+ ["SERVICING_MAINTENANCE" /* SERVICING_MAINTENANCE */]: {
598
+ label: "Equipment Maintenance",
599
+ description: "Service history and repair logs for farm machinery.",
600
+ category: "Assets & Maintenance" /* ASSETS_MAINT */
601
+ },
602
+ ["EQUIPMENT_CALIBRATION_RECORD" /* EQUIPMENT_CALIBRATION_RECORD */]: {
603
+ label: "Calibration Records",
604
+ description: "Accuracy checks for sprayers, scales, and moisture probes.",
605
+ category: "Assets & Maintenance" /* ASSETS_MAINT */
606
+ },
607
+ ["CLEANING" /* CLEANING */]: {
608
+ label: "Sanitation Logs",
609
+ description: "Daily/weekly cleaning schedules for tools and facilities.",
610
+ category: "Assets & Maintenance" /* ASSETS_MAINT */
611
+ },
612
+ ["MAPPING_FARM_MAPS" /* MAPPING_FARM_MAPS */]: {
613
+ label: "Farm Infrastructure Maps",
614
+ description: "Layouts of blocks, irrigation, and fixed assets.",
615
+ category: "Assets & Maintenance" /* ASSETS_MAINT */
616
+ },
617
+ // --- INVENTORY & LOGISTICS ---
618
+ ["INVENTORY_CHEMICALS" /* INVENTORY_CHEMICALS */]: {
619
+ label: "Chemical Inventory",
620
+ description: "Manifests for stored pesticides and fertilizers.",
621
+ category: "Inventory & Logistics" /* INVENTORY_LOG */
622
+ },
623
+ ["INVENTORY_BOX_CARTON" /* INVENTORY_BOX_CARTON */]: {
624
+ label: "Packaging Inventory",
625
+ description: "Stock levels for cartons, bins, and packaging materials.",
626
+ category: "Inventory & Logistics" /* INVENTORY_LOG */
627
+ },
628
+ ["INVENTORY_CONSUMABLES" /* INVENTORY_CONSUMABLES */]: {
629
+ label: "General Consumables",
630
+ description: "Stock tracking for fuel, PPE, and workshop supplies.",
631
+ category: "Inventory & Logistics" /* INVENTORY_LOG */
632
+ },
633
+ ["STOCKTAKE" /* STOCKTAKE */]: {
634
+ label: "Physical Stocktake",
635
+ description: "Periodic audits of physical vs. recorded stock levels.",
636
+ category: "Inventory & Logistics" /* INVENTORY_LOG */
637
+ },
638
+ ["STOCKTAKE_MSDS" /* STOCKTAKE_MSDS */]: {
639
+ label: "MSDS / Safety Data",
640
+ description: "Material Safety Data Sheets for stored chemicals.",
641
+ category: "Inventory & Logistics" /* INVENTORY_LOG */
642
+ },
643
+ // --- HR, LEGAL & SAFETY ---
644
+ ["TRAINING_RECORDS" /* TRAINING_RECORDS */]: {
645
+ label: "Staff Inductions",
646
+ description: "General staff onboarding and safety training logs.",
647
+ category: "HR, Legal & Safety" /* HR_LEGAL_SAFETY */
648
+ },
649
+ ["TRAINING_CERTIFICATE" /* TRAINING_CERTIFICATE */]: {
650
+ label: "Training Certificates",
651
+ description: "External licenses, ChemCert, and first aid tickets.",
652
+ category: "HR, Legal & Safety" /* HR_LEGAL_SAFETY */
653
+ },
654
+ ["SOPS" /* SOPS */]: {
655
+ label: "Standard Procedures (SOPs)",
656
+ description: "Formalized instructions for farm and packhouse tasks.",
657
+ category: "HR, Legal & Safety" /* HR_LEGAL_SAFETY */
658
+ },
659
+ ["LEGAL_CONTRACT" /* LEGAL_CONTRACT */]: {
660
+ label: "Legal Contracts",
661
+ description: "Lease agreements, supply contracts, and employment terms.",
662
+ category: "HR, Legal & Safety" /* HR_LEGAL_SAFETY */
663
+ },
664
+ ["INCIDENT_REPORT" /* INCIDENT_REPORT */]: {
665
+ label: "Incident Reports",
666
+ description: "Logs of injuries, near-misses, or property damage.",
667
+ category: "HR, Legal & Safety" /* HR_LEGAL_SAFETY */
668
+ },
669
+ ["SENSITIVE_IDENTITY" /* SENSITIVE_IDENTITY */]: {
670
+ label: "Identity & Visas",
671
+ description: "Sensitive data: Passports, ID cards, and work permits.",
672
+ category: "HR, Legal & Safety" /* HR_LEGAL_SAFETY */
673
+ },
674
+ ["MAPPING_EMERGENCY" /* MAPPING_EMERGENCY */]: {
675
+ label: "Emergency Response Maps",
676
+ description: "Evacuation routes and emergency assembly points.",
677
+ category: "HR, Legal & Safety" /* HR_LEGAL_SAFETY */
678
+ },
679
+ // --- FINANCE & ADMIN ---
680
+ ["INVOICE" /* INVOICE */]: {
681
+ label: "Supplier Invoices",
682
+ description: "Billing records for inputs, utilities, and services.",
683
+ category: "Finance & Admin" /* FINANCE_ADMIN */
684
+ }
685
+ };
686
+ var CATEGORY_TABS = [
687
+ "All",
688
+ ...Object.values(DocumentCategory)
689
+ ];
502
690
  var DOCUMENT_MENU_MAP = {
503
691
  ["SPRAY_RECORD" /* SPRAY_RECORD */]: [RESOURCE_PATHS.farmManagement],
504
692
  ["FERTIGATION_RECORD" /* FERTIGATION_RECORD */]: [RESOURCE_PATHS.farmManagement],
@@ -581,5 +769,8 @@ export {
581
769
  EVERYONE,
582
770
  RESOURCE_REQUIREMENTS,
583
771
  DocumentType,
772
+ DocumentCategory,
773
+ DOCUMENT_DISPLAY_INFO,
774
+ CATEGORY_TABS,
584
775
  DOCUMENT_MENU_MAP
585
776
  };
@@ -397,6 +397,21 @@ declare enum DocumentType {
397
397
  AUDIT_REPORT = "AUDIT_REPORT",
398
398
  SENSITIVE_IDENTITY = "SENSITIVE_IDENTITY"
399
399
  }
400
+ declare enum DocumentCategory {
401
+ AGRONOMY_TESTING = "Agronomy & Testing",
402
+ FARM_OPERATIONS = "Farm Operations",
403
+ COMPLIANCE_QA = "Compliance & Quality",
404
+ INVENTORY_LOG = "Inventory & Logistics",
405
+ ASSETS_MAINT = "Assets & Maintenance",
406
+ HR_LEGAL_SAFETY = "HR, Legal & Safety",
407
+ FINANCE_ADMIN = "Finance & Admin"
408
+ }
409
+ declare const DOCUMENT_DISPLAY_INFO: Record<DocumentType, {
410
+ label: string;
411
+ description: string;
412
+ category: DocumentCategory;
413
+ }>;
414
+ declare const CATEGORY_TABS: string[];
400
415
  declare const DOCUMENT_MENU_MAP: Record<DocumentType, string[]>;
401
416
 
402
- export { TaskType as $, ACCESS_RANK as A, RESOURCE_REQUIREMENTS as B, CAT as C, DOCUMENT_MENU_MAP as D, ERROR_DICTIONARY as E, FORM_REGISTRY as F, ROLE_SECTIONS_BY_KEY as G, HarvestMethod as H, type InfrastructureFields as I, RelationshipType as J, type ResolvedError as K, LinkedStatus as L, MOD as M, NettingType as N, OrderStatus as O, type PermissionLevel as P, type ResourceOverrides as Q, RESOURCE_MODULE_MAP as R, type ResourceRequirement as S, RowOrientation as T, SENTINEL_UUID as U, type ScopeType as V, SoilTexture as W, TASK_TYPE_REGISTRY as X, type TabConfig as Y, TargetEntityType as Z, TaskStatus as _, ACT as a, type TaskTypeConfig as a0, TransactionType as a1, TrellisType as a2, UserPrivilege as a3, UserRole as a4, type UserRoleType as a5, VigorRating as a6, WaterSource as a7, 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 CompanyConfig as k, CropCycleStatus as l, DocumentType as m, EVERYONE as n, EmitterType as o, EnabledModule as p, FacilityType as q, type FormMeta as r, MODULE_LABELS as s, MicroclimateZone as t, MimeType as u, type ModCode as v, NotificationMode as w, PhysicalState as x, PlantingMethod as y, RESOURCE_PATHS as z };
417
+ export { type TabConfig as $, ACCESS_RANK as A, PhysicalState as B, CAT as C, DOCUMENT_DISPLAY_INFO as D, ERROR_DICTIONARY as E, FORM_REGISTRY as F, PlantingMethod as G, HarvestMethod as H, type InfrastructureFields as I, RESOURCE_PATHS as J, RESOURCE_REQUIREMENTS as K, LinkedStatus as L, MOD as M, NettingType as N, OrderStatus as O, type PermissionLevel as P, ROLE_SECTIONS_BY_KEY as Q, RESOURCE_MODULE_MAP as R, RelationshipType as S, type ResolvedError as T, type ResourceOverrides as U, type ResourceRequirement as V, RowOrientation as W, SENTINEL_UUID as X, type ScopeType as Y, SoilTexture as Z, TASK_TYPE_REGISTRY as _, ACT as a, TargetEntityType as a0, TaskStatus as a1, TaskType as a2, type TaskTypeConfig as a3, TransactionType as a4, TrellisType as a5, UserPrivilege as a6, UserRole as a7, type UserRoleType as a8, VigorRating as a9, WaterSource as aa, 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, CATEGORY_TABS as k, type CompanyConfig as l, CropCycleStatus as m, DOCUMENT_MENU_MAP as n, DocumentCategory as o, DocumentType as p, EVERYONE as q, EmitterType as r, EnabledModule as s, FacilityType as t, type FormMeta as u, MODULE_LABELS as v, MicroclimateZone as w, MimeType as x, type ModCode as y, NotificationMode as z };
@@ -397,6 +397,21 @@ declare enum DocumentType {
397
397
  AUDIT_REPORT = "AUDIT_REPORT",
398
398
  SENSITIVE_IDENTITY = "SENSITIVE_IDENTITY"
399
399
  }
400
+ declare enum DocumentCategory {
401
+ AGRONOMY_TESTING = "Agronomy & Testing",
402
+ FARM_OPERATIONS = "Farm Operations",
403
+ COMPLIANCE_QA = "Compliance & Quality",
404
+ INVENTORY_LOG = "Inventory & Logistics",
405
+ ASSETS_MAINT = "Assets & Maintenance",
406
+ HR_LEGAL_SAFETY = "HR, Legal & Safety",
407
+ FINANCE_ADMIN = "Finance & Admin"
408
+ }
409
+ declare const DOCUMENT_DISPLAY_INFO: Record<DocumentType, {
410
+ label: string;
411
+ description: string;
412
+ category: DocumentCategory;
413
+ }>;
414
+ declare const CATEGORY_TABS: string[];
400
415
  declare const DOCUMENT_MENU_MAP: Record<DocumentType, string[]>;
401
416
 
402
- export { TaskType as $, ACCESS_RANK as A, RESOURCE_REQUIREMENTS as B, CAT as C, DOCUMENT_MENU_MAP as D, ERROR_DICTIONARY as E, FORM_REGISTRY as F, ROLE_SECTIONS_BY_KEY as G, HarvestMethod as H, type InfrastructureFields as I, RelationshipType as J, type ResolvedError as K, LinkedStatus as L, MOD as M, NettingType as N, OrderStatus as O, type PermissionLevel as P, type ResourceOverrides as Q, RESOURCE_MODULE_MAP as R, type ResourceRequirement as S, RowOrientation as T, SENTINEL_UUID as U, type ScopeType as V, SoilTexture as W, TASK_TYPE_REGISTRY as X, type TabConfig as Y, TargetEntityType as Z, TaskStatus as _, ACT as a, type TaskTypeConfig as a0, TransactionType as a1, TrellisType as a2, UserPrivilege as a3, UserRole as a4, type UserRoleType as a5, VigorRating as a6, WaterSource as a7, 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 CompanyConfig as k, CropCycleStatus as l, DocumentType as m, EVERYONE as n, EmitterType as o, EnabledModule as p, FacilityType as q, type FormMeta as r, MODULE_LABELS as s, MicroclimateZone as t, MimeType as u, type ModCode as v, NotificationMode as w, PhysicalState as x, PlantingMethod as y, RESOURCE_PATHS as z };
417
+ export { type TabConfig as $, ACCESS_RANK as A, PhysicalState as B, CAT as C, DOCUMENT_DISPLAY_INFO as D, ERROR_DICTIONARY as E, FORM_REGISTRY as F, PlantingMethod as G, HarvestMethod as H, type InfrastructureFields as I, RESOURCE_PATHS as J, RESOURCE_REQUIREMENTS as K, LinkedStatus as L, MOD as M, NettingType as N, OrderStatus as O, type PermissionLevel as P, ROLE_SECTIONS_BY_KEY as Q, RESOURCE_MODULE_MAP as R, RelationshipType as S, type ResolvedError as T, type ResourceOverrides as U, type ResourceRequirement as V, RowOrientation as W, SENTINEL_UUID as X, type ScopeType as Y, SoilTexture as Z, TASK_TYPE_REGISTRY as _, ACT as a, TargetEntityType as a0, TaskStatus as a1, TaskType as a2, type TaskTypeConfig as a3, TransactionType as a4, TrellisType as a5, UserPrivilege as a6, UserRole as a7, type UserRoleType as a8, VigorRating as a9, WaterSource as aa, 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, CATEGORY_TABS as k, type CompanyConfig as l, CropCycleStatus as m, DOCUMENT_MENU_MAP as n, DocumentCategory as o, DocumentType as p, EVERYONE as q, EmitterType as r, EnabledModule as s, FacilityType as t, type FormMeta as u, MODULE_LABELS as v, MicroclimateZone as w, MimeType as x, type ModCode as y, NotificationMode as z };
@@ -1 +1 @@
1
- export { A as ACCESS_RANK, a as ACT, b as AccessLevel, c as AccessLevelType, e as ApprovalStatus, f as ApprovalType, g as AuditStatus, h as AuditType, C as CAT, l as CropCycleStatus, D as DOCUMENT_MENU_MAP, m as DocumentType, E as ERROR_DICTIONARY, n as EVERYONE, o as EmitterType, p as EnabledModule, F as FORM_REGISTRY, q as FacilityType, H as HarvestMethod, L as LinkedStatus, M as MOD, s as MODULE_LABELS, t as MicroclimateZone, u as MimeType, v as ModCode, N as NettingType, w as NotificationMode, O as OrderStatus, x as PhysicalState, y as PlantingMethod, R as RESOURCE_MODULE_MAP, z as RESOURCE_PATHS, B as RESOURCE_REQUIREMENTS, G as ROLE_SECTIONS_BY_KEY, J as RelationshipType, S as ResourceRequirement, T as RowOrientation, U as SENTINEL_UUID, W as SoilTexture, X as TASK_TYPE_REGISTRY, Z as TargetEntityType, _ as TaskStatus, $ as TaskType, a1 as TransactionType, a2 as TrellisType, a3 as UserPrivilege, a4 as UserRole, a5 as UserRoleType, a6 as VigorRating, a7 as WaterSource } from './constants-DxCjnH4L.mjs';
1
+ export { A as ACCESS_RANK, a as ACT, b as AccessLevel, c as AccessLevelType, e as ApprovalStatus, f as ApprovalType, g as AuditStatus, h as AuditType, C as CAT, k as CATEGORY_TABS, m as CropCycleStatus, D as DOCUMENT_DISPLAY_INFO, n as DOCUMENT_MENU_MAP, o as DocumentCategory, p as DocumentType, E as ERROR_DICTIONARY, q as EVERYONE, r as EmitterType, s as EnabledModule, F as FORM_REGISTRY, t as FacilityType, H as HarvestMethod, L as LinkedStatus, M as MOD, v as MODULE_LABELS, w as MicroclimateZone, x as MimeType, y as ModCode, N as NettingType, z as NotificationMode, O as OrderStatus, B as PhysicalState, G as PlantingMethod, R as RESOURCE_MODULE_MAP, J as RESOURCE_PATHS, K as RESOURCE_REQUIREMENTS, Q as ROLE_SECTIONS_BY_KEY, S as RelationshipType, V as ResourceRequirement, W as RowOrientation, X as SENTINEL_UUID, Z as SoilTexture, _ as TASK_TYPE_REGISTRY, a0 as TargetEntityType, a1 as TaskStatus, a2 as TaskType, a4 as TransactionType, a5 as TrellisType, a6 as UserPrivilege, a7 as UserRole, a8 as UserRoleType, a9 as VigorRating, aa as WaterSource } from './constants-DVuhM7rv.mjs';
@@ -1 +1 @@
1
- export { A as ACCESS_RANK, a as ACT, b as AccessLevel, c as AccessLevelType, e as ApprovalStatus, f as ApprovalType, g as AuditStatus, h as AuditType, C as CAT, l as CropCycleStatus, D as DOCUMENT_MENU_MAP, m as DocumentType, E as ERROR_DICTIONARY, n as EVERYONE, o as EmitterType, p as EnabledModule, F as FORM_REGISTRY, q as FacilityType, H as HarvestMethod, L as LinkedStatus, M as MOD, s as MODULE_LABELS, t as MicroclimateZone, u as MimeType, v as ModCode, N as NettingType, w as NotificationMode, O as OrderStatus, x as PhysicalState, y as PlantingMethod, R as RESOURCE_MODULE_MAP, z as RESOURCE_PATHS, B as RESOURCE_REQUIREMENTS, G as ROLE_SECTIONS_BY_KEY, J as RelationshipType, S as ResourceRequirement, T as RowOrientation, U as SENTINEL_UUID, W as SoilTexture, X as TASK_TYPE_REGISTRY, Z as TargetEntityType, _ as TaskStatus, $ as TaskType, a1 as TransactionType, a2 as TrellisType, a3 as UserPrivilege, a4 as UserRole, a5 as UserRoleType, a6 as VigorRating, a7 as WaterSource } from './constants-DxCjnH4L.js';
1
+ export { A as ACCESS_RANK, a as ACT, b as AccessLevel, c as AccessLevelType, e as ApprovalStatus, f as ApprovalType, g as AuditStatus, h as AuditType, C as CAT, k as CATEGORY_TABS, m as CropCycleStatus, D as DOCUMENT_DISPLAY_INFO, n as DOCUMENT_MENU_MAP, o as DocumentCategory, p as DocumentType, E as ERROR_DICTIONARY, q as EVERYONE, r as EmitterType, s as EnabledModule, F as FORM_REGISTRY, t as FacilityType, H as HarvestMethod, L as LinkedStatus, M as MOD, v as MODULE_LABELS, w as MicroclimateZone, x as MimeType, y as ModCode, N as NettingType, z as NotificationMode, O as OrderStatus, B as PhysicalState, G as PlantingMethod, R as RESOURCE_MODULE_MAP, J as RESOURCE_PATHS, K as RESOURCE_REQUIREMENTS, Q as ROLE_SECTIONS_BY_KEY, S as RelationshipType, V as ResourceRequirement, W as RowOrientation, X as SENTINEL_UUID, Z as SoilTexture, _ as TASK_TYPE_REGISTRY, a0 as TargetEntityType, a1 as TaskStatus, a2 as TaskType, a4 as TransactionType, a5 as TrellisType, a6 as UserPrivilege, a7 as UserRole, a8 as UserRoleType, a9 as VigorRating, aa as WaterSource } from './constants-DVuhM7rv.js';
package/dist/constants.js CHANGED
@@ -28,8 +28,11 @@ __export(constants_exports, {
28
28
  AuditStatus: () => AuditStatus,
29
29
  AuditType: () => AuditType,
30
30
  CAT: () => CAT,
31
+ CATEGORY_TABS: () => CATEGORY_TABS,
31
32
  CropCycleStatus: () => CropCycleStatus,
33
+ DOCUMENT_DISPLAY_INFO: () => DOCUMENT_DISPLAY_INFO,
32
34
  DOCUMENT_MENU_MAP: () => DOCUMENT_MENU_MAP,
35
+ DocumentCategory: () => DocumentCategory,
33
36
  DocumentType: () => DocumentType,
34
37
  ERROR_DICTIONARY: () => ERROR_DICTIONARY,
35
38
  EVERYONE: () => EVERYONE,
@@ -568,6 +571,194 @@ var DocumentType = /* @__PURE__ */ ((DocumentType2) => {
568
571
  DocumentType2["SENSITIVE_IDENTITY"] = "SENSITIVE_IDENTITY";
569
572
  return DocumentType2;
570
573
  })(DocumentType || {});
574
+ var DocumentCategory = /* @__PURE__ */ ((DocumentCategory2) => {
575
+ DocumentCategory2["AGRONOMY_TESTING"] = "Agronomy & Testing";
576
+ DocumentCategory2["FARM_OPERATIONS"] = "Farm Operations";
577
+ DocumentCategory2["COMPLIANCE_QA"] = "Compliance & Quality";
578
+ DocumentCategory2["INVENTORY_LOG"] = "Inventory & Logistics";
579
+ DocumentCategory2["ASSETS_MAINT"] = "Assets & Maintenance";
580
+ DocumentCategory2["HR_LEGAL_SAFETY"] = "HR, Legal & Safety";
581
+ DocumentCategory2["FINANCE_ADMIN"] = "Finance & Admin";
582
+ return DocumentCategory2;
583
+ })(DocumentCategory || {});
584
+ var DOCUMENT_DISPLAY_INFO = {
585
+ // --- AGRONOMY & TESTING ---
586
+ ["SOIL_TEST" /* SOIL_TEST */]: {
587
+ label: "Soil Analysis",
588
+ description: "Detailed lab results for soil nutrients, pH, and health.",
589
+ category: "Agronomy & Testing" /* AGRONOMY_TESTING */
590
+ },
591
+ ["LEAF_TEST" /* LEAF_TEST */]: {
592
+ label: "Leaf & Tissue Test",
593
+ description: "Nutrient analysis of plant tissue samples.",
594
+ category: "Agronomy & Testing" /* AGRONOMY_TESTING */
595
+ },
596
+ ["WATER_TEST" /* WATER_TEST */]: {
597
+ label: "Water Quality Test",
598
+ description: "Testing for irrigation suitability and microbial levels.",
599
+ category: "Agronomy & Testing" /* AGRONOMY_TESTING */
600
+ },
601
+ ["MRL_TESTING" /* MRL_TESTING */]: {
602
+ label: "MRL Residue Analysis",
603
+ description: "Maximum Residue Limit reports for chemical compliance.",
604
+ category: "Agronomy & Testing" /* AGRONOMY_TESTING */
605
+ },
606
+ ["HEAVY_METAL" /* HEAVY_METAL */]: {
607
+ label: "Heavy Metal Analysis",
608
+ description: "Testing for lead, cadmium, and other metal contaminants.",
609
+ category: "Agronomy & Testing" /* AGRONOMY_TESTING */
610
+ },
611
+ ["MICROBIAL" /* MICROBIAL */]: {
612
+ label: "Microbial Testing",
613
+ description: "Pathogen detection reports (e.g., E. coli, Salmonella).",
614
+ category: "Agronomy & Testing" /* AGRONOMY_TESTING */
615
+ },
616
+ // --- FARM OPERATIONS ---
617
+ ["SPRAY_RECORD" /* SPRAY_RECORD */]: {
618
+ label: "Spray Operations",
619
+ description: "Chemical application logs and weather conditions.",
620
+ category: "Farm Operations" /* FARM_OPERATIONS */
621
+ },
622
+ ["FERTIGATION_RECORD" /* FERTIGATION_RECORD */]: {
623
+ label: "Fertigation Logs",
624
+ description: "Records of liquid fertilizer applied via irrigation.",
625
+ category: "Farm Operations" /* FARM_OPERATIONS */
626
+ },
627
+ ["FERTILIZER_RECORD" /* FERTILIZER_RECORD */]: {
628
+ label: "Fertilizer Records",
629
+ description: "Manual granular or bulk fertilizer application logs.",
630
+ category: "Farm Operations" /* FARM_OPERATIONS */
631
+ },
632
+ ["HARVEST_LOG" /* HARVEST_LOG */]: {
633
+ label: "Harvest Manifests",
634
+ description: "Daily picking volumes and block yield data.",
635
+ category: "Farm Operations" /* FARM_OPERATIONS */
636
+ },
637
+ ["PACKHOUSE_INSPECTION" /* PACKHOUSE_INSPECTION */]: {
638
+ label: "Packhouse Inspections",
639
+ description: "Quality and hygiene checks conducted in the packhouse.",
640
+ category: "Farm Operations" /* FARM_OPERATIONS */
641
+ },
642
+ ["MAPPING_TRAFIC_MANAGEMENT" /* MAPPING_TRAFIC_MANAGEMENT */]: {
643
+ label: "Traffic Management",
644
+ description: "Maps and rules for vehicle and heavy machinery movement.",
645
+ category: "Farm Operations" /* FARM_OPERATIONS */
646
+ },
647
+ // --- COMPLIANCE & QUALITY ---
648
+ ["QA" /* QA */]: {
649
+ label: "Quality Assurance",
650
+ description: "General product quality checks and grading standards.",
651
+ category: "Compliance & Quality" /* COMPLIANCE_QA */
652
+ },
653
+ ["PEST" /* PEST */]: {
654
+ label: "Pest & Disease Monitoring",
655
+ description: "Scouting reports and pest pressure assessments.",
656
+ category: "Compliance & Quality" /* COMPLIANCE_QA */
657
+ },
658
+ ["AUDIT_REPORT" /* AUDIT_REPORT */]: {
659
+ label: "External Audit Reports",
660
+ description: "Final results from Freshcare, GlobalGAP, or Organic audits.",
661
+ category: "Compliance & Quality" /* COMPLIANCE_QA */
662
+ },
663
+ ["RISK_ASSESSMENTS" /* RISK_ASSESSMENTS */]: {
664
+ label: "Risk Assessments",
665
+ description: "Operational hazard identification and safety mitigations.",
666
+ category: "Compliance & Quality" /* COMPLIANCE_QA */
667
+ },
668
+ // --- ASSETS & MAINTENANCE ---
669
+ ["SERVICING_MAINTENANCE" /* SERVICING_MAINTENANCE */]: {
670
+ label: "Equipment Maintenance",
671
+ description: "Service history and repair logs for farm machinery.",
672
+ category: "Assets & Maintenance" /* ASSETS_MAINT */
673
+ },
674
+ ["EQUIPMENT_CALIBRATION_RECORD" /* EQUIPMENT_CALIBRATION_RECORD */]: {
675
+ label: "Calibration Records",
676
+ description: "Accuracy checks for sprayers, scales, and moisture probes.",
677
+ category: "Assets & Maintenance" /* ASSETS_MAINT */
678
+ },
679
+ ["CLEANING" /* CLEANING */]: {
680
+ label: "Sanitation Logs",
681
+ description: "Daily/weekly cleaning schedules for tools and facilities.",
682
+ category: "Assets & Maintenance" /* ASSETS_MAINT */
683
+ },
684
+ ["MAPPING_FARM_MAPS" /* MAPPING_FARM_MAPS */]: {
685
+ label: "Farm Infrastructure Maps",
686
+ description: "Layouts of blocks, irrigation, and fixed assets.",
687
+ category: "Assets & Maintenance" /* ASSETS_MAINT */
688
+ },
689
+ // --- INVENTORY & LOGISTICS ---
690
+ ["INVENTORY_CHEMICALS" /* INVENTORY_CHEMICALS */]: {
691
+ label: "Chemical Inventory",
692
+ description: "Manifests for stored pesticides and fertilizers.",
693
+ category: "Inventory & Logistics" /* INVENTORY_LOG */
694
+ },
695
+ ["INVENTORY_BOX_CARTON" /* INVENTORY_BOX_CARTON */]: {
696
+ label: "Packaging Inventory",
697
+ description: "Stock levels for cartons, bins, and packaging materials.",
698
+ category: "Inventory & Logistics" /* INVENTORY_LOG */
699
+ },
700
+ ["INVENTORY_CONSUMABLES" /* INVENTORY_CONSUMABLES */]: {
701
+ label: "General Consumables",
702
+ description: "Stock tracking for fuel, PPE, and workshop supplies.",
703
+ category: "Inventory & Logistics" /* INVENTORY_LOG */
704
+ },
705
+ ["STOCKTAKE" /* STOCKTAKE */]: {
706
+ label: "Physical Stocktake",
707
+ description: "Periodic audits of physical vs. recorded stock levels.",
708
+ category: "Inventory & Logistics" /* INVENTORY_LOG */
709
+ },
710
+ ["STOCKTAKE_MSDS" /* STOCKTAKE_MSDS */]: {
711
+ label: "MSDS / Safety Data",
712
+ description: "Material Safety Data Sheets for stored chemicals.",
713
+ category: "Inventory & Logistics" /* INVENTORY_LOG */
714
+ },
715
+ // --- HR, LEGAL & SAFETY ---
716
+ ["TRAINING_RECORDS" /* TRAINING_RECORDS */]: {
717
+ label: "Staff Inductions",
718
+ description: "General staff onboarding and safety training logs.",
719
+ category: "HR, Legal & Safety" /* HR_LEGAL_SAFETY */
720
+ },
721
+ ["TRAINING_CERTIFICATE" /* TRAINING_CERTIFICATE */]: {
722
+ label: "Training Certificates",
723
+ description: "External licenses, ChemCert, and first aid tickets.",
724
+ category: "HR, Legal & Safety" /* HR_LEGAL_SAFETY */
725
+ },
726
+ ["SOPS" /* SOPS */]: {
727
+ label: "Standard Procedures (SOPs)",
728
+ description: "Formalized instructions for farm and packhouse tasks.",
729
+ category: "HR, Legal & Safety" /* HR_LEGAL_SAFETY */
730
+ },
731
+ ["LEGAL_CONTRACT" /* LEGAL_CONTRACT */]: {
732
+ label: "Legal Contracts",
733
+ description: "Lease agreements, supply contracts, and employment terms.",
734
+ category: "HR, Legal & Safety" /* HR_LEGAL_SAFETY */
735
+ },
736
+ ["INCIDENT_REPORT" /* INCIDENT_REPORT */]: {
737
+ label: "Incident Reports",
738
+ description: "Logs of injuries, near-misses, or property damage.",
739
+ category: "HR, Legal & Safety" /* HR_LEGAL_SAFETY */
740
+ },
741
+ ["SENSITIVE_IDENTITY" /* SENSITIVE_IDENTITY */]: {
742
+ label: "Identity & Visas",
743
+ description: "Sensitive data: Passports, ID cards, and work permits.",
744
+ category: "HR, Legal & Safety" /* HR_LEGAL_SAFETY */
745
+ },
746
+ ["MAPPING_EMERGENCY" /* MAPPING_EMERGENCY */]: {
747
+ label: "Emergency Response Maps",
748
+ description: "Evacuation routes and emergency assembly points.",
749
+ category: "HR, Legal & Safety" /* HR_LEGAL_SAFETY */
750
+ },
751
+ // --- FINANCE & ADMIN ---
752
+ ["INVOICE" /* INVOICE */]: {
753
+ label: "Supplier Invoices",
754
+ description: "Billing records for inputs, utilities, and services.",
755
+ category: "Finance & Admin" /* FINANCE_ADMIN */
756
+ }
757
+ };
758
+ var CATEGORY_TABS = [
759
+ "All",
760
+ ...Object.values(DocumentCategory)
761
+ ];
571
762
  var DOCUMENT_MENU_MAP = {
572
763
  ["SPRAY_RECORD" /* SPRAY_RECORD */]: [RESOURCE_PATHS.farmManagement],
573
764
  ["FERTIGATION_RECORD" /* FERTIGATION_RECORD */]: [RESOURCE_PATHS.farmManagement],
@@ -613,8 +804,11 @@ var DOCUMENT_MENU_MAP = {
613
804
  AuditStatus,
614
805
  AuditType,
615
806
  CAT,
807
+ CATEGORY_TABS,
616
808
  CropCycleStatus,
809
+ DOCUMENT_DISPLAY_INFO,
617
810
  DOCUMENT_MENU_MAP,
811
+ DocumentCategory,
618
812
  DocumentType,
619
813
  ERROR_DICTIONARY,
620
814
  EVERYONE,
@@ -7,8 +7,11 @@ import {
7
7
  AuditStatus,
8
8
  AuditType,
9
9
  CAT,
10
+ CATEGORY_TABS,
10
11
  CropCycleStatus,
12
+ DOCUMENT_DISPLAY_INFO,
11
13
  DOCUMENT_MENU_MAP,
14
+ DocumentCategory,
12
15
  DocumentType,
13
16
  ERROR_DICTIONARY,
14
17
  EVERYONE,
@@ -45,7 +48,7 @@ import {
45
48
  UserRole,
46
49
  VigorRating,
47
50
  WaterSource
48
- } from "./chunk-QI4YXI4P.mjs";
51
+ } from "./chunk-LGEV4MBQ.mjs";
49
52
  export {
50
53
  ACCESS_RANK,
51
54
  ACT,
@@ -55,8 +58,11 @@ export {
55
58
  AuditStatus,
56
59
  AuditType,
57
60
  CAT,
61
+ CATEGORY_TABS,
58
62
  CropCycleStatus,
63
+ DOCUMENT_DISPLAY_INFO,
59
64
  DOCUMENT_MENU_MAP,
65
+ DocumentCategory,
60
66
  DocumentType,
61
67
  ERROR_DICTIONARY,
62
68
  EVERYONE,
package/dist/index.d.mts CHANGED
@@ -1,5 +1,5 @@
1
- import { d as AgriCoreSession, a5 as UserRoleType, S as ResourceRequirement, c as AccessLevelType, j as AvailableScope, I as InfrastructureFields, r as FormMeta, Y as TabConfig, K as ResolvedError } from './constants-DxCjnH4L.mjs';
2
- export { A as ACCESS_RANK, a as ACT, b as AccessLevel, e as ApprovalStatus, f as ApprovalType, g as AuditStatus, h as AuditType, i as AuthScopeFields, C as CAT, k as CompanyConfig, l as CropCycleStatus, D as DOCUMENT_MENU_MAP, m as DocumentType, E as ERROR_DICTIONARY, n as EVERYONE, o as EmitterType, p as EnabledModule, F as FORM_REGISTRY, q as FacilityType, H as HarvestMethod, L as LinkedStatus, M as MOD, s as MODULE_LABELS, t as MicroclimateZone, u as MimeType, v as ModCode, N as NettingType, w as NotificationMode, O as OrderStatus, P as PermissionLevel, x as PhysicalState, y as PlantingMethod, R as RESOURCE_MODULE_MAP, z as RESOURCE_PATHS, B as RESOURCE_REQUIREMENTS, G as ROLE_SECTIONS_BY_KEY, J as RelationshipType, Q as ResourceOverrides, T as RowOrientation, U as SENTINEL_UUID, V as ScopeType, W as SoilTexture, X as TASK_TYPE_REGISTRY, Z as TargetEntityType, _ as TaskStatus, $ as TaskType, a0 as TaskTypeConfig, a1 as TransactionType, a2 as TrellisType, a3 as UserPrivilege, a4 as UserRole, a6 as VigorRating, a7 as WaterSource } from './constants-DxCjnH4L.mjs';
1
+ import { d as AgriCoreSession, a8 as UserRoleType, V as ResourceRequirement, c as AccessLevelType, j as AvailableScope, I as InfrastructureFields, u as FormMeta, $ as TabConfig, T as ResolvedError } from './constants-DVuhM7rv.mjs';
2
+ export { A as ACCESS_RANK, a as ACT, b as AccessLevel, e as ApprovalStatus, f as ApprovalType, g as AuditStatus, h as AuditType, i as AuthScopeFields, C as CAT, k as CATEGORY_TABS, l as CompanyConfig, m as CropCycleStatus, D as DOCUMENT_DISPLAY_INFO, n as DOCUMENT_MENU_MAP, o as DocumentCategory, p as DocumentType, E as ERROR_DICTIONARY, q as EVERYONE, r as EmitterType, s as EnabledModule, F as FORM_REGISTRY, t as FacilityType, H as HarvestMethod, L as LinkedStatus, M as MOD, v as MODULE_LABELS, w as MicroclimateZone, x as MimeType, y as ModCode, N as NettingType, z as NotificationMode, O as OrderStatus, P as PermissionLevel, B as PhysicalState, G as PlantingMethod, R as RESOURCE_MODULE_MAP, J as RESOURCE_PATHS, K as RESOURCE_REQUIREMENTS, Q as ROLE_SECTIONS_BY_KEY, S as RelationshipType, U as ResourceOverrides, W as RowOrientation, X as SENTINEL_UUID, Y as ScopeType, Z as SoilTexture, _ as TASK_TYPE_REGISTRY, a0 as TargetEntityType, a1 as TaskStatus, a2 as TaskType, a3 as TaskTypeConfig, a4 as TransactionType, a5 as TrellisType, a6 as UserPrivilege, a7 as UserRole, a9 as VigorRating, aa as WaterSource } from './constants-DVuhM7rv.mjs';
3
3
 
4
4
  declare const AgriLogger: {
5
5
  log(level: "INFO" | "WARN" | "ERROR", message: string, meta: any): void;
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { d as AgriCoreSession, a5 as UserRoleType, S as ResourceRequirement, c as AccessLevelType, j as AvailableScope, I as InfrastructureFields, r as FormMeta, Y as TabConfig, K as ResolvedError } from './constants-DxCjnH4L.js';
2
- export { A as ACCESS_RANK, a as ACT, b as AccessLevel, e as ApprovalStatus, f as ApprovalType, g as AuditStatus, h as AuditType, i as AuthScopeFields, C as CAT, k as CompanyConfig, l as CropCycleStatus, D as DOCUMENT_MENU_MAP, m as DocumentType, E as ERROR_DICTIONARY, n as EVERYONE, o as EmitterType, p as EnabledModule, F as FORM_REGISTRY, q as FacilityType, H as HarvestMethod, L as LinkedStatus, M as MOD, s as MODULE_LABELS, t as MicroclimateZone, u as MimeType, v as ModCode, N as NettingType, w as NotificationMode, O as OrderStatus, P as PermissionLevel, x as PhysicalState, y as PlantingMethod, R as RESOURCE_MODULE_MAP, z as RESOURCE_PATHS, B as RESOURCE_REQUIREMENTS, G as ROLE_SECTIONS_BY_KEY, J as RelationshipType, Q as ResourceOverrides, T as RowOrientation, U as SENTINEL_UUID, V as ScopeType, W as SoilTexture, X as TASK_TYPE_REGISTRY, Z as TargetEntityType, _ as TaskStatus, $ as TaskType, a0 as TaskTypeConfig, a1 as TransactionType, a2 as TrellisType, a3 as UserPrivilege, a4 as UserRole, a6 as VigorRating, a7 as WaterSource } from './constants-DxCjnH4L.js';
1
+ import { d as AgriCoreSession, a8 as UserRoleType, V as ResourceRequirement, c as AccessLevelType, j as AvailableScope, I as InfrastructureFields, u as FormMeta, $ as TabConfig, T as ResolvedError } from './constants-DVuhM7rv.js';
2
+ export { A as ACCESS_RANK, a as ACT, b as AccessLevel, e as ApprovalStatus, f as ApprovalType, g as AuditStatus, h as AuditType, i as AuthScopeFields, C as CAT, k as CATEGORY_TABS, l as CompanyConfig, m as CropCycleStatus, D as DOCUMENT_DISPLAY_INFO, n as DOCUMENT_MENU_MAP, o as DocumentCategory, p as DocumentType, E as ERROR_DICTIONARY, q as EVERYONE, r as EmitterType, s as EnabledModule, F as FORM_REGISTRY, t as FacilityType, H as HarvestMethod, L as LinkedStatus, M as MOD, v as MODULE_LABELS, w as MicroclimateZone, x as MimeType, y as ModCode, N as NettingType, z as NotificationMode, O as OrderStatus, P as PermissionLevel, B as PhysicalState, G as PlantingMethod, R as RESOURCE_MODULE_MAP, J as RESOURCE_PATHS, K as RESOURCE_REQUIREMENTS, Q as ROLE_SECTIONS_BY_KEY, S as RelationshipType, U as ResourceOverrides, W as RowOrientation, X as SENTINEL_UUID, Y as ScopeType, Z as SoilTexture, _ as TASK_TYPE_REGISTRY, a0 as TargetEntityType, a1 as TaskStatus, a2 as TaskType, a3 as TaskTypeConfig, a4 as TransactionType, a5 as TrellisType, a6 as UserPrivilege, a7 as UserRole, a9 as VigorRating, aa as WaterSource } from './constants-DVuhM7rv.js';
3
3
 
4
4
  declare const AgriLogger: {
5
5
  log(level: "INFO" | "WARN" | "ERROR", message: string, meta: any): void;
package/dist/index.js CHANGED
@@ -30,9 +30,12 @@ __export(index_exports, {
30
30
  AuditStatus: () => AuditStatus,
31
31
  AuditType: () => AuditType,
32
32
  CAT: () => CAT,
33
+ CATEGORY_TABS: () => CATEGORY_TABS,
33
34
  Converter: () => Converter,
34
35
  CropCycleStatus: () => CropCycleStatus,
36
+ DOCUMENT_DISPLAY_INFO: () => DOCUMENT_DISPLAY_INFO,
35
37
  DOCUMENT_MENU_MAP: () => DOCUMENT_MENU_MAP,
38
+ DocumentCategory: () => DocumentCategory,
36
39
  DocumentType: () => DocumentType,
37
40
  ERROR_DICTIONARY: () => ERROR_DICTIONARY,
38
41
  EVERYONE: () => EVERYONE,
@@ -789,6 +792,194 @@ var DocumentType = /* @__PURE__ */ ((DocumentType2) => {
789
792
  DocumentType2["SENSITIVE_IDENTITY"] = "SENSITIVE_IDENTITY";
790
793
  return DocumentType2;
791
794
  })(DocumentType || {});
795
+ var DocumentCategory = /* @__PURE__ */ ((DocumentCategory2) => {
796
+ DocumentCategory2["AGRONOMY_TESTING"] = "Agronomy & Testing";
797
+ DocumentCategory2["FARM_OPERATIONS"] = "Farm Operations";
798
+ DocumentCategory2["COMPLIANCE_QA"] = "Compliance & Quality";
799
+ DocumentCategory2["INVENTORY_LOG"] = "Inventory & Logistics";
800
+ DocumentCategory2["ASSETS_MAINT"] = "Assets & Maintenance";
801
+ DocumentCategory2["HR_LEGAL_SAFETY"] = "HR, Legal & Safety";
802
+ DocumentCategory2["FINANCE_ADMIN"] = "Finance & Admin";
803
+ return DocumentCategory2;
804
+ })(DocumentCategory || {});
805
+ var DOCUMENT_DISPLAY_INFO = {
806
+ // --- AGRONOMY & TESTING ---
807
+ ["SOIL_TEST" /* SOIL_TEST */]: {
808
+ label: "Soil Analysis",
809
+ description: "Detailed lab results for soil nutrients, pH, and health.",
810
+ category: "Agronomy & Testing" /* AGRONOMY_TESTING */
811
+ },
812
+ ["LEAF_TEST" /* LEAF_TEST */]: {
813
+ label: "Leaf & Tissue Test",
814
+ description: "Nutrient analysis of plant tissue samples.",
815
+ category: "Agronomy & Testing" /* AGRONOMY_TESTING */
816
+ },
817
+ ["WATER_TEST" /* WATER_TEST */]: {
818
+ label: "Water Quality Test",
819
+ description: "Testing for irrigation suitability and microbial levels.",
820
+ category: "Agronomy & Testing" /* AGRONOMY_TESTING */
821
+ },
822
+ ["MRL_TESTING" /* MRL_TESTING */]: {
823
+ label: "MRL Residue Analysis",
824
+ description: "Maximum Residue Limit reports for chemical compliance.",
825
+ category: "Agronomy & Testing" /* AGRONOMY_TESTING */
826
+ },
827
+ ["HEAVY_METAL" /* HEAVY_METAL */]: {
828
+ label: "Heavy Metal Analysis",
829
+ description: "Testing for lead, cadmium, and other metal contaminants.",
830
+ category: "Agronomy & Testing" /* AGRONOMY_TESTING */
831
+ },
832
+ ["MICROBIAL" /* MICROBIAL */]: {
833
+ label: "Microbial Testing",
834
+ description: "Pathogen detection reports (e.g., E. coli, Salmonella).",
835
+ category: "Agronomy & Testing" /* AGRONOMY_TESTING */
836
+ },
837
+ // --- FARM OPERATIONS ---
838
+ ["SPRAY_RECORD" /* SPRAY_RECORD */]: {
839
+ label: "Spray Operations",
840
+ description: "Chemical application logs and weather conditions.",
841
+ category: "Farm Operations" /* FARM_OPERATIONS */
842
+ },
843
+ ["FERTIGATION_RECORD" /* FERTIGATION_RECORD */]: {
844
+ label: "Fertigation Logs",
845
+ description: "Records of liquid fertilizer applied via irrigation.",
846
+ category: "Farm Operations" /* FARM_OPERATIONS */
847
+ },
848
+ ["FERTILIZER_RECORD" /* FERTILIZER_RECORD */]: {
849
+ label: "Fertilizer Records",
850
+ description: "Manual granular or bulk fertilizer application logs.",
851
+ category: "Farm Operations" /* FARM_OPERATIONS */
852
+ },
853
+ ["HARVEST_LOG" /* HARVEST_LOG */]: {
854
+ label: "Harvest Manifests",
855
+ description: "Daily picking volumes and block yield data.",
856
+ category: "Farm Operations" /* FARM_OPERATIONS */
857
+ },
858
+ ["PACKHOUSE_INSPECTION" /* PACKHOUSE_INSPECTION */]: {
859
+ label: "Packhouse Inspections",
860
+ description: "Quality and hygiene checks conducted in the packhouse.",
861
+ category: "Farm Operations" /* FARM_OPERATIONS */
862
+ },
863
+ ["MAPPING_TRAFIC_MANAGEMENT" /* MAPPING_TRAFIC_MANAGEMENT */]: {
864
+ label: "Traffic Management",
865
+ description: "Maps and rules for vehicle and heavy machinery movement.",
866
+ category: "Farm Operations" /* FARM_OPERATIONS */
867
+ },
868
+ // --- COMPLIANCE & QUALITY ---
869
+ ["QA" /* QA */]: {
870
+ label: "Quality Assurance",
871
+ description: "General product quality checks and grading standards.",
872
+ category: "Compliance & Quality" /* COMPLIANCE_QA */
873
+ },
874
+ ["PEST" /* PEST */]: {
875
+ label: "Pest & Disease Monitoring",
876
+ description: "Scouting reports and pest pressure assessments.",
877
+ category: "Compliance & Quality" /* COMPLIANCE_QA */
878
+ },
879
+ ["AUDIT_REPORT" /* AUDIT_REPORT */]: {
880
+ label: "External Audit Reports",
881
+ description: "Final results from Freshcare, GlobalGAP, or Organic audits.",
882
+ category: "Compliance & Quality" /* COMPLIANCE_QA */
883
+ },
884
+ ["RISK_ASSESSMENTS" /* RISK_ASSESSMENTS */]: {
885
+ label: "Risk Assessments",
886
+ description: "Operational hazard identification and safety mitigations.",
887
+ category: "Compliance & Quality" /* COMPLIANCE_QA */
888
+ },
889
+ // --- ASSETS & MAINTENANCE ---
890
+ ["SERVICING_MAINTENANCE" /* SERVICING_MAINTENANCE */]: {
891
+ label: "Equipment Maintenance",
892
+ description: "Service history and repair logs for farm machinery.",
893
+ category: "Assets & Maintenance" /* ASSETS_MAINT */
894
+ },
895
+ ["EQUIPMENT_CALIBRATION_RECORD" /* EQUIPMENT_CALIBRATION_RECORD */]: {
896
+ label: "Calibration Records",
897
+ description: "Accuracy checks for sprayers, scales, and moisture probes.",
898
+ category: "Assets & Maintenance" /* ASSETS_MAINT */
899
+ },
900
+ ["CLEANING" /* CLEANING */]: {
901
+ label: "Sanitation Logs",
902
+ description: "Daily/weekly cleaning schedules for tools and facilities.",
903
+ category: "Assets & Maintenance" /* ASSETS_MAINT */
904
+ },
905
+ ["MAPPING_FARM_MAPS" /* MAPPING_FARM_MAPS */]: {
906
+ label: "Farm Infrastructure Maps",
907
+ description: "Layouts of blocks, irrigation, and fixed assets.",
908
+ category: "Assets & Maintenance" /* ASSETS_MAINT */
909
+ },
910
+ // --- INVENTORY & LOGISTICS ---
911
+ ["INVENTORY_CHEMICALS" /* INVENTORY_CHEMICALS */]: {
912
+ label: "Chemical Inventory",
913
+ description: "Manifests for stored pesticides and fertilizers.",
914
+ category: "Inventory & Logistics" /* INVENTORY_LOG */
915
+ },
916
+ ["INVENTORY_BOX_CARTON" /* INVENTORY_BOX_CARTON */]: {
917
+ label: "Packaging Inventory",
918
+ description: "Stock levels for cartons, bins, and packaging materials.",
919
+ category: "Inventory & Logistics" /* INVENTORY_LOG */
920
+ },
921
+ ["INVENTORY_CONSUMABLES" /* INVENTORY_CONSUMABLES */]: {
922
+ label: "General Consumables",
923
+ description: "Stock tracking for fuel, PPE, and workshop supplies.",
924
+ category: "Inventory & Logistics" /* INVENTORY_LOG */
925
+ },
926
+ ["STOCKTAKE" /* STOCKTAKE */]: {
927
+ label: "Physical Stocktake",
928
+ description: "Periodic audits of physical vs. recorded stock levels.",
929
+ category: "Inventory & Logistics" /* INVENTORY_LOG */
930
+ },
931
+ ["STOCKTAKE_MSDS" /* STOCKTAKE_MSDS */]: {
932
+ label: "MSDS / Safety Data",
933
+ description: "Material Safety Data Sheets for stored chemicals.",
934
+ category: "Inventory & Logistics" /* INVENTORY_LOG */
935
+ },
936
+ // --- HR, LEGAL & SAFETY ---
937
+ ["TRAINING_RECORDS" /* TRAINING_RECORDS */]: {
938
+ label: "Staff Inductions",
939
+ description: "General staff onboarding and safety training logs.",
940
+ category: "HR, Legal & Safety" /* HR_LEGAL_SAFETY */
941
+ },
942
+ ["TRAINING_CERTIFICATE" /* TRAINING_CERTIFICATE */]: {
943
+ label: "Training Certificates",
944
+ description: "External licenses, ChemCert, and first aid tickets.",
945
+ category: "HR, Legal & Safety" /* HR_LEGAL_SAFETY */
946
+ },
947
+ ["SOPS" /* SOPS */]: {
948
+ label: "Standard Procedures (SOPs)",
949
+ description: "Formalized instructions for farm and packhouse tasks.",
950
+ category: "HR, Legal & Safety" /* HR_LEGAL_SAFETY */
951
+ },
952
+ ["LEGAL_CONTRACT" /* LEGAL_CONTRACT */]: {
953
+ label: "Legal Contracts",
954
+ description: "Lease agreements, supply contracts, and employment terms.",
955
+ category: "HR, Legal & Safety" /* HR_LEGAL_SAFETY */
956
+ },
957
+ ["INCIDENT_REPORT" /* INCIDENT_REPORT */]: {
958
+ label: "Incident Reports",
959
+ description: "Logs of injuries, near-misses, or property damage.",
960
+ category: "HR, Legal & Safety" /* HR_LEGAL_SAFETY */
961
+ },
962
+ ["SENSITIVE_IDENTITY" /* SENSITIVE_IDENTITY */]: {
963
+ label: "Identity & Visas",
964
+ description: "Sensitive data: Passports, ID cards, and work permits.",
965
+ category: "HR, Legal & Safety" /* HR_LEGAL_SAFETY */
966
+ },
967
+ ["MAPPING_EMERGENCY" /* MAPPING_EMERGENCY */]: {
968
+ label: "Emergency Response Maps",
969
+ description: "Evacuation routes and emergency assembly points.",
970
+ category: "HR, Legal & Safety" /* HR_LEGAL_SAFETY */
971
+ },
972
+ // --- FINANCE & ADMIN ---
973
+ ["INVOICE" /* INVOICE */]: {
974
+ label: "Supplier Invoices",
975
+ description: "Billing records for inputs, utilities, and services.",
976
+ category: "Finance & Admin" /* FINANCE_ADMIN */
977
+ }
978
+ };
979
+ var CATEGORY_TABS = [
980
+ "All",
981
+ ...Object.values(DocumentCategory)
982
+ ];
792
983
  var DOCUMENT_MENU_MAP = {
793
984
  ["SPRAY_RECORD" /* SPRAY_RECORD */]: [RESOURCE_PATHS.farmManagement],
794
985
  ["FERTIGATION_RECORD" /* FERTIGATION_RECORD */]: [RESOURCE_PATHS.farmManagement],
@@ -1154,9 +1345,12 @@ function calculateFileMetadataMatch(criteria, fileMetadata, auditContext) {
1154
1345
  AuditStatus,
1155
1346
  AuditType,
1156
1347
  CAT,
1348
+ CATEGORY_TABS,
1157
1349
  Converter,
1158
1350
  CropCycleStatus,
1351
+ DOCUMENT_DISPLAY_INFO,
1159
1352
  DOCUMENT_MENU_MAP,
1353
+ DocumentCategory,
1160
1354
  DocumentType,
1161
1355
  ERROR_DICTIONARY,
1162
1356
  EVERYONE,
package/dist/index.mjs CHANGED
@@ -7,8 +7,11 @@ import {
7
7
  AuditStatus,
8
8
  AuditType,
9
9
  CAT,
10
+ CATEGORY_TABS,
10
11
  CropCycleStatus,
12
+ DOCUMENT_DISPLAY_INFO,
11
13
  DOCUMENT_MENU_MAP,
14
+ DocumentCategory,
12
15
  DocumentType,
13
16
  ERROR_DICTIONARY,
14
17
  EVERYONE,
@@ -45,7 +48,7 @@ import {
45
48
  UserRole,
46
49
  VigorRating,
47
50
  WaterSource
48
- } from "./chunk-QI4YXI4P.mjs";
51
+ } from "./chunk-LGEV4MBQ.mjs";
49
52
 
50
53
  // src/index.ts
51
54
  import { jwtVerify } from "jose";
@@ -564,9 +567,12 @@ export {
564
567
  AuditStatus,
565
568
  AuditType,
566
569
  CAT,
570
+ CATEGORY_TABS,
567
571
  Converter,
568
572
  CropCycleStatus,
573
+ DOCUMENT_DISPLAY_INFO,
569
574
  DOCUMENT_MENU_MAP,
575
+ DocumentCategory,
570
576
  DocumentType,
571
577
  ERROR_DICTIONARY,
572
578
  EVERYONE,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@litusarchieve18/agricore-utils",
3
- "version": "1.0.13",
3
+ "version": "1.0.14",
4
4
  "description": "Canonical Backend Utility Library for AgriCore",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",