Skip to content

feat: consolidate approval status strings into shared const object#803

Merged
RUKAYAT-CODER merged 4 commits into
rinafcode:mainfrom
aliyuHabibu:feat/approval-status-enum
Jun 28, 2026
Merged

feat: consolidate approval status strings into shared const object#803
RUKAYAT-CODER merged 4 commits into
rinafcode:mainfrom
aliyuHabibu:feat/approval-status-enum

Conversation

@aliyuHabibu

Copy link
Copy Markdown
Contributor
  • Create src/types/approvals.ts with ApprovalStatus const (PENDING, APPROVED, REJECTED) and ReviewDecision const (APPROVED, REJECTED) as const objects, plus derived literal types
  • Export ApprovalStatus and ReviewDecision types from src/types/api.ts for backward compatibility
  • Update src/app/api/approvals/route.ts to use ApprovalStatus.xxx in Zod schemas and business logic
  • Update src/components/admin/ApprovalQueue.tsx to use ApprovalStatus.xxx and ReviewDecision.xxx
  • Update approval tests to reference the shared consts instead of bare string literals
  • No bare 'PENDING', 'APPROVED', or 'REJECTED' string literals remain in src/ outside the definition

Description

Brief description of changes

Related Issue

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update

Checklist

  • Code follows project style guidelines
  • Self-review completed
  • No console errors
  • Uses Lucide icons consistently
  • Responsive design implemented
  • Starknet best practices followed

Closes #752

- Create src/types/approvals.ts with ApprovalStatus const (PENDING, APPROVED, REJECTED) and ReviewDecision const (APPROVED, REJECTED) as const objects, plus derived literal types
- Export ApprovalStatus and ReviewDecision types from src/types/api.ts for backward compatibility
- Update src/app/api/approvals/route.ts to use ApprovalStatus.xxx in Zod schemas and business logic
- Update src/components/admin/ApprovalQueue.tsx to use ApprovalStatus.xxx and ReviewDecision.xxx
- Update approval tests to reference the shared consts instead of bare string literals
- No bare 'PENDING', 'APPROVED', or 'REJECTED' string literals remain in src/ outside the definition
@drips-wave

drips-wave Bot commented Jun 28, 2026

Copy link
Copy Markdown

@aliyuHabibu Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@RUKAYAT-CODER

Copy link
Copy Markdown
Contributor

Great job so far

There’s just one blocker — the workflow is failing. Could you take a look and fix it so all checks pass?

Happy to review again once that’s done.
You can pull from the main first before pushing. The workflow should pass

@aliyuHabibu

Copy link
Copy Markdown
Contributor Author

@RUKAYAT-CODER All done!

@RUKAYAT-CODER

Copy link
Copy Markdown
Contributor

Thank you for contributing to the project.

@RUKAYAT-CODER
RUKAYAT-CODER merged commit bfa6aaf into rinafcode:main Jun 28, 2026
4 checks passed
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.

[Tech-debt] Status strings PENDING, APPROVED, REJECTED are duplicated as magic strings

2 participants