diff --git a/src/Components/Profile/OverlayItemProfile.tsx b/src/Components/Profile/OverlayItemProfile.tsx index 3cb6cb38..b348818f 100644 --- a/src/Components/Profile/OverlayItemProfile.tsx +++ b/src/Components/Profile/OverlayItemProfile.tsx @@ -72,15 +72,9 @@ export function OverlayItemProfile({ userType }: { userType: string }) { useEffect(() => { - console.log(userType); - setProfile(items.find(i => (i.user_created?.id === item.user_created?.id) && i.layer?.itemType.name === userType)); }, [item, items]) - useEffect(() => { - console.log(profile); - - }, [profile]) @@ -98,11 +92,6 @@ export function OverlayItemProfile({ userType }: { userType: string }) { const itemId = location.pathname.split("/")[2]; const item = items.find(i => i.id === itemId); item && setItem(item); - console.log(item); - - - - }, [items, location]) useEffect(() => { @@ -203,12 +192,9 @@ export function OverlayItemProfile({ userType }: { userType: string }) { } }); const uuid = crypto.randomUUID(); - console.log(layers); const layer = layers.find(l => l.name.toLocaleLowerCase().replace("s", "") == addItemPopupType.toLocaleLowerCase()) - console.log(layer); - let success = false; try { await layer?.api?.createItem!({ ...formItem, id: uuid, type: type, parent: item.id }); @@ -310,9 +296,9 @@ export function OverlayItemProfile({ userType }: { userType: string }) { className={`${template == "onepager" && '!tw-p-0'} tw-mx-4 tw-mt-4 tw-max-h-[calc(100dvh-96px)] tw-h-[calc(100dvh-96px)] md:tw-w-[calc(50%-32px)] tw-w-[calc(100%-32px)] tw-min-w-80 tw-max-w-3xl !tw-left-0 sm:!tw-left-auto tw-top-0 tw-bottom-0 tw-transition-opacity tw-duration-500 ${!selectPosition ? 'tw-opacity-100 tw-pointer-events-auto' : 'tw-opacity-0 tw-pointer-events-none'}`}> <> -
+
navigate("/edit-item/" + item.id)} setPositionCallback={() => { map.closePopup(); setSelectPosition(item); navigate("/") }} big truncateSubname={false} /> - {template=="onepager" && }
-
- {template == "onepager" && - <> - {item.user_created.first_name && ( - - )} + {template == "onepager" && +
- {/* Description Section */} -
- -
+ {item.user_created.first_name && ( + + )} - {/* Next Appointment Section */} - {item.next_appointment && ( -
-

Nächste Termine

-
- -
+ {/* Description Section */} +
+ +
+ + {/* Next Appointment Section */} + {item.next_appointment && ( +
+

Nächste Termine

+
+
- )}; +
+ )}; - {/* Relations Section */} - {/*{d.relations && (*/} - {/*
*/} - {/*

Projekte

*/} - {/* {d.relations.map((project, index) => (*/} - {/* */} - {/* ))}*/} - {/*
*/} - {/*)}*/} - - } + {/* Relations Section */} + {/*{d.relations && (*/} + {/*
*/} + {/*

Projekte

*/} + {/* {d.relations.map((project, index) => (*/} + {/* */} + {/* ))}*/} + {/*
*/} + {/*)}*/} +
+ } - {template == "simple" && -
+ {template == "simple" && +
+ + + +
+ } + + {template == "tabs" && +
+ updateActiveTab(1)} /> +
+ {item.layer?.itemType.show_start_end && +
+ }
- } - {template == "tabs" && -
- updateActiveTab(1)} /> -
- {item.layer?.itemType.show_start_end && -
- } - -
+ {item.layer?.itemType.offers_and_needs && - {item.layer?.itemType.offers_and_needs && + <> - <> - - updateActiveTab(3)} /> -
-
-
- { - offers.length > 0 ? -
-

Offers

- < div className='tw-flex tw-flex-wrap tw-mb-4'> - { - offers.map(o => { - console.log(o); - addFilterTag(o) - }} />) - } -
-
: "" - } - { - needs.length > 0 ? -
-

Needs

- < div className='tw-flex tw-flex-wrap tw-mb-4'> - { - needs.map(n => addFilterTag(n)} />) - } -
-
: "" - } -
-
-
- - - - } - - {item.layer?.itemType.relations && - <> - updateActiveTab(7)} /> -
-
-
- {relations && relations.map(i => - - -
navigate('/item/' + i.id)}> - -
- + updateActiveTab(3)} /> +
+
+
+ { + offers.length > 0 ? +
+

Offers

+ < div className='tw-flex tw-flex-wrap tw-mb-4'> + { + offers.map(o => { + console.log(o); + addFilterTag(o) + }} />) + }
-
- )} - {updatePermission && } - -
+
: "" + } + { + needs.length > 0 ? +
+

Needs

+ < div className='tw-flex tw-flex-wrap tw-mb-4'> + { + needs.map(n => addFilterTag(n)} />) + } +
+
: "" + }
- - } -
- } -
+
+ + + + } + + {item.layer?.itemType.relations && + <> + updateActiveTab(7)} /> +
+
+
+ {relations && relations.map(i => + + +
navigate('/item/' + i.id)}> + +
+ +
+
+ )} + {updatePermission && } + +
+
+
+ + } +
+ }