From b288ebf6ccf63e0e323c743a103e93049e39f21d Mon Sep 17 00:00:00 2001 From: suryac Date: Mon, 3 Aug 2026 11:43:15 +0530 Subject: [PATCH] made outline no border --- src/components/forms/DynamicForm.tsx | 7 +++++++ src/components/forms/LogVisitForm.tsx | 6 +++++- src/components/reusable/AnalyticsChart.tsx | 15 +++++++++------ src/index.css | 6 ++++++ 4 files changed, 27 insertions(+), 7 deletions(-) diff --git a/src/components/forms/DynamicForm.tsx b/src/components/forms/DynamicForm.tsx index 79eb39a..191e158 100644 --- a/src/components/forms/DynamicForm.tsx +++ b/src/components/forms/DynamicForm.tsx @@ -577,6 +577,13 @@ export function DynamicForm({ client, activityId: initialActivityId, instanceId: for (const f of fields) { const val = finalValues[f.id]; + const isRemark = (f.name || '').toLowerCase().includes('remark') || (f.name || '').toLowerCase().includes('note'); + + if (isRemark && (val == null || val === '')) { + payload[f.id] = ''; + continue; + } + if (val == null) continue; if (f.data_type === 'phone' && typeof val === 'string') { diff --git a/src/components/forms/LogVisitForm.tsx b/src/components/forms/LogVisitForm.tsx index b62b9a3..c746dab 100644 --- a/src/components/forms/LogVisitForm.tsx +++ b/src/components/forms/LogVisitForm.tsx @@ -343,7 +343,11 @@ export function LogVisitForm({ client, onSuccess, onCancel, onActivityChange }: const payload: Record = {}; validFieldIds.forEach(fieldId => { const val = valuesRef.current[fieldId]; - if (val !== undefined && val !== null && val !== '') { + const isRemark = fieldId.toLowerCase().includes('remark') || fieldId.toLowerCase().includes('note'); + + if (isRemark && (val === undefined || val === null || val === '')) { + payload[fieldId] = ''; + } else if (val !== undefined && val !== null && val !== '') { payload[fieldId] = val; } }); diff --git a/src/components/reusable/AnalyticsChart.tsx b/src/components/reusable/AnalyticsChart.tsx index d7e43ac..aac3ca0 100644 --- a/src/components/reusable/AnalyticsChart.tsx +++ b/src/components/reusable/AnalyticsChart.tsx @@ -203,9 +203,9 @@ export function AnalyticsChart({ data, gridCols }: AnalyticsChartProps) { ) : ( - + {chartType === 3 || chartType === 4 ? ( - + {finalData.map((_, index) => ( - + ))} ) : chartType === 1 ? ( - + {renderChartContent()} ) : chartType === 2 ? ( - + {renderChartContent()} ) : ( - + {renderChartContent()} )} diff --git a/src/index.css b/src/index.css index 5fb3313..dc068c5 100644 --- a/src/index.css +++ b/src/index.css @@ -109,3 +109,9 @@ code { padding: 4px 8px; background: var(--code-bg); } + +/* Remove black border on recharts when clicking */ +.recharts-wrapper, +.recharts-wrapper * { + outline: none !important; +}