fix: Quote wizard - correct total calculation and email sender
- Fix calculateQuote() to respect serviceInterests flags - Only include GPS/Support costs when user has enabled them - Update Step6Summary to conditionally render service sections - Add sender display name (Arizona Computer Guru) to emails - Add reply-to address (admin@azcomputerguru.com) - Fixes phantom $380 support charge appearing in totals Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -88,54 +88,58 @@ export function Step6Summary({
|
||||
</div>
|
||||
)}
|
||||
|
||||
{/* GPS Monitoring Section */}
|
||||
<SummarySection
|
||||
icon={<Monitor className="w-5 h-5" />}
|
||||
title="GPS Monitoring"
|
||||
monthlyTotal={result.gpsMonthly}
|
||||
onEdit={() => onGoToStep(1)}
|
||||
>
|
||||
<div className="space-y-2">
|
||||
<SummaryLine
|
||||
label={`${gpsTier?.name} Plan (${quoteData.gps.endpointCount} endpoints)`}
|
||||
value={formatCurrency(result.breakdown.gps.monitoring)}
|
||||
/>
|
||||
{quoteData.gps.includeEquipment && quoteData.gps.equipmentDeviceCount > 0 && (
|
||||
{/* GPS Monitoring Section - only show if enabled */}
|
||||
{quoteData.serviceInterests.gps && (
|
||||
<SummarySection
|
||||
icon={<Monitor className="w-5 h-5" />}
|
||||
title="GPS Monitoring"
|
||||
monthlyTotal={result.gpsMonthly}
|
||||
onEdit={() => onGoToStep(1)}
|
||||
>
|
||||
<div className="space-y-2">
|
||||
<SummaryLine
|
||||
label={`Equipment Pack (${quoteData.gps.equipmentDeviceCount} devices)`}
|
||||
value={formatCurrency(result.breakdown.gps.equipment)}
|
||||
label={`${gpsTier?.name} Plan (${quoteData.gps.endpointCount} endpoints)`}
|
||||
value={formatCurrency(result.breakdown.gps.monitoring)}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
</SummarySection>
|
||||
{quoteData.gps.includeEquipment && quoteData.gps.equipmentDeviceCount > 0 && (
|
||||
<SummaryLine
|
||||
label={`Equipment Pack (${quoteData.gps.equipmentDeviceCount} devices)`}
|
||||
value={formatCurrency(result.breakdown.gps.equipment)}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
</SummarySection>
|
||||
)}
|
||||
|
||||
{/* Support Plan Section */}
|
||||
<SummarySection
|
||||
icon={<Headphones className="w-5 h-5" />}
|
||||
title="Support Plan"
|
||||
monthlyTotal={result.supportMonthly}
|
||||
onEdit={() => onGoToStep(2)}
|
||||
>
|
||||
<div className="space-y-2">
|
||||
{quoteData.support.planId === 'none' ? (
|
||||
<SummaryLine
|
||||
label="No Monthly Plan (pay-as-you-go)"
|
||||
value="$0"
|
||||
/>
|
||||
) : (
|
||||
<SummaryLine
|
||||
label={`${supportPlan?.name} Plan (${supportPlan?.includedHours} hrs/mo)`}
|
||||
value={formatCurrency(result.breakdown.support.plan)}
|
||||
/>
|
||||
)}
|
||||
{blockTime && (
|
||||
<SummaryLine
|
||||
label={`Block Time (${blockTime.hours} hours) — one-time`}
|
||||
value={formatCurrency(result.breakdown.support.blockTime)}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
</SummarySection>
|
||||
{/* Support Plan Section - only show if enabled */}
|
||||
{quoteData.serviceInterests.support && (
|
||||
<SummarySection
|
||||
icon={<Headphones className="w-5 h-5" />}
|
||||
title="Support Plan"
|
||||
monthlyTotal={result.supportMonthly}
|
||||
onEdit={() => onGoToStep(2)}
|
||||
>
|
||||
<div className="space-y-2">
|
||||
{quoteData.support.planId === 'none' ? (
|
||||
<SummaryLine
|
||||
label="No Monthly Plan (pay-as-you-go)"
|
||||
value="$0"
|
||||
/>
|
||||
) : (
|
||||
<SummaryLine
|
||||
label={`${supportPlan?.name} Plan (${supportPlan?.includedHours} hrs/mo)`}
|
||||
value={formatCurrency(result.breakdown.support.plan)}
|
||||
/>
|
||||
)}
|
||||
{blockTime && (
|
||||
<SummaryLine
|
||||
label={`Block Time (${blockTime.hours} hours) — one-time`}
|
||||
value={formatCurrency(result.breakdown.support.blockTime)}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
</SummarySection>
|
||||
)}
|
||||
|
||||
{/* VoIP Section */}
|
||||
{quoteData.voip.enabled && (
|
||||
@@ -230,15 +234,19 @@ export function Step6Summary({
|
||||
Monthly Breakdown
|
||||
</h4>
|
||||
<div className="space-y-3">
|
||||
<BreakdownRow label="GPS Monitoring" value={result.gpsMonthly} />
|
||||
<BreakdownRow label="Support Plan" value={result.supportMonthly} />
|
||||
{quoteData.voip.enabled && (
|
||||
{quoteData.serviceInterests.gps && (
|
||||
<BreakdownRow label="GPS Monitoring" value={result.gpsMonthly} />
|
||||
)}
|
||||
{quoteData.serviceInterests.support && (
|
||||
<BreakdownRow label="Support Plan" value={result.supportMonthly} />
|
||||
)}
|
||||
{quoteData.serviceInterests.voip && quoteData.voip.enabled && (
|
||||
<BreakdownRow label="VoIP Phone System" value={result.voipMonthly} />
|
||||
)}
|
||||
{quoteData.webHosting.enabled && (
|
||||
{quoteData.serviceInterests.webHosting && quoteData.webHosting.enabled && (
|
||||
<BreakdownRow label="Web Hosting" value={result.webHostingMonthly} />
|
||||
)}
|
||||
{quoteData.email.enabled && (
|
||||
{quoteData.serviceInterests.email && quoteData.email.enabled && (
|
||||
<BreakdownRow label="Email Service" value={result.emailMonthly} />
|
||||
)}
|
||||
<div className="pt-4 mt-1 border-t-2 border-[#fe7400]/20 flex justify-between items-center">
|
||||
|
||||
Reference in New Issue
Block a user