diff --git a/app.js b/app.js index 7a2ec2f..7211d30 100644 --- a/app.js +++ b/app.js @@ -309,8 +309,14 @@ async function setupPdfImport() { try { const text = await extractTextFromPdf(file); const data = parseRegistrationData(text); - fillFormWithData(data); - showSnackbar('Data imported successfully!', 'success'); + + // Check if any data was extracted + if (Object.keys(data).length === 0) { + showSnackbar('Failed to import data. Make sure PDF was exported from SIMS portal.', 'error'); + } else { + fillFormWithData(data); + showSnackbar('Data imported successfully!', 'success'); + } } catch (error) { console.error('PDF import failed:', error); showSnackbar('Failed to import PDF', 'error'); diff --git a/index.html b/index.html index d5a867b..1d4016b 100644 --- a/index.html +++ b/index.html @@ -42,7 +42,42 @@ -
+
+ +
+
+ fact_check +

Roadworthiness Details

+
+ +
+ +
+ +
+ + expand_more +
+
+ + +
+ + +
+ + +
+ + + Auto-calculated +
+
+
+ +
edit_document @@ -50,35 +85,6 @@
- -
- -
- - expand_more -
-
- - -
-
- - -
-
- - - Auto-calculated -
-
- - -
- Vehicle Details -
-
@@ -87,7 +93,7 @@ Import PDF - Upload vehicle registration PDF to auto-fill + Get your PDF from SIMS portal
@@ -101,7 +107,6 @@ - Letters and numbers only
diff --git a/styles.css b/styles.css index 25c01e7..b2c953f 100644 --- a/styles.css +++ b/styles.css @@ -234,6 +234,19 @@ body { align-items: start; } +.main-content.three-column { + max-width: 1400px; + grid-template-columns: 1fr 1fr 1fr; +} + +/* Card Body */ +.card-body { + padding: 24px; + display: flex; + flex-direction: column; + gap: 20px; +} + /* Cards */ .card { background-color: var(--md-sys-color-surface); @@ -493,11 +506,27 @@ body { } /* Responsive Styles */ +@media (max-width: 1200px) { + .main-content.three-column { + grid-template-columns: 1fr 1fr; + } + + .main-content.three-column .preview-card { + grid-column: span 2; + } +} + @media (max-width: 900px) { - .main-content { + .main-content, + .main-content.three-column { grid-template-columns: 1fr; } + .main-content.three-column .preview-card { + grid-column: span 1; + order: -1; + } + .preview-card { position: static; order: -1;