Allows admins to remove photos
This commit is contained in:
@@ -122,7 +122,7 @@
|
||||
<StatusBadge status={photo.photoStatus} />
|
||||
</div>
|
||||
{#if photo.photoStatus === 'SUBMITTED'}
|
||||
<div class="flex gap-2">
|
||||
<div class="flex gap-2 mb-2">
|
||||
<button
|
||||
class="btn btn-success btn-sm flex-1"
|
||||
onclick={() => review(photo, 'APPROVED')}
|
||||
@@ -139,14 +139,27 @@
|
||||
Reject
|
||||
</button>
|
||||
</div>
|
||||
<button class="btn btn-ghost btn-sm w-full text-base-content/50" onclick={() => review(photo, 'REMOVED')} disabled={reviewing === photo.id}>
|
||||
Remove
|
||||
</button>
|
||||
{:else if photo.photoStatus === 'APPROVED'}
|
||||
<button class="btn btn-outline btn-error btn-sm w-full" onclick={() => review(photo, 'REJECTED')} disabled={reviewing === photo.id}>
|
||||
Revoke Approval
|
||||
</button>
|
||||
<div class="flex gap-2">
|
||||
<button class="btn btn-outline btn-error btn-sm flex-1" onclick={() => review(photo, 'REJECTED')} disabled={reviewing === photo.id}>
|
||||
Revoke Approval
|
||||
</button>
|
||||
<button class="btn btn-ghost btn-sm text-base-content/50" onclick={() => review(photo, 'REMOVED')} disabled={reviewing === photo.id}>
|
||||
Remove
|
||||
</button>
|
||||
</div>
|
||||
{:else if photo.photoStatus === 'REJECTED'}
|
||||
<button class="btn btn-outline btn-success btn-sm w-full" onclick={() => review(photo, 'APPROVED')} disabled={reviewing === photo.id}>
|
||||
Approve Instead
|
||||
</button>
|
||||
<div class="flex gap-2">
|
||||
<button class="btn btn-outline btn-success btn-sm flex-1" onclick={() => review(photo, 'APPROVED')} disabled={reviewing === photo.id}>
|
||||
Approve Instead
|
||||
</button>
|
||||
<button class="btn btn-ghost btn-sm text-base-content/50" onclick={() => review(photo, 'REMOVED')} disabled={reviewing === photo.id}>
|
||||
Remove
|
||||
</button>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user