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-tree">
<div class="org-node root-node" id="root-node"> <div class="org-node root-node" id="root-node">
<div class="node-card"> <div class="node-card">
@@ -41,6 +39,3 @@
} }
</div> </div>
</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 public partial class OrganizationChart
{ {
private UserNode? _currentUser; private UserNode? _currentUser;

View File

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

View File

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

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

View File

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

View File

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

View File

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

View File

@@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17 # Visual Studio Version 17
VisualStudioVersion = 17.0.31903.59 VisualStudioVersion = 17.0.31903.59
MinimumVisualStudioVersion = 10.0.40219.1 MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FrontOffice.Main", "FrontOffice.Main\FrontOffice.Main.csproj", "{D9407E46-027D-4D44-B9FB-1F8DECB14270}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FrontOffice.Main", "FrontOffice.Main\FrontOffice.Main.csproj", "{D9407E46-027D-4D44-B9FB-1F8DECB14270}"
EndProject EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -19,4 +19,7 @@ Global
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE
EndGlobalSection EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {1181A173-0937-4AB5-981F-593546434A02}
EndGlobalSection
EndGlobal EndGlobal