[Healthcare] Fix UI (#14011)

* Fix UI

* Fix Calendar View
This commit is contained in:
Shreya Shah 2018-05-14 14:06:31 +05:30 committed by Nabin Hait
parent a7387b45ec
commit ba6cb8ae4b
2 changed files with 8 additions and 5 deletions

View File

@ -40,7 +40,7 @@ frappe.ui.form.on('Patient', {
},
onload: function (frm) {
if(!frm.doc.dob){
$(frm.fields_dict['age_html'].wrapper).html("Age not specified");
$(frm.fields_dict['age_html'].wrapper).html("");
}
if(frm.doc.dob){
$(frm.fields_dict['age_html'].wrapper).html("AGE : " + get_age(frm.doc.dob));
@ -49,7 +49,7 @@ frappe.ui.form.on('Patient', {
});
frappe.ui.form.on("Patient", "dob", function(frm) {
if(frm.doc.dob){
if(frm.doc.dob) {
var today = new Date();
var birthDate = new Date(frm.doc.dob);
if(today < birthDate){
@ -61,6 +61,9 @@ frappe.ui.form.on("Patient", "dob", function(frm) {
$(frm.fields_dict['age_html'].wrapper).html("AGE : " + age_str);
}
}
else {
$(frm.fields_dict['age_html'].wrapper).html("");
}
});
var create_medical_record = function (frm) {

View File

@ -1,8 +1,8 @@
frappe.views.calendar["Patient Appointment"] = {
field_map: {
"start": "appointment_date",
"end": "appointment_datetime",
"start": "start",
"end": "end",
"id": "name",
"title": "patient",
"allDay": "allDay",
@ -43,4 +43,4 @@ frappe.views.calendar["Patient Appointment"] = {
'label': __('Status')
}
]
};
};