PdfDragButton komplett entfernt (Plattformgrenze)
Test-Ergebnis: Browser kann einer fremden Desktop-App keine echte lokale Datei zum Anhaengen uebergeben. URL-Drag -> Thunderbird nur Link (0 Bytes, Fehler beim Senden); Datei-Drop in den Text -> nur Dateiname als Text; auf die Anhang-Leiste (Thunderbird/Linux) -> ebenfalls kein echter Anhang; Webmail -> gar nicht moeglich. Entscheidung: Feature raus. Download- und Anzeigen-Button decken den Bedarf zuverlaessig ab. PdfDragButton geloescht, fileUrl()-Token-Param zurueckgebaut. Pentest R131 damit gegenstandslos (kein Drag mehr). Die separaten Copy-Buttons fuer IBAN + Ausweisnummer im Vertrags- formular bleiben erhalten. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -19,7 +19,6 @@ import toast from 'react-hot-toast';
|
||||
import JpgToPdfModal from '../../components/ui/JpgToPdfModal';
|
||||
import { calculateConsumption, calculateCosts, calculateMultiMeterConsumption } from '../../utils/energyCalculations';
|
||||
import CopyButton, { CopyableBlock } from '../../components/ui/CopyButton';
|
||||
import PdfDragButton from '../../components/ui/PdfDragButton';
|
||||
import AutosaveDateInput from '../../components/ui/AutosaveDateInput';
|
||||
import { formatDate } from '../../utils/dateFormat';
|
||||
import { useProviderSettings } from '../../hooks/useProviderSettings';
|
||||
@@ -2652,14 +2651,6 @@ export default function ContractDetail() {
|
||||
{c.bankCard.iban}
|
||||
<CopyButton value={c.bankCard.iban} />
|
||||
</p>
|
||||
{c.bankCard.documentPath && (
|
||||
<div className="mt-1">
|
||||
<PdfDragButton
|
||||
path={c.bankCard.documentPath}
|
||||
filename={`Bankkarte-${c.bankCard.iban}`}
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
{c.bankCard.bankName && <p className="text-gray-500">{c.bankCard.bankName}</p>}
|
||||
{c.bankCard.description && (
|
||||
<p className="text-sm text-gray-600 mt-1 italic whitespace-pre-line">
|
||||
@@ -2675,14 +2666,6 @@ export default function ContractDetail() {
|
||||
<CopyButton value={c.identityDocument.documentNumber} />
|
||||
</p>
|
||||
<p className="text-gray-500">{c.identityDocument.type}</p>
|
||||
{c.identityDocument.documentPath && (
|
||||
<div className="mt-1">
|
||||
<PdfDragButton
|
||||
path={c.identityDocument.documentPath}
|
||||
filename={`Ausweis-${c.identityDocument.documentNumber}`}
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
</Card>
|
||||
)}
|
||||
</div>
|
||||
|
||||
@@ -10,7 +10,6 @@ import Button from '../../components/ui/Button';
|
||||
import Input from '../../components/ui/Input';
|
||||
import Select from '../../components/ui/Select';
|
||||
import CopyButton from '../../components/ui/CopyButton';
|
||||
import PdfDragButton from '../../components/ui/PdfDragButton';
|
||||
import CustomerInfoModal from '../../components/contracts/CustomerInfoModal';
|
||||
import { buildContractLabelParts } from '../../utils/contractLabel';
|
||||
import type { ContractType } from '../../types';
|
||||
@@ -979,12 +978,6 @@ export default function ContractForm() {
|
||||
{selectedBankCard && (
|
||||
<CopyButton value={selectedBankCard.iban} title="IBAN kopieren" />
|
||||
)}
|
||||
{selectedBankCard?.documentPath && (
|
||||
<PdfDragButton
|
||||
path={selectedBankCard.documentPath}
|
||||
filename={`Bankkarte-${selectedBankCard.iban}`}
|
||||
/>
|
||||
)}
|
||||
</span>
|
||||
}
|
||||
{...register('bankCardId')}
|
||||
@@ -1011,12 +1004,6 @@ export default function ContractForm() {
|
||||
{selectedDocument && (
|
||||
<CopyButton value={selectedDocument.documentNumber} title="Ausweisnummer kopieren" />
|
||||
)}
|
||||
{selectedDocument?.documentPath && (
|
||||
<PdfDragButton
|
||||
path={selectedDocument.documentPath}
|
||||
filename={`Ausweis-${selectedDocument.documentNumber}`}
|
||||
/>
|
||||
)}
|
||||
</span>
|
||||
}
|
||||
{...register('identityDocumentId')}
|
||||
|
||||
@@ -18,7 +18,6 @@ import FileUpload from '../../components/ui/FileUpload';
|
||||
import { Edit, Plus, Trash2, MapPin, CreditCard, FileText, Gauge, Eye, EyeOff, Download, Globe, UserPlus, X, Search, Mail, Copy, Check, ChevronDown, ChevronRight, Info, Shield, ShieldCheck, ShieldX, ShieldAlert, Lock, ArrowLeft, Cake, RefreshCw, ExternalLink, Images } from 'lucide-react';
|
||||
import JpgToPdfModal from '../../components/ui/JpgToPdfModal';
|
||||
import CopyButton, { CopyableBlock } from '../../components/ui/CopyButton';
|
||||
import PdfDragButton from '../../components/ui/PdfDragButton';
|
||||
import BirthdayManagementModal from '../../components/BirthdayManagementModal';
|
||||
import { formatDate } from '../../utils/dateFormat';
|
||||
import { getContractTypeInfo } from '../../utils/contractInfo';
|
||||
@@ -1003,10 +1002,6 @@ function BankCardsTab({
|
||||
<Download className="w-4 h-4" />
|
||||
Download
|
||||
</a>
|
||||
<PdfDragButton
|
||||
path={card.documentPath}
|
||||
filename={`Bankkarte-${card.iban}`}
|
||||
/>
|
||||
{canEdit && (
|
||||
<>
|
||||
<FileUpload
|
||||
@@ -1243,10 +1238,6 @@ function DocumentsTab({
|
||||
<Download className="w-4 h-4" />
|
||||
Download
|
||||
</a>
|
||||
<PdfDragButton
|
||||
path={doc.documentPath}
|
||||
filename={`Ausweis-${doc.documentNumber}`}
|
||||
/>
|
||||
{canEdit && (
|
||||
<>
|
||||
<FileUpload
|
||||
|
||||
Reference in New Issue
Block a user