Skip to main content

Zones

🎯 Overview​

The Zones Page serves as the comprehensive zone management interface for organizing and controlling warehouse locations within projects. This sophisticated system provides complete zone lifecycle management, from creation and configuration through status monitoring and operational control. The zones system enables efficient inventory tracking, scanning operations, and warehouse organization with hierarchical structure and real-time status monitoring.

The Zones Module operates with integrated components for complete warehouse management:

  • πŸ—οΈ Zone Creation & Management: Create single zones or bulk ranges with standardized naming conventions
  • 🎯 Status & Workflow Control: Monitor zone progression through scanning, verification, and export phases
  • 🚩 Flag & Alert System: Track zone conditions, quality issues, and operational requirements
  • πŸ“Š Visual Zone Grid: Color-coded zone visualization with status indicators and session tracking

πŸ” Access Requirements​

πŸ‘₯ Required Roles & Permissions​

  • View Zones: zones.view permission (basic zone visibility)
  • Create Zones: zones.upsert permission (zone creation and modification)
  • Delete Zones: zones.remove permission (zone deletion capabilities)
  • Block/Unblock Zones: zones.block permission (operational control)
  • Zone Flags: zones.flags permission (flag management)
  • Zone Remarks: zones.remarks permission (annotation capabilities)
  • Transform Scans: zones.transformScans permission (data processing)
  • Verify Functions: zones.reevaluateVerifyFunction permission (quality control)

🌐 Permission Scope​

  • Project-Based: Zone operations limited to user's assigned projects
  • Role-Based Access: Different permissions for different operational roles
  • Status-Based Restrictions: Some operations restricted based on zone status
  • Project State Validation: Operations blocked in closed, published, or archived projects

πŸ’» Zones Page Interface Layout​

πŸ—ΊοΈ Main Zone Grid Interface​

The Zones page displays a grid view of all zones in the current project with their status indicators and action buttons.

Header Controls:

  • Filter button: Filter zones by various criteria
  • Manage button: Access zone management options

Zone Grid: The grid displays zones in a table format showing:

  • Zone identifiers (e.g., A001, A002, A003)
  • Status indicators with color coding
  • Action buttons and indicators for each zone

Status Legend:

  • 🟒 Scan Ready: Zone is ready for scanning operations
  • 🟑 Scan Busy: Zone is currently being scanned
  • πŸ”΄ Verify Busy: Zone is being verified
  • βšͺ Undefined: Zone status is not defined
  • 🟠 Verify Ready: Zone is ready for verification
  • πŸ”΅ Export Ready: Zone is ready for export
  • ⚫ Blocked: Zone is blocked from operations

πŸ—οΈ Zone Creation Interface​

βž• Zone Management
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ πŸ“ Creation Mode: β”‚
β”‚ β—‹ Single Zone ● Range Mode β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ 🏷️ Range Configuration: β”‚
β”‚ Prefix: [A β–Ό] β”‚ From: [001] β”‚ To: [100] β”‚ Length: [3] β”‚
β”‚ Warehouse: [WH-01β–Ό] β”‚ Division: [Mainβ–Ό] β”‚ Extra1: [ ] β”‚
β”‚ Extra2: [ ] β”‚ Linked Zone: [ ] β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ [Create Zones] [Delete Range] β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ πŸ“Š Existing Ranges: β”‚
β”‚ Range β”‚Countβ”‚Warehouseβ”‚Divisionβ”‚Extra1β”‚Status β”‚
β”‚ A001-A100 β”‚ 100 β”‚ WH-01 β”‚ Main β”‚ β”‚ Active β”‚
β”‚ B001-B050 β”‚ 50 β”‚ WH-02 β”‚ Pick β”‚ QC β”‚ Active β”‚
β”‚ C001-C025 β”‚ 25 β”‚ WH-01 β”‚ Pack β”‚ β”‚ Deleted β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ” Zone Filters Interface​

πŸ” Zone Filters
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ πŸ“Š Status Filters: β”‚
β”‚ β˜‘ Scan Plan β˜‘ Scan Busy β˜‘ Scan Ready β”‚
β”‚ β˜‘ Verify Plan β˜‘ Verify Busy β˜‘ Verify Ready β”‚
β”‚ β˜‘ Export Plan β˜‘ Export Busy β˜‘ Export Ready β”‚
β”‚ β˜‘ Undefined ☐ Blocked β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ 🚩 Flag Filters: β”‚
β”‚ β˜‘ ⚠️ Verification Needed β˜‘ πŸ“ Has Remarks β”‚
β”‚ β˜‘ πŸ” 100%-verification β˜‘ πŸ“¦ Empty Zone β”‚
β”‚ β˜‘ πŸ‘€ Session by Client β˜‘ πŸ”„ Change Request β”‚
β”‚ β˜‘ ❌ Invalid TransformScans β˜‘ 🚫 Invalid Verify Function β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ 🏒 Location Filters: β”‚
β”‚ β˜‘ Warehouse A β˜‘ Warehouse B β˜‘ Warehouse C β”‚
β”‚ β˜‘ Division 1 β˜‘ Division 2 β˜‘ Division 3 β”‚
β”‚ β˜‘ Extra Code 1 β˜‘ Extra Code 2 β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ—οΈ Zone Creation & Management Component​

The Zone Creation & Management section provides comprehensive tools for establishing and maintaining warehouse zone structure.

⭐ Zone Creation Features​

  • Single Zone Mode: Create individual zones with custom codes and metadata
  • Range Mode: Bulk create sequential zones with prefix, numbering, and padding
  • Validation System: RegEx-based code validation ensuring naming consistency
  • Metadata Assignment: Warehouse codes, divisions, extra codes, and linked zones
  • Conflict Prevention: Duplicate detection and validation before creation

🏷️ Zone Configuration Options​

  • πŸ“‹ Zone Code: Alphanumeric identifier following project naming conventions
  • 🏒 Warehouse Code: Organizational warehouse identifier for location tracking
  • 🏭 Division: Operational division assignment (Main, Pick, Pack, etc.)
  • πŸ“ Extra Codes: Additional classification fields for custom categorization
  • πŸ”— Linked Zone: Cross-reference to related zones or client zone mappings
  • 🎯 Prefix Management: Standardized prefixes from configurable dropdown options

πŸ”„ Zone Range Management​

  1. Range Definition: Set prefix, start number, end number, and digit padding
  2. Bulk Operations: Create or delete up to 1000 zones simultaneously
  3. Configuration Inheritance: Apply consistent metadata across entire ranges
  4. Range Visualization: Tabular view of existing ranges with status indicators
  5. Selective Modification: Edit individual zones within existing ranges

🎯 Status & Workflow Control Component​

The Status & Workflow Control section manages zone progression through operational phases and workflow states.

⭐ Zone Status Management​

  • πŸ”΅ Undefined: Initial state before operational assignment
  • 🟒 Scan Plan: Scheduled for scanning operations
  • 🟑 Scan Busy: Currently undergoing scanning process
  • 🟒 Scan Ready: Scanning completed, ready for verification
  • 🟠 Verify Plan: Scheduled for verification operations
  • πŸ”΄ Verify Busy: Currently undergoing verification process
  • 🟠 Verify Ready: Verification completed, ready for export
  • πŸ”΅ Export Plan: Scheduled for data export operations
  • πŸ”΅ Export Busy: Currently processing export operations
  • πŸ”΅ Export Ready: Export completed, operations finalized
  • ⚫ Blocked: Manually blocked from operations

πŸ”„ Workflow Progression​

  1. Zone Creation: New zones start in "Undefined" status
  2. Scan Assignment: Zones progress to scan planning phase
  3. Scanning Operations: Active scanning updates status to busy/ready
  4. Verification Phase: Quality control and verification operations
  5. Export Processing: Final data export and completion
  6. Manual Controls: Block/unblock zones for operational control

⚑ Status Control Operations​

  • Block Zone: Manually prevent zone operations (undefined zones only)
  • Unblock Zone: Remove manual blocks and restore operational status
  • Status Transitions: Automatic progression based on operational completion
  • Workflow Validation: Ensure proper sequence and operational readiness

🚩 Flag & Alert System Component​

The Flag & Alert System provides comprehensive monitoring and notification capabilities for zone conditions and operational requirements.

⭐ Zone Flag Categories​

  • ⚠️ Verification Needed: Zone requires verification attention
  • πŸ” 100%-verification: Complete verification requirement flag
  • πŸ“ Has Remarks: Zone contains operational notes or comments
  • πŸ“¦ Empty Zone: Zone identified as empty during operations
  • πŸ‘€ Session by Client: Zone has client-initiated scanning sessions
  • πŸ”„ Session with Change Request: Active change requests for zone
  • ❌ Invalid TransformScans: Data transformation errors detected
  • 🚫 Invalid Verify Function: Verification function configuration issues
  • 🎯 Deviant Zone Verification: Non-standard verification requirements

πŸ”§ Flag Management Operations​

  • Add Flags: Manually assign flags to zones based on operational needs
  • Remove Flags: Clear resolved flags and conditions
  • Automatic Flagging: System-generated flags based on scan results and conditions
  • Flag Filtering: Filter zone view by specific flag types
  • Custom Flags: Support for project-specific custom flag definitions

πŸ“‹ Remarks System​

  • Zone Annotations: Add detailed operational notes and comments
  • Remark Flags: Automatic flagging of zones with remarks
  • Searchable Comments: Full-text search capabilities for remarks
  • Operational Context: Link remarks to specific operational phases

πŸ“Š Visual Zone Grid Component​

The Visual Zone Grid provides intuitive color-coded visualization of zone status and operational conditions.

⭐ Grid Visualization Features​

  • Color-Coded Status: Immediate visual status recognition
  • Zone Code Display: Clear zone identifier presentation
  • Flag Indicators: Visual symbols for zone flags and conditions
  • Session Counters: Numeric indicators for multiple scanning sessions
  • Interactive Selection: Click zones for detailed operations
  • Loading States: Progressive loading indicators for large zone sets

🎨 Status Color Coding​

  • 🟒 Green: Ready states (Scan Ready, operational readiness)
  • 🟑 Yellow: Active states (Scan Busy, in-progress operations)
  • πŸ”΄ Red: Critical states (Verify Busy, attention required)
  • βšͺ White: Neutral states (Undefined, awaiting assignment)
  • 🟠 Orange: Transition states (Verify Ready, pending next phase)
  • πŸ”΅ Blue: Export states (Export operations and completion)
  • ⚫ Black: Blocked states (Manual blocks, operational restrictions)

πŸ“± Responsive Grid Layout​

  • Adaptive Sizing: Grid adjusts to screen size and zone count
  • Pagination Support: Efficient handling of large zone datasets
  • Touch-Friendly: Mobile-optimized interaction capabilities
  • Zoom Controls: Scale grid for optimal viewing

⭐ Core Zones System Features​

πŸ” Permission Integration​

  • Role-Based Operations: Different permissions for different zone operations
  • Project Scope Enforcement: Restrict operations to authorized projects
  • Status-Based Restrictions: Limit operations based on current zone status
  • Hierarchical Access: Respect organizational permission hierarchies

πŸ“Š Zone Metadata Management​

  • Structured Data: Organized warehouse codes, divisions, and extra codes
  • Configuration Validation: Ensure compliance with project naming conventions
  • Linked Zone Support: Cross-reference capabilities for complex warehouse layouts
  • Client Zone Mapping: Support for client-specific zone identifiers

πŸ” Advanced Filtering System​

  • Multi-Criteria Filtering: Combine status, flags, and metadata filters
  • Real-time Updates: Instant filter application and result updates
  • Filter Persistence: Maintain filter states during session
  • Export Capabilities: Generate filtered zone reports and lists

πŸ“˜ Zones Page Usage Guide​

πŸš€ Getting Started with Zone Management​

  1. Navigate to Zones page via main navigation menu
  2. Review Current Zones: Check existing zone layout and status distribution
  3. Apply Filters: Use filter controls to focus on specific zone categories
  4. Select Operation: Choose between viewing, creating, or managing zones
  5. Monitor Permissions: Verify your access level for planned operations

πŸ—οΈ Creating Individual Zones​

  1. Select Single Mode:

    πŸ“ Choose "Single Zone" creation mode
    🏷️ Enter zone code following naming conventions
    🏒 Select warehouse code from dropdown
    🏭 Choose division and extra codes as needed
  2. Configure Zone Details:

    πŸ”— Set linked zone if cross-referencing required
    βœ… Validate zone code against project RegEx
    πŸ“‹ Review metadata for completeness
    πŸš€ Click "Create" to finalize zone

πŸ“Š Bulk Zone Range Creation​

  1. Select Range Mode:

    πŸŽ›οΈ Choose "Range Mode" for bulk creation
    🏷️ Select prefix from configured options
    πŸ”’ Set start number, end number, and padding length
    πŸ“Š Review total zone count (max 1000)
  2. Configure Range Metadata:

    🏒 Select warehouse code for entire range
    🏭 Choose division assignment
    πŸ“ Set extra codes for categorization
    πŸ”— Configure linked zone if applicable
  3. Execute Range Creation:

    βœ… Verify range configuration is correct
    πŸš€ Click "Create Zones" button
    ⏳ Monitor progress for large ranges
    πŸ“‹ Review created zones in grid view

🎯 Managing Zone Status and Operations​

  1. Zone Status Control:

    πŸ—ΊοΈ Click individual zones in grid view
    ⚫ Use "Block" to prevent operations
    πŸ”“ Use "Unblock" to restore operations
    πŸ“Š Monitor automatic status transitions
  2. Flag Management:

    🚩 Add flags for operational conditions
    ❌ Remove flags when conditions resolved
    πŸ” Use flags for filtering and reporting
    πŸ“ Add remarks for detailed annotations
  1. Apply Status Filters:

    πŸ“Š Select specific status types to display
    β˜‘ Use checkboxes to include/exclude statuses
    πŸ”„ Clear filters to show all zones
    πŸ“ˆ Monitor filtered zone counts
  2. Flag-Based Filtering:

    🚩 Select flag types for filtering
    ⚠️ Focus on zones requiring attention
    πŸ“ Filter zones with remarks
    πŸ” Combine multiple flag filters
  3. Location-Based Filtering:

    🏒 Filter by warehouse codes
    🏭 Select specific divisions
    πŸ“ Use extra codes for categorization
    πŸ—ΊοΈ Review filtered zone grid

πŸ—‘οΈ Zone Deletion and Range Management​

  1. Single Zone Deletion:

    πŸ“ Switch to "Single Zone" mode
    🏷️ Enter zone code to delete
    πŸ—‘οΈ Click "Delete" button
    ⚠️ Confirm deletion in dialog
  2. Range Deletion:

    πŸ“Š Configure range parameters to delete
    πŸ—‘οΈ Click "Delete Range" button
    ⚠️ Confirm range deletion
    πŸ“‹ Verify zones marked as deleted

πŸ“Š Understanding Zone Visual Indicators​

  • Zone Code: Primary identifier for zone location
  • Background Color: Current operational status
  • Flag Icons: Operational conditions and requirements
  • Session Counter: Number of active scanning sessions
  • Loading Animation: Progressive loading for large zone sets

⚠️ Zones Page Troubleshooting​

🚫 Common Zone Management Issues​

❌ "Code does not match RegEx" Error

  • βœ… Naming Convention: Verify zone code follows project naming standards
  • βœ… RegEx Configuration: Check project zone code configuration settings
  • βœ… Format Validation: Ensure proper prefix, numbering, and length format
  • βœ… Admin Consultation: Contact administrator for RegEx pattern clarification

❌ "Create too many zones" Error

  • βœ… Range Limitation: Maximum 1000 zones per range operation
  • βœ… Split Ranges: Divide large ranges into multiple smaller operations
  • βœ… Progressive Creation: Create zones in batches for large warehouses
  • βœ… Performance Consideration: Large ranges may impact system performance

❌ "Zone has sessions" Deletion Error

  • βœ… Active Sessions: Complete or cancel active scanning sessions
  • βœ… Session History: Check zone session history for dependencies
  • βœ… Data Integrity: Ensure scan data is properly exported before deletion
  • βœ… Alternative Approach: Consider blocking zone instead of deletion

❌ "Project closed" Operation Error

  • βœ… Project Status: Verify project is in active operational state
  • βœ… State Validation: Check project is not closed, published, or archived
  • βœ… Permission Timing: Operations blocked in finalized projects
  • βœ… Admin Contact: Request project state change if operations needed

❌ "Invalid zone status" for Block/Unblock

  • βœ… Status Requirement: Only undefined or blocked zones can be toggled
  • βœ… Operational State: Complete current operations before blocking
  • βœ… Workflow Position: Ensure zone is not in active operational phase
  • βœ… Status Reset: Wait for operations to complete naturally

πŸ“Š Zone Grid Performance Issues​

  • Large Zone Sets: Use filters to reduce displayed zone count
  • Loading Delays: Progressive loading for datasets over 1000 zones
  • Browser Performance: Chrome/Firefox recommended for large zone grids
  • Memory Optimization: Clear filters periodically to refresh display

πŸ”„ Zone Status Synchronization​

  • Real-time Updates: Zone status updates automatically during operations
  • Refresh Delays: Manual page refresh if status appears stale
  • Subscription Status: Check connection indicator for real-time updates
  • Cache Issues: Clear browser cache if persistent display issues

πŸ› οΈ Zones System Technical Details​

πŸ—οΈ Zone Architecture​

// Zone System Structure
{
zoneManagement: {
creation: "single_and_range_modes",
validation: "regex_based_naming",
metadata: "structured_warehouse_data",
operations: "status_workflow_control"
},
visualization: {
gridLayout: "color_coded_status",
flagIndicators: "icon_overlay_system",
sessionCounters: "numeric_indicators",
responsiveDesign: "mobile_optimized"
},
filterSystem: {
multiCriteria: true,
realTimeUpdates: true,
persistentState: true,
exportCapabilities: true
}
}

πŸ—ΊοΈ Zone Record Structure​

// Zone Database Record
{
_id: "zone123",
projectId: "project456",
code: "A001",
warehouseCode: "WH-01",
division: "Main",
extra1: "QC",
extra2: "Priority",
clientZoneCode: "CLIENT-A001",
status: "scan.ready",
flags: [
"verification-needed",
"has-remarks"
],
remarks: "Special handling required",
deleted: false,
qmChecked: true,
scanSessions: 2,
lastModified: new Date(),
createdAt: new Date(),
metadata: {
range: {
prefix: "A",
number: 1,
length: 3
},
coordinates: {
x: 1,
y: 1,
level: 0
}
}
}

🎯 Status Workflow Logic​

// Zone Status Progression
const ZoneStatusWorkflow = {
"undefined": ["scan.plan", "blocked"],
"scan.plan": ["scan.busy"],
"scan.busy": ["scan.ready"],
"scan.ready": ["verify.plan"],
"verify.plan": ["verify.busy"],
"verify.busy": ["verify.ready"],
"verify.ready": ["export.plan"],
"export.plan": ["export.busy"],
"export.busy": ["export.ready"],
"export.ready": ["completed"],
"blocked": ["undefined"]
};

const validateStatusTransition = (currentStatus, newStatus) => {
const allowedTransitions = ZoneStatusWorkflow[currentStatus] || [];
return allowedTransitions.includes(newStatus);
};

🏭 Zone Creation Logic​

// Range Creation Algorithm
const createZoneRange = (prefix, from, to, length, metadata) => {
if (to < from) {
throw new Error('To number smaller than from number');
}

const totalCount = (to - from) + 1;
if (totalCount >= 1000) {
throw new Error('Range too large (max 1000 zones)');
}

const zones = [];
for (let i = from; i <= to; i++) {
const code = `${prefix}${i.toString().padStart(length, '0')}`;
zones.push({
code,
...metadata,
status: "undefined",
flags: [],
deleted: false,
qmChecked: true
});
}

return zones;
};

🚩 Flag Management System​

// Zone Flag Operations
const ZoneFlagSystem = {
predefinedFlags: [
'complete-verification-needed',
'has-remarks',
'verification-needed',
'is-empty',
'session-by-client',
'session-with-change-request',
'invalid-transform-scans',
'invalid-verify-function',
'deviant-zone-verification'
],

addFlag: (zoneId, flag) => {
return Zones.update(zoneId, {
$addToSet: { flags: flag }
});
},

removeFlag: (zoneId, flag) => {
return Zones.update(zoneId, {
$pull: { flags: flag }
});
},

autoFlagUpdate: (zone) => {
// Automatic flag assignment based on zone conditions
const flags = [];

if (zone.remarks) {
flags.push('has-remarks');
}

if (requiresVerification(zone)) {
flags.push('verification-needed');
}

return flags;
}
};

πŸ” Filter Query Construction​

// Zone Filter Implementation
const buildZoneQuery = (filters, projectId) => {
const query = { projectId, deleted: false };

// Status filtering
if (filters.status && filters.status.length > 0) {
query.status = { $in: filters.status };
}

// Flag filtering
if (filters.flags && filters.flags.length > 0) {
query.flags = { $in: filters.flags };
}

// Location filtering
if (filters.warehouseCode) {
query.warehouseCode = { $in: filters.warehouseCode };
}

if (filters.division) {
query.division = { $in: filters.division };
}

// Code pattern filtering
if (filters.codePattern) {
query.code = { $regex: filters.codePattern, $options: 'i' };
}

return query;
};

πŸ” Security Features​

  • Permission-Based Operations: All zone operations validate user permissions
  • Project Scope Enforcement: Users can only access zones in authorized projects
  • Status-Based Restrictions: Operations limited based on current zone status
  • Input Validation: RegEx validation for zone codes and naming conventions
  • Audit Trail: Complete logging of all zone modifications and operations

πŸ“ˆ Performance Optimizations​

  • Indexed Queries: Optimized database indexes for common filter patterns
  • Paginated Loading: Efficient handling of large zone datasets
  • Real-time Subscriptions: Reactive data updates for zone status changes
  • Filter Caching: Client-side filter state management
  • Bulk Operations: Efficient batch processing for range operations

πŸ”„ Integration Points​

  • Scanning System: Direct integration with scan operations and status updates
  • QM Module: Quality management integration for verification workflows
  • Project Management: Zone operations respect project lifecycle states
  • Settings System: Configuration-driven zone naming and validation rules
  • Notification System: Automated alerts for zone status changes and issues

πŸ“Š Zone Range Management​

// Zone Range Processing
{
type: "zonesRangeOperation",
data: {
operation: "create", // create, delete, update
projectId: "project123",
range: {
prefix: "A",
from: 1,
to: 100,
length: 3
},
metadata: {
warehouseCode: "WH-01",
division: "Main",
extra1: "QC",
extra2: "Priority",
clientZoneCode: "CLIENT-A"
}
},
validation: {
regexCheck: true,
duplicateCheck: true,
permissionCheck: true,
rangeLimit: 1000
}
}

This documentation covers the comprehensive Zones system with creation, management, status control, and visualization capabilities. The system provides secure, scalable zone management with workflow integration and real-time monitoring. For advanced zone configuration, custom flag creation, or troubleshooting complex zone operations, consult with your system administrator.