Merge branch 'develop' into warunee-dev

# Conflicts:
#	src/modules/05_placement/components/probation/FormEvaluation/FormEvaluateScore copy.vue
#	src/modules/05_placement/components/probation/FormEvaluation/FormSaveResultAdd.vue
This commit is contained in:
Warunee Tamkoo 2023-09-26 15:30:23 +07:00
commit 556264c5f2
59 changed files with 1785 additions and 282 deletions

View file

@ -161,11 +161,6 @@ const props = defineProps({
type: Boolean, type: Boolean,
defualt: false, defualt: false,
}, },
// optionsHistory: Array,
// updateHistory: {
// type: Function,
// default: () => console.log("not function"),
// },
}); });
const emit = defineEmits([ const emit = defineEmits([

View file

@ -216,7 +216,6 @@ const uploadData = async () => {
const formData = new FormData(); const formData = new FormData();
formData.append("avatar", newFile); formData.append("avatar", newFile);
formData.append("moss", "newFile"); formData.append("moss", "newFile");
console.log(formData);
showLoader(); showLoader();
await http await http
.post(config.API.profilePaperId(profileId.value), formData) .post(config.API.profilePaperId(profileId.value), formData)

View file

@ -332,7 +332,6 @@ const fetchData = async () => {
.get(config.API.profileAvatarId(route.params.id.toString())) .get(config.API.profileAvatarId(route.params.id.toString()))
.then((res) => { .then((res) => {
const data = res.data.result; const data = res.data.result;
// console.log(data);
fullname.value = data.fullname; fullname.value = data.fullname;
imageUrl.value = data.avatar; imageUrl.value = data.avatar;
position.value = data.position; position.value = data.position;
@ -363,7 +362,6 @@ const fetchAvatarHistory = async () => {
.get(config.API.profileAvatarHistoryId(route.params.id.toString())) .get(config.API.profileAvatarHistoryId(route.params.id.toString()))
.then((res) => { .then((res) => {
const data = res.data.result; const data = res.data.result;
console.log(data);
images.value = []; images.value = [];
data.map((e: any) => { data.map((e: any) => {
images.value.push({ images.value.push({

View file

@ -723,7 +723,6 @@ const fetchData = async () => {
.get(config.API.profileLeaveId(profileId.value)) .get(config.API.profileLeaveId(profileId.value))
.then((res) => { .then((res) => {
const data = res.data.result; const data = res.data.result;
// console.log(data);
data.map((e: ResponseObject) => { data.map((e: ResponseObject) => {
rows.value.push({ rows.value.push({
id: e.id, id: e.id,
@ -909,7 +908,6 @@ const clickAddLeave = async () => {
numUsedLeave.value = 0; numUsedLeave.value = 0;
await clickTotal(); await clickTotal();
if (rowsTotal.value.length > 0) { if (rowsTotal.value.length > 0) {
// console.log(rowsTotal.value);
let data: DataOptionLeave[] = []; let data: DataOptionLeave[] = [];
rowsTotal.value.map((e: ResponseTotalObject) => { rowsTotal.value.map((e: ResponseTotalObject) => {
data.push({ data.push({
@ -1131,7 +1129,6 @@ const selectData = async (props: DataProps) => {
numUsedLeave.value = props.row.sumLeave; numUsedLeave.value = props.row.sumLeave;
await clickTotal(); await clickTotal();
if (rowsTotal.value.length > 0) { if (rowsTotal.value.length > 0) {
// console.log(rowsTotal.value);
let data: DataOptionLeave[] = []; let data: DataOptionLeave[] = [];
rowsTotal.value.map((e: ResponseTotalObject) => { rowsTotal.value.map((e: ResponseTotalObject) => {
data.push({ data.push({

View file

@ -1479,7 +1479,6 @@ const fetchData = async () => {
.get(config.API.profileSalaryEmployeeId(profileId.value)) .get(config.API.profileSalaryEmployeeId(profileId.value))
.then((res) => { .then((res) => {
const data = res.data.result; const data = res.data.result;
// console.log(data);
rows.value = []; rows.value = [];
data.map((e: ResponseObjectEmployee) => { data.map((e: ResponseObjectEmployee) => {
rows.value.push({ rows.value.push({
@ -1600,7 +1599,6 @@ const checkRowPage = () => {
editRow.value = false; editRow.value = false;
next.value = true; next.value = true;
previous.value = true; previous.value = true;
// console.log(rowIndex.value);
if (rowIndex.value + 1 >= rows.value.length) { if (rowIndex.value + 1 >= rows.value.length) {
next.value = false; next.value = false;
} }
@ -1834,7 +1832,6 @@ const clickClose = async () => {
* @param props props ใน row เลอก * @param props props ใน row เลอก
*/ */
const selectData = async (props: DataPropsEmployee) => { const selectData = async (props: DataPropsEmployee) => {
// console.log(props.row);
modalEdit.value = true; modalEdit.value = true;
modal.value = true; modal.value = true;
edit.value = false; edit.value = false;
@ -1945,7 +1942,6 @@ const clickHistory = async (row: RequestItemsEmployee) => {
.get(config.API.profileSalaryHisId(row.id)) .get(config.API.profileSalaryHisId(row.id))
.then((res) => { .then((res) => {
const data = res.data.result; const data = res.data.result;
// console.log("clickHistory", data);
rowsHistory.value = []; rowsHistory.value = [];
data.map((e: ResponseObjectEmployee) => { data.map((e: ResponseObjectEmployee) => {
rowsHistory.value.push({ rowsHistory.value.push({

View file

@ -1509,7 +1509,6 @@ const fetchData = async () => {
.get(config.API.profileSalaryEmployeeId(profileId.value)) .get(config.API.profileSalaryEmployeeId(profileId.value))
.then((res) => { .then((res) => {
const data = res.data.result; const data = res.data.result;
// console.log(data);
rows.value = []; rows.value = [];
data.map((e: ResponseObjectEmployee) => { data.map((e: ResponseObjectEmployee) => {
rows.value.push({ rows.value.push({
@ -1630,7 +1629,6 @@ const checkRowPage = () => {
editRow.value = false; editRow.value = false;
next.value = true; next.value = true;
previous.value = true; previous.value = true;
// console.log(rowIndex.value);
if (rowIndex.value + 1 >= rows.value.length) { if (rowIndex.value + 1 >= rows.value.length) {
next.value = false; next.value = false;
} }
@ -1864,7 +1862,6 @@ const clickClose = async () => {
* @param props props ใน row เลอก * @param props props ใน row เลอก
*/ */
const selectData = async (props: DataPropsEmployee) => { const selectData = async (props: DataPropsEmployee) => {
// console.log(props.row);
modalEdit.value = true; modalEdit.value = true;
modal.value = true; modal.value = true;
edit.value = false; edit.value = false;
@ -1975,7 +1972,6 @@ const clickHistory = async (row: RequestItemsEmployee) => {
.get(config.API.profileSalaryHisId(row.id)) .get(config.API.profileSalaryHisId(row.id))
.then((res) => { .then((res) => {
const data = res.data.result; const data = res.data.result;
// console.log("clickHistory", data);
rowsHistory.value = []; rowsHistory.value = [];
data.map((e: ResponseObjectEmployee) => { data.map((e: ResponseObjectEmployee) => {
rowsHistory.value.push({ rowsHistory.value.push({

View file

@ -954,8 +954,6 @@ const fetchPosition = async () => {
.get(config.API.position) .get(config.API.position)
.then((res) => { .then((res) => {
const data = res.data.result; const data = res.data.result;
console.log(data.positionPaths);
let optionpositionpaths: DataOption[] = []; let optionpositionpaths: DataOption[] = [];
data.positionPaths.map((r: any) => { data.positionPaths.map((r: any) => {
optionpositionpaths.push({ optionpositionpaths.push({
@ -1394,7 +1392,6 @@ const clickHistory = async (row: RequestItemsObject) => {
let data = res.data.result; let data = res.data.result;
rowsHistory.value = []; rowsHistory.value = [];
data.map((e: RequestItemsObject, index: number) => { data.map((e: RequestItemsObject, index: number) => {
console.log(index);
if (index != 0) { if (index != 0) {
rowsHistory.value.push({ rowsHistory.value.push({
id: e.id, id: e.id,

View file

@ -385,7 +385,7 @@ const ddNoResultMsg = defineAsyncComponent(
); // Dropdown Filter ); // Dropdown Filter
const mixin = useCounterMixin(); const mixin = useCounterMixin();
const { showLoader, hideLoader } = mixin; const { showLoader, hideLoader, messageError } = mixin;
const $q = useQuasar(); // show dialog const $q = useQuasar(); // show dialog
const emit = defineEmits(["update:positions", "update:formprops"]); const emit = defineEmits(["update:positions", "update:formprops"]);
const props = defineProps({ const props = defineProps({
@ -405,8 +405,6 @@ watch(myForm, (form: QForm | null, prevForm: QForm | null) => {
if (!props.isAddNew) { if (!props.isAddNew) {
positions.value.push(JSON.parse(JSON.stringify(positionSet.value))); positions.value.push(JSON.parse(JSON.stringify(positionSet.value)));
if (!props.editObj != null && !props.editObj != undefined) { if (!props.editObj != null && !props.editObj != undefined) {
// console.log("position.value", position.value);
// console.log("props.editObj", props.editObj);
positions.value[0].positionMasterId = props.editObj?.positionMasterId; positions.value[0].positionMasterId = props.editObj?.positionMasterId;
positions.value[0].positionUserNote = props.editObj?.positionUserNote; positions.value[0].positionUserNote = props.editObj?.positionUserNote;
positions.value[0].isActive = props.editObj?.isActive; positions.value[0].isActive = props.editObj?.isActive;
@ -442,7 +440,6 @@ const fetchPositionMaster = async () => {
// .get(config.API.getPostionMasterDraft(false)) // .get(config.API.getPostionMasterDraft(false))
.get(config.API.getPostionMaster(false)) .get(config.API.getPostionMaster(false))
.then((res) => { .then((res) => {
// console.log("psMaster:", res.data.result);
res.data.result.map((e: any) => { res.data.result.map((e: any) => {
positionFilter.value.push({ positionFilter.value.push({
id: e.id, id: e.id,
@ -475,7 +472,7 @@ const fetchPositionMaster = async () => {
}); });
}) })
.catch((e) => { .catch((e) => {
console.log(e); messageError($q, e);
}) })
.finally(() => { .finally(() => {
hideLoader(); hideLoader();
@ -503,7 +500,6 @@ const filterFn = (val: string, update: any) => {
(v: any) => v.positionPath != null && v.positionPath.indexOf(val) > -1 (v: any) => v.positionPath != null && v.positionPath.indexOf(val) > -1
); );
}); });
// console.log(positions.value);
}; };
/**Add new positionSet item into positions /**Add new positionSet item into positions
@ -511,7 +507,6 @@ const filterFn = (val: string, update: any) => {
*อมลไมครบแสดง Alert เตอนใหเฉยๆ แลวไมใหเพ *อมลไมครบแสดง Alert เตอนใหเฉยๆ แลวไมใหเพ
*/ */
const addPositionItem = () => { const addPositionItem = () => {
// console.log(positions.value);
myForm.value!.validate().then((result) => { myForm.value!.validate().then((result) => {
if (result) { if (result) {
positions.value.push(JSON.parse(JSON.stringify(positionSet.value))); positions.value.push(JSON.parse(JSON.stringify(positionSet.value)));
@ -539,15 +534,15 @@ const deletePositionItem = (val: object) => {
persistent: true, persistent: true,
}) })
.onOk(() => { .onOk(() => {
// console.log(">>>> OK");
positions.value = positions.value.filter((x: object) => x !== val); // positions.value = positions.value.filter((x: object) => x !== val); //
// console.log(positions.value);
}) })
.onCancel(() => { .onCancel(() => {
// console.log(">>>> Cancel");
}) })
.onDismiss(() => { .onDismiss(() => {
// console.log("I am triggered on both OK and Cancel");
}); });
} else { } else {
positions.value = positions.value.filter((x: object) => x !== val); positions.value = positions.value.filter((x: object) => x !== val);
@ -560,11 +555,9 @@ const deletePositionItem = (val: object) => {
* @param items Array of position * @param items Array of position
*/ */
const isEmptyPosition = (items: any[]) => { const isEmptyPosition = (items: any[]) => {
console.log("items", items);
const isEmpty = items.map((f: any) => !f.positionMasterId); const isEmpty = items.map((f: any) => !f.positionMasterId);
// true // true
// data false // data false
console.log("isEmpty", isEmpty[0]);
return isEmpty[0]; return isEmpty[0];
}; };

View file

@ -345,7 +345,7 @@ const props = defineProps({
const emit = defineEmits(["update:organizprops", "update:formprops"]); const emit = defineEmits(["update:organizprops", "update:formprops"]);
const mixin = useCounterMixin(); const mixin = useCounterMixin();
const { showLoader, hideLoader } = mixin; const { showLoader, hideLoader, messageError } = mixin;
const $q = useQuasar(); // show dialog const $q = useQuasar(); // show dialog
const myForm = ref<QForm | null>(null); const myForm = ref<QForm | null>(null);
@ -415,7 +415,7 @@ const fetchOrganizationOri = async () => {
organizationOriFilter.value = option; organizationOriFilter.value = option;
}) })
.catch((e) => { .catch((e) => {
console.log(e); messageError($q, e);
}) })
.finally(() => { .finally(() => {
hideLoader(); hideLoader();
@ -430,7 +430,6 @@ const fetchOrganizationAgencyCode = async () => {
.get(config.API.organizationCode) .get(config.API.organizationCode)
.then((res) => { .then((res) => {
const data = res.data.result; const data = res.data.result;
// console.log(data);
let option: GovermentOption[] = []; let option: GovermentOption[] = [];
data.map((r: any) => { data.map((r: any) => {
option.push({ option.push({
@ -444,7 +443,7 @@ const fetchOrganizationAgencyCode = async () => {
organizationAgencyCodeFilter.value = option; organizationAgencyCodeFilter.value = option;
}) })
.catch((e) => { .catch((e) => {
console.log(e); messageError($q, e);
}) })
.finally(() => { .finally(() => {
hideLoader(); hideLoader();
@ -459,7 +458,6 @@ const fetchOrganizationGovernmentCode = async () => {
.get(config.API.organizationShortName) .get(config.API.organizationShortName)
.then((res) => { .then((res) => {
const data = res.data.result; const data = res.data.result;
// console.log(data);
let option: GovermentOption[] = []; let option: GovermentOption[] = [];
data.map((r: any) => { data.map((r: any) => {
option.push({ option.push({
@ -473,7 +471,7 @@ const fetchOrganizationGovernmentCode = async () => {
organizationGovernmentCodeFilter.value = option; organizationGovernmentCodeFilter.value = option;
}) })
.catch((e) => { .catch((e) => {
console.log(e); messageError($q, e);
}) })
.finally(() => { .finally(() => {
hideLoader(); hideLoader();
@ -488,7 +486,6 @@ const fetchOrganizationGovernmentCode = async () => {
// .get(config.API.organizationShortName) // .get(config.API.organizationShortName)
// .then((res) => { // .then((res) => {
// const data = res.data.result; // const data = res.data.result;
// // console.log(data);
// let option: GovermentOption[] = []; // let option: GovermentOption[] = [];
// data.map((r: any) => { // data.map((r: any) => {
// option.push({ // option.push({
@ -502,7 +499,6 @@ const fetchOrganizationGovernmentCode = async () => {
// organizationShortNameFilter.value = option; // organizationShortNameFilter.value = option;
// }) // })
// .catch((e) => { // .catch((e) => {
// console.log(e);
// }) // })
// .finally(() => { // .finally(() => {
// hideLoader(); // hideLoader();
@ -528,7 +524,7 @@ const fetchOrganizationAgency = async () => {
organizationAgencyFilter.value = option; organizationAgencyFilter.value = option;
}) })
.catch((e) => { .catch((e) => {
console.log(e); messageError($q, e);
}) })
.finally(() => { .finally(() => {
hideLoader(); hideLoader();
@ -554,7 +550,7 @@ const fetchOrganizationGovernmentAgency = async () => {
organizationGovernmentAgencyFilter.value = option; organizationGovernmentAgencyFilter.value = option;
}) })
.catch((e) => { .catch((e) => {
console.log(e); messageError($q, e);
}) })
.finally(() => { .finally(() => {
hideLoader(); hideLoader();
@ -577,7 +573,7 @@ const fetchOrganizationType = async () => {
organizationTypeFilter.value = option; organizationTypeFilter.value = option;
}) })
.catch((e) => { .catch((e) => {
console.log(e); messageError($q, e);
}) })
.finally(() => { .finally(() => {
hideLoader(); hideLoader();
@ -600,7 +596,7 @@ const fetchOrganizationLevel = async () => {
organizationLevelFilter.value = option; organizationLevelFilter.value = option;
}) })
.catch((e) => { .catch((e) => {
console.log(e); messageError($q, e);
}) })
.finally(() => { .finally(() => {
hideLoader(); hideLoader();
@ -623,7 +619,7 @@ const fetchOrganizationTelInternal = async () => {
organizationTelInternalFilter.value = option; organizationTelInternalFilter.value = option;
}) })
.catch((e) => { .catch((e) => {
console.log(e); messageError($q, e);
}) })
.finally(() => { .finally(() => {
hideLoader(); hideLoader();
@ -646,7 +642,7 @@ const fetchOrganizationTelExternal = async () => {
organizationTelExternalFilter.value = option; organizationTelExternalFilter.value = option;
}) })
.catch((e) => { .catch((e) => {
console.log(e); messageError($q, e);
}) })
.finally(() => { .finally(() => {
hideLoader(); hideLoader();
@ -669,7 +665,7 @@ const fetchOrganizationFax = async () => {
organizationFaxFilter.value = option; organizationFaxFilter.value = option;
}) })
.catch((e) => { .catch((e) => {
console.log(e); messageError($q, e);
}) })
.finally(() => { .finally(() => {
hideLoader(); hideLoader();
@ -692,18 +688,12 @@ const deleteOrgItem = (val: OrganizaOption) => {
persistent: true, persistent: true,
}) })
.onOk(() => { .onOk(() => {
// console.log(">>>> OK");
organizations.value = organizations.value.filter( organizations.value = organizations.value.filter(
(x: object) => x !== val (x: object) => x !== val
); // ); //
// console.log(positions.value);
}) })
.onCancel(() => { .onCancel(() => {})
// console.log(">>>> Cancel"); .onDismiss(() => {});
})
.onDismiss(() => {
// console.log("I am triggered on both OK and Cancel");
});
} else { } else {
organizations.value = organizations.value.filter((x: object) => x !== val); organizations.value = organizations.value.filter((x: object) => x !== val);
} }
@ -738,7 +728,6 @@ const isEmptyOrganization = (items: OrganizaOption[]) => {
*/ */
const addOrganizationItem = async () => { const addOrganizationItem = async () => {
await myForm.value!.validate().then(async (result: boolean) => { await myForm.value!.validate().then(async (result: boolean) => {
// console.log(result);
if (result) { if (result) {
// organizations.value.push(JSON.parse(JSON.stringify(organizationSet))); // organizations.value.push(JSON.parse(JSON.stringify(organizationSet)));
organizations.value.push({ organizations.value.push({
@ -767,7 +756,6 @@ const addOrganizationItem = async () => {
isActive: true, isActive: true,
}); });
emit("update:organizprops", organizations.value); emit("update:organizprops", organizations.value);
// console.log(organizations);
} }
}); });
}; };
@ -791,7 +779,7 @@ const fetchAgencyCode = async (val: string, item: OrganizaOption) => {
// organizationAgencyCodeFilter.value = option; // organizationAgencyCodeFilter.value = option;
}) })
.catch((e) => { .catch((e) => {
console.log(e); messageError($q, e);
}) })
.finally(() => { .finally(() => {
hideLoader(); hideLoader();
@ -818,7 +806,7 @@ const fetchGovernmentCode = async (val: string, item: OrganizaOption) => {
item.organizationGovernmentCodeOptionFilter = option; item.organizationGovernmentCodeOptionFilter = option;
}) })
.catch((e) => { .catch((e) => {
console.log(e); messageError($q, e);
}) })
.finally(() => { .finally(() => {
hideLoader(); hideLoader();

View file

@ -316,7 +316,7 @@ import type { EnumStringMember } from "@babel/types";
import { useCounterMixin } from "@/stores/mixin"; import { useCounterMixin } from "@/stores/mixin";
const mixin = useCounterMixin(); const mixin = useCounterMixin();
const { showLoader, hideLoader } = mixin; const { showLoader, hideLoader, messageError } = mixin;
const props = defineProps({ const props = defineProps({
organizprops: Object as PropType<OrganizaOption>, organizprops: Object as PropType<OrganizaOption>,
@ -411,9 +411,7 @@ onMounted(async () => {
await fetchOrganizationTelExternal(); await fetchOrganizationTelExternal();
await fetchOrganizationTelInternal(); await fetchOrganizationTelInternal();
await fetchOrganizationStatus(); await fetchOrganizationStatus();
// console.log("Edit:organization.value", organization.value);
console.log("props.orgId", props.org);
console.log("props.orgId.organizationId", props.org.organizationId);
await fillOrgEdit(); // input shortName & shortCode await fillOrgEdit(); // input shortName & shortCode
}); });
@ -434,7 +432,7 @@ const fillOrgEdit = async () => {
.get(config.API.getOrgDraft(props.org.organizationId)) .get(config.API.getOrgDraft(props.org.organizationId))
.then((res) => { .then((res) => {
// objOrg OrganizationDialogAddEdit.vue // objOrg OrganizationDialogAddEdit.vue
console.log("ข้อมูลเดิม", res.data.result);
organization.value.organizationOrganizationId = organization.value.organizationOrganizationId =
res.data.result.organizationOrganizationId; res.data.result.organizationOrganizationId;
organization.value.organizationShortNameId = organization.value.organizationShortNameId =
@ -498,12 +496,11 @@ const fillOrgEdit = async () => {
emit("update:organizprops", organization.value); emit("update:organizprops", organization.value);
}) })
.catch((e) => { .catch((e) => {
console.log(e); messageError($q, e);
}) })
.finally(async () => { .finally(async () => {
hideLoader(); hideLoader();
}); });
console.log("success");
}; };
/** /**
@ -523,7 +520,7 @@ const fetchOrganizationOri = async () => {
organizationOriFilter.value = option; organizationOriFilter.value = option;
}) })
.catch((e) => { .catch((e) => {
console.log(e); messageError($q, e);
}) })
.finally(() => { .finally(() => {
hideLoader(); hideLoader();
@ -538,7 +535,7 @@ const fetchOrganizationAgencyCode = async () => {
.get(config.API.organizationCode) .get(config.API.organizationCode)
.then((res) => { .then((res) => {
const data = res.data.result; const data = res.data.result;
// console.log(data);
let option: GovermentOption[] = []; let option: GovermentOption[] = [];
data.map((r: any) => { data.map((r: any) => {
option.push({ option.push({
@ -552,7 +549,7 @@ const fetchOrganizationAgencyCode = async () => {
organizationAgencyCodeFilter.value = option; organizationAgencyCodeFilter.value = option;
}) })
.catch((e) => { .catch((e) => {
console.log(e); messageError($q, e);
}) })
.finally(() => { .finally(() => {
hideLoader(); hideLoader();
@ -567,7 +564,6 @@ const fetchOrganizationGovernmentCode = async () => {
.get(config.API.organizationShortName) .get(config.API.organizationShortName)
.then((res) => { .then((res) => {
const data = res.data.result; const data = res.data.result;
// console.log(data);
let option: GovermentOption[] = []; let option: GovermentOption[] = [];
data.map((r: any) => { data.map((r: any) => {
option.push({ option.push({
@ -584,7 +580,7 @@ const fetchOrganizationGovernmentCode = async () => {
emit("update:organizprops", organization.value); emit("update:organizprops", organization.value);
}) })
.catch((e) => { .catch((e) => {
console.log(e); messageError($q, e);
}) })
.finally(() => { .finally(() => {
hideLoader(); hideLoader();
@ -599,7 +595,6 @@ const fetchOrganizationGovernmentCode = async () => {
// .get(config.API.organizationShortName) // .get(config.API.organizationShortName)
// .then((res) => { // .then((res) => {
// const data = res.data.result; // const data = res.data.result;
// // console.log(data);
// let option: GovermentOption[] = []; // let option: GovermentOption[] = [];
// data.map((r: any) => { // data.map((r: any) => {
// option.push({ // option.push({
@ -613,7 +608,7 @@ const fetchOrganizationGovernmentCode = async () => {
// organizationShortNameFilter.value = option; // organizationShortNameFilter.value = option;
// }) // })
// .catch((e) => { // .catch((e) => {
// console.log(e); // messageError($q,e)
// }) // })
// .finally(() => { // .finally(() => {
// hideLoader(); // hideLoader();
@ -640,7 +635,7 @@ const fetchOrganizationAgency = async () => {
organizationAgencyFilter.value = option; organizationAgencyFilter.value = option;
}) })
.catch((e) => { .catch((e) => {
console.log(e); messageError($q, e);
}) })
.finally(() => { .finally(() => {
hideLoader(); hideLoader();
@ -657,7 +652,7 @@ const fetchOrganizationGovernmentAgency = async () => {
.then((res) => { .then((res) => {
const data = res.data.result; const data = res.data.result;
let option: DataOption[] = []; let option: DataOption[] = [];
// console.log(data);
data.map((r: any) => { data.map((r: any) => {
option.push({ option.push({
id: r.organizationId.toString(), id: r.organizationId.toString(),
@ -668,7 +663,7 @@ const fetchOrganizationGovernmentAgency = async () => {
organizationGovernmentAgencyFilter.value = option; organizationGovernmentAgencyFilter.value = option;
}) })
.catch((e) => { .catch((e) => {
console.log(e); messageError($q, e);
}) })
.finally(() => { .finally(() => {
hideLoader(); hideLoader();
@ -691,7 +686,7 @@ const fetchOrganizationType = async () => {
organizationTypeFilter.value = option; organizationTypeFilter.value = option;
}) })
.catch((e) => { .catch((e) => {
console.log(e); messageError($q, e);
}) })
.finally(() => { .finally(() => {
hideLoader(); hideLoader();
@ -715,7 +710,7 @@ const fetchOrganizationStatus = async () => {
organizationStatusFilter.value = option; organizationStatusFilter.value = option;
}) })
.catch((e) => { .catch((e) => {
console.log(e); messageError($q, e);
}) })
.finally(() => { .finally(() => {
hideLoader(); hideLoader();
@ -739,7 +734,7 @@ const fetchOrganizationLevel = async () => {
organizationLevelFilter.value = option; organizationLevelFilter.value = option;
}) })
.catch((e) => { .catch((e) => {
console.log(e); messageError($q, e);
}) })
.finally(() => { .finally(() => {
hideLoader(); hideLoader();
@ -762,7 +757,7 @@ const fetchOrganizationTelInternal = async () => {
organizationTelInternalFilter.value = option; organizationTelInternalFilter.value = option;
}) })
.catch((e) => { .catch((e) => {
console.log(e); messageError($q, e);
}) })
.finally(() => { .finally(() => {
hideLoader(); hideLoader();
@ -785,7 +780,7 @@ const fetchOrganizationTelExternal = async () => {
organizationTelExternalFilter.value = option; organizationTelExternalFilter.value = option;
}) })
.catch((e) => { .catch((e) => {
console.log(e); messageError($q, e);
}) })
.finally(() => { .finally(() => {
hideLoader(); hideLoader();
@ -808,7 +803,7 @@ const fetchOrganizationFax = async () => {
organizationFaxFilter.value = option; organizationFaxFilter.value = option;
}) })
.catch((e) => { .catch((e) => {
console.log(e); messageError($q, e);
}) })
.finally(() => { .finally(() => {
hideLoader(); hideLoader();
@ -834,7 +829,7 @@ const fetchAgencyCode = async (val: string, item: OrganizaOption) => {
// organizationAgencyCodeFilter.value = option; // organizationAgencyCodeFilter.value = option;
}) })
.catch((e) => { .catch((e) => {
console.log(e); messageError($q, e);
}) })
.finally(() => { .finally(() => {
hideLoader(); hideLoader();
@ -861,7 +856,7 @@ const fetchGovernmentCode = async (val: string, item: OrganizaOption) => {
item.organizationGovernmentCodeOptionFilter = option; item.organizationGovernmentCodeOptionFilter = option;
}) })
.catch((e) => { .catch((e) => {
console.log(e); messageError($q, e);
}) })
.finally(() => { .finally(() => {
hideLoader(); hideLoader();

View file

@ -1,5 +1,6 @@
<script setup lang="ts"> <script setup lang="ts">
import { ref, onMounted } from "vue"; import { ref, onMounted } from "vue";
import { useQuasar } from "quasar";
import http from "@/plugins/http"; import http from "@/plugins/http";
import config from "@/app.config"; import config from "@/app.config";
@ -11,7 +12,8 @@ import { useCounterMixin } from "@/stores/mixin";
import chartData from "@/assets/orgChartData"; import chartData from "@/assets/orgChartData";
const mixin = useCounterMixin(); const mixin = useCounterMixin();
const { showLoader, hideLoader } = mixin; const { showLoader, hideLoader, messageError } = mixin;
const $q = useQuasar(); // show dialog
const dataSource = ref(chartData); const dataSource = ref(chartData);
// const dataSource = ref() // Chart // const dataSource = ref() // Chart
@ -45,7 +47,7 @@ const fetchTreeRoot = async () => {
} }
}) })
.catch((e) => { .catch((e) => {
console.log(e); messageError($q, e);
}) })
.finally(() => { .finally(() => {
hideLoader(); hideLoader();
@ -65,7 +67,7 @@ const fetchOrgChart = async () => {
} }
}) })
.catch((e) => { .catch((e) => {
console.log(e); messageError($q, e);
}) })
.finally(() => { .finally(() => {
hideLoader(); hideLoader();

View file

@ -238,7 +238,7 @@ const fetchOrganizationAgency = async () => {
govermentOPfilter.value = option; govermentOPfilter.value = option;
}) })
.catch((e) => { .catch((e) => {
console.log(e); messageError($q, e);
}) })
.finally(() => { .finally(() => {
hideLoader(); hideLoader();
@ -248,6 +248,5 @@ const fetchOrganizationAgency = async () => {
onMounted(async () => { onMounted(async () => {
hideLoader(); hideLoader();
await fetchOrganizationAgency(); await fetchOrganizationAgency();
console.log(govermentOP.value);
}); });
</script> </script>

View file

@ -1,6 +1,7 @@
<script setup lang="ts"> <script setup lang="ts">
import { defineAsyncComponent } from "@vue/runtime-core"; import { defineAsyncComponent } from "@vue/runtime-core";
import { ref, onMounted } from "vue"; import { ref, onMounted } from "vue";
import { useQuasar } from "quasar";
import http from "@/plugins/http"; import http from "@/plugins/http";
import config from "@/app.config"; import config from "@/app.config";
@ -10,7 +11,8 @@ import "structure-chart/structure-chart.css";
import { useCounterMixin } from "@/stores/mixin"; import { useCounterMixin } from "@/stores/mixin";
const mixin = useCounterMixin(); const mixin = useCounterMixin();
const { showLoader, hideLoader } = mixin; const { showLoader, hideLoader, messageError } = mixin;
const $q = useQuasar(); // show dialog
// import chartData from '@/assets/structChartData' // import chartData from '@/assets/structChartData'
// const dataSource = ref(chartData) // const dataSource = ref(chartData)
@ -46,7 +48,7 @@ const fetchTreeRoot = async () => {
} }
}) })
.catch((e) => { .catch((e) => {
console.log(e); messageError($q, e);
}) })
.finally(() => { .finally(() => {
hideLoader(); hideLoader();
@ -70,7 +72,7 @@ const fetchStructChart = async () => {
} }
}) })
.catch((e) => { .catch((e) => {
console.log(e); messageError($q, e);
}) })
.finally(() => { .finally(() => {
hideLoader(); hideLoader();

View file

@ -969,7 +969,6 @@ watch(selectedFile, async (value, oldValue) => {
}); });
onMounted(async () => { onMounted(async () => {
console.log("onMounted");
await fetchTreeRoot(true); //fetch Root Edit Tree level 1 await fetchTreeRoot(true); //fetch Root Edit Tree level 1
expandedNodeView.value = [`1`]; expandedNodeView.value = [`1`];
@ -988,7 +987,6 @@ const loadTreeData = async () => {
"https://s3cluster.frappet.com/bma-public-test/organization/strueture/61a11705-8346-4336-8289-49f72ed9463f-%E0%B8%AA%E0%B8%B3%E0%B8%99%E0%B8%B1%E0%B8%81%E0%B8%87%E0%B8%B2%E0%B8%99%E0%B8%84%E0%B8%93%E0%B8%B0%E0%B8%81%E0%B8%A3%E0%B8%A3%E0%B8%A1%E0%B8%81%E0%B8%B2%E0%B8%A3%E0%B8%82%E0%B9%89%E0%B8%B2%E0%B8%A3%E0%B8%B2%E0%B8%8A%E0%B8%81%E0%B8%B2%E0%B8%A3%E0%B8%81%E0%B8%A3%E0%B8%B8%E0%B8%87%E0%B9%80%E0%B8%97%E0%B8%9E%E0%B8%A1%E0%B8%AB%E0%B8%B2%E0%B8%99%E0%B8%84%E0%B8%A3.json" "https://s3cluster.frappet.com/bma-public-test/organization/strueture/61a11705-8346-4336-8289-49f72ed9463f-%E0%B8%AA%E0%B8%B3%E0%B8%99%E0%B8%B1%E0%B8%81%E0%B8%87%E0%B8%B2%E0%B8%99%E0%B8%84%E0%B8%93%E0%B8%B0%E0%B8%81%E0%B8%A3%E0%B8%A3%E0%B8%A1%E0%B8%81%E0%B8%B2%E0%B8%A3%E0%B8%82%E0%B9%89%E0%B8%B2%E0%B8%A3%E0%B8%B2%E0%B8%8A%E0%B8%81%E0%B8%B2%E0%B8%A3%E0%B8%81%E0%B8%A3%E0%B8%B8%E0%B8%87%E0%B9%80%E0%B8%97%E0%B8%9E%E0%B8%A1%E0%B8%AB%E0%B8%B2%E0%B8%99%E0%B8%84%E0%B8%A3.json"
) )
.then((res) => { .then((res) => {
console.log(res.data.result);
dataTree.value = res.data.result; dataTree.value = res.data.result;
}) })
.catch((e) => { .catch((e) => {
@ -1007,7 +1005,6 @@ const loadViewTree = async () => {
}; };
const loadPublishScreen = async () => { const loadPublishScreen = async () => {
console.log("onMounted");
await fetchPublishFile(); await fetchPublishFile();
expandedNodeView.value = [`1`]; expandedNodeView.value = [`1`];
setTimeout(async () => { setTimeout(async () => {
@ -1041,12 +1038,9 @@ const loadFileServer = async (node: any) => {
`${config.s3ClusterUrl}${node.organizationId}-${node.organizationName}.json` `${config.s3ClusterUrl}${node.organizationId}-${node.organizationName}.json`
) )
.then((res) => { .then((res) => {
console.log(res.data);
node.children = res.data; node.children = res.data;
}) })
.catch((e) => { .catch((e) => {
// console.log(e);
// console.log(e.response);
manageApiErrorMsg(e); manageApiErrorMsg(e);
}) })
.finally(() => { .finally(() => {
@ -1061,13 +1055,9 @@ const isTreeHasDraft = async () => {
await http await http
.get(config.API.isOrgPohasDraft) .get(config.API.isOrgPohasDraft)
.then((res) => { .then((res) => {
// console.log("isOrgPohasDraft:", res.data.result);
orgPoHasDraft = res.data.result; orgPoHasDraft = res.data.result;
}) })
.catch((e) => { .catch((e) => {
console.log("====isOrgPohasDraft====");
console.log(e);
console.log(e.response);
messageError($q, e); messageError($q, e);
}) })
.finally(() => { .finally(() => {
@ -1077,13 +1067,9 @@ const isTreeHasDraft = async () => {
await http await http
.get(config.API.isOrghasDraft) .get(config.API.isOrghasDraft)
.then((res) => { .then((res) => {
// console.log("isOrghasDraft:", res.data.result);
orgHasDraft = res.data.result; orgHasDraft = res.data.result;
}) })
.catch((e) => { .catch((e) => {
console.log("====isOrghasDraft====");
console.log(e);
console.log(e.response);
messageError($q, e); messageError($q, e);
}) })
.finally(() => { .finally(() => {
@ -1101,7 +1087,6 @@ const isTreeHasDraft = async () => {
* @param isDraft แสดงขอมลดราฟหร Production * @param isDraft แสดงขอมลดราฟหร Production
*/ */
const fetchTreeRoot = async (isDraft: boolean) => { const fetchTreeRoot = async (isDraft: boolean) => {
// console.log(isDraft);
showLoader(); showLoader();
console.log("Call API14 GetTreeRoot"); console.log("Call API14 GetTreeRoot");
isShowEditTree.value = isDraft; // to show same tree that we fetch isShowEditTree.value = isDraft; // to show same tree that we fetch
@ -1674,8 +1659,6 @@ const editPositionStructure = async (node: any) => {
qtreeEdit.value.setExpanded(nodeJoin, true); qtreeEdit.value.setExpanded(nodeJoin, true);
}) })
.catch((e) => { .catch((e) => {
console.log(e);
console.log(e.response);
messageError($q, e); messageError($q, e);
}) })
.finally(async () => { .finally(async () => {
@ -1715,8 +1698,6 @@ const clickHistory = async () => {
}) })
.catch((e) => { .catch((e) => {
rowsHistory.value.splice(0); rowsHistory.value.splice(0);
console.log(e);
console.log(e.response);
manageApiErrorMsg(e); manageApiErrorMsg(e);
// messageError($q, e); // messageError($q, e);
}) })

View file

@ -976,7 +976,6 @@ onMounted(async () => {
const onSelected = async (id: string) => { const onSelected = async (id: string) => {
// await fetchPositionNumber(id); // await fetchPositionNumber(id);
organizationId.value = id; organizationId.value = id;
console.log(organizationId.value);
}; };
/** /**

View file

@ -763,7 +763,6 @@ const checkSave = async () => {
}; };
const saveData = async () => { const saveData = async () => {
// console.log(myData.value);
showLoader(); showLoader();
const body: RequestReport2 = { const body: RequestReport2 = {
organizationShortNameId: myData.value.goverment2, organizationShortNameId: myData.value.goverment2,

View file

@ -107,7 +107,8 @@ const $q = useQuasar(); // show dialog
const mixin = useCounterMixin(); const mixin = useCounterMixin();
const router = useRouter(); const router = useRouter();
const route = useRoute(); const route = useRoute();
const { date2Thai, success, dateToISO, showLoader, hideLoader } = mixin; const { date2Thai, success, dateToISO, showLoader, hideLoader, messageError } =
mixin;
const govermentOP = ref<DataOption[]>([]); const govermentOP = ref<DataOption[]>([]);
const govermentOPfilter = ref<DataOption[]>([]); const govermentOPfilter = ref<DataOption[]>([]);
@ -132,7 +133,7 @@ const fetchOrganizationAgency = async () => {
govermentOPfilter.value = option; govermentOPfilter.value = option;
}) })
.catch((e) => { .catch((e) => {
console.log(e); messageError($q, e);
}) })
.finally(() => { .finally(() => {
hideLoader(); hideLoader();

View file

@ -308,7 +308,6 @@ const fetchData = async () => {
cert_issuedate.value = data.certificateIssueDate; cert_issuedate.value = data.certificateIssueDate;
examAttribute.value = data.examAttribute; examAttribute.value = data.examAttribute;
number.value = data.number; number.value = data.number;
console.log(data);
examOrder.value = data.examOrder; examOrder.value = data.examOrder;
score_expired.value = data.scoreExpire; score_expired.value = data.scoreExpire;
if (data.scoreResult != null) { if (data.scoreResult != null) {

View file

@ -219,7 +219,6 @@ const uploadData = async () => {
const formData = new FormData(); const formData = new FormData();
formData.append("avatar", newFile); formData.append("avatar", newFile);
formData.append("moss", "newFile"); formData.append("moss", "newFile");
console.log(formData);
showLoader(); showLoader();
await http await http
.post(config.API.profilePaperId(profileId.value), formData) .post(config.API.profilePaperId(profileId.value), formData)

View file

@ -752,8 +752,6 @@ const saveData = async () => {
}; };
const selectProvince = async (e: string | null, name: string) => { const selectProvince = async (e: string | null, name: string) => {
console.log("5555555555555");
if (e != null) { if (e != null) {
if (name == "1") { if (name == "1") {
addressData.value.districtId = ""; addressData.value.districtId = "";

View file

@ -726,7 +726,6 @@ const fetchData = async () => {
.get(config.API.profileLeaveId(profileId.value)) .get(config.API.profileLeaveId(profileId.value))
.then((res) => { .then((res) => {
const data = res.data.result; const data = res.data.result;
// console.log(data);
data.map((e: ResponseObject) => { data.map((e: ResponseObject) => {
rows.value.push({ rows.value.push({
id: e.id, id: e.id,
@ -918,7 +917,6 @@ const clickAddLeave = async () => {
numUsedLeave.value = 0; numUsedLeave.value = 0;
await clickTotal(); await clickTotal();
if (rowsTotal.value.length > 0) { if (rowsTotal.value.length > 0) {
// console.log(rowsTotal.value);
let data: DataOptionLeave[] = []; let data: DataOptionLeave[] = [];
rowsTotal.value.map((e: ResponseTotalObject) => { rowsTotal.value.map((e: ResponseTotalObject) => {
data.push({ data.push({
@ -1140,7 +1138,6 @@ const selectData = async (props: DataProps) => {
numUsedLeave.value = props.row.sumLeave; numUsedLeave.value = props.row.sumLeave;
await clickTotal(); await clickTotal();
if (rowsTotal.value.length > 0) { if (rowsTotal.value.length > 0) {
// console.log(rowsTotal.value);
let data: DataOptionLeave[] = []; let data: DataOptionLeave[] = [];
rowsTotal.value.map((e: ResponseTotalObject) => { rowsTotal.value.map((e: ResponseTotalObject) => {
data.push({ data.push({

View file

@ -90,7 +90,6 @@ const fecthPositionOfficer = async () => {
.get(config.API.listPositionPathHistory) .get(config.API.listPositionPathHistory)
.then((res) => { .then((res) => {
let data = res.data.result.items; let data = res.data.result.items;
console.log(data);
positionOps.value = data.map((e: any) => ({ id: e.id, name: e.name })); positionOps.value = data.map((e: any) => ({ id: e.id, name: e.name }));
options.value = positionOps.value; options.value = positionOps.value;
}) })

View file

@ -833,12 +833,13 @@ const fetchData = async () => {
const reason = reasonOptions.value.filter( const reason = reasonOptions.value.filter(
(r: DataOption) => r.id == data.leaveReason (r: DataOption) => r.id == data.leaveReason
); );
console.log(reason);
if (reason.length > 0) { if (reason.length > 0) {
leaveReason.value = ` (พ้นจากราชการด้วยสาเหตุ: ${reason[0].name})`; leaveReason.value = ` (พ้นจากราชการด้วยสาเหตุ: ${reason[0].name})`;
} else { } else if (data.leaveReason !== null && data.leaveReason !== "") {
leaveReason.value = ` (พ้นจากราชการด้วยสาเหตุ: ${data.leaveReason})`; leaveReason.value = ` (พ้นจากราชการด้วยสาเหตุ: ${data.leaveReason})`;
} }
console.log(data.leaveReason);
reasonStatus.value = reason.length > 0 ? true : false; reasonStatus.value = reason.length > 0 ? true : false;
}) })
.catch((e) => { .catch((e) => {
@ -1301,12 +1302,6 @@ const Retire = async () => {
} }
}; };
const clickSaveDeceased = async () => { const clickSaveDeceased = async () => {
// console.log(
// filePassaway.value,
// deathCertificateNo.value,
// placeDeathCertificate.value,
// reasonDeath.value
// );
const formData = new FormData(); const formData = new FormData();
formData.append("File", filePassaway.value); formData.append("File", filePassaway.value);
formData.append("Number", deathCertificateNo.value); formData.append("Number", deathCertificateNo.value);
@ -1333,7 +1328,6 @@ const clickSaveDeceased = async () => {
router.push("/deceased"); router.push("/deceased");
}) })
.catch((e) => { .catch((e) => {
console.log(e);
messageError($q, e); messageError($q, e);
}) })
.finally(() => { .finally(() => {

View file

@ -1578,9 +1578,7 @@ const fetchData = async () => {
await http await http
.get(config.API.profileSalaryId(profileId.value)) .get(config.API.profileSalaryId(profileId.value))
.then((res) => { .then((res) => {
let data = res.data.result; let data = res.data.result;
console.log(data);
rows.value = []; rows.value = [];
data.map((e: ResponseObject) => { data.map((e: ResponseObject) => {
rows.value.push({ rows.value.push({

View file

@ -1493,7 +1493,7 @@ const fetchData = async () => {
.get(config.API.profileSalaryEmployeeId(profileId.value)) .get(config.API.profileSalaryEmployeeId(profileId.value))
.then((res) => { .then((res) => {
const data = res.data.result; const data = res.data.result;
console.log(data);
rows.value = []; rows.value = [];
data.map((e: any) => { data.map((e: any) => {
rows.value.push({ rows.value.push({
@ -1634,7 +1634,6 @@ const checkRowPage = () => {
editRow.value = false; editRow.value = false;
next.value = true; next.value = true;
previous.value = true; previous.value = true;
// console.log(rowIndex.value);
if (rowIndex.value + 1 >= rows.value.length) { if (rowIndex.value + 1 >= rows.value.length) {
next.value = false; next.value = false;
} }
@ -1885,7 +1884,6 @@ const clickClose = async () => {
* @param props props ใน row เลอก * @param props props ใน row เลอก
*/ */
const selectData = async (props: DataPropsEmployee) => { const selectData = async (props: DataPropsEmployee) => {
// console.log(props.row);
modalEdit.value = true; modalEdit.value = true;
modal.value = true; modal.value = true;
edit.value = false; edit.value = false;
@ -1996,7 +1994,6 @@ const clickHistory = async (row: RequestItemsEmployee) => {
.get(config.API.profileSalaryEmployeeHisId(row.id)) .get(config.API.profileSalaryEmployeeHisId(row.id))
.then((res) => { .then((res) => {
const data = res.data.result; const data = res.data.result;
// console.log("clickHistory", data);
rowsHistory.value = []; rowsHistory.value = [];
data.map((e: ResponseObjectEmployee) => { data.map((e: ResponseObjectEmployee) => {
rowsHistory.value.push({ rowsHistory.value.push({

View file

@ -1522,7 +1522,6 @@ const fetchData = async () => {
.get(config.API.profileSalaryEmployeeId(profileId.value)) .get(config.API.profileSalaryEmployeeId(profileId.value))
.then((res) => { .then((res) => {
const data = res.data.result; const data = res.data.result;
// console.log(data);
rows.value = []; rows.value = [];
data.map((e: ResponseObjectEmployee) => { data.map((e: ResponseObjectEmployee) => {
rows.value.push({ rows.value.push({
@ -1663,7 +1662,6 @@ const checkRowPage = () => {
editRow.value = false; editRow.value = false;
next.value = true; next.value = true;
previous.value = true; previous.value = true;
// console.log(rowIndex.value);
if (rowIndex.value + 1 >= rows.value.length) { if (rowIndex.value + 1 >= rows.value.length) {
next.value = false; next.value = false;
} }
@ -1914,7 +1912,6 @@ const clickClose = async () => {
* @param props props ใน row เลอก * @param props props ใน row เลอก
*/ */
const selectData = async (props: DataPropsEmployee) => { const selectData = async (props: DataPropsEmployee) => {
// console.log(props.row);
modalEdit.value = true; modalEdit.value = true;
modal.value = true; modal.value = true;
edit.value = false; edit.value = false;
@ -2025,7 +2022,6 @@ const clickHistory = async (row: RequestItemsEmployee) => {
.get(config.API.profileSalaryEmployeeHisId(row.id)) .get(config.API.profileSalaryEmployeeHisId(row.id))
.then((res) => { .then((res) => {
const data = res.data.result; const data = res.data.result;
// console.log("clickHistory", data);
rowsHistory.value = []; rowsHistory.value = [];
data.map((e: ResponseObjectEmployee) => { data.map((e: ResponseObjectEmployee) => {
rowsHistory.value.push({ rowsHistory.value.push({

View file

@ -124,6 +124,11 @@ const putAppointment = async () => {
edit.value = false; edit.value = false;
}); });
}; };
const cancel = () => {
edit.value = false
fecthappointmentByid()
}
const getClass = (val: boolean) => { const getClass = (val: boolean) => {
return { return {
"full-width inputgreen cursor-pointer": val, "full-width inputgreen cursor-pointer": val,
@ -200,7 +205,7 @@ onMounted(async () => {
<q-btn outline color="public" dense class="q-px-sm" label="บันทึก" <q-btn outline color="public" dense class="q-px-sm" label="บันทึก"
style="width: 80px" @click="clickSave" /> style="width: 80px" @click="clickSave" />
<q-btn outline color="red" dense class="q-px-sm" label="ยกเลิก" style="width: 80px" <q-btn outline color="red" dense class="q-px-sm" label="ยกเลิก" style="width: 80px"
@click="edit = !edit" /> @click="cancel()" />
</div> </div>
</div> </div>
</div> </div>

View file

@ -78,7 +78,6 @@ const loadTreeData = async () => {
}; };
function filterByPersonIdNull(obj: any) { function filterByPersonIdNull(obj: any) {
// console.log(obj);
if (obj.name === null && obj.isCondition != true) { if (obj.name === null && obj.isCondition != true) {
return true; return true;
} }
@ -155,8 +154,6 @@ const validateData = async () => {
}; };
const id = ref<string>(""); const id = ref<string>("");
const saveAppoint = async () => { const saveAppoint = async () => {
console.log("save", dataForm);
myFormPosition.value.validate().then(async (result: boolean) => { myFormPosition.value.validate().then(async (result: boolean) => {
if (props.personalId !== undefined) { if (props.personalId !== undefined) {
id.value = props.personalId.toString(); id.value = props.personalId.toString();
@ -175,12 +172,11 @@ const saveAppoint = async () => {
// mouthSalaryAmount: dataForm.mouthSalaryAmount, // mouthSalaryAmount: dataForm.mouthSalaryAmount,
// positionSalaryAmount: dataForm.positionSalaryAmount, // positionSalaryAmount: dataForm.positionSalaryAmount,
}; };
console.log("save appoint===>", dataAppoint);
showLoader(); showLoader();
await http await http
.put(config.API.otherPosition(id.value), dataAppoint) .put(config.API.otherPosition(id.value), dataAppoint)
.then((res) => { .then(() => {
console.log("respone=>", res);
success($q, "บันทึกสำเร็จ"); success($q, "บันทึกสำเร็จ");
}) })
.catch((e) => { .catch((e) => {
@ -280,9 +276,8 @@ const positionLevelOptions = ref<Object[]>([
]); ]);
const selectedPosition = async (data: any) => { const selectedPosition = async (data: any) => {
console.log("selecteds", data);
if (data.name == null && selected.value != data.keyId) { if (data.name == null && selected.value != data.keyId) {
// console.log("selecteds", data);
editDataStatus.value = true; editDataStatus.value = true;
selected.value = data.keyId; selected.value = data.keyId;
@ -364,7 +359,7 @@ const selectedPosition = async (data: any) => {
dataForm.positionPathSideId = ""; dataForm.positionPathSideId = "";
dataForm.positionTypeId = ""; dataForm.positionTypeId = "";
} }
console.log("dataForm", dataForm);
}; };
const checkPosition = (val: string) => { const checkPosition = (val: string) => {
@ -377,25 +372,25 @@ const expanded = ref<string[]>([]);
watch(props, () => { watch(props, () => {
expanded.value = []; expanded.value = [];
const dataPersonal = props.personal; const dataPersonal = props.personal;
console.log(props.personal);
if (dataPersonal) { if (dataPersonal) {
dataPersonal.map((data: any) => { dataPersonal.map((data: any) => {
personal.value = data; personal.value = data;
}); });
console.log("personal", personal.value);
} }
// console.log("draft===>", personal.value.draft);
if (personal.value) { if (personal.value) {
// const findData = dataRespone.value.find(findByPerson);
let findData: any = null; let findData: any = null;
dataRespone.value.map((x: any) => { dataRespone.value.map((x: any) => {
findData = findByPerson(x); findData = findByPerson(x);
// console.log(findData);
if (findData != null) { if (findData != null) {
// console.log("findData===>", findData);
selectedPosition(findData); selectedPosition(findData);
for (let i = 3; i <= findData.keyId.length; i += 2) { for (let i = 3; i <= findData.keyId.length; i += 2) {
expanded.value.push(findData.keyId.slice(0, i)); expanded.value.push(findData.keyId.slice(0, i));
@ -408,7 +403,6 @@ watch(props, () => {
}); });
function findByPerson(element: any): any { function findByPerson(element: any): any {
// console.log("searchTree element===>", element)
if ( if (
element.positionNumId && element.positionNumId &&
element.positionLineId === personal.value.positionLineId && element.positionLineId === personal.value.positionLineId &&

View file

@ -114,8 +114,7 @@ const fetchData = async () => {
.get(config.API.placementPersonalId(examId.value)) .get(config.API.placementPersonalId(examId.value))
.then((res: any) => { .then((res: any) => {
const data = res.data.result; const data = res.data.result;
// data.value = data;
// console.log(data);
personalData.value.fullName = data.fullName; personalData.value.fullName = data.fullName;
personalData.value.id = data.personalId; personalData.value.id = data.personalId;

View file

@ -604,7 +604,6 @@ const clickClose = async () => {
* @param _props props ใน row เลอก * @param _props props ใน row เลอก
*/ */
const selectData = async (_props: DataProps) => { const selectData = async (_props: DataProps) => {
// console.log(_props.row);
modalEdit.value = true; modalEdit.value = true;
modal.value = true; modal.value = true;
edit.value = false; edit.value = false;

View file

@ -327,9 +327,7 @@ const clickSave = async () => {
/** /**
* นทกเพมขอม * นทกเพมขอม
*/ */
const saveData = async () => { const saveData = async () => {
// console.log("saveData");
showLoader(); showLoader();
await http await http
.post(config.API.placementCertId(route.params.personalId.toString()), { .post(config.API.placementCertId(route.params.personalId.toString()), {

View file

@ -115,7 +115,6 @@ const fetchPerson = async () => {
.then((res) => { .then((res) => {
const data = res.data.result; const data = res.data.result;
let optionbloodGroups: optionData[] = []; let optionbloodGroups: optionData[] = [];
// console.log(data);
data.bloodGroups.map((r: any) => { data.bloodGroups.map((r: any) => {
optionbloodGroups.push({ optionbloodGroups.push({
id: r.id ?? "", id: r.id ?? "",

View file

@ -636,10 +636,10 @@ onMounted(async () => {
hide-bottom-space hide-bottom-space
:outlined="edit" :outlined="edit"
dense dense
lazy-rules
:readonly="!edit" :readonly="!edit"
:borderless="!edit" :borderless="!edit"
v-model="informaData.lastname" v-model="informaData.lastname"
lazy-rules
:rules="[(val:string) => !!val || `${'กรุณากรอก นามสกุล'}`]" :rules="[(val:string) => !!val || `${'กรุณากรอก นามสกุล'}`]"
:label="`${'นามสกุล'}`" :label="`${'นามสกุล'}`"
/> />

View file

@ -214,7 +214,6 @@ const openModalOrder = () => {
}; };
const openModalTree = (id: string) => { const openModalTree = (id: string) => {
personalId.value = id; personalId.value = id;
console.log(personalId.value);
personal.value = rows.value.filter((e: any) => e.id === id); personal.value = rows.value.filter((e: any) => e.id === id);
modalTree.value = true; modalTree.value = true;
}; };
@ -224,7 +223,6 @@ const getData = async () => {
.get(config.API.relocationMain()) .get(config.API.relocationMain())
.then((res: any) => { .then((res: any) => {
const data = res.data.result; const data = res.data.result;
console.log("data==>", data);
rows.value = data.map((item: relocationType) => ({ rows.value = data.map((item: relocationType) => ({
fullname: `${item.prefix}${item.firstname} ${item.lastname}`, fullname: `${item.prefix}${item.firstname} ${item.lastname}`,
id: item.id, id: item.id,
@ -262,7 +260,6 @@ const getData = async () => {
organizationPositionOld: item.organizationPositionOld, organizationPositionOld: item.organizationPositionOld,
createdAt:date2Thai(item.createdAt), createdAt:date2Thai(item.createdAt),
})); }));
console.log(rows.value);
}) })
.catch((e) => { .catch((e) => {
// messageError($q, e); // messageError($q, e);
@ -280,9 +277,7 @@ const saveOrder = async () => {
showLoader(); showLoader();
await http await http
.post(config.API.relocationMainReport(), body) .post(config.API.relocationMainReport(), body)
.then((res: any) => { .then(() => {
// const data = res.data.result;
// console.log(data);
success($q, "ส่งไปออกคำสั่งย้าย"); success($q, "ส่งไปออกคำสั่งย้าย");
closeModal(); closeModal();
}) })
@ -297,9 +292,8 @@ const saveOrder = async () => {
const deleteData = async (id: string) => { const deleteData = async (id: string) => {
await http await http
.delete(config.API.relocationMainDelete(id)) .delete(config.API.relocationMainDelete(id))
.then((res) => { .then(() => {
success($q, "ลบข้อมูลสำเร็จ"); success($q, "ลบข้อมูลสำเร็จ");
console.log(res);
}) })
.catch((e) => { .catch((e) => {
messageError($q, e); messageError($q, e);

View file

@ -85,7 +85,6 @@ const loadTreeData = async () => {
}; };
function filterByPersonIdNull(obj: any) { function filterByPersonIdNull(obj: any) {
// console.log(obj);
if (obj.name === null && obj.isCondition != true) { if (obj.name === null && obj.isCondition != true) {
return true; return true;
} }
@ -162,8 +161,6 @@ const validateData = async () => {
}; };
const id = ref<string>(""); const id = ref<string>("");
const saveAppoint = async () => { const saveAppoint = async () => {
console.log("save", dataForm);
myFormPosition.value.validate().then(async (result: boolean) => { myFormPosition.value.validate().then(async (result: boolean) => {
if (props.personalId !== undefined) { if (props.personalId !== undefined) {
id.value = props.personalId.toString(); id.value = props.personalId.toString();
@ -182,12 +179,11 @@ const saveAppoint = async () => {
// mouthSalaryAmount: dataForm.mouthSalaryAmount, // mouthSalaryAmount: dataForm.mouthSalaryAmount,
// positionSalaryAmount: dataForm.positionSalaryAmount, // positionSalaryAmount: dataForm.positionSalaryAmount,
}; };
console.log("save appoint===>", dataAppoint);
showLoader(); showLoader();
await http await http
.put(config.API.relocationMainPut(id.value), dataAppoint) .put(config.API.relocationMainPut(id.value), dataAppoint)
.then((res) => { .then(() => {
console.log("respone=>", res);
success($q, "บันทึกสำเร็จ"); success($q, "บันทึกสำเร็จ");
}) })
.catch((e) => { .catch((e) => {
@ -286,9 +282,8 @@ const positionLevelOptions = ref<Object[]>([
]); ]);
const selectedPosition = async (data: any) => { const selectedPosition = async (data: any) => {
console.log("selecteds", data);
if (data.name == null && selected.value != data.keyId) { if (data.name == null && selected.value != data.keyId) {
// console.log("selecteds", data);
editDataStatus.value = true; editDataStatus.value = true;
selected.value = data.keyId; selected.value = data.keyId;
@ -370,7 +365,6 @@ const selectedPosition = async (data: any) => {
dataForm.positionPathSideId = ""; dataForm.positionPathSideId = "";
dataForm.positionTypeId = ""; dataForm.positionTypeId = "";
} }
console.log("dataForm", dataForm);
}; };
const checkPosition = (val: string) => { const checkPosition = (val: string) => {
@ -383,25 +377,21 @@ const expanded = ref<string[]>([]);
watch(props, () => { watch(props, () => {
expanded.value = []; expanded.value = [];
const dataPersonal = props.personal; const dataPersonal = props.personal;
console.log(props.personal);
if (dataPersonal) { if (dataPersonal) {
dataPersonal.map((data: any) => { dataPersonal.map((data: any) => {
personal.value = data; personal.value = data;
}); });
console.log("personal", personal.value);
} }
// console.log("draft===>", personal.value.draft);
if (personal.value) { if (personal.value) {
// const findData = dataRespone.value.find(findByPerson); // const findData = dataRespone.value.find(findByPerson);
let findData: any = null; let findData: any = null;
dataRespone.value.map((x: any) => { dataRespone.value.map((x: any) => {
findData = findByPerson(x); findData = findByPerson(x);
// console.log(findData);
if (findData != null) { if (findData != null) {
// console.log("findData===>", findData);
selectedPosition(findData); selectedPosition(findData);
for (let i = 3; i <= findData.keyId.length; i += 2) { for (let i = 3; i <= findData.keyId.length; i += 2) {
expanded.value.push(findData.keyId.slice(0, i)); expanded.value.push(findData.keyId.slice(0, i));
@ -414,7 +404,6 @@ watch(props, () => {
}); });
function findByPerson(element: any): any { function findByPerson(element: any): any {
// console.log("searchTree element===>", element)
if ( if (
element.positionNumId && element.positionNumId &&
element.positionLineId === personal.value.positionLineId && element.positionLineId === personal.value.positionLineId &&

View file

@ -207,9 +207,7 @@ const saveData = async () => {
showLoader(); showLoader();
await http await http
.put(config.API.relocationMainEdit(dataId), body) .put(config.API.relocationMainEdit(dataId), body)
.then((res: any) => { .then(() => {
// const data = res.data.result;
// console.log(data);
success($q, "แก้ไขข้อมูลเพื่อลงบัญชีแนบท้ายสำเร็จ"); success($q, "แก้ไขข้อมูลเพื่อลงบัญชีแนบท้ายสำเร็จ");
edit.value = false; edit.value = false;
}) })

View file

@ -274,7 +274,10 @@ const saveData = async () => {
hideLoader(); hideLoader();
}); });
}; };
const cancel = () => {
edit.value = false
getData()
}
const getClass = (val: boolean) => { const getClass = (val: boolean) => {
return { return {
"full-width inputgreen cursor-pointer": val, "full-width inputgreen cursor-pointer": val,
@ -284,7 +287,6 @@ const getClass = (val: boolean) => {
onMounted(async () => { onMounted(async () => {
if (keycloak.tokenParsed != null) { if (keycloak.tokenParsed != null) {
roleAdmin.value = await keycloak.tokenParsed.role.includes("placement1"); roleAdmin.value = await keycloak.tokenParsed.role.includes("placement1");
console.log("roleAdmin===>", roleAdmin.value);
} }
await getData(); await getData();
}); });
@ -523,7 +525,7 @@ onMounted(async () => {
class="q-px-sm" class="q-px-sm"
label="ยกเลิก" label="ยกเลิก"
style="width: 80px" style="width: 80px"
@click="edit = !edit" @click="cancel()"
/> />
</div> </div>
</div> </div>

View file

@ -223,7 +223,6 @@ const deleteData = async (id: string) => {
.delete(config.API.officerMainDelete(id)) .delete(config.API.officerMainDelete(id))
.then((res) => { .then((res) => {
success($q, "ลบข้อมูลสำเร็จ"); success($q, "ลบข้อมูลสำเร็จ");
console.log(res);
}) })
.catch((e) => { .catch((e) => {
messageError($q, e); messageError($q, e);

View file

@ -108,6 +108,7 @@ const edit = () => {
}; };
const cancel = () => { const cancel = () => {
status.value = false; status.value = false;
getAssign()
}; };
const filterData = (options: any[], excludedGroups: any[]) => { const filterData = (options: any[], excludedGroups: any[]) => {

View file

@ -76,6 +76,7 @@ const edit = () => {
const cancel = () => { const cancel = () => {
status.value = false; status.value = false;
fecthAssign()
}; };
const props = defineProps({ const props = defineProps({
@ -94,8 +95,7 @@ const fecthAssign = async () => {
showLoader(); showLoader();
await http await http
.get(config.API.evaluateCreate(assignId.value)) .get(config.API.evaluateCreate(assignId.value))
.then(async (res: any) => { .then(async (res) => {
console.log(res);
if (props.action == "add") { if (props.action == "add") {
person.value = res.data.data.person; person.value = res.data.data.person;
commander.value = res.data.data.commander; commander.value = res.data.data.commander;

View file

@ -36,6 +36,7 @@ const edit = () => {
}; };
const cancel = () => { const cancel = () => {
status.value = false; status.value = false;
fecthAssign()
}; };
const evaluate_no = ref<number>(); const evaluate_no = ref<number>();
const evaluate_id = ref<string>(""); const evaluate_id = ref<string>("");

View file

@ -76,11 +76,13 @@ const edit = () => {
const cancel = () => { const cancel = () => {
status.value = false; status.value = false;
props.fecthAssign?.(assignId.value)
}; };
const props = defineProps({ const props = defineProps({
tab: String, tab: String,
data: Object, data: Object,
action: String, action: String,
fecthAssign: Function,
}); });
const fecthFormdata = async () => { const fecthFormdata = async () => {

View file

@ -235,8 +235,6 @@ const savaForm = () => {
alerts[index + 11].value = true; alerts[index + 11].value = true;
} }
}); });
console.log(evaluate_expenct_level.value);
dialogMessageNotify($q, "กรุณากรอกข้อมูลให้ครบ"); dialogMessageNotify($q, "กรุณากรอกข้อมูลให้ครบ");
} else { } else {
putformData(); putformData();
@ -311,13 +309,13 @@ ArrayCountbotton.forEach((variable, index) => {
}); });
watch(lengthevaluate_expenct_level, (newLength) => { watch(lengthevaluate_expenct_level, (newLength) => {
if (newLength === evaluate_expenct_level.value.length) { if (newLength === evaluate_expenct_level.value.length) {
console.log(true);
alerts[0].value = false; alerts[0].value = false;
} }
}); });
watch(lengthevaluate_ouptut, (newLength) => { watch(lengthevaluate_ouptut, (newLength) => {
if (newLength === evaluate_ouptut.value.length) { if (newLength === evaluate_ouptut.value.length) {
console.log(true);
alerts[1].value = false; alerts[1].value = false;
} }
}); });

View file

@ -88,11 +88,13 @@ const edit = () => {
const cancel = () => { const cancel = () => {
status.value = false; status.value = false;
props.fecthAssign?.(assignId.value)
}; };
const props = defineProps({ const props = defineProps({
tab: String, tab: String,
data: Object, data: Object,
action: String, action: String,
fecthAssign: Function,
}); });
const fecthFormdata = async () => { const fecthFormdata = async () => {

View file

@ -140,6 +140,7 @@ const addData = () => {
:key="item.no" :key="item.no"
> >
<FormSaveResult <FormSaveResult
:fecthAssign="fecthAssign"
:tab="tab" :tab="tab"
:data="probationStore.evaluate.find((x: any) => x.no === dataArrayNumber)" :data="probationStore.evaluate.find((x: any) => x.no === dataArrayNumber)"
action="edit" action="edit"

View file

@ -142,19 +142,12 @@ const addData = () => {
:key="item.no" :key="item.no"
> >
<FormSaveResultCommader <FormSaveResultCommader
:fecthAssign="fecthAssign"
:tab="tab" :tab="tab"
:data="probationStore.evaluate.find((x: any) => x.no === dataArrayNumber)" :data="probationStore.evaluate.find((x: any) => x.no === dataArrayNumber)"
action="edit" action="edit"
/> />
</q-tab-panel> </q-tab-panel>
<!-- <q-page-container>
<FormSaveResult
:tab="tab"
:data="probationStore.evaluate.find((x: any) => x.no === dataArrayNumber)"
action="edit"
/>
</q-page-container> -->
</q-tab-panels> </q-tab-panels>
<div class="q-gutter-md" v-else-if="probationStore.tabs.length == 0"> <div class="q-gutter-md" v-else-if="probationStore.tabs.length == 0">

View file

@ -64,9 +64,6 @@ const result_option = ref<any>([
const note = ref<string>(""); const note = ref<string>("");
const date = ref<Date>(new Date()); const date = ref<Date>(new Date());
const saveEdit = (id: string) => {
dialogConfirm($q, () => console.log("save"));
};
const edit = () => { const edit = () => {
status.value = true; status.value = true;
}; };
@ -349,24 +346,24 @@ onMounted(() => {
</div> </div>
<div class="row col-12 q-gutter-lg q-mt-md"> <div class="row col-12 q-gutter-lg q-mt-md">
<div class="col-xs-12 col-sm-6"> <div class="col-xs-12 col-sm-6">
<div class="col-12 text-top0 items-center"> <div class="col-12 text-top0 items-center">
ผลการพฒนาขาราชการทอยระหวางการทดลองปฏหนาทราชการ ผลการพฒนาขาราชการทอยระหวางการทดลองปฏหนาทราชการ
</div> </div>
<div class="col-12"> <div class="col-12">
<q-select <q-select
class="col-12" class="col-12"
dense dense
v-model="develop_result" v-model="develop_result"
outlined outlined
:options="result_option" :options="result_option"
option-label="name" option-label="name"
option-value="value" option-value="value"
map-options map-options
emit-value emit-value
:disable="!status" :disable="!status"
/> />
</div> </div>
</div> </div>
<div class="col-xs-12 col-sm-11"> <div class="col-xs-12 col-sm-11">
<div class="col-12 text-top0 row items-center"> <div class="col-12 text-top0 row items-center">
@ -434,7 +431,9 @@ onMounted(() => {
dense dense
:disable="!status" :disable="!status"
class="full-width datepicker" class="full-width datepicker"
:model-value="evaluate_date != null ? date2Thai(evaluate_date) : null" :model-value="
evaluate_date != null ? date2Thai(evaluate_date) : null
"
:rules="[(val) => !!val || `${'วัน เดือน ปี ที่ประเมิน'}`]" :rules="[(val) => !!val || `${'วัน เดือน ปี ที่ประเมิน'}`]"
> >
<template v-slot:prepend> <template v-slot:prepend>
@ -472,8 +471,8 @@ onMounted(() => {
.q-rating__icon { .q-rating__icon {
text-shadow: transparent !important; text-shadow: transparent !important;
} }
.color-txt{ .color-txt {
color: black!important;; color: black !important;
} }
.q-card { .q-card {
box-shadow: 0px 0px 0px 0px !important; box-shadow: 0px 0px 0px 0px !important;

View file

@ -63,7 +63,7 @@ const getSurveyData = async () => {
} }
}) })
.catch((e) => { .catch((e) => {
console.log(e); messageError($q,e)
}); });
}; };
const classBordered = ref<string>(""); const classBordered = ref<string>("");

View file

@ -814,7 +814,9 @@ const clickShowWarn = () => {
checkStatus == true checkStatus == true
" "
/> />
<q-th v-else></q-th>
</q-tr> </q-tr>
</template> </template>
<template v-slot:body="props"> <template v-slot:body="props">
<q-tr <q-tr

View file

@ -196,7 +196,6 @@ const fecthlistInsignia = async () => {
await http await http
.get(config.API.insigniaManageType(tab.value, Number(roundYear.value))) .get(config.API.insigniaManageType(tab.value, Number(roundYear.value)))
.then((res) => { .then((res) => {
console.log(res);
let data = res.data.result; let data = res.data.result;
DataStore.listinsignia(data); DataStore.listinsignia(data);
}) })

View file

@ -5,7 +5,7 @@ import http from "@/plugins/http";
import config from "@/app.config"; import config from "@/app.config";
import { useResultDataStore } from "@/modules/07_insignia/storeResult"; import { useResultDataStore } from "@/modules/07_insignia/storeResult";
import Dialogbody from "@/modules/07_insignia/components/3_result/Dialogbody.vue" import Dialogbody from "@/modules/07_insignia/components/3_result/Dialogbody.vue";
import DialogForm from "@/modules/07_insignia/components/3_result/DialogForm.vue"; import DialogForm from "@/modules/07_insignia/components/3_result/DialogForm.vue";
import fileUploadview from "../components/3_result/fileUpload.vue"; import fileUploadview from "../components/3_result/fileUpload.vue";
@ -36,7 +36,7 @@ const fileResult = ref<any>(null);
const fileinvoice = ref<any>(null); const fileinvoice = ref<any>(null);
const loadView = ref<boolean>(false); const loadView = ref<boolean>(false);
const insigniaTypeOption = ref<any>([]); const insigniaTypeOption = ref<any>([]);
const ModalDialog = ref<boolean>(false) const ModalDialog = ref<boolean>(false);
onMounted(async () => { onMounted(async () => {
await fecthRound(); await fecthRound();
}); });
@ -59,7 +59,7 @@ const fecthRound = async () => {
} }
}) })
.catch((err) => { .catch((err) => {
console.log(err); messageError($q, err);
}) })
.finally(() => { .finally(() => {
hideLoader(); hideLoader();
@ -89,7 +89,6 @@ const fecthInsigniaType = async () => {
}) })
.catch((err) => { .catch((err) => {
messageError($q, err); messageError($q, err);
console.log("fecthInsigniaType");
}); });
}; };
const visibleColumns = ref<String[]>([ const visibleColumns = ref<String[]>([
@ -266,8 +265,6 @@ const columns = ref<QTableProps["columns"]>([
watch(tab, () => { watch(tab, () => {
if (tab.value !== "doc") { if (tab.value !== "doc") {
fecthlistInsignia(); fecthlistInsignia();
console.log(DataStore.insigniaOp);
insigniaTypeOption.value = DataStore.insigniaOp.filter( insigniaTypeOption.value = DataStore.insigniaOp.filter(
(e: any) => e.insigniaType == tab.value || e.name == "ทั้งหมด" (e: any) => e.insigniaType == tab.value || e.name == "ทั้งหมด"
); );
@ -349,7 +346,7 @@ const filter = ref<string>("");
const close = () => { const close = () => {
modal.value = false; modal.value = false;
ModalDialog.value = false ModalDialog.value = false;
}; };
const addData = () => { const addData = () => {
@ -383,7 +380,6 @@ const perviewfile = async (event: any, actionType: string) => {
await http await http
.put(config.API.previewfileInsignia(actionType, id), formdata) .put(config.API.previewfileInsignia(actionType, id), formdata)
.then((res) => { .then((res) => {
console.log(res);
let data = res.data.result; let data = res.data.result;
rowspreview.value = data.map((e: any) => ({ rowspreview.value = data.map((e: any) => ({
id: e.id, id: e.id,
@ -405,7 +401,7 @@ const perviewfile = async (event: any, actionType: string) => {
})); }));
}) })
.catch((err) => { .catch((err) => {
console.log(err); messageError($q,err)
}) })
.finally(() => { .finally(() => {
modelPerview.value = true; modelPerview.value = true;
@ -430,9 +426,9 @@ const paginationLabel = (start: number, end: number, total: number) => {
if (paging.value == true) return " " + start + "-" + end + " ใน " + total; if (paging.value == true) return " " + start + "-" + end + " ใน " + total;
else return start + "-" + end + " ใน " + total; else return start + "-" + end + " ใน " + total;
}; };
const OpenModal = () =>{ const OpenModal = () => {
ModalDialog.value = true ModalDialog.value = true;
} };
</script> </script>
<template> <template>
@ -694,23 +690,52 @@ const OpenModal = () =>{
</div> </div>
<div v-else-if="props.col.name == 'action'"> <div v-else-if="props.col.name == 'action'">
<q-btn icon="mdi-dots-vertical" size="12px" color="grey-7" <q-btn
flat round dense > icon="mdi-dots-vertical"
<q-menu transition-show="jump-down" transition-hide="jump-up" > size="12px"
<q-list dense style="min-width: 100px" > color="grey-7"
<q-item clickable v-close-popup @click.stop="editData(props.row)" > flat
<q-item-section style="min-width: 0px" avatar class="q-py-sm" > round
<q-icon size="xs" name="mdi-pencil-outline" color="primary"/> dense
</q-item-section> >
<q-menu
transition-show="jump-down"
transition-hide="jump-up"
>
<q-list dense style="min-width: 100px">
<q-item
clickable
v-close-popup
@click.stop="editData(props.row)"
>
<q-item-section <q-item-section
>เเกไขขอม</q-item-section style="min-width: 0px"
avatar
class="q-py-sm"
> >
<q-icon
size="xs"
name="mdi-pencil-outline"
color="primary"
/>
</q-item-section>
<q-item-section>เเกไขขอม</q-item-section>
</q-item> </q-item>
<q-item clickable v-close-popup @click="OpenModal()"> <q-item clickable v-close-popup @click="OpenModal()">
<q-item-section style="min-width: 0px" avatar class="q-py-sm" > <q-item-section
<q-icon size="xs" name="mdi-information-outline" color="blue"/> style="min-width: 0px"
avatar
class="q-py-sm"
>
<q-icon
size="xs"
name="mdi-information-outline"
color="blue"
/>
</q-item-section> </q-item-section>
<q-item-section no-wrap>-นเครองราชฯ</q-item-section> <q-item-section no-wrap
>-นเครองราชฯ</q-item-section
>
</q-item> </q-item>
</q-list> </q-list>
</q-menu> </q-menu>
@ -729,10 +754,7 @@ const OpenModal = () =>{
</q-tab-panel> </q-tab-panel>
</q-tab-panels> </q-tab-panels>
<Dialogbody <Dialogbody :modal="ModalDialog" :close="close" />
:modal="ModalDialog"
:close="close"
/>
<DialogForm <DialogForm
:modal="modal" :modal="modal"
:save="save" :save="save"

View file

@ -107,7 +107,6 @@ const Dataupload = async () => {
const formData = new FormData(); const formData = new FormData();
formData.append("avatar", newFile); formData.append("avatar", newFile);
formData.append("moss", "newFile"); formData.append("moss", "newFile");
console.log(formData);
showLoader(); showLoader();
await http await http
.post(config.API.profilePaperId(profileId.value), formData) .post(config.API.profilePaperId(profileId.value), formData)

View file

@ -292,7 +292,6 @@ const fetchData = async () => {
// employeeOc: e.employeeOc, // employeeOc: e.employeeOc,
// employeeWage: e.employeeWage, // employeeWage: e.employeeWage,
// }); // });
// console.log(res);
// }); // });
const data: any = res.data.result; const data: any = res.data.result;
informaTempData.value.employeeMoneyIncrease = informaTempData.value.employeeMoneyIncrease =

View file

@ -572,7 +572,6 @@ const clickAddLeave = async () => {
numUsedLeave.value = 0; numUsedLeave.value = 0;
await clickTotal(); await clickTotal();
if (rowsTotal.value.length > 0) { if (rowsTotal.value.length > 0) {
// console.log(rowsTotal.value);
let data: DataOptionLeave[] = []; let data: DataOptionLeave[] = [];
rowsTotal.value.map((e: ResponseTotalObject) => { rowsTotal.value.map((e: ResponseTotalObject) => {
data.push({ data.push({
@ -797,7 +796,6 @@ const selectData = async (props: DataProps) => {
numUsedLeave.value = props.row.sumLeave; numUsedLeave.value = props.row.sumLeave;
await clickTotal(); await clickTotal();
if (rowsTotal.value.length > 0) { if (rowsTotal.value.length > 0) {
// console.log(rowsTotal.value);
let data: DataOptionLeave[] = []; let data: DataOptionLeave[] = [];
rowsTotal.value.map((e: ResponseTotalObject) => { rowsTotal.value.map((e: ResponseTotalObject) => {
data.push({ data.push({

View file

@ -1048,7 +1048,6 @@ const checkRowPage = () => {
editRow.value = false; editRow.value = false;
next.value = true; next.value = true;
previous.value = true; previous.value = true;
// console.log(rowIndex.value);
if (rowIndex.value + 1 >= rows.value.length) { if (rowIndex.value + 1 >= rows.value.length) {
next.value = false; next.value = false;
} }
@ -1204,8 +1203,6 @@ const saveData = async () => {
* นทกแกไขขอม * นทกแกไขขอม
*/ */
const editData = async () => { const editData = async () => {
console.log(agencyId.value);
showLoader(); showLoader();
await http await http
.put(config.API.profileSalaryEmployeeId(id.value), { .put(config.API.profileSalaryEmployeeId(id.value), {
@ -1304,7 +1301,6 @@ const clickClose = async () => {
* @param props props ใน row เลอก * @param props props ใน row เลอก
*/ */
const selectData = async (props: DataPropsEmployee) => { const selectData = async (props: DataPropsEmployee) => {
// console.log(props.row);
modalEdit.value = true; modalEdit.value = true;
modal.value = true; modal.value = true;
edit.value = false; edit.value = false;
@ -1415,7 +1411,6 @@ const clickHistory = async (row: RequestItemsEmployee) => {
.get(config.API.profileSalaryEmployeeHisId(row.id)) .get(config.API.profileSalaryEmployeeHisId(row.id))
.then((res) => { .then((res) => {
const data = res.data.result; const data = res.data.result;
console.log("clickHistory", data);
rowsHistory.value = []; rowsHistory.value = [];
data.map((e: ResponseObjectEmployee) => { data.map((e: ResponseObjectEmployee) => {
rowsHistory.value.push({ rowsHistory.value.push({

View file

@ -127,7 +127,7 @@ watch(byOrder, async () => {
CommandOption.value = res.data.result; CommandOption.value = res.data.result;
}) })
.catch((e) => { .catch((e) => {
console.log(e); messageError($q, e);
}); });
}); });
// //
@ -245,7 +245,7 @@ const fecthCommand = async () => {
byOrderOption.value = res.data.result; byOrderOption.value = res.data.result;
}) })
.catch((e) => { .catch((e) => {
console.log(e); messageError($q, e);
}); });
}; };
const selectCMP = (selectOrder: OrederResult) => { const selectCMP = (selectOrder: OrederResult) => {

View file

@ -15,7 +15,6 @@ export const useroleUserDataStore = defineStore("roleusers", () => {
const fetchroleUser = async (keycloak: any) => { const fetchroleUser = async (keycloak: any) => {
// console.log(keycloak);
if (keycloak != null) { if (keycloak != null) {
insignia1Role.value = await keycloak.includes("insignia1"); insignia1Role.value = await keycloak.includes("insignia1");
insignia2Role.value = await keycloak.includes("insignia2"); insignia2Role.value = await keycloak.includes("insignia2");

View file

@ -89,7 +89,6 @@ const getDataNotification = async () => {
.get(config.API.msgNotificate) .get(config.API.msgNotificate)
.then((res: any) => { .then((res: any) => {
const response = res.data.result; const response = res.data.result;
// console.log("response", response);
let list: notiType[] = []; let list: notiType[] = [];
response.map((e: any) => { response.map((e: any) => {
list.push({ list.push({