102 lines
3.3 KiB
Vue
102 lines
3.3 KiB
Vue
<template>
|
|
<div class="mobile-transactions-view">
|
|
<div class="mobile-page-bg" aria-hidden="true">
|
|
<img :src="img" alt="" />
|
|
</div>
|
|
|
|
<MobilePageHeader title="لیست تراکنش ها">
|
|
<template #trailing>
|
|
<button type="button" class="mobile-transactions-view__filter" @click="showFilter = true">
|
|
<BasicIcon icon="vuesax-linear:filter" />
|
|
</button>
|
|
</template>
|
|
</MobilePageHeader>
|
|
|
|
<div
|
|
ref="el"
|
|
class="mobile-transactions-view__content mpage-content px-3 pb-[calc(var(--app-bottom-chrome-height)+1rem)]"
|
|
>
|
|
<list-anim v-if="!loading">
|
|
<Item v-for="item in items" :key="item.id" :item="item" />
|
|
<div :ref="bindMobileObserver" v-show="!loading" class="w-full opacity-0 relative">
|
|
در حال بارگذاری
|
|
</div>
|
|
<TransactionSkeleton v-if="loadingMore" class="mt-1 mb-8" />
|
|
</list-anim>
|
|
<TransactionSkeleton v-for="i in 13" v-else :key="i" class="mt-1" />
|
|
<div v-if="items.length <= 0 && !loading" class="flex flex-col items-center justify-center min-h-[50vh]">
|
|
<DotLottieVue
|
|
class="w-11rem h-11rem"
|
|
autoplay
|
|
src="https://lottie.host/51d3315a-cf88-4c18-bb4d-a31511fd4325/KjSBzcMbi6.json"
|
|
/>
|
|
<div class="font-bold">{{ emptyText }}</div>
|
|
</div>
|
|
</div>
|
|
|
|
<BasicActionSheet v-model:show="showFilter">
|
|
<div class="font-bold text-lg">فیلتر</div>
|
|
<div class="pb-10 mt-5">
|
|
<a-form-item class="w-full gap-2 !flex-col" label="تاریخ" name="password">
|
|
<BaseDatePicker v-model:value="dateFilter" class="w-full" size="large" />
|
|
</a-form-item>
|
|
<BasicButton class="w-full mt-5" type="primary" @click="applyFilter">اعمال فیلتر</BasicButton>
|
|
<BasicButton class="w-full mt-2" @click="showFilter = false">بازگشت</BasicButton>
|
|
</div>
|
|
</BasicActionSheet>
|
|
</div>
|
|
</template>
|
|
|
|
<script lang="ts" setup>
|
|
import Item from '../components/Item.vue'
|
|
import { ref } from 'vue'
|
|
import { loading, loadingMore } from '@/utils'
|
|
import BasicIcon from '@/components/BasicPacks/BasicIcon.vue'
|
|
import BasicActionSheet from '@/components/BasicPacks/BasicActionSheet.vue'
|
|
import BasicButton from '@/components/BasicPacks/BasicButton.vue'
|
|
import BaseDatePicker from '@/components/BasicPacks/BaseDatePicker/src/BaseDatePicker.vue'
|
|
import ListAnim from '@/components/ListAnim.vue'
|
|
import TransactionSkeleton from '@/components/TransactionSkeleton.vue'
|
|
import MobilePageHeader from '@/layouts/components/MobilePageHeader.vue'
|
|
import { DotLottieVue } from '@lottiefiles/dotlottie-vue'
|
|
import img from '@/assets/img/user_ly1.svg'
|
|
import { useTransactionsPageContext } from '../composables/useTransactionsPage'
|
|
|
|
const el = ref<HTMLElement | null>(null)
|
|
|
|
const {
|
|
items,
|
|
dateFilter,
|
|
emptyText,
|
|
applyFilter,
|
|
bindMobileObserver,
|
|
showFilter,
|
|
} = useTransactionsPageContext()
|
|
</script>
|
|
|
|
<style scoped lang="less">
|
|
.mobile-transactions-view {
|
|
position: relative;
|
|
min-height: 100%;
|
|
}
|
|
|
|
.mobile-transactions-view__content {
|
|
position: relative;
|
|
z-index: 1;
|
|
padding-inline: 0.75rem;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
.mobile-transactions-view__filter {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
border: none;
|
|
background: transparent;
|
|
padding: 0;
|
|
color: inherit;
|
|
cursor: pointer;
|
|
font-family: inherit;
|
|
}
|
|
</style>
|