**Problem with previous PR #5369:** The merged PR had WRONG logic that allowed buttons to become editable when user clicks 'Edit' on confirmed/posted records. **Previous WRONG Logic:** ```javascript var isReadonly = currentData.state !== 'draft' || self.mode === 'readonly'; // ❌ If mode='edit' AND state!='draft' → buttons become clickable! ``` **New CORRECT Logic:** ```javascript var isDraftState = currentData.state === 'draft'; // ✅ Buttons ONLY work if state='draft', regardless of form mode ``` **Key Change:** - ❌ OLD: Check both state AND mode → allows editing in non-draft states - ✅ NEW: Check ONLY state → readonly in ALL non-draft states **User Requirement:** الأزرار تكون للقراءة فقط في جميع الحالات ما عدا draft فقط، حتى لو عملت تحرير للسجل. **Behavior Now:** - draft state → Buttons work ✅ - confirmed/posted + readonly mode → Buttons disabled ✅ - confirmed/posted + edit mode → Buttons REMAIN disabled ✅ (FIXED!) This is the correct implementation that meets the exact requirement. Synced with latest dev_odex25_ensan on Wed Nov 12 03:58:56 +03 2025 |
||
|---|---|---|
| .github/workflows | ||
| odex25_ensan | ||
| .gitignore | ||
| README.md | ||
README.md
odex25-standard-modules
This Repo contains general standard modules for all projects.