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

catch up to master #5

Open
wants to merge 106 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
106 commits
Select commit Hold shift + click to select a range
8239695
added more to preowned
andrewlacc Apr 29, 2017
b01ff28
stub out admin area
andrewlacc Apr 29, 2017
36e6998
pre-owned to refurbished
andrewlacc May 15, 2017
0e9ea70
forgot footer notes
andrewlacc May 15, 2017
322cb59
update video card
andrewlacc May 25, 2017
3cbd8b4
test security
andrewlacc May 25, 2017
6057d42
rollback
andrewlacc May 25, 2017
4be9f13
making changes
andrewlacc Jun 8, 2017
9beb3b4
Merge branch 'Kelthagas-master' into staging
andrewlacc Jun 8, 2017
25e19dc
fixing stuff for deployment
andrewlacc Jun 8, 2017
ca8afcb
Merge branch 'staging'
andrewlacc Jun 8, 2017
be42af9
added ignore files
andrewlacc Jun 8, 2017
e9cafc8
ignoring more files
andrewlacc Jun 8, 2017
2a10d37
fix onsite date bugs and add id
andrewbatallones Jun 9, 2017
fa7fb9d
Merge pull request #7 from andrewlacc/andrew
andrewlacc Jun 9, 2017
0483ade
added navigation and small bug fixes
andrewbatallones Jun 12, 2017
6494d67
Merge pull request #8 from andrewlacc/andrew
andrewlacc Jun 12, 2017
3411e18
fixed display bug and fixed print issue
andrewbatallones Jun 17, 2017
601daa3
Merge pull request #9 from andrewlacc/andrew
andrewlacc Jun 17, 2017
806a413
update style and add inline login
andrewbatallones Jun 22, 2017
f94e518
Merge pull request #10 from andrewlacc/andrew
andrewlacc Jun 22, 2017
34d36ea
fixed onsite and add settings model
andrewbatallones Jun 24, 2017
d5206bf
Merge pull request #11 from andrewlacc/andrew
andrewbatallones Jun 24, 2017
71bbc3b
update look
andrewbatallones Jun 24, 2017
53f0311
Merge pull request #12 from andrewlacc/andrew
andrewlacc Jun 24, 2017
c5a5138
foundation for index and off-site
andrewbatallones Jun 29, 2017
f891e74
setting up forms
andrewbatallones Jun 29, 2017
43f1f31
progress with client structure
andrewbatallones Jun 30, 2017
e88e15c
updating onsite forms
andrewbatallones Jul 1, 2017
10724b4
finished off_site forms
andrewbatallones Jul 7, 2017
ea9500b
last bug fixes and major release
andrewbatallones Jul 7, 2017
86bab70
Merge pull request #13 from andrewlacc/master
andrewlacc Jul 7, 2017
2bc279c
Merge pull request #14 from andrewlacc/andrew
andrewlacc Jul 7, 2017
e257a2e
fixed onsite index and sorting
andrewbatallones Jul 8, 2017
fc78fdb
Merge branch 'andrew' of github.com:andrewlacc/lacc-back into andrew
andrewbatallones Jul 8, 2017
aa7f640
Merge pull request #15 from andrewlacc/andrew
andrewbatallones Jul 8, 2017
8500121
added sorting to UsedComputers
andrewbatallones Jul 8, 2017
99267d1
fixed creating new onsite issue
andrewbatallones Jul 12, 2017
3704121
fixed off site sheet and add serial number
andrewbatallones Jul 12, 2017
ba1f95f
Merge pull request #16 from andrewlacc/andrew
andrewbatallones Jul 12, 2017
01bbe37
fixed off site stuff
andrewbatallones Jul 13, 2017
280e4b2
Merge pull request #17 from andrewlacc/andrew
andrewbatallones Jul 13, 2017
a90f911
fixed issue with client select
andrewbatallones Jul 13, 2017
f611062
Merge pull request #18 from andrewlacc/andrew
andrewbatallones Jul 13, 2017
1214176
add pagination
andrewbatallones Jul 13, 2017
f7bfe69
Merge pull request #19 from andrewlacc/andrew
andrewbatallones Jul 13, 2017
3d4e88b
fixed issue with clients page
andrewbatallones Jul 14, 2017
01fa32a
Merge branch 'master' into andrew
andrewbatallones Jul 14, 2017
0d9d79a
Merge pull request #20 from andrewlacc/andrew
andrewbatallones Jul 14, 2017
ee6802c
adding invoicing to onsite form
andrewbatallones Jul 22, 2017
c443ada
Merge pull request #21 from andrewlacc/andrew
andrewbatallones Jul 22, 2017
b26c273
added form control for invoice
andrewbatallones Jul 22, 2017
7e31177
Merge pull request #22 from andrewlacc/andrew
andrewbatallones Jul 22, 2017
fd3f931
remove reactJS
andrewbatallones Jul 22, 2017
fdacdd7
Merge pull request #23 from andrewlacc/andrew
andrewbatallones Jul 24, 2017
8e64003
sort clients by name
andrewbatallones Jul 24, 2017
24e62bd
Merge pull request #24 from andrewlacc/andrew
andrewbatallones Jul 24, 2017
a1b4d48
remove .coffee -> .js
andrewbatallones Aug 4, 2017
2dddfeb
setting up testing
andrewbatallones Aug 5, 2017
5881889
add blank forms
andrewbatallones Aug 5, 2017
c523a91
Merge pull request #25 from andrewlacc/andrew
andrewbatallones Aug 5, 2017
072447a
fixed blank forms
andrewbatallones Aug 5, 2017
230d352
Merge pull request #26 from andrewlacc/andrew
andrewbatallones Aug 5, 2017
c9d83e3
change functionality of delete accross website
andrewbatallones Aug 11, 2017
70b6742
Merge pull request #27 from andrewlacc/andrew
andrewbatallones Aug 11, 2017
efae877
NEW BOOTSTRAP BETA VERSION
andrewbatallones Aug 11, 2017
879b602
Merge pull request #28 from andrewlacc/andrew
andrewbatallones Aug 11, 2017
05c2ce7
added font-awesome icons
andrewbatallones Aug 13, 2017
2fe94eb
adding icons and fixing stuff
andrewbatallones Sep 26, 2017
9b20b75
Merge pull request #29 from andrewlacc/andrew
andrewbatallones Sep 26, 2017
a2a3c15
setting up new layout for site
andrewbatallones Sep 29, 2017
a46fbdd
Delete database.yml
andrewbatallones Sep 30, 2017
36100a4
Delete secrets.yml
andrewbatallones Sep 30, 2017
508c07b
updating back buttons and cleaning up code
andrewbatallones Sep 30, 2017
4e900af
refactor display sheets
andrewbatallones Oct 5, 2017
ca2883b
minor refactor for computer sheets
andrewbatallones Oct 5, 2017
7a2c2ba
refactor layout for computer and display sheets
andrewbatallones Oct 6, 2017
49fc03c
fixing nav and adding settings
andrewbatallones Oct 12, 2017
a60c6f6
wired up beta date-time-picker with bootstrap v4
andrewbatallones Oct 13, 2017
d24b588
handle_date_time w/ major bugs
andrewbatallones Oct 20, 2017
f094871
updating admin area
andrewbatallones Oct 27, 2017
b6523f1
create calendar for onsite lists
andrewbatallones Nov 4, 2017
4f08660
redo date-time-picker
andrewbatallones Nov 19, 2017
cc78d92
finalizing onsite feature
andrewbatallones Dec 29, 2017
69c00ad
last minuite changes
andrewbatallones Jan 6, 2018
3f04834
fixed notes and update readme
andrewbatallones Jan 6, 2018
b6179b7
Merge pull request #30 from andrewlacc/andrew
andrewbatallones Jan 6, 2018
44ce988
fix onsite bug
andrewbatallones Jan 6, 2018
301f63d
Merge pull request #31 from andrewlacc/andrew
andrewbatallones Jan 6, 2018
57314d8
fix onsite issue-2
andrewbatallones Jan 6, 2018
8afd017
Merge pull request #32 from andrewlacc/andrew
andrewbatallones Jan 6, 2018
1418177
fixed issue with menu
andrewbatallones Feb 6, 2018
7bbc342
made trade-in sheet notes a textarea
andrewbatallones Feb 24, 2018
de40f63
Merge pull request #33 from andrewlacc/andrew
andrewbatallones Feb 24, 2018
1a10959
update client name selection and added jquery ui
andrewbatallones Mar 1, 2018
367ee2f
finished initial fix for onsites
andrewbatallones Mar 1, 2018
5f77bee
fixed some things on off site and got autocomplete working
andrewbatallones Mar 1, 2018
7eec12e
added version change to 5.1.0
andrewbatallones Mar 1, 2018
4da2c68
Merge pull request #34 from andrewlacc/andrew
andrewbatallones Mar 1, 2018
de85e55
fixed minor bugs with Client page
andrewbatallones Mar 2, 2018
7c92f0e
Merge pull request #35 from andrewlacc/andrew
andrewbatallones Mar 2, 2018
86f74a2
got local tax settings up and running
andrewbatallones Mar 2, 2018
f1a0727
fix minor bugs
andrewbatallones Mar 7, 2018
53c04f4
Merge pull request #36 from andrewlacc/andrew
andrewbatallones Mar 7, 2018
d849b9b
bug fix for creating processor speed
andrewbatallones Mar 7, 2018
0b8f6ad
Merge pull request #37 from andrewlacc/andrew
andrewbatallones Mar 7, 2018
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
8 changes: 7 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,10 @@
.byebug_history

# Custom ignore files
/config/application.yml
/config/application.yml
/config/database.yml
/config/secrets.yml
/db/seeds.rb

# Ignore OSX system files
*/.DS_Store
17 changes: 7 additions & 10 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,29 +16,26 @@ gem 'dalli', '~> 2.7', '>= 2.7.6'
# CSS
gem 'sass-rails', '~> 5.0'
gem 'uglifier', '>= 1.3.0'
gem 'bootstrap', '~> 4.0.0.alpha6'
source 'https://rails-assets.org' do
gem 'rails-assets-tether', '>= 1.3.3'
end
# See https://github.com/rails/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby
gem 'bootstrap', '~> 4.0.0.beta'
gem "font-awesome-rails"
gem "animate-rails"

# JavaScript
gem 'jbuilder', '~> 2.6', '>= 2.6.4'
gem 'jquery-rails'
gem 'jquery-ui-rails', '~> 6.0', '>= 6.0.1'
gem 'coffee-rails', '~> 4.2'
gem 'react-rails', '~> 2.0', '>= 2.0.2'
gem 'bootbox-rails', '~> 0.5.0'
gem 'momentjs-rails', '~> 2.17', '>= 2.17.1'
gem 'lodash-rails'

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

group :development do
# Access an IRB console on exception pages or by using <%= console %> anywhere in the code.
gem 'web-console', '>= 3.3.0'
gem 'listen', '~> 3.0.5'
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring'
gem 'spring-watcher-listen', '~> 2.0.0'
end
Expand Down
46 changes: 25 additions & 21 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
GEM
remote: https://rubygems.org/
remote: https://rails-assets.org/
specs:
actioncable (5.0.2)
actionpack (= 5.0.2)
Expand Down Expand Up @@ -39,33 +38,34 @@ GEM
i18n (~> 0.7)
minitest (~> 5.1)
tzinfo (~> 1.1)
animate-rails (1.0.10)
rails
arel (7.1.4)
autoprefixer-rails (6.7.6)
autoprefixer-rails (7.1.2.4)
execjs
babel-source (5.8.35)
babel-transpiler (0.7.0)
babel-source (>= 4.0, < 6)
execjs (~> 2.0)
bcrypt (3.1.11)
bootstrap (4.0.0.alpha6)
bootbox-rails (0.5.0)
bootstrap (4.0.0.beta)
autoprefixer-rails (>= 6.0.3)
popper_js (~> 1.11.1)
sass (>= 3.4.19)
builder (3.2.3)
byebug (9.0.6)
coffee-rails (4.2.1)
coffee-rails (4.2.2)
coffee-script (>= 2.2.0)
railties (>= 4.0.0, < 5.2.x)
railties (>= 4.0.0)
coffee-script (2.4.1)
coffee-script-source
execjs
coffee-script-source (1.12.2)
concurrent-ruby (1.0.5)
connection_pool (2.2.1)
dalli (2.7.6)
debug_inspector (0.0.2)
erubis (2.7.0)
execjs (2.7.0)
ffi (1.9.17)
font-awesome-rails (4.7.0.2)
railties (>= 3.2, < 5.2)
globalid (0.3.7)
activesupport (>= 4.1.0)
i18n (0.8.1)
Expand All @@ -76,9 +76,13 @@ GEM
rails-dom-testing (>= 1, < 3)
railties (>= 4.2.0)
thor (>= 0.14, < 2.0)
jquery-ui-rails (6.0.1)
railties (>= 3.2.16)
listen (3.0.8)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
lodash-rails (4.17.4)
railties (>= 3.1)
loofah (2.0.3)
nokogiri (>= 1.5.9)
mail (2.6.4)
Expand All @@ -89,11 +93,14 @@ GEM
mime-types-data (3.2016.0521)
mini_portile2 (2.1.0)
minitest (5.10.1)
momentjs-rails (2.17.1)
railties (>= 3.1)
multi_json (1.12.1)
mysql2 (0.4.5)
nio4r (2.0.0)
nokogiri (1.7.0.1)
mini_portile2 (~> 2.1.0)
popper_js (1.11.1)
puma (3.7.1)
rack (2.0.1)
rack-test (0.6.3)
Expand All @@ -110,7 +117,6 @@ GEM
bundler (>= 1.3.0, < 2.0)
railties (= 5.0.2)
sprockets-rails (>= 2.0.0)
rails-assets-tether (1.4.0)
rails-dom-testing (2.0.2)
activesupport (>= 4.2.0, < 6.0)
nokogiri (~> 1.6)
Expand All @@ -126,12 +132,6 @@ GEM
rb-fsevent (0.9.8)
rb-inotify (0.9.8)
ffi (>= 0.5.0)
react-rails (2.0.2)
babel-transpiler (>= 0.7.0)
connection_pool
execjs
railties (>= 3.2)
tilt
redis (3.3.3)
sass (3.4.23)
sass-rails (5.0.6)
Expand Down Expand Up @@ -175,19 +175,23 @@ PLATFORMS
ruby

DEPENDENCIES
animate-rails
bcrypt (~> 3.1.7)
bootstrap (~> 4.0.0.alpha6)
bootbox-rails (~> 0.5.0)
bootstrap (~> 4.0.0.beta)
byebug
coffee-rails (~> 4.2)
dalli (~> 2.7, >= 2.7.6)
font-awesome-rails
jbuilder (~> 2.6, >= 2.6.4)
jquery-rails
jquery-ui-rails (~> 6.0, >= 6.0.1)
listen (~> 3.0.5)
lodash-rails
momentjs-rails (~> 2.17, >= 2.17.1)
mysql2 (>= 0.3.18, < 0.5)
puma (~> 3.0)
rails (~> 5.0.1)
rails-assets-tether (>= 1.3.3)!
react-rails (~> 2.0, >= 2.0.2)
redis (~> 3.0)
sass-rails (~> 5.0)
spring
Expand All @@ -198,4 +202,4 @@ DEPENDENCIES
web-console (>= 3.3.0)

BUNDLED WITH
1.14.6
1.16.1
39 changes: 11 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,36 +1,19 @@
# LA Computer Company Blank Forms
# LA Computer Company Back end Sheets

This is the backend website for the LA Computer Company. As of today, it includes the pre-owned sheets for computers and monitors.
This is the back end website to create Refurbished Sheets for computers, displays as well as keep track of On Sites Appointments.

* Ruby version: 2.4.0
* Using Bootstrap: 4.0.6Alpha
* Using Bootstrap: 4.0.0-beta

* UPDATES - 05/14/2017
- Created Database for the different forms.
### Welcome to Version 5
Some of the things that were updated
* Updated looks on some sheet
* Updated onsite section to where it will show a calendar
* Updated other functionality for the site

* UPDATES - 04/04/2017
- Added more options to Hard drive and graphics card
- Sorted options for Pre-owned Comptuer Specifications
- Refactor code to embeded with Ruby

* UPDATES - 03/23/2017
- Condense all to one page format

* UPDATES - 03/16/2017
- Re-designed onsite service form
- Fixed database testing

* UPDATES - 03/15/2017
- Pre-owned: Cleaned up code to have logic on helper file.

* UPDATES - 03/02/2017
- Revised website to have an updated layout. Changed names from RMA to Pre-owned. Introduced Trade-In Sheet form
- Pre-owned: removed "Code" from box for better handwritten codes. Renamed OP -> Original Part. Fixed spacing from wifi to notes. Made input text darker.
- New Trade-In Sheet now available
- Display Pre-owned: updated format and code for pre-owned display sheets
- Trade-In Progress report: removed

* To upload to server, run git push then on server run following commands
### To Upload to the server
* Log in to admin user and pull files
* Log in to app admin and run following commands within app folder
<pre><code>$bundle install --deployment --without development test
$bundle exec rails assets:precompile db:migrate RAILS_ENV=production
$passenger-config restart-app
Expand Down
Binary file added app/assets/images/lacc_brand.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 0 additions & 3 deletions app/assets/javascripts/admin.coffee

This file was deleted.

25 changes: 20 additions & 5 deletions app/assets/javascripts/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,27 @@
// Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
// about supported directives.
//
//= require jquery
//= require tether
//= require jquery3
//= require jquery_ujs
//= require jquery-ui
//= require lodash
//= require turbolinks
//= require popper
//= require bootstrap-sprockets
//= require react
//= require react_ujs
//= require components
//= require bootbox
//= require moment
//= require_tree .

var handleDelete;
var handleBack;
var handleNavigation;
var handleCalendar;
var handleClients;

$(document).on("turbolinks:load", function() {
handleDelete();
handleBack();
handleNavigation();
handleCalendar();
handleClients();
})
1 change: 0 additions & 1 deletion app/assets/javascripts/components.js

This file was deleted.

Empty file.
3 changes: 0 additions & 3 deletions app/assets/javascripts/computer.coffee

This file was deleted.

3 changes: 0 additions & 3 deletions app/assets/javascripts/display.coffee

This file was deleted.

7 changes: 7 additions & 0 deletions app/assets/javascripts/handle_back.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
handleBack = function() {
var baseSites = ["/computer"];

$("#backButton").on("click", function() {
history.back();
});
}
75 changes: 75 additions & 0 deletions app/assets/javascripts/handle_calendar.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
handleCalendar = function() {
var todayMoment = moment();
var current = moment(todayMoment.month() + 1, "MM");
var todayId = "#day-" + ((Math.floor(todayMoment.date() / 7) * 7) + todayMoment.day());
var onsites = $('.onsite-data');

// Builds and fills in information for the calendar
var buildCalendar = function(date) {
$(todayId).removeClass('bg-secondary');
$('#month').text(date.format('MMMM YYYY'));

_.each(_.range(1, 43), function(day) {
if($('#day-' + day)[0]) {
$('#day-' + day)[0].children[0].innerHTML = moment(date).day(day).date();
}
});

if (date.isSame(todayMoment, 'year', 'month')) {
$(todayId).addClass('bg-secondary');
}
};
buildCalendar(current);

// Builds onsite information for calendar
var parseDateTime = function(dateTime) {
return dateTime.toString().split("at ");
}

// Fills in Onsite data to map
var buildCellData = function() {
$('.onsites').text("");

var cellData = [];

_.each($('.onsite-data'), function(data) {
var cellObj = {
id: data.children[0].innerHTML,
date: parseDateTime(data.children[4].innerHTML)[0],
cell: data.children[1].innerHTML + " at " + parseDateTime(data.children[4].innerHTML)[1]
}

cellData.push(cellObj);
});

_.each(cellData, function(data) {
var dateId = "";
var date = moment(data.date, "MM-DD-YYYY");

if (date.month() === current.month()) {
dateId = ("#day-" + ((Math.floor(date.date() / 7) * 7) + date.day()));
if ($(dateId)[0]) {
$(dateId)[0].children[1].innerHTML = data.cell;
$(dateId).on('click', function() {
location.pathname = '/onsite/' + data.id;
});
}
}
});
};
buildCellData();

// Next Month function
$('#prev-month').on('click', function() {
current.subtract(1, 'months');
buildCalendar(current);
buildCellData();
});

// Previous Month function
$('#next-month').on('click', function() {
current.add(1, 'months');
buildCalendar(current);
buildCellData();
});
}
19 changes: 19 additions & 0 deletions app/assets/javascripts/handle_clients.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
handleClients = function() {
var clientNames = [];

$.ajax({
url: '/get_clients'
}).done(function(response) {
_.each(response, function(data) {
clientNames.push(data.name);
});
});

$('#on_site_client_name').autocomplete({
source: clientNames
});

$('#off_site_client_name').autocomplete({
source: clientNames
});
}
Loading