ฉ
This commit is contained in:
parent
a47f07110a
commit
bb79b0a3d0
3 changed files with 25 additions and 2 deletions
|
|
@ -121,6 +121,7 @@ export class PositionController extends Controller {
|
|||
posExecutiveId: String(posDict.posExecutiveId),
|
||||
posDictExecutiveField: posDict.posDictExecutiveField,
|
||||
posDictArea: posDict.posDictArea,
|
||||
isSpacial: posDict.isSpacial
|
||||
},
|
||||
});
|
||||
if (rowRepeated) {
|
||||
|
|
@ -268,6 +269,7 @@ export class PositionController extends Controller {
|
|||
posExecutiveName: item.posExecutive == null ? null : item.posExecutive.posExecutiveName,
|
||||
positionExecutiveField: item.posDictExecutiveField,
|
||||
positionArea: item.posDictArea,
|
||||
isSpacial: item.isSpacial,
|
||||
positionIsSelected: false,
|
||||
};
|
||||
}),
|
||||
|
|
@ -359,9 +361,7 @@ export class PositionController extends Controller {
|
|||
const dataDup: any = await this.posMasterRepository.findOne({
|
||||
where: {
|
||||
orgChild4Id: orgChild4.id,
|
||||
posMasterNoPrefix: requestBody.posMasterNoPrefix,
|
||||
posMasterNo: requestBody.posMasterNo,
|
||||
posMasterNoSuffix: requestBody.posMasterNoSuffix,
|
||||
},
|
||||
});
|
||||
if (dataDup != null)
|
||||
|
|
@ -530,6 +530,7 @@ export class PositionController extends Controller {
|
|||
position.posExecutiveId = x.posExecutiveId;
|
||||
position.positionExecutiveField = x.posDictExecutiveField;
|
||||
position.positionArea = x.posDictArea;
|
||||
position.isSpacial = x.isSpacial;
|
||||
position.positionIsSelected = false;
|
||||
position.posMasterId = posMaster.id;
|
||||
position.createdUserId = request.user.sub;
|
||||
|
|
@ -746,6 +747,7 @@ export class PositionController extends Controller {
|
|||
position.posExecutiveId = x.posExecutiveId;
|
||||
position.positionExecutiveField = x.posDictExecutiveField;
|
||||
position.positionArea = x.posDictArea;
|
||||
position.isSpacial = x.isSpacial;
|
||||
position.positionIsSelected = false;
|
||||
position.posMasterId = posMaster.id;
|
||||
position.createdUserId = request.user.sub;
|
||||
|
|
@ -796,6 +798,7 @@ export class PositionController extends Controller {
|
|||
positionExecutiveField: position.positionExecutiveField,
|
||||
positionArea: position.positionArea,
|
||||
positionIsSelected: position.positionIsSelected,
|
||||
isSpacial: position.isSpacial,
|
||||
})),
|
||||
};
|
||||
return new HttpSuccess(formattedData);
|
||||
|
|
@ -1139,6 +1142,7 @@ export class PositionController extends Controller {
|
|||
positionExecutiveField: position.positionExecutiveField,
|
||||
positionArea: position.positionArea,
|
||||
positionIsSelected: position.positionIsSelected,
|
||||
isSpacial: position.isSpacial,
|
||||
})),
|
||||
};
|
||||
}),
|
||||
|
|
@ -2282,6 +2286,7 @@ export class PositionController extends Controller {
|
|||
positionExecutiveField: position.positionExecutiveField,
|
||||
positionArea: position.positionArea,
|
||||
positionIsSelected: position.positionIsSelected,
|
||||
isSpacial: position.isSpacial,
|
||||
})),
|
||||
};
|
||||
}),
|
||||
|
|
|
|||
|
|
@ -58,6 +58,12 @@ export class PosDict extends EntityBase {
|
|||
})
|
||||
posDictArea: string;
|
||||
|
||||
@Column({
|
||||
comment: "ฉ",
|
||||
default: false,
|
||||
})
|
||||
isSpacial: boolean;
|
||||
|
||||
@ManyToOne(() => PosExecutive, (posExecutive) => posExecutive)
|
||||
@JoinColumn({ name: "posExecutiveId" })
|
||||
posExecutive: PosExecutive;
|
||||
|
|
@ -92,6 +98,9 @@ export class CreatePosDict {
|
|||
|
||||
@Column()
|
||||
posDictArea: string | null;
|
||||
|
||||
@Column()
|
||||
isSpacial: boolean;
|
||||
}
|
||||
|
||||
export type UpdatePosDict = Partial<CreatePosDict>;
|
||||
|
|
|
|||
|
|
@ -71,6 +71,12 @@ export class Position extends EntityBase {
|
|||
})
|
||||
posMasterId: string;
|
||||
|
||||
@Column({
|
||||
comment: "ฉ",
|
||||
default: false,
|
||||
})
|
||||
isSpacial: boolean;
|
||||
|
||||
@ManyToOne(() => PosMaster, (posMaster) => posMaster)
|
||||
@JoinColumn({ name: "posMasterId" })
|
||||
posMaster: PosMaster;
|
||||
|
|
@ -108,6 +114,9 @@ export class CreatePosition {
|
|||
|
||||
@Column()
|
||||
positionArea: string;
|
||||
|
||||
@Column()
|
||||
isSpacial: boolean;
|
||||
}
|
||||
|
||||
export type UpdatePosition = Partial<CreatePosition>;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue