Spaces:
Runtime error
Runtime error
style: minor fix for initial state
Browse files- templates/index.html +13 -13
templates/index.html
CHANGED
|
@@ -61,14 +61,14 @@
|
|
| 61 |
<section class="mt-8 h-full flex-auto rounded-lg md:mt-0 md:ml-8">
|
| 62 |
<div class="bg-white p-16 rounded-lg">
|
| 63 |
<h1 class="text-2xl mb-8">Estimasi biaya asuransi Anda adalah</h1>
|
| 64 |
-
<h2 class="text-5xl font-bold">$<span id="insurance_cost"
|
| 65 |
<div class="mt-8">
|
| 66 |
-
<p
|
| 67 |
-
<p
|
| 68 |
-
<p
|
| 69 |
-
<p
|
| 70 |
-
<p
|
| 71 |
-
<p
|
| 72 |
</div>
|
| 73 |
</div>
|
| 74 |
<div class="flex justify-around p-16 rounded-lg mt-8">
|
|
@@ -128,12 +128,12 @@
|
|
| 128 |
contentType: false,
|
| 129 |
success: function (response) {
|
| 130 |
// Handle the response data
|
| 131 |
-
$('#respAge').html(response.age);
|
| 132 |
-
$('#respSex').html(response.sex);
|
| 133 |
-
$('#respSmoker').html(response.smoker);
|
| 134 |
-
$('#respBmi').html(response.bmi);
|
| 135 |
-
$('#respChildren').html(response.children);
|
| 136 |
-
$('#respRegion').html(response.region);
|
| 137 |
$('#insurance_cost').html(response.insurance_cost);
|
| 138 |
console.log(response);
|
| 139 |
},
|
|
|
|
| 61 |
<section class="mt-8 h-full flex-auto rounded-lg md:mt-0 md:ml-8">
|
| 62 |
<div class="bg-white p-16 rounded-lg">
|
| 63 |
<h1 class="text-2xl mb-8">Estimasi biaya asuransi Anda adalah</h1>
|
| 64 |
+
<h2 class="text-5xl font-bold">$<span id="insurance_cost">0.00</span></h2>
|
| 65 |
<div class="mt-8">
|
| 66 |
+
<p id="respAge"></p>
|
| 67 |
+
<p id="respSex"></p>
|
| 68 |
+
<p id="respSmoker"></p>
|
| 69 |
+
<p id="respBmi"></p>
|
| 70 |
+
<p id="respChildren"></p>
|
| 71 |
+
<p id="respRegion"></p>
|
| 72 |
</div>
|
| 73 |
</div>
|
| 74 |
<div class="flex justify-around p-16 rounded-lg mt-8">
|
|
|
|
| 128 |
contentType: false,
|
| 129 |
success: function (response) {
|
| 130 |
// Handle the response data
|
| 131 |
+
$('#respAge').html("<strong>Usia:</strong> " + response.age + " tahun");
|
| 132 |
+
$('#respSex').html("<strong>Jenis kelamin:</strong>" + response.sex);
|
| 133 |
+
$('#respSmoker').html("<strong>Status perokok:</strong> "+ response.smoker);
|
| 134 |
+
$('#respBmi').html("<strong>BMI:</strong> " + response.bmi);
|
| 135 |
+
$('#respChildren').html("<strong>Jumlah Anak:</strong> " + response.children);
|
| 136 |
+
$('#respRegion').html("<strong>Region: </strong>" + response.region);
|
| 137 |
$('#insurance_cost').html(response.insurance_cost);
|
| 138 |
console.log(response);
|
| 139 |
},
|