-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
4247 - Data History: Split activities vs lastApproved comparison mode (…
- Loading branch information
Showing
30 changed files
with
159 additions
and
125 deletions.
There are no files selected for viewing
4 changes: 2 additions & 2 deletions
4
src/client/components/Navigation/NavAssessment/History/History.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
import { DataSlice } from 'client/store/data/slice' | ||
|
||
import { clearTableData } from './clearTableData' | ||
import { copyPreviousDatasources } from './copyPreviousDatasources' | ||
import { createContact } from './createContact' | ||
import { deleteContact } from './deleteContact' | ||
import { deleteDataSource } from './deleteDataSource' | ||
import { getContacts } from './getContacts' | ||
import { getDescription } from './getDescription' | ||
import { getLinkedDataSources } from './getLinkedDataSources' | ||
import { getNodeValuesEstimations } from './getNodeValuesEstimations' | ||
import { getODPLastUpdatedTimestamp } from './getODPLastUpdatedTimestamp' | ||
import { getTableData } from './getTableData' | ||
import { postEstimate } from './postEstimate' | ||
import { setNodeValues } from './setNodeValues' | ||
import { updateContact } from './updateContact' | ||
import { updateDescription } from './updateDescription' | ||
import { updateNodeValues } from './updateNodeValues' | ||
|
||
export const DataActions = { | ||
...DataSlice.actions, | ||
// Table data | ||
setNodeValues, | ||
clearTableData, | ||
getTableData, | ||
updateNodeValues, | ||
getNodeValuesEstimations, | ||
|
||
// Original Data Point | ||
getODPLastUpdatedTimestamp, | ||
|
||
// Estimations | ||
postEstimate, | ||
|
||
// Descriptions | ||
getDescription, | ||
updateDescription, | ||
copyPreviousDatasources, | ||
deleteDataSource, | ||
getLinkedDataSources, | ||
|
||
// Contacts | ||
createContact, | ||
deleteContact, | ||
getContacts, | ||
updateContact, | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { DataSelector } from 'client/store/data/selectors' | ||
import { HistoryActivitiesState } from 'client/store/data/state' | ||
import { useAppSelector } from 'client/store/store' | ||
|
||
export const useHistoryActivities = (): HistoryActivitiesState => { | ||
return useAppSelector(DataSelector.History.getHistoryActivities) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { Draft, PayloadAction } from '@reduxjs/toolkit' | ||
import { Objects } from 'utils/objects' | ||
|
||
import { DataState, HistoryActivitiesItemState } from 'client/store/data/state' | ||
|
||
export const toggleHistoryActivities = (state: Draft<DataState>, action: PayloadAction<HistoryActivitiesItemState>) => { | ||
const { labelKey, target } = action.payload | ||
|
||
if (state.history.activities?.items?.[target]) { | ||
Objects.unset(state.history.activities.items, [target]) | ||
} else { | ||
const path = ['history', 'activities', 'items', target] | ||
Objects.setInPath({ obj: state, path, value: { labelKey, target } }) | ||
} | ||
return state | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.