bookyt_pos 0.0.2 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/app/assets/stylesheets/bookyt_pos.sass +60 -0
- data/app/controllers/days_controller.rb +2 -2
- data/app/views/days/calculate_cash.js.erb +1 -0
- data/app/views/days/new.html.haml +1 -2
- data/lib/bookyt_pos.rb +2 -0
- data/lib/bookyt_pos/navigation.rb +16 -0
- data/lib/bookyt_pos/railtie.rb +3 -0
- data/lib/bookyt_pos/version.rb +1 -1
- metadata +8 -7
- data/app/views/days/calculate_cash.js.rjs +0 -1
- data/app/views/days/new.js.rjs +0 -1
@@ -0,0 +1,60 @@
|
|
1
|
+
@import blueprint/grid
|
2
|
+
|
3
|
+
// Grid
|
4
|
+
$blueprint-grid-columns: 24
|
5
|
+
$blueprint-grid-width: 30px
|
6
|
+
$blueprint-grid-margin: 10px
|
7
|
+
|
8
|
+
|
9
|
+
// Column widths
|
10
|
+
$column_small_form: 10
|
11
|
+
|
12
|
+
// Cash up styling
|
13
|
+
#cash_register_new,
|
14
|
+
#new_day
|
15
|
+
+column(12)
|
16
|
+
|
17
|
+
#cash_register_new
|
18
|
+
ul
|
19
|
+
width: 50%
|
20
|
+
float: left
|
21
|
+
&.second
|
22
|
+
li
|
23
|
+
width: 141px
|
24
|
+
float: right
|
25
|
+
label
|
26
|
+
width: 45px
|
27
|
+
float: left
|
28
|
+
input
|
29
|
+
width: 90px
|
30
|
+
#cash
|
31
|
+
float: left
|
32
|
+
color: red
|
33
|
+
text-decoration: underline
|
34
|
+
font-weight: bold
|
35
|
+
#result
|
36
|
+
width: 100%
|
37
|
+
margin-top: 10px
|
38
|
+
padding-top: 10px
|
39
|
+
border-top: 1px solid black
|
40
|
+
label
|
41
|
+
font-weight: bold
|
42
|
+
margin-right: 15px
|
43
|
+
input
|
44
|
+
width: 100%
|
45
|
+
li:first-child
|
46
|
+
margin-bottom: 10px
|
47
|
+
|
48
|
+
#new_day
|
49
|
+
label
|
50
|
+
width: 160px
|
51
|
+
input
|
52
|
+
width: 100px
|
53
|
+
float: right
|
54
|
+
&#day_submit
|
55
|
+
width: 100%
|
56
|
+
|
57
|
+
#day_edit
|
58
|
+
table
|
59
|
+
th
|
60
|
+
padding-right: 20px
|
@@ -6,8 +6,8 @@ class DaysController < AuthorizedController
|
|
6
6
|
|
7
7
|
# AJAX methods
|
8
8
|
def calculate_cash
|
9
|
-
bills = params[:cash_register].select { |
|
10
|
-
mint = params[:cash_register].select { |
|
9
|
+
bills = params[:cash_register].select { |key, value| key.to_f > 5 }
|
10
|
+
mint = params[:cash_register].select { |key, value| key.to_f <= 5 }
|
11
11
|
|
12
12
|
@cash = bills.map { |a| a[0].to_f * a[1].to_f }.sum
|
13
13
|
@cash += mint.map { |a| a[1].to_f }.sum
|
@@ -0,0 +1 @@
|
|
1
|
+
$('#cash').html(<%=j @cash.to_s %>)
|
data/lib/bookyt_pos.rb
CHANGED
@@ -0,0 +1,16 @@
|
|
1
|
+
module BookytPos
|
2
|
+
module Navigation
|
3
|
+
def setup_bookyt_pos(navigation)
|
4
|
+
navigation.item :store, I18n::translate('bookyt.main_navigation.store'), new_day_path,
|
5
|
+
:tooltip => I18n::translate('bookyt.main_navigation.tooltip.store'),
|
6
|
+
:if => Proc.new { user_signed_in? } do |store|
|
7
|
+
store.item :day, I18n::translate('bookyt.main_navigation.days'), days_path,
|
8
|
+
:tooltip => I18n::translate('bookyt.main_navigation.tooltip.days'),
|
9
|
+
:highlights_on => /\/days($|\?)/
|
10
|
+
store.item :day, I18n::translate('bookyt.main_navigation.new_day'), new_day_path,
|
11
|
+
:tooltip => I18n::translate('bookyt.main_navigation.tooltip.new_day'),
|
12
|
+
:highlights_on => /\/days\/new/
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
data/lib/bookyt_pos/railtie.rb
CHANGED
data/lib/bookyt_pos/version.rb
CHANGED
metadata
CHANGED
@@ -2,12 +2,12 @@
|
|
2
2
|
name: bookyt_pos
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
hash: 27
|
5
|
-
prerelease:
|
5
|
+
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
|
+
- 1
|
8
9
|
- 0
|
9
|
-
|
10
|
-
version: 0.0.2
|
10
|
+
version: 0.1.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- "Simon H\xC3\xBCrlimann (CyT)"
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-
|
18
|
+
date: 2011-08-03 00:00:00 +02:00
|
19
19
|
default_executable:
|
20
20
|
dependencies: []
|
21
21
|
|
@@ -28,21 +28,22 @@ extensions: []
|
|
28
28
|
extra_rdoc_files: []
|
29
29
|
|
30
30
|
files:
|
31
|
+
- app/assets/stylesheets/bookyt_pos.sass
|
31
32
|
- app/controllers/days_controller.rb
|
32
33
|
- app/models/day.rb
|
33
34
|
- app/views/days/_calculate.html.haml
|
34
35
|
- app/views/days/_complete_form.html.haml
|
35
36
|
- app/views/days/_day.html.haml
|
36
37
|
- app/views/days/_form.html.haml
|
37
|
-
- app/views/days/calculate_cash.js.
|
38
|
+
- app/views/days/calculate_cash.js.erb
|
38
39
|
- app/views/days/edit.html.haml
|
39
40
|
- app/views/days/index.html.haml
|
40
41
|
- app/views/days/new.html.haml
|
41
|
-
- app/views/days/new.js.rjs
|
42
42
|
- app/views/days/show.html.haml
|
43
43
|
- config/locales/de.yml
|
44
44
|
- config/routes.rb
|
45
45
|
- lib/bookyt_pos.rb
|
46
|
+
- lib/bookyt_pos/navigation.rb
|
46
47
|
- lib/bookyt_pos/railtie.rb
|
47
48
|
- lib/bookyt_pos/version.rb
|
48
49
|
has_rdoc: true
|
@@ -75,7 +76,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
75
76
|
requirements: []
|
76
77
|
|
77
78
|
rubyforge_project:
|
78
|
-
rubygems_version: 1.
|
79
|
+
rubygems_version: 1.3.7
|
79
80
|
signing_key:
|
80
81
|
specification_version: 3
|
81
82
|
summary: Point of Sale plugin for bookyt
|
@@ -1 +0,0 @@
|
|
1
|
-
page['#cash'].append(@cash)
|
data/app/views/days/new.js.rjs
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
page['#days_list'].before(render(:partial => 'complete_form'))
|