From 17afb2ed0d5730cebf84bd34a7e38cbde1582f36 Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Fri, 3 Oct 2025 16:13:35 +0700 Subject: [PATCH] fix(development): path API profile/development --- src/api/15_development/api.development.ts | 6 ++++-- src/composables/usePagination.ts | 2 +- .../15_development/components/history/DialogGov.vue | 13 ++++++++----- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/src/api/15_development/api.development.ts b/src/api/15_development/api.development.ts index 0ea20d574..98a2fdedf 100644 --- a/src/api/15_development/api.development.ts +++ b/src/api/15_development/api.development.ts @@ -57,6 +57,8 @@ export default { `${developmentOrg}/profile/development/registry/OFFICER/${id}`, developmentIDP: (id: string) => `${development}/main/registry/OFFICER/${id}`, - devStrategySort:`${devStrategy}/sort`, - developmentScholarshipReport + devStrategySort: `${devStrategy}/sort`, + developmentScholarshipReport, + + developmentProfile: `${developmentOrg}/profile/development`, }; diff --git a/src/composables/usePagination.ts b/src/composables/usePagination.ts index cee46621d..6cdb1b521 100644 --- a/src/composables/usePagination.ts +++ b/src/composables/usePagination.ts @@ -7,7 +7,7 @@ export function usePagination( ) { const pagination = ref({ sortBy: defaultSort, - descending: true, + descending: false, page: 1, rowsPerPage: 10, rowsNumber: 0, diff --git a/src/modules/15_development/components/history/DialogGov.vue b/src/modules/15_development/components/history/DialogGov.vue index a9071f8b0..1a3b3af0f 100644 --- a/src/modules/15_development/components/history/DialogGov.vue +++ b/src/modules/15_development/components/history/DialogGov.vue @@ -8,10 +8,7 @@ import config from "@/app.config"; import { useCounterMixin } from "@/stores/mixin"; import { usePagination } from "@/composables/usePagination"; -import type { - DataOption, - FormFilter, -} from "@/modules/15_development/interface/index/Main"; +import type { DataOption } from "@/modules/15_development/interface/index/Main"; import Header from "@/components/DialogHeader.vue"; @@ -146,13 +143,19 @@ function closeDialog() { rows.value = []; selected.value = []; inputSearch.value = ""; + pagination.value = { + page: 1, + rowsPerPage: 10, + rowsNumber: 0, + sortBy: "", + }; } /** ดึงข้อมูลตาม keyword */ async function searchFilter() { showLoader(); await http - .get(config.API.registryNew(""), { + .get(config.API.developmentProfile, { params: { ...params.value, searchField: search.value,