-
Notifications
You must be signed in to change notification settings - Fork 10
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
CHI-2763 Resolve In-Progress Contacts: Close Tasks and Finalize Contacts #2543
Conversation
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.
Code looks great to me! Thanks for organizing things better while in here 🙌
Leaving a couple of questions, shouldn't be anything blocking but is just to confirm I understand things.
const status = await checkTaskAssignment(savedContact.taskId); | ||
|
||
if (status === true) { |
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.
const status = await checkTaskAssignment(savedContact.taskId); | |
if (status === true) { | |
const isTaskAssigned = await checkTaskAssignment(savedContact.taskId); | |
if (isTaskAssigned === true) { |
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.
Also a question here: What happens if the task is in wrapup? 🤔
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.
Good point. I realized I should include wrapup tasks in my first serverless function that checks the task status
} else { | ||
await updateAndSaveContact(); | ||
} |
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.
How can anybody reach this? If dialog is open, you have to "click confirm", if it's not then this opens it.. Maybe this else
statement is redundant? Or what am I missing?
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.
The dialog only opens when there is an active task (assigned
task). In some cases, if the task is completed (triggered only End
button in the agent-desktop by the owner) already, there is no need to show to dialog and we save directly.
@@ -83,6 +83,8 @@ const BottomBar: React.FC< | |||
const handleSubmit = async () => { | |||
if (contactIsSaving || !hasTaskControl(task)) return; | |||
|
|||
console.log('>>> Submitting contact form', { task, contact, metadata, caseState }); |
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.
🧹
plugin-hrm-form/src/hrmConfig.ts
Outdated
// eslint-disable-next-line camelcase | ||
featureFlagsFromServiceConfig.enable_generalized_search = false; |
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.
🧹
// const worker = Manager.getInstance().workerClient | ||
console.log('>>> getCanEditInProgressContact', { workerRoles }); | ||
if (!contact.finalizedAt) { | ||
// If the contact is a draft, we use the hardcoded rule that only its owner or creator can edit it |
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.
Why is this needed? 🤔 I mean why can't we use the same edit contact rules as for non-drafts?
Description
Save and End
button, responsible for saving unresolved contacts left in progress.canEditInProgressContact
permission is added to control the Save and End buttonChecklist
Other Related Issues
None
Verification steps
Save and End.
Click on it and check that the behavior is aligned with the acceptance criteria.AFTER YOU MERGE
You are responsible for ensuring the above steps are completed. If you move a ticket into QA without advising what version to test, the QA team will assume the latest tag has the changes. If it does not, the following confusion is on you! :-P