ทะเบียนประวัติ: ข้อมูลผลงาน แก้ reqBody
This commit is contained in:
parent
de9ad67685
commit
051d4bf387
6 changed files with 12 additions and 10 deletions
|
|
@ -489,7 +489,7 @@ async function addEditData(editStatus: boolean = false) {
|
|||
: config.API.profileNewInsign;
|
||||
const method = editStatus ? "patch" : "post";
|
||||
const reqBody: RequestItemsObject = {
|
||||
profileId: profileId.value,
|
||||
profileId: editStatus ? undefined : profileId.value,
|
||||
isActive: insigniaData.isActive,
|
||||
year: insigniaData.year,
|
||||
no: insigniaData.no,
|
||||
|
|
|
|||
|
|
@ -238,12 +238,13 @@ async function addEditData(editStatus: boolean = false) {
|
|||
: config.API.profileNewHonor;
|
||||
const method = editStatus ? "patch" : "post";
|
||||
const reqBody: RequestItemsObject = {
|
||||
profileId: profileId.value,
|
||||
profileId: editStatus ? undefined : profileId.value,
|
||||
isActive: declHonorData.isActive,
|
||||
detail: declHonorData.detail,
|
||||
issueDate: declHonorData.isDate
|
||||
? declHonorData.issueDate
|
||||
: new Date(`${declHonorData.issueDateYear}-1-1`),
|
||||
issueDate:
|
||||
declHonorData.isDate === "true"
|
||||
? declHonorData.issueDate
|
||||
: new Date(`${declHonorData.issueDateYear}-01-01`),
|
||||
issuer: declHonorData.issuer,
|
||||
refCommandDate: declHonorData.refCommandDate,
|
||||
refCommandNo: declHonorData.refCommandNo,
|
||||
|
|
|
|||
|
|
@ -295,7 +295,7 @@ async function addEditData(editStatus: boolean = false) {
|
|||
: config.API.profileNewAssessments;
|
||||
const method = editStatus ? "patch" : "post";
|
||||
const reqBody: RequestItemsObject = {
|
||||
profileId: profileId.value,
|
||||
profileId: editStatus ? undefined : profileId.value,
|
||||
isActive: resPerformData.isActive,
|
||||
name: resPerformData.name,
|
||||
date: resPerformData.date,
|
||||
|
|
@ -337,7 +337,6 @@ function onClickOpenDialog(editStatus: boolean = false, row?: ResponseObject) {
|
|||
isEdit.value = editStatus;
|
||||
|
||||
if (editStatus && row) {
|
||||
console.log(row.id);
|
||||
Object.assign(resPerformData, row);
|
||||
} else {
|
||||
(resPerformData.id = ""),
|
||||
|
|
@ -376,6 +375,8 @@ async function clickHistory(row: ResponseObject) {
|
|||
showLoader();
|
||||
try {
|
||||
const res = await http.get(config.API.profileAssessmentHisId(row.id));
|
||||
console.log(res.data);
|
||||
|
||||
rowsHistory.value = res.data.result;
|
||||
} catch (e) {
|
||||
messageError($q, e);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
interface RequestItemsObject {
|
||||
profileId: string;
|
||||
profileId?: string;
|
||||
isActive: boolean;
|
||||
detail: string;
|
||||
issueDate: Date | null;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
interface RequestItemsObject {
|
||||
profileId: string;
|
||||
profileId?: string;
|
||||
isActive: boolean;
|
||||
year: number;
|
||||
no: string;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
interface RequestItemsObject {
|
||||
profileId: string;
|
||||
profileId?: string;
|
||||
isActive: boolean;
|
||||
name: string;
|
||||
date: Date | null;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue