31 lines
1.3 KiB
Vue
31 lines
1.3 KiB
Vue
<template>
|
|||
|
|
<div class="bg-primary rounded-lg p-2 py-3 mt-2">
|
||
|
|
<div class="flex justify-center text-tertiary w-full z-20">
|
||
|
|
محصولات:
|
||
|
|
<div class="text-l mr-2 font-bold">{{ userStore?.userInfo?.wallet?.count_product ?? 0 }} عدد</div>
|
||
|
|
</div>
|
||
|
|
<div class="flex mt-2 justify-center text-tertiary w-full z-20">
|
||
|
|
دارایی طلایی:
|
||
|
|
<div class="text-l mr-2 font-bold">{{ (userStore?.userInfo?.wallet?.count_gold ?? 0).toFixed(3) }} گرم</div>
|
||
|
|
<BasicIcon @click="$emit('openGoldModal')" icon="vuesax-linear:info-circle" size="18" color="tertiary" />
|
||
|
|
</div>
|
||
|
|
<div class="flex mt-2 justify-center text-tertiary w-full z-20">
|
||
|
|
دارایی ریالی:
|
||
|
|
<div class="text-l mr-2 font-bold">{{ usePriceWithoutType(userStore?.userInfo?.wallet?.count_cash ?? 0) }} ریال</div>
|
||
|
|
<BasicIcon @click="$emit('openRialModal')" icon="vuesax-linear:info-circle" size="18" color="tertiary" />
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
</template>
|
||
|
|
|
||
|
|
<script setup lang="ts">
|
||
|
|
import { useUserStore } from '@/store/userStore'
|
||
|
|
import BasicIcon from '@/components/BasicPacks/BasicIcon.vue'
|
||
|
|
import {usePriceWithoutType} from "../../../../utils/usePrice";
|
||
|
|
|
||
|
|
const userStore = useUserStore()
|
||
|
|
|
||
|
|
defineEmits<{
|
||
|
|
openGoldModal: []
|
||
|
|
openRialModal: []
|
||
|
|
}>()
|
||
|
|
</script>
|