Commit graph

175 commits

Author SHA1 Message Date
c230536e49 fix: avoid error when row object missing field 2025-09-20 15:47:00 -05:00
4221fa50dd fix: fix warning msg for deprecated Grid param 2025-02-14 11:37:21 -06:00
2c269b640b fix: let caller request safe HTML literal for rendered grid table
mostly just for convenience
2024-12-01 18:12:30 -06:00
Lance Edgar
d520f64fee fix: custom method for adding grid action
since for now, we are using custom grid action class
2024-10-03 08:56:52 -05:00
Lance Edgar
0b6cfaa9c5 fix: avoid error when grid value cannot be obtained 2024-08-28 09:53:14 -05:00
Lance Edgar
c1a2c9cc70 fix: tweak how grid data translates to Vue template context
per wuttaweb changes
2024-08-23 14:14:17 -05:00
Lance Edgar
37f760959d fix: merge filters into main grid template
to better match wuttaweb
2024-08-22 19:58:27 -05:00
Lance Edgar
29531c83c4 fix: some fixes for wutta people view 2024-08-22 19:21:48 -05:00
Lance Edgar
7b40c527c8 fix: misc. bugfixes per recent changes 2024-08-22 15:31:09 -05:00
Lance Edgar
b8131c8393 fix: change grid reset-view param name to match wuttaweb 2024-08-22 13:49:57 -05:00
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
1dc632174e fix: allow comma in numeric filter input
just remove them and run with the remainder, on the SQL side
2024-06-30 11:44:33 -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
d0d568b3a5 Escape underscore char for "contains" query filter
since underscore has special meaning for LIKE clause
2024-04-15 12:44:46 -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
98fc82acfd Use ltrim(rtrim()) instead of just trim() in grid filters
apparently this is needed for older SQL Server compatibility, per
https://stackoverflow.com/questions/54340470/trim-is-not-a-recognized-built-in-function-name
2023-12-11 13:50:02 -06:00
Lance Edgar
8522123cd3 Encode values for "between" query filter 2023-11-01 14:54:30 -05:00
Lance Edgar
fe4a178d43 Add way to "ignore" a pending product
and some related tweaks for sake of grid
2023-10-26 20:43:12 -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
07b1d0841e Improve views for taxes, esp. in POS batches 2023-10-07 16:26:33 -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
ae38e09d1b Avoid error when filter params not valid 2023-05-19 17:43:31 -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