Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add API call functionality to create posting #147

Merged
merged 2 commits into from
Feb 18, 2022

Conversation

briantu
Copy link
Member

@briantu briantu commented Feb 13, 2022

Ticket link

Closes #88

Implementation description

  • Added the create posting mutation in CreatePostingReviewPage
  • Added two buttons ("Save as Draft" and "Post") in CreatePostingReviewPage that call the create posting mutation
    • Save as Draft: creates posting with status DRAFT
    • Post: creates posting with status PUBLISHED
  • CreatePostingReviewPage gets posting data using PostingContext

Steps to test

  1. Run the application locally docker-compose up --build
  2. Create a branch in your local database for the posting to use
  3. Click on the "Edit Posting" tab on the default page and enter the branch id of the branch you just created.
  4. Add other dummy information (be sure to include the dates for "Start Date", "End Date", and "Auto-Closing Date").
  5. Click on the "Review Posting" tab and click the "Save as Draft" or "Post" button
  6. Check that the posting was successfully created in your local database

What should reviewers focus on?

  • Create posting functionality works as expected
  • Correct coding practices for calling API

Checklist

  • My PR name is descriptive and in imperative tense
  • My commit messages are descriptive and in imperative tense. My commits are atomic and trivial commits are squashed or fixup'd into non-trivial commits
  • I have run the appropriate linter(s)
  • I have requested a review from the PL, as well as other devs who have background knowledge on this PR or who will be building on top of this PR

@briantu
Copy link
Member Author

briantu commented Feb 13, 2022

Question to consider - how are we handling front-end error messaging? (e.g. when API call to create posting fails)

@github-actions
Copy link

github-actions bot commented Feb 13, 2022

Visit the preview URL for this PR (updated for commit ec9011b):

https://sistering-dev--pr147-brian-posting-review-3rdzcdsz.web.app

(expires Fri, 25 Feb 2022 01:44:00 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Copy link
Member

@LenaNguyen LenaNguyen left a comment

Choose a reason for hiding this comment

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

sorry for the late review .-.

@briantu briantu requested a review from LenaNguyen February 18, 2022 01:57
Copy link
Member

@LenaNguyen LenaNguyen left a comment

Choose a reason for hiding this comment

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

Nice discovery of useBoolean!

@briantu briantu merged commit 456a0c8 into main Feb 18, 2022
@briantu briantu deleted the brian/posting-review-api-call branch February 18, 2022 02:41
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.

Admin create posting "Review and Post" : API call
2 participants