Changeset f29cd58 for src/main/resources/static/js/register_business.js
- Timestamp:
- 01/15/24 00:11:01 (5 months ago)
- Branches:
- master
- Children:
- 943857c
- Parents:
- e8999eb
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/main/resources/static/js/register_business.js
re8999eb rf29cd58 17 17 var $el = $("#predefined_services"); 18 18 $el.empty(); 19 console.log(selectedObj['serviceTypes']); 19 20 $.each(selectedObj['serviceTypes'], function (index, obj) { 20 21 $el.append( 21 '<div class= \"form-outline mb-4\">' +22 '<div class="form-outline mb-4">' + 22 23 ' <div class="row">' + 23 24 ' <div class="col-md-6">\n' + 24 ' <input class="form-check-input" type="checkbox" value= \"' + obj.id + '\" id=\"' + obj.id + '\">\n' +25 ' <label class="form-check-label" for= \"' + obj.id + '\">\n' +25 ' <input class="form-check-input" type="checkbox" value="' + obj.id + '" id="' + obj.id + '">\n' + 26 ' <label class="form-check-label" for="' + obj.id + '">\n' + 26 27 obj.name + 27 28 ' </label>\n' + 28 29 ' </div>' + 29 ' <div class= \"form-outline col-md-2 d-grid\">' +30 ' <input type= \"text\" id=\"' + obj.id + obj.name.replace(/\s/g, "") + "duration" + '\" class=\"form-control\" placeholder="time" />' +30 ' <div class="form-outline col-md-2 d-grid">' + 31 ' <input type="text" id="' + obj.id + obj.name.replace(/\s/g, "") + "duration" + '" class="form-control" placeholder="time" />' + 31 32 ' </div>' + 32 ' <div class=\"form-outline col-md-2 d-grid\">' + 33 ' <input type=\"text\" id=\"' + obj.id + obj.name.replace(/\s/g, "") + "price" + '\" class=\"form-control\" placeholder="price" />' + 33 ' <div class="form-outline col-md-2 d-grid">' + 34 ' <input type="text" id="' + obj.id + obj.name.replace(/\s/g, "") + "price" + '" class="form-control" placeholder="price" />' + 35 ' </div>' + 36 ' </div>' + 37 ' <div class="row" style="margin-top:10px;">' + 38 ' <div class="form-outline col-md-10 d-grid">' + 39 ' <input type="text" id="' + obj.id + obj.name.replace(/\s/g, "") + "description" + '" class="form-control" placeholder="description" />' + 34 40 ' </div>' + 35 41 ' </div>' + … … 58 64 ' </div>' + 59 65 ' <div class="form-outline col-md-2 d-grid">' + 60 ' <input type="text" id="' + -1 + input_service.replace(/\s/g, "") + "price"+ '" class="form-control" placeholder="price" />' + 66 ' <input type="text" id="' + -1 + input_service.replace(/\s/g, "") + "price" + '" class="form-control" placeholder="price" />' + 67 ' </div>' + 68 ' <div class="row" style="margin-top:10px;">' + 69 ' <div class="form-outline col-md-10 d-grid">' + 70 ' <input type="text" id="' + -1 + input_service.replace(/\s/g, "") + "description" + '" class="form-control" placeholder="description" />' + 71 ' </div>' + 61 72 ' </div>' + 62 73 ' </div>' + … … 90 101 var time = $($($(label).parent()).siblings()[0]).children()[0].value; 91 102 var price = $($($(label).parent()).siblings()[1]).children()[0].value; 103 var description = $($($($($($(label).parent())).parent()).siblings()[0]).children()[0]).children()[0].value; 92 104 93 105 var serviceType = {} … … 99 111 service['duration'] = time; 100 112 service['price'] = price; 113 service['description'] = description; 101 114 servicesObj.push(service); 102 115 });
Note:
See TracChangeset
for help on using the changeset viewer.