Replace entire repo content with correct code from /root/shahikitchen-website/

This commit is contained in:
root
2026-06-29 16:22:09 +00:00
parent 57cc67d2d3
commit 50e3a34895
723 changed files with 20055 additions and 26101 deletions
+21
View File
@@ -0,0 +1,21 @@
/** Weight-based mithai pricing (all sweets except kulfi). */
export const SWEETS_HALF_KG_PRICE = 90;
export const SWEETS_KG_PRICE = 179;
export const KULFI_MENU_ID = 'kulfi';
/** quantity = number of half-kg portions */
export function calculateSweetsWeightTotal(halfKgUnits: number): number {
const fullKg = Math.floor(halfKgUnits / 2);
const halfRemainder = halfKgUnits % 2;
return fullKg * SWEETS_KG_PRICE + halfRemainder * SWEETS_HALF_KG_PRICE;
}
export function halfKgUnitsToKg(halfKgUnits: number): number {
return halfKgUnits * 0.5;
}
export function formatSweetWeightLabel(halfKgUnits: number): string {
const kg = halfKgUnitsToKg(halfKgUnits);
return kg === 0.5 ? '0.5 kg' : `${kg} kg`;
}