mirror of
https://github.com/utopia-os/utopia-ui.git
synced 2025-12-13 07:46:10 +00:00
color and layout fix
This commit is contained in:
parent
a91f8073ab
commit
b08915e97e
@ -80,6 +80,7 @@ function usePermissionsManager(initialPermissions: Permission[]): {
|
||||
item.user_created?.id === user?.id
|
||||
)
|
||||
)
|
||||
// || ( !user && p.role == null )
|
||||
);
|
||||
}
|
||||
},
|
||||
|
||||
@ -40,7 +40,7 @@ export function ActionButton({ item, triggerAddButton, triggerItemSelected, exis
|
||||
</svg>
|
||||
</button>}
|
||||
</div>
|
||||
<DialogModal title={"Select"} isOpened={modalOpen} onClose={() => (setModalOpen(false))} className="!tw-w-xl !sm:tw-w-2xl tw-min-h-80 tw-bg-base-200">
|
||||
<DialogModal title={"Select"} isOpened={modalOpen} onClose={() => (setModalOpen(false))} className="tw-w-xl sm:tw-w-2xl tw-min-h-80 tw-bg-base-200">
|
||||
<TextInput defaultValue='' placeholder='🔍 Search' containerStyle='lg:col-span-2 tw-m-4 ' updateFormValue={(val) => { setSearch(val) }}></TextInput>
|
||||
<div className='tw-grid tw-grid-cols-1 sm:tw-grid-cols-2'>
|
||||
{filterdItems.filter(item => {
|
||||
|
||||
@ -6,7 +6,7 @@ import { Item, Tag } from '../../types';
|
||||
import { useMap } from 'react-leaflet';
|
||||
import { LatLng } from 'leaflet';
|
||||
import { PopupStartEndInput, StartEndView, TextView } from '../Map';
|
||||
import { useAddTag, useTags } from '../Map/hooks/useTags';
|
||||
import { useAddTag, useGetItemTags, useTags } from '../Map/hooks/useTags';
|
||||
import { useAddFilterTag, useFilterTags, useResetFilterTags } from '../Map/hooks/useFilter';
|
||||
import { useHasUserPermission } from '../Map/hooks/usePermissions';
|
||||
import { TextAreaInput, TextInput } from '../Input';
|
||||
@ -54,6 +54,8 @@ export function OverlayItemProfile() {
|
||||
const clusterRef = useClusterRef();
|
||||
const leafletRefs = useLeafletRefs();
|
||||
const addFilterTag = useAddFilterTag();
|
||||
const getItemTags = useGetItemTags();
|
||||
|
||||
|
||||
|
||||
const tabRef = useRef<HTMLFormElement>(null);
|
||||
@ -344,7 +346,7 @@ export function OverlayItemProfile() {
|
||||
|
||||
|
||||
)}
|
||||
{updatePermission && <ActionButton collection="items" item={item} existingRelations={relations} triggerItemSelected={linkItem} color={item.color}></ActionButton>}
|
||||
{updatePermission && <ActionButton collection="items" item={item} existingRelations={relations} triggerItemSelected={linkItem} color={item.color || (getItemTags(item)[0] && getItemTags(item)[0].color)}></ActionButton>}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user