Spaces:
Sleeping
Sleeping
Update app.py
Browse files78 unmodified lines798081828384851 unmodified line8788899091929340 unmodified lines13413513613713813914078 unmodified linesdef show_publish_page():st.markdown("<h1 style='text-align: center; color: #1D8348;'>تفاصيل الوظيفة المطلوبة</h1>", unsafe_allow_html=True)# ✅ اختيار الفئة خارج الفورم عشان يتغير فوراًst.session_state.category_choice = st.radio("فئة الوظيفة",["خريج", "عامل"],1 unmodified lineindex=0 if st.session_state.category_choice == "خريج" else 1)# ✅ selectbox يتغير بناءً على الاختيار فوراًif st.session_state.category_choice == "خريج":spec = st.selectbox("التخصص الأكاديمي المطلوب", ["إدارة وأقتصاد", "هندسة", "تقنية معلومات", "تربية", "قانون", "لغات", "أخرى"])else:40 unmodified linesads = db.collection("vacancies").order_by("timestamp", direction=firestore.Query.DESCENDING).limit(10).stream()for ad in ads:data = ad.to_dict()with st.expander(f"📌 {data.get('job')} في {data.get('shop')}"):st.write(f"المكان: {data.get('location')}")if st.button(f"حذف الإعلان", key=ad.id):db.collection("vacancies").document(ad.id).delete()78 unmodified lines798081828384851 unmodified line8788899091929340 unmodified lines13413513613713813914078 unmodified linesdef show_publish_page():st.markdown("<h1 style='text-align: center; color: #1D8348;'>تفاصيل الوظيفة المطلوبة</h1>", unsafe_allow_html=True)# اختيار الفئة خارج الفورم عشان يتغير فوراًst.session_state.category_choice = st.radio("فئة الوظيفة",["خريج", "عامل"],1 unmodified lineindex=0 if st.session_state.category_choice == "خريج" else 1)# selectbox يتغير بناءً على الاختيار فوراًif st.session_state.category_choice == "خريج":spec = st.selectbox("التخصص الأكاديمي المطلوب", ["إدارة وأقتصاد", "هندسة", "تقنية معلومات", "تربية", "قانون", "لغات", "أخرى"])else:40 unmodified linesads = db.collection("vacancies").order_by("timestamp", direction=firestore.Query.DESCENDING).limit(10).stream()for ad in ads:data = ad.to_dict()with st.expander(f" {data.get('job')} في {data.get('shop')}"):st.write(f"المكان: {data.get('location')}")if st.button(f"حذف الإعلان", key=ad.id):db.collection("vacancies").document(ad.id).delete()
app.py+3-3