This commit is contained in:
MeysamMoghaddam
2025-10-13 22:40:23 +03:30
parent 560694fc28
commit 8abb5dcd5b
9 changed files with 50 additions and 45 deletions

View File

@@ -0,0 +1,5 @@
namespace FrontOffice.Main.Shared;
internal class OrganizationChartLevel
{
}

View File

@@ -1,6 +1,4 @@
@inject IJSRuntime JSRuntime
<div class="org-chart-container">
<div class="org-chart-container">
<div class="org-tree">
<div class="org-node root-node" id="root-node">
<div class="node-card">
@@ -41,6 +39,3 @@
}
</div>
</div>

View File

@@ -1,6 +1,6 @@
using static FrontOffice.Main.Shared.OrganizationChartLevel;
using static FrontOffice.Main.Pages.Profile.Components.OrganizationChartLevel;
namespace FrontOffice.Main.Shared;
namespace FrontOffice.Main.Pages.Profile.Components;
public partial class OrganizationChart
{
private UserNode? _currentUser;

View File

@@ -1,4 +1,4 @@
.org-chart-container {
.org-chart-container {
width: 100%;
height: 600px;
overflow: auto;

View File

@@ -1,4 +1,4 @@

<div class="org-level" id="level-@Level">
@foreach (var node in Nodes)
{

View File

@@ -1,7 +1,7 @@
using Microsoft.AspNetCore.Components;
using MudBlazor;
namespace FrontOffice.Main.Shared;
namespace FrontOffice.Main.Pages.Profile.Components;
public partial class OrganizationChartLevel
{
[Parameter] public List<UserNode>? Nodes { get; set; }

View File

@@ -1,4 +1,4 @@
/* Organization Chart Level Styles */
/* Organization Chart Level Styles */
.org-level {
display: flex;
justify-content: center;
@@ -10,27 +10,27 @@
margin-right: auto;
}
.org-level::before {
content: '';
position: absolute;
top: -80px;
left: 50%;
transform: translateX(-50%);
width: 2px;
height: 40px;
background: #ddd;
}
.org-level::before {
content: '';
position: absolute;
top: -80px;
left: 50%;
transform: translateX(-50%);
width: 2px;
height: 40px;
background: #ddd;
}
.org-level::after {
content: '';
position: absolute;
top: -40px;
left: 0;
right: 0;
height: 2px;
background: #ddd;
z-index: 1;
}
.org-level::after {
content: '';
position: absolute;
top: -40px;
left: 0;
right: 0;
height: 2px;
background: #ddd;
z-index: 1;
}
/* Node styles for levels */
.org-node {
@@ -63,10 +63,10 @@
transition: all 0.3s ease;
}
.node-card:hover {
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
border-color: #e0e0e0;
}
.node-card:hover {
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
border-color: #e0e0e0;
}
.node-avatar {
position: relative;
@@ -93,10 +93,10 @@
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}
.expand-btn:hover {
background: #026a9e;
transform: translateX(-50%) scale(1.1);
}
.expand-btn:hover {
background: #026a9e;
transform: translateX(-50%) scale(1.1);
}
.node-info {
text-align: center;
@@ -113,9 +113,9 @@
font-size: 12px;
}
.node-amounts > div {
margin-bottom: 4px;
}
.node-amounts > div {
margin-bottom: 4px;
}
.personal-amount {
color: #0380C0;
@@ -171,8 +171,9 @@
opacity: 0;
transform: translateY(-10px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
}

View File

@@ -8,6 +8,7 @@
@using Microsoft.JSInterop
@using FrontOffice.Main
@using FrontOffice.Main.Shared
@using FrontOffice.Main.Pages.Profile.Components
@using MudBlazor
@using FrontOffice.Main.Utilities
@using DateTimeConverterCL