Skip to content

Remove unnecessary as any casts on Supabase cod_orders queries#112

Merged
Asper Beauty Shop (asperpharma) merged 3 commits into
mainfrom
copilot/fix-code-formatting-issues
Mar 6, 2026
Merged

Remove unnecessary as any casts on Supabase cod_orders queries#112
Asper Beauty Shop (asperpharma) merged 3 commits into
mainfrom
copilot/fix-code-formatting-issues

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 5, 2026

CI was failing due to @typescript-eslint/no-explicit-any errors introduced by (supabase as any) casts when querying cod_orders in two admin pages.

Changes

  • src/pages/AdminOrders.tsx / src/pages/DriverDashboard.tsx: Removed (supabase as any) and the corresponding as never casts on update payloads — cod_orders is already present in the auto-generated Supabase types, making these suppressions unnecessary.
// Before
const { error } = await (supabase as any)
  .from("cod_orders")
  .update({ status: newStatus } as never)
  .eq("id", orderId);

// After
const { error } = await supabase
  .from("cod_orders")
  .update({ status: newStatus })
  .eq("id", orderId);

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: asperpharma <252395498+asperpharma@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix code formatting to pass CI Remove unnecessary as any casts on Supabase cod_orders queries Mar 5, 2026
@asperpharma Asper Beauty Shop (asperpharma) marked this pull request as ready for review March 6, 2026 08:47
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Mar 6, 2026

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Free

Run ID: ccd0910c-2b6d-4688-a694-4359edd3fe53

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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

@asperpharma Asper Beauty Shop (asperpharma) merged commit 50f655a into main Mar 6, 2026
2 checks passed
@asperpharma Asper Beauty Shop (asperpharma) deleted the copilot/fix-code-formatting-issues branch March 6, 2026 08:47
Copy link
Copy Markdown
Member

@asperpharma asperpharma left a comment

Choose a reason for hiding this comment

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

v

Copy link
Copy Markdown

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 removes unnecessary TypeScript type casts (as any and as never) from Supabase cod_orders query calls in two admin pages. The cod_orders table is fully defined in the auto-generated Supabase types (src/integrations/supabase/types.ts), making these suppressions unnecessary and the cause of CI failures due to @typescript-eslint/no-explicit-any lint errors.

Changes:

  • Removed (supabase as any) casts and as never casts on .update() payloads for cod_orders queries in AdminOrders.tsx and DriverDashboard.tsx.

Reviewed changes

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

File Description
src/pages/AdminOrders.tsx Removed (supabase as any) and { status: newStatus } as never casts from the updateOrderStatus function
src/pages/DriverDashboard.tsx Removed (supabase as any) and updateData as never casts from the updateOrderStatus function

Copy link
Copy Markdown
Member

@asperpharma asperpharma left a comment

Choose a reason for hiding this comment

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

d

Copy link
Copy Markdown
Member

@asperpharma asperpharma left a comment

Choose a reason for hiding this comment

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

df

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.

3 participants