Skip to content

#3389 create update submissions#3398

Merged
walker-sean merged 10 commits intofeature/cad-project-file-reviewfrom
#3389-create-update-submissions
Apr 27, 2025
Merged

#3389 create update submissions#3398
walker-sean merged 10 commits intofeature/cad-project-file-reviewfrom
#3389-create-update-submissions

Conversation

@chpy04
Copy link
Copy Markdown
Contributor

@chpy04 chpy04 commented Apr 10, 2025

Changes

Create submission, update submission, and upload files for submission endpoints

Test Cases

  • create submission with name and notes
  • update submission with name and notes
  • create submission without notes
  • update submission without notes
  • only creator can update submission
  • cannot create submission for non-existant/deleted part
  • cannot update non-existant/deleted submission

Screenshots

Screenshot 2025-04-10 at 12 13 11 AM
Screenshot 2025-04-10 at 12 12 27 AM

To Do

Any remaining things that need to get done

  • item 1
  • ...

Checklist

It can be helpful to check the Checks and Files changed tabs.
Please review the contributor guide and reach out to your Tech Lead if anything is unclear.
Please request reviewers and ping on slack only after you've gone through this whole checklist.

  • All commits are tagged with the ticket number
  • No linting errors / newline at end of file warnings
  • All code follows repository-configured prettier formatting
  • No merge conflicts
  • All checks passing
  • Screenshots of UI changes (see Screenshots section)
  • Remove any non-applicable sections of this template
  • Assign the PR to yourself
  • No yarn.lock changes (unless dependencies have changed)
  • Request reviewers & ping on Slack
  • PR is linked to the ticket (fill in the closes line below)

Closes #3389

@Zwendle Zwendle self-requested a review April 10, 2025 22:40
Copy link
Copy Markdown
Contributor

@Zwendle Zwendle left a comment

Choose a reason for hiding this comment

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

bang🔥


const partsRouter = express.Router();

partsRouter.get('/:wbsNum', PartReviewController.getAllPartsForProject);
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.

Same comment here as on the last PR

static async createSubmission(partId: string, creator: User, organizationId: string, name: string, notes?: string) {
const part = await prisma.part.findUnique({
where: { partId },
include: { project: { include: { wbsElement: true } } }
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.

Can we use queryargs for this

static async updateSubmission(submissionId: string, updater: User, organizationId: string, name: string, notes?: string) {
const submission = await prisma.partSubmission.findUnique({
where: { partSubmissionId: submissionId },
include: { part: { include: { project: { include: { wbsElement: true } } } } }
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.

Same here

) {
const submission = await prisma.partSubmission.findUnique({
where: { partSubmissionId: submissionId },
include: { part: { include: { project: { include: { wbsElement: true } } } } }
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.

Same here

@walker-sean walker-sean merged commit 5a1e644 into feature/cad-project-file-review Apr 27, 2025
4 checks passed
@walker-sean walker-sean deleted the #3389-create-update-submissions branch April 27, 2025 01:11
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