add log check isSelected in position
Some checks failed
Build & Deploy on Dev / build (push) Failing after 39s

This commit is contained in:
Warunee Tamkoo 2026-05-23 00:23:55 +07:00
parent 0c7c8e9fd3
commit e0f2513ba4
3 changed files with 67 additions and 6 deletions

View file

@ -751,4 +751,23 @@ export function resolveNodeId(data: any) {
data.rootDnaId ??
null
);
}
export function logPositionIsSelectedChange(
positionId: string,
oldValue: boolean,
newValue: boolean,
context: {
posMasterId?: string;
userId?: string;
endpoint?: string;
action?: string;
}
) {
if (oldValue !== newValue) {
console.log(`[positionIsSelected-DEBUG] Position ${positionId}: ${oldValue} -> ${newValue}`, {
...context,
timestamp: new Date().toISOString(),
});
}
}