-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Got the drawers working again to reflect changes from invalidated queries #23
Merged
DaleMcGrew
merged 2 commits into
wevote:develop
from
SailingSteve:steveStaffClientFeb6-420pm
Feb 8, 2025
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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 |
---|---|---|
@@ -1,34 +1,34 @@ | ||
import Dispatcher from '../common/dispatcher/Dispatcher'; | ||
|
||
export default { | ||
personListRetrieve (searchText = '') { | ||
// console.log('PersonActions, personListRetrieve searchText:', searchText); | ||
if (searchText) { | ||
Dispatcher.loadEndpoint('person-list-retrieve', { | ||
searchText, | ||
}); | ||
} else { | ||
Dispatcher.loadEndpoint('person-list-retrieve'); | ||
} | ||
}, | ||
|
||
personRetrieve (personId = '') { | ||
// console.log('PersonActions, personRetrieve personId:', personId); | ||
if (personId) { | ||
Dispatcher.loadEndpoint('person-retrieve', { | ||
personId, | ||
}); | ||
} else { | ||
Dispatcher.loadEndpoint('person-retrieve'); | ||
} | ||
}, | ||
|
||
personSave (personId = 0, incomingData = {}) { | ||
// console.log('PersonActions, personSave personId:', personId, ', incomingData:', incomingData); | ||
const data = { | ||
personId, | ||
...incomingData, | ||
}; | ||
Dispatcher.loadEndpoint('person-save', data); | ||
}, | ||
}; | ||
// import Dispatcher from '../common/dispatcher/Dispatcher'; | ||
// | ||
// export default { | ||
// personListRetrieve (searchText = '') { | ||
// // console.log('PersonActions, personListRetrieve searchText:', searchText); | ||
// if (searchText) { | ||
// Dispatcher.loadEndpoint('person-list-retrieve', { | ||
// searchText, | ||
// }); | ||
// } else { | ||
// Dispatcher.loadEndpoint('person-list-retrieve'); | ||
// } | ||
// }, | ||
// | ||
// personRetrieve (personId = '') { | ||
// // console.log('PersonActions, personRetrieve personId:', personId); | ||
// if (personId) { | ||
// Dispatcher.loadEndpoint('person-retrieve', { | ||
// personId, | ||
// }); | ||
// } else { | ||
// Dispatcher.loadEndpoint('person-retrieve'); | ||
// } | ||
// }, | ||
// | ||
// personSave (personId = 0, incomingData = {}) { | ||
// // console.log('PersonActions, personSave personId:', personId, ', incomingData:', incomingData); | ||
// const data = { | ||
// personId, | ||
// ...incomingData, | ||
// }; | ||
// Dispatcher.loadEndpoint('person-save', data); | ||
// }, | ||
// }; |
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 |
---|---|---|
@@ -1,80 +1,80 @@ | ||
import Dispatcher from '../common/dispatcher/Dispatcher'; | ||
|
||
export default { | ||
taskDefinitionListRetrieve (taskGroupId, searchText = '') { | ||
// console.log('TaskActions, taskDefinitionListRetrieve searchText:', searchText); | ||
if (searchText) { | ||
Dispatcher.loadEndpoint('task-definition-list-retrieve', { | ||
taskGroupId, | ||
searchText, | ||
}); | ||
} else { | ||
Dispatcher.loadEndpoint('task-definition-list-retrieve', { | ||
taskGroupId, | ||
}); | ||
} | ||
}, | ||
|
||
taskDefinitionSave (taskGroupId = -1, taskDefinitionId = -1, incomingData = {}) { | ||
// console.log('TaskActions, taskSave taskDefinitionId:', taskDefinitionId, ', incomingData:', incomingData); | ||
const data = { | ||
taskDefinitionId, | ||
taskGroupId, | ||
...incomingData, | ||
}; | ||
Dispatcher.loadEndpoint('task-definition-save', data); | ||
}, | ||
|
||
taskGroupListRetrieve (searchText = '') { | ||
// console.log('TaskActions, taskGroupListRetrieve searchText:', searchText); | ||
if (searchText) { | ||
Dispatcher.loadEndpoint('task-group-list-retrieve', { | ||
searchText, | ||
}); | ||
} else { | ||
Dispatcher.loadEndpoint('task-group-list-retrieve'); | ||
} | ||
}, | ||
|
||
taskGroupRetrieve (taskGroupId = '') { | ||
// console.log('TaskActions, taskGroupRetrieve taskGroupId:', taskGroupId); | ||
if (taskGroupId) { | ||
Dispatcher.loadEndpoint('task-group-retrieve', { | ||
taskGroupId, | ||
}); | ||
} else { | ||
Dispatcher.loadEndpoint('task-group-retrieve'); | ||
} | ||
}, | ||
|
||
taskGroupSave (taskGroupId = -1, incomingData = {}) { | ||
// console.log('TaskActions, taskGroupSave taskGroupId:', taskGroupId, ', incomingData:', incomingData); | ||
const data = { | ||
taskGroupId, | ||
...incomingData, | ||
}; | ||
Dispatcher.loadEndpoint('task-group-save', data); | ||
}, | ||
|
||
taskSave (personId = -1, taskDefinitionId = -1, taskGroupId = -1, incomingData = {}) { | ||
// console.log('TaskActions, taskSave personId:', personId, ', taskDefinitionId:', taskDefinitionId, ', ', taskGroupId:', taskGroupId, ', incomingData:', incomingData); | ||
const data = { | ||
personId, | ||
taskDefinitionId, | ||
taskGroupId, | ||
...incomingData, | ||
}; | ||
Dispatcher.loadEndpoint('task-save', data); | ||
}, | ||
|
||
taskStatusListRetrieve (personIdList = []) { | ||
// console.log('TaskActions, taskStatusListRetrieve personIdList:', personIdList); | ||
if (personIdList) { | ||
Dispatcher.loadEndpoint('task-status-list-retrieve', { | ||
personIdList, | ||
}); | ||
} else { | ||
Dispatcher.loadEndpoint('task-status-list-retrieve'); | ||
} | ||
}, | ||
}; | ||
// import Dispatcher from '../common/dispatcher/Dispatcher'; | ||
// | ||
// export default { | ||
// taskDefinitionListRetrieve (taskGroupId, searchText = '') { | ||
// // console.log('TaskActions, taskDefinitionListRetrieve searchText:', searchText); | ||
// if (searchText) { | ||
// Dispatcher.loadEndpoint('task-definition-list-retrieve', { | ||
// taskGroupId, | ||
// searchText, | ||
// }); | ||
// } else { | ||
// Dispatcher.loadEndpoint('task-definition-list-retrieve', { | ||
// taskGroupId, | ||
// }); | ||
// } | ||
// }, | ||
// | ||
// taskDefinitionSave (taskGroupId = -1, taskDefinitionId = -1, incomingData = {}) { | ||
// // console.log('TaskActions, taskSave taskDefinitionId:', taskDefinitionId, ', incomingData:', incomingData); | ||
// const data = { | ||
// taskDefinitionId, | ||
// taskGroupId, | ||
// ...incomingData, | ||
// }; | ||
// Dispatcher.loadEndpoint('task-definition-save', data); | ||
// }, | ||
// | ||
// taskGroupListRetrieve (searchText = '') { | ||
// // console.log('TaskActions, taskGroupListRetrieve searchText:', searchText); | ||
// if (searchText) { | ||
// Dispatcher.loadEndpoint('task-group-list-retrieve', { | ||
// searchText, | ||
// }); | ||
// } else { | ||
// Dispatcher.loadEndpoint('task-group-list-retrieve'); | ||
// } | ||
// }, | ||
// | ||
// taskGroupRetrieve (taskGroupId = '') { | ||
// // console.log('TaskActions, taskGroupRetrieve taskGroupId:', taskGroupId); | ||
// if (taskGroupId) { | ||
// Dispatcher.loadEndpoint('task-group-retrieve', { | ||
// taskGroupId, | ||
// }); | ||
// } else { | ||
// Dispatcher.loadEndpoint('task-group-retrieve'); | ||
// } | ||
// }, | ||
// | ||
// taskGroupSave (taskGroupId = -1, incomingData = {}) { | ||
// // console.log('TaskActions, taskGroupSave taskGroupId:', taskGroupId, ', incomingData:', incomingData); | ||
// const data = { | ||
// taskGroupId, | ||
// ...incomingData, | ||
// }; | ||
// Dispatcher.loadEndpoint('task-group-save', data); | ||
// }, | ||
// | ||
// taskSave (personId = -1, taskDefinitionId = -1, taskGroupId = -1, incomingData = {}) { | ||
// // console.log('TaskActions, taskSave personId:', personId, ', taskDefinitionId:', taskDefinitionId, ', ', taskGroupId:', taskGroupId, ', incomingData:', incomingData); | ||
// const data = { | ||
// personId, | ||
// taskDefinitionId, | ||
// taskGroupId, | ||
// ...incomingData, | ||
// }; | ||
// Dispatcher.loadEndpoint('task-save', data); | ||
// }, | ||
// | ||
// taskStatusListRetrieve (personIdList = []) { | ||
// // console.log('TaskActions, taskStatusListRetrieve personIdList:', personIdList); | ||
// if (personIdList) { | ||
// Dispatcher.loadEndpoint('task-status-list-retrieve', { | ||
// personIdList, | ||
// }); | ||
// } else { | ||
// Dispatcher.loadEndpoint('task-status-list-retrieve'); | ||
// } | ||
// }, | ||
// }; |
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 |
---|---|---|
@@ -1,54 +1,54 @@ | ||
import Dispatcher from '../common/dispatcher/Dispatcher'; | ||
import PersonStore from '../stores/PersonStore'; // eslint-disable-line import/no-cycle | ||
import TeamStore from '../stores/TeamStore'; // eslint-disable-line import/no-cycle | ||
|
||
export default { | ||
addPersonToTeam (personId, teamId) { | ||
// console.log('TeamActions, addPersonToTeam personId:', personId, ', teamId:', teamId); | ||
const teamMemberFirstName = PersonStore.getFirstName(personId) || ''; | ||
const teamMemberLastName = PersonStore.getLastName(personId) || ''; | ||
const teamName = TeamStore.getTeamName(teamId) || ''; | ||
const data = { | ||
personId, | ||
teamId, | ||
teamMemberFirstName, | ||
teamMemberLastName, | ||
teamName, | ||
}; | ||
Dispatcher.loadEndpoint('add-person-to-team', data); | ||
}, | ||
|
||
removePersonFromTeam (personId, teamId) { | ||
// console.log('TeamActions, removePersonFromTeam personId:', personId, ', teamId:', teamId); | ||
const data = { | ||
personId, | ||
teamId, | ||
}; | ||
Dispatcher.loadEndpoint('remove-person-from-team', data); | ||
}, | ||
|
||
teamRetrieve (teamId = '') { | ||
// console.log('TeamActions, teamRetrieve teamId:', teamId); | ||
if (teamId) { | ||
Dispatcher.loadEndpoint('team-retrieve', { | ||
teamId, | ||
}); | ||
} else { | ||
Dispatcher.loadEndpoint('team-retrieve'); | ||
} | ||
}, | ||
|
||
teamListRetrieve () { | ||
// console.log('TeamActions, teamListRetrieve'); | ||
Dispatcher.loadEndpoint('team-list-retrieve'); | ||
}, | ||
|
||
teamSave (teamId = '', incomingData = {}) { | ||
// console.log('PersonActions, teamSave teamId:', teamId, ', incomingData:', incomingData); | ||
const data = { | ||
teamId, | ||
...incomingData, | ||
}; | ||
Dispatcher.loadEndpoint('team-save', data); | ||
}, | ||
}; | ||
// import Dispatcher from '../common/dispatcher/Dispatcher'; | ||
// import PersonStore from '../stores/PersonStore'; // eslint-disable-line import/no-cycle | ||
// import TeamStore from '../stores/TeamStore'; // eslint-disable-line import/no-cycle | ||
// | ||
// export default { | ||
// addPersonToTeam (personId, teamId) { | ||
// // console.log('TeamActions, addPersonToTeam personId:', personId, ', teamId:', teamId); | ||
// const teamMemberFirstName = PersonStore.getFirstName(personId) || ''; | ||
// const teamMemberLastName = PersonStore.getLastName(personId) || ''; | ||
// const teamName = TeamStore.getTeamName(teamId) || ''; | ||
// const data = { | ||
// personId, | ||
// teamId, | ||
// teamMemberFirstName, | ||
// teamMemberLastName, | ||
// teamName, | ||
// }; | ||
// Dispatcher.loadEndpoint('add-person-to-team', data); | ||
// }, | ||
// | ||
// removePersonFromTeam (personId, teamId) { | ||
// // console.log('TeamActions, removePersonFromTeam personId:', personId, ', teamId:', teamId); | ||
// const data = { | ||
// personId, | ||
// teamId, | ||
// }; | ||
// Dispatcher.loadEndpoint('remove-person-from-team', data); | ||
// }, | ||
// | ||
// teamRetrieve (teamId = '') { | ||
// // console.log('TeamActions, teamRetrieve teamId:', teamId); | ||
// if (teamId) { | ||
// Dispatcher.loadEndpoint('team-retrieve', { | ||
// teamId, | ||
// }); | ||
// } else { | ||
// Dispatcher.loadEndpoint('team-retrieve'); | ||
// } | ||
// }, | ||
// | ||
// teamListRetrieve () { | ||
// // console.log('TeamActions, teamListRetrieve'); | ||
// Dispatcher.loadEndpoint('team-list-retrieve'); | ||
// }, | ||
// | ||
// teamSave (teamId = '', incomingData = {}) { | ||
// // console.log('PersonActions, teamSave teamId:', teamId, ', incomingData:', incomingData); | ||
// const data = { | ||
// teamId, | ||
// ...incomingData, | ||
// }; | ||
// Dispatcher.loadEndpoint('team-save', data); | ||
// }, | ||
// }; |
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.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For testing purposes, we need to have a reliable way to tell react-query to not cache anything. I don't think we have proven that we 100% understand all of the cases where react-query pulls data from its cache vs. directly from the API server. By being able to turn on a react-query configuration that forces only the freshest data from the API server, we can then isolate inconsistencies if there are any. Let's maintain the ability to test our theories about how react-query works in all edge cases before we assume that any caching or retrieval data bugs that we find are our fault. The react-query documentation describes a lot of conditions where it draws from the cache instead of pulling fresh data from the API server, and it will take time for us to experience all of those cases.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With the queries that are implemented not in this checkin, networkMode: 'always' is not needed and it would be a mistake to casually use it, maybe wrap it in conditional test logic? ReactQuery works 100% of the time for me, and I've tested it extensively. It would be great if you showed me a case where it doesn't work.