เพิ่มฟิว current_holder , next_holder fullName
This commit is contained in:
parent
d897c8c041
commit
10a3a243d5
1 changed files with 6 additions and 1 deletions
|
|
@ -3042,7 +3042,8 @@ export class PositionController extends Controller {
|
|||
node = 0;
|
||||
nodeId = posMaster.orgRootId;
|
||||
}
|
||||
|
||||
const fullNameCurrentHolder = posMaster.current_holder?posMaster.current_holder.prefix+posMaster.current_holder.firstName+" "+posMaster.current_holder.lastName:null;
|
||||
const fullNameNextHolder = posMaster.next_holder?posMaster.next_holder.prefix+posMaster.next_holder.firstName+" "+posMaster.next_holder.lastName:null;
|
||||
return {
|
||||
id: posMaster.id,
|
||||
node: node,
|
||||
|
|
@ -3058,6 +3059,10 @@ export class PositionController extends Controller {
|
|||
orgShortname: shortName,
|
||||
isSit: posMaster.isSit,
|
||||
isPosition: posMaster.positions.filter((x) => x.positionName == body.position).length > 0,
|
||||
current_holder: posMaster.current_holderId ? posMaster.current_holderId : null,
|
||||
current_holderName: fullNameCurrentHolder,
|
||||
next_holder: posMaster.next_holderId ? posMaster.next_holderId : null,
|
||||
next_holderName: fullNameNextHolder,
|
||||
positions: posMaster.positions.map((position) => ({
|
||||
id: position.id,
|
||||
positionName: position.positionName,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue