Ignore:
Timestamp:
01/15/24 00:11:01 (6 months ago)
Author:
gjoko kostadinov <gjokokostadinov@…>
Branches:
master
Children:
943857c
Parents:
e8999eb
Message:

Add services search functionality.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/main/resources/static/js/business_admin.js

    re8999eb rf29cd58  
    3535            '        </div>' +
    3636            '    </div>' +
     37            '    <div class="row" style="margin-top:10px;">' +
     38            '        <div class="form-outline col-md-10 d-grid">' +
     39            '            <input type="text" id="' + -1 + input_service.replace(/\s/g, "") + "description" + '" class="form-control" placeholder="description" />' +
     40            '        </div>' +
     41            '    </div>' +
    3742            '</div>');
    3843        event.preventDefault();
     
    4954            var time = $($($(label).parent()).siblings()[0]).children()[0].value;
    5055            var price = $($($(label).parent()).siblings()[1]).children()[0].value;
     56            var description = $($($($($($(label).parent())).parent()).siblings()[0]).children()[0]).children()[0].value;
    5157
    5258            var serviceType = {};
     
    6167            service['duration'] = parseInt(time);
    6268            service['price'] = parseInt(price);
     69            service['description'] = description;
    6370            servicesObj.push(service);
    6471        });
     
    251258        $.each(business['services'], function (index, obj) {
    252259
    253             var element = '<div class=\"form-outline mb-4\">' +
     260            var element =
     261                '<div class=\"form-outline mb-4\">' +
    254262                '    <div class="row">' +
    255263                '        <div class="col-md-6">\n' +
     
    270278                '        </div>' +
    271279                '    </div>' +
     280                '    <div class="row" style="margin-top:10px;">' +
     281                '        <div class="form-outline col-md-10 d-grid">' +
     282                '            <input type="text" id="' + obj.id + obj['serviceType'].name.replace(/\s/g, "") + "description" + '" class="form-control" placeholder="description"  value=\"' + obj.description + '" />' +
     283                '        </div>' +
     284                '    </div>' +
    272285                '</div>';
    273286
Note: See TracChangeset for help on using the changeset viewer.