diff --git a/src/components/dv/GridTable.tsx b/src/components/dv/GridTable.tsx index 049cfee..dddec3b 100644 --- a/src/components/dv/GridTable.tsx +++ b/src/components/dv/GridTable.tsx @@ -12,7 +12,7 @@ export function GridTable({ data, columns, onEdit, onDelete }: GridTableProps) { return (
- + {columns.map((col, idx) => ( @@ -35,7 +35,7 @@ export function GridTable({ data, columns, onEdit, onDelete }: GridTableProps) { const isNumeric = col.data_type === 'number'; return ( - ); diff --git a/src/components/dv/PotentialMiningTable.tsx b/src/components/dv/PotentialMiningTable.tsx index e85305a..d42b3c1 100644 --- a/src/components/dv/PotentialMiningTable.tsx +++ b/src/components/dv/PotentialMiningTable.tsx @@ -24,7 +24,7 @@ export function PotentialMiningTable({ data, onEdit, onDelete, hideOrderDetails return (
{col.name} + {displayVal}
- + @@ -49,7 +49,7 @@ export function PotentialMiningTable({ data, onEdit, onDelete, hideOrderDetails - {!hideOrderDetails && ( <> - {rows.map((row, i) => ( onRowClick(row, i) : undefined} className={cn( 'bg-[var(--z-rv-table-bg)] border-b border-[var(--z-rv-table-border)] transition-colors duration-150', diff --git a/src/screens/CallsPage.tsx b/src/screens/CallsPage.tsx index 9bda113..c0676d3 100644 --- a/src/screens/CallsPage.tsx +++ b/src/screens/CallsPage.tsx @@ -15,7 +15,7 @@ export function CallsPage() { const instanceId = params.instanceId ? Number(params.instanceId) : undefined; const navigate = useNavigate(); const [isCreating, setIsCreating] = useState(false); - const [createTitle, setCreateTitle] = useState(formatActivityName(ORDER_BOOKING.activities.LOG_VISIT.uid)); + const [createTitle, setCreateTitle] = useState('Log Visit'); const [refreshKey, setRefreshKey] = useState(0); const [activeActivity, setActiveActivity] = useState<{ id: string; name: string } | null>(null); @@ -92,7 +92,7 @@ export function CallsPage() { }} headerActions={
Product Potential (Kgs)
- {item.productName} + {item.productName} {item.badge && (
+ {item.potentialKgs} + {item.orderedKgs} diff --git a/src/components/forms/DynamicForm.tsx b/src/components/forms/DynamicForm.tsx index be493a2..400ff3d 100644 --- a/src/components/forms/DynamicForm.tsx +++ b/src/components/forms/DynamicForm.tsx @@ -27,10 +27,11 @@ export interface DynamicFormProps { onCancel?: () => void; ignorePrefill?: boolean; customPrefillData?: Record; + initialActivityName?: string; onActivityChange?: (name: string) => void; } -export function DynamicForm({ client, activityId: initialActivityId, instanceId: initialInstanceId, onSuccess, onCancel, ignorePrefill, customPrefillData, onActivityChange }: DynamicFormProps) { +export function DynamicForm({ client, activityId: initialActivityId, instanceId: initialInstanceId, onSuccess, onCancel, ignorePrefill, customPrefillData, initialActivityName, onActivityChange }: DynamicFormProps) { const [currentActivityId, setCurrentActivityId] = useState(initialActivityId); const [currentInstanceId, setCurrentInstanceId] = useState(initialInstanceId); const [chainQueue, setChainQueue] = useState>([]); @@ -164,10 +165,7 @@ export function DynamicForm({ client, activityId: initialActivityId, instanceId: }; if (loading) { - const formattedActivity = currentActivityId - ? currentActivityId.split('_').map(w => w.charAt(0).toUpperCase() + w.slice(1)).join(' ') - : 'form'; - return
; + return
; } if (error || !schema) { return
Failed to load form: {error}
; diff --git a/src/components/rv/RecordView.tsx b/src/components/rv/RecordView.tsx index 7b190cf..1476101 100644 --- a/src/components/rv/RecordView.tsx +++ b/src/components/rv/RecordView.tsx @@ -256,7 +256,7 @@ export function RecordView({