[Healthcare] Fix UI (#14011)
* Fix UI
* Fix Calendar View
diff --git a/erpnext/healthcare/doctype/patient/patient.js b/erpnext/healthcare/doctype/patient/patient.js
index b1150ab..b40f78d 100644
--- a/erpnext/healthcare/doctype/patient/patient.js
+++ b/erpnext/healthcare/doctype/patient/patient.js
@@ -40,7 +40,7 @@
},
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", "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 @@
$(frm.fields_dict['age_html'].wrapper).html("AGE : " + age_str);
}
}
+ else {
+ $(frm.fields_dict['age_html'].wrapper).html("");
+ }
});
var create_medical_record = function (frm) {
diff --git a/erpnext/healthcare/doctype/patient_appointment/patient_appointment_calendar.js b/erpnext/healthcare/doctype/patient_appointment/patient_appointment_calendar.js
index c35e397..dfff5a4 100644
--- a/erpnext/healthcare/doctype/patient_appointment/patient_appointment_calendar.js
+++ b/erpnext/healthcare/doctype/patient_appointment/patient_appointment_calendar.js
@@ -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 @@
'label': __('Status')
}
]
-};
+};
\ No newline at end of file