GithubHelp home page GithubHelp logo

jdpasternak / activently Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 4.0 1.16 MB

Home Page: http://www.activently.com

License: MIT License

JavaScript 68.29% CSS 0.45% Handlebars 31.26%
express handelbars mysql

activently's People

Contributors

afaed avatar am0726github avatar cloudylondon avatar horsfalm avatar jdpasternak avatar naomilounsbury avatar

Stargazers

 avatar

Watchers

 avatar

activently's Issues

Search button broken

Expected Behavior

WHEN I enter my zip code and click the Search button, THEN I am redirected to a page with activities taking place in my zip code.

Current Behavior

WHEN I enter my zip code and click the Search button, THEN nothing happens and the console logs landing.js:6 GET http://localhost:3001/96797 net::ERR_ABORTED 404 (Not Found)

Landing page View

  • WHEN a user visits the landing page, THEN they will be prompted to enter their ZIP code, login, or sign up
  • WHEN a user enters their ZIP code, THEN the page will display all the activities in their ZIP code ordered by occurrence
  • WHEN a user clicks to log in or sign up, THEN they are redirected to the login/sign up page

Front End JavaScript

  • Landing page

    • zip code input field
  • Homepage (dashboard)

    • Create new activity
  • Update profile page

    • update zip
    • update dietary pref
  • Login page

    • username or email
    • password
  • Signup page

    • username
    • email
    • password
    • dietary preferences
    • interests
    • Fetch /api/interests, method GET. Iterate through the list, creating select dropdown with each interest.name.
    • Do same for dietary preferences
    • Upon submit, fetch /api/users (method POST) to add the new user with provided information
    • Upon submit, iterate through list of selected options of interest and dietary preferences. With each, fetch (method POST) each to /api/userInterests or /api/userDietaryPrefs respectively
  • Create new activity page

    • all relevant activity attributes
  • Update activity page

    • all relevant activity attributes

site admin view

GIVEN that a user is a site admin

  • WHEN a site admin is on any page, THEN their menu links include one called Admin
  • WHEN a site admin clicks on the Admin link, THEN they are taken to the admin page where they are presented with user management, dietary preferences management, interest management, and activity management panels
  • WHEN a site admin clicks to create, update, or delete any component on the screen, THEN they are presented with a modal for making edits to the object
  • WHEN a site admin saves edits they have made and click the Save button, THEN the changes are made to the database and they are redirected to the admin view

Highlight update profile

The goal is to encourage a user to update their interests right after they create their profile in order to better suggest activities for them.

  • WHEN a user creates their account and is redirected to their profile page, THEN the button EDIT INTERESTS is glowing, prompting the user to add their preferences.
  • WHEN a user's interests are not empty, THEN the respective button does not glow.

Permit edit to activity only from activity owner

Expected Behavior

  • WHEN a user navigates to a URL of an activity which they aren't the organizer of, THEN they are redirected to the activity's details page and not permit editing

Current Behavior

  • WHEN a user navigates to a URL of an activity which they aren't the organizer of, THEN they are presented with the edit activity view and permitted to update the activity

User Sessions

  • implement express-session
  • update where appropriate to include req.session data
  • set up sequelize connection to store session data

Edit activity view not prefilling related interest

Expected Behavior

  • WHEN a user elects to edit one of their activities and is redirected to /activity/<activity_id>/edit, THEN all fields will be pre-populated with the details of the activity

Current Behavior

  • WHEN a user is on the activity view, THEN the activity's related interest does not pre-populate the related select input.

Create / Update / Delete activity

Create

  • WHEN as user is logged in and on their homepage, THEN they are presented with a button to add a new activity
  • WHEN a user clicks the NEW ACTIVITY button, THEN they are redirected to the new-activity view.
  • WHEN a user is on the new-activity view, THEN they are presented with a form and inputs including Title, Description, Location, Occurrence, Private (yes/no), Total Seats, Rules, Price per Seat, Dietary Preferences Needed (checkbox), and Related Interest
  • WHEN a user submits the form, THEN the information is validated and a new activity is created.
  • WHEN a new activity is created, THEN the user is redirected to their homepage.

Update

  • WHEN a user is on an activity page which they are the organizer of, THEN they will be presented with an EDIT button
  • WHEN a user clicks the EDIT button, THEN they are redirected to a the edit-activity view
  • WHEN a user is on the edit-activity view, THEN they are presented with the activity's data pre-filled into an editable form
  • WHEN a user submits the form, THEN the data is sent to the database to update the specific activity if their user ID (req.session.user_id) is equal to the organizer's ID.

Delete

  • WHEN a user is on an activity page which they are the organizer of, THEN they will be presented with a DELETE button
  • WHEN a user clicks on the delete button, THEN they are presented with a modal confirming their choice.
  • WHEN a user confirms to the delete the activity, THEN the activity is deleted from the database and the user is redirected to their homepage
  • WHEN a user cancels to delete the activity, THEN the modal closes.

FIX main view

  • WHEN I click the LOG IN button, THEN I am redirected to a view for logging in.
  • WHEN I click the SIGN UP button, THEN I am redirected to a view for signing up
  • Remove or change About Us link
  • Remove or change Contacts link
  • Change styling for body and main elements to make footer sticky

Activity Views

  • CREATE Activity view

  • READ (view) Activity view

  • UPDATE Activity view

  • WHEN a user visits the page for a specific Activity, THEN they are presented with the Activities title, description, location, occurrence, available seats, total seats, related interest, comments, an option to sign up for the Activity, and an options to leave a comment

  • WHEN a user signs up for an activity, THEN they are marked as attending the activity and the page is updated to show one less available seat.

  • WHEN a user comments on an activity, THEN their comment appears above the rest of the comments

  • As a user, I can create a hosted event by clicking a button and filling out a modal with the following information:

  • host name

  • event name

  • event time and date

  • event size

  • cost to participate

  • As a user, when I create an event, it is added to the events database and is searchable

main view styling fixes

  • Logout button is very close to the upper left corner. It should be evenly spaced inside of the navbar
  • Sign up and Login buttons are very close to the left side of the navbar. They should have decent padding from the left side

Implement markdown to html

  • WHEN a user is presented with any <textarea> to edit, THEN they are prompted to use markdown to format the tesk
  • WHEN a user submits to edit or create markdown text, THEN it is saved as markdown in the database
  • WHEN markdown text is read from the database and rendered to a view, THEN a markdown-to-html library will be used to format it to HTML.

Dropdowns not storing selected values

Warning: this may be a challenging issue to resolve as it'll likely take some modifications that aren't out of the box.

Expected Behavior

  • WHEN a user selects an item from a dropdown, THEN the value(s) will be retrievable from the element every time

Current Behavior

  • WHEN a user selects an item from a dropdown, THEN the value(s) are registered and retrievable from the element some time, and observably only when the text of the option itself is clicked

Homepage View

  • WHEN a user visits the Homepage, THEN they can view all past and future activities they’re attending, all past and future Activities they’re hosting, and options to update their profile
  • WHEN a user clicks on an Activity, THEN they are taken to that activity’s page
  • WHEN a user clicks on their profile, THEN they are taken to their profile page

change password

  • WHEN a user is on their profile page, THEN they are presented with a button in the Edit Basic Info card to change their password
  • WHEN a user clicks on the Change Password button, THEN they a presented with a modal with inputs for old password, two for new password, and a submit button
  • WHEN a user fills in the three fields and clicks the submit button, THEN their password is verified with their account and the two new passwords are compared to each other for equality, THEN a PUT request is sent to /api/users/<req.session.user_id> to update the password

Add content to main view footer

Current Behavior

The footer contains placeholder text.

Expected Behavior

The footer is either blank or has appropriate copy that supports the purpose of the application.

Profile view broken

Expected Behavior

  • WHEN a user visits the /profile route, THEN they are presented with a card view of their profile information and buttons to edit their basic profile information (email, password, zip code), their dietary preferences, and their interests
  • WHEN a user clicks on the Edit Basic Info button, THEN a modal with a form pops up prefilled with the user's information
  • WHEN the Edit Basic Info form is submitted, THEN the user's changes are made in the database and the user is redirected to their profile page
  • WHEN the user clicks on the Edit Dietary Preferences button, THEN a modal with a form pops up prefilled with the user's dietary preferences
  • WHEN the Edit Dietary Preferences form is submitted, THEN the user's changes are made in the database and the user is redirected to their profile page
  • WHEN the user clicks on the Edit Interests button, THEN a modal with a form pops up prefilled with the user's dietary preferences
  • WHEN the Edit Interests form is submitted, THEN the user's changes are made in the database and the user is redirected to their profile page

Current Behavior

The page display a misaligned card with three cards inside it. No user data is presented

EXPLORE! button broken

Expected Behavior

Honestly don't know what this button does...

Current Behavior

EXPLORE! button has #modal1 as its href value, which has no place on the page. Is this supposed to open a modal?

Helper functions

formatDate

  • formats a JavaScript Date object to standard date format "MM/DD/YYYY"

formatPlural

  • takes a string and a number and returns that string plural of the number is more than 1 (ex: arg=("comment", 2), returns="comments")

User profile functionality

  • WHEN a user is logged in and at their homepage, THEN they will be presented with a button or link PROFILE
  • WHEN a user clicks on the PROFILE button or link, THEN they are redirected to their profile page
  • WHEN a user is on their profile page, THEN they are presented with a button to edit their profile.
  • WHEN a user clicks on the EDIT button on their profile page, THEN they are redirected to the view to edit a user's profile
  • WHEN a user is on the edit profile page, THEN all their modifiable profile data is pre-filled into a form for editing.
  • WHEN a user submits their edited profile data, THEN a PUT request is sent to /api/users/:id to update the user's profile data and redirected to their profile page.

Fix create activity without time data

Expected Behavior

  • WHEN a user creates an event with a specified date and time, THEN both the date and time are saved into the occurrence field of the new activity

Current Behavior

  • WHEN a user creates an event with a specified date and time, THEN only the date is saved into the occurrence field, and the time defaults to 12:00:00 AM

Attend functionality

Attend

  • WHEN a user visits an activity's page which they aren't attending, THEN they are presented with an ATTEND button
  • WHEN the activity's seats are full, THEN the ATTEND button is disabled
  • WHEN a user clicks on an activity page's ATTEND button, THEN the user is registered for the event and the page is reloaded

Decline

  • WHEN a user visits an activity's page which they are already attending, THEN they are presented with a DECLINE button
  • WHEN a user click on the DECLINE button, THEN they are unregistered for the event and the page is reloaded

Profile View

  • #22
  • WHEN a user edits their information, THEN their user record and associated through tables are updated in the database.
  • As a user, when I visit my profile page, I am presented with my name, avatar, personal statement, location.
  • As a user, when I visit a profile page, I can click on past events, upcoming events and hosted events and will see cards summarizing those event

Privacy and Invitation functionality

Requires additional models: Invitation
Invitation Model

  • id INTEGER PK AUTOINCREMENT
  • user_id INTEGER
    • references User model, key id
  • activity_id INTEGER
    • references Activity model, key id

Organizer

  • WHEN a user creates a new activity, THEN they are prompted to select if the activity is private.
  • WHEN an activity is marked private, THEN the organizer can select a list of users to send invitations to

Attendee

  • WHEN a user visit an activity's page which is private, THEN they are only admitted if they have been invited to the activity (checks invitation table)

Mobile navbar

  • modify main.handlebars view to use the mobile menu

Custom middleware

withAuth

  • check if user is authenticated

withOwned

  • When a PUT or DELETE route for an object owned by a user (Activity, User), check if the object being modified is owned by the user modifying it.

Login/Sign up View

  • WHEN a user visits the login/sign up page, THEN they are prompted for email and password to log in, or username, email, password, dietary preferences, and interests to sign up
  • WHEN a user submits their login information, THEN their password is verified and they are logged in if valid password provided, redirected to the user’s Homepage, or provided an error message if invalid
  • WHEN a user submits sign up information, THEN a user is created with the information and they are redirected to their Homepage

Login / Signup function

  • WHEN a user clicks on the LOGIN button on the landing page, THEN they are redirected to the login page.
  • WHEN a user visits the /login route, THEN they are presented with a form to enter their email and password for authentication.
  • WHEN a user clicks on the SIGNUP button on the landing page, THEN they are redirected to the signup page.
  • WHEN a user visits the /signup route, THEN they are presented with a form to enter their username, email, zip code, and password.
  • WHEN a user submits the signup form, THEN the information they provide is validated and used to create a new user.
  • WHEN a user signs up and a new profile is created, THEN the user's browser stores a session unique to the user with user_id and loggedIn stored.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.