fix table and field agent on formField
- show Host to Host - set field agent to optional with default value `''`
This commit is contained in:
@ -145,7 +145,7 @@ const EditDialog = () => {
|
||||
type: response?.data.type,
|
||||
status: response?.data.status,
|
||||
transaction_type: response?.data.transaction_type.id,
|
||||
agent: response?.data.agent.id
|
||||
agent: response?.data.agent?.id || ''
|
||||
}));
|
||||
}
|
||||
}, []);
|
||||
|
||||
@ -94,7 +94,13 @@ const ManageProviderContextProvider = ({ children }: { children: React.ReactNode
|
||||
}
|
||||
},
|
||||
{
|
||||
accessorFn: (row) => row.provider_type,
|
||||
accessorFn: (row) => {
|
||||
const typeMapping: Record<string, string> = {
|
||||
h2h: 'Host To Host',
|
||||
agent: 'Agent'
|
||||
};
|
||||
return typeMapping[row.provider_type] || row.provider_type;
|
||||
},
|
||||
id: 'type',
|
||||
header: ({ column }) => <DataGridColumnHeader title="Type" column={column} />,
|
||||
enableSorting: false,
|
||||
|
||||
Reference in New Issue
Block a user