update issue #1642

This commit is contained in:
Bright 2025-08-06 11:39:13 +07:00
parent 428df7d08a
commit 1590a08e1b

View file

@ -1684,15 +1684,23 @@ export class ProfileController extends Controller {
)
: "";
let portfolio:any
let portfolios:any
await new CallAPI()
.GetData(req, `/development/portfolio/kk1/${profiles?.keycloak}`)
.then((x) => {
portfolio = x.result;
portfolios = x;
})
.catch(() => {});
if (!portfolio)
portfolio = [{name: "-", year: "-"}]
if (!portfolios) {
portfolios = [{ name: "-", year: "-" }]
}
else {
portfolios = portfolios.map((x:any) => ({
name: x.name ? x.name : "-",
year: x.year ? Extension.ToThaiNumber(x.year.toString()) : "-"
}))
}
const data = {
fullName: `${profiles?.prefix}${profiles?.firstName} ${profiles?.lastName}`,
@ -1847,7 +1855,7 @@ export class ProfileController extends Controller {
assessments,
profileAbility,
otherIncome,
portfolio
portfolios
};
return new HttpSuccess({