Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
Clubphp
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
Clubphp
Commits
4372c4e4
Commit
4372c4e4
authored
Apr 11, 2026
by
Mahmoud Aglan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dfgjdfhjh
parent
de5cfc33
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
81 additions
and
48 deletions
+81
-48
settings.local.json
.claude/settings.local.json
+3
-1
sidebar.php
app/Shared/Components/sidebar.php
+36
-6
main.php
app/Shared/Layout/main.php
+40
-14
app.js
public/assets/js/app.js
+2
-27
No files found.
.claude/settings.local.json
View file @
4372c4e4
{
{
"permissions"
:
{
"permissions"
:
{
"allow"
:
[
"allow"
:
[
"Bash(wc -l /Users/mahmoudaglan/clubphp/app/Core/*.php)"
"Bash(wc -l /Users/mahmoudaglan/clubphp/app/Core/*.php)"
,
"Bash(grep -r
\"
icon
\"
/Users/mahmoudaglan/clubphp/app/Modules/*/bootstrap.php)"
,
"Bash(grep -h
\"
'icon'
\"
/Users/mahmoudaglan/clubphp/app/Modules/*/bootstrap.php)"
]
]
}
}
}
}
app/Shared/Components/sidebar.php
View file @
4372c4e4
...
@@ -10,7 +10,7 @@ use App\Core\Registries\MenuRegistry;
...
@@ -10,7 +10,7 @@ use App\Core\Registries\MenuRegistry;
$currentPath
=
parse_url
(
$_SERVER
[
'REQUEST_URI'
]
??
'/'
,
PHP_URL_PATH
);
$currentPath
=
parse_url
(
$_SERVER
[
'REQUEST_URI'
]
??
'/'
,
PHP_URL_PATH
);
$employee
=
App
::
getInstance
()
->
currentEmployee
();
$employee
=
App
::
getInstance
()
->
currentEmployee
();
// Icon name → Lucide icon mapping
// Icon name → Lucide icon mapping
(includes legacy names, short names, and emoji fallbacks)
$iconMap
=
[
$iconMap
=
[
'dashboard'
=>
'layout-dashboard'
,
'tachometer-alt'
=>
'gauge'
,
'home'
=>
'home'
,
'dashboard'
=>
'layout-dashboard'
,
'tachometer-alt'
=>
'gauge'
,
'home'
=>
'home'
,
'users'
=>
'users'
,
'user'
=>
'user'
,
'user-plus'
=>
'user-plus'
,
'user-clock'
=>
'user-cog'
,
'users'
=>
'users'
,
'user'
=>
'user'
,
'user-plus'
=>
'user-plus'
,
'user-clock'
=>
'user-cog'
,
...
@@ -21,14 +21,15 @@ $iconMap = [
...
@@ -21,14 +21,15 @@ $iconMap = [
'credit-card'
=>
'credit-card'
,
'receipt'
=>
'receipt'
,
'coins'
=>
'coins'
,
'credit-card'
=>
'credit-card'
,
'receipt'
=>
'receipt'
,
'coins'
=>
'coins'
,
'file-invoice-dollar'
=>
'file-text'
,
'hand-holding-usd'
=>
'hand-coins'
,
'file-invoice-dollar'
=>
'file-text'
,
'hand-holding-usd'
=>
'hand-coins'
,
'exchange-alt'
=>
'arrow-left-right'
,
'random'
=>
'shuffle'
,
'transfer'
=>
'arrow-left-right'
,
'exchange-alt'
=>
'arrow-left-right'
,
'random'
=>
'shuffle'
,
'transfer'
=>
'arrow-left-right'
,
'swap'
=>
'arrow-left-right'
,
'gavel'
=>
'gavel'
,
'balance-scale'
=>
'scale'
,
'exclamation-triangle'
=>
'alert-triangle'
,
'gavel'
=>
'gavel'
,
'balance-scale'
=>
'scale'
,
'exclamation-triangle'
=>
'alert-triangle'
,
'alert'
=>
'alert-triangle'
,
'warning'
=>
'alert-triangle'
,
'ban'
=>
'ban'
,
'alert'
=>
'alert-triangle'
,
'warning'
=>
'alert-triangle'
,
'ban'
=>
'ban'
,
'trophy'
=>
'trophy'
,
'medal'
=>
'medal'
,
'award'
=>
'award'
,
'star'
=>
'star'
,
'trophy'
=>
'trophy'
,
'medal'
=>
'medal'
,
'award'
=>
'award'
,
'star'
=>
'star'
,
'globe'
=>
'globe'
,
'globe-americas'
=>
'globe-2'
,
'flag'
=>
'flag'
,
'globe'
=>
'globe'
,
'globe-americas'
=>
'globe-2'
,
'flag'
=>
'flag'
,
'id-card'
=>
'id-card'
,
'address-card'
=>
'contact'
,
'qrcode'
=>
'qr-code'
,
'id-card'
=>
'id-card'
,
'address-card'
=>
'contact'
,
'qrcode'
=>
'qr-code'
,
'file'
=>
'f
older
'
,
'folder'
=>
'folder'
,
'folder-open'
=>
'folder-open'
,
'file'
=>
'f
ile-text
'
,
'folder'
=>
'folder'
,
'folder-open'
=>
'folder-open'
,
'sms'
=>
'smartphone'
,
'envelope'
=>
'mail'
,
'bell'
=>
'bell'
,
'comment'
=>
'message-circle'
,
'sms'
=>
'smartphone'
,
'envelope'
=>
'mail'
,
'bell'
=>
'bell'
,
'comment'
=>
'message-circle'
,
'chart-bar'
=>
'bar-chart-3'
,
'chart-line'
=>
'trending-up'
,
'chart-pie'
=>
'pie-chart'
,
'chart
'
=>
'bar-chart-3'
,
'chart
-bar'
=>
'bar-chart-3'
,
'chart-line'
=>
'trending-up'
,
'chart-pie'
=>
'pie-chart'
,
'cog'
=>
'settings'
,
'cogs'
=>
'settings-2'
,
'wrench'
=>
'wrench'
,
'tools'
=>
'wrench'
,
'cog'
=>
'settings'
,
'cogs'
=>
'settings-2'
,
'wrench'
=>
'wrench'
,
'tools'
=>
'wrench'
,
'sliders-h'
=>
'sliders-horizontal'
,
'settings'
=>
'settings'
,
'sliders-h'
=>
'sliders-horizontal'
,
'settings'
=>
'settings'
,
'shield-alt'
=>
'shield'
,
'lock'
=>
'lock'
,
'key'
=>
'key-round'
,
'shield-alt'
=>
'shield'
,
'lock'
=>
'lock'
,
'key'
=>
'key-round'
,
...
@@ -43,15 +44,44 @@ $iconMap = [
...
@@ -43,15 +44,44 @@ $iconMap = [
'dollar-sign'
=>
'circle-dollar-sign'
,
'percentage'
=>
'percent'
,
'dollar-sign'
=>
'circle-dollar-sign'
,
'percentage'
=>
'percent'
,
'swimming-pool'
=>
'waves'
,
'running'
=>
'activity'
,
'futbol'
=>
'trophy'
,
'swimming-pool'
=>
'waves'
,
'running'
=>
'activity'
,
'futbol'
=>
'trophy'
,
'sun'
=>
'sun'
,
'umbrella-beach'
=>
'umbrella'
,
'sun'
=>
'sun'
,
'umbrella-beach'
=>
'umbrella'
,
// Emoji → Lucide fallbacks (some modules still register emojis)
'📊'
=>
'layout-dashboard'
,
'🏠'
=>
'home'
,
'👥'
=>
'users'
,
'👤'
=>
'user'
,
'⏰'
=>
'clock'
,
'👔'
=>
'briefcase'
,
'🛡️'
=>
'shield-check'
,
'📋'
=>
'clipboard-list'
,
'📄'
=>
'file-text'
,
'📅'
=>
'calendar'
,
'✅'
=>
'check-circle'
,
'💰'
=>
'banknote'
,
'💳'
=>
'wallet'
,
'🧾'
=>
'receipt'
,
'🪙'
=>
'coins'
,
'💲'
=>
'circle-dollar-sign'
,
'🔀'
=>
'arrow-left-right'
,
'⚖️'
=>
'scale'
,
'⚠️'
=>
'alert-triangle'
,
'🚫'
=>
'ban'
,
'🏆'
=>
'trophy'
,
'🏅'
=>
'medal'
,
'🎖️'
=>
'award'
,
'⭐'
=>
'star'
,
'🌍'
=>
'globe'
,
'🌎'
=>
'globe'
,
'🏳️'
=>
'flag'
,
'🪪'
=>
'id-card'
,
'📱'
=>
'smartphone'
,
'📁'
=>
'folder'
,
'📂'
=>
'folder-open'
,
'✉️'
=>
'mail'
,
'🔔'
=>
'bell'
,
'💬'
=>
'message-circle'
,
'📈'
=>
'trending-up'
,
'⚙️'
=>
'settings'
,
'🔧'
=>
'wrench'
,
'🛠️'
=>
'wrench'
,
'🔐'
=>
'shield'
,
'🔒'
=>
'lock'
,
'🔑'
=>
'key-round'
,
'🏢'
=>
'building-2'
,
'🏙️'
=>
'building'
,
'🏪'
=>
'store'
,
'📖'
=>
'book-open'
,
'📜'
=>
'history'
,
'🗄️'
=>
'archive'
,
'🔄'
=>
'refresh-cw'
,
'❤️'
=>
'heart'
,
'💓'
=>
'heart-pulse'
,
'✝️'
=>
'cross'
,
'💍'
=>
'gem'
,
'👶'
=>
'baby'
,
'👦'
=>
'user'
,
'👨👩👧👦'
=>
'users'
,
'🖨️'
=>
'printer'
,
'🔍'
=>
'search'
,
'➕'
=>
'plus'
,
'✏️'
=>
'pencil'
,
'🗑️'
=>
'trash-2'
,
'❌'
=>
'x'
,
'💹'
=>
'percent'
,
'🏊'
=>
'waves'
,
'🏃'
=>
'activity'
,
'⚽'
=>
'trophy'
,
'☀️'
=>
'sun'
,
'🏖️'
=>
'umbrella'
,
'📌'
=>
'circle'
,
];
];
$getIcon
=
function
(
?
string
$icon
)
use
(
$iconMap
)
:
string
{
$getIcon
=
function
(
?
string
$icon
)
use
(
$iconMap
)
:
string
{
if
(
$icon
===
null
||
$icon
===
''
)
return
'circle'
;
if
(
$icon
===
null
||
$icon
===
''
)
return
'circle'
;
//
If it's already a lucide icon name (contains hyphen or is a known name
)
//
Direct lookup (handles both text keys and emoji keys
)
if
(
isset
(
$iconMap
[
$icon
]))
return
$iconMap
[
$icon
];
if
(
isset
(
$iconMap
[
$icon
]))
return
$iconMap
[
$icon
];
$lower
=
strtolower
(
$icon
);
$lower
=
strtolower
(
$icon
);
if
(
isset
(
$iconMap
[
$lower
]))
return
$iconMap
[
$lower
];
if
(
isset
(
$iconMap
[
$lower
]))
return
$iconMap
[
$lower
];
// Check if it looks like
it might already be a lucide icon name
// Check if it looks like
a valid Lucide icon name already
if
(
preg_match
(
'/^[a-z][a-z0-9-]+$/'
,
$lower
))
return
$lower
;
if
(
preg_match
(
'/^[a-z][a-z0-9-]+$/'
,
$lower
))
return
$lower
;
return
'circle'
;
return
'circle'
;
};
};
...
@@ -161,7 +191,7 @@ if (empty($menuItems)) {
...
@@ -161,7 +191,7 @@ if (empty($menuItems)) {
<span
class=
"sidebar-text"
>
<?=
e
(
$item
[
'label_ar'
])
?>
</span>
<span
class=
"sidebar-text"
>
<?=
e
(
$item
[
'label_ar'
])
?>
</span>
<span
class=
"sidebar-arrow"
><i
data-lucide=
"chevron-down"
></i></span>
<span
class=
"sidebar-arrow"
><i
data-lucide=
"chevron-down"
></i></span>
</a>
</a>
<ul
class=
"sidebar-submenu"
style=
"display:
<?=
$isOpen
?
'block'
:
'none'
?>
;
<?=
$isOpen
?
''
:
'max-height:0;overflow:hidden;'
?>
"
>
<ul
class=
"sidebar-submenu"
<?=
$isOpen
?
''
:
' style="display:none;"'
?>
>
<?php
foreach
(
$visibleChildren
as
$child
)
:
?>
<?php
foreach
(
$visibleChildren
as
$child
)
:
?>
<?php
$childRoute
=
$child
[
'route'
]
??
'#'
;
?>
<?php
$childRoute
=
$child
[
'route'
]
??
'#'
;
?>
<li>
<li>
...
...
app/Shared/Layout/main.php
View file @
4372c4e4
...
@@ -127,20 +127,46 @@ function closeSidebar() {
...
@@ -127,20 +127,46 @@ function closeSidebar() {
function
toggleSubmenu
(
el
)
{
function
toggleSubmenu
(
el
)
{
var
parent
=
el
.
parentElement
;
var
parent
=
el
.
parentElement
;
var
submenu
=
parent
.
querySelector
(
'.sidebar-submenu'
);
var
submenu
=
parent
.
querySelector
(
'.sidebar-submenu'
);
if
(
submenu
)
{
if
(
!
submenu
)
return
;
var
isOpen
=
parent
.
classList
.
contains
(
'open'
);
var
isOpen
=
parent
.
classList
.
contains
(
'open'
);
parent
.
classList
.
toggle
(
'open'
,
!
isOpen
);
if
(
!
isOpen
)
{
if
(
!
isOpen
)
{
submenu
.
style
.
maxHeight
=
submenu
.
scrollHeight
+
'px'
;
// Opening: show first, then animate height
submenu
.
style
.
display
=
'block'
;
submenu
.
style
.
display
=
'block'
;
submenu
.
style
.
overflow
=
'hidden'
;
submenu
.
style
.
maxHeight
=
'0px'
;
// Force reflow so the browser registers the 0 height
submenu
.
offsetHeight
;
submenu
.
style
.
transition
=
'max-height 0.3s cubic-bezier(0.16, 1, 0.3, 1)'
;
submenu
.
style
.
maxHeight
=
submenu
.
scrollHeight
+
'px'
;
parent
.
classList
.
add
(
'open'
);
// Clean up after transition
submenu
.
addEventListener
(
'transitionend'
,
function
handler
()
{
submenu
.
removeEventListener
(
'transitionend'
,
handler
);
if
(
parent
.
classList
.
contains
(
'open'
))
{
submenu
.
style
.
maxHeight
=
''
;
submenu
.
style
.
overflow
=
''
;
submenu
.
style
.
transition
=
''
;
}
});
}
else
{
}
else
{
submenu
.
style
.
maxHeight
=
'0'
;
// Closing: set explicit height first, then animate to 0
setTimeout
(
function
()
{
submenu
.
style
.
overflow
=
'hidden'
;
submenu
.
style
.
maxHeight
=
submenu
.
scrollHeight
+
'px'
;
submenu
.
offsetHeight
;
submenu
.
style
.
transition
=
'max-height 0.25s ease'
;
submenu
.
style
.
maxHeight
=
'0px'
;
parent
.
classList
.
remove
(
'open'
);
submenu
.
addEventListener
(
'transitionend'
,
function
handler
()
{
submenu
.
removeEventListener
(
'transitionend'
,
handler
);
if
(
!
parent
.
classList
.
contains
(
'open'
))
{
if
(
!
parent
.
classList
.
contains
(
'open'
))
{
submenu
.
style
.
display
=
'none'
;
submenu
.
style
.
display
=
'none'
;
submenu
.
style
.
maxHeight
=
''
;
submenu
.
style
.
overflow
=
''
;
submenu
.
style
.
transition
=
''
;
}
}
},
300
);
});
}
}
}
}
}
...
...
public/assets/js/app.js
View file @
4372c4e4
...
@@ -157,33 +157,8 @@ function confirmModal(title, message, onConfirm) {
...
@@ -157,33 +157,8 @@ function confirmModal(title, message, onConfirm) {
}
}
// ── Sidebar Toggle ──
// ── Sidebar Toggle ──
function
toggleSidebar
()
{
// Note: toggleSidebar() and toggleSubmenu() are defined in main.php layout
document
.
getElementById
(
'sidebar'
).
classList
.
toggle
(
'open'
);
// so they have access to sidebar-specific DOM elements and run after the sidebar renders.
}
function
toggleSubmenu
(
el
)
{
const
parent
=
el
.
closest
(
'.sidebar-item'
);
const
submenu
=
parent
.
querySelector
(
'.sidebar-submenu'
);
if
(
submenu
)
{
const
isOpen
=
parent
.
classList
.
contains
(
'open'
);
parent
.
classList
.
toggle
(
'open'
,
!
isOpen
);
if
(
!
isOpen
)
{
submenu
.
style
.
display
=
'block'
;
submenu
.
style
.
maxHeight
=
submenu
.
scrollHeight
+
'px'
;
submenu
.
style
.
overflow
=
'hidden'
;
submenu
.
style
.
transition
=
'max-height 0.3s cubic-bezier(0.16, 1, 0.3, 1)'
;
}
else
{
submenu
.
style
.
maxHeight
=
'0'
;
submenu
.
style
.
overflow
=
'hidden'
;
submenu
.
style
.
transition
=
'max-height 0.25s ease'
;
setTimeout
(
function
()
{
if
(
!
parent
.
classList
.
contains
(
'open'
))
{
submenu
.
style
.
display
=
'none'
;
}
},
250
);
}
}
}
// ── National ID Parser ──
// ── National ID Parser ──
function
initNationalIdParser
(
inputId
,
config
=
{})
{
function
initNationalIdParser
(
inputId
,
config
=
{})
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment