forked from openemr/openemr
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Changed up the appointments text when there are no appointments.
- Loading branch information
Showing
2 changed files
with
78 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
77 changes: 77 additions & 0 deletions
77
templates/portal/partial/cards/_appointment_card.html.twig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
<script> | ||
// keeping this centralized here | ||
function editAppointment(mode, deid) { | ||
let mdata = {}; | ||
let title = ''; | ||
if (mode === 'add') { | ||
title = {{ 'Request New Appointment' | xlj }}; | ||
mdata = { | ||
pid: deid | ||
}; | ||
} else if (mode === 'recurring') { | ||
let msg = {{ 'A Recurring Appointment. Please contact your appointment desk for any changes.' | xlj }}; | ||
{# TODO: look at refactoring signerAlertMsg into a portalAlertMsg function, would better fit | ||
Single Responsibility Principle to use that instead of the digital signature api here to show alert messages #} | ||
signerAlertMsg(msg, 8000); | ||
return false; | ||
} else { | ||
title = {{ 'Edit Appointment' | xlj }}; | ||
mdata = { | ||
eid: deid | ||
}; | ||
} | ||
var params = { | ||
dialogId: 'editpop', | ||
buttons: [ | ||
{ | ||
text: 'Cancel', | ||
close: true, | ||
style: 'btn-sm btn-secondary' | ||
} | ||
], | ||
allowDrag: false, | ||
size: 800, | ||
title: title, | ||
type: "GET", | ||
url: './add_edit_event_user.php', | ||
data: mdata | ||
}; | ||
/* | ||
* A couple notes on dialog.ajax .alert etc. | ||
* opener is not required. library will handle for you. | ||
* these run in the same scope as calling script. | ||
* so same styles, dependencies are in scope. | ||
* a promise is returned for doing other neat stuff. | ||
* | ||
* */ | ||
{# this is coming from the dialog.js script #} | ||
dialog.ajax(params); | ||
} | ||
</script> | ||
<div class="collapse mt-2 overflow-auto" data-parent="#cardgroup" id="appointmentcard"> | ||
<div class="container-fluid"> | ||
<h3 class="text-center">{{ 'Appointments' | xlt }}</h3> | ||
<div class="row"> | ||
{% if appointments|length > 0 %} | ||
{% for appt in appointments %} | ||
{% include 'portal/appointment-item.html.twig' with {appt: appt} %} | ||
{% endfor %} | ||
{% if appointmentLimit == appointmentCount %} | ||
<p>{{ 'Display limit reached' | xlt }} | ||
<br> | ||
{{ 'More appointments may exist' | xlt }}</p> | ||
{% endif %} | ||
{% else %} | ||
<div class="col-12"> | ||
<div class="alert alert-info"><h5 class='text-center'>{{ 'No Appointments' | xlt }}</h5></div> | ||
</div> | ||
{% endif %} | ||
</div> | ||
<div class="mb-3"> | ||
<a class='btn btn-primary btn-block' href='#' onclick="editAppointment('add',{{ patientID | attr_js }})">{{ 'Schedule A New Appointment' | xlt }}</a> | ||
</div> | ||
</div> | ||
</div> |