Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
el3ab-Player
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
el3ab-Player
Commits
c9556fdf
Commit
c9556fdf
authored
Jun 15, 2026
by
Mahmoud Aglan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: show pending/rejected org applications in profile view
Co-Authored-By:
Claude Opus 4.6
<
noreply@anthropic.com
>
parent
ff8fea4f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
52 additions
and
22 deletions
+52
-22
view.js
public/js/modules/profile/scenes/view.js
+52
-22
No files found.
public/js/modules/profile/scenes/view.js
View file @
c9556fdf
...
@@ -380,30 +380,60 @@ async function loadOrgMembership(el) {
...
@@ -380,30 +380,60 @@ async function loadOrgMembership(el) {
const
content
=
el
.
querySelector
(
'#org-membership-content'
);
const
content
=
el
.
querySelector
(
'#org-membership-content'
);
if
(
!
content
)
return
;
if
(
!
content
)
return
;
try
{
try
{
const
memberships
=
await
net
.
post
(
'profile.php'
,
{
action
:
'my-memberships'
});
const
[
memberships
,
applications
]
=
await
Promise
.
all
([
if
(
Array
.
isArray
(
memberships
)
&&
memberships
.
length
>
0
)
{
net
.
post
(
'profile.php'
,
{
action
:
'my-memberships'
}),
const
active
=
memberships
.
filter
(
m
=>
m
.
status
===
'active'
);
net
.
post
(
'profile.php'
,
{
action
:
'my-applications'
})
if
(
active
.
length
>
0
)
{
]);
content
.
innerHTML
=
active
.
map
(
m
=>
{
const
org
=
m
.
organizations
;
let
html
=
''
;
const
logoHtml
=
org
&&
org
.
logo_url
?
`<img src="
${
org
.
logo_url
}
" style="width:28px;height:28px;border-radius:6px;object-fit:contain;" alt="">`
// Show active memberships
:
`<div style="width:28px;height:28px;border-radius:6px;background:var(--bg-elevated);display:flex;align-items:center;justify-content:center;">
${
emoji
(
'building'
,
'🏢'
,
14
)}
</div>`
;
const
active
=
(
Array
.
isArray
(
memberships
)
?
memberships
:
[]).
filter
(
m
=>
m
.
status
===
'active'
);
return
`
if
(
active
.
length
>
0
)
{
<div style="display:flex;align-items:center;gap:var(--s-2);padding:var(--s-2) 0;">
html
+=
active
.
map
(
m
=>
{
${
logoHtml
}
const
org
=
m
.
organizations
;
<div style="flex:1;">
const
logoHtml
=
org
&&
org
.
logo_url
<div style="font-size:13px;font-weight:600;color:var(--text-primary);">
${
org
?
org
.
name
:
'منظمة'
}
</div>
?
`<img src="
${
org
.
logo_url
}
" style="width:28px;height:28px;border-radius:6px;object-fit:contain;" alt="">`
<div style="font-size:11px;color:var(--text-secondary);">
${
m
.
role
||
'عضو'
}
</div>
:
`<div style="width:28px;height:28px;border-radius:6px;background:var(--bg-elevated);display:flex;align-items:center;justify-content:center;">
${
emoji
(
'building'
,
'🏢'
,
14
)}
</div>`
;
</div>
return
`
<span style="background:var(--success);color:#fff;font-size:10px;padding:2px 6px;border-radius:10px;">عضو</span>
<div style="display:flex;align-items:center;gap:var(--s-2);padding:var(--s-2) 0;">
${
logoHtml
}
<div style="flex:1;">
<div style="font-size:13px;font-weight:600;color:var(--text-primary);">
${
org
?
org
.
name
:
'منظمة'
}
</div>
<div style="font-size:11px;color:var(--text-secondary);">
${
m
.
role
||
'عضو'
}
</div>
</div>
</div>
`
;
<span style="background:var(--success);color:#fff;font-size:10px;padding:2px 6px;border-radius:10px;">عضو</span>
}).
join
(
''
);
</div>
return
;
`
;
}
}
).
join
(
''
);
}
}
content
.
innerHTML
=
`<div style="font-size:13px;color:var(--text-secondary);">لست عضواً في أي منظمة بعد</div>`
;
// Show pending/rejected applications
const
pending
=
(
Array
.
isArray
(
applications
)
?
applications
:
[]).
filter
(
a
=>
a
.
status
===
'pending'
||
a
.
status
===
'rejected'
);
if
(
pending
.
length
>
0
)
{
html
+=
pending
.
map
(
a
=>
{
const
org
=
a
.
organizations
||
a
.
el3ab_organizations
;
const
orgName
=
org
?
org
.
name
:
'منظمة'
;
const
logoHtml
=
org
&&
org
.
logo_url
?
`<img src="
${
org
.
logo_url
}
" style="width:28px;height:28px;border-radius:6px;object-fit:contain;" alt="">`
:
`<div style="width:28px;height:28px;border-radius:6px;background:var(--bg-elevated);display:flex;align-items:center;justify-content:center;">
${
emoji
(
'building'
,
'🏢'
,
14
)}
</div>`
;
const
statusBadge
=
a
.
status
===
'pending'
?
`<span style="background:#f59e0b;color:#000;font-size:10px;padding:2px 6px;border-radius:10px;">قيد المراجعة</span>`
:
`<span style="background:var(--error);color:#fff;font-size:10px;padding:2px 6px;border-radius:10px;">مرفوض</span>`
;
return
`
<div style="display:flex;align-items:center;gap:var(--s-2);padding:var(--s-2) 0;">
${
logoHtml
}
<div style="flex:1;">
<div style="font-size:13px;font-weight:600;color:var(--text-primary);">
${
orgName
}
</div>
<div style="font-size:11px;color:var(--text-secondary);">طلب انضمام</div>
</div>
${
statusBadge
}
</div>
`
;
}).
join
(
''
);
}
content
.
innerHTML
=
html
||
`<div style="font-size:13px;color:var(--text-secondary);">لست عضواً في أي منظمة بعد</div>`
;
}
catch
(
e
)
{
}
catch
(
e
)
{
content
.
innerHTML
=
`<div style="font-size:13px;color:var(--text-secondary);">لست عضواً في أي منظمة بعد</div>`
;
content
.
innerHTML
=
`<div style="font-size:13px;color:var(--text-secondary);">لست عضواً في أي منظمة بعد</div>`
;
}
}
...
...
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