u
This commit is contained in:
@@ -23,76 +23,76 @@ public partial class OrganizationChart
|
|||||||
PersonalPurchase = 2500000,
|
PersonalPurchase = 2500000,
|
||||||
TeamPurchase = 15000000,
|
TeamPurchase = 15000000,
|
||||||
Children = new List<UserNode>
|
Children = new List<UserNode>
|
||||||
{
|
|
||||||
new UserNode
|
|
||||||
{
|
{
|
||||||
Id = 2,
|
new UserNode
|
||||||
FirstName = "مریم",
|
|
||||||
LastName = "احمدی",
|
|
||||||
Avatar = "images/avatar2.jpg",
|
|
||||||
PersonalPurchase = 1800000,
|
|
||||||
TeamPurchase = 8500000,
|
|
||||||
Children = new List<UserNode>
|
|
||||||
{
|
{
|
||||||
new UserNode
|
Id = 2,
|
||||||
|
FirstName = "مریم",
|
||||||
|
LastName = "احمدی",
|
||||||
|
Avatar = "images/avatar2.jpg",
|
||||||
|
PersonalPurchase = 1800000,
|
||||||
|
TeamPurchase = 8500000,
|
||||||
|
Children = new List<UserNode>
|
||||||
{
|
{
|
||||||
Id = 5,
|
new UserNode
|
||||||
FirstName = "سارا",
|
|
||||||
LastName = "کریمی",
|
|
||||||
PersonalPurchase = 1200000,
|
|
||||||
TeamPurchase = 3200000,
|
|
||||||
Children = new List<UserNode>
|
|
||||||
{
|
{
|
||||||
new UserNode
|
Id = 5,
|
||||||
|
FirstName = "سارا",
|
||||||
|
LastName = "کریمی",
|
||||||
|
PersonalPurchase = 1200000,
|
||||||
|
TeamPurchase = 3200000,
|
||||||
|
Children = new List<UserNode>
|
||||||
{
|
{
|
||||||
Id = 8,
|
new UserNode
|
||||||
FirstName = "نازنین",
|
{
|
||||||
LastName = "رضایی",
|
Id = 8,
|
||||||
PersonalPurchase = 950000,
|
FirstName = "نازنین",
|
||||||
TeamPurchase = 2100000
|
LastName = "رضایی",
|
||||||
|
PersonalPurchase = 950000,
|
||||||
|
TeamPurchase = 2100000
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
new UserNode
|
||||||
|
{
|
||||||
|
Id = 6,
|
||||||
|
FirstName = "امیر",
|
||||||
|
LastName = "حسینی",
|
||||||
|
PersonalPurchase = 950000,
|
||||||
|
TeamPurchase = 1800000
|
||||||
}
|
}
|
||||||
},
|
|
||||||
new UserNode
|
|
||||||
{
|
|
||||||
Id = 6,
|
|
||||||
FirstName = "امیر",
|
|
||||||
LastName = "حسینی",
|
|
||||||
PersonalPurchase = 950000,
|
|
||||||
TeamPurchase = 1800000
|
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
},
|
new UserNode
|
||||||
new UserNode
|
|
||||||
{
|
|
||||||
Id = 3,
|
|
||||||
FirstName = "حسن",
|
|
||||||
LastName = "کریمی",
|
|
||||||
Avatar = "images/avatar3.jpg",
|
|
||||||
PersonalPurchase = 2200000,
|
|
||||||
TeamPurchase = 9200000,
|
|
||||||
Children = new List<UserNode>
|
|
||||||
{
|
{
|
||||||
new UserNode
|
Id = 3,
|
||||||
|
FirstName = "حسن",
|
||||||
|
LastName = "کریمی",
|
||||||
|
Avatar = "images/avatar3.jpg",
|
||||||
|
PersonalPurchase = 2200000,
|
||||||
|
TeamPurchase = 9200000,
|
||||||
|
Children = new List<UserNode>
|
||||||
{
|
{
|
||||||
Id = 7,
|
new UserNode
|
||||||
FirstName = "فاطمه",
|
{
|
||||||
LastName = "رضایی",
|
Id = 7,
|
||||||
PersonalPurchase = 1350000,
|
FirstName = "فاطمه",
|
||||||
TeamPurchase = 4100000
|
LastName = "رضایی",
|
||||||
|
PersonalPurchase = 1350000,
|
||||||
|
TeamPurchase = 4100000
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
new UserNode
|
||||||
|
{
|
||||||
|
Id = 4,
|
||||||
|
FirstName = "زهرا",
|
||||||
|
LastName = "محمدی",
|
||||||
|
Avatar = "images/avatar4.jpg",
|
||||||
|
PersonalPurchase = 1950000,
|
||||||
|
TeamPurchase = 7800000
|
||||||
}
|
}
|
||||||
},
|
|
||||||
new UserNode
|
|
||||||
{
|
|
||||||
Id = 4,
|
|
||||||
FirstName = "زهرا",
|
|
||||||
LastName = "محمدی",
|
|
||||||
Avatar = "images/avatar4.jpg",
|
|
||||||
PersonalPurchase = 1950000,
|
|
||||||
TeamPurchase = 7800000
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,27 +1,27 @@
|
|||||||
/* Organization Chart Level Styles - inherits from main chart styles */
|
/* Organization Chart Level Styles */
|
||||||
.org-level {
|
.org-level {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
position: relative;
|
position: relative;
|
||||||
margin-top: 20px;
|
margin-top: 40px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.org-level::before {
|
.org-level::before {
|
||||||
content: '';
|
content: '';
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: -40px;
|
top: -80px;
|
||||||
left: 50%;
|
left: 50%;
|
||||||
transform: translateX(-50%);
|
transform: translateX(-50%);
|
||||||
width: 2px;
|
width: 2px;
|
||||||
height: 20px;
|
height: 40px;
|
||||||
background: #ddd;
|
background: #ddd;
|
||||||
}
|
}
|
||||||
|
|
||||||
.org-level::after {
|
.org-level::after {
|
||||||
content: '';
|
content: '';
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: -20px;
|
top: -40px;
|
||||||
left: 0;
|
left: 0;
|
||||||
right: 0;
|
right: 0;
|
||||||
height: 2px;
|
height: 2px;
|
||||||
@@ -29,28 +29,20 @@
|
|||||||
z-index: 1;
|
z-index: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Responsive adjustments for levels */
|
/* Node styles for levels */
|
||||||
@media (max-width: 768px) {
|
.org-node {
|
||||||
.org-level {
|
position: relative;
|
||||||
flex-direction: column;
|
margin: 0px 15px 20px 15px;
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Animation for level expansion */
|
.node-connector {
|
||||||
.org-level {
|
position: absolute;
|
||||||
animation: fadeInLevel 0.3s ease-in-out;
|
top: -40px;
|
||||||
}
|
left: 50%;
|
||||||
|
transform: translateX(-50%);
|
||||||
@keyframes fadeInLevel {
|
width: 2px;
|
||||||
from {
|
height: 40px;
|
||||||
opacity: 0;
|
background: #ddd;
|
||||||
transform: translateY(-10px);
|
|
||||||
}
|
|
||||||
to {
|
|
||||||
opacity: 1;
|
|
||||||
transform: translateY(0);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.node-card {
|
.node-card {
|
||||||
@@ -64,10 +56,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;
|
||||||
@@ -94,10 +86,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;
|
||||||
@@ -114,9 +106,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;
|
||||||
@@ -133,4 +125,47 @@
|
|||||||
|
|
||||||
.amount {
|
.amount {
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Responsive adjustments for levels */
|
||||||
|
@media (max-width: 768px) {
|
||||||
|
.org-level {
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
margin-top: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.org-node {
|
||||||
|
margin: 10px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.node-card {
|
||||||
|
min-width: 160px;
|
||||||
|
max-width: 220px;
|
||||||
|
padding: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.node-name {
|
||||||
|
font-size: 13px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.node-amounts {
|
||||||
|
font-size: 11px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Animation for level expansion */
|
||||||
|
.org-level {
|
||||||
|
animation: fadeInLevel 0.3s ease-in-out;
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes fadeInLevel {
|
||||||
|
from {
|
||||||
|
opacity: 0;
|
||||||
|
transform: translateY(-10px);
|
||||||
|
}
|
||||||
|
to {
|
||||||
|
opacity: 1;
|
||||||
|
transform: translateY(0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user