fix: refactor grid usage per wuttaweb

This commit is contained in:
Lance Edgar 2024-08-16 15:27:42 -05:00
parent 38af9dd434
commit 5016ed9e64
2 changed files with 7 additions and 7 deletions

View file

@ -97,7 +97,7 @@
this.toggleRows(uuids, checked)
}
TailboneGrid.methods.allChecked = function(checkedList) {
${grid.vue_component}.methods.allChecked = function(checkedList) {
// (de-)select all visible invoices when header checkbox is clicked
let checked = !!checkedList.length
this.toggleRows(this.allRowUUIDs(), checked)

View file

@ -138,8 +138,8 @@ class VendorViewSupplement(ViewSupplement):
def make_accounts_grid(request):
g = grids.Grid('quickbooks_bank_accounts',
request=request,
g = grids.Grid(request,
key='quickbooks_bank_accounts',
data=[], # empty data
columns=[
'store',
@ -165,12 +165,12 @@ class BankAccountsWidget(dfwidget.Widget):
def serialize(self, field, cstruct, **kw):
g = make_accounts_grid(self.request)
g.main_actions.append(
grids.GridAction('edit', icon='edit',
g.actions.append(
grids.GridAction(self.request, 'edit', icon='edit',
click_handler='quickbooksBankAccountEdit(props.row)'))
g.main_actions.append(
grids.GridAction('delete', icon='trash',
g.actions.append(
grids.GridAction(self.request, 'delete', icon='trash',
click_handler='quickbooksBankAccountDelete(props.row)'))
widget = render('/vendors/quickbooks_bank_accounts_widget.mako', {