Commit graph

3450 commits

Author SHA1 Message Date
Lance Edgar 9f984241c4 Cleanup grid/filters logic a bit
get rid of grids.js file, remove filter templates from complete.mako

move all that instead to filter-components.mako

for now, base template does import + setup for the latter, "just in
case" a given view has any grids.  each grid should (still) be
isolated but no code should be duplicated now.  whereas before the
grid filter templates were in comlete.mako and hence could be declared
more than once if multiple grids are on a page
2024-04-24 17:43:22 -05:00
Lance Edgar d6fa83cd87 Fix permission checks for root user with pyramid 2.x 2024-04-19 22:27:30 -05:00
Lance Edgar 8781e34c98 Rename setting for custom user css (remove "buefy")
but have to keep support for older setting name for now
2024-04-19 21:18:57 -05:00
Lance Edgar 36b9e00dc9 Remove unused code for webhelpers2_grid 2024-04-19 20:15:44 -05:00
Lance Edgar 5cb643a32a Update changelog 2024-04-19 19:47:41 -05:00
Lance Edgar 1fa6e35663 Remove config "style" from appinfo page
there is only one style now (finally)
2024-04-19 17:45:58 -05:00
Lance Edgar e82f0f37d8 Fix raw query to avoid SQLAlchemy 2.x warnings 2024-04-16 23:29:56 -05:00
Lance Edgar 7fa39d42e2 Fix ASGI websockets when serving on sub-path under site root 2024-04-16 23:27:50 -05:00
Lance Edgar a95cc2b9e8 Update changelog 2024-04-16 21:14:23 -05:00
Lance Edgar e7b8b6e818 Fix master template bug when no form in context 2024-04-16 21:13:53 -05:00
Lance Edgar 5a7deadba2 Update changelog 2024-04-16 20:11:15 -05:00
Lance Edgar 9065f42195 Fix typo when getting app instance 2024-04-16 20:10:10 -05:00
Lance Edgar b37981e83f Prevent multi-click for grid filters "Save Defaults" button 2024-04-16 20:09:39 -05:00
Lance Edgar 0d9c5a078b Improve form support for view supplements
this seems a bit hacky yet but works for now..

cf. field logic for Vendor -> Quickbooks Bank Accounts, which requires this
2024-04-16 18:21:59 -05:00
Lance Edgar c35c0f8b61 Update changelog 2024-04-16 10:44:33 -05:00
Lance Edgar 8b4b3de336 Add support for Pyramid 2.x; new security policy
custom apps are still free to use pyramid 1.x

new security policy is only used if config file says so
2024-04-16 09:48:29 -05:00
Lance Edgar 85d62a8e38 Reminder to improve css hack for datepicker in modal 2024-04-15 13:31:42 -05:00
Lance Edgar 52c8f3e12c Rename custom user_css context
and stop checking an older deprecated setting
2024-04-15 13:31:35 -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 2f115c0717 Update changelog 2024-04-15 10:56:49 -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 ba521abf4f Remove some references to "buefy" name within docstrings, comments 2024-04-14 20:30:52 -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 1103b09a76 Rename forms/deform template (drop buefy suffix)
for now, deprecate `form.render()` method and just use
`render_deform()` - but probably should change that to something
else eventually..?
2024-04-13 09:45:10 -05:00
Lance Edgar cd7c1bba21 Rename template for grid filters (drop buefy suffix)
also remove some deprecated functions
2024-04-13 09:21:48 -05:00
Lance Edgar 1973614840 Rename people "view_profile" template (drop buefy suffix) 2024-04-13 09:09:23 -05:00
Lance Edgar cbbd77c49c Show toast msg instead of silent error, when grid fetch fails
specifically, if a user clicks "Save defaults" for the grid filters,
but they aren't currently logged in, error will ensue.

this is a bit of an edge case which IIUC would require multiple tabs
etc. but still is worth avoiding an error email from it.
2024-04-11 16:58:12 -05:00
Lance Edgar aa500351ed Avoid error for tax field when creating new department
someday should fix that for real..
2024-04-11 16:37:55 -05:00
Lance Edgar de8751b86c Try to return JSON error when receiving API call fails
although in my testing, the error still got raised somehow in the
tweens or something?  client then sees it as a 500 response and gets
no JSON
2024-04-11 14:14:27 -05:00
Lance Edgar a1b05540be Avoid uncaught error when updating order batch row quantities 2024-04-10 12:24:13 -05:00
Lance Edgar e0dc858451 Update changelog 2024-04-01 18:28:39 -05:00
Lance Edgar 1889f7d269 Add basic CRUD for Person "preferred first name"
only shown if config flag says so
2024-04-01 18:26:18 -05:00
Lance Edgar cdc857065b Update changelog 2024-03-27 13:14:23 -05:00
Lance Edgar dfdb7a9b59 Fix bulk-delete rows for import/export batch
per changes in SQLAlchemy 1.4
2024-03-27 13:13:33 -05:00
Lance Edgar 4363b7c5d7 Update changelog 2024-03-26 12:53:20 -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 0b7d2f5aed Fix how metadata/bind is used for importer batch table
per changes coming in SQLAlchemy 2.0
2024-03-26 11:47:37 -05:00
Lance Edgar 25c48a97c5 Update changelog 2023-12-26 20:17:05 -06:00
Lance Edgar a40add8f41 Expose default custorder discount for Departments 2023-12-22 11:50:05 -06:00
Lance Edgar 3bdc7175a3 Use common logic to render invoice total for receiving
and avoid error if total is none
2023-12-20 11:56:24 -06:00
Lance Edgar 90e35ee3db Hide single invoice file field for multi-invoice receiving batch 2023-12-19 12:49:33 -06:00
Lance Edgar 90630fe852 Auto-disable submit button for login form
not sure why i had explicitly disabled that before..?
2023-12-13 12:05:54 -06:00
Lance Edgar b6618c8ee5 Update changelog 2023-12-12 11:46:28 -06: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 d154986128 Update changelog 2023-12-01 21:57:20 -06:00
Lance Edgar 3e4bbf7092 Use clientele handler to populate customer dropdown widget 2023-12-01 19:50:07 -06:00
Lance Edgar faeb2cb7e2 Update changelog 2023-11-30 18:25:01 -06:00
Lance Edgar 35131c8732 Provide a way to show enum display text for some version diff fields
master view must explicitly declare which enums for which fields
2023-11-30 18:23:47 -06:00
Lance Edgar 2a9d5f74ce Update changelog 2023-11-30 15:17:01 -06:00
Lance Edgar f4cb1cb097 Avoid error when editing a department
just a temp hack, need to fix proper yet
2023-11-29 15:03:08 -06:00
Lance Edgar e23998a88b Update changelog 2023-11-19 22:24:15 -06:00
Lance Edgar e39581695f Fix DB picker, theme picker per Buefy conventions 2023-11-17 17:00:50 -06:00
Lance Edgar dd9e41f651 Update changelog 2023-11-15 11:42:07 -06:00
Lance Edgar 97e7026cc9 Avoid outright error if user scans barcode for inventory count 2023-11-15 09:46:23 -06:00
Lance Edgar 853cc871f7 Remove reference to pytz library 2023-11-11 21:26:11 -06:00
Lance Edgar fc96fb40fb Log warning instead of error for batch population error
this is most typically caused by bad user input; a warning is shown on
screen so they hopefully can guess what the problem is.  no need to
loop in the admins via email
2023-11-05 18:31:43 -06:00
Lance Edgar 172fe6c49c Update changelog 2023-11-05 17:10:32 -06:00
Lance Edgar 9fa592c5d6 Expose status code for equity payments 2023-11-05 16:57:14 -06:00
Lance Edgar bbffe1dc82 Update changelog 2023-11-01 20:54:39 -05:00
Lance Edgar 55a115e57a Add button to confirm all costs for receiving 2023-11-01 20:53:11 -05:00
Lance Edgar 7ab3d2b635 Update changelog 2023-11-01 19:45:35 -05:00
Lance Edgar 51d7c10bc5 Fix config key for default themes list 2023-11-01 19:44:44 -05:00
Lance Edgar b13fc99e95 Use shared logic to get batch handler 2023-11-01 19:43:46 -05:00
Lance Edgar b231c194a4 Update changelog 2023-11-01 17:48:28 -05:00
Lance Edgar b5da5a46de Avoid error when rendering version diff
can't always assume relationship entities are versioned
2023-11-01 17:47:07 -05:00
Lance Edgar 8522123cd3 Encode values for "between" query filter 2023-11-01 14:54:30 -05:00
Lance Edgar bae6bc2133 Update changelog 2023-11-01 09:20:26 -05:00
Lance Edgar 2f70ce2d5c Fix missing import 2023-11-01 09:20:03 -05:00
Lance Edgar 7ac505f1f4 Update changelog 2023-11-01 08:14:09 -05:00
Lance Edgar f47e45a928 Add deprecation warnings for ambgiguous config keys 2023-11-01 08:13:36 -05:00
Lance Edgar a9ab59eb92 Update changelog 2023-10-30 01:06:41 -05:00
Lance Edgar a0075f6f78 Log warning / avoid error if email profile can't be normalized
e.g. if some import error happens
2023-10-29 22:22:16 -05:00
Lance Edgar 8b07289452 Update changelog 2023-10-29 15:59:17 -05:00
Lance Edgar c1f2f84c7f Remove unused "simple menus" module approach
now we always use a handler instead
2023-10-29 15:46:18 -05:00
Lance Edgar da13254caa Tweak param docs for Form.set_validator() 2023-10-29 15:10:56 -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 1fc17658ff Update changelog 2023-10-26 18:44:38 -05:00
Lance Edgar a5c1cba81b Use product lookup component for "resolve pending product" tool 2023-10-26 10:06:00 -05:00
Lance Edgar 4809cf039e Update changelog 2023-10-25 20:22:48 -05:00
Lance Edgar a812181466 Expand the "product lookup" component to include autocomplete 2023-10-25 20:10:21 -05:00
Lance Edgar 441a6e5e0c Add separate perm for making new custorder for unknown product 2023-10-25 14:06:40 -05:00
Lance Edgar b5c68831b5 Do not show profile buttons for inactive customer shoppers 2023-10-25 12:20:04 -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 70cc754f3e Use <b-select> for theme picker
instead of webhelpers2.html.tags.select() which seems to break for me
in dev now with python 3.10
2023-10-25 10:45:33 -05:00
Lance Edgar 72dda3771e Add price confirm prompt when adding unknown item to custorder
optional, per config
2023-10-24 19:51:27 -05:00
Lance Edgar 4247804707 Allow pending product fields to be required, for new custorder 2023-10-24 19:17:36 -05:00
Lance Edgar e308108bf7 Show user warning if "add item to custorder" fails
specifically, if user enters alpha chars for cost/price fields
2023-10-24 17:48:08 -05:00
Lance Edgar f708cb0b25 Fix bug when editing vendor 2023-10-24 17:44:02 -05:00
Lance Edgar 1f3877b7cb Update changelog 2023-10-24 09:54:31 -05:00
Lance Edgar 72e4daafc1 Fix config file priority for display, and batch subprocess commands 2023-10-24 09:53:40 -05:00
Lance Edgar 549976dcfb Update changelog 2023-10-24 09:27:12 -05:00
Lance Edgar 756b4b9d18 No need to configure logging
since the rattail config object will do that when first made
2023-10-23 20:35:43 -05:00
Lance Edgar f70772fabc Allow override of version diff for master views
and misc. other tweaks
2023-10-23 15:48:48 -05:00
Lance Edgar ec8a8d5ddc Update changelog 2023-10-23 13:06:38 -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 421266e70c Show more customer attrs for POS batch 2023-10-20 14:29:45 -05:00
Lance Edgar d87de1dc4f Expose permission for POS batch, toggle training mode 2023-10-19 20:48:52 -05:00
Lance Edgar dc99828b66 Show food stamp tender info for POS batch 2023-10-19 19:12:28 -05:00
Lance Edgar 5e8ea67773 Include invoice number for receiving batch row API 2023-10-19 14:57:06 -05:00