diff --git a/src/pages/gh-cost-estimator.astro b/src/pages/gh-cost-estimator.astro new file mode 100644 index 0000000..c18a63c --- /dev/null +++ b/src/pages/gh-cost-estimator.astro @@ -0,0 +1,544 @@ +--- +import SiteLayout from "../layouts/SiteLayout.astro"; + +const rows = Array.from({ length: 20 }, (_, index) => index + 1); +const gstRate = 0.18; +const rates = { + single: 2200, + double: 2700, + lunch: 200, + dinner: 200, +}; + +const withGst = (amount: number) => amount + amount * gstRate; +const currency = new Intl.NumberFormat("en-IN", { + style: "currency", + currency: "INR", + maximumFractionDigits: 0, +}); +--- + + +
+
+
+

Utility

+

Basic Calculator

+
+ +
+ +
+
+
+
+

Number of People

+

Use the slider to set up the estimate table.

+
+ N = 5 +
+ + + +
+
+
Single Occupancy
+
{currency.format(withGst(rates.single))}
+
+
+
Double Occupancy
+
{currency.format(withGst(rates.double))}
+
+
+
Lunch
+
{currency.format(withGst(rates.lunch))}
+
+
+
Dinner
+
{currency.format(withGst(rates.dinner))}
+
+
+
+ +
+
+
+

Estimate

+

Rates include 18% GST.

+
+
+ +
+ + + + + + + + + + + + { + rows.map((row) => ( + + + + + + + + )) + } + +
NameSingle OccupancyDouble OccupancyLunchDinner
+ + + + + + + + + + +
+
+ +
+
+ Total Cost + {currency.format(0)} +
+

For 5 people.

+
+
+
+
+ + + + +