@@ -9,7 +9,7 @@ import AnnexureKForm from '../components/AnnexureKForm';
99import { initialCCIParameters , generateSampleData } from './data/cciParameters' ;
1010import { CCIParameter , CCIResult , AnnexureKData } from './types' ;
1111import { calculateCCIIndex } from './utils/cciCalculator' ;
12- import { exportToPDF } from './utils/exportUtils' ;
12+ import { exportToWord } from './utils/exportUtils' ;
1313import DataCollectionForm from '../components/DataCollectionForm' ;
1414import { FormState as AnnexureKFormState } from '../components/AnnexureKForm' ;
1515import { toast } from 'react-hot-toast' ;
@@ -83,26 +83,26 @@ export default function Home() {
8383 } , 100 ) ;
8484 } ;
8585
86- const handleExportPDF = ( ) => {
87- // Show loading indicator while PDF is being generated
86+ const handleExportWord = ( ) => {
87+ // Show loading indicator while Word document is being generated
8888 setIsExporting ( true ) ;
8989
9090 try {
9191 // Export the full detailed report with parameters, result and annexureKData
92- exportToPDF ( parameters , cciResult , annexureKData || undefined )
92+ exportToWord ( parameters , cciResult , annexureKData || undefined )
9393 . then ( ( ) => {
9494 setIsExporting ( false ) ;
95- toast . success ( 'Report exported successfully!' ) ;
95+ toast . success ( 'Word document exported successfully!' ) ;
9696 } )
9797 . catch ( error => {
98- console . error ( 'Error exporting PDF :' , error ) ;
98+ console . error ( 'Error exporting Word document :' , error ) ;
9999 setIsExporting ( false ) ;
100- toast . error ( 'Failed to export report ' ) ;
100+ toast . error ( 'Failed to export Word document ' ) ;
101101 } ) ;
102102 } catch ( error ) {
103- console . error ( 'Error starting PDF export:' , error ) ;
103+ console . error ( 'Error starting Word export:' , error ) ;
104104 setIsExporting ( false ) ;
105- toast . error ( 'Failed to start PDF export' ) ;
105+ toast . error ( 'Failed to start Word export' ) ;
106106 }
107107 } ;
108108
@@ -286,7 +286,7 @@ export default function Home() {
286286 </ button >
287287 < button
288288 onClick = { handleShowAnnexureK }
289- className = "bg-blue-600 hover:bg-blue-700 text-white py-2 px-6 rounded-md transition duration-200 shadow-md flex items-center"
289+ className = "bg-gray-800 hover:bg-black text-white py-2 px-6 rounded-md transition duration-200 shadow-md flex items-center"
290290 >
291291 < svg xmlns = "http://www.w3.org/2000/svg" className = "h-5 w-5 mr-2" viewBox = "0 0 20 20" fill = "currentColor" >
292292 < path fillRule = "evenodd" d = "M4 4a2 2 0 012-2h4.586A2 2 0 0112 2.586L15.414 6A2 2 0 0116 7.414V16a2 2 0 01-2 2H6a2 2 0 01-2-2V4zm2 6a1 1 0 011-1h6a1 1 0 110 2H7a1 1 0 01-1-1zm1 3a1 1 0 100 2h6a1 1 0 100-2H7z" clipRule = "evenodd" />
@@ -314,7 +314,7 @@ export default function Home() {
314314 < div className = "p-6" >
315315 { Object . keys ( groupedParameters ) . map ( ( category , categoryIndex ) => (
316316 < div key = { categoryIndex } className = "mb-8" >
317- < h3 className = "text-lg font-medium text-white mb-4 pb-2 border-b" >
317+ < h3 className = "text-lg font-medium text-black mb-4 pb-2 border-b" >
318318 { getCategoryName ( category ) } Parameters
319319 </ h3 >
320320
@@ -360,7 +360,7 @@ export default function Home() {
360360 { showResults && (
361361 < div id = "results" className = "bg-white rounded-xl shadow-md overflow-hidden mb-8 animate-fadeIn" >
362362 < div className = "p-6 bg-gray-50 border-b" >
363- < h2 className = "text-xl font-semibold text-blue-800 " > CCI Results</ h2 >
363+ < h2 className = "text-xl font-semibold text-black " > CCI Results</ h2 >
364364 </ div >
365365 < div className = "p-6" >
366366 < CCIResults result = { cciResult } onViewReport = { handleViewReport } onReset = { handleReset } onShowAnnexureK = { handleShowAnnexureK } />
@@ -373,9 +373,9 @@ export default function Home() {
373373 < div className = "bg-white rounded-xl shadow-md overflow-hidden mb-4" >
374374 < div className = "p-6 bg-gray-50 border-b" >
375375 < div >
376- < h2 className = "text-xl font-semibold text-blue-800 " > CCI Detailed Report</ h2 >
376+ < h2 className = "text-xl font-semibold text-black " > CCI Detailed Report</ h2 >
377377 { annexureKData && (
378- < p className = "text-sm text-green-600 mt-1" >
378+ < p className = "text-sm text-black mt-1" >
379379 < svg xmlns = "http://www.w3.org/2000/svg" className = "h-4 w-4 inline-block mr-1" viewBox = "0 0 20 20" fill = "currentColor" >
380380 < path fillRule = "evenodd" d = "M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z" clipRule = "evenodd" />
381381 </ svg >
@@ -385,21 +385,34 @@ export default function Home() {
385385 </ div >
386386 </ div >
387387 </ div >
388- < CCIReport parameters = { parameters } result = { cciResult } />
388+ < CCIReport parameters = { parameters } result = { cciResult } onExportWord = { handleExportWord } />
389389 </ div >
390390 ) }
391391
392+ { /* Bottom Calculate CCI Button */ }
393+ < div className = "flex justify-center mb-12" >
394+ < button
395+ onClick = { handleCalculate }
396+ className = "bg-black hover:bg-gray-800 text-white py-3 px-8 rounded-lg transition duration-200 shadow-lg flex items-center text-lg font-bold"
397+ >
398+ < svg xmlns = "http://www.w3.org/2000/svg" className = "h-6 w-6 mr-2" viewBox = "0 0 20 20" fill = "currentColor" >
399+ < path fillRule = "evenodd" d = "M6.267 3.455a3.066 3.066 0 001.745-.723 3.066 3.066 0 013.976 0 3.066 3.066 0 001.745.723 3.066 3.066 0 012.812 2.812c.051.643.304 1.254.723 1.745a3.066 3.066 0 010 3.976 3.066 3.066 0 00-.723 1.745 3.066 3.066 0 01-2.812 2.812 3.066 3.066 0 00-1.745.723 3.066 3.066 0 01-3.976 0 3.066 3.066 0 00-1.745-.723 3.066 3.066 0 01-2.812-2.812 3.066 3.066 0 00-.723-1.745 3.066 3.066 0 010-3.976 3.066 3.066 0 00.723-1.745 3.066 3.066 0 012.812-2.812zm7.44 5.252a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z" clipRule = "evenodd" />
400+ </ svg >
401+ Calculate CCI Score
402+ </ button >
403+ </ div >
404+
392405 { /* Bottom Call-to-Action for Implementation Guide */ }
393- < div className = "bg-blue-900 text-white p-6 rounded-xl shadow-lg mb-8 flex flex-col md:flex-row items-center justify-between" >
406+ < div className = "bg-black text-white p-6 rounded-xl shadow-lg mb-8 flex flex-col md:flex-row items-center justify-between" >
394407 < div className = "mb-4 md:mb-0" >
395408 < h2 className = "text-xl font-bold" > Need guidance for SEBI CSCRF implementation?</ h2 >
396- < p className = "text-blue-200 mt-2" >
409+ < p className = "text-gray-300 mt-2" >
397410 Our comprehensive guide provides detailed requirements and evidence examples for each parameter
398411 </ p >
399412 </ div >
400413 < a
401414 href = "https://dakshinrajsiva.github.io/cci/sebi-cscrf"
402- className = "bg-white text-blue-900 hover:bg-blue-100 py-3 px-8 rounded-md transition duration-200 font-bold flex items-center shadow-md"
415+ className = "bg-white text-black hover:bg-gray-200 py-3 px-8 rounded-md transition duration-200 font-bold flex items-center shadow-md"
403416 target = "_blank"
404417 rel = "noopener noreferrer"
405418 >
0 commit comments