u
This commit is contained in:
@@ -196,7 +196,7 @@ class KreditorTable extends Component {
|
||||
}, 100);
|
||||
|
||||
try {
|
||||
const response = await this.authService.apiCall(`/admin/kreditoren/${kreditor.id}`, {
|
||||
const response = await this.authService.apiCall(`/admin/kreditoren/${itemToDelete.id}`, {
|
||||
method: 'DELETE',
|
||||
});
|
||||
|
||||
|
||||
@@ -350,7 +350,15 @@ const DocumentRenderer = (params) => {
|
||||
aria-describedby="document-dialog-content"
|
||||
>
|
||||
<DialogTitle id="document-dialog-title">
|
||||
{hasDocuments ? `Dokumente (${totalCount})` : 'Dokumentinformationen'}
|
||||
{(() => {
|
||||
const beschreibung = params?.data?.description || '';
|
||||
const beschreibungTrimmed = beschreibung ? String(beschreibung).slice(0, 120) : '';
|
||||
if (hasDocuments) {
|
||||
return `Dokumente (${totalCount})${beschreibungTrimmed ? ' — ' + beschreibungTrimmed : ''}`;
|
||||
}
|
||||
// No documents: still include description next to "Dokumentinformationen"
|
||||
return `Dokumentinformationen${beschreibungTrimmed ? ' — ' + beschreibungTrimmed : ''}`;
|
||||
})()}
|
||||
</DialogTitle>
|
||||
<DialogContent sx={{ p: 0 }} id="document-dialog-content">
|
||||
{error && (
|
||||
@@ -367,13 +375,13 @@ const DocumentRenderer = (params) => {
|
||||
sx={{
|
||||
color: !params.data['Kontonummer/IBAN']
|
||||
? 'text.secondary'
|
||||
: params.data.hasKreditor
|
||||
: (params.data.hasKreditor && params.data.kreditor && !params.data.kreditor.is_banking)
|
||||
? 'success.main'
|
||||
: 'warning.main',
|
||||
'&.Mui-selected': {
|
||||
color: !params.data['Kontonummer/IBAN']
|
||||
? 'text.secondary'
|
||||
: params.data.hasKreditor
|
||||
: (params.data.hasKreditor && params.data.kreditor && !params.data.kreditor.is_banking)
|
||||
? 'success.main'
|
||||
: 'warning.main',
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user