Skip to content

RTL right sidebar + Modern Classic ERP UI refresh (Arabic-first)#2

Draft
Copilot wants to merge 3 commits intomainfrom
copilot/update-ui-ux-modernization
Draft

RTL right sidebar + Modern Classic ERP UI refresh (Arabic-first)#2
Copilot wants to merge 3 commits intomainfrom
copilot/update-ui-ux-modernization

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 21, 2026

Win98-era styling replaced with a cohesive "Modern Classic ERP" aesthetic; full Arabic RTL layout corrected throughout, sidebar repositioned to the right.

Layout & RTL

  • Sidebar DOM order fixed: moved before #workspace so RTL flexbox places it on the right side natively
  • #main-layout explicitly uses direction: rtl + flex-direction: row
  • Title bar info (company / user) now laid out RTL with icon labels

CSS (erp.css)

  • Font: 'Cairo' (400/600/700) imported from Google Fonts; Tahoma / Arial Unicode MS as Arabic-safe fallbacks
  • Color palette: warm off-white backgrounds (#e2dfd8/#ece9e2), deep navy accent (#1a3a6a) replacing flat Win98 gray
  • Sidebar buttons: active state (navy fill + white text), section labels grouping nav items, hover → light blue
  • MDI window chrome: richer title gradient, focused/unfocused distinction, maximized CSS class; maximize button icon toggles
  • Resize handle corrected to bottom-right + se-resize cursor for RTL
  • Stats boxes: larger values, hover lift; table cells: better padding and header weight
  • Firefox scrollbar support added (scrollbar-width: thin; scrollbar-color)
  • Responsive breakpoints: sidebar hides <650px, stats grid collapses to 2-col at <900px

JS (erp.js)

  • setSidebarActive(winId) + SIDEBAR_BTN_MAP: marks the matching sidebar button active whenever a window receives focus
  • filterJournals(): client-side journal list filtering by free-text + status dropdown (was referenced in UI but unimplemented)
  • openJournalEdit(id): edit mode for draft journal entries (also previously unimplemented)
  • mapEntryLinesToJeLines(): extracted helper eliminating duplicated line-mapping logic in the edit form

PHP views

  • $displayName extracted in main.php to avoid duplicated $user['full_name'] ?? $user['username'] expression
  • Login page: Google Fonts added, wider box (380px), cleaner footer
Original prompt

Update the repository moded12/acc3 with a focused UI/UX modernization pass and small functional improvements on the latest repository state. The user has already updated the repository to the latest version and wants the changes applied now in the repo via PR.

Primary requested changes:

  1. Fix Arabic display and full RTL behavior.
  2. Move the sidebar/navigation to the RIGHT side.
  3. Improve the interface to look more beautiful, modern, and contemporary while preserving the same overall layout and interaction model.
  4. Preserve the existing ERP desktop metaphor and internal window/workspace behavior rather than replacing it with a completely different layout.
  5. While implementing, add any important small functional enhancements that enrich the script/product.

Design direction to implement:

  • Keep the current classic ERP structure: top header/menu, right sidebar, central MDI/workspace, internal draggable/floating windows where applicable.
  • Shift from very dated Win98 styling to a “Modern Classic ERP” aesthetic.
  • Full Arabic RTL alignment throughout layouts, navigation, headers, windows, tables, and content.
  • Use a cleaner Arabic-friendly font stack (prefer Tajawal or Cairo with Tahoma fallback) if feasible in repo assets.
  • Refine colors, spacing, shadows, borders, window chrome, action buttons, active states, and hover states.
  • Keep the UI business-like and professional, not Tailwind-card SaaS style.

Functional/UI enrichment ideas to implement where appropriate without destabilizing the app:

  • Highlight active page/menu item in top nav and sidebar.
  • Improve header info layout for company/user/version in RTL.
  • Add better focus/hover/selected states.
  • Improve default internal window sizing/placement behavior if code permits.
  • Add a maximize/restore affordance for windows if simple and safe.
  • Improve breadcrumbs/title context inside windows where possible.
  • Improve table readability and stats boxes on dashboard.
  • Apply responsive improvements for narrower screens without redesigning the whole app.

Implementation requirements:

  • Work directly in moded12/acc3.
  • Inspect the latest code and adapt to actual files/structure present.
  • Make cohesive production-ready changes, not placeholders.
  • Preserve existing PHP app behavior.
  • Create a pull request with the updates.

Please generate a concise PR title describing RTL + right sidebar + modernized ERP UI refresh.

The following is the prior conversation context from the user's chat exploration (may be truncated):

User: Access denied.

Assistant: المشكلة واضحة: التثبيت محمي بتوكن، ولذلك ظهور Access denied. طبيعي، والجداول غير موجودة فعلًا كما ظهر في phpMyAdmin.

افتح هذا الرابط بالضبط:

https://www.shneler.com/20/acc3/install.php?token=acc3_install_2025

لأن ملف install.php يحتوي هذا الشرط:

$provided = $_GET['token'] ?? '';
if (!$provided || hash('sha256', $provided) !== $TOKEN_HASH) {
    http_response_code(403);
    exit('Access denied.');
}

يعني بدون ?token=acc3_install_2025 سيمنعك.

بعد فتح الرابط:

  • إذا كانت إعدادات قاعدة البيانات صحيحة، سيتم إنشاء الجداول داخل قاعدة acc3
  • بعدها ادخل إلى:
https://www.shneler.com/20/acc3/

إذا ظهر خطأ قاعدة بيانات بعد التوكن:

أرسل لي محتوى الملف:

  • config/database.php

لأن الخطوة التالية غالبًا ستكون تصحيح الاتصال.

بعد نجاح التثبيت:

  1. احذف install.php
  2. ادخل بحساب:
    • username: admin
    • password: admin123

إذا أردت، بعد ما تشغّل الرابط بالتوكن، أستطيع أخبرك كيف تتأكد أن كل الجداول الأساسية انشأت بشكل صحيح.

User: Database Error: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'acc3.users' doesn't exist

Assistant: الخطأ يعني أن ملف schema.sql لم يُنشئ جدول users أصلًا أو لم يُنفَّذ بشكل صحيح، ثم وصل السكربت لهذا السطر:

$pdo->prepare('UPDATE users SET password_hash = ? WHERE username = ? AND tenant_id = 1')

ففشل لأن الجدول غير موجود.

ماذا تعمل الآن

افتح هذا الملف وأرسل محتواه:

  • config/schema.sql

لأن هذا هو الملف المسؤول عن إنشاء الجداول.


التشخيص الأقرب

يوجد واحد من هذه الأسباب:

  1. config/schema.sql مفقود أو فارغ
  2. الملف موجود لكن صيغة SQL فيه فيها خطأ مبكر فمنع إنشاء الجداول
  3. طريقة تقسيم الأوامر في install.php بواسطة explode(';', $sql) كسرت أوامر SQL
  4. الجدول users اسمه مختلف داخل schema.sql
  5. يوجد ترتيب خاطئ في العلاقات الأجنبية فأفشل الإنشاء من البداية

حل سريع مؤقت لتشخيص أوضح

عدّل install.php مؤقتًا حتى لا يتوقف مباشرة عند users، واجعل الفحص قبل تحديث المستخدم.

استبدل هذا الجزء:

// Update admin password hash
$hash = password_hash('admin123', PASSWORD_BCRYPT, ['cost' => 12]);
$pdo->prepare('UPDATE users SET password_hash = ? WHERE username = ? AND tenant_id = 1')
    ->execute([$hash, 'admin']);

بهذا:

// Update admin password hash only if users table exists
$check = $pdo->query("SHOW TABLES LIKE 'users'")->fetch();

if ($check) {
    $hash = password_hash('admin123', PASSWORD_BCRYPT, ['cost' => 12]);
    $pdo->p...

</details>



<!-- START COPILOT CODING AGENT SUFFIX -->

*This pull request was created from Copilot chat.*
>

Copilot AI and others added 2 commits April 21, 2026 05:57
…sic aesthetic, active states, functional improvements

Agent-Logs-Url: https://github.com/moded12/acc3/sessions/a30a9a3b-b08b-42e9-9d48-0ecc7a0ca4f9

Co-authored-by: moded12 <162719285+moded12@users.noreply.github.com>
…x scrollbar support

Agent-Logs-Url: https://github.com/moded12/acc3/sessions/a30a9a3b-b08b-42e9-9d48-0ecc7a0ca4f9

Co-authored-by: moded12 <162719285+moded12@users.noreply.github.com>
Copilot AI changed the title [WIP] Update UI/UX with focused modernization and improvements RTL right sidebar + Modern Classic ERP UI refresh (Arabic-first) Apr 21, 2026
Copilot AI requested a review from moded12 April 21, 2026 06:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants