Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

merge #41

Merged
merged 5 commits into from
Aug 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,13 @@ Role: Staff



The Backend user data is stored in Hospital_users.json
The Backend user data is stored in Hospital_users.json

URLS:
- /
- /about
- /doctor
- /staff
- /patient
- /reception
- /pharmacy
6 changes: 0 additions & 6 deletions server.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ def decorated_function(*args, **kwargs):
return redirect(url_for('login_page'))
return decorated_function

logged_in = False
user = User()

@app.route('/')
Expand Down Expand Up @@ -141,17 +140,14 @@ def register_page():
return render_template('register.html', register_form=register_form, user=user)

@app.route('/staff')
@logged_in
def staff_page():
return render_template('staff.html', user=user)

@app.route('/reception')
@logged_in
def hospital_page():
return render_template('reception.html', user=user)

@app.route('/doctor', methods=["GET", "POST"])
@logged_in
def doctor_page():
stt_form = STTForm()
text=None
Expand All @@ -160,12 +156,10 @@ def doctor_page():
return render_template('doctor.html', user=user, stt_form=stt_form, text=text)

@app.route('/patient')
@logged_in
def patient_page():
return render_template('patient.html', user=user)

@app.route('/pharmacy')
@logged_in
def pharmacy_page():
return render_template('pharmacy.html', user=user)

Expand Down
7 changes: 0 additions & 7 deletions templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -109,17 +109,10 @@
</li>a
{% endif %}
</ul>
{% if not user.is_active %}
<form class="d-flex mx-auto">
<a class="btn btn-primary ms-5 me-2 rounded-pill fw-bold" type="submit" href="{{ url_for('login_page') }}">Log in</a>
<a class="btn btn-primary me-0 rounded-pill fw-bold" type="submit" href="{{ url_for('register_page') }}">Sign up</a>
</form>
{% endif %}
{% if user.is_active %}
<form class="d-flex mx-auto">
<a class="btn btn-primary ms-5 me-2 rounded-pill fw-bold" type="submit" href="{{ url_for('home_page') }}">Log Out</a>
</form>
{% endif %}
</div>
</div>
</div>
Expand Down