Compare commits

...
19 Commits
Author SHA1 Message Date
safavimohadeseh78 21472823b4 . 2026-11-11 11:10:58 +03:30
safavimohadeseh78andCursor 7e6f1603a2 fix(user): show the identity modal again for new accounts
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-11-10 18:41:43 +03:30
safavimohadeseh78andCursor 2296d36eed fix(user): drop the KYC route lock so every menu stays open
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-11-10 17:08:36 +03:30
safavimohadeseh78 b03808c442 fix: resolve BasicIcon setAttribute crash and use valid icon name in RequiredKycModal 2026-11-10 15:24:52 +03:30
safavimohadeseh78 cec78883a2 fix: use BasicModal with v-model:visible instead of a-modal open prop for Ant Design Vue 3 in RequiredKycModal 2026-11-10 15:12:32 +03:30
safavimohadeseh78 76bd8c0666 chore: update components.d.ts 2026-11-10 14:34:05 +03:30
safavimohadeseh78 744065cd12 feat: streamline KYC onboarding with required modal navigation, auto open edit sheet, and instant Jibit verification 2026-11-10 14:28:32 +03:30
safavimohadeseh78andCursor d6a2caffe0 fix(user): register dialog, KYC modal, and home loading gaps
Repair gift-card register success modal text, enforce KYC with correct identity checks, and show skeleton/fallback while home layout loads.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-11-10 11:48:28 +03:30
safavimohadeseh78andCursor 2977b479dd feat(user): gift card FAB, menu order, wallet deposit status
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-11-09 11:25:42 +03:30
safavimohadeseh78 036184c68b feat: add deposit identifier, tip note, and receipt upload in deposit guide modal 2026-11-08 13:26:54 +03:30
safavimohadeseh78 cabce85e11 fix text 2026-11-07 13:21:09 +03:30
safavimohadeseh78 3036324509 Align mobile products storeClosed condition with desktop 2026-11-07 12:37:00 +03:30
safavimohadeseh78 187fda391f feat: remove commission word and calculations from user app 2026-11-07 12:24:36 +03:30
mohmdsdgandCursor 0547b9ebaa fix(user): stop Pinia stores from running before the app boots
Calling useStore at import time crashed startup, and the dev service worker was registered as a classic script.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-11-06 11:42:23 +03:30
safavimohadeseh78 0f50ec315c feat: add required kyc blocking modal and fix copper asset units to kilogram 2026-11-05 17:17:29 +03:30
safavimohadeseh78andCursor ae01f6c8d6 fix(user): referral register links and iPhone login scroll
Use register=true in invite URLs and adjust mobile login layout so the signup button stays reachable on iOS.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-11-04 12:28:46 +03:30
safavimohadeseh78andCursor 5596fc75d0 feat(quotes): show world copper, dollar, ton, and kilo on home
Add assets chart hover so the portfolio line shows the value under the pointer.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-11-03 19:57:39 +03:30
safavimohadeseh78andCursor c21738950d feat(convert): show history and let customers edit pending requests
Desktop history sits beside the form. Pending requests can be updated or deleted, and the shared wallet surface drops its extra border and padding.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-11-03 13:04:09 +03:30
safavimohadeseh78andCursor 47d4fb44df fix(user): keep the chosen alert product and split convert weight across both wires
Alerts store the selected product instead of falling back to gold, and the convert sliders turn the chosen asset amount into complementary 1.5 and 2.5 rings.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-11-02 18:20:13 +03:30
64 changed files with 2265 additions and 915 deletions
@@ -1,8 +1,17 @@
# یادداشت‌های یادگیری — abshode-domain-lookup
- 2026-11-10 | مدال احراز کاربر جدید | `RequiredKycModal.vue` | شرط نمایش اشتباهی همیشه false بود؛ برای is_legal=0 دوباره باز می‌شود، قفل مسیر در setupRouter نیست
- 2026-11-10 | قفل منو بعد از احراز | `setupRouter.ts` + `RequiredKycModal.vue` | گارد فقط home/user و مدال سراسری برداشته شد؛ احراز روی معامله/واریز/هدیه ماند
- 2026-11-10 | مدال موفقیت ثبت‌نام خالی | `DialogVantOneButton.vue` | تم لاگین `color:#fff`؛ بدون teleport متن سفید روی دیالوگ سفید — مثل `DialogVant` با teleport+رنگ تیره
- 2026-11-10 | خانه خالی بدون KYC | `RequiredKycModal` + `HomeLayoutRenderer` | v-model:open روی computed فقط‌خواندنی؛ تشخیص احراز با `isCustomerIdentityVerified`؛ skeleton هنگام lazy layout
فرمت هر خط:
- YYYY-MM-DD | موضوع | مسیر فایل(ها) | نکتهٔ ۱ خطی
- 2026-11-09 | FAB ثبت کارت هدیه | `App.vue` `#gift-card-button` | مثل پشتیبانی؛ `has_page_gift_card` + لاگین؛ کلیک → `giftCard`؛ موقعیت پیش‌فرض بالای دکمه پشتیبانی
- 2026-11-09 | ترتیب منوی کاربر | `useUserPage.ts` `menuActions` | موبایل+دسکتاپ یکسان؛ اول giftCard… بعد password؛ خروج جدا؛ هشدار قیمت دیگر فقط موبایل نیست
- 2026-11-09 | وضعیت تاریخچه واریز کیف پول | `wallet/components/Item.vue` + `resolveTransactionStatusLabel` | قبلاً فقط `transaction[0]` → ناموفق؛ واریز pending باید «در انتظار تایید» مثل تب تراکنش‌ها
- 2026-10-25 | انتخاب روش واریز | `WalletDepositMethodModal.vue` بعد از دکمهٔ واحد واریز | آنی = `INSTANT_DEPOSIT_PAYMENT_URL`؛ حساب = مودال کارت/شبا
- 2026-10-22 | addon اینپوت | `assets/css/main.less` | پس‌زمینه addon = secondary تم، نه primary (سبز tenant)
- 2026-10-21 | نمودار خانه = لندینگ | `LandingLiveChartMain.vue` + `useLandingLiveChart` + `zaarboxPriceHistory`؛ جایگزین `PriceChart` در PriceChartSection/DesktopChart* | همان `dlanding-live__main` SVG؛ داده از zaarbox + `/api/price/last`
@@ -57,4 +66,17 @@
- 2026-11-01 | جای واحد و عدد در تبدیل | `CopperConvertCalculator.vue` + `useCopperConvertPage.ts` | ریال/کیلو/عدد با `bdi` داخل `measure` قبل از عدد؛ باکس مقدار `dir=ltr`
- 2026-11-01 | ماشین‌حساب اجرت/سود/مالیات | `components/GoldDayCalculatorModal.vue` | اجرت ساخت مفتول؛ سود مورد انتظار جدا؛ مالیات ارزش افزوده روی (هزینه+اجرت+سود)
- 2026-11-01 | پلیس‌هولدر هشدار قیمت | user `priceTrigger/components/PriceTriggerForm.vue` + admin `priceTriggers/components/PriceTriggerEditorFormBody.vue` | «آبشده، سکه، نقره و ...» → «کاتد مس، مفتول مس و...»
- 2026-11-02 | هشدار کاتد→طلا | user `priceTrigger/` + `BasicSelect.vue` + server `Customer/PriceTriggerController.php` | شناسه عددی محصول ارسال شود؛ fallback عنوان «طلا» نباشد. محصول پیش‌فرض const برابر id=1 است
- 2026-11-02 | زبانه تبدیل کشیدنی | `convert/components/CopperConvertCalculator.vue` | `dragHandleOnly` در capture؛ لمس ریل مقدار را جابه‌جا نمی‌کند، فقط کشیدن دستگیره
- 2026-11-02 | سه زبانه تبدیل از اول | همان `CopperConvertCalculator.vue` | زبانه ۱.۵ و ۲.۵ دیگر پشت `remainderAmount > 0` نیستند؛ زیر زبانه مقدار، قبل از نتیجه
- 2026-11-02 | زبانه سیم مکمل | `useCopperConvertPage.ts` | بودجه = ارزش مقدار انتخاب‌شده؛ نصف به ۱.۵ و بقیه به ۲.۵؛ جابه‌جایی یکی دیگری را پر می‌کند
- 2026-11-01 | تاریخچه برداشت کیف پول | `wallet/mobile/MobileWalletView.vue` + `desktop/DesktopWalletView.vue` + `useWalletPageData.ts` | `walletWithdrawItems` از قبل لود می‌شد؛ زیر راهنمای برداشت و زیر حساب‌های دسکتاپ نشان داده می‌شود
- 2026-11-03 | تاریخچه تبدیل کاربر | `convert/components/CopperConvertHistory.vue` + `useCopperConvertPage.ts` + سرور `Customer/CopperConvertRequestController@index` | GET `/customer/copper-convert-request` فقط ردیف‌های همان مشتری؛ زیر فرم موبایل و دسکتاپ
- 2026-11-03 | ویرایش/حذف تبدیل در انتظار | همان تاریخچه + `CopperConvertRequestService::update/remove` | فقط status=pending؛ ویرایش فرم را با همان حلقه‌ها پر می‌کند و PUT می‌زند
- 2026-11-03 | چیدمان دسکتاپ تبدیل | `convert/desktop/DesktopConvertView.vue` | مثل کیف پول: `dwallet-grid`؛ فرم راست، تاریخچه چپ با `variant=side`
- 2026-11-03 | مداد ویرایش تبدیل | `convert/components/CopperConvertHistory.vue` | فقط pending؛ آیکون `vuesax-linear:edit` کنار وضعیت، همان `beginEdit`
- 2026-11-03 | چهار قیمت هیرو خانه | `home/desktop/components/DesktopLivePrice.vue` + سرور `ZaarboxPriceService::copperDollarReferences` | مس جهانی=کلید `basemetal_london_copper`، دلار آزاد=`tgju_usd`؛ تن=ضرب، کیلو=تقسیم بر ۱۰۰۰
- 2026-11-03 | چهار قیمت موبایل خانه | `home/components/CurrentPrice.vue` + `composables/useHomeQuoteRows.ts` | همان چهار ردیف دسکتاپ؛ منطق مشترک در useHomeQuoteRows
- 2026-11-03 | هاور نمودار دارایی | `assets/index.vue` + `useAssetsPortfolioChart.ts` + `chartAreaPaths.ts` | نزدیک‌ترین نقطهٔ رسم‌شده؛ مقدار همان نمونهٔ دارایی، نه قیمت مس
- 2026-11-04 | لینک دعوتنامه | `utils/referralShare.ts` + لندینگ `pages/login.vue` | `%لینک` = `/login?register=true&id=`؛ لندینگ با `id` به ثبت‌نام اپ ریدایرکت می‌کند
- 2026-11-04 | دکمه ثبت‌نام آیفون | `login/desktop/styles/desktop-auth.less` + `login/index.vue` | موبایل height:auto و اسکرول؛ بنر نصب پایین تا روی دکمه ننشیند
+1
View File
@@ -68,6 +68,7 @@ declare module 'vue' {
PwaInstallGuideModal: typeof import('./src/components/pwa/PwaInstallGuideModal.vue')['default']
PwaInstallStepIllustration: typeof import('./src/components/pwa/PwaInstallStepIllustration.vue')['default']
RangePicker: typeof import('./src/components/BasicPacks/BaseDatePicker/src/datePick/demo/range-picker.vue')['default']
RequiredKycModal: typeof import('./src/components/RequiredKycModal.vue')['default']
RouterLink: typeof import('vue-router')['RouterLink']
RouterView: typeof import('vue-router')['RouterView']
SelectInRange: typeof import('./src/components/BasicPacks/BaseDatePicker/src/datePick/demo/select-in-range.vue')['default']
+1 -1
View File
@@ -1 +1 @@
if('serviceWorker' in navigator) navigator.serviceWorker.register('/dev-sw.js?dev-sw', { scope: '/', type: 'classic' })
if('serviceWorker' in navigator) navigator.serviceWorker.register('/dev-sw.js?dev-sw', { scope: '/', type: 'module' })
+73 -3
View File
@@ -30,9 +30,35 @@
<component :is="Component" :key="route.fullPath" />
</router-view>
</div>
<RequiredKycModal v-if="!showSplash && !isTvBoardRoute && !isLoginRoute" />
</AConfigProvider>
<div
v-if="showSupportButton && !showSplash && route.name !== 'support' && route.name !== 'login' && !isTvBoardRoute"
v-if="showGiftCardButton"
id="gift-card-button"
class="fixed z-[5095] cursor-grab select-none rounded-full"
:class="{ 'cursor-grabbing': giftCardDragging }"
:style="giftCardButtonStyle"
title="ثبت کارت هدیه"
@pointerdown="onGiftCardPointerDown"
@pointermove="onGiftCardPointerMove"
@pointerup="handleGiftCardPointerUp"
@pointercancel="onGiftCardPointerCancel"
>
<div
class="relative inline-flex items-center gap-2 rounded-full bg-white border border-solid border-gray-200 shadow-[0_6px_20px_rgba(15,23,42,0.14)] px-3.5 py-[9px] text-slate-800 text-[13px] font-600 leading-none transition-all duration-200"
:class="{ 'shadow-[0_10px_28px_rgba(15,23,42,0.22)]': giftCardDragging }"
>
<BasicIcon
icon="vuesax-linear:gift"
size="18"
:color="giftCardFabAccent"
class="shrink-0"
/>
<span class="whitespace-nowrap">ثبت کارت هدیه</span>
</div>
</div>
<div
v-if="showSupportButton && !showSplash && route.name !== 'support' && route.name !== 'login' && !isTvBoardRoute && !isKycRequired"
id="support-button"
ref="supportButtonEl"
class="fixed z-[5100] cursor-grab select-none rounded-full"
@@ -126,12 +152,13 @@ import { useDraggableFloatingButton } from '@/utils/useDraggableFloatingButton'
import AppCreditLink from '@/components/AppCreditLink.vue'
import EnamadBadge from '@/components/EnamadBadge.vue'
import SupportMessengerPicker from '@/components/SupportMessengerPicker.vue'
import { useRoute } from 'vue-router'
import { useRoute, useRouter } from 'vue-router'
import { recoverMobileViewportAfterAuth } from '@/layouts/composables/useMobileScrollReset'
import { usePwaInstall } from '@/composables/usePwaInstall'
import PwaInstallBanner from '@/components/pwa/PwaInstallBanner.vue'
import PwaInstallGuideModal from '@/components/pwa/PwaInstallGuideModal.vue'
import GoldDayCalculatorModal from '@/components/GoldDayCalculatorModal.vue'
import RequiredKycModal from '@/components/RequiredKycModal.vue'
import { useUserStore } from '@/store/userStore'
import { useSettingsStore } from '@/store/settingsStore'
import {
@@ -142,6 +169,7 @@ import {
useChatService,
} from '@/utils/chat'
import { getToken } from '@/utils'
import { isCustomerIdentityVerified } from '@/utils/customerIdentity'
import { message } from 'ant-design-vue'
import { showBrowserNotification } from '@/utils/browserNotification'
@@ -153,6 +181,7 @@ useApplyDesktopLayoutClass()
const isDesktop = useDesktopBreakpoint()
const route = useRoute()
const router = useRouter()
const showDesktopFloatingCredit = computed(() => {
if (!isDesktop.value) return false
// پشتیبانی خودش سایدبار دارد؛ float روی دکمه ارسال می‌افتد
@@ -300,6 +329,46 @@ watch(
const userStore = useUserStore()
const settingsStore = useSettingsStore()
const isKycRequired = computed(
() =>
Boolean(getToken()) &&
Boolean(userStore.userInfo) &&
!isCustomerIdentityVerified(userStore.userInfo?.is_legal),
)
const giftCardFabAccent = computed(
() => config.config?.color || getProjectPrimaryColor() || '#334155',
)
const showGiftCardButton = computed(() => {
if (showSplash.value) return false
if (isTvBoardRoute.value || isLoginRoute.value || isKycRequired.value) return false
if (route.name === 'giftCard') return false
if (!getToken()) return false
return settingsStore.isSettingTruthy('has_page_gift_card')
})
const {
dragging: giftCardDragging,
fabStyle: giftCardButtonStyle,
handlePointerDown: onGiftCardPointerDown,
handlePointerMove: onGiftCardPointerMove,
handlePointerUp: giftCardPointerUp,
handlePointerCancel: onGiftCardPointerCancel,
} = useDraggableFloatingButton('boursecu_gift_card_button_position_v1', {
width: 148,
height: 42,
defaultBottomGap: 62,
defaultRightOffset: 16,
})
function handleGiftCardPointerUp(event: PointerEvent) {
const clicked = giftCardPointerUp(event)
if (!clicked) return
event.stopPropagation()
void router.push({ name: 'giftCard' })
}
const showLoginCreditExtras = computed(() => {
if (!isLoginRoute.value) return false
const href = String(settingsStore.getSettingByKey('enamad_url') ?? '').trim()
@@ -601,7 +670,8 @@ html.project-boursecu {
}
html.app-layout--desktop {
#support-button {
#support-button,
#gift-card-button {
bottom: 12px;
right: calc(var(--app-desktop-sidebar-width, 260px) + 20px);
}
+31
View File
@@ -1,6 +1,18 @@
import useAxios from '@/utils/useAxios'
import type { CopperConvertSource } from '@/utils/copperWireConvert'
export interface CopperConvertHistoryRow {
id: number
status: string
source: string
asset_unit: string
consumed_amount: number
leftover_amount: number
wire15_rings: number
wire25_rings: number
created_at?: string
}
export function createCopperConvertRequest(payload: {
source: CopperConvertSource
rings15: number
@@ -8,3 +20,22 @@ export function createCopperConvertRequest(payload: {
}) {
return useAxios.post('/customer/copper-convert-request', payload)
}
export function getCopperConvertRequests() {
return useAxios.get<CopperConvertHistoryRow[]>('/customer/copper-convert-request')
}
export function updateCopperConvertRequest(
id: number,
payload: {
source: CopperConvertSource
rings15: number
rings25: number
},
) {
return useAxios.put(`/customer/copper-convert-request/${id}`, payload)
}
export function deleteCopperConvertRequest(id: number) {
return useAxios.delete(`/customer/copper-convert-request/${id}`)
}
+5 -3
View File
@@ -5,12 +5,14 @@ import type {Ref, UnwrapRef} from "vue";
import type {Transaction} from "@/models/transaction";
import {useUserStore} from "@/store/userStore";
const userStore = useUserStore()
function customerOrderBase() {
return `/customer${useUserStore().isSingle ? '/single' : ''}/order`
}
export const createOrder = async (obj: Order): Promise<any> => {
return await useAxios.post<Order>(`/customer${!userStore.isSingle ? '' : '/single'}/order`, obj)
return await useAxios.post<Order>(customerOrderBase(), obj)
}
export const getOrders = async (tbl: Ref<UnwrapRef<TableInput>>): Promise<TableOutput<Transaction>> => {
return await useAxios.post<TableOutput<Order>>(`/customer${!userStore.isSingle ? '' : '/single'}/order/table`, tbl)
return await useAxios.post<TableOutput<Order>>(`${customerOrderBase()}/table`, tbl)
}
+4
View File
@@ -16,6 +16,10 @@ export const deposit = async (obj: Transaction): Promise<any> => {
return await useAxios.post<Transaction>(`/customer/charge_account`, obj)
}
export const submitDepositRequest = async (formData: FormData): Promise<any> => {
return await useAxios.postForm(`/customer/wallet/deposit_request`, formData)
}
export const createCard = async (obj: Card): Promise<any> => {
return await useAxios.post<Transaction>(`/customer/account`, obj)
}
+6 -4
View File
@@ -33,10 +33,12 @@ const color = computed(() => {
})
onMounted(() => {
if (props.size) {
const svg: SVGElement = refIcon.value?.children[0] as SVGElement
svg.setAttribute('width', props.size as string)
svg.setAttribute('height', props.size as string)
if (props.size && refIcon.value) {
const svg = refIcon.value.children?.[0] as SVGElement | undefined
if (svg && typeof svg.setAttribute === 'function') {
svg.setAttribute('width', String(props.size))
svg.setAttribute('height', String(props.size))
}
}
})
</script>
+2 -1
View File
@@ -23,8 +23,9 @@
<div class="w-full text-center font-bold">{{ noData }}</div>
</template>
<a-select-option
:label="val[props.valueName]"
v-for="val in props.items"
:key="val[props.keyName]"
:label="val[props.valueName]"
:value="val[props.keyName]"
>
<a-tooltip v-if="props.hasTooltip" placement="left" class="cursor-pointer">
+58 -48
View File
@@ -1,61 +1,71 @@
<template>
<!-- <div v-if="modelValue">-->
<van-dialog class="oneButtonDialog">
<div class="my-4">
<van-dialog
v-model:show="show"
class="oneButtonDialog"
teleport="body"
:close-on-click-overlay="closeOnClickOverlay"
:z-index="zIndex"
v-bind="$attrs"
>
<div class="oneButtonDialog__body my-4 text-slate-800">
<div class="w-full flex justify-center">
<slot name="img">{{ text2 }}</slot>
</div>
<div class="w-full flex justify-center text-[18px] font-semibold">
<div class="w-full flex justify-center text-[18px] font-semibold text-slate-800">
<slot name="title">{{ text1 }}</slot>
</div>
<div class=" border-t border-solid border-[#E5E7EB] pt-4 mx-2 mt-6 font-semibold text-[15px]">
<div
class="border-t border-solid border-[#E5E7EB] pt-4 mx-2 mt-6 font-semibold text-[15px] text-slate-800"
>
<slot name="button">{{ text3 }}</slot>
</div>
</div>
</van-dialog>
<!-- <van-dialog style="background-color: #2b3f6e" show-cancel-button cancelButtonText="بیخیال" confirmButtonText="بله" cancelButtonColor="">-->
<!-- <div class="w-full mt-6 text-white ">-->
<!-- <div class="w-full flex mb-[10px] ">-->
<!-- <Icon icon="vuesax-linear:info-circle" class="mx-4" size="25"/>-->
<!-- <span class="text-lg flex-1">-->
<!-- <slot name="title">{{text1}}</slot>-->
<!-- </span>-->
<!-- </div>-->
<!-- <div class="flex justify-start mb-6 mt-8" style="font-weight:700;">-->
<!-- <slot name="button">{{text2}}</slot>-->
<!-- </div>-->
<!-- </div>-->
<!-- </van-dialog>-->
<!-- </div>-->
</template>
<script lang="ts" setup>
import { computed, watch } from 'vue'
import { APP_Z_MODAL } from '@/utils/zIndex'
// import Icon from "/@/assets/icons/Icon.vue";
import {ref, watch} from 'vue';
defineOptions({ inheritAttrs: false })
const show = ref(true);
const props = withDefaults(defineProps<{
// modelValue: boolean,
timeOut: number,
text1?: string,
text2?: string,
text3?: string
// top?: string,
const props = withDefaults(
defineProps<{
show?: boolean
timeOut?: number
text1?: string
text2?: string
text3?: string
closeOnClickOverlay?: boolean
zIndex?: number
}>(),
{
show: false,
timeOut: 3000,
closeOnClickOverlay: true,
zIndex: APP_Z_MODAL,
},
)
}>(), {})
const emit = defineEmits<{ (e: 'update:modelValue', value: boolean): void }>()
watch(() => props.modelValue, (value) => {
if (props.timeOut !== -1) showNotify()
const emit = defineEmits<{
(e: 'update:show', value: boolean): void
}>()
const show = computed({
get: () => props.show,
set: (value: boolean) => emit('update:show', value),
})
const showNotify = () => {
console.log('notify', show.value)
setTimeout(() => {
emit('update:modelValue', false)
}, props.timeOut);
};
watch(
() => props.show,
(value) => {
if (value && props.timeOut !== -1) {
setTimeout(() => {
emit('update:show', false)
}, props.timeOut)
}
},
)
</script>
<style lang="less">
@@ -67,17 +77,13 @@ const showNotify = () => {
animation: notify-in 0.2s reverse;
}
.oneButtonDialog .van-dialog__confirm, .van-dialog__cancel {
.oneButtonDialog .van-dialog__confirm,
.oneButtonDialog .van-dialog__cancel {
display: none !important;
}
.van-dialog__confirm, .van-dialog__cancel {
//background-color: ;
}
.oneButtonDialog .van-dialog__confirm .van-button__text {
color: #1C2D56;
color: #1c2d56;
font-weight: 600;
font-size: 15px;
}
@@ -87,4 +93,8 @@ const showNotify = () => {
font-weight: 600;
font-size: 15px;
}
.oneButtonDialog__body {
color: #1e293b;
}
</style>
+135
View File
@@ -0,0 +1,135 @@
<template>
<BasicModal
v-model:visible="visible"
custom-footer
:closable="false"
:width="modalWidth"
wrap-class-name="required-kyc-modal-wrap"
:z-index="99999"
>
<div class="kyc-modal-content text-center py-2" dir="rtl">
<!-- Icon with soft glowing background -->
<div class="inline-flex items-center justify-center w-16 h-16 rounded-2xl bg-amber-50 text-amber-600 border border-amber-200 mb-4 shadow-sm">
<BasicIcon icon="vuesax-linear:security-user" size="36" color="#d97706" />
</div>
<!-- Title -->
<h2 class="text-base font-bold text-slate-800 mb-2">
احراز هویت الزامی است
</h2>
<!-- Description: شیک، کوتاه، مختصر و مفید -->
<p class="text-xs text-slate-600 leading-6 max-w-xs mx-auto mb-5">
کاربر گرامی، جهت استفاده از کلیه امکانات سامانه و شروع معاملات، لطفاً ابتدا فرایند احراز هویت خود را تکمیل فرمایید.
</p>
<!-- Tip info box -->
<div class="bg-amber-50/70 border border-amber-200/80 rounded-xl p-3 text-right text-xs text-amber-900 mb-5 space-y-1.5">
<div class="flex items-center gap-2">
<BasicIcon icon="vuesax-linear:tick-circle" size="16" color="#d97706" class="shrink-0" />
<span>استعلام و تایید آنی مشخصات از طریق سامانه ثبت احوال</span>
</div>
<div class="flex items-center gap-2">
<BasicIcon icon="vuesax-linear:tick-circle" size="16" color="#d97706" class="shrink-0" />
<span>کد ملی وارد شده باید متعلق به مالک شماره موبایل باشد</span>
</div>
</div>
<!-- Action buttons -->
<div class="flex flex-col gap-2.5">
<BasicButton
type="primary"
class="w-full h-11 text-sm font-semibold !rounded-xl flex items-center justify-center gap-2"
@click="goToKyc"
>
<span>تکمیل و احراز هویت</span>
<BasicIcon icon="vuesax-linear:arrow-left" size="16" />
</BasicButton>
<button
type="button"
class="text-xs text-red-600 hover:text-red-700 flex items-center justify-center gap-1.5 py-1.5 cursor-pointer transition-colors"
@click="onLogout"
>
<BasicIcon icon="vuesax-linear:logout" size="14" color="#dc2626" />
<span>خروج از حساب کاربری</span>
</button>
</div>
</div>
</BasicModal>
</template>
<script lang="ts" setup>
import { computed, onMounted, ref, watch } from 'vue'
import { useRoute, useRouter } from 'vue-router'
import BasicModal from '@/components/BasicPacks/BasicModal.vue'
import BasicButton from '@/components/BasicPacks/BasicButton.vue'
import BasicIcon from '@/components/BasicPacks/BasicIcon.vue'
import { useUserStore } from '@/store/userStore'
import { getToken } from '@/utils'
import { performUserLogout } from '@/utils/authSession'
import { useDesktopBreakpoint } from '@/layouts/composables/useAppLayout'
import { isCustomerIdentityVerified } from '@/utils/customerIdentity'
const route = useRoute()
const router = useRouter()
const userStore = useUserStore()
const isDesktop = useDesktopBreakpoint()
const modalWidth = computed(() => (isDesktop.value ? '420px' : '90vw'))
const isKycRequired = computed(() => {
if (!getToken()) return false
if (route.name === 'login' || route.name === 'tvMonitor' || route.name === 'aboutSoftware' || route.name === 'user') {
return false
}
const info = userStore.userInfo
if (!info) return false
return !isCustomerIdentityVerified(info.is_legal)
})
const visible = ref(false)
watch(
isKycRequired,
(val) => {
visible.value = Boolean(val)
},
{ immediate: true },
)
onMounted(async () => {
if (getToken() && !userStore.userInfo) {
try {
await userStore.getMyInfo()
} catch {
// ignore
}
}
visible.value = Boolean(isKycRequired.value)
})
function goToKyc() {
visible.value = false
void router.push({ name: 'user', query: { showEdit: 'true' } })
}
async function onLogout() {
visible.value = false
await performUserLogout()
}
</script>
<style lang="less">
.required-kyc-modal-wrap {
.ant-modal-content {
border-radius: 20px;
}
}
</style>
<style scoped>
.kyc-modal-content {
font-family: inherit;
}
</style>
@@ -101,6 +101,8 @@ const breakdown = computed(() =>
payablePrice: props.payablePrice,
unitPriceRial: props.unitPriceRial,
sellGoldDebit: props.sellGoldDebit,
metalName: 'مس',
weightUnit: props.weightUnit || 'کیلوگرم',
}),
)
</script>
+4
View File
@@ -35,4 +35,8 @@ export interface Price {
/** montzar | zaarbox | main_product | store = قیمت زنده، database_last = آخرین قیمت ذخیره‌شده */
price_source?: string | null
last_historical?: number
copper_world?: number
dollar_free?: number
copper_ton?: string
copper_kilo?: string
}
+3 -1
View File
@@ -24,7 +24,9 @@ export interface Transaction {
value?: number
sts_str?: string
order?: Order
withdraw?: Order
withdraw?: Withdraw
sts?: number
transaction?: unknown[]
card_id?: number|string
eaj?: string
end_at?: string
+43
View File
@@ -0,0 +1,43 @@
import router from '@/router'
import { removeToken } from '@/utils'
import { useUserStore } from '@/store/userStore'
import { useWalletStore } from '@/store/walletStore'
import { useWalletAssets } from '@/composables/useWalletAssets'
import { resetHomePageData } from '@/views/base/home/composables/useHomePageData'
import { resetWalletPageData } from '@/views/base/wallet/composables/useWalletPageData'
import { resetAddressPageData } from '@/views/base/address/composables/useAddressPageData'
import { resetTransactionsPageData } from '@/views/base/transactions/composables/useTransactionsPageData'
import { resetProductsPageData } from '@/views/base/products/composables/useProductsPageData'
export async function performUserLogout() {
try {
const userStore = useUserStore()
const walletStore = useWalletStore()
userStore.userInfo = undefined
walletStore.walletInfo = undefined
try {
const { clearWalletAssets } = useWalletAssets()
clearWalletAssets()
} catch {
// ignore
}
try { resetHomePageData() } catch {}
try { resetWalletPageData() } catch {}
try { resetAddressPageData() } catch {}
try { resetTransactionsPageData() } catch {}
try { resetProductsPageData() } catch {}
} catch (e) {
console.error('Logout cleanup error:', e)
}
removeToken()
try {
await router.push({ name: 'login' })
} catch {
// ignore
}
window.location.reload()
}
+1 -1
View File
@@ -7,7 +7,7 @@ interface BankDefinition {
aliases: string[]
}
const bankLogoModules = import.meta.glob<string>('@/assets/img/banks/*.{png,svg}', {
const bankLogoModules = import.meta.glob<string>('../assets/img/banks/*.{png,svg}', {
eager: true,
import: 'default',
})
+21 -4
View File
@@ -3,6 +3,13 @@ export type ChartSeriesPoint = {
value: number
}
export type ChartPlotSample = {
x: number
y: number
value: number
timeMs: number
}
const CHART_PAD_Y = 14
const DEFAULT_MAX_POINTS = 22
@@ -67,16 +74,17 @@ export function buildSeriesChartPaths(
linePath: '',
areaPath: '',
endDot: null as { x: number; y: number } | null,
samples: [] as ChartPlotSample[],
width,
height,
}
if (points.length < 2) return empty
const maxPoints = options?.maxPoints ?? DEFAULT_MAX_POINTS
const useSmooth = options?.smooth ?? true
let series = downsampleSeries(points, maxPoints)
if (useSmooth) {
series = smoothSeries(series, 3)
}
const sampled = downsampleSeries(points, maxPoints)
const series = useSmooth ? smoothSeries(sampled, 3) : sampled
const values = series.map((point) => point.value)
let min = Math.min(...values)
@@ -97,11 +105,20 @@ export function buildSeriesChartPaths(
const linePath = buildSmoothLinePath(plot)
const areaPath = `${linePath} L${width} ${height} L0 ${height} Z`
const last = plot[plot.length - 1]
const samples = plot.map((point, index) => ({
x: point.x,
y: point.y,
value: sampled[index]?.value ?? series[index].value,
timeMs: sampled[index]?.timeMs ?? series[index].timeMs,
}))
return {
hasData: true,
linePath,
areaPath,
endDot: last ? { x: last.x, y: last.y } : null,
samples,
width,
height,
}
}
+63 -12
View File
@@ -18,10 +18,10 @@ export const DEFAULT_DEPOSIT_SUPPORT_MESSAGE_TEXT =
'باسلام، %نام هستم. کدپیگیری و مبلغ واریزی من:'
/** الگوی متغیر نام — ٪نام / %نام / % نام / %نام% */
const NAME_PLACEHOLDER_RE = /[%٪]\s*نام(?:\s*[%٪])?/gu
const CARD_PLACEHOLDER_RE = /[%٪]\s*کارت(?:\s*[%٪])?/gu
const ACCOUNT_PLACEHOLDER_RE = /[%٪]\s*حساب(?:\s*[%٪])?/gu
const SHEBA_PLACEHOLDER_RE = /[%٪]\s*شبا(?:\s*[%٪])?/gu
const NAME_PLACEHOLDER_RE = /[%٪]\s*نام[%٪]?/gu
const CARD_PLACEHOLDER_RE = /[%٪]\s*کارت[%٪]?/gu
const ACCOUNT_PLACEHOLDER_RE = /[%٪]\s*حساب[%٪]?/gu
const SHEBA_PLACEHOLDER_RE = /[%٪]\s*شبا[%٪]?/gu
export function getCustomerNameFromUser(): string {
try {
@@ -47,21 +47,72 @@ export function renderDepositSupportMessageText(
return template.replace(NAME_PLACEHOLDER_RE, name)
}
/** جایگزینی متغیرها در متن راهنمای واریز — ٪نام / %نام، ٪کارت / %کارت، ٪حساب / %حساب، ٪شبا / %شبا */
/**
* حذف شماره‌های حساب، شبا و کارت و همچنین ارقام زائد از متن راهنما؛
* این اطلاعات در ردیف‌های اختصاصی مودال با دکمه کپی نمایش داده می‌شوند.
*/
function stripDepositGuideNumbers(text: string, vars?: DepositGuideVars): string {
let cleaned = text
if (vars) {
const rawValues = [
vars.sheba,
vars.sheba ? vars.sheba.replace(/^IR/i, '').trim() : '',
vars.sheba ? vars.sheba.replace(/^IR/i, '').replace(/\s+/g, '') : '',
vars.sheba ? formatDepositSheba(vars.sheba) : '',
vars.cardNumber,
vars.cardNumber ? vars.cardNumber.replace(/\s+/g, '') : '',
vars.cardNumber ? formatDepositCardNumber(vars.cardNumber) : '',
vars.accountNumber,
vars.accountNumber ? vars.accountNumber.replace(/\s+/g, '') : '',
]
.map((v) => String(v ?? '').trim())
.filter((v) => v.length >= 6)
rawValues.sort((a, b) => b.length - a.length)
for (const val of rawValues) {
if (!val) continue
const escaped = val.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')
cleaned = cleaned.replace(new RegExp(escaped, 'gi'), '')
}
}
// حذف توالی‌های رقمی ۵ رقم یا بیشتر (فارسی و انگلیسی با فاصله یا خط تیره بین ارقام)
cleaned = cleaned.replace(/(?:^|[^\w\d۰-۹])[\d۰-۹][\d۰-۹\s-]{3,}[\d۰-۹](?=[^\w\d۰-۹]|$)/gu, '')
// پالایش خطوط: حذف خطوطی که صرفاً از رقم/فاصله/علائم تشکیل شده‌اند یا برچسب‌های مرده
const lines = cleaned.split('\n')
const filteredLines = lines
.map((line) => {
const withoutDigitsAndPunct = line.replace(/[\d۰-۹\s.,:;–—/\\()-]/g, '')
if (withoutDigitsAndPunct.length === 0) {
return ''
}
const trimmed = line.trim()
if (/^(?:شماره\s*(?:شبا|حساب|کارت)|شبا|حساب|کارت)\s*[::-]?$/u.test(trimmed)) {
return ''
}
return trimmed
})
.filter((line) => line.length > 0)
return filteredLines.join('\n').trim()
}
/** جایگزینی متغیرها در متن راهنمای واریز — ٪نام / %نام (کارت، حساب و شبا چون ردیف جداگانه دارند حذف می‌شوند) */
export function renderDepositGuideText(
template: string,
vars: DepositGuideVars,
): string {
const accountHolder = String(vars.accountHolder ?? '').trim()
const cardNumber = String(vars.cardNumber ?? '').trim()
const accountNumber = String(vars.accountNumber ?? '').trim()
const sheba = String(vars.sheba ?? '').trim()
return template
.replace(SHEBA_PLACEHOLDER_RE, sheba)
.replace(ACCOUNT_PLACEHOLDER_RE, accountNumber)
.replace(CARD_PLACEHOLDER_RE, cardNumber)
let text = template
.replace(SHEBA_PLACEHOLDER_RE, '')
.replace(ACCOUNT_PLACEHOLDER_RE, '')
.replace(CARD_PLACEHOLDER_RE, '')
.replace(NAME_PLACEHOLDER_RE, accountHolder)
return stripDepositGuideNumbers(text, vars)
}
export function getDepositGuideVarsFromSettings(): DepositGuideVars {
+1 -2
View File
@@ -152,7 +152,6 @@ export const justNumber = () => {
message: 'لطفا اطلاعات را به صورت عدد و نقطه وارد کنید'
}
}
const walletCash = useWalletStore()
let priceP = 0
let methodP = 'cash'
let amountP =0
@@ -173,7 +172,7 @@ const checkNumber = async (_rule: Rule, value: number | string) => {
return Promise.reject('استفاده از اعداد اعشاری مجاز نمی باشد')
}
if (isBuyP){
const availableCash = getCashWalletBalance(walletCash?.walletInfo)
const availableCash = getCashWalletBalance(useWalletStore().walletInfo)
if (!availableCash && isCashLikeDealMethod(methodP)){
return Promise.reject(getInsufficientCashWalletMessage(groupTypeP))
}
+21 -9
View File
@@ -186,6 +186,14 @@ function sumBoursecuHomeProductInventories(
return sum
}
export function resolveBoursecuCopperUnit(unit?: string | null): string {
const trimmed = (unit ?? '').trim()
if (!trimmed || trimmed === 'گرم' || trimmed === 'gram' || trimmed === 'g') {
return 'کیلوگرم'
}
return trimmed
}
function findMetalTotalById(metalTotals: WalletMetalTotal[], metalId: number) {
return metalTotals.find((metal) => metal.metal_id === metalId)
}
@@ -195,7 +203,8 @@ function formatBoursecuMetalRowValue(metal: WalletMetalTotal): string {
if (metal.metal_id === METAL_GOLD) {
return `${amount} عدد`
}
return `${amount}${metal.unit ?? ''}`
const unit = metal.metal_id === METAL_COPPER ? resolveBoursecuCopperUnit(metal.unit) : (metal.unit ?? 'کیلوگرم')
return `${amount} ${unit}`
}
function formatRialNumber(value: number): string {
@@ -237,8 +246,11 @@ function buildBoursecuCopperPopupLines(summary: {
const metalTotals = summary.metal_totals ?? []
const copperMetal = findMetalTotalById(metalTotals, METAL_COPPER)
const shamshMetal = findMetalTotalById(metalTotals, METAL_GOLD)
const weightUnit = copperMetal?.unit || 'کیلوگرم'
const totalWeight = sumBoursecuHomeProductInventories(inventoryCards, countProducts)
const weightUnit = resolveBoursecuCopperUnit(copperMetal?.unit)
const totalWeight =
copperMetal != null && Number(copperMetal.total_weight ?? 0) > 0
? Number(copperMetal.total_weight)
: sumBoursecuHomeProductInventories(inventoryCards, countProducts)
const katodCard = findBoursecuProductCard(inventoryCards, countProducts, isBoursecuKatodCard)
const maftolCard = findBoursecuProductCard(inventoryCards, countProducts, isBoursecuMaftolCard)
@@ -319,10 +331,10 @@ export function buildBoursecuHomeAssetRows(
const countProducts = summary.count_products ?? []
const metalTotals = summary.metal_totals ?? []
const copperMetal = findMetalTotalById(metalTotals, METAL_COPPER)
const weightUnit = copperMetal?.unit || 'کیلوگرم'
const weightUnit = resolveBoursecuCopperUnit(copperMetal?.unit)
const totalCopperWeight =
copperMetal != null
? Number(copperMetal.total_weight ?? 0)
copperMetal != null && Number(copperMetal.total_weight ?? 0) > 0
? Number(copperMetal.total_weight)
: sumBoursecuHomeProductInventories(inventoryCards, countProducts)
const cash = Number(summary.cash_wallet ?? 0)
@@ -387,7 +399,7 @@ export function resolveSummaryMetalWeight(
/** متن توضیح مودال دارایی فلزی — بر اساس metal_totals سرور، بدون هاردکد طلا */
export function formatMetalAssetsInfoText(metal: WalletMetalTotal): string {
const unit = metal.unit || 'گرم'
const unit = metal.metal_id === METAL_COPPER ? resolveBoursecuCopperUnit(metal.unit) : (metal.unit || 'کیلوگرم')
return `${metal.label}: مجموع کیف محصولات (${metal.product_weight} ${unit}) + موجودی کیف اصلی (${metal.melted_weight} ${unit})`
}
@@ -510,7 +522,7 @@ export function computeMetalRialValue(
const metalId = Number(metal.metal_id ?? 0)
const unitPrice =
livePricesByMetal?.[metalId] ??
(metalId === METAL_GOLD ? liveGoldPrice : 0)
(metalId === METAL_COPPER || metalId === METAL_GOLD ? liveGoldPrice : 0)
return sum + weight * unitPrice
}, 0)
@@ -534,7 +546,7 @@ export function formatInventoryCardValue(card: {
display_type?: string
}): string {
const quantity = Number(card.quantity ?? 0)
const unit = card.unit ?? (card.display_type === 'count' ? 'عدد' : 'گرم')
const unit = card.unit ?? (card.display_type === 'count' ? 'عدد' : 'کیلوگرم')
const formatted =
card.display_type === 'count'
? usePriceWithoutType(quantity, false)
+7 -5
View File
@@ -39,10 +39,12 @@ export function renderInviteLinkText(
.replace(/[%٪]\s*نام/gu, userName)
}
function resolveReferralLoginLink(referralId?: string | number | null): string {
function resolveReferralRegisterLink(referralId?: string | number | null): string {
const id = String(referralId ?? '').trim()
if (!id) return ''
const query = `register=true&id=${encodeURIComponent(id)}`
let base = ''
try {
base = String(useSettingsStore().getSettingByKey('app_url') ?? '').trim()
@@ -51,14 +53,14 @@ function resolveReferralLoginLink(referralId?: string | number | null): string {
}
if (base) {
return `${base.replace(/\/+$/, '')}/login?id=${encodeURIComponent(id)}`
return `${base.replace(/\/+$/, '')}/login?${query}`
}
if (typeof window !== 'undefined' && window.location?.origin) {
return `${window.location.origin}/login?id=${encodeURIComponent(id)}`
return `${window.location.origin}/login?${query}`
}
return `/login?id=${encodeURIComponent(id)}`
return `/login?${query}`
}
export function getReferralShareText(options: {
@@ -67,7 +69,7 @@ export function getReferralShareText(options: {
referralId?: string | number | null
}) {
const userName = options.userName ?? ''
const link = resolveReferralLoginLink(options.referralId)
const link = resolveReferralRegisterLink(options.referralId)
return renderInviteLinkText(getInviteLinkTemplate(), { userName, link })
}
+21 -138
View File
@@ -33,53 +33,22 @@ export function formatTradeGramDisplay(grams?: number | null): number {
}
function feeRate() {
return normalizeServiceFeeRatio(Number(serviceFeePercentage.value))
return 0
}
/** نسبت کارمزد (۰٫۰۱ = ۱٪). مقدار ≥۱ یعنی درصد انسانی اشتباه وارد شده. */
/** نسبت کارمزد — در بورس مس کارمزد روی قیمت اعلامی لحاظ شده است و کارمزد جداگانه صفر است */
export function normalizeServiceFeeRatio(value: number): number {
if (!Number.isFinite(value) || value <= 0) {
return 0
}
if (value >= 1) {
return value / 100
}
return value
return 0
}
export async function loadServiceFeeFromSettings() {
try {
const settingsStore = useSettingsStore()
if (!settingsStore.loaded) {
await settingsStore.fetchSettings()
}
const settings = settingsStore.settings
if (settings?.length) {
const feeSetting = settings.find(
(s) => s?.key === 'fee_service_charge_percentage' && s?.is_active === true
)
if (feeSetting?.value !== undefined && feeSetting?.value !== null) {
const raw = String(feeSetting.value).trim()
serviceFeePercentage.value = raw === '' ? 0 : normalizeServiceFeeRatio(Number(raw))
}
const feeModeSetting = settings.find(
(s) => s?.key === 'fee_deduct_from_gold' && s?.is_active === true
)
if (feeModeSetting?.value !== undefined && feeModeSetting?.value !== null) {
const raw = String(feeModeSetting.value).trim().toLowerCase()
feeDeductFromGold.value = raw === 'true' || raw === '1'
} else {
feeDeductFromGold.value = false
}
}
} catch (e) {
console.log(e)
}
// در بورس مس کارمزد روی قیمت اعلامی لحاظ شده و کارمزد مجزا وجود ندارد
serviceFeePercentage.value = 0
feeDeductFromGold.value = false
}
export function calcFeeInGrams(goldValue?: number | null) {
return parseFloat(((goldValue ?? 0) * feeRate()).toFixed(4))
return 0
}
/** گرم معادل برای دریافت دقیق مبلغ ریالی در فروش */
@@ -253,7 +222,7 @@ export interface TradeConfirmBreakdown {
}
function hasTradeFee(feeInGrams: number, feeInRial: number) {
return feeInGrams > 0 || feeInRial > 0
return false
}
function grossGoldFromRial(rial: number, unitPriceRial: number) {
@@ -263,9 +232,7 @@ function grossGoldFromRial(rial: number, unitPriceRial: number) {
/**
* جزئیات مدال تأیید — دو بخش «کسر از کیف» و «واریز به کیف».
* فقط بر پایهٔ قفل ورودی تصمیم می‌گیرد:
* • ریال قفل → مبلغ دقیق، کارمزد از طلا.
* • گرم قفل → وزن دقیق، کارمزد از ریال.
* در بورس مس قیمت نهایی است و کارمزد مجزا وجود ندارد.
*/
export function buildTradeConfirmBreakdown(params: {
isBuy: boolean
@@ -276,126 +243,42 @@ export function buildTradeConfirmBreakdown(params: {
payablePrice: number
unitPriceRial: number
sellGoldDebit?: number
metalName?: string
weightUnit?: string
}): TradeConfirmBreakdown {
const {
isBuy,
inputLock,
orderGoldAmount,
feeInGrams,
feeInRial,
payablePrice,
unitPriceRial,
sellGoldDebit,
orderGoldAmount,
} = params
const hasFee = hasTradeFee(feeInGrams, feeInRial)
const rialLocked = isRialLocked(inputLock)
const metal = params.metalName ?? 'مس'
const unit = params.weightUnit ?? 'کیلوگرم'
const weight = orderGoldAmount
if (!isBuy) {
if (rialLocked) {
const debit = sellGoldDebit ?? parseFloat((weight + feeInGrams).toFixed(4))
const goldRows: TradeConfirmRow[] = hasFee
? [
{ label: 'وزن معادل مبلغ', gram: weight },
{ label: 'کارمزد', gram: feeInGrams, minus: true },
{ label: 'جمع کسر از کیف طلا', gram: debit, bold: true, dividerBefore: true },
]
: [{ label: 'وزن فروش', gram: weight, bold: true }]
return {
sections: [
{ heading: 'از کیف طلا کسر می‌شود', rows: goldRows },
{
heading: 'به کیف پول واریز می‌شود',
rows: [{ label: 'مبلغ دریافتی', rial: payablePrice, bold: true }],
footnote: hasFee
? 'دقیقاً همان مبلغی که وارد کردید واریز می‌شود؛ کارمزد فقط از طلای کیف کسر می‌شود.'
: undefined,
},
],
formHint: hasFee
? `${payablePrice.toLocaleString('fa-IR')} ریال دریافت — ${formatTradeGramDisplay(debit)} گرم از کیف کسر می‌شود (شامل ${formatTradeGramDisplay(feeInGrams)} گرم کارمزد)`
: `${payablePrice.toLocaleString('fa-IR')} ریال دریافت`,
}
}
const grossSellRial = Math.round(weight * unitPriceRial)
const cashRows: TradeConfirmRow[] = hasFee
? [
{ label: 'ارزش فروش', rial: grossSellRial },
{ label: 'کارمزد', rial: feeInRial, minus: true },
{ label: 'خالص دریافتی', rial: payablePrice, bold: true, dividerBefore: true },
]
: [{ label: 'مبلغ دریافتی', rial: payablePrice, bold: true }]
return {
sections: [
{ heading: 'از کیف طلا کسر می‌شود', rows: [{ label: 'وزن فروش', gram: weight, bold: true }] },
{ heading: `از کیف ${metal} کسر می‌شود`, rows: [{ label: 'وزن فروش', gram: weight, bold: true }] },
{
heading: 'به کیف پول واریز می‌شود',
rows: cashRows,
footnote: hasFee ? 'کارمزد از مبلغ ریالی دریافتی کم شده است.' : undefined,
rows: [{ label: 'مبلغ دریافتی', rial: payablePrice, bold: true }],
},
],
formHint: hasFee
? `${formatTradeGramDisplay(weight)} گرم فروش — ${feeInRial.toLocaleString('fa-IR')} ریال کارمزد از مبلغ دریافتی کسر می‌شود`
: `${formatTradeGramDisplay(weight)} گرم فروش — ${payablePrice.toLocaleString('fa-IR')} ریال به کیف پول`,
formHint: `${formatTradeGramDisplay(weight)} ${unit} فروش — ${payablePrice.toLocaleString('fa-IR')} ریال به کیف پول`,
}
}
if (rialLocked) {
const grossGram = grossGoldFromRial(payablePrice, unitPriceRial)
const feeGram = parseFloat(Math.max(0, grossGram - weight).toFixed(4))
const goldRows: TradeConfirmRow[] = hasFee
? [
{ label: 'معادل طلای خام', gram: grossGram },
{ label: 'کارمزد', gram: feeGram, minus: true },
{ label: 'خالص واریزی به کیف طلا', gram: weight, bold: true, dividerBefore: true },
]
: [{ label: 'واریزی به کیف طلا', gram: weight, bold: true }]
return {
sections: [
{
heading: 'از کیف پول کسر می‌شود',
rows: [{ label: 'مبلغ پرداختی', rial: payablePrice, bold: true }],
footnote: 'دقیقاً همان مبلغی که وارد کردید؛ کارمزد جداگانه اضافه نمی‌شود.',
},
{
heading: 'به کیف طلا واریز می‌شود',
rows: goldRows,
footnote: hasFee ? 'کارمزد از وزن طلای دریافتی کسر شده است.' : undefined,
},
],
formHint: hasFee
? `${payablePrice.toLocaleString('fa-IR')} ریال پرداخت — ${formatTradeGramDisplay(weight)} گرم واریز (کارمزد از طلا کسر شد)`
: `${payablePrice.toLocaleString('fa-IR')} ریال پرداخت`,
}
}
const basePriceRial = calcTradeBasePriceRial(weight, unitPriceRial)
const cashRows: TradeConfirmRow[] = hasFee
? [
{ label: `ارزش ${formatTradeGramDisplay(weight)} گرم`, rial: basePriceRial },
{ label: 'کارمزد', rial: feeInRial, plus: true },
{ label: 'جمع پرداختی', rial: payablePrice, bold: true, dividerBefore: true },
]
: [{ label: 'مبلغ پرداختی', rial: payablePrice, bold: true }]
return {
sections: [
{
heading: 'از کیف پول کسر می‌شود',
rows: cashRows,
footnote: hasFee ? 'کارمزد به مبلغ پرداختی اضافه شده است.' : undefined,
rows: [{ label: 'مبلغ پرداختی', rial: payablePrice, bold: true }],
},
{
heading: 'به کیف طلا واریز می‌شود',
rows: [{ label: 'دقیقاً', gram: weight, bold: true }],
heading: `به کیف ${metal} واریز می‌شود`,
rows: [{ label: 'مقدار واریزی', gram: weight, bold: true }],
},
],
formHint: hasFee
? `${payablePrice.toLocaleString('fa-IR')} ریال (شامل ${feeInRial.toLocaleString('fa-IR')} ریال کارمزد) — ${formatTradeGramDisplay(weight)} گرم واریز`
: `${payablePrice.toLocaleString('fa-IR')} ریال پرداخت`,
formHint: `${payablePrice.toLocaleString('fa-IR')} ریال پرداخت — ${formatTradeGramDisplay(weight)} ${unit} واریز`,
}
}
+1 -1
View File
@@ -244,7 +244,7 @@ export function hasLivePriceQuote(): boolean {
export function isStoreClosed(): boolean {
void productTradingHoursVersion.value
if (lastPrice.value?.closed === true) {
if (lastPrice.value?.closed === true || lastPrice.value?.status === 'closed') {
return true
}
+4 -1
View File
@@ -6,8 +6,11 @@ export function isKilogramUnit(unit?: string | null) {
return value === TRADE_WEIGHT_UNIT_KILOGRAM || value === 'kilogram' || value === 'kg'
}
/** واحد نمایش از ستینگ — خالی یا نامعتبر = گرم */
/** واحد نمایش از ستینگ — در بورس مس پیش‌فرض همیشه کیلوگرم است */
export function resolveTradeWeightUnit(settingValue?: string | number | null) {
if (!settingValue) {
return TRADE_WEIGHT_UNIT_KILOGRAM
}
return isKilogramUnit(settingValue?.toString()) ? TRADE_WEIGHT_UNIT_KILOGRAM : TRADE_WEIGHT_UNIT_GRAM
}
@@ -4,6 +4,7 @@ import {
type LandingHistoryRange,
} from '@/api/zaarboxPriceHistory'
import { buildSeriesChartPaths } from '@/utils/chartAreaPaths'
import { usePrice } from '@/utils/usePrice'
const CHART_RANGE_OPTIONS = [
{ value: 'DAILY' as const, shortLabel: '۲۴ ساعت', label: 'ارزش دارایی — ۲۴ ساعت گذشته' },
{ value: 'WEEKLY' as const, shortLabel: 'هفته', label: 'ارزش دارایی — هفته گذشته' },
@@ -32,6 +33,7 @@ export function useAssetsPortfolioChart(
}
function setChartRange(range: LandingHistoryRange) {
chartHover.value = null
chartRange.value = range
void loadChartHistory(range)
}
@@ -61,6 +63,53 @@ export function useAssetsPortfolioChart(
const portfolioChart = computed(() => buildSeriesChartPaths(portfolioSeries.value))
const chartHover = ref<{
xPercent: number
yPercent: number
valueLabel: string
timeLabel: string
} | null>(null)
function formatChartTimeLabel(timeMs: number) {
try {
return new Intl.DateTimeFormat('fa-IR', {
timeZone: 'Asia/Tehran',
month: 'short',
day: 'numeric',
hour: '2-digit',
minute: '2-digit',
}).format(new Date(timeMs))
} catch {
return ''
}
}
function onChartPointerMove(event: PointerEvent) {
const chart = portfolioChart.value
if (!chart.hasData || chart.samples.length < 2) {
chartHover.value = null
return
}
const target = event.currentTarget as HTMLElement | null
if (!target) return
const rect = target.getBoundingClientRect()
if (rect.width <= 0 || rect.height <= 0) return
const ratio = Math.min(1, Math.max(0, (event.clientX - rect.left) / rect.width))
const index = Math.round(ratio * (chart.samples.length - 1))
const sample = chart.samples[index]
if (!sample) return
chartHover.value = {
xPercent: (sample.x / chart.width) * 100,
yPercent: (sample.y / chart.height) * 100,
valueLabel: usePrice(sample.value),
timeLabel: formatChartTimeLabel(sample.timeMs),
}
}
function onChartPointerLeave() {
chartHover.value = null
}
watch(
() => cashRial.value + metalRial.value,
(total) => {
@@ -81,6 +130,9 @@ export function useAssetsPortfolioChart(
chartDrawn,
chartLoading,
portfolioChart,
chartHover,
onChartPointerMove,
onChartPointerLeave,
setChartRange,
initAssetsPortfolioChart,
}
+103 -7
View File
@@ -18,6 +18,8 @@
<div
class="assets-chart__plot"
:class="{ 'is-drawn': chartDrawn }"
@pointermove="onChartPointerMove"
@pointerleave="onChartPointerLeave"
>
<svg
v-if="portfolioChart.hasData"
@@ -54,6 +56,30 @@
</g>
</svg>
<p v-else class="assets-chart__empty">نمودار ارزش دارایی در دسترس نیست</p>
<template v-if="chartHover">
<div
class="assets-chart__crosshair"
:style="{ left: `${chartHover.xPercent}%` }"
/>
<div
class="assets-chart__dot"
:style="{
left: `${chartHover.xPercent}%`,
top: `${chartHover.yPercent}%`,
}"
/>
<div
class="assets-chart__tip"
:class="{
'is-near-end': chartHover.xPercent > 68,
'is-near-start': chartHover.xPercent < 22,
}"
:style="{ left: `${chartHover.xPercent}%` }"
>
<strong>{{ chartHover.valueLabel }}</strong>
<span v-if="chartHover.timeLabel">{{ chartHover.timeLabel }}</span>
</div>
</template>
</div>
<div class="assets-chart__ranges">
<button
@@ -149,8 +175,10 @@ import {
formatPortfolioProfitPercent,
formatPortfolioProfitText,
resolveAssetsRialValue,
resolveBoursecuCopperUnit,
resolveMetalAssetsDisplayLabel,
} from '@/utils/productAssets'
import { formatWeightAmount } from '@/utils/usePrice'
import type { WalletMetalTotal } from '@/models/walletAssets'
import { useAssetsPortfolioChart } from './composables/useAssetsPortfolioChart'
import assetsCopperBanner from '@/assets/img/assets-copper-banner.webp'
@@ -216,8 +244,11 @@ const {
chartRange,
chartRangeOptions,
chartDrawn,
portfolioChart,
setChartRange,
portfolioChart,
chartHover,
onChartPointerMove,
onChartPointerLeave,
setChartRange,
initAssetsPortfolioChart,
} = useAssetsPortfolioChart(cashWallet, metalRialValue)
const portfolioInsight = computed(() => assetsSummary.value?.portfolio)
@@ -236,10 +267,13 @@ const profitClass = computed(() => {
})
const summaryItems = computed(() => {
const items = metalTotals.value.map((metal) => ({
label: assetsMetalLabel(metal),
value: `${metal.total_weight} ${metal.unit}`,
}))
const items = metalTotals.value.map((metal) => {
const unit = metal.metal_id === 3 ? resolveBoursecuCopperUnit(metal.unit) : (metal.unit || 'کیلوگرم')
return {
label: assetsMetalLabel(metal),
value: `${formatWeightAmount(Number(metal.total_weight ?? 0))} ${unit}`,
}
})
items.push(
{ label: 'کیف پول ریالی', value: usePrice(cashWallet.value) },
{ label: 'ارزش ریالی مس', value: usePrice(metalRialValue.value) },
@@ -258,10 +292,11 @@ const assetRows = computed(() => {
const profit = portfolioInsight.value?.unrealized_profit_rial
const changeClass = profit == null || profit === 0 ? '' : profit > 0 ? 'is-profit' : 'is-loss'
const rows = metalTotals.value.flatMap((metal) => {
const unit = metal.metal_id === 3 ? resolveBoursecuCopperUnit(metal.unit) : (metal.unit || 'کیلوگرم')
const head = {
key: `metal-${metal.metal_id}`,
name: assetsMetalLabel(metal),
balance: `${metal.total_weight} ${metal.unit}`,
balance: `${formatWeightAmount(Number(metal.total_weight ?? 0))} ${unit}`,
rial: usePrice(metalRialValue.value),
change: pct || '—',
changeClass,
@@ -453,6 +488,67 @@ onMounted(async () => {
font-size: 0.8rem;
}
.assets-chart__crosshair {
position: absolute;
top: 0;
bottom: 0;
width: 1px;
background: rgba(201, 138, 95, 0.45);
pointer-events: none;
transform: translateX(-50%);
z-index: 2;
}
.assets-chart__dot {
position: absolute;
width: 11px;
height: 11px;
border-radius: 50%;
background: #c98a5f;
box-shadow: 0 0 0 5px rgba(201, 138, 95, 0.2);
pointer-events: none;
transform: translate(-50%, -50%);
z-index: 3;
}
.assets-chart__tip {
position: absolute;
top: 8px;
z-index: 4;
display: flex;
flex-direction: column;
gap: 2px;
padding: 6px 8px;
border-radius: 10px;
background: rgba(26, 43, 71, 0.94);
color: #fff;
box-shadow: 0 8px 18px rgba(15, 23, 42, 0.18);
pointer-events: none;
transform: translateX(-50%);
white-space: nowrap;
&.is-near-end {
transform: translateX(-100%);
}
&.is-near-start {
transform: translateX(0);
}
strong {
font-size: 12px;
font-weight: 700;
direction: ltr;
text-align: right;
}
span {
color: rgba(255, 255, 255, 0.78);
font-size: 10px;
font-weight: 500;
}
}
.assets-chart__ranges {
display: flex;
gap: 0.4rem;
@@ -1,11 +1,11 @@
<template>
<div class="copper-convert" dir="rtl">
<p class="copper-convert__lead">
مقدار کاتد، مفتول یا شمش از دارایی شما خوانده می‌شود. با زبانه از صفر تا همان موجودی انتخاب کنید. معادل مفتول و حلقه سیم ۱.۵ و ۲.۵ با قیمت روز حساب می‌شود.
</p>
<div class="copper-convert" data-convert-form dir="rtl">
<a-spin :spinning="loading">
<section class="copper-convert__panel" aria-label="قیمت‌های مبنا">
<p v-if="!result && amountAttempted && !loading" class="copper-convert__warn">
مقدار معتبر وارد کنید و از فعال بودن قیمت کاتد/مفتول در سامانه مطمئن شوید.
</p>
<div class="copper-convert__panel-head">
<span class="copper-convert__panel-kicker">قیمت لحظه‌ای</span>
<span class="copper-convert__panel-title">مبنای محاسبه</span>
@@ -76,9 +76,8 @@
</p>
<div
class="app-touch-slider copper-convert__slider"
@touchstart.stop
@touchmove.stop
@pointerdown.stop
@mousedown.capture="dragHandleOnly"
@touchstart.capture="dragHandleOnly"
>
<a-slider
v-model:value="sliderAmount"
@@ -94,46 +93,9 @@
<span class="copper-convert__measure"><bdi>{{ assetUnit }}</bdi><bdi>{{ formatAssetAmount(assetAmount) }}</bdi></span>
</div>
</div>
</section>
<section v-if="result" class="copper-convert__result">
<div class="copper-convert__result-head">
<span class="copper-convert__result-kicker">خروجی</span>
<span class="copper-convert__result-title">نتیجه تبدیل</span>
</div>
<div class="copper-convert__rings">
<article class="copper-convert__ring-card">
<span class="copper-convert__ring-badge" dir="ltr">۱.۵ mm²</span>
<p class="copper-convert__ring-count" dir="ltr">{{ formatRings(result.rings15ByValue) }}</p>
<p class="copper-convert__ring-caption">حلقه سیم</p>
</article>
<article class="copper-convert__ring-card">
<span class="copper-convert__ring-badge" dir="ltr">۲.۵ mm²</span>
<p class="copper-convert__ring-count" dir="ltr">{{ formatRings(result.rings25ByValue) }}</p>
<p class="copper-convert__ring-caption">حلقه سیم</p>
</article>
</div>
<div class="copper-convert__summary">
<div class="copper-convert__summary-row">
<span>ارزش معادل</span>
<strong class="copper-convert__measure"><small>ریال</small><bdi>{{ formatRial(result.totalValueRial) }}</bdi></strong>
</div>
<div class="copper-convert__summary-row">
<span>معادل مفتول</span>
<strong class="copper-convert__measure"><small>کیلو</small><bdi>{{ formatKg(result.equivalentMaftoulKg) }}</bdi></strong>
</div>
</div>
</section>
<section v-if="result && remainderAmount > 0" class="copper-convert__split">
<div class="copper-convert__result-head">
<span class="copper-convert__result-kicker">مانده دارایی</span>
<span class="copper-convert__result-title">تقسیم بین دو سیم</span>
</div>
<p class="copper-convert__asset-hint">
مانده <span class="copper-convert__measure"><bdi>{{ assetUnit }}</bdi><bdi>{{ formatAssetAmount(remainderAmount) }}</bdi></span> است. هر زبانه فقط عدد صحیح حلقه است؛ اعشاری که به یک حلقه نرسد در دارایی می‌ماند.
با این مقدار می‌توانید <bdi>{{ wire15Rings }}</bdi> حلقه سیم ۱.۵ و <bdi>{{ wire25Rings }}</bdi> حلقه سیم ۲.۵ ببرید. این دو زبانه مکمل‌اند و با هم روی همین مقدار تنظیم می‌شوند.
</p>
<div class="copper-convert__weight">
@@ -144,9 +106,8 @@
</div>
<div
class="app-touch-slider copper-convert__slider"
@touchstart.stop
@touchmove.stop
@pointerdown.stop
@mousedown.capture="dragHandleOnly"
@touchstart.capture="dragHandleOnly"
>
<a-slider
v-model:value="wire15Rings"
@@ -171,9 +132,8 @@
</div>
<div
class="app-touch-slider copper-convert__slider"
@touchstart.stop
@touchmove.stop
@pointerdown.stop
@mousedown.capture="dragHandleOnly"
@touchstart.capture="dragHandleOnly"
>
<a-slider
v-model:value="wire25Rings"
@@ -189,27 +149,65 @@
<span class="copper-convert__measure"><bdi>عدد حلقه</bdi><bdi>{{ maxRings25 }}</bdi></span>
</div>
</div>
</section>
<section v-if="result" class="copper-convert__result">
<div class="copper-convert__result-head">
<span class="copper-convert__result-kicker">خروجی</span>
<span class="copper-convert__result-title">نتیجه تبدیل</span>
</div>
<div class="copper-convert__rings">
<article class="copper-convert__ring-card">
<span class="copper-convert__ring-badge" dir="ltr">۱.۵ mm²</span>
<p class="copper-convert__ring-count" dir="ltr">{{ wire15Rings }}</p>
<p class="copper-convert__ring-caption">حلقه می‌توانید ببرید</p>
</article>
<article class="copper-convert__ring-card">
<span class="copper-convert__ring-badge" dir="ltr">۲.۵ mm²</span>
<p class="copper-convert__ring-count" dir="ltr">{{ wire25Rings }}</p>
<p class="copper-convert__ring-caption">حلقه می‌توانید ببرید</p>
</article>
</div>
<div class="copper-convert__summary">
<div class="copper-convert__summary-row">
<span>ارزش معادل</span>
<strong class="copper-convert__measure"><small>ریال</small><bdi>{{ formatRial(result.totalValueRial) }}</bdi></strong>
</div>
<div class="copper-convert__summary-row">
<span>معادل مفتول</span>
<strong class="copper-convert__measure"><small>کیلو</small><bdi>{{ formatKg(result.equivalentMaftoulKg) }}</bdi></strong>
</div>
</div>
</section>
<section class="copper-convert__split">
<p class="copper-convert__asset-hint">
اعشار مانده: <span class="copper-convert__measure"><bdi>{{ assetUnit }}</bdi><bdi>{{ formatAssetAmount(leftoverAmount) }}</bdi></span> نگه داشته می‌شود.
از مقدار انتخاب‌شده، <span class="copper-convert__measure"><bdi>{{ assetUnit }}</bdi><bdi>{{ formatAssetAmount(leftoverAmount) }}</bdi></span> به حلقهٔ کامل نمی‌رسد و در دارایی می‌ماند. باقی دارایی که روی زبانه انتخاب نشده هم دست‌نخورده می‌ماند.
</p>
<BasicButton
type="primary"
class="!w-full"
:loading="submitting"
:disabledB="wire15Rings + wire25Rings < 1"
@click="submitRequest"
>
ثبت درخواست تبدیل
</BasicButton>
<p v-if="editingId" class="copper-convert__asset-hint">
در حال ویرایش درخواست در انتظار تایید. ذخیره، همان درخواست را به‌روز می‌کند.
</p>
<div :class="editingId ? 'grid grid-cols-2 gap-2' : ''">
<BasicButton
type="primary"
class="!w-full"
html-type="button"
:loading="submitting"
:disabledB="wire15Rings + wire25Rings < 1"
@click="submitRequest"
>
{{ editingId ? 'ذخیره ویرایش' : 'ثبت درخواست تبدیل' }}
</BasicButton>
<BasicButton v-if="editingId" class="!w-full" html-type="button" :disabledB="submitting" @click="cancelEdit">
انصراف
</BasicButton>
</div>
<p class="copper-convert__asset-hint">
درخواست برای ادمین می‌رود. بعد از تأیید، همان مقدار دارایی فروخته و حلقه‌های انتخاب‌شده خریده می‌شود.
</p>
</section>
<p v-if="!result && amountAttempted && !loading" class="copper-convert__warn">
مقدار معتبر وارد کنید و از فعال بودن قیمت کاتد/مفتول در سامانه مطمئن شوید.
</p>
</a-spin>
</div>
</template>
@@ -227,7 +225,6 @@ const {
assetUnit,
sliderAmount,
sliderStep,
remainderAmount,
maxRings15,
maxRings25,
wire15Rings,
@@ -235,12 +232,22 @@ const {
leftoverAmount,
submitting,
submitRequest,
editingId,
cancelEdit,
result,
priceRows,
} = useCopperConvertPageContext()
const amountAttempted = computed(() => sliderAmount.value > 0)
function dragHandleOnly(event: Event) {
const target = event.target
if (target instanceof Element && target.closest('.ant-slider-handle')) {
return
}
event.stopPropagation()
}
const sourceOptions = computed(() => [
{ label: 'کاتد', value: 'katod' as CopperConvertSource },
{ label: 'مفتول', value: 'maftoul' as CopperConvertSource },
@@ -274,12 +281,6 @@ function formatKg(value: number) {
if (value >= 10) return value.toFixed(2)
return value.toFixed(3)
}
function formatRings(value: number) {
if (value >= 100) return value.toFixed(1)
if (value >= 10) return value.toFixed(2)
return value.toFixed(3)
}
</script>
<style scoped>
@@ -0,0 +1,126 @@
<template>
<section
:class="side
? 'flex min-h-0 min-w-0 flex-1 flex-col'
: 'mt-3 flex flex-col gap-2 rounded-xl border border-gray-200 bg-white p-2.5'"
aria-label="تاریخچه تبدیل"
>
<div :class="side ? 'dwallet-side__header' : ''">
<div>
<h2 :class="side ? 'dwallet-side__title' : 'm-0 text-sm font-bold text-slate-900'">تاریخچه تبدیل</h2>
</div>
</div>
<div :class="side ? 'dwallet-side__scroll' : ''">
<a-spin :spinning="historyLoading && !history.length">
<div v-if="historyLoading && !history.length" class="min-h-16" />
<p
v-else-if="!history.length"
class="m-0 rounded-lg bg-slate-50 px-3 py-4 text-center text-xs text-slate-500"
>
درخواست تبدیلی ثبت نشده است.
</p>
<ul v-else class="m-0 flex list-none flex-col gap-2 p-0">
<li
v-for="item in history"
:key="item.id"
class="rounded-lg border p-2.5"
:class="editingId === item.id ? 'border-amber-400' : 'border-gray-200'"
>
<div class="flex flex-wrap items-center justify-between gap-2">
<span class="text-xs text-slate-500">{{ item.created_at ? toJalali(item.created_at) : '—' }}</span>
<span class="inline-flex items-center gap-1 text-xs text-slate-600">
<button
v-if="item.status === 'pending'"
type="button"
class="inline-flex h-7 w-7 items-center justify-center rounded-md border border-gray-200 bg-white"
aria-label="ویرایش درخواست"
title="ویرایش"
@click="beginEdit(item)"
>
<BasicIcon icon="vuesax-linear:edit" size="15" />
</button>
وضعیت
<a-tag class="!m-0" :color="statusColor(item.status)">{{ statusLabel(item.status) }}</a-tag>
</span>
</div>
<div class="mt-2 grid grid-cols-2 gap-x-3 gap-y-1 text-xs text-slate-600">
<span>دارایی: <b class="text-slate-900">{{ sourceLabel(item.source) }}</b></span>
<span>
مقدار:
<b class="text-slate-900">
<bdi>{{ item.asset_unit }}</bdi>
<bdi> {{ formatAmount(item.consumed_amount) }}</bdi>
</b>
</span>
<span>حلقه ۱.۵: <b class="text-slate-900">{{ item.wire15_rings }}</b></span>
<span>حلقه ۲.۵: <b class="text-slate-900">{{ item.wire25_rings }}</b></span>
<span v-if="Number(item.leftover_amount) > 0" class="col-span-2">
مانده در دارایی:
<b class="text-slate-900">
<bdi>{{ item.asset_unit }}</bdi>
<bdi> {{ formatAmount(item.leftover_amount) }}</bdi>
</b>
</span>
</div>
<div v-if="item.status === 'pending'" class="mt-2 flex">
<a-button
size="small"
danger
:loading="deletingId === item.id"
@click="deleteRequest(item.id)"
>
حذف
</a-button>
</div>
</li>
</ul>
</a-spin>
</div>
</section>
</template>
<script lang="ts" setup>
import { computed } from 'vue'
import BasicIcon from '@/components/BasicPacks/BasicIcon.vue'
import { toJalali } from '@/utils/useDateTime'
import { useCopperConvertPageContext } from '../composables/useCopperConvertPage'
const props = withDefaults(defineProps<{ variant?: 'stack' | 'side' }>(), {
variant: 'stack',
})
const side = computed(() => props.variant === 'side')
const { history, historyLoading, editingId, beginEdit, deleteRequest, deletingId } =
useCopperConvertPageContext()
function sourceLabel(source: string) {
if (source === 'katod') return 'کاتد'
if (source === 'maftoul') return 'مفتول'
if (source === 'shamsh') return 'شمش'
return source
}
function statusLabel(status: string) {
if (status === 'pending') return 'در انتظار تایید'
if (status === 'approved') return 'تایید شد'
if (status === 'rejected') return 'رد شد'
return status
}
function statusColor(status: string) {
if (status === 'approved') return 'green'
if (status === 'rejected') return 'red'
return 'orange'
}
function formatAmount(value: number) {
const amount = Number(value)
if (!Number.isFinite(amount)) return '—'
return amount.toLocaleString('en-US', { maximumFractionDigits: 3 })
}
</script>
@@ -1,6 +1,7 @@
import {
computed,
inject,
nextTick,
onMounted,
onUnmounted,
provide,
@@ -10,9 +11,15 @@ import {
type InjectionKey,
type Ref,
} from 'vue'
import { createCopperConvertRequest } from '@/api/copperConvert'
import {
createCopperConvertRequest,
deleteCopperConvertRequest,
getCopperConvertRequests,
updateCopperConvertRequest,
type CopperConvertHistoryRow,
} from '@/api/copperConvert'
import { getProducts } from '@/api/products'
import { message } from 'ant-design-vue'
import { message, Modal } from 'ant-design-vue'
import { useWalletAssets } from '@/composables/useWalletAssets'
import type { Product } from '@/models/products'
import type { WalletInventoryCard } from '@/models/walletAssets'
@@ -47,6 +54,13 @@ export interface CopperConvertPageContext {
leftoverAmount: ComputedRef<number>
submitting: Ref<boolean>
submitRequest: () => Promise<void>
editingId: Ref<number | null>
beginEdit: (row: CopperConvertHistoryRow) => Promise<void>
cancelEdit: () => void
deleteRequest: (id: number) => void
deletingId: Ref<number>
history: Ref<CopperConvertHistoryRow[]>
historyLoading: Ref<boolean>
prices: ComputedRef<CopperConvertPrices>
result: ComputedRef<CopperConvertResult | null>
priceRows: ComputedRef<{ label: string; value: string; missing?: boolean }[]>
@@ -142,6 +156,10 @@ export function useCopperConvertPage() {
const wire25Rings = ref(0)
const submitting = ref(false)
const catalog = ref<Product[]>([])
const history = ref<CopperConvertHistoryRow[]>([])
const historyLoading = ref(true)
const editingId = ref<number | null>(null)
const deletingId = ref(0)
const { assetsSummary, loadWalletAssets } = useWalletAssets()
const assetCards = computed(() => {
@@ -182,8 +200,7 @@ export function useCopperConvertPage() {
watch(source, () => {
sliderAmount.value = assetAmount.value
wire15Rings.value = 0
wire25Rings.value = 0
applyDefaultSplit()
})
watch(
@@ -235,56 +252,173 @@ export function useCopperConvertPage() {
return prices.value.shamshPerKg
})
const remainderValue = computed(() =>
quantityToKg(remainderAmount.value, assetUnit.value, sourceProduct.value) * sourceUnitPrice.value,
)
const selectedValue = computed(() => result.value?.totalValueRial ?? 0)
const maxRings15 = computed(() => {
const price = prices.value.wireRing15
if (price <= 0 || remainderValue.value <= 0) return 0
return Math.floor(remainderValue.value / price)
if (price <= 0 || selectedValue.value <= 0) return 0
return Math.floor(selectedValue.value / price)
})
const maxRings25 = computed(() => {
const price = prices.value.wireRing25
const left = remainderValue.value - wire15Rings.value * prices.value.wireRing15
if (price <= 0 || left <= 0) return 0
return Math.floor(left / price)
if (price <= 0 || selectedValue.value <= 0) return 0
return Math.floor(selectedValue.value / price)
})
function rings25For(rings15: number) {
const price = prices.value.wireRing25
const left = selectedValue.value - rings15 * prices.value.wireRing15
if (price <= 0 || left <= 0) return 0
return Math.min(maxRings25.value, Math.floor(left / price))
}
function rings15For(rings25: number) {
const price = prices.value.wireRing15
const left = selectedValue.value - rings25 * prices.value.wireRing25
if (price <= 0 || left <= 0) return 0
return Math.min(maxRings15.value, Math.floor(left / price))
}
function defaultSplit() {
const value = selectedValue.value
const price15 = prices.value.wireRing15
if (value <= 0 || price15 <= 0) return { rings15: 0, rings25: 0 }
const rings15 = Math.min(maxRings15.value, Math.floor(value / 2 / price15))
return { rings15, rings25: rings25For(rings15) }
}
let splitLock = false
function writeRings(rings15: number, rings25: number) {
splitLock = true
wire15Rings.value = rings15
wire25Rings.value = rings25
splitLock = false
}
function applyDefaultSplit() {
const split = defaultSplit()
writeRings(split.rings15, split.rings25)
}
const leftoverAmount = computed(() => {
const spent = wire15Rings.value * prices.value.wireRing15 + wire25Rings.value * prices.value.wireRing25
const leftValue = Math.max(0, remainderValue.value - spent)
const leftValue = Math.max(0, selectedValue.value - spent)
const perUnit = sourceUnitPrice.value
if (perUnit <= 0) return remainderAmount.value
if (perUnit <= 0) return 0
return roundAmount(kgToNative(leftValue / perUnit, assetUnit.value, sourceProduct.value))
})
watch([wire15Rings, maxRings15, maxRings25], () => {
const next15 = Math.max(0, Math.min(maxRings15.value, Math.floor(wire15Rings.value)))
if (next15 !== wire15Rings.value) wire15Rings.value = next15
const next25 = Math.max(0, Math.min(maxRings25.value, Math.floor(wire25Rings.value)))
if (next25 !== wire25Rings.value) wire25Rings.value = next25
})
watch(sliderAmount, () => applyDefaultSplit(), { flush: 'sync' })
watch(selectedValue, (value, prev) => {
if ((prev ?? 0) <= 0 && value > 0) applyDefaultSplit()
}, { flush: 'sync' })
watch(wire15Rings, (value) => {
if (splitLock) return
const next15 = Math.max(0, Math.min(maxRings15.value, Math.floor(value)))
writeRings(next15, rings25For(next15))
}, { flush: 'sync' })
watch(wire25Rings, (value) => {
if (splitLock) return
const next25 = Math.max(0, Math.min(maxRings25.value, Math.floor(value)))
writeRings(rings15For(next25), next25)
}, { flush: 'sync' })
function hasPendingRequest() {
return history.value.some((row) => row.status === 'pending')
}
async function beginEdit(row: CopperConvertHistoryRow) {
if (row.status !== 'pending' || submitting.value) return
editingId.value = row.id
if (row.source === 'katod' || row.source === 'maftoul' || row.source === 'shamsh') {
source.value = row.source
}
await nextTick()
const rings15 = Math.max(0, Math.min(maxRings15.value, Math.floor(Number(row.wire15_rings) || 0)))
const rings25 = Math.min(Math.floor(Number(row.wire25_rings) || 0), rings25For(rings15))
writeRings(rings15, Math.max(0, rings25))
const forms = document.querySelectorAll('[data-convert-form]')
const visible = [...forms].find((node) => node instanceof HTMLElement && node.getClientRects().length > 0)
visible?.scrollIntoView({ behavior: 'smooth', block: 'start' })
}
function cancelEdit() {
if (submitting.value) return
editingId.value = null
applyDefaultSplit()
}
function deleteRequest(id: number) {
if (deletingId.value || submitting.value) return
const row = history.value.find((item) => item.id === id)
if (!row || row.status !== 'pending') return
Modal.confirm({
title: 'حذف درخواست',
content: 'این درخواست در انتظار تایید حذف شود؟',
okText: 'حذف',
cancelText: 'انصراف',
okType: 'danger',
async onOk() {
deletingId.value = id
try {
await deleteCopperConvertRequest(id)
if (editingId.value === id) editingId.value = null
message.success('درخواست تبدیل حذف شد')
await loadHistory()
} finally {
deletingId.value = 0
}
},
})
}
async function submitRequest() {
if (submitting.value) return
if (wire15Rings.value + wire25Rings.value < 1) return
if (!editingId.value && hasPendingRequest()) {
message.warning('یک درخواست در انتظار تایید دارید. همان را ویرایش یا حذف کنید.')
return
}
submitting.value = true
try {
await createCopperConvertRequest({
const payload = {
source: source.value,
rings15: wire15Rings.value,
rings25: wire25Rings.value,
})
}
if (editingId.value) {
await updateCopperConvertRequest(editingId.value, payload)
editingId.value = null
message.success('درخواست تبدیل به‌روز شد')
} else {
await createCopperConvertRequest(payload)
message.success('درخواست تبدیل برای تأیید ادمین ثبت شد')
}
wire15Rings.value = 0
wire25Rings.value = 0
message.success('درخواست تبدیل برای تأیید ادمین ثبت شد')
void loadHistory()
} finally {
submitting.value = false
}
}
async function loadHistory() {
historyLoading.value = true
try {
const rows = await getCopperConvertRequests()
history.value = Array.isArray(rows) ? rows : []
} catch {
// خطای شبکه را اینترسپتور نشان می‌دهد؛ لیست قبلی می‌ماند
} finally {
historyLoading.value = false
}
}
const priceRows = computed(() => {
const p = prices.value
const row = (label: string, amount: number) => ({
@@ -309,6 +443,7 @@ export function useCopperConvertPage() {
getLastPrices(),
getProducts(),
loadWalletAssets(),
loadHistory(),
])
catalog.value = Array.isArray(list) ? list : []
} catch {
@@ -342,6 +477,13 @@ export function useCopperConvertPage() {
leftoverAmount,
submitting,
submitRequest,
editingId,
beginEdit,
cancelEdit,
deleteRequest,
deletingId,
history,
historyLoading,
prices,
result,
priceRows,
@@ -1,77 +1,43 @@
<template>
<div class="dconvert">
<div class="dconvert__container">
<header class="dconvert-topbar">
<button type="button" class="dconvert-topbar__back" @click="router.back()">
<BasicIcon icon="vuesax-linear:arrow-right-1" size="18" />
<span>بازگشت</span>
</button>
<div class="dconvert-topbar__meta">
<p class="dconvert-topbar__eyebrow">محصول</p>
<h1 class="dconvert-topbar__title">تبدیل محصول</h1>
</div>
</header>
<div class="dwallet" dir="rtl">
<div class="dwallet__container">
<DesktopPageTopbar
eyebrow="محصول"
title="تبدیل محصول"
subtitle="تبدیل کاتد، مفتول یا شمش به حلقه سیم"
show-back
/>
<section class="dconvert-surface">
<CopperConvertCalculator />
</section>
<div class="dwallet-grid dconvert-grid">
<section class="dwallet-surface dwallet-form">
<CopperConvertCalculator />
</section>
<section class="dwallet-surface dwallet-side dconvert-side">
<CopperConvertHistory variant="side" />
</section>
</div>
</div>
</div>
</template>
<script lang="ts" setup>
import BasicIcon from '@/components/BasicPacks/BasicIcon.vue'
import router from '@/router'
import DesktopPageTopbar from '@/layouts/components/DesktopPageTopbar.vue'
import CopperConvertCalculator from '../components/CopperConvertCalculator.vue'
import CopperConvertHistory from '../components/CopperConvertHistory.vue'
</script>
<style scoped lang="less">
.dconvert {
.dconvert-grid {
align-items: stretch;
}
.dconvert-side {
min-height: 100%;
padding: 1.25rem 1.5rem 2rem;
}
.dconvert__container {
max-width: 720px;
margin: 0 auto;
}
.dconvert-topbar {
display: flex;
align-items: center;
gap: 0.75rem;
margin-bottom: 1rem;
}
.dconvert-topbar__back {
display: inline-flex;
align-items: center;
gap: 0.25rem;
border: none;
background: transparent;
color: var(--colorPrimary, #2563eb);
font-family: inherit;
font-weight: 700;
cursor: pointer;
}
.dconvert-topbar__eyebrow {
margin: 0;
font-size: 0.75rem;
color: #64748b;
}
.dconvert-topbar__title {
margin: 0;
font-size: 1.25rem;
font-weight: 800;
color: #0f172a;
}
.dconvert-surface {
border: 1px solid #e5e7eb;
border-radius: 0.875rem;
background: #fff;
padding: 1.25rem;
:deep(.dwallet-side__scroll) {
max-height: none;
flex: 1;
}
}
</style>
@@ -1,10 +1,11 @@
<template>
<div>
<MobilePageHeader title="تبدیل محصول" show-back />
<div class="px-5 mpage-content pb-2">
<div class="px-5 mpage-content pb-[calc(var(--app-bottom-chrome-height)+1rem)]">
<div class="border-gray-200 border-1 rounded-xl p-4 relative bg-white">
<CopperConvertCalculator />
</div>
<CopperConvertHistory />
</div>
</div>
</template>
@@ -12,4 +13,5 @@
<script lang="ts" setup>
import MobilePageHeader from '@/layouts/components/MobilePageHeader.vue'
import CopperConvertCalculator from '../components/CopperConvertCalculator.vue'
import CopperConvertHistory from '../components/CopperConvertHistory.vue'
</script>
+1 -15
View File
@@ -124,23 +124,9 @@
<!-- <div>{{form?.goldValue? true: false}}</div>-->
<div v-if="isBuy? ((form?.goldValue || form.goldValue === 0)? form?.goldCash < 500000: false) : false"
class="text-red-700 text-xs font-bold mt-2">
حداقل مقدار طلا جهت خرید 500,000 ریال می باشد.
حداقل مقدار مس جهت خرید 500,000 ریال می باشد.
</div>
</a-form-item>
<div class=" w-full bottom-18 px-6 rounded-xl py-1 border-1 bg-white">
<!-- <BasicInfoItem is-line title="کارمزد" :value="parseFloat(((form.goldValue?? 0)*0.005).toFixed(3))" />-->
<!-- <BasicInfoItem is-line title="کارمزد" :value="parseFloat(((form.goldValue?? 0)*0.005).toFixed(3))" />-->
<div class="flex justify-between items-center">
<div>کارمزد:</div>
<div class="flex gap-2 items-center">
<div class="">{{ feeInGrams }}</div>
<!-- <div class="font-bold text-2xl">{{ 0 }}</div>-->
<div>
گرم
</div>
</div>
</div>
</div>
</a-form>
<!-- <div ref="el" :class="loading? 'h-screen': ''"
class="px-3 overflow-y-scroll w-full h-[49vh] pb-25 max-h-[35vh]">
@@ -44,8 +44,8 @@
شیوهٔ خرید از گروسی گالری
</div>
<div :class="variant === 'desktop' ? 'deducate-content__text' : 'mt-5 text-xs leading-5'">
• سپس از بخش «خرید و فروش» انتخاب کنید که طلای آب‌شده می‌خواهید یا محصولات دیگر (شامل گوی، شمش یا مکعب).<br />
• توجه داشته باشید کارمزد طلای آب‌شده حدود ۲٪ است و کارمزد ریالی محصولات دیگر در پایین صفحه قیمت درج شده است.
• سپس از بخش «خرید و فروش» محصول مورد نظر خود (شامل کاتد مس، مفتول مس یا سیم) را انتخاب کنید.<br />
• قیمت‌های اعلام‌شده نهایی بوده و هیچ‌گونه کارمزد جداگانه‌ای از مشتری دریافت نمی‌شود.
</div>
<img :src="img4" :class="variant === 'desktop' ? 'deducate-content__image' : ''" />
-12
View File
@@ -141,7 +141,6 @@
class="text-red-700 text-xs font-bold mt-2">
مقدار {{ weightUnit }} وارد شده جهت فروش ({{ form.goldValue }}{{ weightUnit }}) بیشتر از مقدار موجودی شما
({{ productWalletBalance }}{{ weightUnit }}) می باشد.
<span v-if="feeDeductFromGold"> (با احتساب {{ feeInGrams }}{{ weightUnit }} کارمزد، مجموعاً {{ sellGoldDebit }}{{ weightUnit }} کسر می‌شود)</span>
</div>
<!-- <div>{{form?.goldValue? true: false}}</div>-->
<div v-if="isBuy ? (payablePrice > cashWalletBalance) : false"
@@ -149,17 +148,6 @@
موجودی کیف پول ناکافی می باشد.
</div>
</a-form-item>
<div class="w-full px-4 rounded-2xl py-2 border-1 bg-white gold-fee-box">
<div class="flex justify-between items-center">
<div>کارمزد:</div>
<div class="flex gap-2 items-center">
<div class="">{{ feeInGrams }}</div>
<div>
{{ weightUnit }}
</div>
</div>
</div>
</div>
</a-form>
<!-- <div ref="el" :class="loading? 'h-screen': ''"
class="px-3 overflow-y-scroll w-full h-[49vh] pb-25 max-h-[35vh]">
+40 -71
View File
@@ -29,31 +29,15 @@
</template>
<template v-else>
<div class="price-label price-label--boursecu">
قیمت لحظه‌ای کاتد مس
</div>
<div class="w-full items-center flex justify-center">
<div v-if="price" class="flex gap-1 text-xs items-center">
<div
v-if="percentChange !== 0"
class="price-change-badge"
:class="percentChange > 0 ? 'price-change-badge--up' : 'price-change-badge--down'"
>
<Icon
:key="displayGoldVal"
:size="15"
:icon="percentChange > 0 ? 'vuesax-linear:send' : 'vuesax-linear:received'"
:color="percentChange > 0 ? 'green-600' : 'red-600'"
/>
<span class="price-change-badge__value">{{ formatSignedPercentChange(percentChange) }}</span>
</div>
<span
class="o-text !text-xl font-bold price-odometer--boursecu"
style="direction: ltr"
>{{ usePriceWithoutType(displayGoldVal) }}</span>
<span class="price-unit--boursecu">ریال</span>
</div>
</div>
<ul class="hero-quotes">
<li v-for="row in quoteRows" :key="row.label" class="hero-quotes__row">
<span class="hero-quotes__label">{{ row.label }}</span>
<span class="hero-quotes__value" dir="ltr">
<bdi>{{ row.value }}</bdi>
<small v-if="row.unit">{{ row.unit }}</small>
</span>
</li>
</ul>
</template>
</div>
</template>
@@ -62,7 +46,7 @@
import { computed } from 'vue'
import Icon from '@/components/BasicPacks/BasicIcon.vue'
import { useUserStore } from '@/store/userStore'
import { getTradeBuyPrice, lastPrice, percentPriceChanged, price } from '@/utils/price'
import { useHomeQuoteRows } from '@/views/base/home/composables/useHomeQuoteRows'
import {
NO_QUOTE_MESSAGE,
STORE_CLOSED_TITLE,
@@ -70,7 +54,6 @@ import {
getStoreClosedHint,
isHomeQuotePending,
} from '@/utils/storeHours'
import { formatSignedPercentChange, usePriceWithoutType } from '@/utils/usePrice'
const userStore = useUserStore()
@@ -98,17 +81,7 @@ const containerClass = computed(() => {
return 'boursecu-price-box boursecu-price-box--open'
})
const percentChange = computed(() => {
if (!getTradeBuyPrice(lastPrice.value)) return 0
return percentPriceChanged()
})
const displayGoldVal = computed(() => {
if (displayState.value !== 'open') return 0
return getTradeBuyPrice(lastPrice.value)
})
void price
const { quoteRows } = useHomeQuoteRows()
</script>
<style scoped>
@@ -128,20 +101,42 @@ void price
min-height: 88px;
}
.price-label--boursecu {
.hero-quotes {
display: flex;
flex-direction: column;
gap: 8px;
margin: 0;
padding: 0 12px;
list-style: none;
}
.hero-quotes__row {
display: flex;
align-items: baseline;
justify-content: space-between;
gap: 8px;
min-width: 0;
}
.hero-quotes__label {
color: rgba(255, 255, 255, 0.92);
font-size: 12px;
font-weight: 600;
width: 100%;
text-align: center;
min-width: 0;
}
.price-odometer--boursecu {
color: #ffffff !important;
.hero-quotes__value {
color: #fff;
font-size: 13px;
font-weight: 700;
font-variant-numeric: tabular-nums;
white-space: nowrap;
}
.price-unit--boursecu {
color: rgba(255, 255, 255, 0.85);
.hero-quotes__value small {
margin-left: 4px;
color: rgba(255, 255, 255, 0.8);
font-size: 11px;
font-weight: 500;
}
@@ -191,30 +186,4 @@ void price
.status-box--boursecu .status-box__hint {
color: rgba(255, 255, 255, 0.78);
}
.price-change-badge {
display: inline-flex;
align-items: center;
gap: 0.35rem;
padding: 0.2rem 0.65rem;
border-radius: 0.5rem;
font-weight: 600;
}
.price-change-badge--up {
background: #dcfce7;
color: #16a34a;
}
.price-change-badge--down {
background: #fee2e2;
color: #dc2626;
}
.price-change-badge__value {
direction: ltr;
unicode-bidi: isolate;
font-variant-numeric: tabular-nums;
letter-spacing: 0.01em;
}
</style>
@@ -62,6 +62,7 @@ import {
formatPortfolioProfitPercent,
formatPortfolioProfitText,
resolveAssetsRialValue,
resolveBoursecuCopperUnit,
} from '@/utils/productAssets'
import { formatWeightAmount, usePriceWithoutType } from '@/utils/usePrice'
import { getTradeBuyPrice, lastPrice } from '@/utils/price'
@@ -76,7 +77,7 @@ const props = withDefaults(
const { assetsSummary } = useWalletAssets()
const portfolio = computed(() => assetsSummary.value?.portfolio)
const weightUnit = computed(() => assetsSummary.value?.meta?.weight_unit || 'گرم')
const weightUnit = computed(() => resolveBoursecuCopperUnit(assetsSummary.value?.meta?.weight_unit))
const totalRial = computed(() =>
Number(portfolio.value?.total_rial_value ?? assetsSummary.value?.total_rial_value ?? 0)
@@ -43,6 +43,7 @@ import {
formatPortfolioProfitLabel,
formatPortfolioProfitPercent,
formatPortfolioProfitText,
resolveBoursecuCopperUnit,
} from '@/utils/productAssets'
const props = withDefaults(
@@ -55,7 +56,7 @@ const props = withDefaults(
const { assetsSummary } = useWalletAssets()
const portfolio = computed(() => assetsSummary.value?.portfolio)
const weightUnit = computed(() => assetsSummary.value?.meta?.weight_unit || 'گرم')
const weightUnit = computed(() => resolveBoursecuCopperUnit(assetsSummary.value?.meta?.weight_unit))
const hasProfitInsight = computed(() => portfolio.value?.unrealized_profit_rial != null)
const profitTone = computed(() => formatPortfolioProfitLabel(portfolio.value?.unrealized_profit_rial))
@@ -0,0 +1,119 @@
import { computed, ref, watch } from 'vue'
import { lastPrice } from '@/utils/price'
import { usePriceWithoutType } from '@/utils/usePrice'
const BOARD_FEED_URL = 'https://price.zaarbox.ir/api/free'
type BoardRefs = { copper: number; dollar: number }
const boardCache = ((globalThis as typeof globalThis & {
__boursecuBoardRefs?: { started: boolean; refs: BoardRefs | null }
}).__boursecuBoardRefs ??= { started: false, refs: null })
function boardRowTotal(row: Record<string, unknown>): number {
const price = Math.round(Number(row.price) || 0)
if (price <= 0) return 0
return price + Math.round(Number(row.profit) || 0)
}
function worldCopperScore(row: Record<string, unknown>): number | null {
const key = String(row.key ?? '').trim().toLowerCase()
const name = String(row.name ?? '').trim()
if (key.includes('basemetal_london_copper')) return 0
if (name === 'TGJU فلز مس') return 1
if (name.includes('مس جهانی')) return 2
return null
}
function freeDollarScore(row: Record<string, unknown>): number | null {
const key = String(row.key ?? '').trim().toLowerCase()
const name = String(row.name ?? '').trim()
if (key.includes('copper') || name.includes('کاتد') || name.includes('مس')) return null
if (key === 'tgju_usd') return 0
if (name === 'TGJU دلار' || name === 'tgju دلار آمریکا') return 1
if (name.includes('دلار') && name.includes('آزاد')) return 2
return null
}
function pickBoardRefs(rows: unknown[]) {
let copper = 0
let dollar = 0
let copperScore = Number.POSITIVE_INFINITY
let dollarScore = Number.POSITIVE_INFINITY
for (const item of rows) {
if (!item || typeof item !== 'object') continue
const row = item as Record<string, unknown>
const total = boardRowTotal(row)
if (total <= 0) continue
const copperRank = worldCopperScore(row)
if (copperRank !== null && copperRank < copperScore) {
copperScore = copperRank
copper = total
}
const dollarRank = freeDollarScore(row)
if (dollarRank !== null && dollarRank < dollarScore) {
dollarScore = dollarRank
dollar = total
}
}
return copper > 0 && dollar > 0 ? { copper, dollar } : null
}
const sharedBoardRefs = ref<BoardRefs | null>(boardCache.refs)
export function useHomeQuoteRows() {
function ensureBoardRefs() {
const liveCopper = Number(lastPrice.value?.copper_world ?? 0)
const liveDollar = Number(lastPrice.value?.dollar_free ?? 0)
if (liveCopper > 0 && liveDollar > 0) return
if (boardCache.refs) {
sharedBoardRefs.value = boardCache.refs
return
}
if (boardCache.started) return
boardCache.started = true
void fetch(BOARD_FEED_URL)
.then((res) => res.json())
.then((rows: unknown) => {
if (!Array.isArray(rows)) return
const picked = pickBoardRefs(rows)
if (!picked) return
boardCache.refs = picked
sharedBoardRefs.value = picked
})
.catch(() => {
boardCache.started = false
})
}
watch(lastPrice, () => ensureBoardRefs(), { immediate: true })
const quoteRows = computed(() => {
const fromServer = Number(lastPrice.value?.copper_world ?? 0) > 0
&& Number(lastPrice.value?.dollar_free ?? 0) > 0
const copper = fromServer
? Number(lastPrice.value?.copper_world)
: (sharedBoardRefs.value?.copper ?? 0)
const dollar = fromServer
? Number(lastPrice.value?.dollar_free)
: (sharedBoardRefs.value?.dollar ?? 0)
const tonText = String(lastPrice.value?.copper_ton ?? '')
const kiloText = String(lastPrice.value?.copper_kilo ?? '')
const ton = fromServer && tonText !== '' && tonText !== '0'
? Number(tonText)
: (copper > 0 && dollar > 0 ? copper * dollar : 0)
const kilo = fromServer && kiloText !== '' && kiloText !== '0'
? Number(kiloText)
: (ton > 0 ? ton / 1000 : 0)
const text = (value: number) => (value > 0 ? usePriceWithoutType(value) : '—')
return [
{ label: 'قیمت مس جهانی', value: text(copper), unit: copper > 0 ? 'دلار' : '' },
{ label: 'قیمت دلار بازار آزاد', value: text(dollar), unit: dollar > 0 ? 'ریال' : '' },
{ label: 'قیمت تن', value: text(ton), unit: ton > 0 ? 'ریال' : '' },
{ label: 'قیمت کیلوگرم', value: text(kilo), unit: kilo > 0 ? 'ریال' : '' },
]
})
return { quoteRows }
}
@@ -20,7 +20,6 @@ const ctx = inject(HOME_PAGE_CONTEXT_KEY)!
<component
:is="embedded ? 'div' : DesktopHomeSection"
v-if="ctx.bannerEnabled.value && ctx.banners.value?.length"
:title="embedded ? undefined : 'بنرها'"
class="dhome-banners"
:class="{ 'dhome-banners--embedded': embedded }"
>
@@ -32,27 +32,15 @@
</template>
<template v-else>
<span class="dhome-label dhome-label--boursecu">
قیمت لحظه‌ای کاتد مس
</span>
<div class="dhome-hero-price__value-row">
<span
v-if="percentChange !== 0"
class="dhome-hero-price__delta"
:class="percentChange > 0 ? 'dhome-hero-price__delta--up' : 'dhome-hero-price__delta--down'"
>
<BasicIcon
:icon="percentChange > 0 ? 'vuesax-linear:arrow-up-2' : 'vuesax-linear:arrow-down-2'"
size="14"
/>
<span class="dhome-hero-price__delta-value">{{ formatSignedPercentChange(percentChange) }}</span>
</span>
<span
class="dhome-hero-price__odometer o-text dhome-hero-price__odometer--boursecu"
style="direction: ltr"
>{{ usePriceWithoutType(displayGoldVal) }}</span>
<span class="dhome-hero-price__unit dhome-hero-price__unit--boursecu">ریال</span>
</div>
<ul class="hero-quotes">
<li v-for="row in quoteRows" :key="row.label" class="hero-quotes__row">
<span class="hero-quotes__label">{{ row.label }}</span>
<span class="hero-quotes__value" dir="ltr">
<bdi>{{ row.value }}</bdi>
<small v-if="row.unit">{{ row.unit }}</small>
</span>
</li>
</ul>
</template>
</div>
</template>
@@ -61,7 +49,7 @@
import { computed } from 'vue'
import BasicIcon from '@/components/BasicPacks/BasicIcon.vue'
import { useUserStore } from '@/store/userStore'
import { getTradeBuyPrice, lastPrice, percentPriceChanged } from '@/utils/price'
import { useHomeQuoteRows } from '@/views/base/home/composables/useHomeQuoteRows'
import {
NO_QUOTE_MESSAGE,
STORE_CLOSED_TITLE,
@@ -69,7 +57,6 @@ import {
getStoreClosedHint,
isHomeQuotePending,
} from '@/utils/storeHours'
import { formatSignedPercentChange, usePriceWithoutType } from '@/utils/usePrice'
const userStore = useUserStore()
@@ -87,15 +74,7 @@ const statusHint = computed(() => {
return 'در حال حاضر قیمتی برای نمایش وجود ندارد.'
})
const displayGoldVal = computed(() => {
if (displayState.value !== 'open') return 0
return getTradeBuyPrice(lastPrice.value)
})
const percentChange = computed(() => {
if (!getTradeBuyPrice(lastPrice.value)) return 0
return percentPriceChanged()
})
const { quoteRows } = useHomeQuoteRows()
</script>
<style scoped lang="less">
@@ -127,6 +106,44 @@ const percentChange = computed(() => {
background: rgba(255, 255, 255, 0.25);
}
.hero-quotes {
display: flex;
flex-direction: column;
gap: 8px;
margin: 0;
padding: 0;
list-style: none;
}
.hero-quotes__row {
display: flex;
align-items: baseline;
justify-content: space-between;
gap: 12px;
min-width: 0;
}
.hero-quotes__label {
color: rgba(255, 255, 255, 0.9);
font-size: 12px;
font-weight: 600;
}
.hero-quotes__value {
color: #fff;
font-size: 14px;
font-weight: 700;
font-variant-numeric: tabular-nums;
white-space: nowrap;
}
.hero-quotes__value small {
margin-left: 4px;
color: rgba(255, 255, 255, 0.8);
font-size: 11px;
font-weight: 500;
}
.dhome-hero-price__closed {
display: flex;
flex-direction: column;
@@ -8,6 +8,7 @@ import HomeSkeleton from '../components/HomeSkeleton.vue'
import { getHomeLayoutConfig } from './registry'
import { HOME_SECTION_COMPONENTS } from './sections'
import type { HomeLayoutConfig, HomeSectionId } from './types'
import BasicButton from '@/components/BasicPacks/BasicButton.vue'
const props = defineProps<{
layoutConfig?: HomeLayoutConfig
@@ -43,6 +44,11 @@ const showSkeleton = computed(() => Boolean(getToken()) && !userInfo.value)
function resolveSectionComponent(sectionId: HomeSectionId) {
return HOME_SECTION_COMPONENTS[sectionId]
}
async function retryLoad() {
if (!getToken()) return
await userStore.getMyInfo()
}
</script>
<template>
@@ -77,4 +83,13 @@ function resolveSectionComponent(sectionId: HomeSectionId) {
</div>
<HomeSkeleton v-else-if="showSkeleton" class="w-full" />
<div v-else class="home-layout-fallback flex flex-col items-center justify-center gap-3 p-6 text-center min-h-[50vh]">
<p class="text-sm text-slate-600 leading-7">
در حال آماده‌سازی صفحه اصلی هستیم. اگر چیزی نمایش داده نمی‌شود، یک‌بار تلاش مجدد کنید.
</p>
<BasicButton type="primary" class="!rounded-xl" @click="retryLoad">
تلاش مجدد
</BasicButton>
</div>
</template>
+6 -1
View File
@@ -1,6 +1,7 @@
import { defineAsyncComponent, type Component } from 'vue'
import type { HomeLayoutConfig, HomeLayoutId } from './types'
import { boursecuHomeLayoutConfig } from './configs/boursecu'
import HomeSkeleton from '../components/HomeSkeleton.vue'
export const DEFAULT_HOME_LAYOUT_ID: HomeLayoutId = 'boursecu'
@@ -12,7 +13,11 @@ let cachedLayoutRenderer: Component | null = null
function getLayoutRenderer(): Component {
if (!cachedLayoutRenderer) {
cachedLayoutRenderer = defineAsyncComponent(() => import('./HomeLayoutRenderer.vue'))
cachedLayoutRenderer = defineAsyncComponent({
loader: () => import('./HomeLayoutRenderer.vue'),
loadingComponent: HomeSkeleton,
delay: 0,
})
}
return cachedLayoutRenderer
@@ -54,7 +54,7 @@
</div>
<p :class="desktop ? 'dgift-form__hint' : 'text-xs text-gray-500 mb-2'">
خرید با {{ feeShop }}٪ کارمزد ({{ feeGateway }}٪ دیجی‌پی + {{ feeExtra }}٪) محاسبه می‌شود.
خرید اقساطی با {{ feeShop }}٪ افزایش ({{ feeGateway }}٪ دیجی‌پی + {{ feeExtra }}٪) محاسبه می‌شود.
</p>
<BasicInput
v-model:value="amountText"
@@ -116,6 +116,7 @@ import BasicInfoItem from '@/components/BasicPacks/BasicInfoItem.vue'
import DialogVant from '@/components/DialogVant.vue'
import { deletePriceTrigger, updatePriceTrigger } from '@/api/triggerPrice'
import { loading } from '@/utils'
import { usePriceTriggerPageContext } from '../composables/usePriceTriggerPage'
const infoVisible = ref(false)
const isActive = ref(false)
@@ -132,7 +133,17 @@ const props = withDefaults(
const emits = defineEmits(['edit', 'refresh'])
const productTitle = computed(() => props.item.product?.title || 'طلا')
const { products } = usePriceTriggerPageContext()
const productTitle = computed(() => {
const nested = props.item.product?.title?.trim()
if (nested) {
return nested
}
const id = Number(props.item.product_id ?? props.item.product?.id)
const match = products.value.find((product) => Number(product.id) === id)
return match?.title?.trim() || '—'
})
onMounted(() => {
isActive.value = props.item.is_active
@@ -10,7 +10,7 @@
<a-form-item :rules="[required()]" label="محصول" name="product_id">
<BasicSelect
v-model:value="form.product_id"
:items="products"
:items="productOptions"
key-name="id"
placeholder="کاتد مس، مفتول مس و..."
size="large"
@@ -62,7 +62,7 @@ const {
editId,
loading,
typeItems,
products,
productOptions,
ok,
} = usePriceTriggerPageContext()
</script>
@@ -1,4 +1,4 @@
import { inject, onMounted, provide, reactive, ref, type InjectionKey, type Ref } from 'vue'
import { computed, inject, onMounted, provide, reactive, ref, type ComputedRef, type InjectionKey, type Ref } from 'vue'
import { cloneDeep } from 'lodash'
import { type FormInstance, message } from 'ant-design-vue'
import { createPriceTrigger, getPriceTriggers, updatePriceTrigger } from '@/api/triggerPrice'
@@ -18,9 +18,24 @@ function emptyForm(): PriceTrigger {
}
}
export function resolveProductId(value: unknown): number | undefined {
if (typeof value === 'number' && Number.isFinite(value) && value > 0) {
return value
}
if (typeof value === 'string' && value.trim()) {
const id = Number(value)
return Number.isFinite(id) && id > 0 ? id : undefined
}
if (value && typeof value === 'object' && 'id' in value) {
return resolveProductId((value as { id?: unknown }).id)
}
return undefined
}
export interface PriceTriggerPageContext {
items: Ref<PriceTrigger[]>
products: Ref<Product[]>
productOptions: ComputedRef<Array<{ id: number; title: string }>>
addTriggerVisible: Ref<boolean>
editId: Ref<number | undefined>
form: Ref<PriceTrigger>
@@ -41,6 +56,14 @@ export const PRICE_TRIGGER_PAGE_CONTEXT_KEY: InjectionKey<PriceTriggerPageContex
export function usePriceTriggerPage() {
const items = ref<PriceTrigger[]>([])
const products = ref<Product[]>([])
const productOptions = computed(() =>
products.value
.map((product) => ({
id: Number(product.id),
title: String(product.title ?? '').trim(),
}))
.filter((product) => Number.isFinite(product.id) && product.id > 0 && product.title),
)
const addTriggerVisible = ref(false)
const editId = ref<number | undefined>(undefined)
const formRef = ref<FormInstance>()
@@ -72,7 +95,7 @@ export function usePriceTriggerPage() {
function openEdit(val: PriceTrigger) {
form.value = cloneDeep({
...val,
product_id: val.product_id ?? val.product?.id,
product_id: resolveProductId(val.product_id ?? val.product?.id),
})
editId.value = form.value.id
addTriggerVisible.value = true
@@ -91,21 +114,30 @@ export function usePriceTriggerPage() {
async function loadProducts() {
try {
products.value = ((await getProducts()) as Product[]) ?? []
const list = await getProducts()
products.value = Array.isArray(list) ? list : []
} catch (e) {
console.log(e)
}
}
async function ok() {
const productId = resolveProductId(form.value.product_id)
form.value.product_id = productId
await formRef.value?.validateFields().then(async () => {
try {
loading.value = true
form.value.action = 'sms'
const payload: PriceTrigger = {
product_id: productId,
price_condition: form.value.price_condition,
is_active: form.value.is_active,
action: 'sms',
target_price: form.value.target_price,
}
if (editId.value) {
await updatePriceTrigger(editId.value, form.value)
await updatePriceTrigger(editId.value, payload)
} else {
await createPriceTrigger(form.value)
await createPriceTrigger(payload)
}
message.success('هشدار با موفقیت ایجاد شد')
await initItems()
@@ -126,6 +158,7 @@ export function usePriceTriggerPage() {
const context: PriceTriggerPageContext = {
items,
products,
productOptions,
addTriggerVisible,
editId,
form,
+2 -2
View File
@@ -1,7 +1,7 @@
<template>
<div class="price-trigger-page-root">
<DesktopPriceTriggerView v-show="isDesktop" />
<MobilePriceTriggerView v-show="!isDesktop" />
<DesktopPriceTriggerView v-if="isDesktop" />
<MobilePriceTriggerView v-else />
<BasicActionSheet v-if="!isDesktop" v-model:show="addTriggerVisible" teleport="body">
<div class="font-bold text-lg mb-2">هشدار قیمت</div>
@@ -159,38 +159,7 @@
<div v-else>{{ !isBuy ? 'فروش' : 'خرید' }}</div>
</div>
</BasicButton>
<!-- <div class=" w-full !z-100 px-6 rounded-xl py-1 border-1 bg-white mt-2">
&lt;!&ndash; <BasicInfoItem is-line title="کارمزد" :value="parseFloat(((form.goldValue?? 0)*0.005).toFixed(3))" />&ndash;&gt;
&lt;!&ndash; <BasicInfoItem is-line title="کارمزد" :value="parseFloat(((form.goldValue?? 0)*0.005).toFixed(3))" />&ndash;&gt;
<div class="flex justify-between items-center">
<div>کارمزد:</div>
<div class="flex gap-2 items-center">
&lt;!&ndash; <div class="line-through">{{ parseFloat(((form.goldValue ?? 0) * 0.005).toFixed(3)) }}</div>&ndash;&gt;
&lt;!&ndash; <div>{{props.ProductItem.price}}</div>&ndash;&gt;
<div v-if="isBuy && form.method=='cash' " class="">{{
usePriceWithoutType(buyFee ?? 0)
}}
</div>
<div v-if="isBuy && form.method!='cash'" class="">{{
buyFeeGeram ?? 0
}}
</div>
<div v-if="!isBuy && form.method=='cash' " class="">{{
usePriceWithoutType(sellFee ?? 0)
}}
</div>
<div v-if="!isBuy && form.method!='cash'" class="">{{
sellFeeGeram ?? 0
}}
</div>
<div>
{{ form.method == "cash" ? "ریال" : "گرم" }}
</div>
</div>
</div>
</div>-->
<!-- <div v-if="!isBuy && form.goldValue > walletStore?.walletInfo?.gold"
class="text-red-700 text-xs font-bold mt-2">
مقدار گرم طلای وارد شده جهت فروش ({{ form.goldValue }}گرم) بیشتر از مقدار موجودی شما
@@ -238,21 +207,7 @@
</div>
</div>
<div class="flex justify-between mt-3">
<div>کارمزد:</div>
<div class="flex items-center gap-2">
<div v-if="isBuy" class="">{{
buyFee
}}
</div>
<div v-else class="">{{
sellFee
}}
</div>
<div class="text-xs mr-1">ریال</div>
</div>
</div>
<div class="flex justify-between mt-3">
<div>{{ isBuy ? 'قیمت قابل پرداخت:' : (isMetalReceiveDeal ? 'دریافت:' : 'مبلغ دریافتی:') }}</div>
@@ -118,38 +118,7 @@
<div v-else>{{ !isBuy ? 'فروش' : 'خرید' }}</div>
</div>
</BasicButton>
<!-- <div class=" w-full !z-100 px-6 rounded-xl py-1 border-1 bg-white mt-2">
&lt;!&ndash; <BasicInfoItem is-line title="کارمزد" :value="parseFloat(((form.goldValue?? 0)*0.005).toFixed(3))" />&ndash;&gt;
&lt;!&ndash; <BasicInfoItem is-line title="کارمزد" :value="parseFloat(((form.goldValue?? 0)*0.005).toFixed(3))" />&ndash;&gt;
<div class="flex justify-between items-center">
<div>کارمزد:</div>
<div class="flex gap-2 items-center">
&lt;!&ndash; <div class="line-through">{{ parseFloat(((form.goldValue ?? 0) * 0.005).toFixed(3)) }}</div>&ndash;&gt;
&lt;!&ndash; <div>{{props.ProductItem.price}}</div>&ndash;&gt;
<div v-if="isBuy && form.method=='cash' " class="">{{
usePriceWithoutType(buyFee ?? 0)
}}
</div>
<div v-if="isBuy && form.method!='cash'" class="">{{
buyFeeGeram ?? 0
}}
</div>
<div v-if="!isBuy && form.method=='cash' " class="">{{
usePriceWithoutType(sellFee ?? 0)
}}
</div>
<div v-if="!isBuy && form.method!='cash'" class="">{{
sellFeeGeram ?? 0
}}
</div>
<div>
{{ form.method == "cash" ? "ریال" : "گرم" }}
</div>
</div>
</div>
</div>-->
<!-- <div v-if="!isBuy && form.goldValue > walletStore?.walletInfo?.gold"
class="text-red-700 text-xs font-bold mt-2">
مقدار گرم طلای وارد شده جهت فروش ({{ form.goldValue }}گرم) بیشتر از مقدار موجودی شما
@@ -196,22 +165,7 @@
<div class="text-xs mr-1">ریال</div>
</div>
</div>
<div class="flex justify-between mt-3">
<div>کارمزد:</div>
<div class="flex items-center gap-2">
<div v-if="isBuy" class="">{{
buyFee
}}
</div>
<!-- <div class="font-bold line-through">{{ 0 }}</div>-->
<div v-else class="">{{
sellFee
}}
</div>
<div class="text-xs mr-1">ریال</div>
</div>
</div>
<div class="flex justify-between mt-3">
<div>{{ isBuy ? 'قیمت قابل پرداخت:' : 'مبلغ دریافتی:' }}</div>
<div class="flex items-center">
@@ -60,7 +60,7 @@ import img from '@/assets/img/user_ly1.svg'
import MobilePageHeader from '@/layouts/components/MobilePageHeader.vue'
import ProductItem from '@/views/base/products/components/ProductItem.vue'
import { useProductsPageContext } from '../composables/useProductsPage'
import { isStoreClosed, STORE_CLOSED_TITLE } from '@/utils/storeHours'
import { isStoreClosed, shouldBlockStoreTrading, STORE_CLOSED_TITLE } from '@/utils/storeHours'
import { computed } from 'vue'
const {
@@ -74,7 +74,7 @@ const {
storeClosedMessage,
} = useProductsPageContext()
const storeClosed = computed(() => isStoreClosed())
const storeClosed = computed(() => isStoreClosed() || shouldBlockStoreTrading())
</script>
<style scoped>
-2
View File
@@ -33,7 +33,6 @@ function getDefaultRulesItems(nameProject: string): string[] {
`در صورت واریز اشتباه وجه، ${brand} مجاز است نسبت به رفع اشتباه و برداشت از حساب اقدام کند و کاربر حق اعتراض را از خود ساقط می‌داند.`,
`در صورت ابهام در معاملات، ${brand} حق ابطال معامله و عودت دارایی‌ها را دارد. در صورت اشکال از سمت ${brand}، جبران خسارت انجام می‌شود.`,
`در صورت فوت یا حجر کاربر، ${brand} پیرو قوانین جمهوری اسلامی ایران است.`,
`هزینه خدمات و کارمزد مطابق راهنمای استفاده از ${brand} محاسبه می‌شود.`,
`کلیه حقوق مادی و معنوی ${brand} محفوظ است و استفاده بدون رضایت مجاز نیست.`,
`ابطال هر بند، بر سایر بندها اثر ندارد.`,
]
@@ -79,7 +78,6 @@ function getBoursecuRulesBlocks(nameProject: string): RulesBlock[] {
`کاربران متعهدند از ${brand} برای معاملات صوری، دستکاری قیمت، تبانی، پولشویی یا فعالیت غیرقانونی استفاده نکنند.`,
`در صورت اختلاف در معامله، ${brand} حق ابطال معامله و بازگرداندن دارایی طرفین را دارد. اگر خطا از سمت ${brand} باشد، جبران خسارت انجام می‌شود.`,
`در صورت فوت یا حجر کاربر، ${brand} تابع قوانین جمهوری اسلامی ایران خواهد بود.`,
`کارمزد و هزینه خدمات مطابق راهنمای ${brand} محاسبه می‌شود.`,
`تمامی حقوق مادی و معنوی ${brand} محفوظ است.`,
`ابطال هر بند، اعتبار سایر بندها را مخدوش نمی‌کند.`,
],
@@ -7,6 +7,16 @@
@finish="ok"
>
<div :class="scrollClass">
<div
v-if="userFormState.is_legal == 0"
class="mb-3 p-3 bg-amber-50/80 rounded-xl border border-amber-200/90 text-xs text-amber-900 flex items-start gap-2"
>
<BasicIcon icon="vuesax-linear:info-circle" size="18" color="#d97706" class="shrink-0 mt-0.5" />
<span class="leading-5">
جهت تکمیل احراز هویت، لطفاً کد ملی منطبق با شماره همراه خود را وارد فرمایید. اطلاعات شما به‌صورت آنی استعلام خواهد شد.
</span>
</div>
<a-form-item :rules="[isValidPersian()]" label="نام" name="fname">
<BasicInput v-model:value="userFormState.fname" />
</a-form-item>
@@ -45,6 +55,7 @@
<script lang="ts" setup>
import { computed } from 'vue'
import BasicButton from '@/components/BasicPacks/BasicButton.vue'
import BasicIcon from '@/components/BasicPacks/BasicIcon.vue'
import BasicInput from '@/components/BasicPacks/BasicInput.vue'
import BaseDatePicker from '@/components/BasicPacks/BaseDatePicker'
import { useUserPageContext } from '../composables/useUserPage'
+73 -68
View File
@@ -8,6 +8,7 @@ import {
} from '@/utils/inputRules'
import type { Password, User } from '@/models/login'
import router from '@/router'
import { useRoute } from 'vue-router'
import type { FormInstance } from 'ant-design-vue'
import { message } from 'ant-design-vue'
import { updateMe, updatePass } from '@/api/me'
@@ -17,12 +18,13 @@ import { useWalletAssets } from '@/composables/useWalletAssets'
import { getUserAvatarUrl } from '@/utils/file'
import { useConfigStore } from '@/store/configStore'
import { getBoursecuActionIconSrc } from '@/utils/config'
import { useDesktopBreakpoint } from '@/layouts/composables/useAppLayout'
import { getReferralShareText, getReferralShareTitle, shareReferralText } from '@/utils/referralShare'
import { normalizeAuthFormFields } from '@/utils/persianDigits'
import { performUserLogout } from '@/utils/authSession'
import { useSettingsStore } from '@/store/settingsStore'
import { useTrackingSystemsFeature } from '@/composables/useTrackingSystemsFeature'
import { openGoldDayCalculator } from '@/composables/useGoldDayCalculator'
import { isCustomerIdentityVerified } from '@/utils/customerIdentity'
import { isUserSupportChatEnabled, unreadSupportCount } from '@/utils/chat'
import { resetHomePageData } from '../../home/composables/useHomePageData'
import { resetWalletPageData } from '../../wallet/composables/useWalletPageData'
@@ -84,7 +86,6 @@ export function useUserPage() {
const walletStore = useWalletStore()
const { clearWalletAssets } = useWalletAssets()
const settingsStore = useSettingsStore()
const isDesktop = useDesktopBreakpoint()
const nameProject = useConfigStore().config.name_fa
const editPassVisible = ref(false)
const editPasswordVisible = ref(false)
@@ -122,12 +123,36 @@ export function useUserPage() {
const menuActions = computed<UserMenuAction[]>(() => [
{
id: 'password',
label: 'تغییر رمز عبور',
icon: 'vuesax-linear:lock',
onClick: () => { editPasswordVisible.value = true },
id: 'giftCard',
label: 'ثبت کارت هدیه',
icon: 'vuesax-linear:gift',
onClick: () => router.push({ name: 'giftCard' }),
visible: settingsStore.isSettingTruthy('has_page_gift_card'),
},
{
id: 'installment',
label: 'خرید اقساطی',
icon: 'vuesax-linear:calendar',
onClick: () => router.push({ name: 'installment' }),
visible: settingsStore.isSettingTruthy('enable_digipay_installment'),
badgeLabel: 'جدید',
},
{
id: 'physicalReceive',
label: 'تحویل فیزیکی',
icon: 'vuesax-linear:direct-inbox',
iconSrc: getBoursecuActionIconSrc('physicalReceive'),
onClick: () => router.push({ name: 'physicalReceive' }),
visible: true,
},
{
id: 'notifyTrigger',
label: 'هشدار قیمت',
icon: 'vuesax-linear:bill',
iconSrc: getBoursecuActionIconSrc('priceTrigger'),
onClick: () => router.push({ name: 'notifyTrigger' }),
visible: settingsStore.isSettingTruthy('has_page_price_trigger'),
},
{
id: 'goldDayCalculator',
label: 'ماشین حساب',
@@ -150,12 +175,12 @@ export function useUserPage() {
visible: settingsStore.isSettingTruthy('enable_product_funds'),
},
{
id: 'notifyTrigger',
label: 'هشدار قیمت',
icon: 'vuesax-linear:bill',
iconSrc: getBoursecuActionIconSrc('priceTrigger'),
onClick: () => router.push({ name: 'notifyTrigger' }),
visible: !isDesktop.value && settingsStore.isSettingTruthy('has_page_price_trigger'),
id: 'rules',
label: 'قوانین و مقررات',
icon: 'vuesax-linear:task',
iconSrc: getBoursecuActionIconSrc('rules'),
onClick: () => router.push({ name: 'rules' }),
visible: true,
},
{
id: 'about',
@@ -165,6 +190,13 @@ export function useUserPage() {
onClick: () => router.push({ name: 'about' }),
visible: true,
},
{
id: 'recoverySites',
label: 'سایت‌های ری‌گیری',
icon: 'vuesax-linear:global',
onClick: () => router.push({ name: 'recoverySites' }),
visible: trackingSystemsEnabled.value,
},
{
id: 'support',
label: 'پشتیبانی',
@@ -175,41 +207,10 @@ export function useUserPage() {
badge: unreadSupportCount.value > 0 ? unreadSupportCount.value : undefined,
},
{
id: 'physicalReceive',
label: 'تحویل فیزیکی',
icon: 'vuesax-linear:direct-inbox',
iconSrc: getBoursecuActionIconSrc('physicalReceive'),
onClick: () => router.push({ name: 'physicalReceive' }),
visible: true,
},
{
id: 'installment',
label: 'خرید اقساطی',
icon: 'vuesax-linear:calendar',
onClick: () => router.push({ name: 'installment' }),
visible: settingsStore.isSettingTruthy('enable_digipay_installment'),
badgeLabel: 'جدید',
},
{
id: 'giftCard',
label: 'ثبت کارت هدیه',
icon: 'vuesax-linear:gift',
onClick: () => router.push({ name: 'giftCard' }),
visible: settingsStore.isSettingTruthy('has_page_gift_card'),
},
{
id: 'recoverySites',
label: 'سایت‌های ری‌گیری',
icon: 'vuesax-linear:global',
onClick: () => router.push({ name: 'recoverySites' }),
visible: trackingSystemsEnabled.value,
},
{
id: 'rules',
label: 'قوانین و مقررات',
icon: 'vuesax-linear:task',
iconSrc: getBoursecuActionIconSrc('rules'),
onClick: () => router.push({ name: 'rules' }),
id: 'password',
label: 'تغییر رمز عبور',
icon: 'vuesax-linear:lock',
onClick: () => { editPasswordVisible.value = true },
visible: true,
},
].filter((action) => action.visible)
@@ -257,6 +258,8 @@ export function useUserPage() {
void shareReferralText(val, getReferralShareTitle(nameProject))
}
const route = useRoute()
function ok() {
formRef.value?.validateFields().then(async () => {
try {
@@ -266,11 +269,17 @@ export function useUserPage() {
await userStore.getMyInfo()
localAvatarUrl.value = getUserAvatarUrl(userStore.userInfo)
editPassVisible.value = false
message.success(
res?.message || 'اطلاعات شما با موفقیت به روز رسانی شد',
)
} catch (e) {
console.log(e)
if (isCustomerIdentityVerified(userStore.userInfo?.is_legal)) {
message.success('احراز هویت شما با موفقیت انجام و تأیید شد.')
} else {
message.success(
res?.message || 'اطلاعات شما با موفقیت به روز رسانی شد',
)
}
} catch (e: any) {
console.error(e)
const errMsg = e?.response?.data?.message || 'خطا در ثبت اطلاعات'
message.error(errMsg)
} finally {
loading.value = false
}
@@ -300,32 +309,28 @@ export function useUserPage() {
}
async function logout() {
userStore.userInfo = undefined
walletStore.walletInfo = undefined
clearWalletAssets()
resetHomePageData()
resetWalletPageData()
resetAddressPageData()
resetTransactionsPageData()
resetProductsPageData()
removeToken()
showLogoutConfirm.value = false
await router.push({ name: 'login' })
window.location.reload()
await performUserLogout()
}
function checkOpenEditSheet() {
const isUnverified = !isCustomerIdentityVerified(userStore.userInfo?.is_legal)
if (isUnverified || route?.query?.showEdit) {
editPassVisible.value = true
}
}
onMounted(() => {
setForm()
if (userStore.userInfo?.is_legal === 0) {
editPassVisible.value = true
}
checkOpenEditSheet()
})
watch(
() => userStore.userInfo,
(info) => {
() => [userStore.userInfo, route?.query?.showEdit],
([info]) => {
if (!info) return
setForm()
checkOpenEditSheet()
},
{ immediate: true },
)
+74 -11
View File
@@ -1,16 +1,17 @@
<template>
<div >
<div class="flex">
<div :class="isUp? 'bg-green-50':'bg-red-50'" class="rounded-lg p-4 h-fit w-fit flex justify-center items-center">
<Icon :class="isUp? 'text-green-600':'text-red-600'"
:icon="`vuesax-linear:${isUp? 'tick-circle':'close-circle'}`"/>
<div :class="statusIconWrapClass" class="rounded-lg p-4 h-fit w-fit flex justify-center items-center">
<Icon :class="statusIconClass" :icon="`vuesax-linear:${statusIconName}`"/>
</div>
<div class=" w-full mr-2 ">
<div class="flex w-full text-xs ">{{item.note ?? '-'}}</div>
<div class="flex mt-1 text-xs">
<div class="flex mt-1 text-xs items-center gap-1 flex-wrap">
<div>وضعیت:</div>
<div :class="'text-green-600'" class="mr-1" v-if="item.transaction[0]">موفق</div>
<div :class="'text-red-600'" class="mr-1" v-else>ناموفق</div>
<ATag v-if="statusLabel" :color="statusTagColor" class="!py-0 !px-2 !ml-0 !text-xs !leading-5">
{{ statusLabel }}
</ATag>
<span v-else class="text-gray-500 mr-1">—</span>
</div>
<div class="flex mt-1 text-xs ">
<div class="w-4rem">کد پیگیری: </div>
@@ -68,11 +69,11 @@
<div class="text-black">مقدار {{ getMetalTypeTradeLabel() }} مبادله شده:</div>
<div :class="item.gold >= 0? 'text-green-600' : 'text-red-600'" class="flex text-xs items-center">
<div class="text-base ml-1 number-ltr">{{ formatGoldAmount(item.gold) }}</div>
گرم
{{ getWeightUnit() }}
</div>
</div>
<div v-if="item.order" class="flex justify-between mb-3">
<div class="text-black">قیمت هر گرم {{ getTradePriceUnitLabel() }} حین معامله:</div>
<div class="text-black">قیمت هر {{ getWeightUnit() }} {{ getTradePriceUnitLabel() }} حین معامله:</div>
<div class="flex text-xs items-center number-ltr">
<div class="text-base ml-1">{{ usePriceWithoutType(item.order?.price?? 0) }}</div>
ریال
@@ -134,9 +135,10 @@
<script lang="ts" setup>
import Icon from "@/components/BasicPacks/BasicIcon.vue";
import {formatGoldAmount, getTransactionTradePrice, usePriceWithoutType} from "../../../../utils/usePrice";
import {formatGoldAmount, getTransactionTradePrice, resolveTransactionStatusLabel, usePriceWithoutType} from "../../../../utils/usePrice";
import BasicActionSheet from "@/components/BasicPacks/BasicActionSheet.vue";
import {computed, ref} from "vue";
import { Tag as ATag } from 'ant-design-vue'
import BasicButton from "@/components/BasicPacks/BasicButton.vue";
import type {Transaction} from "@/models/transaction";
import {getCashWalletLabel, getGoldWalletLabel, getMetalTypeTradeLabel, getTradePriceUnitLabel, getWeightUnit} from '@/utils/productDealMethod'
@@ -149,8 +151,69 @@ interface Prop {
}
const props = withDefaults(defineProps<Prop>(), {})
// const isUp = computed(() => props.item.type === 3 || props.item.type === 1)
const isUp = computed(() => props.item.transaction[0])
type WalletStatusTone = 'success' | 'pending' | 'failed' | 'unknown'
function walletItemSts(item: Transaction): number | null {
const raw = item.withdraw?.sts ?? item.order?.sts ?? (item as Transaction & { sts?: number }).sts
if (raw == null) return null
const sts = Number(raw)
return Number.isFinite(sts) ? sts : null
}
const statusLabel = computed(() => {
const label = resolveTransactionStatusLabel(props.item)
if (label) return label
const legacy = (props.item as Transaction & { transaction?: unknown[] }).transaction
return legacy?.[0] ? 'موفق' : 'ناموفق'
})
const legacySucceeded = computed(
() => Boolean((props.item as Transaction & { transaction?: unknown[] }).transaction?.[0]),
)
const statusTone = computed<WalletStatusTone>(() => {
const sts = walletItemSts(props.item)
if (sts === 1 || sts === 50) return 'pending'
if (sts === 2 || sts === 51 || sts === 4 || sts === 5 || sts === 9) return 'success'
if (sts === 3 || sts === 52) return 'failed'
const label = statusLabel.value
if (label === 'در انتظار تایید' || label === 'در انتظار ارسال') return 'pending'
if (label === 'موفق' || label === 'انجام شد' || label === 'ارسال شده') return 'success'
if (label === 'ناموفق' || label === 'لغو شده') return 'failed'
if (legacySucceeded.value) return 'success'
return 'unknown'
})
const statusTagColor = computed(() => {
if (statusTone.value === 'pending') return 'processing'
if (statusTone.value === 'failed') return 'error'
if (statusTone.value === 'success') return 'success'
return 'default'
})
const statusIconWrapClass = computed(() => {
if (statusTone.value === 'pending') return 'bg-sky-50'
if (statusTone.value === 'failed') return 'bg-red-50'
if (statusTone.value === 'success') return 'bg-green-50'
return legacySucceeded.value ? 'bg-green-50' : 'bg-red-50'
})
const statusIconClass = computed(() => {
if (statusTone.value === 'pending') return 'text-sky-600'
if (statusTone.value === 'failed') return 'text-red-600'
if (statusTone.value === 'success') return 'text-green-600'
return legacySucceeded.value ? 'text-green-600' : 'text-red-600'
})
const statusIconName = computed(() => {
if (statusTone.value === 'pending') return 'clock'
if (statusTone.value === 'failed') return 'close-circle'
if (statusTone.value === 'success') return 'tick-circle'
return legacySucceeded.value ? 'tick-circle' : 'close-circle'
})
const isGold = computed(() => props.item.type === 1 || props.item.type === 2 || props.item.type === 10)
/*const title = computed(() => {
if (isUp.value) {
@@ -4,7 +4,7 @@
custom-footer
:closable="false"
wrap-class-name="app-premium-modal--no-header"
width="min(92vw, 380px)"
width="min(92vw, 420px)"
>
<div class="deposit-guide">
<div class="deposit-guide__icon-wrap" aria-hidden="true">
@@ -72,6 +72,28 @@
</button>
</div>
<!-- شناسه واریز اختصاصی (کد ملی شخص) -->
<div v-if="nationalCode" class="deposit-guide__account-row">
<span class="deposit-guide__account-label">شناسه واریز</span>
<button
type="button"
class="deposit-guide__account-value"
aria-label="کپی شناسه واریز"
@click="copyNationalCode"
>
<span class="deposit-guide__account-text" dir="ltr">{{ nationalCode }}</span>
<BasicIcon
icon="vuesax-linear:copy"
size="18"
color="#15803d"
class="deposit-guide__copy-icon"
/>
</button>
<div class="deposit-guide__tip-box">
<BasicIcon icon="vuesax-linear:info-circle" size="16" color="#16a34a" class="shrink-0" />
<span>شناسه واریز شما همان کد ملی شما می‌باشد؛ لطفاً هنگام انتقال وجه در همراه بانک یا اینترنت بانک، این شناسه را در بخش شناسه واریز وارد فرمایید.</span>
</div>
</div>
<a
v-if="hasMessengerLink"
@@ -97,17 +119,116 @@
<span>پیام به پشتیبانی (sms)</span>
</span>
</a>
<!-- بخش آپلود فیش واریزی و ثبت درخواست -->
<div class="deposit-guide__receipt-section">
<div class="deposit-guide__receipt-header">
<BasicIcon icon="vuesax-linear:receipt-text" size="20" color="#16a34a" />
<span>ثبت فیش و اطلاعات واریز</span>
</div>
<div class="deposit-guide__form-field">
<label class="deposit-guide__form-label">
مبلغ واریزی (ریال) <span class="text-red-500">*</span>
</label>
<input
v-model="depositAmountFormatted"
type="text"
dir="ltr"
class="deposit-guide__input"
placeholder="مثال: ۵,۰۰۰,۰۰۰"
@input="onAmountInput"
/>
<span v-if="depositAmountTomanText" class="deposit-guide__amount-hint">
{{ depositAmountTomanText }}
</span>
</div>
<div class="deposit-guide__form-field">
<label class="deposit-guide__form-label">شماره پیگیری / کد ارجاع فیش</label>
<input
v-model="trackedNumber"
type="text"
dir="ltr"
class="deposit-guide__input"
placeholder="کد پیگیری بانکی (اختیاری)"
/>
</div>
<div class="deposit-guide__form-field">
<label class="deposit-guide__form-label">
تصویر فیش واریزی <span class="text-red-500">*</span>
</label>
<input
ref="fileInputRef"
type="file"
accept="image/jpeg,image/png,image/webp,application/pdf"
class="hidden"
@change="onFileSelected"
/>
<div
v-if="!receiptFile"
class="deposit-guide__upload-dropzone"
@click="triggerFileInput"
>
<BasicIcon icon="vuesax-linear:document-upload" size="30" color="#16a34a" />
<span class="deposit-guide__upload-title">برای آپلود تصویر فیش کلیک کنید</span>
<span class="deposit-guide__upload-subtitle">JPG, PNG, WEBP, PDF (حداکثر ۱۰ مگابایت)</span>
</div>
<div v-else class="deposit-guide__receipt-preview">
<img
v-if="receiptPreviewUrl"
:src="receiptPreviewUrl"
alt="پیش‌نمایش فیش"
class="deposit-guide__receipt-img"
/>
<div v-else class="deposit-guide__receipt-file-badge">
<BasicIcon icon="vuesax-linear:receipt-text" size="26" color="#16a34a" />
<span class="deposit-guide__receipt-file-name">{{ receiptFile.name }}</span>
</div>
<button
type="button"
class="deposit-guide__receipt-remove"
aria-label="حذف فیش"
@click="removeReceipt"
>
<BasicIcon icon="vuesax-linear:trash" size="16" color="#dc2626" />
<span>حذف فایل</span>
</button>
</div>
</div>
<div class="deposit-guide__form-field">
<label class="deposit-guide__form-label">توضیحات (اختیاری)</label>
<textarea
v-model="extraNote"
rows="2"
class="deposit-guide__textarea"
placeholder="توضیحات اضافی در صورت نیاز..."
></textarea>
</div>
<BasicButton
type="primary"
class="app-premium-modal__btn-primary deposit-guide__submit-btn w-full"
:loading="submitting"
@click="handleSubmitDeposit"
>
ثبت درخواست واریز
</BasicButton>
</div>
</div>
</div>
<template #footer>
<BasicButton
type="primary"
class="app-premium-modal__btn-primary deposit-guide__confirm w-full"
type="default"
class="w-full"
@click="localVisible = false"
>
متوجه شدم
بستن
</BasicButton>
</template>
</BasicModal>
@@ -115,11 +236,14 @@
<script lang="ts" setup>
import { computed, ref, watch } from 'vue'
import { message } from 'ant-design-vue'
import BasicButton from '@/components/BasicPacks/BasicButton.vue'
import BasicIcon from '@/components/BasicPacks/BasicIcon.vue'
import BasicModal from '@/components/BasicPacks/BasicModal.vue'
import { useSupportMessenger } from '@/composables/useSupportMessenger'
import { loadSupportMessengerFromSettings } from '@/utils/supportMessenger'
import { useUserStore } from '@/store/userStore'
import { submitDepositRequest } from '@/api/wallet'
const props = withDefaults(
defineProps<{
@@ -127,14 +251,44 @@ const props = withDefaults(
title?: string
supportLink?: string
smsLink?: string
initialAmount?: number
}>(),
{
title: 'راهنمای شارژ حساب',
title: 'راهنمای شارژ و ثبت واریز',
supportLink: '',
smsLink: '',
initialAmount: undefined,
},
)
const userStore = useUserStore()
const nationalCode = computed(() => {
return String(userStore.userInfo?.n_code ?? '').trim()
})
async function copyNationalCode() {
if (!nationalCode.value) return
try {
if (typeof navigator !== 'undefined' && navigator.clipboard?.writeText) {
await navigator.clipboard.writeText(nationalCode.value)
} else {
const textarea = document.createElement('textarea')
textarea.value = nationalCode.value
textarea.setAttribute('readonly', 'true')
textarea.style.position = 'fixed'
textarea.style.left = '-9999px'
document.body.appendChild(textarea)
textarea.select()
document.execCommand('copy')
document.body.removeChild(textarea)
}
message.info('شناسه واریز کپی شد')
} catch {
message.error('خطا در کپی شناسه واریز')
}
}
const {
depositCardNumber,
depositAccountNumber,
@@ -160,6 +314,7 @@ function onDepositSupportClick() {
const emit = defineEmits<{
'update:visible': [value: boolean]
'success': []
}>()
const localVisible = computed({
@@ -167,11 +322,146 @@ const localVisible = computed({
set: (value: boolean) => emit('update:visible', value),
})
// فیلدهای فرم فیش واریزی
const depositAmountRaw = ref<number | undefined>(props.initialAmount)
const depositAmountFormatted = ref<string>('')
const trackedNumber = ref<string>('')
const extraNote = ref<string>('')
const fileInputRef = ref<HTMLInputElement | null>(null)
const receiptFile = ref<File | null>(null)
const receiptPreviewUrl = ref<string>('')
const submitting = ref(false)
function formatNumber(num: number): string {
return num.toLocaleString('en-US')
}
function updateFormattedAmount(val?: number) {
if (val && val > 0) {
depositAmountFormatted.value = formatNumber(val)
} else {
depositAmountFormatted.value = ''
}
}
function onAmountInput(e: Event) {
const target = e.target as HTMLInputElement
const digits = target.value.replace(/\D/g, '')
if (digits) {
const num = parseInt(digits, 10)
depositAmountRaw.value = num
depositAmountFormatted.value = formatNumber(num)
} else {
depositAmountRaw.value = undefined
depositAmountFormatted.value = ''
}
}
const depositAmountTomanText = computed(() => {
const val = depositAmountRaw.value
if (!val || val <= 0) return ''
const toman = Math.floor(val / 10)
return `معادل ${formatNumber(toman)} تومان`
})
function triggerFileInput() {
fileInputRef.value?.click()
}
function onFileSelected(event: Event) {
const target = event.target as HTMLInputElement
const file = target.files?.[0]
if (!file) return
if (file.size > 10 * 1024 * 1024) {
message.error('حجم فایل نباید بیش از ۱۰ مگابایت باشد.')
return
}
receiptFile.value = file
if (file.type.startsWith('image/')) {
receiptPreviewUrl.value = URL.createObjectURL(file)
} else {
receiptPreviewUrl.value = ''
}
}
function removeReceipt() {
if (receiptPreviewUrl.value) {
URL.revokeObjectURL(receiptPreviewUrl.value)
}
receiptFile.value = null
receiptPreviewUrl.value = ''
if (fileInputRef.value) {
fileInputRef.value.value = ''
}
}
function resetForm() {
depositAmountRaw.value = undefined
depositAmountFormatted.value = ''
trackedNumber.value = ''
extraNote.value = ''
removeReceipt()
}
async function handleSubmitDeposit() {
const amount = depositAmountRaw.value
if (!amount || amount <= 0) {
message.error('لطفاً مبلغ واریزی را وارد فرمایید.')
return
}
if (!receiptFile.value) {
message.error('لطفاً تصویر فیش واریزی را بارگذاری فرمایید.')
return
}
try {
submitting.value = true
const formData = new FormData()
formData.append('cash', String(amount))
formData.append('receipt', receiptFile.value)
if (trackedNumber.value.trim()) {
formData.append('tracked_number', trackedNumber.value.trim())
}
if (extraNote.value.trim()) {
formData.append('extra_note', extraNote.value.trim())
}
const res = await submitDepositRequest(formData)
message.success(res?.message || 'درخواست واریز شما با موفقیت ثبت شد و پس از بررسی تایید خواهد شد.')
emit('success')
localVisible.value = false
resetForm()
} catch (e: any) {
console.error(e)
const errorMsg = e?.response?.data?.message || 'خطا در ثبت درخواست واریز'
message.error(errorMsg)
} finally {
submitting.value = false
}
}
watch(
() => props.visible,
(visible) => {
if (visible) {
void loadSupportMessengerFromSettings(true)
if (props.initialAmount && props.initialAmount > 0) {
depositAmountRaw.value = props.initialAmount
updateFormattedAmount(props.initialAmount)
}
}
},
)
watch(
() => props.initialAmount,
(newVal) => {
if (newVal && newVal > 0) {
depositAmountRaw.value = newVal
updateFormattedAmount(newVal)
}
},
)
@@ -183,22 +473,22 @@ watch(
flex-direction: column;
align-items: center;
text-align: center;
padding: 0.25rem 0.5rem 0.5rem;
padding: 0.25rem 0.25rem 0.5rem;
}
.deposit-guide__icon-wrap {
display: flex;
align-items: center;
justify-content: center;
width: 4.5rem;
height: 4.5rem;
width: 4rem;
height: 4rem;
border-radius: 9999px;
background: #ecfdf3;
margin-bottom: 1rem;
margin-bottom: 0.75rem;
}
.deposit-guide__title {
margin: 0 0 0.75rem;
margin: 0 0 0.5rem;
font-size: 1.05rem;
font-weight: 700;
color: #111827;
@@ -206,8 +496,8 @@ watch(
.deposit-guide__body {
width: 100%;
font-size: 0.92rem;
line-height: 1.9;
font-size: 0.9rem;
line-height: 1.8;
color: #4b5563;
}
@@ -276,14 +566,28 @@ watch(
}
}
.deposit-guide__tip-box {
display: flex;
align-items: flex-start;
gap: 0.4rem;
padding: 0.5rem 0.65rem;
border-radius: 0.5rem;
background: #f0fdf4;
border: 1px solid #dcfce7;
font-size: 0.75rem;
line-height: 1.6;
color: #15803d;
text-align: right;
}
.deposit-guide__support-link {
display: block;
width: 100%;
margin-top: 1.25rem;
margin-top: 0.5rem;
text-decoration: none;
&--spaced {
margin-top: 0.65rem;
margin-top: 0.5rem;
}
}
@@ -293,19 +597,178 @@ watch(
justify-content: center;
gap: 0.5rem;
width: 100%;
min-height: 2.75rem;
padding: 0.65rem 1rem;
min-height: 2.5rem;
padding: 0.5rem 1rem;
border: 1px solid #bbf7d0;
border-radius: 0.75rem;
background: #f0fdf4;
color: #15803d;
font-size: 0.92rem;
font-size: 0.85rem;
font-weight: 600;
}
.deposit-guide__confirm {
/* بخش ثبت فیش */
.deposit-guide__receipt-section {
display: flex;
flex-direction: column;
gap: 0.65rem;
width: 100%;
margin-top: 1rem;
padding-top: 1rem;
border-top: 1px dashed #e2e8f0;
text-align: right;
}
.deposit-guide__receipt-header {
display: flex;
align-items: center;
gap: 0.5rem;
font-size: 0.92rem;
font-weight: 700;
color: #15803d;
margin-bottom: 0.25rem;
}
.deposit-guide__form-field {
display: flex;
flex-direction: column;
gap: 0.3rem;
width: 100%;
}
.deposit-guide__form-label {
font-size: 0.78rem;
font-weight: 600;
color: #374151;
}
.deposit-guide__input {
width: 100%;
height: 2.6rem;
padding: 0.5rem 0.75rem;
border: 1px solid #d1d5db;
border-radius: 0.6rem;
font-size: 0.88rem;
color: #111827;
background: #fff;
outline: none;
transition: border-color 0.15s ease, box-shadow 0.15s ease;
&:focus {
border-color: #16a34a;
box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.15);
}
}
.deposit-guide__textarea {
width: 100%;
padding: 0.5rem 0.75rem;
border: 1px solid #d1d5db;
border-radius: 0.6rem;
font-size: 0.85rem;
color: #111827;
background: #fff;
outline: none;
resize: vertical;
transition: border-color 0.15s ease, box-shadow 0.15s ease;
&:focus {
border-color: #16a34a;
box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.15);
}
}
.deposit-guide__amount-hint {
font-size: 0.74rem;
color: #059669;
font-weight: 600;
}
.deposit-guide__upload-dropzone {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 0.35rem;
padding: 1rem;
border: 1.5px dashed #86efac;
border-radius: 0.75rem;
background: #f0fdf4;
cursor: pointer;
transition: background 0.15s ease, border-color 0.15s ease;
&:hover {
background: #dcfce7;
border-color: #4ade80;
}
}
.deposit-guide__upload-title {
font-size: 0.82rem;
font-weight: 700;
color: #15803d;
}
.deposit-guide__upload-subtitle {
font-size: 0.7rem;
color: #6b7280;
}
.deposit-guide__receipt-preview {
display: flex;
flex-direction: column;
align-items: center;
gap: 0.5rem;
padding: 0.75rem;
border: 1px solid #bbf7d0;
border-radius: 0.75rem;
background: #f0fdf4;
}
.deposit-guide__receipt-img {
max-width: 100%;
max-height: 140px;
object-fit: contain;
border-radius: 0.5rem;
border: 1px solid #d1d5db;
}
.deposit-guide__receipt-file-badge {
display: flex;
align-items: center;
gap: 0.5rem;
}
.deposit-guide__receipt-file-name {
font-size: 0.8rem;
font-weight: 600;
color: #374151;
word-break: break-all;
}
.deposit-guide__receipt-remove {
display: inline-flex;
align-items: center;
gap: 0.35rem;
background: none;
border: none;
color: #dc2626;
font-size: 0.78rem;
font-weight: 600;
cursor: pointer;
padding: 0.25rem 0.5rem;
border-radius: 0.35rem;
transition: background 0.15s ease;
&:hover {
background: #fee2e2;
}
}
.deposit-guide__submit-btn {
margin-top: 0.5rem;
min-height: 2.75rem;
font-size: 0.92rem;
font-weight: 700;
}
</style>
@@ -120,13 +120,11 @@
.dwallet-surface {
background: #fff;
border: 1px solid rgba(15, 23, 42, 0.06);
border-radius: 16px;
box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.dwallet-form {
padding: 24px;
&__title {
font-size: 16px;
+10 -1
View File
@@ -90,8 +90,10 @@
v-model:visible="chargeAccountModal"
:support-link="depositGuideSupportLink"
:sms-link="depositSmsSupportLink"
:initial-amount="form.value"
@success="onDepositSuccess"
>
<p class="deposit-guide-text">{{ supportMessengerText }}</p>
<p v-if="supportMessengerText" class="deposit-guide-text">{{ supportMessengerText }}</p>
</WalletDepositGuideModal>
<BasicModal v-model:visible="withdrawInfModal" custom-footer :closable="false">
@@ -120,6 +122,7 @@ import OtpInput from 'vue3-otp-input'
import { useDesktopBreakpoint } from '@/layouts/composables/useAppLayout'
import ResponsiveViewPair from '@/layouts/components/ResponsiveViewPair.vue'
import { useWalletPage } from './composables/useWalletPage'
import { initWalletPageData } from './composables/useWalletPageData'
import DesktopWalletView from './desktop/DesktopWalletView.vue'
import MobileWalletView from './mobile/MobileWalletView.vue'
import SkeletonLoading from './components/SkeletonLoading.vue'
@@ -141,6 +144,7 @@ const {
infoVisible,
identityRequiredVisible,
refOtpInput,
form,
extraNote,
supportMessengerText,
depositGuideSupportLink,
@@ -149,6 +153,11 @@ const {
loading,
addCard,
} = useWalletPage()
async function onDepositSuccess() {
form.value.value = undefined
await initWalletPageData()
}
</script>
<style scoped>
+1 -1
View File
@@ -77,7 +77,7 @@
/>
</a-form-item>
<a-form-item
v-if="settingsStore.isReferralFieldVisible"
v-if="settingsStore.isReferralFieldVisible || disableForm"
:rules="referralIdRules"
:class="variant === 'desktop' ? '' : 'home_appear_fade_in_down'"
label="کد معرف"
@@ -56,7 +56,9 @@
درباره مس
</button>
<span class="dauth-form-links__sep" aria-hidden="true">|</span>
<span class="dauth-form-links__text">پشتیبانی</span>
<button type="button" class="dauth-form-links__link" @click="onSupportClick">
پشتیبانی
</button>
</nav>
<div class="dauth-page-footer__status">
<span class="dauth-page-footer__status-icon" aria-hidden="true">
@@ -100,7 +100,7 @@ function handleSuccessDismiss() {
</a-form-item>
<a-form-item
v-if="settingsStore.isReferralFieldVisible"
v-if="settingsStore.isReferralFieldVisible || disableForm"
:rules="referralIdRules"
label="کد معرف"
name="referral_id"
@@ -1190,12 +1190,20 @@
/* ─── موبایل (<768): لوگو + کارت + پشتیبانی، وسط‌چین عمودی ─── */
@media (max-width: 767px) {
.dauth--boursecu {
min-height: 100dvh;
.dauth.dauth--boursecu {
/* 100vh آیفون پشت نوار سافاری است؛ اسکرول روان در ارتفاع واقعی بدون قفل شدن */
height: auto !important;
min-height: 100dvh !important;
max-height: none !important;
overflow-x: hidden !important;
overflow-y: auto !important;
-webkit-overflow-scrolling: touch !important;
touch-action: pan-y !important;
overscroll-behavior-y: auto !important;
display: flex;
flex-direction: column;
justify-content: center;
padding: 12px 0;
justify-content: flex-start;
padding: 16px 0 calc(36px + env(safe-area-inset-bottom, 0px));
.dauth-page-logo {
position: relative;
@@ -1218,10 +1226,10 @@
display: flex;
flex-direction: column;
direction: rtl;
flex: 0 1 auto;
flex: 0 0 auto;
gap: 12px;
padding: 0 16px;
min-height: 0;
min-height: auto;
width: 100%;
}
@@ -1359,6 +1367,20 @@
margin-top: 12px;
font-size: 11px;
}
/* دکمه شناور پشتیبانی در موبایل: زیر کارت و بالاتر از لینک‌های فوتر نمایش داده شود و شناور روی فرم نیفتد */
.dauth-form-support--fab {
position: static !important;
display: inline-flex !important;
top: auto !important;
left: auto !important;
right: auto !important;
bottom: auto !important;
width: auto !important;
align-self: center;
margin: 14px auto 0 !important;
z-index: 10 !important;
}
}
}
+21 -6
View File
@@ -60,6 +60,16 @@ onUnmounted(() => {
/* موبایل لاگین: تمام‌عرض — بدون فریم ۴۲۶ و حاشیه سفید دوطرف */
@media screen and (max-width: 767.98px) {
html.login-page-active {
html,
body {
overflow-x: hidden !important;
overflow-y: auto !important;
-webkit-overflow-scrolling: touch !important;
height: auto !important;
min-height: 100dvh !important;
overscroll-behavior-y: auto !important;
}
body {
display: block !important;
justify-content: unset !important;
@@ -71,6 +81,9 @@ onUnmounted(() => {
width: 100% !important;
max-width: none !important;
background: #0b192e !important;
height: auto !important;
min-height: 100dvh !important;
overflow: visible !important;
}
.desktopConfig,
@@ -88,24 +101,26 @@ onUnmounted(() => {
.desktopConfig,
.app-main,
.login-page-root {
.login-page-root,
.dauth.dauth--boursecu {
min-height: 100dvh !important;
height: auto !important;
max-height: none !important;
overflow-x: hidden !important;
overflow-y: auto !important;
-webkit-overflow-scrolling: touch !important;
background: #0b192e !important;
}
.dauth--boursecu {
flex: 1 1 auto;
min-height: 100dvh !important;
}
.app-credit-footer--mobile,
.app-credit-footer--login {
display: none !important;
}
/* بنر نصب روی لاگین منوی پایین ندارد؛ وگرنه روی فیلد و دکمهٔ ثبت‌نام می‌نشیند */
.pwa-install-banner {
bottom: calc(12px + env(safe-area-inset-bottom, 0px)) !important;
}
}
}
</style>
+1
View File
@@ -920,6 +920,7 @@ html.app-layout--tv body {
html.app-layout--tv .app-splash-screen,
html.app-layout--tv #support-button,
html.app-layout--tv #gift-card-button,
html.app-layout--tv #goftino_w {
display: none !important;
}
+186 -157
View File
@@ -71,7 +71,7 @@
resolved "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.23.3.tgz"
integrity sha512-BmR4bWbDIoFJmJ9z2cZ8Gmm2MXgEDgjdWgpKmKWUt54UGFJdlj31ECtbaDvCG/qVdG3AQ1SfpZEs01lUFbzLOQ==
"@babel/core@^7.0.0", "@babel/core@^7.0.0-0", "@babel/core@^7.0.0-0 || ^8.0.0-0 <8.0.0", "@babel/core@^7.11.1", "@babel/core@^7.12.0", "@babel/core@^7.13.0", "@babel/core@^7.22.10", "@babel/core@^7.4.0 || ^8.0.0-0 <8.0.0":
"@babel/core@^7.11.1", "@babel/core@^7.22.10":
version "7.22.10"
resolved "https://registry.npmjs.org/@babel/core/-/core-7.22.10.tgz"
integrity sha512-fTmqbbUBAwCcre6zPzNngvsI0aNrPZe77AeqvDxWM9Nm+04RrJ3CAmGHA9f7lJQY6ZMhRztNemy4uslDxTX4Qw==
@@ -291,7 +291,7 @@
"@babel/template" "^7.27.1"
"@babel/types" "^7.27.1"
"@babel/parser@^7.15.8", "@babel/parser@^7.20.15", "@babel/parser@^7.21.3", "@babel/parser@^7.22.10", "@babel/parser@^7.25.3", "@babel/parser@^7.26.5", "@babel/parser@^7.27.2":
"@babel/parser@^7.20.15", "@babel/parser@^7.21.3", "@babel/parser@^7.22.10", "@babel/parser@^7.25.3", "@babel/parser@^7.26.5", "@babel/parser@^7.27.2":
version "7.27.2"
resolved "https://registry.npmjs.org/@babel/parser/-/parser-7.27.2.tgz"
integrity sha512-QYLs8299NA7WM/bZAdp+CviYYkVoYXlDW2rzliy3chxd1PQjej7JORuMJDJXJUb9g0TT+B99EwaVLKmX+sPXWw==
@@ -1006,6 +1006,111 @@
resolved "https://registry.npmjs.org/@ctrl/tinycolor/-/tinycolor-3.6.1.tgz"
integrity sha512-SITSV6aIXsuVNV3f3O0f2n/cgyEDWoSqtZMYiAmcsYHydcKrOz3gUxB/iXd/Qf08+IZX4KpgNbvUdMBmWz+kcA==
"@esbuild/android-arm64@0.18.20":
version "0.18.20"
resolved "https://registry.yarnpkg.com/@esbuild/android-arm64/-/android-arm64-0.18.20.tgz#984b4f9c8d0377443cc2dfcef266d02244593622"
integrity sha512-Nz4rJcchGDtENV0eMKUNa6L12zz2zBDXuhj/Vjh18zGqB44Bi7MBMSXjgunJgjRhCmKOjnPuZp4Mb6OKqtMHLQ==
"@esbuild/android-arm@0.18.20":
version "0.18.20"
resolved "https://registry.yarnpkg.com/@esbuild/android-arm/-/android-arm-0.18.20.tgz#fedb265bc3a589c84cc11f810804f234947c3682"
integrity sha512-fyi7TDI/ijKKNZTUJAQqiG5T7YjJXgnzkURqmGj13C6dCqckZBLdl4h7bkhHt/t0WP+zO9/zwroDvANaOqO5Sw==
"@esbuild/android-x64@0.18.20":
version "0.18.20"
resolved "https://registry.yarnpkg.com/@esbuild/android-x64/-/android-x64-0.18.20.tgz#35cf419c4cfc8babe8893d296cd990e9e9f756f2"
integrity sha512-8GDdlePJA8D6zlZYJV/jnrRAi6rOiNaCC/JclcXpB+KIuvfBN4owLtgzY2bsxnx666XjJx2kDPUmnTtR8qKQUg==
"@esbuild/darwin-arm64@0.18.20":
version "0.18.20"
resolved "https://registry.yarnpkg.com/@esbuild/darwin-arm64/-/darwin-arm64-0.18.20.tgz#08172cbeccf95fbc383399a7f39cfbddaeb0d7c1"
integrity sha512-bxRHW5kHU38zS2lPTPOyuyTm+S+eobPUnTNkdJEfAddYgEcll4xkT8DB9d2008DtTbl7uJag2HuE5NZAZgnNEA==
"@esbuild/darwin-x64@0.18.20":
version "0.18.20"
resolved "https://registry.yarnpkg.com/@esbuild/darwin-x64/-/darwin-x64-0.18.20.tgz#d70d5790d8bf475556b67d0f8b7c5bdff053d85d"
integrity sha512-pc5gxlMDxzm513qPGbCbDukOdsGtKhfxD1zJKXjCCcU7ju50O7MeAZ8c4krSJcOIJGFR+qx21yMMVYwiQvyTyQ==
"@esbuild/freebsd-arm64@0.18.20":
version "0.18.20"
resolved "https://registry.yarnpkg.com/@esbuild/freebsd-arm64/-/freebsd-arm64-0.18.20.tgz#98755cd12707f93f210e2494d6a4b51b96977f54"
integrity sha512-yqDQHy4QHevpMAaxhhIwYPMv1NECwOvIpGCZkECn8w2WFHXjEwrBn3CeNIYsibZ/iZEUemj++M26W3cNR5h+Tw==
"@esbuild/freebsd-x64@0.18.20":
version "0.18.20"
resolved "https://registry.yarnpkg.com/@esbuild/freebsd-x64/-/freebsd-x64-0.18.20.tgz#c1eb2bff03915f87c29cece4c1a7fa1f423b066e"
integrity sha512-tgWRPPuQsd3RmBZwarGVHZQvtzfEBOreNuxEMKFcd5DaDn2PbBxfwLcj4+aenoh7ctXcbXmOQIn8HI6mCSw5MQ==
"@esbuild/linux-arm64@0.18.20":
version "0.18.20"
resolved "https://registry.yarnpkg.com/@esbuild/linux-arm64/-/linux-arm64-0.18.20.tgz#bad4238bd8f4fc25b5a021280c770ab5fc3a02a0"
integrity sha512-2YbscF+UL7SQAVIpnWvYwM+3LskyDmPhe31pE7/aoTMFKKzIc9lLbyGUpmmb8a8AixOL61sQ/mFh3jEjHYFvdA==
"@esbuild/linux-arm@0.18.20":
version "0.18.20"
resolved "https://registry.yarnpkg.com/@esbuild/linux-arm/-/linux-arm-0.18.20.tgz#3e617c61f33508a27150ee417543c8ab5acc73b0"
integrity sha512-/5bHkMWnq1EgKr1V+Ybz3s1hWXok7mDFUMQ4cG10AfW3wL02PSZi5kFpYKrptDsgb2WAJIvRcDm+qIvXf/apvg==
"@esbuild/linux-ia32@0.18.20":
version "0.18.20"
resolved "https://registry.yarnpkg.com/@esbuild/linux-ia32/-/linux-ia32-0.18.20.tgz#699391cccba9aee6019b7f9892eb99219f1570a7"
integrity sha512-P4etWwq6IsReT0E1KHU40bOnzMHoH73aXp96Fs8TIT6z9Hu8G6+0SHSw9i2isWrD2nbx2qo5yUqACgdfVGx7TA==
"@esbuild/linux-loong64@0.18.20":
version "0.18.20"
resolved "https://registry.yarnpkg.com/@esbuild/linux-loong64/-/linux-loong64-0.18.20.tgz#e6fccb7aac178dd2ffb9860465ac89d7f23b977d"
integrity sha512-nXW8nqBTrOpDLPgPY9uV+/1DjxoQ7DoB2N8eocyq8I9XuqJ7BiAMDMf9n1xZM9TgW0J8zrquIb/A7s3BJv7rjg==
"@esbuild/linux-mips64el@0.18.20":
version "0.18.20"
resolved "https://registry.yarnpkg.com/@esbuild/linux-mips64el/-/linux-mips64el-0.18.20.tgz#eeff3a937de9c2310de30622a957ad1bd9183231"
integrity sha512-d5NeaXZcHp8PzYy5VnXV3VSd2D328Zb+9dEq5HE6bw6+N86JVPExrA6O68OPwobntbNJ0pzCpUFZTo3w0GyetQ==
"@esbuild/linux-ppc64@0.18.20":
version "0.18.20"
resolved "https://registry.yarnpkg.com/@esbuild/linux-ppc64/-/linux-ppc64-0.18.20.tgz#2f7156bde20b01527993e6881435ad79ba9599fb"
integrity sha512-WHPyeScRNcmANnLQkq6AfyXRFr5D6N2sKgkFo2FqguP44Nw2eyDlbTdZwd9GYk98DZG9QItIiTlFLHJHjxP3FA==
"@esbuild/linux-riscv64@0.18.20":
version "0.18.20"
resolved "https://registry.yarnpkg.com/@esbuild/linux-riscv64/-/linux-riscv64-0.18.20.tgz#6628389f210123d8b4743045af8caa7d4ddfc7a6"
integrity sha512-WSxo6h5ecI5XH34KC7w5veNnKkju3zBRLEQNY7mv5mtBmrP/MjNBCAlsM2u5hDBlS3NGcTQpoBvRzqBcRtpq1A==
"@esbuild/linux-s390x@0.18.20":
version "0.18.20"
resolved "https://registry.yarnpkg.com/@esbuild/linux-s390x/-/linux-s390x-0.18.20.tgz#255e81fb289b101026131858ab99fba63dcf0071"
integrity sha512-+8231GMs3mAEth6Ja1iK0a1sQ3ohfcpzpRLH8uuc5/KVDFneH6jtAJLFGafpzpMRO6DzJ6AvXKze9LfFMrIHVQ==
"@esbuild/linux-x64@0.18.20":
version "0.18.20"
resolved "https://registry.yarnpkg.com/@esbuild/linux-x64/-/linux-x64-0.18.20.tgz#c7690b3417af318a9b6f96df3031a8865176d338"
integrity sha512-UYqiqemphJcNsFEskc73jQ7B9jgwjWrSayxawS6UVFZGWrAAtkzjxSqnoclCXxWtfwLdzU+vTpcNYhpn43uP1w==
"@esbuild/netbsd-x64@0.18.20":
version "0.18.20"
resolved "https://registry.yarnpkg.com/@esbuild/netbsd-x64/-/netbsd-x64-0.18.20.tgz#30e8cd8a3dded63975e2df2438ca109601ebe0d1"
integrity sha512-iO1c++VP6xUBUmltHZoMtCUdPlnPGdBom6IrO4gyKPFFVBKioIImVooR5I83nTew5UOYrk3gIJhbZh8X44y06A==
"@esbuild/openbsd-x64@0.18.20":
version "0.18.20"
resolved "https://registry.yarnpkg.com/@esbuild/openbsd-x64/-/openbsd-x64-0.18.20.tgz#7812af31b205055874c8082ea9cf9ab0da6217ae"
integrity sha512-e5e4YSsuQfX4cxcygw/UCPIEP6wbIL+se3sxPdCiMbFLBWu0eiZOJ7WoD+ptCLrmjZBK1Wk7I6D/I3NglUGOxg==
"@esbuild/sunos-x64@0.18.20":
version "0.18.20"
resolved "https://registry.yarnpkg.com/@esbuild/sunos-x64/-/sunos-x64-0.18.20.tgz#d5c275c3b4e73c9b0ecd38d1ca62c020f887ab9d"
integrity sha512-kDbFRFp0YpTQVVrqUd5FTYmWo45zGaXe0X8E1G/LKFC0v8x0vWrhOWSLITcCn63lmZIxfOMXtCfti/RxN/0wnQ==
"@esbuild/win32-arm64@0.18.20":
version "0.18.20"
resolved "https://registry.yarnpkg.com/@esbuild/win32-arm64/-/win32-arm64-0.18.20.tgz#73bc7f5a9f8a77805f357fab97f290d0e4820ac9"
integrity sha512-ddYFR6ItYgoaq4v4JmQQaAI5s7npztfV4Ag6NrhiaW0RrnOXqBkgwZLofVTlq1daVTQNhtI5oieTvkRPfZrePg==
"@esbuild/win32-ia32@0.18.20":
version "0.18.20"
resolved "https://registry.yarnpkg.com/@esbuild/win32-ia32/-/win32-ia32-0.18.20.tgz#ec93cbf0ef1085cc12e71e0d661d20569ff42102"
integrity sha512-Wv7QBi3ID/rROT08SABTS7eV4hX26sVduqDOTe1MvGMjNd3EjOz4b7zeexIR62GTIEKrfJXKL9LFxTYgkyeu7g==
"@esbuild/win32-x64@0.18.20":
version "0.18.20"
resolved "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.18.20.tgz"
@@ -1139,7 +1244,7 @@
"@nodelib/fs.stat" "2.0.5"
run-parallel "^1.1.9"
"@nodelib/fs.stat@^2.0.2", "@nodelib/fs.stat@2.0.5":
"@nodelib/fs.stat@2.0.5", "@nodelib/fs.stat@^2.0.2":
version "2.0.5"
resolved "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz"
integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==
@@ -1243,16 +1348,16 @@
resolved "https://registry.npmjs.org/@tsconfig/node18/-/node18-18.2.0.tgz"
integrity sha512-yhxwIlFVSVcMym3O31HoMnRXpoenmpIxcj4Yoes2DUpe+xCJnA7ECQP1Vw889V0jTt/2nzvpLQ/UuMYCd3JPIg==
"@types/estree@^1.0.0":
version "1.0.1"
resolved "https://registry.npmjs.org/@types/estree/-/estree-1.0.1.tgz"
integrity sha512-LG4opVs2ANWZ1TJoKc937iMmNstM/d0ae1vNbnBvBhqCSezgVUOzcLCqbI5elV8Vy6WKwKjaqR+zO9VKirBBCA==
"@types/estree@0.0.39":
version "0.0.39"
resolved "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz"
integrity sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==
"@types/estree@^1.0.0":
version "1.0.1"
resolved "https://registry.npmjs.org/@types/estree/-/estree-1.0.1.tgz"
integrity sha512-LG4opVs2ANWZ1TJoKc937iMmNstM/d0ae1vNbnBvBhqCSezgVUOzcLCqbI5elV8Vy6WKwKjaqR+zO9VKirBBCA==
"@types/json-schema@^7.0.9":
version "7.0.12"
resolved "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.12.tgz"
@@ -1263,7 +1368,7 @@
resolved "https://registry.npmjs.org/@types/lodash/-/lodash-4.17.7.tgz"
integrity sha512-8wTvZawATi/lsmNu10/j2hk1KEP0IvjubqPE3cu1Xz7xfXXt5oCq3SNUz4fMIP4XGF9Ky+Ue2tBA3hcS7LSBlA==
"@types/node@*", "@types/node@^18.17.0", "@types/node@>= 14":
"@types/node@*", "@types/node@^18.17.0":
version "18.17.5"
resolved "https://registry.npmjs.org/@types/node/-/node-18.17.5.tgz"
integrity sha512-xNbS75FxH6P4UXTPUJp/zNPq6/xsfdJKussCWNOnz4aULWIRwMgP1LgaB5RiBnMX1DPCYenuqGZfnIAx5mbFLA==
@@ -1306,7 +1411,7 @@
semver "^7.3.7"
tsutils "^3.21.0"
"@typescript-eslint/parser@^5.0.0", "@typescript-eslint/parser@^5.59.1":
"@typescript-eslint/parser@^5.59.1":
version "5.62.0"
resolved "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.62.0.tgz"
integrity sha512-VlJEV0fOQ7BExOsHYAGrgbEiZoi8D+Bl2+f6V2RrXerRSylnp+ZBHmPvaIa8cz0Ajx7WO7Z5RqfgYg7ED1nRhA==
@@ -1592,7 +1697,7 @@
resolved "https://registry.npmjs.org/@vitejs/plugin-vue/-/plugin-vue-4.3.1.tgz"
integrity sha512-tUBEtWcF7wFtII7ayNiLNDTCE1X1afySEo+XNVMNkFXaThENyCowIEX095QqbJZGTgoOcSVDJGlnde2NG4jtbQ==
"@volar/language-core@~2.4.11", "@volar/language-core@2.4.11":
"@volar/language-core@2.4.11", "@volar/language-core@~2.4.11":
version "2.4.11"
resolved "https://registry.npmjs.org/@volar/language-core/-/language-core-2.4.11.tgz"
integrity sha512-lN2C1+ByfW9/JRPpqScuZt/4OrUUse57GLI6TbLgTIqBVemdl1wNcZ1qYGEo2+Gw8coYLgCy7SuKqn6IrQcQgg==
@@ -1654,14 +1759,6 @@
estree-walker "^2.0.2"
source-map-js "^1.2.0"
"@vue/compiler-dom@^3.5.0":
version "3.5.13"
resolved "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.5.13.tgz"
integrity sha512-ZOJ46sMOKUjO3e94wPdCzQ6P1Lx/vhp2RSvfaab88Ajexs0AHeV0uasYhi99WPaogmBlRHNRuly8xV75cNTMDA==
dependencies:
"@vue/compiler-core" "3.5.13"
"@vue/shared" "3.5.13"
"@vue/compiler-dom@3.3.4":
version "3.3.4"
resolved "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.3.4.tgz"
@@ -1670,6 +1767,14 @@
"@vue/compiler-core" "3.3.4"
"@vue/shared" "3.3.4"
"@vue/compiler-dom@^3.5.0":
version "3.5.13"
resolved "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.5.13.tgz"
integrity sha512-ZOJ46sMOKUjO3e94wPdCzQ6P1Lx/vhp2RSvfaab88Ajexs0AHeV0uasYhi99WPaogmBlRHNRuly8xV75cNTMDA==
dependencies:
"@vue/compiler-core" "3.5.13"
"@vue/shared" "3.5.13"
"@vue/compiler-sfc@3.3.4":
version "3.3.4"
resolved "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.3.4.tgz"
@@ -1781,12 +1886,12 @@
"@vue/compiler-ssr" "3.3.4"
"@vue/shared" "3.3.4"
"@vue/shared@^3.0.0", "@vue/shared@3.3.4":
"@vue/shared@3.3.4", "@vue/shared@^3.0.0":
version "3.3.4"
resolved "https://registry.npmjs.org/@vue/shared/-/shared-3.3.4.tgz"
integrity sha512-7OjdcV8vQ74eiz1TZLzZP4JwqM5fA94K6yntPS5Z25r9HDuGNzaGdgvwKYq6S+MxwF0TFRwe50fIR/MYnakdkQ==
"@vue/shared@^3.5.0", "@vue/shared@3.5.13":
"@vue/shared@3.5.13", "@vue/shared@^3.5.0":
version "3.5.13"
resolved "https://registry.npmjs.org/@vue/shared/-/shared-3.5.13.tgz"
integrity sha512-/hnE/qP5ZoGpol0a5mDi45bOd7t3tjYJBjsgCsivow7D48cJeV5l05RD82lPqi7gRiphZM37rnhW1l6ZoCNNnQ==
@@ -1828,7 +1933,7 @@ acorn-jsx@^5.3.2:
resolved "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz"
integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==
"acorn@^6.0.0 || ^7.0.0 || ^8.0.0", acorn@^8.8.2, acorn@^8.9.0:
acorn@^8.8.2, acorn@^8.9.0:
version "8.10.0"
resolved "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz"
integrity sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==
@@ -1843,7 +1948,7 @@ ajv@^6.12.4:
json-schema-traverse "^0.4.1"
uri-js "^4.2.2"
ajv@^8.6.0, ajv@>=8:
ajv@^8.6.0:
version "8.12.0"
resolved "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz"
integrity sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==
@@ -1908,7 +2013,7 @@ anymatch@~3.1.2:
normalize-path "^3.0.0"
picomatch "^2.0.4"
apexcharts@^3.44.0, "apexcharts@> 3.0.0":
apexcharts@^3.44.0:
version "3.44.0"
resolved "https://registry.npmjs.org/apexcharts/-/apexcharts-3.44.0.tgz"
integrity sha512-u7Xzrbcxc2yWznN78Jh5NMCYVAsWDfBjRl5ea++rVzFAqjU2hLz4RgKIFwYOBDRQtW1e/Qz8azJTqIJ1+Vu9Qg==
@@ -2063,7 +2168,7 @@ braces@^3.0.3, braces@~3.0.2:
dependencies:
fill-range "^7.1.1"
browserslist@^4.21.9, browserslist@^4.22.1, "browserslist@>= 4.21.0":
browserslist@^4.21.9, browserslist@^4.22.1:
version "4.22.1"
resolved "https://registry.npmjs.org/browserslist/-/browserslist-4.22.1.tgz"
integrity sha512-FEVc202+2iuClEhZhrWy6ZiAcRLvNMyYcxZ8raemul1DYVOVdFsbqckWLdsixQZCpJlwe77Z3UTalE7jsjnKfQ==
@@ -2127,7 +2232,7 @@ chalk@^2.4.1:
escape-string-regexp "^1.0.5"
supports-color "^5.3.0"
chalk@^4.0.0:
chalk@^4.0.0, chalk@^4.0.2:
version "4.1.2"
resolved "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz"
integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==
@@ -2135,15 +2240,7 @@ chalk@^4.0.0:
ansi-styles "^4.1.0"
supports-color "^7.1.0"
chalk@^4.0.2:
version "4.1.2"
resolved "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz"
integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==
dependencies:
ansi-styles "^4.1.0"
supports-color "^7.1.0"
chokidar@^3.5.3, "chokidar@>=3.0.0 <4.0.0":
"chokidar@>=3.0.0 <4.0.0", chokidar@^3.5.3:
version "3.5.3"
resolved "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz"
integrity sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==
@@ -2172,16 +2269,16 @@ color-convert@^2.0.1:
dependencies:
color-name "~1.1.4"
color-name@~1.1.4:
version "1.1.4"
resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz"
integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==
color-name@1.1.3:
version "1.1.3"
resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz"
integrity sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==
color-name@~1.1.4:
version "1.1.4"
resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz"
integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==
colorette@^2.0.20:
version "2.0.20"
resolved "https://registry.npmjs.org/colorette/-/colorette-2.0.20.tgz"
@@ -2569,7 +2666,7 @@ eslint-plugin-prettier@^5.0.0:
prettier-linter-helpers "^1.0.0"
synckit "^0.8.5"
eslint-plugin-vue@^9.0.0, eslint-plugin-vue@^9.15.1:
eslint-plugin-vue@^9.15.1:
version "9.17.0"
resolved "https://registry.npmjs.org/eslint-plugin-vue/-/eslint-plugin-vue-9.17.0.tgz"
integrity sha512-r7Bp79pxQk9I5XDP0k2dpUC7Ots3OSWgvGZNu3BxmKK6Zg7NgVtcOB6OCna5Kb9oQwJPl5hq183WD0SY5tZtIQ==
@@ -2590,15 +2687,7 @@ eslint-scope@^5.1.1:
esrecurse "^4.3.0"
estraverse "^4.1.1"
eslint-scope@^7.1.1:
version "7.2.2"
resolved "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz"
integrity sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==
dependencies:
esrecurse "^4.3.0"
estraverse "^5.2.0"
eslint-scope@^7.2.2:
eslint-scope@^7.1.1, eslint-scope@^7.2.2:
version "7.2.2"
resolved "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz"
integrity sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==
@@ -2611,7 +2700,7 @@ eslint-visitor-keys@^3.3.0, eslint-visitor-keys@^3.4.1, eslint-visitor-keys@^3.4
resolved "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz"
integrity sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==
eslint@*, "eslint@^6.0.0 || ^7.0.0 || ^8.0.0", "eslint@^6.0.0 || ^7.0.0 || >=8.0.0", "eslint@^6.2.0 || ^7.0.0 || ^8.0.0", eslint@^8.45.0, "eslint@>= 8.0.0", eslint@>=6.0.0, eslint@>=7.0.0, eslint@>=8.0.0:
eslint@^8.45.0:
version "8.47.0"
resolved "https://registry.npmjs.org/eslint/-/eslint-8.47.0.tgz"
integrity sha512-spUQWrdPt+pRVP1TTJLmfRNJJHHZryFmptzcafwSvHsceV81djHOdnEeDmkdotZyLNjDhrOasNK8nikkoG1O8Q==
@@ -2682,12 +2771,7 @@ estraverse@^4.1.1:
resolved "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz"
integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==
estraverse@^5.1.0:
version "5.3.0"
resolved "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz"
integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==
estraverse@^5.2.0:
estraverse@^5.1.0, estraverse@^5.2.0:
version "5.3.0"
resolved "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz"
integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==
@@ -2712,22 +2796,7 @@ eventemitter3@^5.0.1:
resolved "https://mirror-npm.runflare.com/eventemitter3/-/eventemitter3-5.0.4.tgz"
integrity sha512-mlsTRyGaPBjPedk6Bvw+aqbsXDtoAyAzm5MO7JgU+yVRyMQ5O8bD4Kcci7BS85f93veegeCPkL8R4GLClnjLFw==
execa@^5.0.0:
version "5.1.1"
resolved "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz"
integrity sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==
dependencies:
cross-spawn "^7.0.3"
get-stream "^6.0.0"
human-signals "^2.1.0"
is-stream "^2.0.0"
merge-stream "^2.0.0"
npm-run-path "^4.0.1"
onetime "^5.1.2"
signal-exit "^3.0.3"
strip-final-newline "^2.0.0"
execa@^5.1.1:
execa@^5.0.0, execa@^5.1.1:
version "5.1.1"
resolved "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz"
integrity sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==
@@ -2873,6 +2942,11 @@ fs.realpath@^1.0.0:
resolved "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz"
integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==
fsevents@~2.3.2:
version "2.3.3"
resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.3.tgz#cac6407785d03675a2a5e1a5305c697b347d90d6"
integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==
function-bind@^1.1.1:
version "1.1.1"
resolved "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz"
@@ -2926,7 +3000,7 @@ get-symbol-description@^1.0.0:
call-bind "^1.0.2"
get-intrinsic "^1.1.1"
glob-parent@^5.1.2:
glob-parent@^5.1.2, glob-parent@~5.1.2:
version "5.1.2"
resolved "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz"
integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==
@@ -2940,13 +3014,6 @@ glob-parent@^6.0.2:
dependencies:
is-glob "^4.0.3"
glob-parent@~5.1.2:
version "5.1.2"
resolved "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz"
integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==
dependencies:
is-glob "^4.0.1"
glob@^7.1.3, glob@^7.1.6:
version "7.2.3"
resolved "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz"
@@ -3458,7 +3525,7 @@ kolorist@^1.8.0:
resolved "https://registry.npmjs.org/kolorist/-/kolorist-1.8.0.tgz"
integrity sha512-Y+60/zizpJ3HRH8DCss+q95yr6145JXZo46OTpFvDZWLfRCE4qChOyk1b26nMaNpfHHgxagk9dXT5OP0Tfe+dQ==
less@*, less@^4.2.0:
less@^4.2.0:
version "4.2.0"
resolved "https://registry.npmjs.org/less/-/less-4.2.0.tgz"
integrity sha512-P3b3HJDBtSzsXUl0im2L7gTO5Ubg8mEN6G8qoTS77iXxXX4Hvu4Qj540PZDvQ8V6DmX6iXo98k7Md0Cm1PrLaA==
@@ -3566,14 +3633,7 @@ lru-cache@^6.0.0:
dependencies:
yallist "^4.0.0"
magic-string@^0.25.0:
version "0.25.9"
resolved "https://registry.npmjs.org/magic-string/-/magic-string-0.25.9.tgz"
integrity sha512-RmF0AsMzgt25qzqqLc1+MbHmhdx0ojF2Fvs4XnOqz2ZOBXzzkEwc/dJQZCYHAn7v1jbVOjAZfK8msRn4BxO4VQ==
dependencies:
sourcemap-codec "^1.4.8"
magic-string@^0.25.7:
magic-string@^0.25.0, magic-string@^0.25.7:
version "0.25.9"
resolved "https://registry.npmjs.org/magic-string/-/magic-string-0.25.9.tgz"
integrity sha512-RmF0AsMzgt25qzqqLc1+MbHmhdx0ojF2Fvs4XnOqz2ZOBXzzkEwc/dJQZCYHAn7v1jbVOjAZfK8msRn4BxO4VQ==
@@ -3715,7 +3775,7 @@ mrmime@^1.0.0:
resolved "https://registry.npmjs.org/mrmime/-/mrmime-1.0.1.tgz"
integrity sha512-hzzEagAgDyoU1Q6yg5uI+AorQgdvMCur3FcKf7NhMKWsaYg+RnbTyHRa/9IlLF9rf455MOCtcqqrQQ83pPP7Uw==
ms@^2.1.1, ms@2.1.2:
ms@2.1.2, ms@^2.1.1:
version "2.1.2"
resolved "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz"
integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==
@@ -3840,7 +3900,7 @@ object.assign@^4.1.4:
has-symbols "^1.0.3"
object-keys "^1.1.1"
odometer@^0.4.8, odometer@latest:
odometer@^0.4.8:
version "0.4.8"
resolved "https://registry.npmjs.org/odometer/-/odometer-0.4.8.tgz"
integrity sha512-bfKuAhWE/qMCiX9bwX90c5bTpt7MDVeq1e6YsOHQrYokNhv9jhS5JbR9kg6i+FeWmDgalf3VUtwNx1aVaZ8cgg==
@@ -4064,7 +4124,7 @@ prettier-linter-helpers@^1.0.0:
dependencies:
fast-diff "^1.1.2"
prettier@^3.0.0, "prettier@>= 3.0.0", prettier@>=3.0.0:
prettier@^3.0.0:
version "3.0.2"
resolved "https://registry.npmjs.org/prettier/-/prettier-3.0.2.tgz"
integrity sha512-o2YR9qtniXvwEZlOKbveKfDQVyqxbEIWn48Z8m3ZJjBjcCmUy3xZGIv+7AkaeuaTr6yPXJjwv07ZWlsWbEy1rQ==
@@ -4234,14 +4294,14 @@ rollup-plugin-terser@^7.0.0:
serialize-javascript "^4.0.0"
terser "^5.0.0"
"rollup@^1.20.0 || ^2.0.0", rollup@^1.20.0||^2.0.0, rollup@^2.0.0, rollup@^2.43.1:
rollup@^2.43.1:
version "2.79.2"
resolved "https://registry.npmjs.org/rollup/-/rollup-2.79.2.tgz"
integrity sha512-fS6iqSPZDs3dr/y7Od6y5nha8dW1YnbgtsyotCVvoFGKbERG++CVRFv1meyGDE1SNItQA8BrnCw7ScdAhRJ3XQ==
optionalDependencies:
fsevents "~2.3.2"
rollup@^1.20.0||^2.0.0||^3.0.0, rollup@^3.27.1:
rollup@^3.27.1:
version "3.29.5"
resolved "https://registry.npmjs.org/rollup/-/rollup-3.29.5.tgz"
integrity sha512-GVsDdsbJzzy4S/v3dqWPJ7EfvZJfCHiDqe80IyrF59LYuP+e6U1LJoUqeuqRbwAWoMNoXivMNeNAOf5E22VA1w==
@@ -4291,7 +4351,7 @@ safe-regex-test@^1.0.0:
resolved "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz"
integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==
sass@*, sass@^1.69.4:
sass@^1.69.4:
version "1.69.5"
resolved "https://registry.npmjs.org/sass/-/sass-1.69.5.tgz"
integrity sha512-qg2+UCJibLr2LCVOt3OlPhr/dqVHWOa9XtZf2OjbLs/T4VPSJ00udtgJxH3neXZm+QqX8B+3cU7RaLqp1iVfcQ==
@@ -4312,12 +4372,7 @@ scroll-into-view-if-needed@^2.2.25:
dependencies:
compute-scroll-into-view "^1.0.20"
semver@^5.5.0:
version "5.7.2"
resolved "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz"
integrity sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==
semver@^5.6.0:
"semver@2 || 3 || 4 || 5", semver@^5.5.0, semver@^5.6.0:
version "5.7.2"
resolved "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz"
integrity sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==
@@ -4327,32 +4382,13 @@ semver@^6.3.1:
resolved "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz"
integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==
semver@^7.3.6:
semver@^7.3.6, semver@^7.3.7, semver@^7.5.4:
version "7.5.4"
resolved "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz"
integrity sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==
dependencies:
lru-cache "^6.0.0"
semver@^7.3.7:
version "7.5.4"
resolved "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz"
integrity sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==
dependencies:
lru-cache "^6.0.0"
semver@^7.5.4:
version "7.5.4"
resolved "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz"
integrity sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==
dependencies:
lru-cache "^6.0.0"
"semver@2 || 3 || 4 || 5":
version "5.7.2"
resolved "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz"
integrity sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==
serialize-javascript@^4.0.0:
version "4.0.0"
resolved "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-4.0.0.tgz"
@@ -4431,7 +4467,7 @@ slash@^3.0.0:
resolved "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz"
integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==
source-map-js@^1.0.1, source-map-js@^1.0.2, source-map-js@^1.2.0, source-map-js@^1.2.1, "source-map-js@>=0.6.2 <2.0.0":
"source-map-js@>=0.6.2 <2.0.0", source-map-js@^1.0.1, source-map-js@^1.0.2, source-map-js@^1.2.0, source-map-js@^1.2.1:
version "1.2.1"
resolved "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz"
integrity sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==
@@ -4586,14 +4622,7 @@ supports-color@^5.3.0:
dependencies:
has-flag "^3.0.0"
supports-color@^7.0.0:
version "7.2.0"
resolved "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz"
integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==
dependencies:
has-flag "^4.0.0"
supports-color@^7.1.0:
supports-color@^7.0.0, supports-color@^7.1.0:
version "7.2.0"
resolved "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz"
integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==
@@ -4631,7 +4660,7 @@ svg.filter.js@^2.0.2:
dependencies:
svg.js "^2.2.5"
svg.js@^2.0.1, svg.js@^2.2.5, svg.js@^2.4.0, svg.js@^2.6.5, svg.js@>=2.3.x:
svg.js@>=2.3.x, svg.js@^2.0.1, svg.js@^2.2.5, svg.js@^2.4.0, svg.js@^2.6.5:
version "2.7.1"
resolved "https://registry.npmjs.org/svg.js/-/svg.js-2.7.1.tgz"
integrity sha512-ycbxpizEQktk3FYvn/8BH+6/EuWXg7ZpQREJvgacqn46gIddG24tNNe4Son6omdXCnSOaApnpZw6MPCBA1dODA==
@@ -4693,7 +4722,7 @@ tempy@^0.6.0:
type-fest "^0.16.0"
unique-string "^2.0.0"
terser@^5.0.0, terser@^5.4.0:
terser@^5.0.0:
version "5.24.0"
resolved "https://registry.npmjs.org/terser/-/terser-5.24.0.tgz"
integrity sha512-ZpGR4Hy3+wBEzVEnHvstMvqpD/nABNelQn/z2r0fjVWGQsN3bpOLzQlqDxmb4CDZnXq5lpjnQ+mHQLAOpfM5iw==
@@ -4732,6 +4761,11 @@ tr46@^1.0.1:
dependencies:
punycode "^2.1.0"
tslib@2.3.0:
version "2.3.0"
resolved "https://registry.npmjs.org/tslib/-/tslib-2.3.0.tgz"
integrity sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg==
tslib@^1.8.1:
version "1.14.1"
resolved "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz"
@@ -4742,11 +4776,6 @@ tslib@^2.3.0, tslib@^2.5.0, tslib@^2.6.0:
resolved "https://registry.npmjs.org/tslib/-/tslib-2.6.1.tgz"
integrity sha512-t0hLfiEKfMUoqhG+U1oid7Pva4bbDPHYfJNiB7BiIjRkj1pyC++4N3huJfqY6aRH6VTB0rvtzQwjM4K6qpfOig==
tslib@2.3.0:
version "2.3.0"
resolved "https://registry.npmjs.org/tslib/-/tslib-2.3.0.tgz"
integrity sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg==
tsutils@^3.21.0:
version "3.21.0"
resolved "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz"
@@ -4810,7 +4839,7 @@ typed-array-length@^1.0.4:
for-each "^0.3.3"
is-typed-array "^1.1.9"
typescript@*, "typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta", typescript@>=4.4.4, typescript@>=5.0.0, typescript@~5.1.6:
typescript@~5.1.6:
version "5.1.6"
resolved "https://registry.npmjs.org/typescript/-/typescript-5.1.6.tgz"
integrity sha512-zaWCozRZ6DLEWAWFrVDz1H6FVXzUSfTy5FUMWsQlU8Ym5JP9eO4xkTIROFCQvhQf61z6O/G6ugw3SgAnvvm+HA==
@@ -4985,7 +5014,7 @@ vite-plugin-pwa@^0.16.7:
workbox-build "^7.0.0"
workbox-window "^7.0.0"
"vite@^2.9.0 || ^3.0.0-0 || ^4.0.0", "vite@^3.1.0 || ^4.0.0 || ^5.0.0-0", vite@^4.0.0, vite@^4.4.6:
vite@^4.4.6:
version "4.5.14"
resolved "https://registry.npmjs.org/vite/-/vite-4.5.14.tgz"
integrity sha512-+v57oAaoYNnO3hIu5Z/tJRZjq5aHM2zDve9YZ8HngVHbhk66RStobhb1sqPMIPEleV6cNKYK4eGrAbE9Ulbl2g==
@@ -5006,11 +5035,6 @@ vue-content-loader@^2.0.1:
resolved "https://registry.npmjs.org/vue-content-loader/-/vue-content-loader-2.0.1.tgz"
integrity sha512-pkof4+q2xmzNEdhqelxtJejeP/vQUJtLle4/v2ueG+HURqM9Q/GIGC8GJ2bVVWeLfTDET51jqimwQdmxJTlu0g==
vue-demi@^0.12.5:
version "0.12.5"
resolved "https://registry.npmjs.org/vue-demi/-/vue-demi-0.12.5.tgz"
integrity sha512-BREuTgTYlUr0zw0EZn3hnhC3I6gPWv+Kwh4MCih6QcAeaTlaIX0DwOVN0wHej7hSvDPecz4jygy/idsgKfW58Q==
vue-demi@>=0.14.5:
version "0.14.5"
resolved "https://registry.npmjs.org/vue-demi/-/vue-demi-0.14.5.tgz"
@@ -5021,6 +5045,11 @@ vue-demi@>=0.14.6:
resolved "https://registry.npmjs.org/vue-demi/-/vue-demi-0.14.6.tgz"
integrity sha512-8QA7wrYSHKaYgUxDA5ZC24w+eHm3sYCbp0EzcDwKqN3p6HqtTCGR/GVsPyZW92unff4UlcSh++lmqDWN3ZIq4w==
vue-demi@^0.12.5:
version "0.12.5"
resolved "https://registry.npmjs.org/vue-demi/-/vue-demi-0.12.5.tgz"
integrity sha512-BREuTgTYlUr0zw0EZn3hnhC3I6gPWv+Kwh4MCih6QcAeaTlaIX0DwOVN0wHej7hSvDPecz4jygy/idsgKfW58Q==
vue-eslint-parser@^9.1.1, vue-eslint-parser@^9.3.1:
version "9.3.1"
resolved "https://registry.npmjs.org/vue-eslint-parser/-/vue-eslint-parser-9.3.1.tgz"
@@ -5068,17 +5097,6 @@ vue-types@^3.0.0:
dependencies:
is-plain-object "3.0.1"
"vue@^2.0.0 || >=3.0.0", "vue@^2.6.14 || ^3.3.0", vue@^3, vue@^3.0.*, vue@^3.0.0, "vue@^3.0.0-0 || ^2.6.0", vue@^3.2.0, vue@^3.2.25, vue@^3.3.4, "vue@> 3.0.0", "vue@>= 2.0.0", vue@>=3.0.3, vue@>=3.2.0, "vue@2 || 3", vue@3.3.4, vue@latest:
version "3.3.4"
resolved "https://registry.npmjs.org/vue/-/vue-3.3.4.tgz"
integrity sha512-VTyEYn3yvIeY1Py0WaYGZsXnz3y5UnGi62GjVEqvEGPl6nxbOrCXbVOTQWBEJUqAyTUk2uJ5JLVnYJ6ZzGbrSw==
dependencies:
"@vue/compiler-dom" "3.3.4"
"@vue/compiler-sfc" "3.3.4"
"@vue/runtime-dom" "3.3.4"
"@vue/server-renderer" "3.3.4"
"@vue/shared" "3.3.4"
vue3-apexcharts@^1.4.4:
version "1.4.4"
resolved "https://registry.npmjs.org/vue3-apexcharts/-/vue3-apexcharts-1.4.4.tgz"
@@ -5104,6 +5122,17 @@ vue3-otp-input@^0.4.1:
resolved "https://registry.npmjs.org/vue3-otp-input/-/vue3-otp-input-0.4.1.tgz"
integrity sha512-wVl9i3DcWlO0C7fBI9V+RIP3crm/1tY72fuhvb3YM2JfbLoYofB96aPl5AgFhA0Cse5bQEMYtIvOeiqW3rfbAw==
vue@^3.2.25, vue@^3.3.4:
version "3.3.4"
resolved "https://registry.npmjs.org/vue/-/vue-3.3.4.tgz"
integrity sha512-VTyEYn3yvIeY1Py0WaYGZsXnz3y5UnGi62GjVEqvEGPl6nxbOrCXbVOTQWBEJUqAyTUk2uJ5JLVnYJ6ZzGbrSw==
dependencies:
"@vue/compiler-dom" "3.3.4"
"@vue/compiler-sfc" "3.3.4"
"@vue/runtime-dom" "3.3.4"
"@vue/server-renderer" "3.3.4"
"@vue/shared" "3.3.4"
warning@^4.0.0:
version "4.0.3"
resolved "https://registry.npmjs.org/warning/-/warning-4.0.3.tgz"
@@ -5326,7 +5355,7 @@ workbox-sw@7.0.0:
resolved "https://registry.npmjs.org/workbox-sw/-/workbox-sw-7.0.0.tgz"
integrity sha512-SWfEouQfjRiZ7GNABzHUKUyj8pCoe+RwjfOIajcx6J5mtgKkN+t8UToHnpaJL5UVVOf5YhJh+OHhbVNIHe+LVA==
workbox-window@^7.0.0, workbox-window@7.0.0:
workbox-window@7.0.0, workbox-window@^7.0.0:
version "7.0.0"
resolved "https://registry.npmjs.org/workbox-window/-/workbox-window-7.0.0.tgz"
integrity sha512-j7P/bsAWE/a7sxqTzXo3P2ALb1reTfZdvVp6OJ/uLr/C2kZAMvjeWGm8V4htQhor7DOvYg0sSbFN2+flT5U0qA==