Commit Graph

238 Commits

Author SHA1 Message Date
barbie-bot 3fe43d1fc0 Fix quantity ordered scope for SQLite: use pathname column instead of recursive CTE
SQLite's Arel visitor wraps CTE branches in extra parentheses, making
the UNION ALL inside recursive CTEs invalid. Also SQLite lacks LPAD()
and CAST(... AS BINARY). Fix by using the existing pathname column for
ordering on SQLite, which already encodes the hierarchical path.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-10 18:41:03 +00:00
barbie-bot 9b18784caf Implement measurements create/destroy and index listing
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-10 18:24:27 +00:00
cryptogopher 83b064ef3c Merge recover password/resend confirmation forms into sign in/register
Closes #65, #66
2026-03-01 20:04:42 +01:00
cryptogopher 80130fb7d1 Allow cascade delete Unit/Quantity
Closes #32
2026-02-22 17:50:43 +01:00
cryptogopher 84945fa4b4 Simplify and improve labeled form 2026-02-22 00:53:18 +01:00
cryptogopher 675eb0aad8 Optimize styles; clean up <fieldset> 2026-02-03 15:33:37 +01:00
cryptogopher bd1a664caa Measurement form based on select-styled <details> 2026-01-31 17:22:09 +01:00
cryptogopher 0fb7f9946a Create alternative, spreadsheet-like style 2025-07-29 15:43:49 +02:00
cryptogopher d9bd2b46e3 Fix svg_tag display on Users tab 2025-07-26 23:24:54 +02:00
cryptogopher da38d8b585 Create Devise routes only when 'users' table exists
Closes #42
2025-07-25 15:30:26 +02:00
cryptogopher e12369cea1 Measurements#new form improvements 2025-05-13 22:30:58 +02:00
cryptogopher ef3484dfdf Update Measurements#new form pathnames on actions 2025-05-07 00:24:05 +02:00
cryptogopher 9dbcfddf98 Merge corrections provided by Bambuch, cont. 2025-04-26 19:12:56 +02:00
cryptogopher cd9a64b5ad Merge corrections provided by Bambuch 2025-04-26 18:32:45 +02:00
cryptogopher e8a0768d97 Update Quantity.depth using WITH + UPDATE ALL 2025-04-25 14:25:13 +02:00
cryptogopher d1593df0e0 Use callbacks instead of attribute methods to update cached values 2025-04-24 18:59:36 +02:00
cryptogopher fe66522c21 Cached attribute definition (attr_cached) 2025-04-19 20:29:29 +02:00
cryptogopher 1cddc794d2 Cleanup Quantity :pathname related code 2025-03-23 13:11:14 +01:00
cryptogopher 3b30e58ff3 Persist Quantity :pathname 2025-03-23 12:56:57 +01:00
cryptogopher 8401424efa Partial refresh of Measurements#new form 2025-02-18 18:27:47 +01:00
cryptogopher c48bf290fd Implement Measurements#new 2025-02-18 11:25:32 +01:00
cryptogopher 9d60eee16b Add Measurements tab and #new form 2025-01-25 16:34:04 +01:00
cryptogopher 3d7daa8944 Create Readout model 2025-01-22 00:14:57 +01:00
cryptogopher 6300273186 Cleanup 2025-01-16 21:37:58 +01:00
cryptogopher 2fdd770457 Center images in 'icon only' table columns 2025-01-16 21:29:10 +01:00
cryptogopher dada29d5e6 Fix table row indentation for hierarchy
Closes #57
2025-01-16 21:19:01 +01:00
cryptogopher 7962cdf169 Simplify object and association checks
* check for <object> instead of <object>.nil?
* check for <association>_id? instead of <association>.nil? (avoids
  record loading)
2025-01-16 20:42:18 +01:00
cryptogopher c908063212 Persist Quantity :depth instead of computing it on the fly 2025-01-16 17:14:52 +01:00
cryptogopher 30686dd1fc Cleanup of hierarchy related methods 2025-01-16 03:24:43 +01:00
cryptogopher cb69629276 Use associations in finders 2025-01-15 14:06:00 +01:00
cryptogopher 2c0ae1530a Turn #ancestors into #with_ancestors scope 2025-01-14 23:27:32 +01:00
cryptogopher 27038a74d0 Return Quantity progenies as a result of partial ordering
Separate scope only provided some optimisation by reducing the count of
records :numbered and should be unnecessary in future once numbering
can be merged with ordering into one recursive query
2025-01-14 23:25:26 +01:00
cryptogopher 201359de3e Allow to reparent Quantity everywhere
Closes #61
2025-01-14 21:13:35 +01:00
cryptogopher 8524beefdc Allow to drag all Quantities 2025-01-14 15:03:25 +01:00
cryptogopher 644d1f4b9a Add Quantity #reparent action 2025-01-14 15:02:38 +01:00
cryptogopher 4b453c1a82 Add :progenies as a scope to list ordered descendants of Quantity 2025-01-14 01:01:06 +01:00
cryptogopher 2c0d5af022 Merge Unit and Quantity drag&drop js
Closes #55
2025-01-13 02:23:51 +01:00
cryptogopher 0652d4a89b Disallow self- and descendant-reference for base/parent 2025-01-12 19:15:43 +01:00
cryptogopher 17b4e4f8a7 Don't duplicate ancestors search in #successive 2025-01-12 18:11:37 +01:00
cryptogopher 421515e5ce ancestors() sets depth for self, instead of returning new instance 2025-01-12 18:09:34 +01:00
cryptogopher d5e7ccacf5 Add Quantity #edit and #update 2025-01-11 22:51:49 +01:00
cryptogopher adcc6699ce Avoid N+1 queries on index 2025-01-11 21:58:12 +01:00
cryptogopher b6acb30785 Make Quantity name unique among siblings
Remove Quantity domain - will be replaced by configurable per-domain
root Quantity, limiting selection to descendants only
2025-01-11 21:50:36 +01:00
cryptogopher 57f10c94a4 Add Quantity #new, #create, #destroy actions 2025-01-11 17:01:34 +01:00
cryptogopher 1e7ef75e8b Include self and ancestors in result 2025-01-09 15:59:18 +01:00
cryptogopher c7f16514d2 Re-format query 2025-01-09 15:58:21 +01:00
cryptogopher 23e2f6a062 Move :base_id hidden field to form tag 2025-01-08 14:36:32 +01:00
cryptogopher 9461c1f979 Update #successive for unlimited depth hierarchy 2025-01-08 14:29:49 +01:00
cryptogopher fa7918f0e3 Set row indentation based on depth 2025-01-08 13:55:40 +01:00
cryptogopher 0d8e7c6c0e Unlimited depth hierarchy ordering 2025-01-08 02:18:38 +01:00