changes of niazi
This commit is contained in:
@@ -36,6 +36,22 @@ export function isSoroushgoldProject() {
|
||||
return getConfigApp('name') === 'soroushgold'
|
||||
}
|
||||
|
||||
export function isNiazitalaProject() {
|
||||
return getConfigApp('name') === 'niazitala'
|
||||
}
|
||||
|
||||
const DEFAULT_WALLET_DEPOSIT_QUICK_AMOUNTS_RIAL = [10_000_000, 50_000_000, 100_000_000] as const
|
||||
|
||||
/** niazitala: 5 / 10 / 15 میلیون تومان — ذخیره و نمایش به ریال */
|
||||
const NIAZITALA_WALLET_DEPOSIT_QUICK_AMOUNTS_RIAL = [50_000_000, 100_000_000, 150_000_000] as const
|
||||
|
||||
export function getWalletDepositQuickAmountsRial(): readonly number[] {
|
||||
if (isNiazitalaProject()) {
|
||||
return NIAZITALA_WALLET_DEPOSIT_QUICK_AMOUNTS_RIAL
|
||||
}
|
||||
return DEFAULT_WALLET_DEPOSIT_QUICK_AMOUNTS_RIAL
|
||||
}
|
||||
|
||||
export function getBoursecuTransactionsIcon() {
|
||||
return boursecuTransactionsIcon
|
||||
}
|
||||
|
||||
@@ -131,8 +131,8 @@ const rootClass = computed(() => [
|
||||
|
||||
.portfolio-overview__total {
|
||||
margin: 4px 0 0;
|
||||
font-size: 1.65rem;
|
||||
font-weight: 800;
|
||||
font-size: 2rem;
|
||||
// font-weight: 800;
|
||||
line-height: 1.2;
|
||||
letter-spacing: -0.02em;
|
||||
}
|
||||
|
||||
@@ -12,7 +12,12 @@ import { message } from 'ant-design-vue'
|
||||
import type { Card } from '@/models/wallet'
|
||||
import { useUserStore } from '@/store/userStore'
|
||||
import { useConfigStore } from '@/store/configStore'
|
||||
import { getProjectBaleContactLink, isBazretalaProject, isBoursecuProject } from '@/utils/config'
|
||||
import {
|
||||
getProjectBaleContactLink,
|
||||
getWalletDepositQuickAmountsRial,
|
||||
isBazretalaProject,
|
||||
isBoursecuProject,
|
||||
} from '@/utils/config'
|
||||
import { useDesktopBreakpoint } from '@/layouts/composables/useAppLayout'
|
||||
import {
|
||||
buildDepositSmsUrl,
|
||||
@@ -54,6 +59,7 @@ export interface WalletPageContext {
|
||||
supportMessengerText: ReturnType<typeof computed<string>>
|
||||
depositGuideSupportLink: ReturnType<typeof computed<string>>
|
||||
depositSmsSupportLink: ReturnType<typeof computed<string>>
|
||||
depositQuickAmounts: ReturnType<typeof computed<readonly number[]>>
|
||||
isBazretalaProject: typeof isBazretalaProject
|
||||
usePriceWithoutType: typeof usePriceWithoutType
|
||||
formatCashWalletBalanceText: typeof formatCashWalletBalanceText
|
||||
@@ -92,6 +98,8 @@ export function useWalletPage() {
|
||||
() => supportMessengerSettings.value.messengerText || DEFAULT_SUPPORT_MESSENGER_TEXT,
|
||||
)
|
||||
|
||||
const depositQuickAmounts = computed(() => getWalletDepositQuickAmountsRial())
|
||||
|
||||
const depositGuideSupportLink = computed(() => {
|
||||
if (config.config?.name === 'garoosi' || isBazretalaProject()) {
|
||||
return getProjectBaleContactLink()
|
||||
@@ -288,6 +296,7 @@ export function useWalletPage() {
|
||||
supportMessengerText,
|
||||
depositGuideSupportLink,
|
||||
depositSmsSupportLink,
|
||||
depositQuickAmounts,
|
||||
isBazretalaProject,
|
||||
usePriceWithoutType,
|
||||
formatCashWalletBalanceText,
|
||||
|
||||
@@ -78,14 +78,14 @@
|
||||
حداقل مبلغ واریزی 100 هزار تومان می باشد.
|
||||
</p>
|
||||
<div class="dwallet-quick-amounts">
|
||||
<button type="button" class="dwallet-quick-amounts__btn" @click="form.value = 10000000">
|
||||
{{ usePriceWithoutType(10000000) }}
|
||||
</button>
|
||||
<button type="button" class="dwallet-quick-amounts__btn" @click="form.value = 50000000">
|
||||
{{ usePriceWithoutType(50000000) }}
|
||||
</button>
|
||||
<button type="button" class="dwallet-quick-amounts__btn" @click="form.value = 100000000">
|
||||
{{ usePriceWithoutType(100000000) }}
|
||||
<button
|
||||
v-for="amount in depositQuickAmounts"
|
||||
:key="amount"
|
||||
type="button"
|
||||
class="dwallet-quick-amounts__btn"
|
||||
@click="form.value = amount"
|
||||
>
|
||||
{{ usePriceWithoutType(amount) }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -212,6 +212,7 @@ const {
|
||||
loading,
|
||||
loadingMore,
|
||||
desktopDepositScrollEl,
|
||||
depositQuickAmounts,
|
||||
isBazretalaProject,
|
||||
usePriceWithoutType,
|
||||
formatCashWalletBalanceText,
|
||||
|
||||
@@ -82,14 +82,13 @@
|
||||
حداقل مبلغ واریزی 100 هزار تومان می باشد.
|
||||
</div>
|
||||
<div class="flex gap-2">
|
||||
<BasicButton class="w-full font-bold !px-1" @click="form.value = 10000000">
|
||||
{{ usePriceWithoutType(10000000) }}
|
||||
</BasicButton>
|
||||
<BasicButton class="w-full font-bold !px-1" @click="form.value = 50000000">
|
||||
{{ usePriceWithoutType(50000000) }}
|
||||
</BasicButton>
|
||||
<BasicButton class="w-full font-bold !px-1" @click="form.value = 100000000">
|
||||
{{ usePriceWithoutType(100000000) }}
|
||||
<BasicButton
|
||||
v-for="amount in depositQuickAmounts"
|
||||
:key="amount"
|
||||
class="w-full font-bold !px-1"
|
||||
@click="form.value = amount"
|
||||
>
|
||||
{{ usePriceWithoutType(amount) }}
|
||||
</BasicButton>
|
||||
</div>
|
||||
</div>
|
||||
@@ -197,6 +196,7 @@ const {
|
||||
loading,
|
||||
loadingMore,
|
||||
mobileDepositScrollEl,
|
||||
depositQuickAmounts,
|
||||
isBazretalaProject,
|
||||
usePriceWithoutType,
|
||||
formatCashWalletBalanceText,
|
||||
|
||||
Reference in New Issue
Block a user