Commit graph

122 commits

Author SHA1 Message Date
Lance Edgar e52a83751e feat: move "most" filtering logic for grid class to wuttaweb
we still define all filters, and the "most important" grid methods for
filtering
2024-08-21 20:16:03 -05:00
Lance Edgar ffa724ef37 fix: move "searchable columns" grid feature to wuttaweb 2024-08-21 15:52:30 -05:00
Lance Edgar 59bd58aca7 feat: add new 'waterpark' theme, based on wuttaweb w/ vue2 + buefy
hoping to eventually replace the 'default' view with this one, if all
goes well.  definitely needs more testing and is not exposed as an
option yet, unless configured
2024-08-20 15:03:25 -05:00
Lance Edgar 15ab0c9592 fix: add pager stats to all grid vue data (fixes view history)
also various other tweaks to modernize
2024-08-19 13:48:18 -05:00
Lance Edgar 0eeeb4bd35 fix: prefer attr over key lookup when getting model values
applies to both forms and grids.

the base model class can still handle `obj[key]` but now it is limited
to the column fields only, no association proxies.

so, better to just try `getattr(obj, key)` first and only fall back to
the other if it fails.

unless the obj is clearly a dict in which case try `obj[key]` only
2024-08-19 11:49:52 -05:00
Lance Edgar 1d56a4c0d0 fix: replace all occurrences of component_studly => vue_component 2024-08-19 09:53:10 -05:00
Lance Edgar 290f8fd51e feat: move multi-column grid sorting logic to wuttaweb
tailbone grid template still duplicates much for Vue, and will until
we can port the filters and anything else remaining..
2024-08-18 19:52:21 -05:00
Lance Edgar ec36df4a34 feat: move single-column grid sorting logic to wuttaweb 2024-08-18 14:05:52 -05:00
Lance Edgar 9da2a148c6 feat: move "basic" grid pagination logic to wuttaweb
so far only "simple" pagination is supported by wuttaweb, so basically
the main feature flag, page size, current page.  in this
scenario *all* data is written to client-side JSON and Buefy handles
the actual pagination.

backend pagination coming soon for wuttaweb but for now tailbone still
handles all that.
2024-08-16 18:45:04 -05:00
Lance Edgar 2a0b6da2f9 feat: inherit from wutta base class for Grid 2024-08-16 14:34:50 -05:00
Lance Edgar 1b78bd617c feat: inherit most logic from wuttaweb, for GridAction 2024-08-16 11:56:12 -05:00
Lance Edgar a6ce5eb21d feat: refactor forms/grids/views/templates per wuttaweb compat
this starts to get things more aligned between wuttaweb and tailbone.
the use case in mind so far is for a wuttaweb view to be included in a
tailbone app.

form and grid classes now have some new methods to match wuttaweb, so
templates call the shared method names where possible.

templates can no longer assume they have tailbone-native master view,
form, grid etc. so must inspect context more closely in some cases.
2024-08-15 15:49:54 -05:00
Lance Edgar ae8212069c fix: refactor config.get_model() => app.model
per rattail changes
2024-07-11 13:16:27 -05:00
Lance Edgar b87b1a3801 Escape all unsafe html for grid data 2024-05-31 21:20:45 -05:00
Lance Edgar 890ec64f3c Misc. template cleanup per oruga effort 2024-04-27 19:17:27 -05:00
Lance Edgar 36b9e00dc9 Remove unused code for webhelpers2_grid 2024-04-19 20:15:44 -05:00
Lance Edgar d4089fbc6e Some more tweaks to remove "buefy" references
mostly just docstring / comments but there were some code changes too
2024-04-14 20:56:11 -05:00
Lance Edgar c036932ce4 Remove several references to "buefy" name
class methods, template filenames, etc.

also made various edits per newer conventions
2024-04-14 19:54:29 -05:00
Lance Edgar 96ba039299 Rename grids/complete template (avoid buefy name)
and rename grid methods accordingly
2024-04-13 10:13:51 -05:00
Lance Edgar 27fce173ce Fix how row grid values are fetched, for row proxy objects
per changes coming in SQLAlchemy 2.0
2024-03-26 11:48:52 -05:00
Lance Edgar cf1ef23996 Add column_only kwarg for Grid.set_label() method
pass True to affect only the column label and not the filter
2023-10-25 11:40:52 -05:00
Lance Edgar 6d79766b24 Stop using sa-filters for basic grid sorting
this just breaks if we need to use "aliased" models e.g. when sorting
and/or filtering by Product "regular price" column and similar.  so
now sorting more like we always used to, except for multi-column.

nb. this still assumes callers use `Grid.make_sorter()` when declaring
the sorters.  if caller must specify more custom/explicit sort logic
then it likely will not work and we'll have to add a workaround to
allow avoiding the common logic..but that's another day
2023-10-21 16:10:36 -05:00
Lance Edgar 230a54cb99 Fix default grid filter when "local" date times are involved 2023-10-18 21:25:13 -05:00
Lance Edgar cd82f8927b Fix grid sorting when column key/name differ 2023-10-11 16:13:20 -05:00
Lance Edgar 4328b9e385 Show full version history within the "view" page
avoid full page loads when navigating version history
2023-10-10 11:02:02 -05:00
Lance Edgar edb5393cdc Add front-end support for multi-column grid sorting
user must ctrl-click column header to engage multi-sort
2023-10-08 16:38:24 -05:00
Lance Edgar 6d7754cf2a Add back-end support for multi-column grid sorting
or very nearly, anyway.  front-end still just supports 1 column yet
2023-10-08 14:29:01 -05:00
Lance Edgar f3dddf0e40 Avoid deprecated pretty_hours() function 2023-10-04 11:56:50 -05:00
Lance Edgar abca0115a6 Add remove_sorter() method for grids 2023-09-21 14:37:33 -05:00
Lance Edgar e255c35e86 Set stacklevel for all deprecation warnings 2023-09-10 13:51:11 -05:00
Lance Edgar de373a683b Add grid filter type for BigInteger columns
so we can filter by larger values
2023-09-01 11:20:30 -05:00
Lance Edgar 214f3d9b1e Improve merge support for records with no uuid
for now we "pretend" they have a uuid still, custom view is
responsible for determining the value for each row if needed
2023-06-18 21:20:45 -05:00
Lance Edgar c002d3d182 Add basic support for managing, and accepting API tokens
also various other changes in pursuit of that.  so far tokens are only
accepted by web API and not traditional web app
2023-05-15 08:10:42 -05:00
Lance Edgar ad4ec41e15 Make config param more explicit, for GridFilter constructor
i.e. the rattail config object
2023-02-14 17:32:04 -06:00
Lance Edgar d842a3d8e0 Add new views for App Info, and Configure App
and a way to specify version/url overrides for buefy, vue etc.

also, begin logic for "standard" admin menu
2023-01-12 15:30:10 -06:00
Lance Edgar 8264a69cec Add "direct link" support for master grids 2022-12-25 14:42:29 -06:00
Lance Edgar 871ea84f96 Add support for "is row checkable" in grids
i.e. when grid has checkboxes, some rows maybe shouldn't get one
2022-12-20 19:14:54 -06:00
Lance Edgar 2e3823364c Add support for editing catalog cost in receiving batch, per new theme
had to add several "under the hood" features to make this work, to
embed a Vue component within grid `<td>` cells, etc.
2022-12-05 14:03:03 -06:00
Lance Edgar c2b2d11141 Use shared logic for rendering percentage values 2022-10-29 13:40:35 -05:00
Lance Edgar d52a186e12 Add support for toggling visibility of email profile settings 2022-08-06 18:38:17 -05:00
Lance Edgar 4ff0450632 Stop using the old rattail.db.api.settings module 2022-08-03 14:50:45 -05:00
Lance Edgar 496e03a3ec Honor default pagesize for all grids, per setting 2022-07-01 12:00:17 -05:00
Lance Edgar cb6499522e Let default grid page size correspond to first option 2022-06-14 11:25:29 -05:00
Lance Edgar 75319c0d6a Add grid workarounds when data is list instead of query
ugh, this is not very intuitive.  pretty sure all that needs an
overhaul someday
2022-05-10 20:06:21 -05:00
Lance Edgar ec2600ddf7 Add simple searchable column support for non-AJAX grids
idk maybe even AJAX grids can use?  not gonna try at the moment
2022-02-26 21:00:05 -06:00
Lance Edgar 4d404cb20b Add auto-filter hyperlinks for batch row status breakdown 2022-02-20 19:40:32 -06:00
Lance Edgar 4e3aa1af83 Tweak how "duration" fields are rendered for grids, forms 2022-02-12 19:16:16 -06:00
Lance Edgar 0545099a2b Add buefy support for quick-printing product labels; also speed bump 2022-01-09 15:20:35 -06:00
Lance Edgar 3ece3303db Refactor several "field grids" per Buefy theme
e.g. the Users field when viewing a Role, and Vendor Sources panel
when viewing a Product
2021-09-25 18:54:33 -04:00
Lance Edgar 87d8322b85 Add way to override grid action label rendering
so that custom HTML can be embedded in there somehow..
2021-09-22 16:42:49 -05:00