Skip to content

Show mark as complete as default for surgical procedure and counselling service requests#15837

Open
NikhilA8606 wants to merge 9 commits intodevelopfrom
feat/hide-mark-as-complete
Open

Show mark as complete as default for surgical procedure and counselling service requests#15837
NikhilA8606 wants to merge 9 commits intodevelopfrom
feat/hide-mark-as-complete

Conversation

@NikhilA8606
Copy link
Copy Markdown
Member

@NikhilA8606 NikhilA8606 commented Feb 20, 2026

Proposed Changes

Tagging: @ohcnetwork/care-fe-code-reviewers

Merge Checklist

  • Add specs that demonstrate the bug or test the new feature.
  • Update product documentation.
  • Ensure that UI text is placed in I18n files.
  • Prepare a screenshot or demo video for the changelog entry and attach it to the issue.
  • Request peer reviews.
  • Complete QA on mobile devices.
  • Complete QA on desktop devices.
  • Add or update Playwright tests for related changes

Summary by CodeRabbit

  • New Features

    • Added a completion CTA with a note input and platform-appropriate dialog/sheet for submitting completion notes.
    • Added UI text for completion workflows and note inputs.
  • Bug Fixes

    • Completion option now appears only when a related report is final or the request category allows manual completion.
    • Submission prevents closing and disables controls while the completion is in-flight.
  • Refactor

    • Simplified completion flow and improved loading/disabled state handling.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Feb 20, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

Reworks the service-request completion flow: eligibility checks, mutation switched to serviceRequestApi.updateServiceRequest with note support, a fixed bottom CTA that opens a Sheet (mobile) or Dialog (desktop) to capture a completion note, and new English translation keys added.

Changes

Cohort / File(s) Summary
Service Request Completion Flow
src/pages/Facility/services/serviceRequests/ServiceRequestShow.tsx
Replaced prior AlertDialog confirm flow with a note-taking flow. Switched completion call to serviceRequestApi.updateServiceRequest, added isCompletingServiceRequest state, CLASSIFICATIONS_CAN_BE_MARKED_AS_COMPLETE, isFinal, canMarkAsComplete, canShowCompleteCta, local UI state (isCompleteDialogOpen, completionNote), a bottom fixed CTA, platform-specific Sheet/Dialog, Textarea for notes, and explicit dialog close on success. Adjusted top-right actions and layout padding.
Localization
public/locale/en.json
Added English keys for completion UI and note fields: add_completion_note, complete_service_request, complete_service_request_help_text, completion_note, enter_note, and service_request_completion_note_description.
🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Out of Scope Changes check ❓ Inconclusive The PR introduces a completion note feature with UI translations and a dialog flow, which extends beyond the issue's basic requirement but is justified per PR discussion as a product requirement. Clarify whether the completion note feature was explicitly required in issue #15924 or if it should be tracked separately; consider documenting this decision in the PR description.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: showing mark-as-complete for surgical procedure and counselling service requests, which aligns with the PR objectives.
Description check ✅ Passed The description references the correct issue (#15924), explains the core change, mentions the new completion note feature, and includes the merge checklist template. However, some sections remain unchecked without commentary on specs or documentation.
Linked Issues check ✅ Passed The code changes implement the core requirement from #15924: enabling mark-as-complete for surgical procedure and counselling requests while keeping it conditional for laboratory/imaging tests based on diagnostic report status.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/hide-mark-as-complete

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR modifies the service request detail page to show the "mark as complete" button by default for surgical procedure and counselling service requests, without requiring a finalized diagnostic report. Previously, this button was only shown when a diagnostic report had final status.

Changes:

  • Refactored button visibility logic to show "mark as complete" for surgical_procedure and counselling categories regardless of diagnostic report status
  • Extracted isFinal status check into a constant for improved code readability
  • Restructured conditional rendering to separate "mark as complete" and "view report" button visibility

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
src/pages/Facility/services/serviceRequests/ServiceRequestShow.tsx (2)

152-162: ⚠️ Potential issue | 🟡 Minor

Add error handling for completeServiceRequest mutation.

The mutation has an onSuccess handler but no onError handler. If completion fails, users won't receive feedback.

🛡️ Proposed fix
 const { mutate: completeServiceRequest } = useMutation({
   mutationFn: mutate(serviceRequestApi.completeServiceRequest, {
     pathParams: { facilityId, serviceRequestId },
   }),
   onSuccess: () => {
     toast.success(t("service_request_completed"));
     queryClient.invalidateQueries({
       queryKey: ["serviceRequest", facilityId, serviceRequestId],
     });
   },
+  onError: () => {
+    toast.error(t("service_request_complete_error"));
+  },
 });

Note: Ensure the i18n key service_request_complete_error is added to the translation files.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/pages/Facility/services/serviceRequests/ServiceRequestShow.tsx` around
lines 152 - 162, Add an onError handler to the useMutation for
completeServiceRequest (the mutation created with
mutate(serviceRequestApi.completeServiceRequest, { pathParams: { facilityId,
serviceRequestId } })) so failures surface to users: call
toast.error(t("service_request_complete_error")) and include the error message
(or error object) in a process/log call; optionally keep or adjust
queryClient.invalidateQueries behavior to run only on success. Also ensure the
i18n key service_request_complete_error exists in translation files.

335-382: 🧹 Nitpick | 🔵 Trivial

Remove unnecessary React fragment.

The fragment <>...</> wrapping lines 335-382 is redundant since the two children (AlertDialog and conditional Button) can be rendered directly as siblings within the parent <div>.

♻️ Proposed simplification
               <div className="flex items-center gap-2">
-                  <>
-                    {!disableEdit && (
-                      <AlertDialog>
+                  {!disableEdit && (
+                    <AlertDialog>
                       ...
-                      </AlertDialog>
-                    )}
-                    {isFinal && (
-                      <Button
-                        ...
-                      </Button>
-                    )}
-                  </>
+                    </AlertDialog>
+                  )}
+                  {isFinal && (
+                    <Button
+                      ...
+                    </Button>
+                  )}
                 </div>
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/pages/Facility/services/serviceRequests/ServiceRequestShow.tsx` around
lines 335 - 382, The surrounding React fragment <>...</> around the
AlertDialog/conditional Button block is unnecessary; remove the fragment so the
AlertDialog (with AlertDialogTrigger, AlertDialogContent, AlertDialogAction that
calls completeServiceRequest) and the conditional Button (guarded by isFinal,
using navigate and ShortcutBadge) are rendered directly as siblings inside the
parent container, keeping all existing props, handlers and translations intact
(preserve disableEdit check, isFinal check, onClick navigate to
diagnostic_reports[0].id, and ShortcutBadge usage).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Outside diff comments:
In `@src/pages/Facility/services/serviceRequests/ServiceRequestShow.tsx`:
- Around line 152-162: Add an onError handler to the useMutation for
completeServiceRequest (the mutation created with
mutate(serviceRequestApi.completeServiceRequest, { pathParams: { facilityId,
serviceRequestId } })) so failures surface to users: call
toast.error(t("service_request_complete_error")) and include the error message
(or error object) in a process/log call; optionally keep or adjust
queryClient.invalidateQueries behavior to run only on success. Also ensure the
i18n key service_request_complete_error exists in translation files.
- Around line 335-382: The surrounding React fragment <>...</> around the
AlertDialog/conditional Button block is unnecessary; remove the fragment so the
AlertDialog (with AlertDialogTrigger, AlertDialogContent, AlertDialogAction that
calls completeServiceRequest) and the conditional Button (guarded by isFinal,
using navigate and ShortcutBadge) are rendered directly as siblings inside the
parent container, keeping all existing props, handlers and translations intact
(preserve disableEdit check, isFinal check, onClick navigate to
diagnostic_reports[0].id, and ShortcutBadge usage).

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Feb 20, 2026

🎭 Playwright Test Results

Status: ❌ Failed
Test Shards: 3

Metric Count
Total Tests 21
✅ Passed 15
❌ Failed 6
⏭️ Skipped 0

📊 Detailed results are available in the playwright-final-report artifact.

Run: #8610

@NikhilA8606 NikhilA8606 changed the title Show mark as complete as default for surgical procedure and counselling Show mark as complete as default for surgical procedure and counselling service requests Feb 21, 2026
@NikhilA8606 NikhilA8606 marked this pull request as draft February 21, 2026 08:21
@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented Feb 21, 2026

Deploying care-preview with  Cloudflare Pages  Cloudflare Pages

Latest commit: 1d86450
Status: ✅  Deploy successful!
Preview URL: https://d2e0bf45.care-preview-a7w.pages.dev
Branch Preview URL: https://feat-hide-mark-as-complete.care-preview-a7w.pages.dev

View logs

@NikhilA8606 NikhilA8606 marked this pull request as ready for review February 21, 2026 08:44
Copilot AI review requested due to automatic review settings February 21, 2026 08:44
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.

Comment thread src/pages/Facility/services/serviceRequests/ServiceRequestShow.tsx Outdated
Comment thread src/pages/Facility/services/serviceRequests/ServiceRequestShow.tsx
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/pages/Facility/services/serviceRequests/ServiceRequestShow.tsx (1)

334-388: 🧹 Nitpick | 🔵 Trivial

Empty container may render for completed surgical/counselling requests.

When disableEdit is true (request already completed) and isFinal is false for surgical_procedure/counselling categories, the outer condition passes but neither inner button renders, leaving an empty <div className="flex items-center gap-2">.

Consider adding an inner guard to avoid rendering the empty container:

♻️ Suggested improvement
-              {(!request?.activity_definition?.diagnostic_report_codes ||
-                isFinal ||
-                CLASSIFICATIONS_CAN_BE_MARKED_AS_COMPLETE.includes(
-                  request.category,
-                )) && (
+              {(!request?.activity_definition?.diagnostic_report_codes ||
+                isFinal ||
+                CLASSIFICATIONS_CAN_BE_MARKED_AS_COMPLETE.includes(
+                  request.category,
+                )) &&
+                (!disableEdit || isFinal) && (
                 <div className="flex items-center gap-2">
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/pages/Facility/services/serviceRequests/ServiceRequestShow.tsx` around
lines 334 - 388, The outer container <div className="flex items-center gap-2">
can render empty when disableEdit is true and isFinal is false for categories in
CLASSIFICATIONS_CAN_BE_MARKED_AS_COMPLETE; change the render guard so the
container is only rendered when at least one inner action will appear (e.g.,
require (!disableEdit || isFinal) in addition to the existing condition that
checks request.activity_definition, isFinal, and
CLASSIFICATIONS_CAN_BE_MARKED_AS_COMPLETE) so that when both buttons would be
hidden the container is not output; update the conditional around the container
(or add an inner guard) referencing disableEdit, isFinal, and
request.category/CLASSIFICATIONS_CAN_BE_MARKED_AS_COMPLETE to prevent the empty
div.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Outside diff comments:
In `@src/pages/Facility/services/serviceRequests/ServiceRequestShow.tsx`:
- Around line 334-388: The outer container <div className="flex items-center
gap-2"> can render empty when disableEdit is true and isFinal is false for
categories in CLASSIFICATIONS_CAN_BE_MARKED_AS_COMPLETE; change the render guard
so the container is only rendered when at least one inner action will appear
(e.g., require (!disableEdit || isFinal) in addition to the existing condition
that checks request.activity_definition, isFinal, and
CLASSIFICATIONS_CAN_BE_MARKED_AS_COMPLETE) so that when both buttons would be
hidden the container is not output; update the conditional around the container
(or add an inner guard) referencing disableEdit, isFinal, and
request.category/CLASSIFICATIONS_CAN_BE_MARKED_AS_COMPLETE to prevent the empty
div.

Comment thread src/pages/Facility/services/serviceRequests/ServiceRequestShow.tsx Outdated
Comment thread src/pages/Facility/services/serviceRequests/ServiceRequestShow.tsx
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/pages/Facility/services/serviceRequests/ServiceRequestShow.tsx (1)

354-370: ⚠️ Potential issue | 🟠 Major

Keep view_report independent from the completion CTA.

This button is now gated by canShowCompleteCta, which includes !disableEdit. That means a completed or otherwise non-editable request loses the view_report action even when a final diagnostic report exists.

♻️ Proposed fix
-              {canShowCompleteCta && (
-                <div className="flex items-center gap-2">
-                  <>
-                    {isFinal && (
-                      <Button
-                        variant="primary"
-                        className="font-semibold"
-                        onClick={() =>
-                          navigate(
-                            `/facility/${facilityId}/patient/${request.encounter.patient.id}/diagnostic_reports/${request.diagnostic_reports[0].id}`,
-                          )
-                        }
-                      >
-                        {t("view_report")}
-                        <ShortcutBadge actionId="view-report" />
-                      </Button>
-                    )}
-                  </>
-                </div>
-              )}
+              {isFinal && (
+                <div className="flex items-center gap-2">
+                  <Button
+                    variant="primary"
+                    className="font-semibold"
+                    onClick={() =>
+                      navigate(
+                        `/facility/${facilityId}/patient/${request.encounter.patient.id}/diagnostic_reports/${request.diagnostic_reports[0].id}`,
+                      )
+                    }
+                  >
+                    {t("view_report")}
+                    <ShortcutBadge actionId="view-report" />
+                  </Button>
+                </div>
+              )}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/pages/Facility/services/serviceRequests/ServiceRequestShow.tsx` around
lines 354 - 370, The view_report Button is currently wrapped by the
canShowCompleteCta block (which depends on !disableEdit) so users lose the View
Report action when editing is disabled; update rendering so the view_report
Button (checking isFinal and request.diagnostic_reports?.length > 0) is rendered
independently of canShowCompleteCta: move the Button that uses
navigate(`/facility/${facilityId}/patient/${request.encounter.patient.id}/diagnostic_reports/${request.diagnostic_reports[0].id}`)
and the ShortcutBadge actionId="view-report" out of the canShowCompleteCta
conditional (or duplicate the isFinal check outside it) so it displays whenever
a final diagnostic report exists regardless of disableEdit.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/pages/Facility/services/serviceRequests/ServiceRequestShow.tsx`:
- Around line 646-657: Add stable data-cy attributes for E2E tests to the new
completion flow: add data-cy="sr-mark-complete-btn" to the primary Button that
calls setCompletionNote/setIsCompleteDialogOpen (the Button with onClick and
disabled={isCompletingServiceRequest}), add data-cy="sr-completion-textarea" to
the textarea/input bound to completion note (the element using
setCompletionNote/request.note), and add data-cy="sr-complete-confirm" and
data-cy="sr-complete-cancel" to the dialog/sheet confirm and cancel action
Buttons (the buttons that trigger the completion submit and dialog close). Use
those exact attribute names so tests are stable across the sheet/dialog split.
- Around line 331-334: The guard computing canShowCompleteCta incorrectly treats
an empty diagnostic_report_codes array as present; change the condition in
canShowCompleteCta to check for absence or emptiness of
request?.activity_definition?.diagnostic_report_codes (e.g., use length === 0 or
a falsy-or-empty check) so that empty arrays are treated like undefined and the
completion CTA is shown when disableEdit is false and there are no report codes;
update the expression that references diagnostic_report_codes inside the const
canShowCompleteCta accordingly.

---

Outside diff comments:
In `@src/pages/Facility/services/serviceRequests/ServiceRequestShow.tsx`:
- Around line 354-370: The view_report Button is currently wrapped by the
canShowCompleteCta block (which depends on !disableEdit) so users lose the View
Report action when editing is disabled; update rendering so the view_report
Button (checking isFinal and request.diagnostic_reports?.length > 0) is rendered
independently of canShowCompleteCta: move the Button that uses
navigate(`/facility/${facilityId}/patient/${request.encounter.patient.id}/diagnostic_reports/${request.diagnostic_reports[0].id}`)
and the ShortcutBadge actionId="view-report" out of the canShowCompleteCta
conditional (or duplicate the isFinal check outside it) so it displays whenever
a final diagnostic report exists regardless of disableEdit.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 9284ea13-abc0-40e1-9650-ecd11f9e8e45

📥 Commits

Reviewing files that changed from the base of the PR and between b175313 and d4b875d.

📒 Files selected for processing (1)
  • src/pages/Facility/services/serviceRequests/ServiceRequestShow.tsx

Comment thread src/pages/Facility/services/serviceRequests/ServiceRequestShow.tsx Outdated
Comment on lines +646 to +657
<Button
variant="primary"
className="font-semibold shrink-0"
onClick={() => {
setCompletionNote(request.note ?? "");
setIsCompleteDialogOpen(true);
}}
disabled={isCompletingServiceRequest}
>
{t("mark_as_complete")}
<ShortcutBadge actionId="mark-as-complete" />
</Button>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion | 🟠 Major

Add stable data-cy hooks to the new completion flow.

This is a new primary workflow, but the trigger, textarea, and confirm/cancel actions do not expose stable selectors. That will make the required E2E coverage brittle, especially across the sheet/dialog split.

As per coding guidelines, "Add appropriate data-cy attributes for E2E tests to page components".

Also applies to: 675-686, 703-714, 747-759

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/pages/Facility/services/serviceRequests/ServiceRequestShow.tsx` around
lines 646 - 657, Add stable data-cy attributes for E2E tests to the new
completion flow: add data-cy="sr-mark-complete-btn" to the primary Button that
calls setCompletionNote/setIsCompleteDialogOpen (the Button with onClick and
disabled={isCompletingServiceRequest}), add data-cy="sr-completion-textarea" to
the textarea/input bound to completion note (the element using
setCompletionNote/request.note), and add data-cy="sr-complete-confirm" and
data-cy="sr-complete-cancel" to the dialog/sheet confirm and cancel action
Buttons (the buttons that trigger the completion submit and dialog close). Use
those exact attribute names so tests are stable across the sheet/dialog split.

Comment on lines 353 to 360
<div className="flex items-end gap-2">
{(!request?.activity_definition?.diagnostic_report_codes ||
request?.diagnostic_reports?.[0]?.status ===
DiagnosticReportStatus.final) && (
{canShowCompleteCta && (
<div className="flex items-center gap-2">
{request?.diagnostic_reports?.[0]?.status ===
DiagnosticReportStatus.final && (
<>
{!disableEdit && (
<AlertDialog>
<AlertDialogTrigger asChild>
<Button
variant="outline"
className="font-semibold border border-gray-400"
>
{t("mark_as_complete")}
<ShortcutBadge actionId="mark-as-complete" />
</Button>
</AlertDialogTrigger>
<AlertDialogContent>
<AlertDialogHeader>
<AlertDialogTitle>
{t("confirm_completion")}
</AlertDialogTitle>
<AlertDialogDescription>
{t("service_request_completion_confirmation")}
</AlertDialogDescription>
</AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogCancel>
{t("cancel")}
</AlertDialogCancel>
<AlertDialogAction
onClick={() => completeServiceRequest({})}
>
{t("confirm")}
<ShortcutBadge actionId="enter-action" />
</AlertDialogAction>
</AlertDialogFooter>
</AlertDialogContent>
</AlertDialog>
)}
<>
{isFinal && (
<Button
variant="primary"
className="font-semibold"
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.

@NikhilA8606 Is this intentional?

Copilot AI review requested due to automatic review settings April 19, 2026 10:48
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.

Comment thread src/pages/Facility/services/serviceRequests/ServiceRequestShow.tsx Outdated
Comment thread src/pages/Facility/services/serviceRequests/ServiceRequestShow.tsx Outdated
Comment thread src/pages/Facility/services/serviceRequests/ServiceRequestShow.tsx
Comment thread src/pages/Facility/services/serviceRequests/ServiceRequestShow.tsx
Comment thread src/pages/Facility/services/serviceRequests/ServiceRequestShow.tsx
Copy link
Copy Markdown
Member

@amjithtitus09 amjithtitus09 left a comment

Choose a reason for hiding this comment

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

@NikhilA8606 Check out copilot comments

Copilot AI review requested due to automatic review settings April 22, 2026 08:53
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

Comment thread src/pages/Facility/services/serviceRequests/ServiceRequestShow.tsx
Comment thread src/pages/Facility/services/serviceRequests/ServiceRequestShow.tsx
@parvathyns-creator
Copy link
Copy Markdown

@nihal467 this looks fine

@NikhilA8606 NikhilA8606 marked this pull request as draft April 29, 2026 09:41
Copy link
Copy Markdown

@greptile-apps greptile-apps Bot left a comment

Choose a reason for hiding this comment

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

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

{t("complete_service_request")}
</p>
<p className="text-xs text-gray-600">
{t("complete_service_request_help_text")}
Copy link

Copilot AI Apr 29, 2026

Choose a reason for hiding this comment

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

The footer help text (complete_service_request_help_text) tells users to ensure “all invoices, observations, and results are completed” before completing the request, but this bar is also shown for categories that are explicitly allowed to be completed without results (e.g. surgical procedure/counselling). Consider making the help text conditional by request category / presence of diagnostic reports, or rewriting it to be accurate for all cases.

Suggested change
{t("complete_service_request_help_text")}
{t("complete_service_request_help_text_generic", {
defaultValue:
"Ensure all required invoices, observations, and results are completed before completing the request.",
})}

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Show mark as complete for particular activity definitions

6 participants