Commit graph

116 commits

Author SHA1 Message Date
harid
c26fb19c1c Linear Flow (ทดสอบเฉพาะคำสั่ง C-PM-01) #224
All checks were successful
Build & Deploy on Dev / build (push) Successful in 1m7s
2026-06-18 11:48:46 +07:00
84fd3fb9e5 comment เคลียร์ redis 2026-06-15 18:26:34 +07:00
82c94073ff test เผยแพร่ (2) 2026-06-15 11:32:01 +07:00
cf4c8a6388 Merge branch 'dev' into adiDev
All checks were successful
Build & Deploy on Dev / build (push) Successful in 1m9s
2026-06-15 10:59:28 +07:00
5c5fc08269 test เผยแพร่ 2026-06-15 10:58:56 +07:00
harid
03c57ddcce fix #251
All checks were successful
Build & Deploy on Dev / build (push) Successful in 1m11s
2026-06-12 15:01:14 +07:00
ea93a223b1 Merge branch 'develop' into adiDev 2026-06-12 11:32:02 +07:00
7c1a838600 comment code 2026-06-12 11:31:33 +07:00
harid
edb23dd1fe fix กรณีนั่งทับต้องปั๊มตำแหน่งติดตัวลงรายการประวัติคนครอง (เผยแพร่ใหญ่) #2564
All checks were successful
Build & Deploy on Dev / build (push) Successful in 1m4s
2026-06-12 10:51:56 +07:00
055e24273d #1584 test 2026-06-12 10:01:07 +07:00
af2bd5054f feat: clear menu and role cache when organization structure is published
Add Redis cache clearing to handler_org function to clear all menu_* and role_* keys
after successfully publishing organization structure changes. This ensures users
see updated permissions and menus immediately after publish.

- Add promisify import and Redis client setup
- Add clearMenuAndRoleCache helper function
- Call cache clearing before successful return

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-14 11:37:57 +07:00
6c1e4a1e42 Optimize handler_org batch writes
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-05 18:11:55 +07:00
750947f34f 1. เพิ่ม helper สำหรับ build clone rows จาก metadata ของ repository แล้ว pre-generate UUID ให้ parent และ child ล่วงหน้า
2. เปลี่ยน inner clone flow เป็น cloneEmployeeNodeBatch(...) ที่ทำงานเป็นชุด แทนการ save() parent แล้ว save() children ทีละรายการ
3. ใช้ insertInChunks(...) สำหรับ batch insert ของ parent rows และ EmployeePosition rows
4. ใช้ helper เดียวกันซ้ำทุกระดับของ tree (root, child1, child2, child3, child4) เพื่อลด code duplication และคง mapping ของ destination org ids ตาม logic เดิม
2026-05-05 16:38:54 +07:00
e7e4e2075b 1. รวม query_employeePosMaster กับ query_employeeTempPosMaster ให้ดึงแบบขนานด้วย Promise.all
2. ตัด full-table scan ของ ProfileEmployee ออก โดยเปลี่ยนจาก find({ select: ["id"] }) ทั้งตาราง มาเป็น query เฉพาะ current_holderId ที่อ้างถึงจริงในชุดข้อมูล publish
3. เก็บ normalization ของ _orgemployeePosMaster และ _orgemployeeTempPosMaster ไว้หลัง query ชุดเดียวกัน ทำให้ block นี้กระชับขึ้นและลด read cost ที่ไม่จำเป็น
2026-05-05 16:25:06 +07:00
b5c75379ff fixed error and not retry 2026-05-05 15:59:39 +07:00
3335c4f44c refactor transaction
All checks were successful
Build & Deploy on Dev / build (push) Successful in 1m2s
2026-05-05 12:32:21 +07:00
869bb093a3 refactor code function handler_org 2026-05-05 12:08:37 +07:00
fd7a2af0a1 rollback code handler_org
Some checks failed
Build & Deploy on Dev / build (push) Has been cancelled
2026-05-01 17:08:53 +07:00
ef279df452 fix handler_org error use temporary table
All checks were successful
Build & Deploy on Dev / build (push) Successful in 1m7s
2026-05-01 00:22:16 +07:00
7827e19254 fix handler_org and remove retry
All checks were successful
Build & Deploy on Dev / build (push) Successful in 1m10s
2026-05-01 00:03:39 +07:00
ac6b487d66 fix handler_org and add transaction
All checks were successful
Build & Deploy on Dev / build (push) Successful in 1m6s
2026-04-30 22:41:29 +07:00
b5e80ba1e9 fix error
All checks were successful
Build & Deploy on Dev / build (push) Successful in 1m31s
2026-04-30 20:15:37 +07:00
519fd97968 fix performance
All checks were successful
Build & Deploy on Dev / build (push) Successful in 1m2s
2026-04-30 16:35:00 +07:00
adisak
3ccdb691f6 log test publish
All checks were successful
Build & Deploy on Dev / build (push) Successful in 1m15s
2026-04-30 11:48:36 +07:00
d822626404 แก้ไข rabbitMQ เผยแพร่โครงสร้างค้าง
All checks were successful
Build & Deploy on Dev / build (push) Successful in 1m2s
2026-04-29 14:27:50 +07:00
f1c8ecf699 insert position to profile
All checks were successful
Build & Deploy on Dev / build (push) Successful in 1m8s
2026-04-20 16:01:38 +07:00
adisak
28b5408d5b #2427 and migration 2026-04-20 08:05:16 +07:00
adisak
38e5ed0e91 #2387 [กทม]. ระบบโครงสร้างอัตรากำลัง >> กรณีนั่งทับตำแหน่ง 2026-04-02 12:04:33 +07:00
4ec334f0d4 fix: cronjob publish fail
All checks were successful
Build & Deploy on Dev / build (push) Successful in 48s
2026-02-03 10:27:48 +07:00
8b46a2f0f2 #2166
All checks were successful
Build & Deploy on Dev / build (push) Successful in 51s
2026-02-02 09:25:13 +07:00
harid
78778e0eb0 test เพิ่มฟังก์ชั่นให้ยิงไประบบ exprofile #2190
All checks were successful
Build & Deploy on Dev / build (push) Successful in 59s
2026-01-23 17:32:11 +07:00
709a4e1ac6 fix: trim()
All checks were successful
Build & Deploy on Dev / build (push) Successful in 1m4s
2026-01-14 15:41:10 +07:00
harid
96a2d34c1f fix โคลนสิทธิ์เมนู task #2160
All checks were successful
Build & Deploy on Dev / build (push) Successful in 1m0s
2026-01-13 14:57:43 +07:00
7a25dc98aa fix: รักษาการแทนหายเมื่อเผยแพร่โครงสร้าง
All checks were successful
Build & Deploy on Dev / build (push) Successful in 1m2s
2026-01-13 10:59:55 +07:00
harid
f4be31ed08 test(4) #2160 2026-01-09 18:40:10 +07:00
harid
804ee8a639 test(3) #2160 2026-01-09 16:38:42 +07:00
harid
65789c6ac6 test(3) #2160 2026-01-09 16:37:24 +07:00
harid
9aea3cc88c test(2) #2160 2026-01-09 14:25:04 +07:00
harid
3f1aff32dd test #2160 2026-01-08 16:09:25 +07:00
harid
e8b1d29c43 แก้ออกคำสั่งแต่งตั้งคณะกรรม Noti ซ้ำ #1995 2025-12-01 14:56:31 +07:00
harid
4bdf1ad7b4 เฉพาะคำสั่ง C-PM-10 ให้ตัด profilesNotiRequest ที่ส่ง noti ครั้งแรกออก เพราะ UI ปิด Tab นี้ 2025-11-26 16:48:35 +07:00
harid
4ba71ff830 เฉพาะคำสั่ง C-PM-10 ให้ตัด receiverUserId ที่ส่ง noti ครั้งแรกออก #1995 2025-11-26 16:20:11 +07:00
e083cd4bce comment clear ตำแหน่งติดเงื่อนไข 2025-09-10 13:19:29 +07:00
Bright
35eec3a5f5 เพิ่มแนบไฟล์คำสั่งในรายการแจ้งเตือน #1784 2025-08-29 11:29:31 +07:00
mamoss
910e568973 history update position 2025-08-26 13:47:43 +07:00
mamoss
329f83a989 เผยแพร่โครงสร้าง 2025-08-22 12:26:00 +07:00
6f57be2fe9 validate draft and publish 2025-08-21 18:25:24 +07:00
cac73b483b fix 2025-08-18 11:29:56 +07:00
ce2114131d #1742 2025-08-18 09:48:41 +07:00
adisak
54a96ac7c9 #1393 2025-07-23 14:58:28 +07:00