Spaces:
Sleeping
Sleeping
Update app.py
Browse files70 unmodified lines71727374757677787980818216 unmodified lines9910010110210310410510610770 unmodified lineselse:st.warning("❌ اسم المستخدم غير موجود")# صفحة مقدم الشكوىdef sender_page():st.title("📨 إرسال شكوى جديدة")complaint_text = st.text_area("📝 وصف الشكوى", key="complaint_text")if st.button("📤 إرسال الشكوى"):if not complaint_text.strip():st.warning("⚠️ الرجاء إدخال نص الشكوى")else:16 unmodified lines)conn.commit()st.success("✅ تم تقديم الشكوى بنجاح")# مسح حقل الإدخال بطريقة آمنةif "complaint_text" in st.session_state:st.session_state.complaint_text = ""st.rerun()except sqlite3.Error as e:st.error(f"❌ حدث خطأ أثناء حفظ الشكوى: {str(e)}")70 unmodified lines717273747576777879808182838485868716 unmodified lines10410510610710810970 unmodified lineselse:st.warning("❌ اسم المستخدم غير موجود")def sender_page():st.title("📨 إرسال شكوى جديدة")# تعريف دالة لمسح حقل الشكوىdef clear_complaint():if "complaint_text" in st.session_state:del st.session_state.complaint_textcomplaint_text = st.text_area("📝 وصف الشكوى", key="complaint_text")if st.button("📤 إرسال الشكوى", on_click=clear_complaint):if not complaint_text.strip():st.warning("⚠️ الرجاء إدخال نص الشكوى")else:16 unmodified lines)conn.commit()st.success("✅ تم تقديم الشكوى بنجاح")st.rerun()except sqlite3.Error as e:st.error(f"❌ حدث خطأ أثناء حفظ الشكوى: {str(e)}")
app.py+7-5