added getItems for updating panel state
This commit is contained in:
parent
6c98015340
commit
5f6fff52ae
@ -72,11 +72,11 @@ const AllSessionsBlock = (props) => {
|
||||
};
|
||||
|
||||
export default inject(({ peopleStore }) => {
|
||||
const { items, isLoading, fetchData, onClickLogoutAllExceptThis } =
|
||||
const { getItems, isLoading, fetchData, onClickLogoutAllExceptThis } =
|
||||
peopleStore.selectionStore;
|
||||
|
||||
return {
|
||||
items,
|
||||
items: getItems,
|
||||
isLoading,
|
||||
fetchData,
|
||||
onClickLogoutAllExceptThis,
|
||||
|
@ -230,12 +230,12 @@ const LastSessionBlock = (props) => {
|
||||
export default inject(({ setup, peopleStore }) => {
|
||||
const { setDisableDialogVisible, setLogoutAllDialogVisible } = setup;
|
||||
|
||||
const { isMe, getFromDateAgo, items, setDisplayName } =
|
||||
const { getItems, isMe, getFromDateAgo, setDisplayName } =
|
||||
peopleStore.selectionStore;
|
||||
|
||||
return {
|
||||
isMe,
|
||||
items,
|
||||
items: getItems,
|
||||
getFromDateAgo,
|
||||
setDisplayName,
|
||||
setDisableDialogVisible,
|
||||
|
@ -505,6 +505,11 @@ class SelectionStore {
|
||||
return userIds.includes(id);
|
||||
}
|
||||
|
||||
get getItems() {
|
||||
if (!this.items) return {};
|
||||
return this.allSessions.find((item) => item.id === this.items.id) ?? {};
|
||||
}
|
||||
|
||||
convertDate = (t, dateString, locale) => {
|
||||
const parsedDate = moment(new Date(dateString).toISOString());
|
||||
const now = moment();
|
||||
|
Loading…
Reference in New Issue
Block a user