Got the UI working

This commit is contained in:
2026-03-04 07:55:35 -05:00
parent eb6beea5fa
commit 681747e08b
9 changed files with 69 additions and 2645 deletions

View File

@@ -64,7 +64,8 @@ module RedmineQbo
locals: {
search_customer: search_customer,
customer_id: customer_id,
select_estimate: select_estimate
select_estimate: select_estimate,
f: context[:form]
}
}
)

View File

@@ -16,11 +16,9 @@ module RedmineQbo
# Load the javascript to support the autocomplete forms
def view_layouts_base_html_head(context = {})
safe_join([
'<script src="https://unpkg.com/@hotwired/stimulus/dist/stimulus.umd.js"></script>'.html_safe,
javascript_include_tag( 'application.js', plugin: :redmine_qbo),
javascript_include_tag( 'autocomplete-rails.js', plugin: :redmine_qbo),
javascript_include_tag( 'checkbox_controller.js', plugin: :redmine_qbo),
javascript_include_tag( 'index.js', plugin: :redmine_qbo),
javascript_include_tag( 'nested_form_controller.js', plugin: :redmine_qbo)
])
end

View File

@@ -23,6 +23,8 @@ module RedmineQbo
belongs_to :customer_token, primary_key: :id
belongs_to :estimate, primary_key: :id
has_and_belongs_to_many :invoices
has_many :line_items, dependent: :destroy
accepts_nested_attributes_for :line_items, allow_destroy: true
before_save :titlize_subject
after_commit :enqueue_billing, on: :update