Merge branch 'phatt_dev' into develop

This commit is contained in:
puriphatt 2024-03-20 14:11:24 +07:00
commit d0b101ad64
6 changed files with 12 additions and 10 deletions

View file

@ -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,

View file

@ -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,

View file

@ -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);

View file

@ -1,5 +1,5 @@
interface RequestItemsObject {
profileId: string;
profileId?: string;
isActive: boolean;
detail: string;
issueDate: Date | null;

View file

@ -1,5 +1,5 @@
interface RequestItemsObject {
profileId: string;
profileId?: string;
isActive: boolean;
year: number;
no: string;

View file

@ -1,5 +1,5 @@
interface RequestItemsObject {
profileId: string;
profileId?: string;
isActive: boolean;
name: string;
date: Date | null;