Parcourir la source

done UX animation on booking

staging
azri il y a 1 mois
Parent
révision
e88724f83f

+ 14
- 2
public/js/main.js Voir le fichier

@@ -11001,7 +11001,6 @@ $(document).ready(function () {
11001 11001
       _callback: function _callback(_ref) {
11002 11002
         var state_city = _ref.state_city;
11003 11003
         var selectLocationInput = $("#select-location");
11004
-        $(selectLocationInput).children(".select-value").remove();
11005 11004
         if (Array.isArray(state_city)) {
11006 11005
           state_city.forEach(function (_ref2, i) {
11007 11006
             var state = _ref2.state,
@@ -11032,10 +11031,17 @@ $(document).ready(function () {
11032 11031
     $(inputDate).attr("max", maxDate);
11033 11032
     resetDate();
11034 11033
   }
11034
+  $("#booknow-btn").on('click', function () {
11035
+    document.getElementById("download-container").scrollIntoView();
11036
+  });
11035 11037
   $("#select-location").on('change', function () {
11036 11038
     resetDate();
11037 11039
     resetRules();
11038 11040
     resetField();
11041
+    $("#select-location").children("#default-input-select-location").remove();
11042
+    setTimeout(function () {
11043
+      document.getElementById("field-location-container").scrollIntoView();
11044
+    }, 300);
11039 11045
     if (this.value !== "default") {
11040 11046
       var _JSON$parse = JSON.parse(this.value),
11041 11047
         state = _JSON$parse.state,
@@ -11080,6 +11086,9 @@ $(document).ready(function () {
11080 11086
     resetDate();
11081 11087
     resetRules();
11082 11088
     resetField();
11089
+    setTimeout(function () {
11090
+      document.getElementById("field-container").scrollIntoView();
11091
+    }, 300);
11083 11092
     api.listField({
11084 11093
       state: state,
11085 11094
       city: city,
@@ -11161,7 +11170,10 @@ $(document).ready(function () {
11161 11170
     $('#field-container').children(".select-field").remove();
11162 11171
   }
11163 11172
   function resetDate() {
11164
-    $('#input-booking-date').val("");
11173
+    var _createDateInputWithR2 = createDateInputWithRange(14),
11174
+      maxDate = _createDateInputWithR2.maxDate,
11175
+      minDate = _createDateInputWithR2.minDate;
11176
+    $('#input-booking-date').val(minDate);
11165 11177
   }
11166 11178
   function resetRules() {
11167 11179
     $("#input-booking-slot").children(".select-value").remove();

+ 16
- 4
resources/js/main.js Voir le fichier

@@ -67,9 +67,6 @@ $(document).ready(function () {
67 67
             _callback: ({state_city}) => {
68 68
 
69 69
                 const selectLocationInput = $("#select-location");
70
-
71
-                $(selectLocationInput).children(".select-value").remove()
72
-
73 70
                 if(Array.isArray(state_city)){
74 71
                     state_city.forEach(({state, city}, i) => {
75 72
                         let newOption = document.createElement('option');
@@ -97,11 +94,21 @@ $(document).ready(function () {
97 94
 
98 95
     }
99 96
 
97
+    $("#booknow-btn").on('click', function(){
98
+        document.getElementById("download-container").scrollIntoView();
99
+    })
100
+
100 101
     $("#select-location").on('change', function(){
101 102
 
102 103
         resetDate()
103 104
         resetRules()
104 105
         resetField()
106
+        $("#select-location").children("#default-input-select-location").remove()
107
+
108
+        setTimeout(() => {
109
+            document.getElementById("field-location-container").scrollIntoView();
110
+        }, 300);
111
+
105 112
 
106 113
         if(this.value !== "default" ){
107 114
             let {state, city} = JSON.parse(this.value);
@@ -149,6 +156,10 @@ $(document).ready(function () {
149 156
         resetRules()
150 157
         resetField()
151 158
 
159
+        setTimeout(() => {
160
+            document.getElementById("field-container").scrollIntoView();
161
+        }, 300);
162
+
152 163
         api.listField({state, city, field_name, _callback:({results})=>{
153 164
 
154 165
             let container = $('#field-container')
@@ -240,7 +251,8 @@ $(document).ready(function () {
240 251
     }
241 252
 
242 253
     function resetDate(){
243
-        $('#input-booking-date').val("")
254
+        let { maxDate, minDate } = createDateInputWithRange(14)
255
+        $('#input-booking-date').val(minDate)
244 256
     }
245 257
 
246 258
     function resetRules(){

+ 7
- 6
resources/views/booking.antlers.html Voir le fichier

@@ -12,7 +12,7 @@
12 12
 
13 13
             <div class="col-12 position-relative px-3 mb-5">
14 14
                 <select id="select-location" class="db-input" id="cars" name="cars">
15
-                    <option value="default" selected>Select City and State</option>
15
+                    <option id="default-input-select-location" value="default">Select City and State</option>
16 16
                   </select>
17 17
             </div>
18 18
 
@@ -51,7 +51,9 @@
51 51
                       </select>
52 52
                 </div>
53 53
                 <div class="col-lg-2 my-5 my-lg-0 d-flex">
54
-                    <a href="https://play.google.com/store/apps/details?id=club.thebola.app" target="_blank" class="nav-link db-btn mx-auto mt-auto" style="font-size: clamp(18px,1vw,23px);font-weight: 500;padding: 0.5rem 3rem;">Book Now</a>
54
+                    <button id="booknow-btn" class="nav-link db-btn mx-auto mt-auto">
55
+                        Book Now
56
+                    </button>
55 57
                 </div>
56 58
             </div>
57 59
 
@@ -64,9 +66,8 @@
64 66
             <p class="db-h3 text-highlight" style="line-height: clamp(3rem,2.5vw,4rem);">Our Mobile Apps Is Coming Soon!</p>
65 67
             <p class="mx-auto p-0 db-h5 mb-5" style="line-height: clamp(1.7rem,2.5vw,3rem);">Soon all of the amazing features that we provide here will be available in<br/> an exclusive app for both android and iOS.</p>
66 68
         </div>
67
-        <div class="container-fluid d-flex flex-wrap justify-content-center">
68
-            <img data-aos="fade-up" data-aos-delay="100" class="mx-2" src="./assets/image/gplay.png" alt="google-play-img" style="width: 200px;">
69
-            <img data-aos="fade-up" data-aos-delay="100" class="mx-2" src="./assets/image/appstore.png" alt="google-play-img" style="width: 200px;">
70
-        </div>
69
+
70
+        {{ partial:partials/appsdownload }}
71
+
71 72
     </div>
72 73
 </section>

+ 1
- 4
resources/views/home.antlers.html Voir le fichier

@@ -103,9 +103,6 @@
103 103
             <p class="db-h3 text-highlight" style="line-height: clamp(3rem,2.5vw,4rem);">Our Mobile Apps Is Coming Soon!</p>
104 104
             <p class="mx-auto p-0 db-h5 mb-5" style="line-height: clamp(1.7rem,2.5vw,3rem);">Soon all of the amazing features that we provide here will be available in<br/> an exclusive app for both android and iOS.</p>
105 105
         </div>
106
-        <div class="container-fluid d-flex flex-wrap justify-content-center">
107
-            <img data-aos="fade-up" data-aos-delay="100" class="mx-2" src="./assets/image/gplay.png" alt="google-play-img" style="width: 200px;">
108
-            <img data-aos="fade-up" data-aos-delay="100" class="mx-2" src="./assets/image/appstore.png" alt="google-play-img" style="width: 200px;">
109
-        </div>
106
+        {{ partial:partials/appsdownload }}
110 107
     </div>
111 108
 </section>

+ 8
- 0
resources/views/partials/_appsdownload.antlers.html Voir le fichier

@@ -0,0 +1,8 @@
1
+<div id="download-container" class="container-fluid d-flex flex-wrap justify-content-center">
2
+    <a href="https://play.google.com/store/apps/details?id=club.thebola.app">
3
+        <img data-aos="fade-up" data-aos-delay="100" class="mx-2" src="./assets/image/gplay.png" alt="google-play-img" style="width: 200px;">
4
+    </a>
5
+    <a href="https://apps.apple.com/my/app/the-bola/id6478902627">
6
+        <img data-aos="fade-up" data-aos-delay="100" class="mx-2" src="./assets/image/appstore.png" alt="google-play-img" style="width: 220px;">
7
+    </a>
8
+</div>

Chargement…
Annuler
Enregistrer