Jing997 commited on
Commit
a6db9c3
·
verified ·
1 Parent(s): 53d2b59

Update src/pages/_map_page.py

Browse files

Update map page with QRG expander tab

Files changed (1) hide show
  1. src/pages/_map_page.py +67 -0
src/pages/_map_page.py CHANGED
@@ -20,6 +20,73 @@ def map_page():
20
  Use the filters in the sidebar to customize the view.
21
  """)
22
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
23
  # Initialize session state variables for filters
24
  if 'map_filters' not in st.session_state:
25
  st.session_state.map_filters = {
 
20
  Use the filters in the sidebar to customize the view.
21
  """)
22
 
23
+
24
+ # Add help section with expander
25
+ with st.expander("📚 How to Use the Map Pageß"):
26
+ st.markdown("""
27
+ ## Step-by-Step Guide to the Map Page
28
+
29
+ The Map page provides an interactive visualization of all delivery locations and vehicle depots. It helps you understand delivery distribution, monitor delivery status, and plan logistics operations.
30
+
31
+ ### 1. Map Navigation
32
+
33
+ - **Pan**: Click and drag to move around the map
34
+ - **Zoom**: Use the scroll wheel or the +/- buttons in the top-left corner
35
+ - **View Details**: Click on any marker to see detailed information about that delivery or depot
36
+
37
+ ### 2. Using Map Filters (Sidebar)
38
+
39
+ - **Show/Hide Elements**:
40
+ - Toggle "Show Deliveries" to display or hide delivery markers
41
+ - Toggle "Show Depots" to display or hide vehicle depot markers
42
+ - Enable "Show Data Table" to view raw delivery data below the map
43
+ - Enable "Show Calendar View" to see delivery schedules organized by date
44
+
45
+ - **Filter by Attributes**:
46
+ - Use "Filter by Priority" to show only deliveries of selected priority levels (High, Medium, Low)
47
+ - Use "Filter by Status" to show only deliveries with selected statuses (Pending, In Transit, Delivered)
48
+
49
+ - **Date Filtering**:
50
+ - Use the "Date Range" selector to focus on deliveries within specific dates
51
+ - This affects both the map display and the calendar view
52
+
53
+ ### 3. Understanding the Map Markers
54
+
55
+ - **Delivery Markers**:
56
+ - Red markers: High priority deliveries
57
+ - Orange markers: Medium priority deliveries
58
+ - Blue markers: Low priority deliveries
59
+
60
+ - **Depot Markers**:
61
+ - Green house icons: Vehicle depot locations
62
+
63
+ ### 4. Using the Calendar View
64
+
65
+ - Select specific dates from the dropdown to view scheduled deliveries
66
+ - Each tab shows deliveries for one selected date
67
+ - Timeline bars are color-coded by priority (red=High, orange=Medium, blue=Low)
68
+ - Hover over timeline bars to see detailed delivery information
69
+ - Check the summary metrics below each calendar for quick insights
70
+
71
+ ### 5. Reading the Delivery Statistics
72
+
73
+ - The top section shows key metrics about displayed deliveries:
74
+ - Total number of deliveries shown
75
+ - Total weight of all displayed deliveries
76
+ - Number of pending deliveries
77
+ - Breakdown of deliveries by status
78
+
79
+ ### 6. Data Table Features
80
+
81
+ When "Show Data Table" is enabled:
82
+ - Green highlighted rows: Completed deliveries
83
+ - Red highlighted rows: Urgent high-priority deliveries due within the next week
84
+ - Sort any column by clicking the column header
85
+ - Search across all fields using the search box
86
+
87
+ This map view helps you visualize your delivery operations geographically while the calendar provides a time-based perspective of your delivery schedule.
88
+ """)
89
+
90
  # Initialize session state variables for filters
91
  if 'map_filters' not in st.session_state:
92
  st.session_state.map_filters = {