Require review before Tahesab wallet sync and harden accounting admin UX.

Single-customer and row sync preview balances with documents before overwrite/keep; bulk sync keeps confirm. Also ship Zarin wallet sync actions, field help, and get_user cache improvements.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-08-30 21:18:26 +03:30
co-authored by Cursor
parent 04cc03fe25
commit 1c4b2d4435
60 changed files with 2464 additions and 552 deletions
@@ -1,31 +1,35 @@
<template>
<section v-if="visible" class="colleague-accounts">
<header class="colleague-accounts__head">
<div>
<h3 class="colleague-accounts__title">کد حسابداری معامله با همکار</h3>
<p class="colleague-accounts__desc">
برای هر خرید/فروشی که نزد همکار ثبت می‌شود، سند روی این کد حساب در سیستم حسابداری فعال زده می‌شود.
</p>
</div>
<BaseButton type="primary" :loading="saving" @click="save">
ذخیره کد
</BaseButton>
</header>
<section
v-if="visible"
class="colleague-accounts w-full flex flex-col gap-2.5 rounded-lg border border-base p-2.5 sm:grid sm:grid-cols-2 sm:items-end sm:gap-3"
>
<div class="min-w-0">
<h3 class="m-0 inline-flex items-center gap-1.5 text-sm font-600" style="color: var(--admin-text)">
کد حسابداری معامله با همکار
<AdminFieldHelp :text="colleagueAccountingCodeHelp" size="sm" />
</h3>
<p class="m-0 mt-0.5 text-xs leading-5" style="color: var(--admin-text-secondary)">
سند خرید/فروش پوشش‌شده روی این کد در حسابداری فعال ثبت می‌شود.
</p>
</div>
<label
v-if="activeField"
class="colleague-accounts__field colleague-accounts__field--active"
>
<span class="colleague-accounts__label">
<label v-if="activeField" class="m-0 flex w-full min-w-0 flex-col gap-1">
<span class="inline-flex items-center gap-1.5 text-xs font-600" style="color: var(--admin-text)">
{{ activeField.label }}
<span class="colleague-accounts__badge">فعال</span>
</span>
<a-input
v-model:value="values[activeField.key]"
:placeholder="activeField.placeholder"
allow-clear
class="colleague-accounts__input"
/>
<div class="flex w-full min-w-0 items-center gap-2">
<a-input
v-model:value="values[activeField.key]"
:placeholder="activeField.placeholder"
allow-clear
size="small"
class="min-w-0 flex-1"
/>
<BaseButton type="primary" size="small" class="shrink-0" :loading="saving" @click="save">
ذخیره
</BaseButton>
</div>
</label>
</section>
</template>
@@ -35,6 +39,8 @@ import { computed, onMounted, reactive, ref } from 'vue'
import { message } from 'ant-design-vue'
import { getConfiguration, setConfiguration } from '@/api/configuration'
import type { Const } from '@/model/configuration'
import { colleagueAccountingCodeHelp } from '@/utils/adminHelpCopy'
import AdminFieldHelp from '@/components/AdminFieldHelp.vue'
import {
accountingProviderSetting,
initWalletSettingsFromApi,
@@ -169,73 +175,14 @@ onMounted(() => {
})
</script>
<style scoped lang="less">
<style scoped>
.colleague-accounts {
margin-bottom: 1rem;
padding: 1rem 1.125rem;
border: 1px solid var(--admin-border, rgba(255, 255, 255, 0.12));
border-radius: 14px;
background: var(--admin-bg-elevated, rgba(28, 28, 34, 0.92));
}
.colleague-accounts__head {
display: flex;
flex-wrap: wrap;
align-items: flex-start;
justify-content: space-between;
gap: 0.75rem;
margin-bottom: 1rem;
}
.colleague-accounts__title {
margin: 0;
font-size: 0.9375rem;
font-weight: 700;
color: var(--admin-text, #fff);
}
.colleague-accounts__desc {
margin: 0.35rem 0 0;
max-width: 42rem;
font-size: 0.75rem;
line-height: 1.7;
color: var(--admin-text-secondary, rgba(255, 255, 255, 0.65));
}
.colleague-accounts__field {
display: flex;
max-width: 28rem;
min-width: 0;
flex-direction: column;
gap: 0.4rem;
padding: 0.75rem;
border: 1px solid color-mix(in srgb, #d4af37 55%, transparent);
border-radius: 12px;
background: color-mix(in srgb, var(--admin-bg-muted, #1a1a1f) 80%, transparent);
box-shadow: inset 0 0 0 1px color-mix(in srgb, #d4af37 18%, transparent);
}
.colleague-accounts__label {
display: inline-flex;
align-items: center;
gap: 0.4rem;
font-size: 0.8125rem;
font-weight: 600;
color: var(--admin-text, #fff);
background: var(--admin-bg-surface, var(--admin-bg-elevated, rgba(28, 28, 34, 0.92)));
}
.colleague-accounts__badge {
display: inline-flex;
align-items: center;
padding: 0.1rem 0.4rem;
border-radius: 999px;
@apply inline-flex items-center rounded-full px-1.5 text-10px font-700;
background: rgba(212, 175, 55, 0.18);
color: #d4af37;
font-size: 0.6875rem;
font-weight: 700;
}
.colleague-accounts__input {
width: 100%;
}
</style>
@@ -1,6 +1,6 @@
<template>
<div class="min-w-0 w-full max-w-full overflow-x-hidden">
<BasicShowContext title="تراکنش با اپلیکیشن همکار">
<BasicShowContext title="تراکنش با اپلیکیشن همکار" :help="colleagueOrdersPageIntro">
<div class="min-w-0 w-full max-w-full overflow-x-auto">
<BaseTable v-bind="tblProps" @register="submit" />
</div>
@@ -14,6 +14,7 @@ import { getColleagueOrderTable } from '@/api/order'
import { getColleagueOrderColumns } from '@/pages/menuPages/colleagueOrders/hooks/colleagueOrderColumns'
import useBaseTable from '@core/components/BaseTable/hooks/useBaseTable'
import type { TableInput } from '@core/type/baseTable'
import { colleagueOrdersPageIntro } from '@/utils/adminHelpCopy'
const [submit, reload] = useBaseTable()