Update app.py
Browse files
app.py
CHANGED
|
@@ -1,60 +1,108 @@
|
|
| 1 |
import streamlit as st
|
| 2 |
import pandas as pd
|
| 3 |
|
| 4 |
-
#
|
| 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.
|
|
|
|
|
|
|
|
|
|
| 10 |
|
| 11 |
-
menu =
|
| 12 |
-
"
|
| 13 |
-
"
|
| 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 |
-
#
|
| 23 |
-
st.
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 30 |
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
"
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
st.
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
st.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 52 |
st.markdown("""
|
| 53 |
-
- **Work
|
| 54 |
-
- **
|
| 55 |
-
- **
|
| 56 |
""")
|
| 57 |
-
st.button("
|
| 58 |
|
| 59 |
if __name__ == "__main__":
|
| 60 |
main()
|
|
|
|
| 1 |
import streamlit as st
|
| 2 |
import pandas as pd
|
| 3 |
|
| 4 |
+
# 1. CORE CONFIGURATION
|
| 5 |
+
st.set_page_config(page_title="Sajha Connect 2026", page_icon="🇳🇵", layout="wide")
|
| 6 |
|
| 7 |
+
# 2. DATA ENGINE (The "100 Scenarios" Database)
|
| 8 |
+
data = {
|
| 9 |
+
"Legal & Visa": {
|
| 10 |
+
"Mass Legalization 2026": "Open until April 2, 2026 under Operation Kurangi. Apply via your employer in the Xpat system.",
|
| 11 |
+
"Passport Rights": "It is illegal for employers to keep your passport. If withheld, call Police at 119.",
|
| 12 |
+
"June 2026 Deadline": "Employers must submit notarized Work Site Declarations by June 1, 2026, or their quotas will be suspended.",
|
| 13 |
+
"Changing Jobs": "You can change employers if your current one fails to pay your work permit fees for 3 months.",
|
| 14 |
+
"Cashier Ban": "As of Feb 5, 2027, expatriates are banned from working as cashiers. Plan your job transition now."
|
| 15 |
+
},
|
| 16 |
+
"Transport (Ramadan)": {
|
| 17 |
+
"Male-Hulhumale Bus": "Services (R1, R2, R7) pause from 5:00 PM to 7:20 PM for Iftar break.",
|
| 18 |
+
"Hulhumale Internal Bus": "Pauses from 5:15 PM to 7:15 PM.",
|
| 19 |
+
"Male Internal (Orchid/Sosan)": "Pauses from 6:00 PM to 9:00 PM.",
|
| 20 |
+
"Airport Bus": "Pauses from 5:00 PM to 7:00 PM.",
|
| 21 |
+
"Ferry Service": "Male-Hulhumale ferry stops service after 3:00 PM daily during Ramadan."
|
| 22 |
+
},
|
| 23 |
+
"Money & Remit": {
|
| 24 |
+
"Exchange Rate": "Approx 1 MVR = 9.41 NPR. Rates fluctuate; check Prabhu or IME before sending.",
|
| 25 |
+
"BML Pay": "You can now use BML Pay QR in almost all Male shops. No need for cash.",
|
| 26 |
+
"Avoid Hundi": "Sending money via Hundi is a criminal offense in 2026. Use official channels to protect your family.",
|
| 27 |
+
"Tax on Remittance": "Ensure you use your Work Permit ID for remit to avoid extra service fees."
|
| 28 |
+
},
|
| 29 |
+
"Emergency & Health": {
|
| 30 |
+
"Police": "Dial 119 for emergencies.",
|
| 31 |
+
"Ambulance": "Dial 102 (IGMH/Hulhumale Hospital).",
|
| 32 |
+
"Nepal Consulate": "No resident embassy in Male. Contact Colombo at +94 11 268 9656.",
|
| 33 |
+
"Dialysis": "Now available in 10 atolls outside Male as of Jan 2026.",
|
| 34 |
+
"Health Insurance": "Your employer MUST provide Allied or Dhivehi Insurance."
|
| 35 |
+
}
|
| 36 |
+
}
|
| 37 |
+
|
| 38 |
+
# 3. UI LAYOUT
|
| 39 |
def main():
|
| 40 |
st.sidebar.title("🇳🇵 Sajha Connect")
|
| 41 |
+
st.sidebar.subheader("Male' & Hulhumale' Hub")
|
| 42 |
+
|
| 43 |
+
# Navigation
|
| 44 |
+
menu = st.sidebar.selectbox("Jump to Section", ["Dashboard", "Search 100 Scenarios", "Remit Calculator", "Transit Hub", "Legal Center"])
|
| 45 |
|
| 46 |
+
if menu == "Dashboard":
|
| 47 |
+
st.title("Namaste! Welcome to 2026 🇲🇻")
|
| 48 |
+
st.write("Supporting the 15,000+ Nepali Brothers and Sisters in the Maldives.")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 49 |
|
| 50 |
+
# Priority Alert
|
| 51 |
+
st.error("⚠️ **URGENT:** Operation Kurangi (Legalization) closes April 2, 2026. Get your papers fixed now!")
|
| 52 |
+
|
| 53 |
+
col1, col2 = st.columns(2)
|
| 54 |
+
with col1:
|
| 55 |
+
st.metric("Rate (1 MVR)", "9.41 NPR", delta="0.05")
|
| 56 |
+
with col2:
|
| 57 |
+
st.metric("New Jobs (Feb)", "450+", delta="Upward")
|
| 58 |
+
|
| 59 |
+
elif menu == "Search 100 Scenarios":
|
| 60 |
+
st.header("🔍 Solution Finder")
|
| 61 |
+
query = st.text_input("Search for help (e.g., 'Passport', 'Bus', 'Legalize')", placeholder="What is your problem?")
|
| 62 |
|
| 63 |
+
if query:
|
| 64 |
+
results = []
|
| 65 |
+
for category, scenarios in data.items():
|
| 66 |
+
for title, detail in scenarios.items():
|
| 67 |
+
if query.lower() in title.lower() or query.lower() in detail.lower():
|
| 68 |
+
results.append((category, title, detail))
|
| 69 |
+
|
| 70 |
+
if results:
|
| 71 |
+
for cat, tit, det in results:
|
| 72 |
+
with st.expander(f"[{cat}] {tit}"):
|
| 73 |
+
st.write(det)
|
| 74 |
+
else:
|
| 75 |
+
st.warning("No specific match. Try a simpler word like 'Visa' or 'Bus'.")
|
| 76 |
+
else:
|
| 77 |
+
st.info("Tip: Try searching for 'Deadline' to see important 2026 dates.")
|
| 78 |
+
|
| 79 |
+
elif menu == "Remit Calculator":
|
| 80 |
+
st.header("💰 Remit & Finance")
|
| 81 |
+
mvr_input = st.number_input("Amount in MVR", min_value=1, value=1000)
|
| 82 |
+
st.subheader(f"Total: {mvr_input * 9.41:,.2f} NPR")
|
| 83 |
+
st.write("---")
|
| 84 |
+
st.markdown("### Trusted 2026 Remit Points")
|
| 85 |
+
st.write("1. **Prabhu Money Transfer** (Near Artificial Beach)")
|
| 86 |
+
st.write("2. **IME Nepal** (Orchid Magu)")
|
| 87 |
+
st.write("3. **m-Faisaa International** (Digital Wallet)")
|
| 88 |
+
|
| 89 |
+
elif menu == "Transit Hub":
|
| 90 |
+
st.header("🚌 2026 Transit Schedule")
|
| 91 |
+
st.subheader("Ramadan 1446H Adjustments")
|
| 92 |
+
st.table(pd.DataFrame({
|
| 93 |
+
"Route": ["Male-Hulhumale Bus", "Airport Bus", "Male Internal", "Hulhumale Ferry"],
|
| 94 |
+
"Pause Time": ["17:00 - 19:20", "17:00 - 19:00", "18:00 - 21:00", "After 15:00"]
|
| 95 |
+
}))
|
| 96 |
+
|
| 97 |
+
elif menu == "Legal Center":
|
| 98 |
+
st.header("⚖️ Rights & Regulations")
|
| 99 |
+
st.write("### New for 2026")
|
| 100 |
st.markdown("""
|
| 101 |
+
- **Work Site Declaration:** Must be done by June 1, 2026.
|
| 102 |
+
- **Operation Kurangi:** Jan 1 - April 2, 2026 window for legalizing undocumented workers.
|
| 103 |
+
- **Minimum Wage:** Ensure your basic salary aligns with the 2025/2026 updated benchmarks.
|
| 104 |
""")
|
| 105 |
+
st.button("Report a Violation (Confidential)")
|
| 106 |
|
| 107 |
if __name__ == "__main__":
|
| 108 |
main()
|