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

Market controller #28

Open
wants to merge 43 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
e5c4dd1
test on readme
Oct 4, 2016
0c9797d
generated general user controller, model for markets, vendors, produc…
goaskcarmen Oct 4, 2016
94c44c5
added ERD diagram in app/assets/images
Oct 5, 2016
0f4da78
imported data
goaskcarmen Oct 5, 2016
9f38d61
added index page
goaskcarmen Oct 5, 2016
059df0e
for updating delelopment
Oct 5, 2016
9deef05
deleted development log
Oct 5, 2016
94e527f
set up index page
Oct 5, 2016
cc8c3b5
completed general_user view page with market list and vendor lists
Oct 5, 2016
4fc77ca
generated vendors controller
Oct 5, 2016
2fedcc0
added market form
goaskcarmen Oct 5, 2016
083e9ab
merge
goaskcarmen Oct 5, 2016
c1c577f
Merge pull request #1 from goaskcarmen/marketController
goaskcarmen Oct 5, 2016
25f6aa4
completed create a vendor feature. used dropdown to let user to selec…
Oct 6, 2016
e8ffb5d
edit a vendor feature. Also link to vendor index from main page
Oct 6, 2016
49913ed
completed delete a vendor feature
Oct 6, 2016
7028a61
completed market modification
goaskcarmen Oct 7, 2016
ab25638
vendor can create, edit and delete a product
Oct 7, 2016
d3cc3b5
merged createNewVendor branch
Oct 7, 2016
59e838f
merge
goaskcarmen Oct 7, 2016
aaf3118
Merge pull request #3 from goaskcarmen/marketController
goaskcarmen Oct 7, 2016
c653119
postgres for production gem
goaskcarmen Oct 7, 2016
8050c5d
added gemfile.lock
goaskcarmen Oct 7, 2016
3ae8607
completed market controller tasks and added validation
goaskcarmen Oct 7, 2016
b4b8b83
completed as a vendor user, I can view a list of Sales. working on cr…
Oct 7, 2016
f3fc76e
merge
goaskcarmen Oct 7, 2016
aaa0893
Merge pull request #4 from goaskcarmen/marketController
goaskcarmen Oct 7, 2016
656feca
submit
goaskcarmen Oct 8, 2016
e6199b0
Remove temp file
Oct 8, 2016
c4b3f60
remove Gemfile.lock, it's machine depedent and should be regenerated …
Oct 8, 2016
5973381
update gitignore
Oct 8, 2016
5ac48e0
fix routes naming convention
Oct 8, 2016
bc54e3e
add sales for product feature done
Oct 8, 2016
b5e52b5
show total sales feature done
Oct 8, 2016
538e6cf
completed total sales for current month. debugging
Oct 8, 2016
6b71ea4
completed and tested total sales in current month
Oct 9, 2016
0ecf3b4
completed sales list in current month
Oct 9, 2016
c6e2ba6
converted sales from cents to dollor in model
Oct 9, 2016
f1d2bcc
basic layout setup for index, market and vendor index
Oct 9, 2016
aa02114
improved layout of indexes and create form for all accounts
Oct 11, 2016
8dc0334
corrected @product intead of haha_product in Vendor edit view
Oct 11, 2016
038bf0f
Merge pull request #5 from goaskcarmen/sales
goaskcarmen Oct 12, 2016
e60c358
added sort to the market list
goaskcarmen Oct 12, 2016
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,47 @@
*.rbc
capybara-*.html
.rspec
/log
/tmp
/db/*.sqlite3
/db/*.sqlite3-journal
/public/system
/coverage/
/spec/tmp
**.orig
rerun.txt
pickle-email-*.html
Gemfile.lock

# TODO Comment out this rule if you are OK with secrets being uploaded to the repo
config/initializers/secret_token.rb

# Only include if you have production secrets in this file, which is no longer a Rails default
# config/secrets.yml

# dotenv
# TODO Comment out this rule if environment variables can be committed
.env

## Environment normalization:
/.bundle
/vendor/bundle

# these should all be checked in to normalize the environment:
# Gemfile.lock, .ruby-version, .ruby-gemset

# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
.rvmrc

# if using bower-rails ignore default bower_components path bower.json files
/vendor/assets/bower_components
*.bowerrc
bower.json

# Ignore pow environment settings
.powenv

# Ignore Byebug command history file.
.byebug_history

.DS_Store
50 changes: 50 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
source 'https://rubygems.org'



gem 'awesome_print'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.2.7'

# Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .coffee assets and views
gem 'coffee-rails', '~> 4.1.0'
# See https://github.com/rails/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby

# Use jquery as the JavaScript library
gem 'jquery-rails'
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem 'turbolinks'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.0'
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', '~> 0.4.0', group: :doc

# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'

# Use Unicorn as the app server
# gem 'unicorn'

# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development
gem 'pg', group: :production
gem 'rails_12factor', group: :production

group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'byebug'
end

group :development do
# Access an IRB console on exception pages or by using <%= console %> in views
gem 'web-console', '~> 2.0'
# Use sqlite3 as the database for Active Record
gem 'sqlite3'
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring'
end
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
Project contributors: Maya and Carmen.


# FarMar Rails
Build a database backend application to view, create, and manage farmers markets as well as their vendors, products, and sales.
In this implementation we'll be seeding with static data, and also building a tool to allow markets and/or vendors to sign up and add their own data.
Expand Down
28 changes: 28 additions & 0 deletions README.rdoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
== README

This README would normally document whatever steps are necessary to get the
application up and running.

Things you may want to cover:

* Ruby version

* System dependencies

* Configuration

* Database creation

* Database initialization

* How to run the test suite

* Services (job queues, cache servers, search engines, etc.)

* Deployment instructions

* ...


Please feel free to use a different markup language if you do not plan to run
<tt>rake doc:app</tt>.
6 changes: 6 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Add your own tasks in files placed in lib/tasks ending in .rake,
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.

require File.expand_path('../config/application', __FILE__)

Rails.application.load_tasks
Empty file added app/assets/images/.keep
Empty file.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/background.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/background2.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
/*
* This is a manifest file that'll be compiled into application.css, which will include all the files
* listed below.
*
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
* or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path.
*
* You're free to add application-wide styles to this file and they'll appear at the bottom of the
* compiled file so the styles you add here take precedence over styles defined in any styles
* defined in the other CSS/SCSS files in this directory. It is generally better to create a new
* file per style scope.
*


*/
/*background*/

/*body{
background-image: url('http://www.dealweal.in/wp-content/uploads/2016/07/ChoppingBoard2.jpg');
}*/



.my-container {
position: relative;
overflow: hidden;
}
.my-container .list_title, .full_list, .name_button, .state_button, .form{
position: relative;
z-index: 2;
}
.my-container img {
position: absolute;
left: 0;
top: 0;
width: 100%;
height: auto;
opacity: 0.7;
}

body{
background-image: url("http://www.dealweal.in/wp-content/uploads/2016/07/ChoppingBoard2.jpg");
}
/*header*/
header{
// padding-top: 0.5rem;
// padding-bottom: 0.5rem;
// background-color: white;
z-index: 1000;
width: 100%;
position: fixed;
background-color: #FFF;
// background-color: black;
opacity: 0.8;
// border-bottom: 1px solid #d3d3d3;
display: inline;
}

header h1{
font-family: "Poiret One";
width: 30%;
position: relative;
float: left;
// color: white;
}

/*navigator*/
ul{
list-style-type: none;
}


header nav{
text-align: right;
font-family:"Lora";
margin-right: 4rem;
}

nav li{
display: inline;
}

nav ul{
width: 50%;
float: right;
}

ul a{
color: black;
text-decoration: none;
list-style-type: none;
margin-right: 0.5rem;
margin-left: 0.5rem;
text-transform: uppercase;
}

nav a:hover{
color: #df5d4b;
}

/*body*/
section{
padding-top: 5rem;
}


/*footer*/

footer{
background: #f2f2f2;
text-align: right;
padding-top: 0.5rem;
// padding-bottom: 1rem;
clear: both;
}

footer p{
font-family:"Lora";
color: black;
display: inline;
font-size: 0.8rem;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.
//
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
// or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path.
//
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
// compiled file.
//
// Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
// about supported directives.
//




48 changes: 48 additions & 0 deletions app/assets/images/background_files/css
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
/* cyrillic */
@font-face {
font-family: 'Lora';
font-style: normal;
font-weight: 400;
src: local('Lora'), local('Lora-Regular'), url(https://fonts.gstatic.com/s/lora/v9/XXbc_aQtUtjJrkp7pYGEKhTbgVql8nDJpwnrE27mub0.woff2) format('woff2');
unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* latin-ext */
@font-face {
font-family: 'Lora';
font-style: normal;
font-weight: 400;
src: local('Lora'), local('Lora-Regular'), url(https://fonts.gstatic.com/s/lora/v9/tHQOv8O1rd82EIrTHlzvmhTbgVql8nDJpwnrE27mub0.woff2) format('woff2');
unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
font-family: 'Lora';
font-style: normal;
font-weight: 400;
src: local('Lora'), local('Lora-Regular'), url(https://fonts.gstatic.com/s/lora/v9/rAXKWvABQNHjPUk26ixVvvesZW2xOQ-xsNqO47m55DA.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000;
}
/* cyrillic */
@font-face {
font-family: 'Poiret One';
font-style: normal;
font-weight: 400;
src: local('Poiret One'), local('PoiretOne-Regular'), url(https://fonts.gstatic.com/s/poiretone/v4/cKr_e199f0xMkxMkRbEJXwsYbbCjybiHxArTLjt7FRU.woff2) format('woff2');
unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* latin-ext */
@font-face {
font-family: 'Poiret One';
font-style: normal;
font-weight: 400;
src: local('Poiret One'), local('PoiretOne-Regular'), url(https://fonts.gstatic.com/s/poiretone/v4/3Annd_XP-99FcGbOpm6fVAsYbbCjybiHxArTLjt7FRU.woff2) format('woff2');
unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
font-family: 'Poiret One';
font-style: normal;
font-weight: 400;
src: local('Poiret One'), local('PoiretOne-Regular'), url(https://fonts.gstatic.com/s/poiretone/v4/HrI4ZJpJ3Fh0wa5ofYMK8QzyDMXhdD8sAj6OAJTFsBI.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
(function() {


}).call(this);
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
/* line 4, /Users/CarmenChan/Documents/ADA/Rails/FarMarRails/app/assets/stylesheets/general_users.scss */
.list_title {
position: relative;
top: 18rem;
left: 15rem;
background-color: rgba(0, 0, 0, 0.7);
width: 18rem;
text-align: center;
border-radius: 0.5rem;
color: white;
font-family: "lora";
}

/* line 16, /Users/CarmenChan/Documents/ADA/Rails/FarMarRails/app/assets/stylesheets/general_users.scss */
.full_list {
margin-left: 50%;
width: 28rem;
height: 23rem;
overflow: scroll;
background-color: rgba(0, 0, 0, 0.7);
border-radius: 0.5rem;
}

/* line 29, /Users/CarmenChan/Documents/ADA/Rails/FarMarRails/app/assets/stylesheets/general_users.scss */
.list_row a:link, a:visited, a:active {
text-decoration: none;
font-family: "Lora";
margin-left: 1rem;
}

/* line 35, /Users/CarmenChan/Documents/ADA/Rails/FarMarRails/app/assets/stylesheets/general_users.scss */
article a {
color: white;
}

/* line 40, /Users/CarmenChan/Documents/ADA/Rails/FarMarRails/app/assets/stylesheets/general_users.scss */
.list_row a:hover {
color: #df5d4b;
font-family: "Lora";
}
Loading