Updated
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user