update view_registry_officer add fields

This commit is contained in:
Bright 2025-05-26 14:43:32 +07:00
parent 36c6abcfdf
commit 3746888ef8

View file

@ -116,6 +116,14 @@ import { ViewColumn, ViewEntity } from "typeorm";
vctlo.Days,
vctlo.profileId
FROM tenureLevelOfficer vctlo
),
PositionExecutiveDate AS (
SELECT
vcteo.Years,
vcteo.Months,
vcteo.Days,
vcteo.profileId
FROM tenurePositionExecutiveOfficer vcteo
)
SELECT
p.id as profileId,
@ -168,7 +176,10 @@ import { ViewColumn, ViewEntity } from "typeorm";
vcto.Days,
vctlo.Years AS levelYears,
vctlo.Months AS levelMonths,
vctlo.Days AS levelDays
vctlo.Days AS levelDays,
vcteo.Years AS posExecutiveYears,
vcteo.Months AS posExecutiveMonths,
vcteo.Days AS posExecutiveDays
FROM profile p
LEFT JOIN posLevel ON p.posLevelId = posLevel.id
LEFT JOIN posType ON p.posTypeId = posType.id
@ -179,6 +190,7 @@ import { ViewColumn, ViewEntity } from "typeorm";
LEFT JOIN Fields fies ON p.id = fies.profileId
LEFT JOIN PositionDate vcto ON p.id = vcto.profileId
LEFT JOIN PositionLevelDate vctlo ON p.id = vctlo.profileId
LEFT JOIN PositionExecutiveDate vcteo ON p.id = vcteo.profileId
`,
})
export class viewRegistryOfficer {