Skip to content

Manager report handle expired#408

Open
Jbur43 wants to merge 5 commits intomasterfrom
manager-report-handle-expired
Open

Manager report handle expired#408
Jbur43 wants to merge 5 commits intomasterfrom
manager-report-handle-expired

Conversation

@Jbur43
Copy link
Copy Markdown
Contributor

@Jbur43 Jbur43 commented Mar 26, 2026

No description provided.

const http = get(httpState);
const {applyAssessmentExpiration} = get(optionsState);
const variables = {
...(applyAssessmentExpiration != null && {applyAssessmentExpiration}),
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks a little gross. Can we just add it in an if statement after variables is set?

if(options.perspective) { return; }

setOptions({...options, perspective: "thirdPerson"});
setOptions({...options, perspective: "thirdPerson", applyAssessmentExpiration: false});
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This won't be set if perspective is already set. I think we might want to move it own useEffect or maybe just update this one to do something like:

const newOptions = {}

if(!Object.hasOwn(options, "applyAssessmentExpiration")) { newOptions.applyAssessmentExpiration = false; }
if(!Object.hasOwn(options, "perspective")) { newOptions.perspective = "thirdPerson"; }

if(Object.keys(newOptions).length > 0) { setOptions(newOptions); }

That way it only sets them if they haven't already been set (like how perspective was before)

{
"name": "traitify-widgets",
"version": "3.9.3",
"version": "3.9.4",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably best not to publish a non-alpha until it gets merged into master

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants