mirror of
https://github.com/rickbarrette/redmine_qbo.git
synced 2026-04-02 08:21:57 -04:00
renamed controllers and updated routes
This commit is contained in:
@@ -7,7 +7,7 @@
|
|||||||
#The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
#The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||||
#
|
#
|
||||||
#THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
#THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
class EmployeeController < ApplicationController
|
class EmployeesController < ApplicationController
|
||||||
include AuthHelper
|
include AuthHelper
|
||||||
|
|
||||||
before_action :require_user, unless: -> { session[:token].nil? }
|
before_action :require_user, unless: -> { session[:token].nil? }
|
||||||
@@ -7,7 +7,7 @@
|
|||||||
#The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
#The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||||
#
|
#
|
||||||
#THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
#THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
class EstimateController < ApplicationController
|
class EstimatesController < ApplicationController
|
||||||
include AuthHelper
|
include AuthHelper
|
||||||
|
|
||||||
before_action :require_user, unless: -> { session[:token].nil? }
|
before_action :require_user, unless: -> { session[:token].nil? }
|
||||||
@@ -7,7 +7,7 @@
|
|||||||
#The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
#The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||||
#
|
#
|
||||||
#THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
#THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
class InvoiceController < ApplicationController
|
class InvoicesController < ApplicationController
|
||||||
include AuthHelper
|
include AuthHelper
|
||||||
|
|
||||||
before_action :require_user, unless: -> { session[:token].nil? }
|
before_action :require_user, unless: -> { session[:token].nil? }
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
<% estimates.sort.reverse.each do |estimate| %>
|
<% estimates.sort.reverse.each do |estimate| %>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<%= check_box_tag "estimate_ids[]", estimate.id, false, onchange: "updateLink()", data: { url: estimate_path(estimate), text: "Estimate ##{estimate.to_s}" }, class: "estimate-checkbox appointment" %>
|
<%= check_box_tag "estimate_ids[]", estimate.id, false, onchange: "updateLink()", data: { url: estimates_path(estimate), text: "Estimate ##{estimate.to_s}" }, class: "estimate-checkbox appointment" %>
|
||||||
<b><%= link_to "##{estimate.doc_number}", estimate_path(estimate), target: :_blank %></b> <%= estimate.txn_date %>
|
<b><%= link_to "##{estimate.doc_number}", estimate_path(estimate), target: :_blank %></b> <%= estimate.txn_date %>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|||||||
@@ -14,18 +14,13 @@ get 'qbo/oauth_callback', to: 'qbo#oauth_callback'
|
|||||||
|
|
||||||
#manual sync
|
#manual sync
|
||||||
get 'qbo/sync', to: 'qbo#sync'
|
get 'qbo/sync', to: 'qbo#sync'
|
||||||
get 'customers/sync', to: 'customers#sync'
|
|
||||||
get 'employees/sync', to: 'employee#sync'
|
|
||||||
get 'invoices/sync', to: 'invoice#sync'
|
|
||||||
get 'estimates/sync', to: 'estimate#sync'
|
|
||||||
|
|
||||||
#webhook
|
#webhook
|
||||||
post 'qbo/webhook', to: 'qbo#webhook'
|
post 'qbo/webhook', to: 'qbo#webhook'
|
||||||
|
|
||||||
# Estimate & Invoice PDF
|
# Estimate & Invoice PDF
|
||||||
get 'estimates/sync', to: 'estimate#sync'
|
get 'estimates/doc/', to: 'estimates#doc', as: :estimate_doc
|
||||||
get 'estimates/doc/', to: 'estimate#doc', as: :estimate_doc
|
get 'invoices/:id', to: 'invoices#show', as: :invoice
|
||||||
get 'invoices/:id', to: 'invoice#show', as: :invoice
|
|
||||||
|
|
||||||
#manual billing
|
#manual billing
|
||||||
get 'bill/:id', to: 'qbo#bill', as: :bill
|
get 'bill/:id', to: 'qbo#bill', as: :bill
|
||||||
@@ -42,3 +37,16 @@ resources :customers do
|
|||||||
get :autocomplete_customer_name, on: :collection
|
get :autocomplete_customer_name, on: :collection
|
||||||
get :sync
|
get :sync
|
||||||
end
|
end
|
||||||
|
|
||||||
|
resources :estimates do
|
||||||
|
get :sync
|
||||||
|
get :doc, as: :estimate_doc
|
||||||
|
end
|
||||||
|
|
||||||
|
resources :employees do
|
||||||
|
get :sync
|
||||||
|
end
|
||||||
|
|
||||||
|
resources :invoices do
|
||||||
|
get :sync
|
||||||
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user