Skip to content

#211 update expense model#222

Merged
tsudhakar87 merged 5 commits into
mainfrom
211-update-expense-model
Jun 3, 2026
Merged

#211 update expense model#222
tsudhakar87 merged 5 commits into
mainfrom
211-update-expense-model

Conversation

@tsudhakar87
Copy link
Copy Markdown
Contributor

@tsudhakar87 tsudhakar87 commented May 26, 2026

ℹ️ Issue

Closes #211

📝 Description

Write a short summary of what you added. Why is it important? Any member of C4C should be able to read this and understand your contribution -- not just your team members.

  1. Added status and receipt_url fields to expense model
  2. Updated the POST /expenditures endpoint to take in status and optional receipt_url
  3. Updated validation utils for these fields
  4. Added e2e and unit tests

✔️ Verification

What steps did you take to verify your changes work? These should be clear enough for someone to be able to clone the branch and follow the steps themselves.

Provide screenshots of any new components, styling changes, or pages.

  1. sanity check with unit tests
  2. build expenditures docker container and start auth/expenditure/postgres containers
  3. get auth token via curl
  4. curl POST requests to add new expenditures
  5. verify in pg admin that new rows were inserted

setting receipt url added it to row
Screenshot 2026-06-02 at 4 47 32 PM
Screenshot 2026-06-02 at 4 48 01 PM

no receipt url makes it null, and if no status provided defaults to pending
Screenshot 2026-06-02 at 4 48 47 PM
Screenshot 2026-06-02 at 4 49 02 PM

🏕️ (Optional) Future Work / Notes

Did you notice anything ugly during the course of this ticket? Any bugs, design challenges, or unexpected behavior? Write it down so we can clean it up in a future ticket!

@tsudhakar87 tsudhakar87 marked this pull request as ready for review June 2, 2026 20:53
@github-actions github-actions Bot requested a review from mehanana June 2, 2026 20:53
github-actions Bot added a commit that referenced this pull request Jun 2, 2026
Copy link
Copy Markdown
Contributor

@mehanana mehanana left a comment

Choose a reason for hiding this comment

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

looks good!!

Comment thread apps/backend/db/db_setup.sql Outdated
amount NUMERIC(12,2) NOT NULL CHECK (amount >= 0),
category VARCHAR(50),
description TEXT,
status VARCHAR(10) NOT NULL DEFAULT 'pending' CHECK (status IN ('approved', 'pending', 'denied')),
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Sorry we just talked to the client and they want a 4th state. Can you add 'needs more info' to the enum. Approving because otherwise looks good

github-actions Bot added a commit that referenced this pull request Jun 2, 2026
@tsudhakar87 tsudhakar87 added this pull request to the merge queue Jun 3, 2026
Merged via the queue into main with commit 4f3fad5 Jun 3, 2026
14 checks passed
@tsudhakar87 tsudhakar87 deleted the 211-update-expense-model branch June 3, 2026 02:11
github-actions Bot added a commit that referenced this pull request Jun 3, 2026
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.

Add status and receipt_url to expense model and modify POST

3 participants