Compare commits

..

No commits in common. "6483f30d07094de2b6d0cc6bd122ffcf8a8b517e" and "15fde564ed1eaae73fa75cf572ad42b72a8f4741" have entirely different histories.

7 changed files with 5 additions and 17 deletions

View file

@ -512,14 +512,12 @@ function onSubmit() {
posLevelId: selectedPos.value[0].posLevelId, //
posLevelName: selectedPos.value[0].posLevelName, //
posExecutiveName: selectedPos.value[0].posExecutiveName, //
posExecutiveId: selectedPos.value[0].posExecutiveId, //
reportingDate: convertDateToAPI(datePos.value),
posmasterId: dataPosMaster.id,
typeCommand: type.value,
positionExecutiveField: selectedPos.value[0].positionExecutiveField, //
positionArea: selectedPos.value[0].positionArea, ///
};
console.log(body);
await props.onSubmit?.(body);
close();

View file

@ -165,9 +165,7 @@ async function fetchDataTable(id: string, level: number = 0) {
(e) => e !== props.dataRow?.posmasterId
);
positionNo.value = posMain.filter(
(e: DataPositionNo) => !newUse.includes(e.id)
);
positionNo.value = posMain.filter((e: DataPositionNo) => !newUse.includes(e.id));
} else {
positionNo.value = posMain.filter(
(e: DataPositionNo) => !positionUse.value.includes(e.id)
@ -243,7 +241,6 @@ async function onClickSubmit() {
posLevelId: selectedPos.value[0].posLevelId, //
posLevelName: selectedPos.value[0].posLevelName, //
posExecutiveName: selectedPos.value[0].posExecutiveName,
posExecutiveId: selectedPos.value[0].posExecutiveId,
reportingDate: convertDateToAPI(datePos.value),
posmasterId: dataPosMaster.id,
positionExecutiveField: selectedPos.value[0].positionExecutiveField, //
@ -293,10 +290,7 @@ watch(
if (modal.value) {
await fetchPositionUes();
if (props?.dataRow?.node !== null && props?.dataRow?.nodeId !== null) {
await fetchPosFind(
props?.dataRow?.node ?? 0,
props?.dataRow?.nodeId ?? ""
);
await fetchPosFind(props?.dataRow?.node ?? 0, props?.dataRow?.nodeId ?? "");
} else {
expanded.value = [];
}
@ -351,7 +345,7 @@ function onPosType() {
watch(
[isAll, isBlank, () => isPosition.value],
([newAll, newBlank, newPos], [oldAll, oldBlank, oldPos]) => {
const shouldFetch = newAll !== oldAll || newBlank !== oldBlank;
const shouldFetch = (newAll !== oldAll) || (newBlank !== oldBlank);
const isSelectMode = newPos === "select" && oldPos !== "select";
if (shouldFetch || isSelectMode) {

View file

@ -1,5 +1,5 @@
<script setup lang="ts">
import { ref, onMounted, watch, reactive, computed, type PropType } from "vue";
import { ref, onMounted, watch, reactive, computed } from "vue";
import { useQuasar, QForm } from "quasar";
import http from "@/plugins/http";
@ -48,7 +48,7 @@ const {
/** รับค่ามาจากหน้าหลัก */
const props = defineProps({
statCard: {
type: Function as PropType<() => Promise<void>>,
type: Function,
default: () => console.log("getStat"),
},
});

View file

@ -152,7 +152,6 @@ interface FormDataAppoint {
reportingDate: string;
posmasterId: string;
posExecutiveName?: string;
posExecutiveId?: string;
typeCommand: string;
positionExecutiveField?: string;
positionArea?: string;

View file

@ -382,7 +382,6 @@ async function onSave(data: FormDataAppoint) {
typeCommand: data.typeCommand,
positionExecutiveField: data.positionExecutiveField,
positionArea: data.positionArea,
posExecutiveId: data.posExecutiveId,
};
showLoader();

View file

@ -457,7 +457,6 @@ async function onSave(data: FormDataAppoint) {
typeCommand: data.typeCommand,
positionExecutiveField: data.positionExecutiveField,
positionArea: data.positionArea,
posExecutiveId: data.posExecutiveId,
};
showLoader();

View file

@ -286,7 +286,6 @@ async function onSaveSelectOrg(data: any) {
typeCommand: data.typeCommand,
positionExecutiveField: data.positionExecutiveField,
positionArea: data.positionArea,
posExecutiveId: data.posExecutiveId,
};
showLoader();