Merge branch 'develop' into dev
This commit is contained in:
commit
dca9102a8d
3 changed files with 20 additions and 9 deletions
|
|
@ -131,11 +131,11 @@ function onValidate() {
|
||||||
formData.append("leaveRangeEnd", formDataSick.leaveRangeEnd);
|
formData.append("leaveRangeEnd", formDataSick.leaveRangeEnd);
|
||||||
formData.append(
|
formData.append(
|
||||||
"leaveStartDate",
|
"leaveStartDate",
|
||||||
convertDateToAPI(formDataSick.leaveStartDate) ?? ""
|
convertDateToAPI(formDataSick.leaveStartDate) ?? "",
|
||||||
);
|
);
|
||||||
formData.append(
|
formData.append(
|
||||||
"leaveEndDate",
|
"leaveEndDate",
|
||||||
convertDateToAPI(formDataSick.leaveEndDate) ?? ""
|
convertDateToAPI(formDataSick.leaveEndDate) ?? "",
|
||||||
);
|
);
|
||||||
formData.append("leaveWrote", formDataSick.leaveWrote);
|
formData.append("leaveWrote", formDataSick.leaveWrote);
|
||||||
formData.append("leaveAddress", dataStore.currentAddress);
|
formData.append("leaveAddress", dataStore.currentAddress);
|
||||||
|
|
@ -202,7 +202,6 @@ function mapPropsToFormData() {
|
||||||
statusCheck.value = props.data.status;
|
statusCheck.value = props.data.status;
|
||||||
leaveId.value = props.data.id;
|
leaveId.value = props.data.id;
|
||||||
formDataSick.leaveDocument = [];
|
formDataSick.leaveDocument = [];
|
||||||
console.log(props.data.leaveDocument);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -211,7 +210,7 @@ watch(
|
||||||
() => {
|
() => {
|
||||||
mapPropsToFormData();
|
mapPropsToFormData();
|
||||||
},
|
},
|
||||||
{ deep: true }
|
{ deep: true },
|
||||||
);
|
);
|
||||||
|
|
||||||
/** Hook */
|
/** Hook */
|
||||||
|
|
|
||||||
|
|
@ -293,7 +293,7 @@ function getSearch() {
|
||||||
/>
|
/>
|
||||||
<q-input
|
<q-input
|
||||||
v-if="props.model === 'LV-005'"
|
v-if="props.model === 'LV-005'"
|
||||||
class="col-12 col-sm-4"
|
class="col-md-3 col-sm-6"
|
||||||
dense
|
dense
|
||||||
outlined
|
outlined
|
||||||
readonly
|
readonly
|
||||||
|
|
@ -302,7 +302,7 @@ function getSearch() {
|
||||||
label="จำนวนสิทธิ์การลาที่ได้รับ"
|
label="จำนวนสิทธิ์การลาที่ได้รับ"
|
||||||
/>
|
/>
|
||||||
<q-input
|
<q-input
|
||||||
class="col-12 col-sm-4"
|
class="col-md-3 col-sm-6"
|
||||||
dense
|
dense
|
||||||
outlined
|
outlined
|
||||||
readonly
|
readonly
|
||||||
|
|
@ -312,7 +312,7 @@ function getSearch() {
|
||||||
/>
|
/>
|
||||||
<q-input
|
<q-input
|
||||||
v-if="props.model === 'LV-005'"
|
v-if="props.model === 'LV-005'"
|
||||||
class="col-12 col-sm-4"
|
class="col-md-3 col-sm-6"
|
||||||
dense
|
dense
|
||||||
outlined
|
outlined
|
||||||
readonly
|
readonly
|
||||||
|
|
@ -320,6 +320,15 @@ function getSearch() {
|
||||||
v-model="dataStore.leaveRemain"
|
v-model="dataStore.leaveRemain"
|
||||||
label="จำนวนสิทธิ์การลาคงเหลือ"
|
label="จำนวนสิทธิ์การลาคงเหลือ"
|
||||||
/>
|
/>
|
||||||
|
<q-input
|
||||||
|
class="col-md-3 col-sm-6"
|
||||||
|
dense
|
||||||
|
outlined
|
||||||
|
readonly
|
||||||
|
bg-color="white"
|
||||||
|
v-model="dataStore.leaveWaitingSummary"
|
||||||
|
label="จำนวนวันที่อยู่ระหว่างการพิจารณา"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</q-card>
|
</q-card>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@ export const useLeaveStore = defineStore("Leave", () => {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* function เรียกข้อมูลรายการลา Table
|
* function เรียกข้อมูลรายการลา Table
|
||||||
* @param data ข้อมูลรายการลา Table
|
* @param data ข้อมูลรายการลา TableleaveWaitingSummary
|
||||||
*/
|
*/
|
||||||
async function fetchListLeave(data: ListLeave[]) {
|
async function fetchListLeave(data: ListLeave[]) {
|
||||||
let datalist: ListLeaveTable[] = data.map((e: ListLeave) => ({
|
let datalist: ListLeaveTable[] = data.map((e: ListLeave) => ({
|
||||||
|
|
@ -66,7 +66,6 @@ export const useLeaveStore = defineStore("Leave", () => {
|
||||||
isDelete: e.isDelete,
|
isDelete: e.isDelete,
|
||||||
}));
|
}));
|
||||||
rows.value = datalist;
|
rows.value = datalist;
|
||||||
console.log(datalist);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//ฟังก์ชั่นแปลง Status
|
//ฟังก์ชั่นแปลง Status
|
||||||
|
|
@ -309,6 +308,7 @@ export const useLeaveStore = defineStore("Leave", () => {
|
||||||
|
|
||||||
const telephoneNumber = ref<string>("");
|
const telephoneNumber = ref<string>("");
|
||||||
const currentAddress = ref<string>("");
|
const currentAddress = ref<string>("");
|
||||||
|
const leaveWaitingSummary = ref<number>(0);
|
||||||
|
|
||||||
//ดึงข้อมูล profile จาก API
|
//ดึงข้อมูล profile จาก API
|
||||||
async function fetchProfile() {
|
async function fetchProfile() {
|
||||||
|
|
@ -347,6 +347,7 @@ export const useLeaveStore = defineStore("Leave", () => {
|
||||||
: "-";
|
: "-";
|
||||||
restDayCurrentTotal.value =
|
restDayCurrentTotal.value =
|
||||||
Number(data.leaveLimit) - Number(data.restDayTotalOld);
|
Number(data.leaveLimit) - Number(data.restDayTotalOld);
|
||||||
|
leaveWaitingSummary.value = data.leaveWaitingSummary || 0;
|
||||||
})
|
})
|
||||||
.catch((e: any) => {
|
.catch((e: any) => {
|
||||||
console.log(e);
|
console.log(e);
|
||||||
|
|
@ -409,6 +410,7 @@ export const useLeaveStore = defineStore("Leave", () => {
|
||||||
salaryText.value = "";
|
salaryText.value = "";
|
||||||
leaveLast.value = undefined;
|
leaveLast.value = undefined;
|
||||||
restDayCurrentTotal.value = 0;
|
restDayCurrentTotal.value = 0;
|
||||||
|
leaveWaitingSummary.value = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** ฟังก์ชันเรียกข้อมูลประเภทการลา */
|
/** ฟังก์ชันเรียกข้อมูลประเภทการลา */
|
||||||
|
|
@ -480,6 +482,7 @@ export const useLeaveStore = defineStore("Leave", () => {
|
||||||
currentAddress,
|
currentAddress,
|
||||||
rangeOptions,
|
rangeOptions,
|
||||||
converstType,
|
converstType,
|
||||||
|
leaveWaitingSummary,
|
||||||
|
|
||||||
fetchLeaveTypeData,
|
fetchLeaveTypeData,
|
||||||
isLoadingProfile,
|
isLoadingProfile,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue