fixing
This commit is contained in:
parent
82b6f07897
commit
ec04bc2e1e
1 changed files with 10 additions and 10 deletions
|
|
@ -137,7 +137,9 @@ const columnsHistory = ref<QTableColumn[]>([
|
|||
field: "birthDate",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
format: (v) => date2Thai(v),
|
||||
format: (v) => {
|
||||
return v ? date2Thai(v) : "";
|
||||
},
|
||||
sort: (a: string, b: string) =>
|
||||
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||
},
|
||||
|
|
@ -265,17 +267,15 @@ async function getData() {
|
|||
showLoader();
|
||||
http
|
||||
.get(config.API.registryNewByProfileId(profileId.value, empType.value))
|
||||
.then(async (res) => {
|
||||
informaData.value = await res.data.result;
|
||||
if (informaData.value) {
|
||||
id.value = informaData.value.id;
|
||||
.then((res) => {
|
||||
informaData.value = res.data.result;
|
||||
id.value = res.data.result.id;
|
||||
|
||||
if (informaData.value.birthDate) {
|
||||
console.log("birthDate===>", informaData.value.birthDate);
|
||||
if (res.data.result.birthDate) {
|
||||
console.log("birthDate===>", res.data.result.birthDate);
|
||||
|
||||
age.value = calculateAge(informaData.value.birthDate);
|
||||
console.log("age===>", age.value);
|
||||
}
|
||||
age.value = calculateAge(res.data.result.birthDate);
|
||||
console.log("age===>", age.value);
|
||||
}
|
||||
})
|
||||
.catch((e) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue