refactor(recruiting): add rootDnaId to disable and compete API payloads
This commit is contained in:
parent
7d1bfd33ff
commit
baadd296cb
5 changed files with 27 additions and 9 deletions
|
|
@ -45,6 +45,7 @@ interface RequestPeriodCompete {
|
|||
order: number;
|
||||
year: number;
|
||||
announcementDate: string | null;
|
||||
rootDnaId: string;
|
||||
}
|
||||
|
||||
interface RequestPeriodDisable {
|
||||
|
|
@ -63,6 +64,7 @@ interface RequestPeriodDisable {
|
|||
round: number;
|
||||
year: number;
|
||||
announcementDate: string | null;
|
||||
rootDnaId: string;
|
||||
}
|
||||
|
||||
interface RequestPosition {
|
||||
|
|
|
|||
|
|
@ -232,7 +232,7 @@ export default [
|
|||
component: PeriodDisable,
|
||||
meta: {
|
||||
Auth: true,
|
||||
Key: "SYS_EXAM_SELECT_LISTNAME",
|
||||
Key: "SYS_EXAM_SELECT_PERIOD_DIS",
|
||||
Role: "STAFF",
|
||||
},
|
||||
},
|
||||
|
|
@ -242,7 +242,7 @@ export default [
|
|||
component: PeriodDisableAdd,
|
||||
meta: {
|
||||
Auth: true,
|
||||
Key: "SYS_EXAM_SELECT_LISTNAME",
|
||||
Key: "SYS_EXAM_SELECT_PERIOD_DIS",
|
||||
Role: "STAFF",
|
||||
},
|
||||
},
|
||||
|
|
@ -252,7 +252,7 @@ export default [
|
|||
component: PeriodDisableAdd,
|
||||
meta: {
|
||||
Auth: true,
|
||||
Key: "SYS_EXAM_SELECT_LISTNAME",
|
||||
Key: "SYS_EXAM_SELECT_PERIOD_DIS",
|
||||
Role: "STAFF",
|
||||
},
|
||||
},
|
||||
|
|
@ -262,7 +262,7 @@ export default [
|
|||
component: MainDisableDetail,
|
||||
meta: {
|
||||
Auth: true,
|
||||
Key: "SYS_EXAM_SELECT_LISTNAME",
|
||||
Key: "SYS_EXAM_SELECT_PERIOD_DIS",
|
||||
Role: "STAFF",
|
||||
},
|
||||
},
|
||||
|
|
@ -272,7 +272,7 @@ export default [
|
|||
component: MainDisableEx,
|
||||
meta: {
|
||||
Auth: true,
|
||||
Key: "SYS_EXAM_SELECT_LISTNAME",
|
||||
Key: "SYS_EXAM_SELECT_PERIOD_DIS",
|
||||
Role: "STAFF",
|
||||
},
|
||||
},
|
||||
|
|
|
|||
|
|
@ -2,11 +2,13 @@
|
|||
import { onMounted, ref, watch, computed } from "vue";
|
||||
import { useQuasar, QForm } from "quasar";
|
||||
import { useRouter, useRoute } from "vue-router";
|
||||
import { storeToRefs } from "pinia";
|
||||
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { calculateFiscalYear } from "@/utils/function";
|
||||
import { usePositionKeycloakStore } from "@/stores/positionKeycloak";
|
||||
|
||||
import type { RequestPeriodCompete } from "@/modules/03_recruiting/interface/request/Period";
|
||||
import type {
|
||||
|
|
@ -16,6 +18,7 @@ import type {
|
|||
|
||||
const $q = useQuasar(); // show dialog
|
||||
const mixin = useCounterMixin();
|
||||
const { dataPositionKeycloak } = storeToRefs(usePositionKeycloakStore());
|
||||
const router = useRouter();
|
||||
const route = useRoute();
|
||||
const {
|
||||
|
|
@ -253,6 +256,7 @@ function sendData() {
|
|||
year: yearly.value,
|
||||
announcementDate:
|
||||
dateAnnounce.value !== null ? convertDateToAPI(dateAnnounce.value) : null,
|
||||
rootDnaId: !edit.value ? dataPositionKeycloak.value.rootDnaId : undefined,
|
||||
};
|
||||
return valueData;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -309,8 +309,8 @@ async function fetchData(actionType?: string) {
|
|||
if (data.length > 0) {
|
||||
data.map((r: ResponseRecruitPeriod) => {
|
||||
if (r.score != null) {
|
||||
r.scoreCount = r.score.scoreCount;
|
||||
r.scoreImportDate = r.score.importDate;
|
||||
r.scoreCount = r.score.scoreCount ? r.score.scoreCount : 0;
|
||||
r.scoreImportDate = r.score.importDate ? r.score.importDate : "-";
|
||||
}
|
||||
result.push(r);
|
||||
});
|
||||
|
|
@ -715,7 +715,11 @@ onMounted(async () => {
|
|||
<q-tooltip>นำเข้าไฟล์ผลคะแนนสอบ</q-tooltip>
|
||||
</q-btn>
|
||||
<div v-else>
|
||||
{{ props.row.score.scoreCount.toLocaleString() }}
|
||||
{{
|
||||
props.row.score
|
||||
? props.row.score.scoreCount.toLocaleString()
|
||||
: "-"
|
||||
}}
|
||||
<q-btn
|
||||
v-if="checkPermission($route)?.attrIsUpdate"
|
||||
dense
|
||||
|
|
@ -750,7 +754,11 @@ onMounted(async () => {
|
|||
<q-tooltip>นำเข้าไฟล์ผลการสอบ (บัญชีรายชื่อ)</q-tooltip>
|
||||
</q-btn>
|
||||
<div v-else>
|
||||
{{ props.row.score.resultCount.toLocaleString() }}
|
||||
{{
|
||||
props.row.score
|
||||
? props.row.score.resultCount.toLocaleString()
|
||||
: "-"
|
||||
}}
|
||||
<q-btn
|
||||
v-if="checkPermission($route)?.attrIsUpdate"
|
||||
dense
|
||||
|
|
|
|||
|
|
@ -3,11 +3,13 @@
|
|||
import { onMounted, ref, watch } from "vue";
|
||||
import { useQuasar, QForm } from "quasar";
|
||||
import { useRouter, useRoute } from "vue-router";
|
||||
import { storeToRefs } from "pinia";
|
||||
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { calculateFiscalYear } from "@/utils/function";
|
||||
import { usePositionKeycloakStore } from "@/stores/positionKeycloak";
|
||||
|
||||
import type { RequestPeriodDisable } from "@/modules/03_recruiting/interface/request/Period";
|
||||
import type {
|
||||
|
|
@ -17,6 +19,7 @@ import type {
|
|||
|
||||
const $q = useQuasar(); // show dialog
|
||||
const mixin = useCounterMixin();
|
||||
const { dataPositionKeycloak } = storeToRefs(usePositionKeycloakStore());
|
||||
const router = useRouter();
|
||||
const route = useRoute();
|
||||
const {
|
||||
|
|
@ -159,6 +162,7 @@ function sendData() {
|
|||
year: yearly.value,
|
||||
announcementDate:
|
||||
dateAnnounce.value !== null ? convertDateToAPI(dateAnnounce.value) : null,
|
||||
rootDnaId: !edit.value ? dataPositionKeycloak.value.rootDnaId : undefined,
|
||||
};
|
||||
return valueData;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue