add commander Id
This commit is contained in:
parent
be13a52af4
commit
99c1ead9a1
1 changed files with 27 additions and 3 deletions
|
|
@ -294,6 +294,9 @@ export class OrganizationDotnetController extends Controller {
|
|||
},
|
||||
},
|
||||
});
|
||||
let fullname = "";
|
||||
let commanderId = "";
|
||||
let commanderKeycloak = "";
|
||||
|
||||
if (!profile) {
|
||||
const profile = await this.profileEmpRepo.findOne({
|
||||
|
|
@ -354,7 +357,6 @@ export class OrganizationDotnetController extends Controller {
|
|||
x.orgRevision?.orgRevisionIsCurrent == true,
|
||||
)?.orgChild4?.id ?? null,
|
||||
};
|
||||
let fullname = "";
|
||||
let pos = await this.posMasterRepository.findOne({
|
||||
relations: ["current_holder"],
|
||||
where: {
|
||||
|
|
@ -377,6 +379,8 @@ export class OrganizationDotnetController extends Controller {
|
|||
pos.current_holder.firstName +
|
||||
" " +
|
||||
pos.current_holder.lastName;
|
||||
commanderId = pos.current_holder.id;
|
||||
commanderKeycloak = pos.current_holder.keycloak;
|
||||
} else {
|
||||
let pos = await this.posMasterRepository.findOne({
|
||||
relations: ["current_holder"],
|
||||
|
|
@ -399,6 +403,8 @@ export class OrganizationDotnetController extends Controller {
|
|||
pos.current_holder.firstName +
|
||||
" " +
|
||||
pos.current_holder.lastName;
|
||||
commanderId = pos.current_holder.id;
|
||||
commanderKeycloak = pos.current_holder.keycloak;
|
||||
} else {
|
||||
let pos = await this.posMasterRepository.findOne({
|
||||
relations: ["current_holder"],
|
||||
|
|
@ -421,6 +427,8 @@ export class OrganizationDotnetController extends Controller {
|
|||
pos.current_holder.firstName +
|
||||
" " +
|
||||
pos.current_holder.lastName;
|
||||
commanderId = pos.current_holder.id;
|
||||
commanderKeycloak = pos.current_holder.keycloak;
|
||||
} else {
|
||||
let pos = await this.posMasterRepository.findOne({
|
||||
relations: ["current_holder"],
|
||||
|
|
@ -443,6 +451,8 @@ export class OrganizationDotnetController extends Controller {
|
|||
pos.current_holder.firstName +
|
||||
" " +
|
||||
pos.current_holder.lastName;
|
||||
commanderId = pos.current_holder.id;
|
||||
commanderKeycloak = pos.current_holder.keycloak;
|
||||
} else {
|
||||
let pos = await this.posMasterRepository.findOne({
|
||||
relations: ["current_holder"],
|
||||
|
|
@ -465,8 +475,12 @@ export class OrganizationDotnetController extends Controller {
|
|||
pos.current_holder.firstName +
|
||||
" " +
|
||||
pos.current_holder.lastName;
|
||||
commanderId = pos.current_holder.id;
|
||||
commanderKeycloak = pos.current_holder.keycloak;
|
||||
} else {
|
||||
fullname = "";
|
||||
commanderId = "";
|
||||
commanderKeycloak = "";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -622,7 +636,6 @@ export class OrganizationDotnetController extends Controller {
|
|||
)?.orgChild4?.id ?? null,
|
||||
};
|
||||
|
||||
let fullname = "";
|
||||
let pos = await this.posMasterRepository.findOne({
|
||||
relations: ["current_holder"],
|
||||
where: {
|
||||
|
|
@ -646,6 +659,8 @@ export class OrganizationDotnetController extends Controller {
|
|||
pos.current_holder.firstName +
|
||||
" " +
|
||||
pos.current_holder.lastName;
|
||||
commanderId = pos.current_holder.id;
|
||||
commanderKeycloak = pos.current_holder.keycloak;
|
||||
} else {
|
||||
let pos = await this.posMasterRepository.findOne({
|
||||
relations: ["current_holder"],
|
||||
|
|
@ -669,6 +684,8 @@ export class OrganizationDotnetController extends Controller {
|
|||
pos.current_holder.firstName +
|
||||
" " +
|
||||
pos.current_holder.lastName;
|
||||
commanderId = pos.current_holder.id;
|
||||
commanderKeycloak = pos.current_holder.keycloak;
|
||||
} else {
|
||||
let pos = await this.posMasterRepository.findOne({
|
||||
relations: ["current_holder"],
|
||||
|
|
@ -692,6 +709,8 @@ export class OrganizationDotnetController extends Controller {
|
|||
pos.current_holder.firstName +
|
||||
" " +
|
||||
pos.current_holder.lastName;
|
||||
commanderId = pos.current_holder.id;
|
||||
commanderKeycloak = pos.current_holder.keycloak;
|
||||
} else {
|
||||
let pos = await this.posMasterRepository.findOne({
|
||||
relations: ["current_holder"],
|
||||
|
|
@ -715,6 +734,8 @@ export class OrganizationDotnetController extends Controller {
|
|||
pos.current_holder.firstName +
|
||||
" " +
|
||||
pos.current_holder.lastName;
|
||||
commanderId = pos.current_holder.id;
|
||||
commanderKeycloak = pos.current_holder.keycloak;
|
||||
} else {
|
||||
let pos = await this.posMasterRepository.findOne({
|
||||
relations: ["current_holder"],
|
||||
|
|
@ -738,8 +759,12 @@ export class OrganizationDotnetController extends Controller {
|
|||
pos.current_holder.firstName +
|
||||
" " +
|
||||
pos.current_holder.lastName;
|
||||
commanderId = pos.current_holder.id;
|
||||
commanderKeycloak = pos.current_holder.keycloak;
|
||||
} else {
|
||||
fullname = "";
|
||||
commanderId = "";
|
||||
commanderKeycloak = "";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -858,7 +883,6 @@ export class OrganizationDotnetController extends Controller {
|
|||
profileInsignia: profile.profileInsignias.length > 0 ? profile.profileInsignias[0] : null,
|
||||
profileType: "OFFICER",
|
||||
};
|
||||
console.log("11111111111111131");
|
||||
|
||||
return new HttpSuccess(mapProfile);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue