Jofax commited on
Commit
d94db71
·
verified ·
1 Parent(s): df0e2a7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +41 -52
app.py CHANGED
@@ -1,71 +1,60 @@
1
  import streamlit as st
2
  import pandas as pd
3
 
4
- # Initial configuration
5
- st.set_page_config(page_title="Sajha Connect Maldives", page_icon="🇳🇵")
6
 
7
  def main():
8
- # Sidebar for Navigation
9
  st.sidebar.title("🇳🇵 Sajha Connect")
10
- st.sidebar.markdown("Connecting the Nepali Community in 🇲🇻")
11
 
12
- choice = st.sidebar.radio("Navigate to:", [
13
- "Dashboard",
14
- "Remittance (Money)",
15
- "Bus & Ferry",
16
- "Legal & Visa",
17
- "Emergency"
18
  ])
19
 
20
- # 1. Dashboard
21
- if choice == "Dashboard":
22
- st.title("Sajha Connect Dashboard")
23
- st.info("Welcome to the 2026 Hub for Nepalis in Male' and Hulhumale'.")
24
 
25
- col1, col2 = st.columns(2)
26
- with col1:
27
- st.metric("Exchange Rate", "1 MVR = 9.41 NPR")
28
- with col2:
29
- st.metric("Active Jobs", "12 New Today")
30
-
31
- st.markdown("### 🔔 Important Announcements")
32
- st.warning("Ramadan transit hours are now in effect. Bus services pause between 5 PM and 7 PM.")
33
-
34
- # 2. Remittance
35
- elif choice == "Remittance (Money)":
36
- st.header("Money Transfer (Remit)")
37
- mvr = st.number_input("Enter Maldivian Rufiyaa (MVR)", min_value=0, value=1000)
38
- npr = mvr * 9.41
39
- st.success(f"You will receive approx: {npr:,.2f} Nepalese Rupees")
40
- st.markdown("---")
41
- st.write("📍 **Recommended Centers:** Prabhu Money Transfer, IME, and BML.")
42
-
43
- # 3. Bus & Ferry
44
- elif choice == "Bus & Ferry":
45
- st.header("Transit & Transportation")
46
- st.write("Current RTL Bus Schedules for Male-Hulhumale:")
47
  df = pd.DataFrame({
48
- "Route": ["R1 (Phase 1)", "R2 (Phase 2)", "R7 (Bridge)", "Ferry"],
49
- "Status": ["Running", "Running", "Limited", "Running"],
50
- "Price": ["MVR 15", "MVR 15", "MVR 10", "MVR 10"]
51
  })
52
  st.table(df)
53
 
54
- # 4. Legal & Visa
55
- elif choice == "Legal & Visa":
56
- st.header("Legal Help & Work Permits")
57
- st.write("Ensure your employer has paid the 'Quota Fee' in the Xpat portal.")
58
- st.error("Report issues: If your passport is withheld, contact the Labor Relations Authority (LRA).")
59
-
60
- # 5. Emergency
61
- elif choice == "Emergency":
62
- st.header("🆘 Emergency Contacts")
63
  st.markdown("""
64
- - **Police:** 119
65
- - **Ambulance:** 102
66
- - **Fire:** 118
67
- - **Nepal Consular Help:** +94 11 268 9656 (via Colombo)
68
  """)
 
69
 
70
  if __name__ == "__main__":
71
  main()
 
1
  import streamlit as st
2
  import pandas as pd
3
 
4
+ # Must be the first command
5
+ st.set_page_config(page_title="Sajha Connect", page_icon="🇳🇵", layout="wide")
6
 
7
  def main():
 
8
  st.sidebar.title("🇳🇵 Sajha Connect")
9
+ st.sidebar.info("The Hub for Nepalis in Maldives")
10
 
11
+ menu = st.sidebar.radio("Navigation", [
12
+ "Home",
13
+ "Remittance Tracker",
14
+ "Transport Info",
15
+ "Legal & Jobs"
 
16
  ])
17
 
18
+ if menu == "Home":
19
+ st.title("Namaste! 🇳🇵")
20
+ st.write("Welcome to the community app for Male' and Hulhumale'.")
 
21
 
22
+ # Quick Stats Card
23
+ st.markdown("""
24
+ <div style="background-color:#f0f2f6;padding:20px;border-radius:10px">
25
+ <h4>Today's Remittance Rate</h4>
26
+ <h2 style="color:#d32f2f">1 MVR = 9.41 NPR</h2>
27
+ <p>February 21, 2026</p>
28
+ </div>
29
+ """, unsafe_allow_html=True)
30
+
31
+ st.subheader("Community Alerts")
32
+ st.warning("🌙 Ramadan Schedule: RTL Buses pause from 5:00 PM to 7:00 PM.")
33
+
34
+ elif menu == "Remittance Tracker":
35
+ st.header("Money Transfer Calculator")
36
+ mvr = st.number_input("Enter MVR Amount", min_value=0, value=1000)
37
+ st.success(f"Estimated: {mvr * 9.41:,.2f} NPR")
38
+ st.info("Check Prabhu, IME, or BML for the final transaction.")
39
+
40
+ elif menu == "Transport Info":
41
+ st.header("Transit Guide")
42
+ st.write("Current bus and ferry statuses for Hulhumale Phase 1 & 2.")
 
43
  df = pd.DataFrame({
44
+ "Route": ["Male-Hulhumale Bus", "Male-Villimale Ferry", "Airport Ferry"],
45
+ "Status": ["Running", "Running", "Running"],
46
+ "Price": ["MVR 15", "MVR 5", "MVR 15"]
47
  })
48
  st.table(df)
49
 
50
+ elif menu == "Legal & Jobs":
51
+ st.header("Labor Support")
 
 
 
 
 
 
 
52
  st.markdown("""
53
+ - **Work Permit:** Check status on Xpat portal.
54
+ - **Passport:** Keeping your passport is your right.
55
+ - **Jobs:** We recommend checking vetted hotel/construction leads below.
 
56
  """)
57
+ st.button("View 2026 Job Listings")
58
 
59
  if __name__ == "__main__":
60
  main()