This commit is contained in:
marzban-dev
2025-03-22 23:43:49 +03:30
parent 852a09c298
commit 2106f3f40b
56 changed files with 198 additions and 161 deletions
+3 -3
View File
@@ -109,7 +109,7 @@ const formRules = computed(() => {
};
});
const formValidator$ = useVuelidate(formRules, personalData);
const formValidator$ = useVuelidate(formRules, personalData as any);
// methods
@@ -195,7 +195,7 @@ const handleSubmit = (withValidation: boolean) => {
با اولین خریدتون هوش مصنوعی وبسایتمون واستون یک
بایوگرافی درست میکنه :)
</span>
<span
<div
class="flex-center border border-yellow-500 pe-3.5 ps-1 w-max rounded-full"
>
<div class="rounded-full p-2">
@@ -208,7 +208,7 @@ const handleSubmit = (withValidation: boolean) => {
<span class="text-xs text-yellow-500"
>جزو ۳ مشتری برتر</span
>
</span>
</div>
</div>
</div>
@@ -12,7 +12,7 @@ definePageMeta({
// state
const params: GetAllOrdersRequest = useUrlSearchParams("history");
const params = useUrlSearchParams("history") as GetAllOrdersRequest;
const filters = computed(() => {
return {
@@ -91,12 +91,12 @@ const purchases = computed(() => {
return data.value?.results.flat();
});
const hasPurchases = computed(() => data.value?.count > 0);
const hasPurchases = computed(() => data.value && data.value.count > 0);
const hasFilters = computed(() =>
Object.keys(params)
.filter((key) => key != "page")
.some((key) => params[key] != undefined)
.some((key) => (params as any)[key] != undefined)
);
const paginationData = computed(() => {
@@ -246,8 +246,8 @@ const clearFilters = () => {
</template>
</Table>
<div v-if="data?.count > 10" class="w-full flex-center py-10">
<Pagination :items="paginationData" :total="data?.count" />
<div v-if="data && paginationData && data.count > 10" class="w-full flex-center py-10">
<Pagination :items="paginationData" :total="data.count" />
</div>
</div>
</div>
+4 -4
View File
@@ -14,7 +14,7 @@ definePageMeta({
// state
const params: GetAllTicketsRequest = useUrlSearchParams("history");
const params = useUrlSearchParams("history") as GetAllTicketsRequest;
const filters = computed(() => {
return {
@@ -72,12 +72,12 @@ const tickets = computed(() => {
return data.value?.results.flat();
});
const hasTickets = computed(() => data.value?.count > 0);
const hasTickets = computed(() => data.value && data.value.count > 0);
const hasFilters = computed(() =>
Object.keys(params)
.filter((key) => key != "page")
.some((key) => params[key] != undefined)
.some((key) => (params as any)[key] != undefined)
);
const paginationData = computed(() => {
@@ -227,7 +227,7 @@ const clearFilters = () => {
</template>
</Table>
<div v-if="data?.count > 7" class="w-full flex-center py-10">
<div v-if="data && paginationData && data.count > 7" class="w-full flex-center py-10">
<Pagination :items="paginationData" :total="data?.count" />
</div>
</div>