feat: fatura PDF, hizmet/yazılım atama dosya ekleri
- /print/invoices/[id] sayfası: A4 fatura yazdırma/PDF (AutoPrint + PrintActionBar) - Fatura detayı header'ına PDF butonu eklendi (Yazdır yerine) - Appwrite Storage: entity-attachments bucket (20MB, şifreli) - Appwrite Tables: attachments collection (tenantId, entityType, entityId, fileId, name, size, mimeType) - attachment-actions.ts: fetchAttachmentsAction, uploadAttachmentAction, deleteAttachmentAction - AttachmentsPanel bileşeni: dosya yükleme/listeleme/silme, edit modunda görünür - Hizmet ve yazılım atama form sheet'lerine AttachmentsPanel entegrasyonu - /api/files/[attachmentId]: güvenli proxy indirme (tenant doğrulama + admin key ile Appwrite'a istek)
This commit is contained in:
@@ -28,6 +28,7 @@ import {
|
||||
updateAssignmentAction,
|
||||
} from "@/lib/appwrite/software-actions";
|
||||
import { initialSoftwareState } from "@/lib/appwrite/software-types";
|
||||
import { AttachmentsPanel } from "@/components/attachments-panel";
|
||||
import type { AssignmentRow, CustomerOption, SoftwareOption } from "./types";
|
||||
|
||||
type Props = {
|
||||
@@ -202,6 +203,14 @@ export function AssignmentFormSheet({
|
||||
placeholder="Lisans bilgileri, özel koşullar"
|
||||
/>
|
||||
</div>
|
||||
|
||||
{/* Ekler */}
|
||||
{isEdit && assignment && (
|
||||
<AttachmentsPanel
|
||||
entityType="customer_software"
|
||||
entityId={assignment.id}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
|
||||
<SheetFooter className="border-t bg-muted/30 px-6 pt-4">
|
||||
|
||||
Reference in New Issue
Block a user