Changeset 2b0a4db
- Timestamp:
- 02/08/23 20:42:53 (21 months ago)
- Branches:
- master
- Children:
- 46fd0c7
- Parents:
- a436340
- Location:
- src/main/resources
- Files:
-
- 2 deleted
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
src/main/resources/data.sql
ra436340 r2b0a4db 7 7 insert into business_type (id, created, modified, name) 8 8 values (1, current_timestamp, current_timestamp, 'tailor'), 9 (2, current_timestamp, current_timestamp, 'nail salon'),10 (3, current_timestamp, current_timestamp, 'mass age parlor'),11 (4, current_timestamp, current_timestamp, 'makeup studio'),9 (2, current_timestamp, current_timestamp, 'nail technician'), 10 (3, current_timestamp, current_timestamp, 'masseuse'), 11 (4, current_timestamp, current_timestamp, 'makeup artist'), 12 12 (5, current_timestamp, current_timestamp, 'hairdresser'), 13 13 (6, current_timestamp, current_timestamp, 'barber'); -
src/main/resources/static/js/register_business.js
ra436340 r2b0a4db 9 9 10 10 $.each(data, function(index, obj) { 11 $el.append($("<option></option>") 12 .attr("value", obj.value).text(obj.text)); 11 $el.append("<option value=" + obj.value + ">" + obj.text + "</option>"); 13 12 }); 14 13 }); … … 16 15 $("#companyType").change(function() { 17 16 var selectedVal = $(this).find(':selected').val(); 18 var selectedText = $(this).find(':selected').text();19 17 alert(JSON.stringify(enumerations[selectedVal-1])); 18 var selectedObj = enumerations[selectedVal-1]; 19 var $el = $("#predefined_services"); 20 $el.empty(); 21 $.each(selectedObj['serviceTypes'], function (index, obj) { 22 $el.append( 23 '<div class="form-check">\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' + 26 obj.name + 27 ' </label>\n' + 28 ' </div>') 29 }); 20 30 }) 21 31 }); 22 23 document.addEventListener('DOMContentLoaded', e => {24 $('#input-prefetch').autocomplete()25 }, false); -
src/main/resources/templates/homepage.html
ra436340 r2b0a4db 7 7 <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/> 8 8 9 <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css" rel="stylesheet" 9 <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css" rel="stylesheet"/> 10 10 <!-- Google Fonts --> 11 <link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap" rel="stylesheet" 11 <link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap" rel="stylesheet"/> 12 12 <!-- MDB --> 13 <link href="https://cdnjs.cloudflare.com/ajax/libs/mdb-ui-kit/5.0.0/mdb.min.css" rel="stylesheet" 13 <link href="https://cdnjs.cloudflare.com/ajax/libs/mdb-ui-kit/5.0.0/mdb.min.css" rel="stylesheet"/> 14 14 15 15 <link href='css/fullcalendar.css' rel='stylesheet'/> 16 16 <link href='css/fullcalendar.print.css' rel='stylesheet' media='print'/> 17 <link href="css/homepage.css" rel="stylesheet" 17 <link href="css/homepage.css" rel="stylesheet"/> 18 18 <link href="css/headers.css" rel="stylesheet"> 19 19 </head> … … 25 25 <div class="d-flex flex-wrap align-items-center justify-content-center justify-content-lg-start"> 26 26 <a href="/" class="d-flex align-items-center mb-2 mb-lg-0 text-dark text-decoration-none"> 27 <svg class="bi me-2" width="40" height="32" role="img" aria-label="Bootstrap"><use xlink:href="#bootstrap"/></svg> 27 <svg class="bi me-2" width="40" height="32" role="img" aria-label="Bootstrap"> 28 <use xlink:href="#bootstrap"/> 29 </svg> 28 30 </a> 29 31 … … 40 42 41 43 <div class="dropdown text-end"> 42 <a href="#" class="d-block link-dark text-decoration-none dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false"> 44 <a href="#" class="d-block link-dark text-decoration-none dropdown-toggle" data-bs-toggle="dropdown" 45 aria-expanded="false"> 43 46 <img src="https://github.com/mdo.png" alt="mdo" width="32" height="32" class="rounded-circle"> 44 47 </a> … … 47 50 <li><a class="dropdown-item" href="#">Settings</a></li> 48 51 <li><a class="dropdown-item" href="#">Profile</a></li> 49 <li><hr class="dropdown-divider"></li> 52 <li> 53 <hr class="dropdown-divider"> 54 </li> 50 55 <li><a class="dropdown-item" href="#">Sign out</a></li> 51 56 </ul> … … 64 69 <div class="card"> 65 70 <div class="card-body py-5 px-md-5"> 66 67 68 69 70 71 72 71 <div> 72 <label for="student-birth-date">Date of search:</label> 73 <input type="date" id="student-birth-date"/> 74 </div> 75 <div> 76 <button type="submit" class="button" id="search">Search</button> 77 </div> 73 78 </div> 74 79 </div> -
src/main/resources/templates/register_business.html
ra436340 r2b0a4db 5 5 <title>Schedlr</title> 6 6 7 <!-- Font Awesome --> 8 <link 9 href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css" 10 rel="stylesheet" 11 /> 12 <!-- Google Fonts --> 13 <link 14 href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap" 15 rel="stylesheet" 16 /> 17 <!-- MDB --> 18 <link 19 href="https://cdnjs.cloudflare.com/ajax/libs/mdb-ui-kit/5.0.0/mdb.min.css" 20 rel="stylesheet" 21 /> 7 <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css" rel="stylesheet" 8 integrity="sha384-rbsA2VBKQhggwzxH7pPCaAqO46MgnOM80zW1RWuH61DGLwZJEdK2Kadq2F9CUG65" crossorigin="anonymous"> 9 22 10 <link rel="stylesheet" href="css/login.css"> 23 11 … … 29 17 <div class="col-lg-6 mb-5 mb-lg-0"> 30 18 <h1 class="my-5 display-3 fw-bold ls-tight"> 31 Register as <br/>19 Register as <br/> 32 20 <span class="text-primary">a business</span> 33 21 </h1> … … 49 37 <div class="col-md-6 mb-4"> 50 38 <div class="form-outline"> 51 <input type="text" id="firstName" class="form-control" />52 <label class="form-label" for="firstName">First name</label>39 <input type="text" id="firstName" class="form-control" placeholder="Username" 40 aria-label="Username"/> 53 41 </div> 54 42 </div> 55 43 <div class="col-md-6 mb-4"> 56 44 <div class="form-outline"> 57 <input type="text" id="lastName" class="form-control" />58 <label class="form-label" for="lastName">Last name</label>45 <input type="text" id="lastName" class="form-control" placeholder="Last name" 46 aria-label="lastname"/> 59 47 </div> 60 48 </div> … … 63 51 <!-- Email input --> 64 52 <div class="form-outline mb-4"> 65 <input type="email" id="email" class="form-control" />66 <label class="form-label" for="email">Email address</label>53 <input type="email" id="email" class="form-control" placeholder="Email" 54 aria-label="Email"/> 67 55 </div> 68 56 69 57 <!-- Email input --> 70 58 <div class="form-outline mb-4"> 71 <input type=" email" id="username" class="form-control" />72 <label class="form-label" for="username">Username</label>59 <input type="text" id="username" class="form-control" placeholder="Username" 60 aria-label="username"/> 73 61 </div> 74 62 75 63 <!-- Password input --> 76 64 <div class="form-outline mb-4"> 77 <input type="password" id="password" class="form-control" />78 <label class="form-label" for="password">Password</label>65 <input type="password" id="password" class="form-control" placeholder="Password" 66 aria-label="password"/> 79 67 </div> 80 68 … … 84 72 85 73 <div class="form-outline mb-4"> 86 <input type="email" id="companyName" class="form-control" />87 <label class="form-label" for="companyName">Company Name</label>74 <input type="email" id="companyName" class="form-control" placeholder="Company Name" 75 aria-label="companyName"/> 88 76 </div> 89 77 90 78 <div class="form-outline mb-4"> 91 <select class="form-select" id="companyType" >92 <option value=""disabled selected hidden>Company Type</option>79 <select class="form-select" id="companyType" aria-label="Default select example"> 80 <option disabled selected hidden>Company Type</option> 93 81 </select> 94 82 </div> 95 83 96 <div class="form-group form-outline mb-4"> 97 <label for="services">Services</label> 98 <input type="text" class="form-control" placeholder="Services" list="list-timezone" id="services"> 99 <datalist id="list-timezone"> 100 </datalist> 84 <div class="text-center"> 85 <p>Select from the predefined services or add a new one</p> 86 </div> 87 88 <div class="row"> 89 <div class="form-outline col-md-10"> 90 <div class="form-outline"> 91 <input type="text" id="services" class="form-control" placeholder="Services" 92 aria-label="services"/> 93 </div> 94 </div> 95 <div class="form-outline col-md-2 d-grid"> 96 <button class="btn btn-primary" id="add_service">Add</button> 97 </div> 98 </div> 99 100 101 <div id="predefined_services" class="form-outline mb-4"> 101 102 </div> 102 103 … … 113 114 </div> 114 115 </div> 115 <script src='js/jquery-1.10.2.js' type="text/javascript"></script> 116 <script 117 type="text/javascript" 118 src="https://cdnjs.cloudflare.com/ajax/libs/mdb-ui-kit/5.0.0/mdb.min.js" 119 ></script> 116 <!-- jQuery library --> 117 <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/js/bootstrap.bundle.min.js" 118 integrity="sha384-kenU1KFdBIe4zVF0s0G1M5b4hcpxyD9F7jL+jjXkk+Q2h455rYXK/7HAuoJl+0I4" 119 crossorigin="anonymous"></script> 120 <script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.11.6/dist/umd/popper.min.js" 121 integrity="sha384-oBqDVmMz9ATKxIep9tiCxS/Z9fNfEXiDAYTujMAeBAsjFuCZSmKbSSUnQlmh/jp3" 122 crossorigin="anonymous"></script> 123 <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.3/jquery.min.js"></script> 120 124 <script src="js/register_business.js" type="text/javascript"></script> 121 <script src="js/bootstrap-autocomplete.min.js"></script>122 125 </body> 123 126 </html>
Note:
See TracChangeset
for help on using the changeset viewer.