Add sync dashboard and date filters

This commit is contained in:
Ruslan Bakiev
2026-04-07 10:25:28 +07:00
parent 5eafdd4e8f
commit 722dbb89cb
7 changed files with 385 additions and 17 deletions

View File

@@ -24,6 +24,12 @@ const availableBalance = computed(() => bonusAccount.value?.availableBalance ??
const canWithdraw = computed(() => availableBalance.value >= 100);
const selectedEntry = computed(() => String(route.query.entry || '').trim());
const rewardCards = [
{ id: 'ozon-3000', store: 'Ozon', title: 'Подарочная карта Ozon', amount: 3000 },
{ id: 'wildberries-4000', store: 'Wildberries', title: 'Подарочная карта Wildberries', amount: 4000 },
{ id: 'mvideo-5000', store: 'М.Видео', title: 'Подарочная карта М.Видео', amount: 5000 },
];
const entryTitle = computed(() => {
if (selectedEntry.value.includes('withdrawal')) {
return 'Вы открыли бонусную программу из уведомления о выводе.';
@@ -115,14 +121,11 @@ async function submitWithdrawal() {
</h1>
<p class="bonus-program-copy">
{{ entryTitle }}
Здесь отдельно живут баланс, начисления, выводы и переходы из бонусных уведомлений.
Здесь отдельно живут история начислений, магазин вознаграждений и выводы.
</p>
</div>
<div class="flex flex-wrap gap-3">
<NuxtLink to="/admin/settings/messages" class="bonus-program-ghost-button">
Message board
</NuxtLink>
<NuxtLink to="/notifications" class="bonus-program-ghost-button">
История уведомлений
</NuxtLink>
@@ -293,6 +296,36 @@ async function submitWithdrawal() {
</div>
</article>
</section>
<article class="bonus-program-panel">
<div class="flex items-center justify-between gap-3">
<div>
<p class="bonus-program-caption">Магазин</p>
<h2 class="mt-2 text-2xl font-black tracking-[-0.04em] text-white">Вознаграждения</h2>
</div>
<span class="rounded-full border border-white/10 bg-white/5 px-3 py-1 text-xs font-semibold uppercase tracking-[0.12em] text-white/55">
{{ rewardCards.length }}
</span>
</div>
<div class="mt-5 grid gap-3 md:grid-cols-3">
<article
v-for="reward in rewardCards"
:key="reward.id"
class="rounded-[24px] border border-white/10 bg-white/[0.04] p-4"
>
<p class="text-xs font-semibold uppercase tracking-[0.14em] text-white/45">
{{ reward.store }}
</p>
<h3 class="mt-3 text-lg font-bold text-white">
{{ reward.title }}
</h3>
<p class="mt-4 text-sm font-semibold text-white/70">
{{ formatMoney(reward.amount) }} бонусов
</p>
</article>
</div>
</article>
</template>
</section>
</template>