You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

34 lines
1.2 KiB

odoo.define('website_salon_booking_system', function (require) {
'use strict';
var ajax = require('web.ajax');
$(document).on('click',"#submit_button",function() {
var name = $( "#name" ).val();
var date = $( "#date" ).val();
var phone = $( "#phone" ).val();
var email = $( "#email" ).val();
var service = $( "#service" ).val();
var chair = $( "#chair" ).val();
if (name != "" && date != "" && phone != "" && email != "" && service != "" && chair != "")
{
var booking_record = [name, date, phone, email, service, chair];
var salon_record = ajax.jsonRpc("/page/salon_details", 'call', {'salon_data':booking_record })
.then(function(){
window.location= "/page/salon_management.salon_booking_thank_you"
})
}
else
{
alert("Fill all the required fields")
}
});
$(document).on('click',"#check_button",function() {
var check_date = $( "#check_date" ).val();
var salon_check_date = ajax.jsonRpc("/page/salon_check_date", 'call', {'check_date':check_date })
.then(function(date_info){
window.location= "/page/salon_management.salon_booking_form?x=" + date_info
})
});
});