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

Feat: Create and Update program page #79

Merged

Conversation

mtreacy002
Copy link
Member

@mtreacy002 mtreacy002 commented Aug 24, 2020

Description

Add create and update Program page functionalities

Fixes #53, #78

Type of Change:

  • Code
  • User Interface

Code/Quality Assurance Only

  • New feature (non-breaking change which adds functionality pre-approved by mentors)

How Has This Been Tested?

  • to Create a program:
  • login as a user that has is a representative of an organization and has created an organization
  • go to My Space > My Organization > on the bottom left of the page, click Go to Programs > click on Add Program button
  • fill the details on the Program Profile form page
  • click submit
  • on successful process, see response below

Screen Shot 2020-08-25 at 12 48 39 pm

  • to Update a program: (WIP)
  • Now view the program you've just created to make sure it's listed in the programs list (here my new program is Program B)

Screen Shot 2020-08-25 at 1 01 33 pm

  • I then updated the program start and date date. On sucessful process, see message below

Screen Shot 2020-08-25 at 1 03 31 pm

  • here's the list after the program was updated

Screen Shot 2020-08-25 at 1 05 26 pm

Checklist:

  • My PR follows the style guidelines of this project
  • I have performed a self-review of my own code or materials

Code/Quality Assurance Only

  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@mtreacy002
Copy link
Member Author

mtreacy002 commented Aug 24, 2020

Update @meenakshi-dhanani . Here's the PR for Create and update program (there are 2 issues open for this so I put both on the description as I'm not sure which one to select).
Notee: This is still a WIP. I'm currently stuck on submitting the form as the payload value for payment_amount is invalid. It got sent as a string instead of a number even though I already try to convert it to a number in the code.

Here's the snapshot of the payload

Screen Shot 2020-08-24 at 4 43 33 pm

The strange thing is it doesn't matter whether I used parseFloat or not, it's still showing as string "1500"

Screen Shot 2020-08-24 at 5 45 02 pm

@mtreacy002
Copy link
Member Author

Update @meenakshi-dhanani . I've tried to put the data directly to backend swagger UI, and the error is on the payment_amount
Screen Shot 2020-08-24 at 11 44 38 pm

@mtreacy002
Copy link
Member Author

Update @anitab-org/bridgeintech-maintainers and @meenakshi-dhanani. I've managed to solve the issue with payment_amount int value and date string format. Now user should be able to create program successfully. I'm going to work on the Update program now, using the same PR. So, will label this PR WIP.

@mtreacy002 mtreacy002 changed the title Feat: Create and Update program page WIP | Feat: Create and Update program page Aug 25, 2020
@mtreacy002 mtreacy002 self-assigned this Aug 25, 2020
@mtreacy002 mtreacy002 added Category: Coding Changes to code base or refactored code that doesn't fix a bug. Program: GSOC Related to work completed during the Google Summer of Code Program. labels Aug 25, 2020
@mtreacy002 mtreacy002 force-pushed the Feat-create-and-update-program branch from 0b28a6e to 48bd2fc Compare August 25, 2020 05:12
@mtreacy002 mtreacy002 changed the title WIP | Feat: Create and Update program page Feat: Create and Update program page Aug 25, 2020
@mtreacy002
Copy link
Member Author

Update @meenakshi-dhanani and @anitab-org/bridgeintech-maintainers . I've confirm that the update in this PR already working. This PR is now complete. Can you please review? Thanks

@mtreacy002 mtreacy002 force-pushed the Feat-create-and-update-program branch 2 times, most recently from eb87add to cd93227 Compare August 27, 2020 09:56
Copy link

@foongminwong foongminwong left a comment

Choose a reason for hiding this comment

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

The changes made in this PR were tested locally. Following are the results:

  1. Code review - Done

  2. All possible responses were tested as below:

    • Create and Update program page
      Screenshot/gif/url:

      test-bit-web-pr-79-create-and-update-program-page

    Expected Result: As a user, I shoudl be abe to create and update program as an organziation representative.
    Actual Result: Received an error TypeError: programs.map is not a function.

@mtreacy002 Attached is the screenshot of the error, hmm do you know what causes the problem?

test-bit-web-pr-79-create-and-update-program-page-error

@mtreacy002
Copy link
Member Author

mtreacy002 commented Aug 27, 2020

@foongminwong , can you tell me the steps you did to get to this error? starting from when you register the user who you've tested here.

@foongminwong
Copy link

@foongminwong , can you tell me the steps you did to get to this error? starting from when you register the user who you've tested here.

Yes, the steps are:
Login -> MySpace -> My Organization -> Go to Programs -> ⚠

@mtreacy002
Copy link
Member Author

mtreacy002 commented Aug 27, 2020

can you please confirm that you have the same commit on the branch you're currently running as per the commit numbers on this branch:

the commits on the branch

Screen Shot 2020-08-27 at 11 32 53 pm

same as the terminal(top 3 commits):

Screen Shot 2020-08-27 at 11 33 26 pm

@foongminwong
Copy link

yup hmmm
test-bit-web-pr-79-git-log

@mtreacy002
Copy link
Member Author

It's bit hard to read the commit numbers like that, @foongminwong . Can you please do it again by running

git log --oneline --graph

@foongminwong
Copy link

yeap, here you go:

test-bit-web-pr-79-git-log-graph

@mtreacy002
Copy link
Member Author

@foongminwong , do you have time now to hop on hangout to troubleshoot the bug?

Add pytz all_timezones list

Remove default href to organization-portfolio on MyOrganization navbar

Remove old Timezone enums from enums.js

Add temporary default link to MyOrganization Navbar

Add hard coded url as temporary solution to view pages

Fix Navigation

Fix typo programProfile

To Program using MyOrganization > Portfolio > Program path

Temp solution Path

Path option for My Organization

Use navlink instead of card as submenu on myorganization

Remove console log and unused comments

Disabled field for view other organization 's program
Implement datetime-local as date input field

Successfully Create Program

Update program and add maxLength field check
@mtreacy002 mtreacy002 force-pushed the Feat-create-and-update-program branch from cd93227 to 24c976f Compare August 27, 2020 15:41
@meenakshi-dhanani
Copy link
Contributor

ProgramCreateUpdate

I tried adding a program and updating it, both work!

@mtreacy002
Copy link
Member Author

@foongminwong . How did you go with your end? Are you able to solve the npm issue? Don't forget to also pulled the latest ms-backend-server from my fork repo that has new commits that fix GET /users/{user_id}, which was what causing the bug on @meenakshi-dhanani side when she tested pr #76. Let me know if you want to troubleshoot together like this morning. 😉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category: Coding Changes to code base or refactored code that doesn't fix a bug. Program: GSOC Related to work completed during the Google Summer of Code Program.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create Program
3 participants