Merge branch 'develop' into adiDev

This commit is contained in:
AdisakKanthawilang 2025-03-19 10:53:00 +07:00
commit 319d5ea683
7 changed files with 39 additions and 21 deletions

View file

@ -1274,13 +1274,13 @@ async function handler_org_draft(msg: amqp.ConsumeMessage): Promise<boolean> {
await posMasterRepository.save(posMaster);
// Copy assignments
item.posMasterAssigns = item.posMasterAssigns.map(
posMaster.posMasterAssigns = item.posMasterAssigns.map(
({ id, ...rest }: PosMasterAssign) => ({
...rest,
posMasterId: posMaster.id,
}),
);
posMaster.posMasterAssigns = item.posMasterAssigns;
await posMasterRepository.save(posMaster);
// Create positions
for await (const pos of item.positions) {
@ -1365,13 +1365,13 @@ async function handler_org_draft(msg: amqp.ConsumeMessage): Promise<boolean> {
await posMasterRepository.save(posMaster);
// Copy assignments
item.posMasterAssigns = item.posMasterAssigns.map(
posMaster.posMasterAssigns = item.posMasterAssigns.map(
({ id, ...rest }: PosMasterAssign) => ({
...rest,
posMasterId: posMaster.id,
}),
);
posMaster.posMasterAssigns = item.posMasterAssigns;
await posMasterRepository.save(posMaster);
// Create positions
for await (const pos of item.positions) {
@ -1464,6 +1464,7 @@ async function handler_org_draft(msg: amqp.ConsumeMessage): Promise<boolean> {
posMasterId: posMaster.id,
}),
);
await posMasterRepository.save(posMaster);
// Create positions
for await (const pos of item.positions) {
@ -1558,6 +1559,7 @@ async function handler_org_draft(msg: amqp.ConsumeMessage): Promise<boolean> {
posMasterId: posMaster.id,
}),
);
await posMasterRepository.save(posMaster);
// Create positions
for await (const pos of item.positions) {
@ -1655,6 +1657,7 @@ async function handler_org_draft(msg: amqp.ConsumeMessage): Promise<boolean> {
posMasterId: posMaster.id,
}),
);
await posMasterRepository.save(posMaster);
// Create positions
for await (const pos of item.positions) {