Split desktop and mobile layouts with shared page data so APIs fetch once per context.
Add layout shells, desktop views, module-level page caches, and UI fixes for auth, home, wallet, transactions, address, and related pages. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,65 @@
|
||||
<template>
|
||||
<div class="wallet-add-card-form pb-4 mt-2">
|
||||
<a-form :model="cardForm" layout="vertical">
|
||||
<a-form-item
|
||||
:rules="cardNumberValidation()"
|
||||
class="w-full"
|
||||
label="شماره کارت"
|
||||
name="cart_number"
|
||||
>
|
||||
<BasicInput v-model:value="cardForm.cart_number" type="number" />
|
||||
</a-form-item>
|
||||
<a-form-item
|
||||
v-if="walletStore.walletInfo"
|
||||
class="w-full"
|
||||
label="تاریخ تولد"
|
||||
name="birth_date"
|
||||
>
|
||||
<BaseDatePicker v-model:value="cardForm.birth_date" class="w-full" inputReadOnly />
|
||||
</a-form-item>
|
||||
<BasicButton
|
||||
v-if="showActions"
|
||||
:disabled="loading"
|
||||
class="w-full mt-5"
|
||||
type="primary"
|
||||
@click="addCard"
|
||||
>
|
||||
<a-spin v-if="loading" size="small" />
|
||||
<div v-else>ثبت</div>
|
||||
</BasicButton>
|
||||
<BasicButton v-if="showActions" class="w-full mt-2" @click="showAddCard = false">بازگشت</BasicButton>
|
||||
</a-form>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import BasicButton from '@/components/BasicPacks/BasicButton.vue'
|
||||
import BasicInput from '@/components/BasicPacks/BasicInput.vue'
|
||||
import BaseDatePicker from '@/components/BasicPacks/BaseDatePicker'
|
||||
import { cardNumberValidation } from '@/utils/inputRules'
|
||||
import { useWalletPageContext } from '../composables/useWalletPage'
|
||||
|
||||
withDefaults(
|
||||
defineProps<{
|
||||
/** Inline ثبت/بازگشت — mobile action sheet only; desktop uses modal footer */
|
||||
showActions?: boolean
|
||||
}>(),
|
||||
{ showActions: true }
|
||||
)
|
||||
|
||||
const {
|
||||
cardForm,
|
||||
walletStore,
|
||||
loading,
|
||||
showAddCard,
|
||||
addCard,
|
||||
} = useWalletPageContext()
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
.wallet-add-card-form {
|
||||
@media screen and (max-width: 767.98px) {
|
||||
padding-bottom: 5rem;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user