Make verified repair acceptance prominent and simplify confirmation email
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
'use client'
|
||||
import ResolutionChoice from '../ui/ResolutionChoice'
|
||||
|
||||
import PageHeading from '../ui/PageHeading'
|
||||
import IssueFlowStep from './IssueFlowStep'
|
||||
@@ -1501,6 +1502,13 @@ export default function PortalClient({ workspace }: PortalClientProps) {
|
||||
actions={workspace === 'issue' ? <span className="page-heading-meta">{visibleKindCount} reported {visibleKindCount === 1 ? 'issue' : 'issues'}</span> : undefined}
|
||||
/>
|
||||
|
||||
{workspace === 'issue' && items.filter((item) => item.status === 'awaiting_confirmation' && item.permissions?.can_confirm_resolution && item.created_by_username === me?.username).map((item) => (
|
||||
<section key={item.id} className="resolution-choice">
|
||||
<h2>Is it fixed?</h2><p>{item.title}</p>
|
||||
<a className="button" href={`/issues/confirm/${item.id}`}>Answer YES or NO →</a>
|
||||
</section>
|
||||
))}
|
||||
|
||||
{workspace === 'request' ? (
|
||||
<section className="portal-workspace-switch">
|
||||
<button type="button" className="is-active" disabled>
|
||||
@@ -2225,6 +2233,9 @@ export default function PortalClient({ workspace }: PortalClientProps) {
|
||||
</div>
|
||||
) : (
|
||||
<>
|
||||
{selectedItem.kind === 'issue' && selectedItem.status === 'awaiting_confirmation' && selectedItem.permissions?.can_confirm_resolution && (
|
||||
<ResolutionChoice title={selectedItem.title} busy={respondingResolution} onAnswer={(value) => void respondToResolution(value)} />
|
||||
)}
|
||||
<div className="user-directory-panel-header">
|
||||
<div>
|
||||
<h2>
|
||||
@@ -2294,33 +2305,6 @@ export default function PortalClient({ workspace }: PortalClientProps) {
|
||||
</div>
|
||||
) : null}
|
||||
|
||||
{selectedItem.kind === 'issue' && selectedItem.status === 'awaiting_confirmation' ? (
|
||||
<section className="issue-confirmation-card" aria-live="polite">
|
||||
<div>
|
||||
<span className="section-kicker">Resolution check</span>
|
||||
<h3>Has this issue been fixed?</h3>
|
||||
<p>
|
||||
Magent is waiting for the reporter to confirm the result.
|
||||
{(selectedItem.issue?.confirmation?.maximum_attempts ?? 0) > 0
|
||||
? ` ${selectedItem.issue?.confirmation?.attempts_sent ?? 0} of ${selectedItem.issue?.confirmation?.maximum_attempts ?? 0} confirmation emails have been attempted.`
|
||||
: ' Confirmation emails are disabled, so this issue will close automatically.'}
|
||||
</p>
|
||||
{selectedItem.issue?.confirmation?.next_contact_at ? (
|
||||
<small>Next reminder or automatic closure check: {formatDate(selectedItem.issue.confirmation.next_contact_at)}</small>
|
||||
) : null}
|
||||
</div>
|
||||
{selectedItem.permissions?.can_confirm_resolution ? (
|
||||
<div className="issue-confirmation-actions">
|
||||
<button type="button" disabled={respondingResolution} onClick={() => void respondToResolution(true)}>
|
||||
Yes, it is fixed
|
||||
</button>
|
||||
<button type="button" className="ghost-button" disabled={respondingResolution} onClick={() => void respondToResolution(false)}>
|
||||
No, it is still happening
|
||||
</button>
|
||||
</div>
|
||||
) : null}
|
||||
</section>
|
||||
) : null}
|
||||
|
||||
<form className="admin-form compact-form portal-form-grid" onSubmit={saveItem}>
|
||||
<label className="portal-field-span-2">
|
||||
|
||||
Reference in New Issue
Block a user