Update: 2026-05-04 02:24:10

This commit is contained in:
Hamza-Ayed
2026-05-04 02:24:10 +03:00
parent 3e9d380e6d
commit e704ba127c
3 changed files with 27 additions and 11 deletions

View File

@@ -145,14 +145,14 @@
<div class="w-1/2 bg-black/40 border-l border-gray-800 flex flex-col relative">
<div class="p-4 border-b border-gray-800 flex justify-between items-center bg-gray-950/50">
<span class="text-xs font-bold text-gray-500 uppercase tracking-widest">معاينة المستند الأصلي</span>
<a :href="currentInvoice?.file_url" target="_blank" class="text-[10px] bg-gray-800 px-3 py-1 rounded hover:bg-gray-700 transition">تحميل الملف 📥</a>
<a :href="currentInvoice?.file_url + '&token=' + token()" target="_blank" class="text-[10px] bg-gray-800 px-3 py-1 rounded hover:bg-gray-700 transition">تحميل الملف 📥</a>
</div>
<div class="flex-1 overflow-auto p-4 flex items-start justify-center scrollbar-hide">
<template x-if="currentInvoice?.original_file_path?.toLowerCase().endsWith('.pdf')">
<iframe :src="currentInvoice?.file_url" class="w-full h-full rounded-lg" frameborder="0"></iframe>
<iframe :src="currentInvoice?.file_url + '&token=' + token()" class="w-full h-full rounded-lg" frameborder="0"></iframe>
</template>
<template x-if="!currentInvoice?.original_file_path?.toLowerCase().endsWith('.pdf')">
<img :src="currentInvoice?.file_url" @error="$el.src='https://placehold.co/600x800?text=Error+Loading+Image'" class="max-w-full rounded-lg shadow-2xl border border-white/5">
<img :src="currentInvoice?.file_url + '&token=' + token()" @error="$el.src='https://placehold.co/600x800?text=Error+Loading+Image'" class="max-w-full rounded-lg shadow-2xl border border-white/5">
</template>
</div>
</div>