getHttpBookmarkClient().list()}
editHandler={{
onDelete: (timeline) => {
return getHttpBookmarkClient()
.delete(timeline)
.catch((e) => {
pushAlert({
message: "home.message.deleteBookmarkFail",
type: "danger",
});
throw e;
});
},
onMove: (timeline, index, offset) => {
return getHttpBookmarkClient()
.move(
{ timeline, newPosition: index + offset + 1 } // +1 because backend contract: index starts at 1
)
.catch((e) => {
pushAlert({
message: "home.message.moveBookmarkFail",
type: "danger",
});
throw e;
});
},
}}
/>
getHttpHighlightClient().list()}
editHandler={
user.hasHighlightTimelineAdministrationPermission
? {
onDelete: (timeline) => {
return getHttpHighlightClient()
.delete(timeline)
.catch((e) => {
pushAlert({
message: "home.message.deleteHighlightFail",
type: "danger",
});
throw e;
});
},
onMove: (timeline, index, offset) => {
return getHttpHighlightClient()
.move(
{ timeline, newPosition: index + offset + 1 } // +1 because backend contract: index starts at 1
)
.catch((e) => {
pushAlert({
message: "home.message.moveHighlightFail",
type: "danger",
});
throw e;
});
},
}
: undefined
}
/>