feat(plugins): catalog photo slots and receipt preview

SuperAdmin catalog supports three images per plugin and the requests table shows uploaded receipts.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-09-08 14:56:10 +03:30
co-authored by Cursor
parent ca923c7d9b
commit 14e9af2804
3 changed files with 275 additions and 35 deletions
+12 -1
View File
@@ -31,6 +31,7 @@ type RequestRow = {
durationDays: number
finalPriceRials: number
status: 'pending' | 'approved' | 'rejected' | 'cancelled'
receiptUrl?: string | null
createdAt: string
}
@@ -283,6 +284,7 @@ onMounted(() => {
<th>مدت</th>
<th>مبلغ</th>
<th>وضعیت</th>
<th>فیش</th>
<th></th>
</tr>
</thead>
@@ -296,6 +298,15 @@ onMounted(() => {
<td>{{ row.durationDays }} روز</td>
<td>{{ Number(row.finalPriceRials || 0).toLocaleString('fa-IR') }}</td>
<td>{{ statusLabel[row.status] }}</td>
<td>
<a-image
v-if="row.receiptUrl"
:src="row.receiptUrl"
:width="44"
:preview="{ zIndex: 1200 }"
/>
<span v-else>—</span>
</td>
<td>
<template v-if="row.status === 'pending'">
<a-button size="small" type="primary" :loading="actingId === row.id" @click="approve(row)">تأیید</a-button>
@@ -304,7 +315,7 @@ onMounted(() => {
</td>
</tr>
<tr v-if="!requests.length">
<td colspan="6" class="empty-hint">درخواستی نیست</td>
<td colspan="7" class="empty-hint">درخواستی نیست</td>
</tr>
</tbody>
</table>