diff --git a/src/pages/map/edit/index.tsx b/src/pages/map/edit/index.tsx index 83f36e80..e5c64525 100644 --- a/src/pages/map/edit/index.tsx +++ b/src/pages/map/edit/index.tsx @@ -5,6 +5,8 @@ import { Button, Code, Divider, + Grid, + GridCol, Group, Indicator, Loader, @@ -401,426 +403,439 @@ const ClaimEditPage: NextPage = () => { oLat={clientPos.lat} oLng={clientPos.lng} /> - -
- {!selected ? ( - <> -

Edit Claims

-

Select Claim

-

- Select a Claim on the Map to edit it. You can select your own Claims or Claims of - BuildTeams in which you have the correct Permissions. -

-

Edit Claim Area

-

- When having a Claim selected, you can click on it again to enter edit mode. In this - mode you can drag all corners and add new ones by draging the smaller dots between - corners. All corners you add will automatically snap to other corners and claims in - the area. -

-

Edit Claim Properties

-

- If you have selected a Claim on the Map, all its properties which you can edit will - appear here. The area and building count will be automatically calculated once you - save your edit. -

- } mt="xl"> - Do not forget to save your changes, they will be overriden once you reload the Page. - -

Create Claim

-

- Click on the button below to start creating a new Claim on the Map. Left click to - add a edge, double click to finish. -

- - - ) : ( - <> -

Edit Claim

- - {isAbleToUpdate(selected).type == 'TEAM' && ( - } - color="yellow" - mb="lg" - > - This claim does not belong to you. You are editing it on behalf of{' '} - {selected.properties.buildTeam.name}. - - )} -

Claim Properties

- } mb="lg"> - Images can only be added and removed on the main Map as of right now. + + + + {!selected ? ( + <> +

Edit Claims

+

Select Claim

+

+ Select a Claim on the Map to edit it. You can select your own Claims or Claims of + BuildTeams in which you have the correct Permissions. +

+

Edit Claim Area

+

+ When having a Claim selected, you can click on it again to enter edit mode. In + this mode you can drag all corners and add new ones by draging the smaller dots + between corners. All corners you add will automatically snap to other corners and + claims in the area. +

+

Edit Claim Properties

+

+ If you have selected a Claim on the Map, all its properties which you can edit + will appear here. The area and building count will be automatically calculated + once you save your edit. +

+ } mt="xl"> + Do not forget to save your changes, they will be overriden once you reload the + Page. - {selected.properties?.new == true && ( - ({ + label: b.name, + value: b.id, + disabled: !b.allowBuilderClaim, + }))} + mb="md" + onChange={(v) => { + const bt = userData?.joinedBuildTeams.find((bt: any) => bt.id == v); + handleUpdate( + 'buildTeam', + bt ? { id: bt.id, slug: bt.slug, name: bt.name } : undefined, + ); + }} + placeholder={ + userDataLoading ? 'Loading aviable BuildTeams...' : 'Select a BuildTeam' + } + /> + )} + handleUpdate('name', e.target.value)} mb="md" - onChange={(v) => { - const bt = userData?.joinedBuildTeams.find((bt: any) => bt.id == v); - handleUpdate( - 'buildTeam', - bt ? { id: bt.id, slug: bt.slug, name: bt.name } : undefined, - ); - }} - placeholder={ - userDataLoading ? 'Loading aviable BuildTeams...' : 'Select a BuildTeam' - } /> - )} - handleUpdate('name', e.target.value)} - mb="md" - /> - handleUpdate('city', e.target.value)} - mb="md" - /> -