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