From 460bcd466f07440070d2859a0e7937d338021270 Mon Sep 17 00:00:00 2001 From: Rick Barrette Date: Wed, 18 Mar 2026 19:11:33 -0400 Subject: [PATCH] Fixed routes --- app/views/qbo/_settings.html.erb | 4 ++-- config/routes.rb | 25 ++++++++----------------- 2 files changed, 10 insertions(+), 19 deletions(-) diff --git a/app/views/qbo/_settings.html.erb b/app/views/qbo/_settings.html.erb index cb15355..a63ce90 100644 --- a/app/views/qbo/_settings.html.erb +++ b/app/views/qbo/_settings.html.erb @@ -71,9 +71,9 @@
- <%= link_to t(:label_sync_now_customers), customers_sync_path(full_sync: true), class: 'button icon icon-reload' %> + <%= link_to t(:label_sync_now_customers), customers_sync_path, class: 'button icon icon-reload' %> <%= link_to t(:label_sync_now_employees), employees_sync_path, class: 'button icon icon-reload' %> - <%= link_to t(:label_sync_now_invoices), invoices_sync_path(full_sync: true), class: 'button icon icon-reload' %> + <%= link_to t(:label_sync_now_invoices), invoices_sync_path, class: 'button icon icon-reload' %> <%= link_to t(:label_sync_now_estimate), estimates_sync_path, class: 'button icon icon-reload' %>
\ No newline at end of file diff --git a/config/routes.rb b/config/routes.rb index 0a7439b..4b3f757 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -14,13 +14,18 @@ get 'qbo/oauth_callback', to: 'qbo#oauth_callback' #manual sync get 'qbo/sync', to: 'qbo#sync' +get 'customers/sync', to: 'customers#sync' +get 'invoices/sync', to: 'invoices#sync' +get 'estimates/sync', to: 'estimates#sync' +get 'employees/sync', to: 'employees#sync' #webhook post 'qbo/webhook', to: 'qbo#webhook' # Estimate & Invoice PDF -get 'estimates/doc/', to: 'estimates#doc', as: :estimate_doc -get 'invoices/:id', to: 'invoices#show', as: :invoice +get 'estimates/:id', to: 'estimate#show', as: :estimate +get 'estimates/doc/', to: 'estimate#doc', as: :estimate_doc +get 'invoices/:id', to: 'invoice#show', as: :invoice #manual billing get 'bill/:id', to: 'qbo#bill', as: :bill @@ -35,18 +40,4 @@ get 'filter_invoices_by_customer' => 'customers#filter_invoices_by_customer' resources :customers do get :autocomplete_customer_name, on: :collection - get :sync -end - -resources :estimates do - get :sync - get :doc, as: :estimate_doc -end - -resources :employees do - get :sync -end - -resources :invoices do - get :sync -end +end \ No newline at end of file