Merge branch 'develop' into nice_dev

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2024-03-01 11:58:45 +07:00
commit d7c164ac9b
4 changed files with 63 additions and 24 deletions

View file

@ -8,6 +8,7 @@ import config from "@/app.config";
import type {
DataOption,
ObjectSalaryRef,
FormData
} from "@/modules/13_salary/interface/index/Main";
import type {
SalaryPosType,
@ -46,7 +47,7 @@ const props = defineProps({
});
const salaryId = ref<string>("");
const formData = reactive({
const formData = reactive<FormData>({
salaryType: "", //* (OFFICER->"",EMPLOYEE->"")
posTypeId: "", //*
posLevelId: "", //*
@ -168,7 +169,11 @@ watch(
if (salaryPosTypeOption.value.length === 0) {
await fetchPosType();
}
if (props.typeAction === "add") {
formData.date = new Date()
formData.startDate = new Date()
formData.endDate = new Date()
}
if (props.typeAction === "edit") {
await showLoader();
if (props.data) {
@ -237,9 +242,6 @@ function createSalary() {
});
}
/** function checkEndDate*/
function checkEndDate() {
if (formData.endDate !== null && formData.startDate !== null) {
@ -286,10 +288,10 @@ async function downloadFile(url: string, type: string, fileName: string) {
<Header :tittle="title" :close="closeDialog" />
<q-separator />
<q-card-section class="scroll" style="max-height: 70vh;">
<q-card-section class="scroll" style="max-height: 70vh">
<div class="row col-12 q-col-gutter-sm">
<div class="col-md-12">
<div class="row col-12 q-col-gutter-sm ">
<div class="row col-12 q-col-gutter-sm">
<div class="col-xs-12 col-md-3">
<q-select
ref="salaryTypeRef"

View file

@ -45,11 +45,23 @@ interface ObjectSalaryRateRef {
[key: string]: any;
}
interface FormData{
salaryType:string
posTypeId:string
posLevelId:string
isActive:boolean
date:Date |null
startDate:Date |null
endDate:Date |null
details:string
isSpecial:boolean
}
export type {
DataOption,
NewPagination,
ItemsMenu,
ObjectSalaryRef,
ObjectSalaryRateRef,
DataOptionShort
DataOptionShort,
FormData,
};