Merge branch 'main-demo' into dev-resourceManagement
This commit is contained in:
@@ -125,7 +125,10 @@ const AssetManagement = () => {
|
|||||||
<div className="header-wrapper">
|
<div className="header-wrapper">
|
||||||
|
|
||||||
{expandedAssetId === asset.id ?
|
{expandedAssetId === asset.id ?
|
||||||
|
<>
|
||||||
|
<div className="drop-icon" onClick={() => setExpandedAssetId(null)}>▾</div>
|
||||||
<img className='asset-image' src={asset.image} alt="" />
|
<img className='asset-image' src={asset.image} alt="" />
|
||||||
|
</>
|
||||||
:
|
:
|
||||||
<div className="icon"><ForkLiftIcon /></div>
|
<div className="icon"><ForkLiftIcon /></div>
|
||||||
}
|
}
|
||||||
@@ -167,7 +170,7 @@ const AssetManagement = () => {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="asset-estimate__view-button" onClick={() => setExpandedAssetId(null)}>
|
<div className="asset-estimate__view-button">
|
||||||
<EyeIcon isClosed={false} />
|
<EyeIcon isClosed={false} />
|
||||||
<div className="asset-estimate__view-text" onClick={() => handleAssetClick(asset.id)}>View in Scene</div>
|
<div className="asset-estimate__view-text" onClick={() => handleAssetClick(asset.id)}>View in Scene</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ import {
|
|||||||
} from "../../store/visualization/useDroppedObjectsStore";
|
} from "../../store/visualization/useDroppedObjectsStore";
|
||||||
import { useParams } from "react-router-dom";
|
import { useParams } from "react-router-dom";
|
||||||
import { useVersionContext } from "../../modules/builder/version/versionContext";
|
import { useVersionContext } from "../../modules/builder/version/versionContext";
|
||||||
|
import { MoveIcon, RotateIcon } from "../icons/ShortcutIcons";
|
||||||
|
|
||||||
// Utility component
|
// Utility component
|
||||||
const ToolButton = ({
|
const ToolButton = ({
|
||||||
@@ -65,12 +66,8 @@ const Tools: React.FC = () => {
|
|||||||
const { isPlaying, setIsPlaying } = usePlayButtonStore();
|
const { isPlaying, setIsPlaying } = usePlayButtonStore();
|
||||||
const { showShortcuts } = useShortcutStore();
|
const { showShortcuts } = useShortcutStore();
|
||||||
|
|
||||||
const {
|
const { activeTool, setActiveTool, setToolMode, setAddAction } =
|
||||||
activeTool,
|
useStoreHooks();
|
||||||
setActiveTool,
|
|
||||||
setToolMode,
|
|
||||||
setAddAction,
|
|
||||||
} = useStoreHooks();
|
|
||||||
|
|
||||||
const { setActiveSubTool, activeSubTool } = useActiveSubTool();
|
const { setActiveSubTool, activeSubTool } = useActiveSubTool();
|
||||||
const { setSelectedWallItem } = useSelectedWallItem();
|
const { setSelectedWallItem } = useSelectedWallItem();
|
||||||
@@ -81,14 +78,15 @@ const Tools: React.FC = () => {
|
|||||||
const { selectedZone } = useSelectedZoneStore();
|
const { selectedZone } = useSelectedZoneStore();
|
||||||
const { floatingWidget } = useFloatingWidget();
|
const { floatingWidget } = useFloatingWidget();
|
||||||
const { widgets3D } = use3DWidget();
|
const { widgets3D } = use3DWidget();
|
||||||
const { visualizationSocket } = useSocketStore();
|
|
||||||
|
|
||||||
const dropdownRef = useRef<HTMLButtonElement>(null);
|
const { visualizationSocket } = useSocketStore();
|
||||||
const [openDrop, setOpenDrop] = useState(false);
|
|
||||||
const { selectedVersionStore } = useVersionContext();
|
const { selectedVersionStore } = useVersionContext();
|
||||||
const { selectedVersion } = selectedVersionStore();
|
const { selectedVersion } = selectedVersionStore();
|
||||||
const { projectId } = useParams();
|
const { projectId } = useParams();
|
||||||
|
|
||||||
|
const dropdownRef = useRef<HTMLButtonElement>(null);
|
||||||
|
const [openDrop, setOpenDrop] = useState(false);
|
||||||
|
|
||||||
// 1. Set UI toggles on initial render
|
// 1. Set UI toggles on initial render
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
setToggleUI(
|
setToggleUI(
|
||||||
@@ -155,7 +153,7 @@ const Tools: React.FC = () => {
|
|||||||
if (!is2D) setAddAction("Pillar");
|
if (!is2D) setAddAction("Pillar");
|
||||||
break;
|
break;
|
||||||
case "delete":
|
case "delete":
|
||||||
is2D ? setToolMode('2D-Delete') : setToolMode('3D-Delete');
|
is2D ? setToolMode("2D-Delete") : setToolMode("3D-Delete");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -251,7 +249,7 @@ const Tools: React.FC = () => {
|
|||||||
templates,
|
templates,
|
||||||
visualizationSocket,
|
visualizationSocket,
|
||||||
projectId,
|
projectId,
|
||||||
versionId: selectedVersion?.versionId || ''
|
versionId: selectedVersion?.versionId || "",
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
@@ -278,6 +276,10 @@ const Tools: React.FC = () => {
|
|||||||
return FreeMoveIcon;
|
return FreeMoveIcon;
|
||||||
case "delete":
|
case "delete":
|
||||||
return DeleteIcon;
|
return DeleteIcon;
|
||||||
|
case "move":
|
||||||
|
return MoveIcon;
|
||||||
|
case "rotate":
|
||||||
|
return RotateIcon;
|
||||||
default:
|
default:
|
||||||
return CursorIcon;
|
return CursorIcon;
|
||||||
}
|
}
|
||||||
@@ -304,6 +306,10 @@ const Tools: React.FC = () => {
|
|||||||
return <FreeMoveIcon isActive={false} />;
|
return <FreeMoveIcon isActive={false} />;
|
||||||
case "delete":
|
case "delete":
|
||||||
return <DeleteIcon isActive={false} />;
|
return <DeleteIcon isActive={false} />;
|
||||||
|
case "move":
|
||||||
|
return <MoveIcon />;
|
||||||
|
case "rotate":
|
||||||
|
return <RotateIcon />;
|
||||||
default:
|
default:
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@@ -362,6 +368,24 @@ const Tools: React.FC = () => {
|
|||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{activeModule !== "visualization" && (
|
||||||
|
<>
|
||||||
|
<div className="split"></div>
|
||||||
|
<div className="transform-tools">
|
||||||
|
{["move", "rotate"].map((tool) => (
|
||||||
|
<ToolButton
|
||||||
|
key={tool}
|
||||||
|
toolId={tool}
|
||||||
|
icon={getIconByTool(tool)}
|
||||||
|
tooltip={`${tool}`}
|
||||||
|
active={activeTool === tool}
|
||||||
|
onClick={() => setActiveTool(tool)}
|
||||||
|
/>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
</>
|
||||||
|
)}
|
||||||
|
|
||||||
<div className="split"></div>
|
<div className="split"></div>
|
||||||
{activeModule === "builder" && renderBuilderTools()}
|
{activeModule === "builder" && renderBuilderTools()}
|
||||||
{activeModule === "simulation" && renderSimulationTools()}
|
{activeModule === "simulation" && renderSimulationTools()}
|
||||||
|
|||||||
@@ -2,33 +2,15 @@ import * as THREE from "three";
|
|||||||
import { useEffect, useRef, useState } from "react";
|
import { useEffect, useRef, useState } from "react";
|
||||||
import { useThree, useFrame } from "@react-three/fiber";
|
import { useThree, useFrame } from "@react-three/fiber";
|
||||||
import { useToolMode } from "../../../store/builder/store";
|
import { useToolMode } from "../../../store/builder/store";
|
||||||
import { Html } from "@react-three/drei";
|
import { Html, Line } from "@react-three/drei";
|
||||||
|
|
||||||
const MeasurementTool = () => {
|
const MeasurementTool = () => {
|
||||||
const { gl, raycaster, pointer, camera, scene } = useThree();
|
const { gl, raycaster, pointer, camera, scene } = useThree();
|
||||||
const { toolMode } = useToolMode();
|
const { toolMode } = useToolMode();
|
||||||
|
|
||||||
const [points, setPoints] = useState<THREE.Vector3[]>([]);
|
const [points, setPoints] = useState<THREE.Vector3[]>([]);
|
||||||
const [tubeGeometry, setTubeGeometry] = useState<THREE.TubeGeometry | null>(
|
const [linePoints, setLinePoints] = useState<THREE.Vector3[] | null>(null);
|
||||||
null
|
|
||||||
);
|
|
||||||
const groupRef = useRef<THREE.Group>(null);
|
const groupRef = useRef<THREE.Group>(null);
|
||||||
const [startConePosition, setStartConePosition] =
|
|
||||||
useState<THREE.Vector3 | null>(null);
|
|
||||||
const [endConePosition, setEndConePosition] = useState<THREE.Vector3 | null>(
|
|
||||||
null
|
|
||||||
);
|
|
||||||
const [startConeQuaternion, setStartConeQuaternion] = useState(
|
|
||||||
new THREE.Quaternion()
|
|
||||||
);
|
|
||||||
const [endConeQuaternion, setEndConeQuaternion] = useState(
|
|
||||||
new THREE.Quaternion()
|
|
||||||
);
|
|
||||||
const [coneSize, setConeSize] = useState({ radius: 0.2, height: 0.5 });
|
|
||||||
|
|
||||||
const MIN_RADIUS = 0.001, MAX_RADIUS = 0.1;
|
|
||||||
const MIN_CONE_RADIUS = 0.01, MAX_CONE_RADIUS = 0.4;
|
|
||||||
const MIN_CONE_HEIGHT = 0.035, MAX_CONE_HEIGHT = 2.0;
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const canvasElement = gl.domElement;
|
const canvasElement = gl.domElement;
|
||||||
@@ -54,7 +36,9 @@ const MeasurementTool = () => {
|
|||||||
!intersect.object.name.includes("zonePlane") &&
|
!intersect.object.name.includes("zonePlane") &&
|
||||||
!intersect.object.name.includes("SelectionGroup") &&
|
!intersect.object.name.includes("SelectionGroup") &&
|
||||||
!intersect.object.name.includes("selectionAssetGroup") &&
|
!intersect.object.name.includes("selectionAssetGroup") &&
|
||||||
!intersect.object.name.includes("SelectionGroupBoundingBoxLine") &&
|
!intersect.object.name.includes(
|
||||||
|
"SelectionGroupBoundingBoxLine"
|
||||||
|
) &&
|
||||||
!intersect.object.name.includes("SelectionGroupBoundingBox") &&
|
!intersect.object.name.includes("SelectionGroupBoundingBox") &&
|
||||||
!intersect.object.name.includes("SelectionGroupBoundingLine") &&
|
!intersect.object.name.includes("SelectionGroupBoundingLine") &&
|
||||||
intersect.object.type !== "GridHelper"
|
intersect.object.type !== "GridHelper"
|
||||||
@@ -78,9 +62,8 @@ const MeasurementTool = () => {
|
|||||||
const onContextMenu = (evt: any) => {
|
const onContextMenu = (evt: any) => {
|
||||||
evt.preventDefault();
|
evt.preventDefault();
|
||||||
if (!drag) {
|
if (!drag) {
|
||||||
evt.preventDefault();
|
|
||||||
setPoints([]);
|
setPoints([]);
|
||||||
setTubeGeometry(null);
|
setLinePoints(null);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -90,8 +73,8 @@ const MeasurementTool = () => {
|
|||||||
canvasElement.addEventListener("pointerup", onMouseUp);
|
canvasElement.addEventListener("pointerup", onMouseUp);
|
||||||
canvasElement.addEventListener("contextmenu", onContextMenu);
|
canvasElement.addEventListener("contextmenu", onContextMenu);
|
||||||
} else {
|
} else {
|
||||||
resetMeasurement();
|
|
||||||
setPoints([]);
|
setPoints([]);
|
||||||
|
setLinePoints(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
return () => {
|
return () => {
|
||||||
@@ -100,10 +83,12 @@ const MeasurementTool = () => {
|
|||||||
canvasElement.removeEventListener("pointerup", onMouseUp);
|
canvasElement.removeEventListener("pointerup", onMouseUp);
|
||||||
canvasElement.removeEventListener("contextmenu", onContextMenu);
|
canvasElement.removeEventListener("contextmenu", onContextMenu);
|
||||||
};
|
};
|
||||||
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||||
}, [toolMode, camera, raycaster, pointer, scene, points]);
|
}, [toolMode, camera, raycaster, pointer, scene, points]);
|
||||||
|
|
||||||
useFrame(() => {
|
useFrame(() => {
|
||||||
if (points.length === 1) {
|
if (points.length === 1) {
|
||||||
|
// live preview for second point
|
||||||
raycaster.setFromCamera(pointer, camera);
|
raycaster.setFromCamera(pointer, camera);
|
||||||
const intersects = raycaster
|
const intersects = raycaster
|
||||||
.intersectObjects(scene.children, true)
|
.intersectObjects(scene.children, true)
|
||||||
@@ -122,116 +107,79 @@ const MeasurementTool = () => {
|
|||||||
);
|
);
|
||||||
|
|
||||||
if (intersects.length > 0) {
|
if (intersects.length > 0) {
|
||||||
updateMeasurement(points[0], intersects[0].point);
|
const tempEnd = intersects[0].point.clone();
|
||||||
|
updateMeasurement(points[0], tempEnd);
|
||||||
}
|
}
|
||||||
} else if (points.length === 2) {
|
} else if (points.length === 2) {
|
||||||
|
// second point already fixed
|
||||||
updateMeasurement(points[0], points[1]);
|
updateMeasurement(points[0], points[1]);
|
||||||
} else {
|
} else {
|
||||||
resetMeasurement();
|
setLinePoints(null);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const updateMeasurement = (start: THREE.Vector3, end: THREE.Vector3) => {
|
const updateMeasurement = (start: THREE.Vector3, end: THREE.Vector3) => {
|
||||||
const distance = start.distanceTo(end);
|
setLinePoints([start.clone(), end.clone()]);
|
||||||
|
|
||||||
const radius = THREE.MathUtils.clamp(distance * 0.02, MIN_RADIUS, MAX_RADIUS);
|
|
||||||
const coneRadius = THREE.MathUtils.clamp(distance * 0.05, MIN_CONE_RADIUS, MAX_CONE_RADIUS);
|
|
||||||
const coneHeight = THREE.MathUtils.clamp(distance * 0.2, MIN_CONE_HEIGHT, MAX_CONE_HEIGHT);
|
|
||||||
|
|
||||||
setConeSize({ radius: coneRadius, height: coneHeight });
|
|
||||||
|
|
||||||
const direction = new THREE.Vector3().subVectors(end, start).normalize();
|
|
||||||
|
|
||||||
const offset = direction.clone().multiplyScalar(coneHeight * 0.5);
|
|
||||||
|
|
||||||
let tubeStart = start.clone().add(offset);
|
|
||||||
let tubeEnd = end.clone().sub(offset);
|
|
||||||
|
|
||||||
tubeStart.y = Math.max(tubeStart.y, 0);
|
|
||||||
tubeEnd.y = Math.max(tubeEnd.y, 0);
|
|
||||||
|
|
||||||
const curve = new THREE.CatmullRomCurve3([tubeStart, tubeEnd]);
|
|
||||||
setTubeGeometry(new THREE.TubeGeometry(curve, 20, radius, 8, false));
|
|
||||||
|
|
||||||
setStartConePosition(tubeStart);
|
|
||||||
setEndConePosition(tubeEnd);
|
|
||||||
setStartConeQuaternion(getArrowOrientation(start, end));
|
|
||||||
setEndConeQuaternion(getArrowOrientation(end, start));
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const resetMeasurement = () => {
|
|
||||||
setTubeGeometry(null);
|
|
||||||
setStartConePosition(null);
|
|
||||||
setEndConePosition(null);
|
|
||||||
};
|
|
||||||
|
|
||||||
const getArrowOrientation = (start: THREE.Vector3, end: THREE.Vector3) => {
|
|
||||||
const direction = new THREE.Vector3()
|
|
||||||
.subVectors(end, start)
|
|
||||||
.normalize()
|
|
||||||
.negate();
|
|
||||||
const quaternion = new THREE.Quaternion();
|
|
||||||
quaternion.setFromUnitVectors(new THREE.Vector3(0, 1, 0), direction);
|
|
||||||
return quaternion;
|
|
||||||
};
|
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
if (points.length === 2) {
|
|
||||||
// console.log(points[0].distanceTo(points[1]));
|
|
||||||
}
|
|
||||||
}, [points]);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<group ref={groupRef} name="MeasurementGroup">
|
<group ref={groupRef} name="MeasurementGroup">
|
||||||
{startConePosition && (
|
{linePoints && (
|
||||||
<mesh
|
<>
|
||||||
name="MeasurementReference"
|
{/* Outline line */}
|
||||||
position={startConePosition}
|
<Line
|
||||||
quaternion={startConeQuaternion}
|
points={linePoints}
|
||||||
>
|
color="black"
|
||||||
<coneGeometry args={[coneSize.radius, coneSize.height, 16]} />
|
lineWidth={6} // thicker than main line
|
||||||
<meshBasicMaterial color="yellow" />
|
depthTest={false}
|
||||||
</mesh>
|
depthWrite={false}
|
||||||
)}
|
renderOrder={998} // render behind main line
|
||||||
{endConePosition && (
|
/>
|
||||||
<mesh
|
|
||||||
name="MeasurementReference"
|
{/* Main line */}
|
||||||
position={endConePosition}
|
<Line
|
||||||
quaternion={endConeQuaternion}
|
points={linePoints}
|
||||||
>
|
color="#b18ef1"
|
||||||
<coneGeometry args={[coneSize.radius, coneSize.height, 16]} />
|
lineWidth={2} // actual line width
|
||||||
<meshBasicMaterial color="yellow" />
|
depthTest={false}
|
||||||
</mesh>
|
depthWrite={false}
|
||||||
)}
|
transparent={false}
|
||||||
{tubeGeometry && (
|
opacity={1}
|
||||||
<mesh name="MeasurementReference" geometry={tubeGeometry}>
|
renderOrder={999} // render on top
|
||||||
<meshBasicMaterial color="yellow" />
|
/>
|
||||||
</mesh>
|
</>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{startConePosition && endConePosition && (
|
{points.map((point, index) => (
|
||||||
<Html
|
<Html
|
||||||
scale={THREE.MathUtils.clamp(
|
key={index}
|
||||||
startConePosition.distanceTo(endConePosition) * 0.25,
|
position={point}
|
||||||
0,
|
scale={0.5}
|
||||||
10
|
wrapperClass="measurement-label-wrapper"
|
||||||
)}
|
className="measurement-label"
|
||||||
position={[
|
|
||||||
(startConePosition.x + endConePosition.x) / 2,
|
|
||||||
(startConePosition.y + endConePosition.y) / 2,
|
|
||||||
(startConePosition.z + endConePosition.z) / 2,
|
|
||||||
]}
|
|
||||||
// class
|
|
||||||
wrapperClass="distance-text-wrapper"
|
|
||||||
className="distance-text"
|
|
||||||
// other
|
|
||||||
zIndexRange={[1, 0]}
|
zIndexRange={[1, 0]}
|
||||||
prepend
|
prepend
|
||||||
sprite
|
sprite
|
||||||
>
|
>
|
||||||
<div>
|
<div className="measurement-point"></div>
|
||||||
{(startConePosition.distanceTo(endConePosition) + (coneSize.height)).toFixed(2)} m
|
</Html>
|
||||||
</div>
|
))}
|
||||||
|
|
||||||
|
{linePoints && linePoints.length === 2 && (
|
||||||
|
<Html
|
||||||
|
position={[
|
||||||
|
(linePoints[0].x + linePoints[1].x) / 2,
|
||||||
|
(linePoints[0].y + linePoints[1].y) / 2,
|
||||||
|
(linePoints[0].z + linePoints[1].z) / 2,
|
||||||
|
]}
|
||||||
|
scale={0.5}
|
||||||
|
wrapperClass="distance-text-wrapper"
|
||||||
|
className="distance-text"
|
||||||
|
zIndexRange={[2, 1]}
|
||||||
|
prepend
|
||||||
|
sprite
|
||||||
|
>
|
||||||
|
<div>{linePoints[0].distanceTo(linePoints[1]).toFixed(2)} m</div>
|
||||||
</Html>
|
</Html>
|
||||||
)}
|
)}
|
||||||
</group>
|
</group>
|
||||||
|
|||||||
@@ -31,6 +31,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.draw-tools,
|
.draw-tools,
|
||||||
|
.transform-tools,
|
||||||
.general-options,
|
.general-options,
|
||||||
.activeDropicon {
|
.activeDropicon {
|
||||||
@include flex-center;
|
@include flex-center;
|
||||||
|
|||||||
@@ -1,15 +1,12 @@
|
|||||||
@use "../abstracts/variables" as *;
|
@use "../abstracts/variables" as *;
|
||||||
@use "../abstracts/mixins" as *;
|
@use "../abstracts/mixins" as *;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.resourceManagement-container {
|
.resourceManagement-container {
|
||||||
.navigation-wrapper {
|
.navigation-wrapper {
|
||||||
@include flex-space-between;
|
@include flex-space-between;
|
||||||
justify-content: space-around;
|
justify-content: space-around;
|
||||||
|
|
||||||
.navigation {
|
.navigation {
|
||||||
|
|
||||||
padding: 4px 12px;
|
padding: 4px 12px;
|
||||||
border-radius: 20px;
|
border-radius: 20px;
|
||||||
text-wrap: nowrap;
|
text-wrap: nowrap;
|
||||||
@@ -20,7 +17,6 @@
|
|||||||
background: var(--background-color-button);
|
background: var(--background-color-button);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.search-container {
|
.search-container {
|
||||||
@@ -74,7 +70,6 @@
|
|||||||
border-radius: 100px;
|
border-radius: 100px;
|
||||||
background: var(--background-color-button);
|
background: var(--background-color-button);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -104,7 +99,7 @@
|
|||||||
background: var(--background-color);
|
background: var(--background-color);
|
||||||
|
|
||||||
&.active {
|
&.active {
|
||||||
outline: 1px solid var(--Color-Hover, #CCACFF);
|
outline: 1px solid var(--Color-Hover, #ccacff);
|
||||||
}
|
}
|
||||||
|
|
||||||
header {
|
header {
|
||||||
@@ -127,29 +122,28 @@
|
|||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
width: 6px;
|
width: 6px;
|
||||||
height: 6px;
|
height: 6px;
|
||||||
outline: 1px solid #2F2C32;
|
outline: 1px solid #2f2c32;
|
||||||
|
|
||||||
position: absolute;
|
position: absolute;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
right: 0;
|
right: 0;
|
||||||
|
|
||||||
&.Active {
|
&.Active {
|
||||||
background-color: #44E5C6;
|
background-color: #44e5c6;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.details {
|
.details {
|
||||||
|
max-width: 144px;
|
||||||
.employee-id {
|
.employee-id {
|
||||||
color: #B7B7C6;
|
color: #b7b7c6;
|
||||||
font-size: $tiny;
|
font-size: $tiny;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.see-more {
|
.see-more {
|
||||||
|
|
||||||
padding: 4px 12px;
|
padding: 4px 12px;
|
||||||
border-radius: 20px;
|
border-radius: 20px;
|
||||||
text-wrap: nowrap;
|
text-wrap: nowrap;
|
||||||
@@ -165,7 +159,7 @@
|
|||||||
left: 0;
|
left: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 1px;
|
height: 1px;
|
||||||
background-color: #6F6F7A;
|
background-color: #6f6f7a;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -191,7 +185,7 @@
|
|||||||
gap: 3px;
|
gap: 3px;
|
||||||
|
|
||||||
.label-text {
|
.label-text {
|
||||||
color: #B7B7C6;
|
color: #b7b7c6;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -205,10 +199,12 @@
|
|||||||
.stat-item {
|
.stat-item {
|
||||||
border-radius: 100px;
|
border-radius: 100px;
|
||||||
@include flex-space-between;
|
@include flex-space-between;
|
||||||
background: linear-gradient(162.53deg,
|
background: linear-gradient(
|
||||||
|
162.53deg,
|
||||||
rgba(51, 51, 51, 0.7) 0%,
|
rgba(51, 51, 51, 0.7) 0%,
|
||||||
rgba(45, 36, 55, 0.7) 106.84%);
|
rgba(45, 36, 55, 0.7) 106.84%
|
||||||
border: 1px solid #FFFFFF0D;
|
);
|
||||||
|
border: 1px solid #ffffff0d;
|
||||||
padding: 6px;
|
padding: 6px;
|
||||||
|
|
||||||
.stat-wrapper {
|
.stat-wrapper {
|
||||||
@@ -241,7 +237,7 @@
|
|||||||
|
|
||||||
.header {
|
.header {
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
color: #B7B7C6;
|
color: #b7b7c6;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -255,16 +251,15 @@
|
|||||||
button {
|
button {
|
||||||
line-height: 133%;
|
line-height: 133%;
|
||||||
font-size: 11px;
|
font-size: 11px;
|
||||||
border: 1px solid var(--Linear-Border, #564B69);
|
border: 1px solid var(--Linear-Border, #564b69);
|
||||||
border-radius: 100px;
|
border-radius: 100px;
|
||||||
padding: 4px 0;
|
padding: 4px 0;
|
||||||
|
|
||||||
&:last-child {
|
&:last-child {
|
||||||
background-color: #CC2C1E;
|
background-color: #cc2c1e;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -277,17 +272,14 @@
|
|||||||
|
|
||||||
.assetManagement-card-wrapper {
|
.assetManagement-card-wrapper {
|
||||||
padding: 16px;
|
padding: 16px;
|
||||||
border: 1px solid #564B69;
|
border: 1px solid #564b69;
|
||||||
border-radius: 20px;
|
border-radius: 20px;
|
||||||
gap: 10px;
|
gap: 10px;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
header {
|
header {
|
||||||
border-bottom: 1px solid #595965;
|
border-bottom: 1px solid #595965;
|
||||||
padding-bottom: 8px;
|
padding-bottom: 8px;
|
||||||
|
|
||||||
|
|
||||||
.header-wrapper {
|
.header-wrapper {
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: 8px;
|
gap: 8px;
|
||||||
@@ -312,20 +304,23 @@
|
|||||||
@include flex-space-between;
|
@include flex-space-between;
|
||||||
|
|
||||||
.asset-details {
|
.asset-details {
|
||||||
|
display: flex;
|
||||||
// .asset-name{
|
gap: 4px;
|
||||||
// overflow: hidden;
|
width: 100%;
|
||||||
// }
|
max-width: 160px;
|
||||||
|
.input-value {
|
||||||
|
width: fit-content;
|
||||||
|
}
|
||||||
.asset-model {
|
.asset-model {
|
||||||
color: var(--text-disabled);
|
color: var(--text-disabled);
|
||||||
|
display: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.asset-status-wrapper {
|
.asset-status-wrapper {
|
||||||
padding: 4px 8px;
|
padding: 4px 8px;
|
||||||
border: 1px solid var(--text-color-dark, #F3F3FDD9);
|
border: 1px solid var(--text-color-dark, #f3f3fdd9);
|
||||||
border-radius: 100px;
|
border-radius: 100px;
|
||||||
@include flex-space-between;
|
@include flex-space-between;
|
||||||
gap: 4px;
|
gap: 4px;
|
||||||
@@ -336,7 +331,7 @@
|
|||||||
border-radius: 100%;
|
border-radius: 100%;
|
||||||
|
|
||||||
&.Online {
|
&.Online {
|
||||||
background-color: #44E5C6;
|
background-color: #44e5c6;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -384,7 +379,7 @@
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
height: 5px;
|
height: 5px;
|
||||||
border-radius: 20px;
|
border-radius: 20px;
|
||||||
background-color: #6F6F7A;
|
background-color: #6f6f7a;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
.filled-value {
|
.filled-value {
|
||||||
@@ -393,7 +388,7 @@
|
|||||||
left: 0;
|
left: 0;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
width: 10px;
|
width: 10px;
|
||||||
background-color: #CCACFF;
|
background-color: #ccacff;
|
||||||
border-radius: 20px;
|
border-radius: 20px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -407,7 +402,7 @@
|
|||||||
gap: 10px;
|
gap: 10px;
|
||||||
|
|
||||||
&__label {
|
&__label {
|
||||||
color: #B7B7C6;
|
color: #b7b7c6;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -448,7 +443,7 @@
|
|||||||
|
|
||||||
&.openViewMore {
|
&.openViewMore {
|
||||||
outline-offset: -1px;
|
outline-offset: -1px;
|
||||||
outline: 1px solid var(--Color-Hover, #CCACFF);
|
outline: 1px solid var(--Color-Hover, #ccacff);
|
||||||
|
|
||||||
header {
|
header {
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -456,7 +451,227 @@
|
|||||||
gap: 6px;
|
gap: 6px;
|
||||||
|
|
||||||
.header-wrapper {
|
.header-wrapper {
|
||||||
|
gap: 14px;
|
||||||
|
|
||||||
|
.asset-details-container {
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: start;
|
||||||
|
justify-content: start;
|
||||||
|
|
||||||
|
.asset-details {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 4px;
|
||||||
|
max-width: 144px;
|
||||||
|
.input-value {
|
||||||
|
text-wrap: wrap;
|
||||||
|
font-size: 1rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.asset-status-wrapper {
|
||||||
|
margin-top: 8px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ASSET MANAGEMENT
|
||||||
|
.assetManagement-container {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 6px;
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
.assetManagement-card-wrapper {
|
||||||
|
padding: 16px;
|
||||||
|
border: 1px solid #564b69;
|
||||||
|
border-radius: 20px;
|
||||||
|
gap: 10px;
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
header {
|
||||||
|
border-bottom: 1px solid #595965;
|
||||||
|
padding-bottom: 8px;
|
||||||
|
|
||||||
|
.header-wrapper {
|
||||||
|
display: flex;
|
||||||
|
gap: 8px;
|
||||||
|
|
||||||
|
.icon {
|
||||||
|
min-width: 28px;
|
||||||
|
height: 28px;
|
||||||
|
border-radius: 7px;
|
||||||
|
@include flex-center;
|
||||||
|
background: var(--background-color-button);
|
||||||
|
}
|
||||||
|
|
||||||
|
.drop-icon {
|
||||||
|
position: absolute;
|
||||||
|
top: 18px;
|
||||||
|
right: 16px;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.asset-image {
|
||||||
|
width: 114px;
|
||||||
|
height: 112px;
|
||||||
|
border-radius: 15.2px;
|
||||||
|
object-fit: cover;
|
||||||
|
}
|
||||||
|
|
||||||
|
.asset-details-container {
|
||||||
|
width: 100%;
|
||||||
|
@include flex-space-between;
|
||||||
|
|
||||||
|
.asset-details {
|
||||||
|
// .asset-name{
|
||||||
|
// overflow: hidden;
|
||||||
|
// }
|
||||||
|
.asset-model {
|
||||||
|
color: var(--text-disabled);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.asset-status-wrapper {
|
||||||
|
padding: 4px 8px;
|
||||||
|
border: 1px solid var(--text-color-dark, #f3f3fdd9);
|
||||||
|
border-radius: 100px;
|
||||||
|
@include flex-space-between;
|
||||||
|
gap: 4px;
|
||||||
|
|
||||||
|
.indication {
|
||||||
|
width: 6px;
|
||||||
|
height: 6px;
|
||||||
|
border-radius: 100%;
|
||||||
|
|
||||||
|
&.Online {
|
||||||
|
background-color: #44e5c6;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.status {
|
||||||
|
font-size: $small;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.asset-contents {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 3px;
|
||||||
|
|
||||||
|
.asset-wrapper {
|
||||||
|
@include flex-space-between;
|
||||||
|
padding: 6px 0;
|
||||||
|
gap: 20px;
|
||||||
|
|
||||||
|
.key-wrapper,
|
||||||
|
.viewMore {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 6px;
|
||||||
|
|
||||||
|
.icon {
|
||||||
|
@include flex-center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.viewMore {
|
||||||
|
padding: 8px;
|
||||||
|
border-radius: 100px;
|
||||||
|
background: var(--background-color-button);
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.progress-wrapper {
|
||||||
|
flex: 1;
|
||||||
|
@include flex-space-between;
|
||||||
|
gap: 4px;
|
||||||
|
|
||||||
|
.progress-bar {
|
||||||
|
width: 100%;
|
||||||
|
height: 5px;
|
||||||
|
border-radius: 20px;
|
||||||
|
background-color: #6f6f7a;
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
.filled-value {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
height: 100%;
|
||||||
|
width: 10px;
|
||||||
|
background-color: #ccacff;
|
||||||
|
border-radius: 20px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.asset-estimate {
|
||||||
|
margin-top: 5px;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 10px;
|
||||||
|
|
||||||
|
&__label {
|
||||||
|
color: #b7b7c6;
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
&__value {
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
&__unit-cost {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
&__breakdown {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: space-between;
|
||||||
|
gap: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
&__view-button {
|
||||||
|
cursor: pointer;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
gap: 4px;
|
||||||
|
background-color: var(--background-color-button);
|
||||||
|
border-radius: 20px;
|
||||||
|
padding: 8px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
&__view-text {
|
||||||
|
font-weight: 500;
|
||||||
|
// color: #4A4AFF;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&.openViewMore {
|
||||||
|
outline-offset: -1px;
|
||||||
|
outline: 1px solid var(--Color-Hover, #ccacff);
|
||||||
|
|
||||||
|
header {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 6px;
|
||||||
|
|
||||||
|
.header-wrapper {
|
||||||
gap: 20px;
|
gap: 20px;
|
||||||
|
|
||||||
.asset-details-container {
|
.asset-details-container {
|
||||||
@@ -480,12 +695,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -130,15 +130,25 @@
|
|||||||
svg {
|
svg {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
.c-jiwtRJ{
|
.c-jiwtRJ {
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.stats{
|
.stats {
|
||||||
top: auto !important;
|
top: auto !important;
|
||||||
bottom: 36px !important;
|
bottom: 36px !important;
|
||||||
left: 12px !important;
|
left: 12px !important;
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.measurement-point {
|
||||||
|
height: 12px;
|
||||||
|
width: 12px;
|
||||||
|
border-radius: 50%;
|
||||||
|
background: #b18ef1;
|
||||||
|
outline: 2px solid black;
|
||||||
|
outline-offset: -1px;
|
||||||
|
transform: translate(-50%, -50%);
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user