🚀 مُصادَق: تحديث برمجي جديد 2026-05-03 14:27
This commit is contained in:
@@ -74,6 +74,11 @@ $router->addRoute('POST', '/api/v1/invoices/{id}/submit', [
|
||||
'handler' => [\App\Modules\Invoices\InvoiceController::class, 'submit']
|
||||
]);
|
||||
|
||||
$router->addRoute('GET', '/api/v1/invoices/{id}/file', [
|
||||
'middleware' => [\App\Middleware\AuthMiddleware::class],
|
||||
'handler' => [\App\Modules\Invoices\InvoiceController::class, 'downloadFile']
|
||||
]);
|
||||
|
||||
// ══ Subscriptions ═════════════════════════════════════════════════
|
||||
$router->addRoute('GET', '/api/v1/subscriptions/me', [
|
||||
'middleware' => [\App\Middleware\AuthMiddleware::class, \App\Middleware\TenantMiddleware::class],
|
||||
|
||||
@@ -241,9 +241,9 @@
|
||||
document.getElementById('content').innerHTML = `
|
||||
<div class="flex flex-col lg:flex-row gap-10 animate-in">
|
||||
<div class="lg:w-1/2 glass rounded-[3rem] h-[750px] overflow-hidden flex flex-col">
|
||||
<div class="p-5 bg-white/5 border-b border-white/5 flex justify-between text-sm"><span>المستند الأصلي</span><a href="${i.original_file_path}" target="_blank" class="text-primary">فتح في نافذة جديدة</a></div>
|
||||
<div class="p-5 bg-white/5 border-b border-white/5 flex justify-between text-sm"><span>المستند الأصلي</span><a href="index.php?route=/api/v1/invoices/${i.id}/file" target="_blank" class="text-primary">فتح في نافذة جديدة</a></div>
|
||||
<div class="flex-1 bg-black/50 p-6 flex items-center justify-center">
|
||||
${i.original_file_path.endsWith('.pdf') ? `<iframe src="${i.original_file_path}" class="w-full h-full rounded-2xl"></iframe>` : `<img src="${i.original_file_path}" class="max-w-full max-h-full rounded-2xl shadow-2xl">`}
|
||||
${i.original_file_path.endsWith('.pdf') ? `<iframe src="index.php?route=/api/v1/invoices/${i.id}/file" class="w-full h-full rounded-2xl"></iframe>` : `<img src="index.php?route=/api/v1/invoices/${i.id}/file" class="max-w-full max-h-full rounded-2xl shadow-2xl">`}
|
||||
</div>
|
||||
</div>
|
||||
<div class="lg:w-1/2 glass p-10 rounded-[3rem] overflow-y-auto custom-scrollbar">
|
||||
|
||||
Reference in New Issue
Block a user