Files
boursecu_admin/src/pages/menuPages/customers/base/components/PargarWalletSyncAction.vue
T
2026-07-25 16:47:12 +03:30

95 lines
2.5 KiB
Vue
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<template>
<div class="pargar-wallet-sync">
<div class="pargar-wallet-sync__head">
<div class="pargar-wallet-sync__icon" aria-hidden="true">
<Icon icon="vuesax-linear:refresh-circle" :size="18" color="var(--admin-primary, #10913A)" />
</div>
<div class="pargar-wallet-sync__copy min-w-0 flex-1">
<p class="pargar-wallet-sync__title">همگام‌سازی با پرگار</p>
<p class="pargar-wallet-sync__hint">
{{
canSync
? 'ریال و طلای کیف اصلی را با ماندهٔ پرگار یکی می‌کند — فقط وقتی همهٔ اسناد در پرگار ثبت شده باشند'
: 'ابتدا کد حسابداری پرگار را برای این مشتری ثبت کنید'
}}
</p>
</div>
</div>
<a-button
type="primary"
block
size="small"
class="pargar-wallet-sync__btn"
:loading="loading"
:disabled="!canSync || loading"
@click="$emit('sync', false)"
>
همگام‌سازی مانده از پرگار
</a-button>
<a-popconfirm
title="ماندهٔ پرگار بدون بررسی اعتبار روی کیف مشتری نوشته شود؟"
ok-text="بله، اعمال کن"
cancel-text="انصراف"
:disabled="!canSync || loading"
@confirm="$emit('sync', true)"
>
<a-button
type="link"
size="small"
block
danger
class="pargar-wallet-sync__force"
:disabled="!canSync || loading"
>
اعمال اجباری مانده
</a-button>
</a-popconfirm>
</div>
</template>
<script setup lang="ts">
import Icon from '@core/components/BaseIcon/src/Icon.vue'
defineProps<{
loading?: boolean
canSync?: boolean
}>()
defineEmits<{
(e: 'sync', force: boolean): void
}>()
</script>
<style scoped>
.pargar-wallet-sync {
@apply mb-2.5 rounded-xl border border-base p-2.5;
background: var(--admin-surface-muted, var(--admin-bg-muted, #f8fafc));
}
.pargar-wallet-sync__head {
@apply mb-2.5 flex items-start gap-2;
}
.pargar-wallet-sync__icon {
@apply flex h-8 w-8 shrink-0 items-center justify-center rounded-lg bg-gray-50;
}
.pargar-wallet-sync__title {
@apply m-0 text-sm font-700;
color: var(--admin-text, inherit);
}
.pargar-wallet-sync__hint {
@apply m-0 mt-0.5 text-xs leading-5;
color: var(--admin-text-secondary, #6b7280);
}
.pargar-wallet-sync__btn {
@apply font-600;
}
.pargar-wallet-sync__force {
@apply mt-1 text-xs;
}
</style>