Changeset 8bcd64c for src/main/resources


Ignore:
Timestamp:
04/19/23 21:19:08 (18 months ago)
Author:
Gjoko Kostadinov <gjoko.kostadinov@…>
Branches:
master
Children:
950fa0d
Parents:
9050790
Message:

Add admin functionality and business admin functionality.

Location:
src/main/resources
Files:
4 added
6 edited

Legend:

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

    r9050790 r8bcd64c  
    2222                '<div class=\"form-outline mb-4\">' +
    2323                '    <div class="row">' +
    24                 '        <div class="col-md-8">\n' +
     24                '        <div class="col-md-6">\n' +
    2525                '            <input class="form-check-input" type="checkbox" value=\"' + obj.id + '\" id=\"' + obj.id + '\">\n' +
    2626                '            <label class="form-check-label" for=\"' + obj.id + '\">\n' +
     
    2929                '        </div>' +
    3030                '        <div class=\"form-outline col-md-2 d-grid\">' +
    31                 '            <input type=\"text\" id=\"' + obj.id + obj.name.replace(/\s/g, "") + '\" class=\"form-control\" />' +
     31                '            <input type=\"text\" id=\"' + obj.id + obj.name.replace(/\s/g, "") + "duration" + '\" class=\"form-control\" placeholder="time" />' +
     32                '        </div>' +
     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" />' +
    3235                '        </div>' +
    3336                '    </div>' +
     
    5356            '        </div>' +
    5457            '        <div class="form-outline col-md-2 d-grid">' +
    55             '            <input type="text" id="' + -1 + input_service.replace(/\s/g, "") + '" class="form-control" />' +
     58            '            <input type="text" id="' + -1 + input_service.replace(/\s/g, "") + "duration" + '" class="form-control" placeholder="time" />' +
     59            '        </div>' +
     60            '        <div class="form-outline col-md-2 d-grid">' +
     61            '            <input type="text" id="' + -1 + input_service.replace(/\s/g, "") + "price"+ '" class="form-control" placeholder="price" />' +
    5662            '        </div>' +
    5763            '    </div>' +
     
    8389            var text = $(label).text();
    8490            var time = $($($(label).parent()).siblings()[0]).children()[0].value;
     91            var price = $($($(label).parent()).siblings()[1]).children()[0].value;
    8592
    8693            var serviceType = {}
     
    9198            service['serviceType'] = serviceType;
    9299            service['duration'] = time;
     100            service['price'] = price;
    93101            servicesObj.push(service);
    94102        });
  • src/main/resources/templates/admin.html

    r9050790 r8bcd64c  
    22<html lang="en">
    33<head>
    4     <title>Schedlr</title>
     4    <title>Admin</title>
    55
    66    <meta charset="utf-8"/>
  • src/main/resources/templates/homepage.html

    r9050790 r8bcd64c  
    22<html>
    33<head>
    4     <title>Schedlr</title>
     4    <title>Homepage</title>
    55
    66    <meta charset="utf-8"/>
  • src/main/resources/templates/login.html

    r9050790 r8bcd64c  
    33<head>
    44    <meta charset="UTF-8">
    5     <title>Schedlr</title>
     5    <title>Login</title>
    66
    77    <!-- Font Awesome -->
     
    5454
    5555                            <!-- Submit button -->
    56                             <button type="submit" class="btn btn-primary btn-block mb-4">
     56                            <button id="login" type="submit" class="btn btn-primary btn-block mb-4">
    5757                                Login
    5858                            </button>
     59                            <div th:if="${param.error}">
     60                                <div th:if="${param.error.contains('notApproved')}" class="alert alert-danger">
     61                                    Account not approved yet.
     62                                </div>
     63
     64                                <div th:if="${param.error.contains('badCredentials')}" class="alert alert-danger">
     65                                    Invalid username or password.
     66                                </div>
     67                            </div>
    5968                        </form>
    6069
  • src/main/resources/templates/register_business.html

    r9050790 r8bcd64c  
    33<head>
    44    <meta charset="UTF-8">
    5     <title>Schedlr</title>
    6 
     5    <title>Register business</title>
    76    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css" rel="stylesheet"
    87          integrity="sha384-rbsA2VBKQhggwzxH7pPCaAqO46MgnOM80zW1RWuH61DGLwZJEdK2Kadq2F9CUG65" crossorigin="anonymous">
    9 
    108    <link rel="stylesheet" href="css/login.css">
    11 
    129</head>
    1310<body>
     
    3027                        <form>
    3128                            <div class="text-center">
    32                                 <p>Personal Info</p>
    33                             </div>
     29                            <p>Personal Info</p>
     30                        </div>
    3431
    3532                            <!-- 2 column grid layout with text inputs for the first and last names -->
  • src/main/resources/templates/register_customer.html

    r9050790 r8bcd64c  
    33<head>
    44    <meta charset="UTF-8">
    5     <title>Schedlr</title>
     5    <title>Register customer</title>
    66
    77    <meta charset="utf-8"/>
Note: See TracChangeset for help on using the changeset viewer.