2025-06-12 02:34:07 +00:00
|
|
|
<script lang="ts">
|
|
|
|
|
import Modal from '$lib/components/common/Modal.svelte';
|
2025-06-12 17:53:55 +00:00
|
|
|
import { getContext } from 'svelte';
|
2025-06-12 02:34:07 +00:00
|
|
|
const i18n = getContext('i18n');
|
2025-06-25 22:56:08 +00:00
|
|
|
import XMark from '$lib/components/icons/XMark.svelte';
|
2025-06-12 02:34:07 +00:00
|
|
|
|
|
|
|
|
export let show = false;
|
|
|
|
|
export let selectedFeedback = null;
|
|
|
|
|
|
2025-06-12 17:53:55 +00:00
|
|
|
export let onClose: () => void = () => {};
|
|
|
|
|
|
2025-06-12 02:34:07 +00:00
|
|
|
const close = () => {
|
|
|
|
|
show = false;
|
2025-06-12 17:53:55 +00:00
|
|
|
onClose();
|
2025-06-12 02:34:07 +00:00
|
|
|
};
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<Modal size="sm" bind:show>
|
|
|
|
|
{#if selectedFeedback}
|
|
|
|
|
<div>
|
|
|
|
|
<div class="flex justify-between dark:text-gray-300 px-5 pt-4 pb-2">
|
|
|
|
|
<div class="text-lg font-medium self-center">
|
|
|
|
|
{$i18n.t('Feedback Details')}
|
|
|
|
|
</div>
|
|
|
|
|
<button class="self-center" on:click={close} aria-label="Close">
|
2025-06-27 11:44:26 +00:00
|
|
|
<XMark className={'size-5'} />
|
2025-06-12 02:34:07 +00:00
|
|
|
</button>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="flex flex-col md:flex-row w-full px-5 pb-4 md:space-x-4 dark:text-gray-200">
|
|
|
|
|
<div class="flex flex-col w-full">
|
2025-06-20 16:51:40 +00:00
|
|
|
<div class="mb-2 -mx-1">
|
|
|
|
|
{#if selectedFeedback?.data?.tags && selectedFeedback?.data?.tags.length}
|
|
|
|
|
<div class="flex flex-wrap gap-1 mt-1">
|
|
|
|
|
{#each selectedFeedback?.data?.tags as tag}
|
2025-06-20 17:10:56 +00:00
|
|
|
<span class="px-2 py-0.5 rounded-full bg-gray-100 dark:bg-gray-850 text-xs"
|
2025-06-20 16:51:40 +00:00
|
|
|
>{tag}</span
|
|
|
|
|
>
|
|
|
|
|
{/each}
|
|
|
|
|
</div>
|
|
|
|
|
{:else}
|
|
|
|
|
<span>-</span>
|
|
|
|
|
{/if}
|
|
|
|
|
</div>
|
|
|
|
|
|
2025-06-16 05:43:34 +00:00
|
|
|
<div class="flex flex-col w-full mb-2">
|
|
|
|
|
<div class=" mb-1 text-xs text-gray-500">{$i18n.t('Rating')}</div>
|
|
|
|
|
|
2025-06-20 16:51:40 +00:00
|
|
|
<div class="flex-1 text-xs">
|
2025-06-16 05:43:34 +00:00
|
|
|
<span>{selectedFeedback?.data?.details?.rating ?? '-'}</span>
|
|
|
|
|
</div>
|
2025-06-12 02:34:07 +00:00
|
|
|
</div>
|
2025-06-16 05:43:34 +00:00
|
|
|
<div class="flex flex-col w-full mb-2">
|
|
|
|
|
<div class=" mb-1 text-xs text-gray-500">{$i18n.t('Reason')}</div>
|
|
|
|
|
|
2025-06-20 16:51:40 +00:00
|
|
|
<div class="flex-1 text-xs">
|
2025-06-16 05:43:34 +00:00
|
|
|
<span>{selectedFeedback?.data?.reason || '-'}</span>
|
|
|
|
|
</div>
|
2025-06-12 02:34:07 +00:00
|
|
|
</div>
|
2025-06-20 17:10:56 +00:00
|
|
|
|
|
|
|
|
<div class="flex justify-end pt-2">
|
2025-06-12 02:34:07 +00:00
|
|
|
<button
|
|
|
|
|
class="px-3.5 py-1.5 text-sm font-medium bg-black hover:bg-gray-900 text-white dark:bg-white dark:text-black dark:hover:bg-gray-100 transition rounded-full"
|
|
|
|
|
type="button"
|
|
|
|
|
on:click={close}
|
|
|
|
|
>
|
|
|
|
|
{$i18n.t('Close')}
|
|
|
|
|
</button>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
{/if}
|
|
|
|
|
</Modal>
|