fb4196cfa2
fix keycloak user & update isDelete
Build & Deploy on Dev / build (push) Successful in 1m1s
2026-04-02 16:32:29 +07:00
adisak
38e5ed0e91
#2387 [กทม]. ระบบโครงสร้างอัตรากำลัง >> กรณีนั่งทับตำแหน่ง
2026-04-02 12:04:33 +07:00
baa8496a69
refactor api act/{id}
Build & Deploy on Dev / build (push) Successful in 1m25s
2026-03-10 11:45:25 +07:00
2951630b7b
fix update prefix and profileId
Build & Deploy on Dev / build (push) Successful in 1m45s
2026-02-27 15:24:51 +07:00
harid
637e995915
Fix bug #54
Build & Deploy on Dev / build (push) Successful in 1m34s
2026-02-20 11:46:46 +07:00
8497e5df57
fix: case clear position all in draft to public to current
Build & Deploy on Dev / build (push) Successful in 1m34s
2026-02-19 16:29:36 +07:00
a80fe85032
fix: bug query
2026-02-19 15:41:49 +07:00
d555c70af9
fix: script insert
Build & Deploy on Dev / build (push) Successful in 1m23s
2026-02-12 18:18:29 +07:00
0f4bee4489
fix script
2026-02-12 18:06:46 +07:00
22fd9152bf
fix: new root
Build & Deploy on Dev / build (push) Successful in 1m19s
2026-02-12 17:10:44 +07:00
82ecf2cb81
fix: save posMasterHistory null
Build & Deploy on Dev / build (push) Successful in 1m19s
2026-02-12 14:06:07 +07:00
ef17236eb0
fix: bug save posMasterHistory, tuning performance script
2026-02-12 13:16:43 +07:00
13fa8cbf24
fix: script case nextholder id null
2026-02-12 11:53:24 +07:00
3c9e3a1bb6
fix: script org move draf to current save posMasterHistory
Build & Deploy on Dev / build (push) Successful in 1m57s
2026-02-12 10:38:16 +07:00
17760212d1
Merge branch 'feat/org-move-draf-current' into develop
...
Build & Deploy on Dev / build (push) Successful in 1m47s
* feat/org-move-draf-current:
fix time out
2026-02-11 13:11:10 +07:00
c5e600900c
fix time out
2026-02-11 13:10:42 +07:00
harid
5bee360280
add orgDnaId
Build & Deploy on Dev / build (push) Successful in 1m17s
2026-02-11 09:52:35 +07:00
harid
4f900ba4d2
no message
Build & Deploy on Dev / build (push) Successful in 1m20s
2026-02-11 09:47:45 +07:00
520b42f2c7
fix: script update profile
Build & Deploy on Dev / build (push) Successful in 1m10s
2026-02-10 17:43:01 +07:00
c344804936
Merge branch 'develop' into feat/org-move-draf-current
...
* develop:
Fix Script #2292
Fix Script #2292
comment ห้ามลบเจ้าหน้าที่ลำดับที่ 1 #2220
optimize sort #2260
2026-02-10 16:24:34 +07:00
3b97e52bd6
complete script move draf to current
2026-02-10 16:23:52 +07:00
harid
47f7f4d55e
optimize sort #2260
Build & Deploy on Dev / build (push) Successful in 52s
2026-02-09 17:50:53 +07:00
f9d626a499
add test, and fix script
2026-02-09 17:45:50 +07:00
638362df1c
feat: improve move-draft-to-current with differential sync
...
Implement differential sync for organization structure and positions
instead of delete-all-and-insert-all approach.
Changes:
- Add OrgIdMapping and AllOrgMappings interfaces for tracking ID mappings
- Implement syncOrgLevel() helper for differential sync per org level
- Add syncPositionsForPosMaster() helper for position table sync
- Process org levels bottom-up (Child4→Child3→Child2→Child1→Root)
- Use ancestorDNA matching with Like operator for descendant sync
- Cascade delete positions before deleting org nodes
- Batch DELETE/UPDATE/INSERT operations for better performance
- Track draft→current ID mappings for position updates
- Add comprehensive documentation in docs/move-draft-to-current.md
Benefits:
- Preserve IDs for unchanged nodes (better tracking)
- More efficient (fewer database operations)
- Better data integrity with proper FK handling
- Sync all descendants under given rootDnaId
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 12:35:59 +07:00
3177ffc42f
merge
2026-02-06 21:46:41 +07:00
528f8f75c1
add query
2026-02-06 16:50:31 +07:00
256296672d
privilege
Build & Deploy on Dev / build (push) Successful in 48s
2026-02-06 15:25:54 +07:00
77b545d392
fix child privilege
Build & Deploy on Dev / build (push) Successful in 48s
2026-02-06 15:12:52 +07:00
8a649086f7
fix : #2239
Build & Deploy on Dev / build (push) Successful in 48s
2026-02-06 14:55:59 +07:00
631d634074
#2239
Build & Deploy on Dev / build (push) Successful in 49s
2026-02-05 13:37:28 +07:00
d0241016fb
disciption
Build & Deploy on Dev / build (push) Successful in 1m3s
2026-02-05 11:45:10 +07:00
561dc7f66c
change method
2026-02-05 11:43:59 +07:00
39a07482cd
add api find dna by keycloak
Build & Deploy on Dev / build (push) Successful in 1m0s
2026-02-05 11:23:38 +07:00
1a324af483
fix: api /super-admin/{id} memory cache
2026-01-28 18:26:03 +07:00
7c70229579
fix: query use Promise all
2026-01-28 17:48:28 +07:00
5dcb59632f
fix: Api GET /super-admin/{id}
2026-01-28 17:43:26 +07:00
bca25a7a52
feat: optimize detailSuperAdmin API to fix database connection issue
...
ปัญหา: API GET /api/v1/org/super-admin/{id} ทำให้ระบบดับเพราะ N+1 queries
- เดิม: >1,000,000 queries (100 orgRoots × 10 children × 10 counts/level)
- ใหม่: ~10 queries (query รวมครั้งเดียว + 5 org queries)
การเปลี่ยนแปลง:
1. สร้าง OrganizationController-optimized.ts
- getPositionCounts(): query posMaster ทั้งหมดครั้งเดียว
- สร้าง maps (orgRootMap, orgChild1Map, etc.) สำหรับ lookup
- ลด queries จาก 1,000,000+ → ~10 queries
2. เพิ่ม import สำหรับ helper functions ใน OrganizationController.ts
- import { getPositionCounts, getCounts, getRootCounts }
- ต้อง replace ฟังก์ชัน detailSuperAdmin ด้วย optimized version
- ดู OPTIMIZED_FUNCTION.ts สำหรับฟังก์ชันใหม่
ไฟล์ที่เพิ่ม:
- src/controllers/OrganizationController-optimized.ts (helper functions)
- OPTIMIZED_FUNCTION.ts (optimized function reference)
- src/utils/log-memory-store.ts (from earlier log middleware fix)
หมายเหตุ: ฟังก์ชัน detailSuperAdmin ใน OrganizationController.ts
ยังไม่ถูก replace (ต้องทำ manual) - ดู OPTIMIZED_FUNCTION.ts
Co-Authored-By: Claude (glm-4.7) <noreply@anthropic.com>
2026-01-28 13:45:52 +07:00
mamoss
32e682d05e
search dna
2026-01-02 21:43:57 +07:00
mamoss
3a4e16deb0
add permission brother
2025-12-12 01:36:51 +07:00
mamoss
f814454003
update permission
2025-12-07 13:51:01 +07:00
AdisakKanthawilang
39a1a3bbb0
#1767 ( #205 )
release / release (push) Failing after 9s
2025-11-03 11:56:26 +07:00
f32debfbb6
test commit
2025-11-03 10:48:04 +07:00
04484444ec
owner privilege
2025-10-22 11:59:49 +07:00
ad3a04ad3f
Merge branch 'develop' into adiDev
2025-10-22 11:35:46 +07:00
35011ea959
#1893
2025-10-22 11:34:56 +07:00
42c8f34f15
fix script: retire remove from org
2025-10-21 10:12:23 +07:00
e59ccf88b3
fix: script create keycloak
2025-10-21 00:11:18 +07:00
2429159020
fix: send token in keycloak function & change script fix retire
2025-10-20 23:04:04 +07:00
AdisakKanthawilang
45cc074e81
update validate privilege ( #201 )
2025-10-20 17:45:43 +07:00
0d059f24ea
update validate สิทธิ์จัดการโครงสร้างในเมนูโครงสร้างอัตตรากำลัง
2025-10-17 17:38:54 +07:00