updateActiveTab(1)} />
-
setState(prevState => ({
+
+ {item.layer.itemType.show_start_end_input &&
+
setState(prevState => ({
...prevState,
- text: v
- }))} containerStyle='tw-h-full' inputStyle='tw-h-full tw-border-t-0 tw-rounded-tl-none' />
+ end: e
+ }))}
+ updateStartValue={(s) => setState(prevState => ({
+ ...prevState,
+ start: s
+ }))}>
+ }
+
+
setState(prevState => ({
+ ...prevState,
+ text: v
+ }))} containerStyle='tw-grow' inputStyle={`tw-h-full ${!item.layer.itemType.show_start_end_input && "tw-border-t-0 tw-rounded-tl-none"}`} />
+
+ setState(prevState => ({
+ ...prevState,
+ contact: c
+ }))}
+ inputStyle="tw-h-24"
+ containerStyle="tw-pt-4"
+ />
+
+
{item.layer?.itemType.offers_and_needs &&
<>
diff --git a/src/Components/Profile/Templates/TabsView.tsx b/src/Components/Profile/Templates/TabsView.tsx
index 6f8d4c19..eeeead02 100644
--- a/src/Components/Profile/Templates/TabsView.tsx
+++ b/src/Components/Profile/Templates/TabsView.tsx
@@ -48,11 +48,13 @@ export const TabsView = ({ item, offers, needs, relations, updatePermission, loa
aria-label="Info" checked={activeTab == 1 && true}
onChange={() => updateActiveTab(1)} />
+ className="tw-tab-content tw-bg-base-100 tw-rounded-box tw-h-[calc(100dvh-280px)] tw-overflow-y-auto fade tw-pt-2 tw-pb-4 tw-mb-4 tw-overflow-x-hidden tw-flex tw-flex-col">
{item.layer?.itemType.show_start_end &&
}
+
+
{item.layer?.itemType.offers_and_needs &&
diff --git a/src/Components/Profile/itemFunctions.ts b/src/Components/Profile/itemFunctions.ts
index 45af4d53..25343946 100644
--- a/src/Components/Profile/itemFunctions.ts
+++ b/src/Components/Profile/itemFunctions.ts
@@ -119,23 +119,24 @@ export const onUpdateItem = async (state, item, tags, addTag, setLoading, naviga
existingNeed && needs_updates.push(existingNeed.id)
!existingNeed && needs_updates.push({ items_id: item?.id, tags_id: n.id })
!existingNeed && !tags.some(t => t.id === n.id) && addTag({ ...n, offer_or_need: true })
- });
-
+ });
// update profile item in current state
changedItem = {
id: state.id,
- group_type: state.groupType,
- status: state.status,
name: state.name,
- subname: state.subname,
- text: state.text,
- color: state.color,
+ ...state.subname && {subname: state.subname},
+ ...state.text && {text: state.text},
+ ...state.color && {color: state.color},
position: item.position,
- contact: state.contact,
- telephone: state.telephone,
+ ...state.groupType && {group_type: state.groupType},
+ ...state.status && {status: state.status},
+ ...state.contact && {contact: state.contact},
+ ...state.telephone && {telephone: state.telephone},
+ ...state.end && {end: state.end},
+ ...state.start && {start: state.start},
...state.markerIcon && { markerIcon: state.markerIcon },
- next_appointment: state.nextAppointment,
+ ...state.nextAppointment && {next_appointment: state.nextAppointment},
...state.image.length > 10 && { image: state.image },
...state.offers.length > 0 && { offers: offer_updates },
...state.needs.length > 0 && { needs: needs_updates }