This commit is contained in:
parent
e0f2513ba4
commit
61a09acbad
1 changed files with 5 additions and 5 deletions
|
|
@ -3754,7 +3754,7 @@ export class CommandController extends Controller {
|
||||||
if (positionOld != null) {
|
if (positionOld != null) {
|
||||||
logPositionIsSelectedChange(positionOld.id, positionOld.positionIsSelected, false, {
|
logPositionIsSelectedChange(positionOld.id, positionOld.positionIsSelected, false, {
|
||||||
posMasterId: posMasterOld?.id,
|
posMasterId: posMasterOld?.id,
|
||||||
userId: request.user.sub,
|
userId: req.user.sub,
|
||||||
endpoint: "updateMaster",
|
endpoint: "updateMaster",
|
||||||
action: "command_change_reset_old_position",
|
action: "command_change_reset_old_position",
|
||||||
});
|
});
|
||||||
|
|
@ -3765,19 +3765,19 @@ export class CommandController extends Controller {
|
||||||
|
|
||||||
const checkPosition = await this.positionRepository.find({
|
const checkPosition = await this.positionRepository.find({
|
||||||
where: {
|
where: {
|
||||||
posMasterId: posMaster.id, // ใช้ posMaster ตัวใหม่ (ที่อาจจะเปลี่ยนจาก ancestorDNA)
|
posMasterId: posMaster!.id, // ใช้ posMaster ตัวใหม่ (ที่อาจจะเปลี่ยนจาก ancestorDNA)
|
||||||
positionIsSelected: true,
|
positionIsSelected: true,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
if (checkPosition.length > 0) {
|
if (checkPosition.length > 0) {
|
||||||
console.log(
|
console.log(
|
||||||
`[positionIsSelected-DEBUG] Command change: clearing ${checkPosition.length} positions (posMasterId: ${posMaster.id}, userId: ${request.user.sub}, endpoint: updateMaster)`
|
`[positionIsSelected-DEBUG] Command change: clearing ${checkPosition.length} positions (posMasterId: ${posMaster!.id}, userId: ${req.user.sub}, endpoint: updateMaster)`
|
||||||
);
|
);
|
||||||
|
|
||||||
const clearPosition = checkPosition.map((positions) => {
|
const clearPosition = checkPosition.map((positions) => {
|
||||||
logPositionIsSelectedChange(positions.id, positions.positionIsSelected, false, {
|
logPositionIsSelectedChange(positions.id, positions.positionIsSelected, false, {
|
||||||
posMasterId: posMaster.id,
|
posMasterId: posMaster!.id,
|
||||||
userId: request.user.sub,
|
userId: req.user.sub,
|
||||||
endpoint: "updateMaster",
|
endpoint: "updateMaster",
|
||||||
action: "command_change_clear_positions",
|
action: "command_change_clear_positions",
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue