fix: merge settings into one call

This commit is contained in:
0Pranav
2019-10-31 15:36:33 +05:30
parent ad013264eb
commit d1c530c564

View File

@@ -20,12 +20,7 @@ async function get_global_variables() {
window.timezones = (await frappe.call({ window.timezones = (await frappe.call({
method: 'erpnext.www.book-appointment.index.get_timezones' method: 'erpnext.www.book-appointment.index.get_timezones'
})).message; })).message;
window.holiday_list = (await frappe.call({ window.holiday_list = window.appointment_settings.holiday_list;
method: 'erpnext.www.book-appointment.index.get_holiday_list',
args: {
'holiday_list_name': window.appointment_settings.holiday_list
}
})).message;
} }
function setup_timezone_selector() { function setup_timezone_selector() {
@@ -201,7 +196,8 @@ async function submit() {
args: { args: {
'date': window.selected_date, 'date': window.selected_date,
'time': window.selected_time, 'time': window.selected_time,
'contact': window.contact 'contact': window.contact,
'tz':window.selected_timezone
} }
})).message; })).message;
frappe.msgprint(__('Appointment Created Successfully')); frappe.msgprint(__('Appointment Created Successfully'));