Coder Social home page Coder Social logo

keed / project-2 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from wdi-sg/project-2

0.0 2.0 0.0 2.65 MB

WDI Project 2 - Node, Express, Mongo

Home Page: https://tripcollab-dk.herokuapp.com/

JavaScript 38.33% CSS 2.10% HTML 59.56%
nodejs expressjs mongodb

project-2's Introduction

Project #2: Tripcollab

A site for travel collaboration with your travel buddies!

Have you ever collaborated with your friends on a trip and found out there are too many ideas?

Tripcollab aims to make travel planning fun with easy itinerary planning.


Live Version

https://tripcollab-dk.herokuapp.com/


Built With


Workflow

Could do with some design rework

1. Create user account

2. Login

3. Add new trip

4. Add desired locations

5. Plan itinerary

List of trips

Current Features

  • Create user account
  • Login
  • Create trips, locations & itinerary
  • Delete trips, locations & itinerary

Further Development

  • Styling of site
  • Add more collaboration features
  • Trip features (Travel time, routes, etc)

References


Interesting Observations

Come on, I think there should be a better way of doing this ? ๐Ÿ˜… Any suggestions ?

Trip.findOne(query).exec((err, data) => {
  if (err) {
    console.log(err)
    req.flash('error', 'Trip not found')
    res.redirect('/home')
  }
  else {
    let dateObj = {
      'dateFrom': getISODate(data.dateFrom),
      'dateTo': getISODate(data.dateTo),
      'dateFromUTC': getUTCDateNoTime(data.dateFrom),
      'dateToUTC': getUTCDateNoTime(data.dateTo)
    }
    let fkTripId = {
      tripId: data.id
    }
    Location.find(fkTripId).exec((err2, data2) => {
      if (err2) {
        console.log(err2)
      }
      else {
        Itinerary.find(fkTripId).sort({date: 'asc'}).exec((err3, data3) => {
          if (err3) {
            console.log(err3)
          }
          else {
            res.render('trip/tripMain',{"results":data, "results2":data2, "dateObj":dateObj, "results3":data3})
          }
        })//End Itinerary.find
      }
    })//End Location.find
  }
})//End Trip.findOne

project-2's People

Contributors

keed avatar jeremiahalex avatar primaulia avatar

Watchers

James Cloos avatar  avatar

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.