Skip to content

Commit

Permalink
Added mode selection for map
Browse files Browse the repository at this point in the history
  • Loading branch information
Alien501 committed Dec 5, 2024
1 parent cb6ac31 commit 329e897
Show file tree
Hide file tree
Showing 14 changed files with 495 additions and 161 deletions.
Binary file added admin/public/pickaxe.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion admin/src/components/custom/drawingMap.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ const MapPolygonDrawer = ({setCoordinate}) => {
...prev,
coordinates: newCoordinates
};
});
});cd

console.log('Drawn Polygons:', polygons);
}
Expand Down
6 changes: 3 additions & 3 deletions admin/src/pages/Dashboard2.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ const NewDashboard = () => {
</div>
<div id="dashboard-section-container" className="grid gap-1 grid-cols-2 mt-4">
<div>
<div className="flex space-x-2 justify-between group">
<div className="flex h-[100px] space-x-2 justify-between group">
<StatsCard
icon={
<DialogModel dialogTrigger={
Expand Down Expand Up @@ -175,8 +175,8 @@ const NewDashboard = () => {
/>
</div>
<div className="h-full">
<Card className="h-[83%]">
<CardContent className="h-full p-4">
<Card className="h-[90%]">
<CardContent className="h-[100%] p-4">
<MiningMap />
</CardContent>
</Card>
Expand Down
36 changes: 34 additions & 2 deletions admin/src/pages/MasterAsset.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,9 @@ export default function MasterAsset() {
name: "",
description: "",
assetType: "",
assetSection: ""
assetSection: "",
latitude: 0.0,
longitude: 0.0
});

async function onDeleteAssetType(id: number) {
Expand Down Expand Up @@ -224,7 +226,9 @@ export default function MasterAsset() {
name: newAsset.name,
description: newAsset.description,
assetType: parseInt(newAsset.assetType),
assetSection: parseInt(newAsset.assetSection)
assetSection: parseInt(newAsset.assetSection),
latitude: parseFloat(newAsset.latitude),
longitude: parseFloat(newAsset.longitude),
});

setAssets([...assets, response.data]);
Expand Down Expand Up @@ -430,6 +434,34 @@ export default function MasterAsset() {
</SelectContent>
</Select>
</div>
<div className="grid grid-cols-4 items-center gap-4">
<Label htmlFor="asset-latitude" className="text-right">
Latitude
</Label>
<Input
id="asset-latitude"
value={newAsset.latitude}
onChange={(e) => setNewAsset({
...newAsset,
latitude: e.target.value
})}
className="col-span-3"
/>
</div>
<div className="grid grid-cols-4 items-center gap-4">
<Label htmlFor="asset-longitude" className="text-right">
Longitude
</Label>
<Input
id="asset-longitude"
value={newAsset.longitude}
onChange={(e) => setNewAsset({
...newAsset,
longitude: e.target.value
})}
className="col-span-3"
/>
</div>
<Button onClick={handleAddAsset}>
Create Asset
</Button>
Expand Down
Loading

0 comments on commit 329e897

Please sign in to comment.