Started working on the QBO index page

This commit is contained in:
2016-01-04 22:37:06 -05:00
parent 8a28b12323
commit 515e7fb691
3 changed files with 14 additions and 4 deletions

View File

@@ -22,8 +22,11 @@ class QboController < ApplicationController
:access_token_path => "/oauth/v1/get_access_token" :access_token_path => "/oauth/v1/get_access_token"
}) })
#
# Called when the QBO Top Menu us shown
#
def index def index
@qbo_customer_count = QboCustomers.count
end end
# #
@@ -82,6 +85,6 @@ class QboController < ApplicationController
} }
end end
redirect_to plugin_settings_path(:redmine_qbo), :flash => { :notice => "Successfully synced to Quickbooks" } redirect_to qbo_path(:redmine_qbo), :flash => { :notice => "Successfully synced to Quickbooks" }
end end
end end

View File

@@ -12,6 +12,12 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
<body> <body>
<h2>QboController#index</h2> <h1> Redmine Quickbooks</h1>
Customer Count: <%= @qbo_customer_count %>
<br/>
<br/>
<%= link_to "Sync", qbo_sync_path %>
</body> </body>

View File

@@ -14,4 +14,5 @@
get 'qbo', :to=> 'qbo#index' get 'qbo', :to=> 'qbo#index'
get 'qbo/authenticate', :to => 'qbo#authenticate' get 'qbo/authenticate', :to => 'qbo#authenticate'
get 'qbo/oauth_callback', :to => 'qbo#oauth_callback' get 'qbo/oauth_callback', :to => 'qbo#oauth_callback'
get 'qop/qbo_sync', :to => 'qbo#sync' get 'qbo/sync', :to => 'qbo#sync'