@@ -34,7 +34,7 @@ function computePrice(
3434 tier : ExperienceKey ,
3535 cur : 'INR' | 'USD' ,
3636 customSlugs : string [ ] = [ ] ,
37- pricingConfig : PricingConfig = DEFAULT_PRICING
37+ pricingConfig : PricingConfig & { executiveConnectPricing ?: Record < string , number > } = DEFAULT_PRICING
3838) {
3939 const prices = pricingConfig . basePrices [ cur ] ;
4040 const sym = cur === 'INR' ? '₹' : '$' ;
@@ -48,12 +48,27 @@ function computePrice(
4848 }
4949
5050 const complementarySet = new Set ( PACKAGE_COMPLEMENTARY [ pkg as PkgSlug ] ?? [ ] ) ;
51- const services = slugs . map ( slug => ( {
52- slug,
53- label : SERVICE_LABELS [ slug ] ,
54- price : complementarySet . has ( slug ) ? 0 : ( prices [ slug ] ?. [ tier ] ?? 0 ) ,
55- complimentary : complementarySet . has ( slug ) ,
56- } ) ) ;
51+ const services = slugs . map ( slug => {
52+ let price = 0 ;
53+ if ( ! complementarySet . has ( slug ) ) {
54+ if ( slug === 'EXECUTIVE_CONNECT' ) {
55+ const ecMap = pricingConfig . executiveConnectPricing ;
56+ if ( ecMap && typeof ecMap [ cur ] === 'number' ) {
57+ price = ecMap [ cur ] ;
58+ } else {
59+ price = prices [ slug ] ?. [ tier ] ?? ( cur === 'INR' ? 4999 : 100 ) ;
60+ }
61+ } else {
62+ price = prices [ slug ] ?. [ tier ] ?? 0 ;
63+ }
64+ }
65+ return {
66+ slug,
67+ label : SERVICE_LABELS [ slug ] ,
68+ price,
69+ complimentary : complementarySet . has ( slug ) ,
70+ } ;
71+ } ) ;
5772 let discountableSubtotal = 0 ;
5873 let nonDiscountableSubtotal = 0 ;
5974 services . forEach ( x => {
@@ -118,7 +133,7 @@ function CheckoutPageInner() {
118133 subtotalAfterDiscount : number ; taxRate : number ; taxAmount : number ;
119134 finalPayable : number ; isIndia : boolean ; gateway : string ;
120135 } | null > ( null ) ;
121- const [ pricingConfig , setPricingConfig ] = useState < PricingConfig > ( DEFAULT_PRICING ) ;
136+ const [ pricingConfig , setPricingConfig ] = useState < PricingConfig & { executiveConnectPricing ?: Record < string , number > } > ( DEFAULT_PRICING ) ;
122137 const [ addExecutiveConnect , setAddExecutiveConnect ] = useState ( false ) ;
123138 const [ whatsapp , setWhatsapp ] = useState ( '' ) ;
124139 const [ website ] = useState ( '' ) ;
@@ -695,16 +710,31 @@ function CheckoutPageInner() {
695710 if ( live . services . length === 0 ) return null ;
696711 // International clients see their local currency as the headline; USD is the reference.
697712 const showLocal = ! ! ( localRate && countryCode !== 'IN' ) ;
698- const toLocal = ( n : number ) => ( showLocal ? Math . round ( n * localRate ! . rate ) : n ) ;
713+ const toLocal = ( n : number , slug ?: string ) => {
714+ if ( ! showLocal ) return n ;
715+ if ( slug === 'EXECUTIVE_CONNECT' && pricingConfig . executiveConnectPricing ?. [ localRate ! . code ] ) {
716+ return pricingConfig . executiveConnectPricing [ localRate ! . code ] ;
717+ }
718+ return Math . round ( n * localRate ! . rate ) ;
719+ } ;
699720 const priSym = showLocal ? localRate ! . symbol : live . sym ;
700721 const priCode = showLocal ? localRate ! . code : ( cur === 'INR' ? 'INR' : 'USD' ) ;
722+ const ecPrice = toLocal (
723+ pricingConfig . executiveConnectPricing ?. [ cur ] ?? ( cur === 'INR' ? 4999 : 100 ) ,
724+ 'EXECUTIVE_CONNECT'
725+ ) ;
701726 return (
702727 < div className = "space-y-6" >
703728 { ( experienceLevel === 'EXECUTIVE' || experienceLevel === 'EXECUTIVE_PLUS' ) && (
704729 < div className = "p-5 border border-brand-gold/30 bg-brand-gold/5 flex flex-col gap-3" >
705730 < div className = "flex items-start justify-between gap-4" >
706731 < div >
707- < h3 className = "font-semibold text-brand-obsidian text-sm uppercase tracking-wider mb-1" > Add Executive Connect</ h3 >
732+ < div className = "flex items-center gap-2 mb-1" >
733+ < h3 className = "font-semibold text-brand-obsidian text-sm uppercase tracking-wider" > Add Executive Connect</ h3 >
734+ < span className = "text-xs font-bold text-brand-gold bg-brand-gold/10 px-2 py-0.5 rounded" >
735+ +{ priSym } { ecPrice . toLocaleString ( ) }
736+ </ span >
737+ </ div >
708738 < p className = "text-xs text-brand-obsidian/70 leading-relaxed" >
709739 A 45-minute 1-on-1 strategy session with our senior executive team to align your narrative before we start writing. Highly recommended for Director and C-suite roles.
710740 </ p >
@@ -727,7 +757,7 @@ function CheckoutPageInner() {
727757 { s . complimentary ? (
728758 < span className = "text-[10px] font-bold text-emerald-700 bg-emerald-50 border border-emerald-100 px-2 py-0.5 rounded-full leading-none" > INCLUDED FREE</ span >
729759 ) : (
730- < span className = "font-medium text-brand-obsidian tabular-nums" > { priSym } { toLocal ( s . price ) . toLocaleString ( ) } </ span >
760+ < span className = "font-medium text-brand-obsidian tabular-nums" > { priSym } { toLocal ( s . price , s . slug ) . toLocaleString ( ) } </ span >
731761 ) }
732762 </ div >
733763 ) ) }
0 commit comments