added table
This commit is contained in:
@@ -1,21 +1,21 @@
|
||||
<template>
|
||||
<div class="h-full min-h-0 min-w-0 max-w-full overflow-hidden">
|
||||
<BasicShowContext title="لیست پیامک ها">
|
||||
<!-- <template v-if="!mobile && isMobileScreen" #extra>
|
||||
<template v-if="groupSmsEnabled && !mobile && isMobileScreen" #extra>
|
||||
<BaseButton type="primary" size="small" icon="vuesax-linear:sms" @click="emits('add')">
|
||||
ارسال پیامک
|
||||
</BaseButton>
|
||||
</template>-->
|
||||
</template>
|
||||
|
||||
<div class="flex h-full min-h-0 flex-col">
|
||||
<BaseTable v-if="!isMobileScreen" class="h-full min-h-0 min-w-0" v-bind="tblProps" @register="submit" ref="tbl">
|
||||
<!-- <template #extraHeader>
|
||||
<BaseButton v-if="!mobile" type="primary" size="small" icon="vuesax-linear:sms" @click="emits('add')">
|
||||
ارسال پیامک
|
||||
</BaseButton>
|
||||
</template>-->
|
||||
<template #action="{ column, record }">
|
||||
<!-- <div class="gap-2 flex justify-center">
|
||||
<template v-if="groupSmsEnabled" #extraHeader>
|
||||
<BaseButton v-if="!mobile" type="primary" size="small" icon="vuesax-linear:sms" @click="emits('add')">
|
||||
ارسال پیامک
|
||||
</BaseButton>
|
||||
</template>
|
||||
<template #action="{ column, record }">
|
||||
<!-- <div class="gap-2 flex justify-center">
|
||||
<a-tooltip placement="bottom" class="cursor-pointer" @click="emits('info', record)">
|
||||
<template #title>
|
||||
<span>مشخصات</span>
|
||||
@@ -23,10 +23,10 @@
|
||||
<Icon icon="vuesax-linear:stickynote" color="#10913A" />
|
||||
</a-tooltip>
|
||||
</div>-->
|
||||
</template>
|
||||
</BaseTable>
|
||||
</template>
|
||||
</BaseTable>
|
||||
|
||||
<SmsMobileCardList v-else ref="mobileListRef" class="min-h-0 flex-1" :mobile="mobile" />
|
||||
<SmsMobileCardList v-else ref="mobileListRef" class="min-h-0 flex-1" :mobile="mobile" />
|
||||
</div>
|
||||
</BasicShowContext>
|
||||
</div>
|
||||
@@ -39,6 +39,7 @@ import { cols } from '../hooks/smsColumns'
|
||||
import { getSMSTable } from '@/api/sms'
|
||||
import SmsMobileCardList from './SmsMobileCardList.vue'
|
||||
import { isMobile as isMobileScreen } from '@core/utils/is'
|
||||
import { groupSmsEnabledSetting, initWalletSettingsFromApi } from '@/utils/config'
|
||||
|
||||
interface Prop {
|
||||
mobile?: number | string
|
||||
@@ -49,6 +50,11 @@ const emits = defineEmits(['delete', 'edit', 'add', 'info'])
|
||||
|
||||
const [submit, reload] = useBaseTable()
|
||||
const mobileListRef = ref<null | { fetch: () => Promise<void> }>(null)
|
||||
const groupSmsEnabled = groupSmsEnabledSetting
|
||||
|
||||
onMounted(() => {
|
||||
void initWalletSettingsFromApi()
|
||||
})
|
||||
|
||||
const tblProps = ref<any>({
|
||||
columns: cols,
|
||||
|
||||
Reference in New Issue
Block a user