Commit Graph

38 Commits

Author SHA1 Message Date
Ali bb1287acc2 refactor(generator): emit config, not a code-generated engine
The generator unrolled the whole engine into the Client Script: one inline block
per formula per trigger, plus an if-chain over every report field. A VAT
declaration came out at 403 KB of generated code, which then shipped inside
taxes_az's fixtures.

It now emits a CONFIG object — a copy of the storage — and one call into
taxes_az.formula. The storage format is untouched, so every existing Formula
Editor record keeps working. Generated scripts no longer reference this app, which
is what lets it be removed from production machines.

Generation moved from the browser to on_update. It used to run in before_save off
the editor's rendered DOM, so a half-drawn form could serialise empty formulas
over real ones; it now builds from the stored JSON.

Removed with it: the emitters (transform_expression, table-row handlers, universal
fields, report fields), plus dead code they hid — processFormula had no call
sites, applyAggregation was never emitted, and generate_child_table_script
referenced a variable outside its closure and would have thrown on the first
is_table_field formula.

VAT script: 403 KB -> 120 KB. Output verified identical across all 426 formulas.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-13 12:22:07 +00:00
Ali fe272c3c79 push from mvp 2026-07-13 09:59:36 +00:00
Ali 20ce9cbb6d push from mvp 2026-05-03 11:54:54 +00:00
Away b358dfa98d push from btp 2025-12-03 08:03:33 +00:00
Ali fe8df98e41 added fixtures export in hooks 2025-12-03 12:02:48 +04:00
Ali d72ce0b06b table sums are now available in table row formulas 2025-10-28 14:43:48 +04:00
Ali 2dd18c4143 fixed bug with none in tables name 2025-10-28 14:11:48 +04:00
Ali 89a8912ea1 fixed bug with none in tables name 2025-10-28 14:11:03 +04:00
Ali 7d0b445ebc fixed table prefix 2025-10-28 14:03:46 +04:00
Ali 530e329105 fixed bug with async 2025-10-28 13:47:05 +04:00
Ali 33f3794ed6 removed fixtures 2025-08-28 15:59:22 +04:00
Ali 4c81f35300 removed fixtures 2025-08-28 15:59:18 +04:00
Away 0ee3d6d965 formula editor fixtures from btp 2025-08-28 11:55:21 +00:00
Ali 0d6841402d New order column (test) 2025-08-28 15:54:01 +04:00
Ali 34171eaa3c fixed bug with duplicate in script 2025-08-19 14:23:01 +04:00
Ali 7b811fb607 fixed bugs with reports ui and added rounding 2025-07-16 17:26:40 +04:00
Ali e589956878 test last commit 2025-07-07 19:23:03 +04:00
Ali 9fd6393388 Fixed bug with reports not working in formulas 2025-07-07 17:33:36 +04:00
Ali da3f4e75aa test commit 2025-07-02 14:00:38 +04:00
Ali fbd7b8de22 Formula editor parsed to small modules, also added table() function in reports 2025-07-02 13:55:25 +04:00
Ali ed9e568d7d fixed a bunch of bugs 2025-04-23 17:12:38 +04:00
Away 1699e76dcc Added order in row formulas 2025-04-22 20:29:23 +00:00
Away 022c809acc Fixed bug with logs 2025-04-22 18:33:58 +00:00
Ali 644b57204a Test commit 2025-04-22 22:03:52 +04:00
Ali e07740ce6d Fully added report system 2025-04-22 11:36:20 +04:00
Ali 33939cbfc4 fixed bug with report field not having edit and delete button 2025-04-18 16:46:26 +04:00
Ali 8750e6b688 fixed bug with report field not having edit and delete button 2025-04-18 16:45:04 +04:00
Ali 30f878fc82 Added report support, but have a lot of bugs 2025-04-14 22:51:18 +04:00
Ali 1680da6f31 Added all field types to universal field modal 2025-04-07 16:17:41 +04:00
Ali 2042e2365a fixed bug when multiple formulas or windows appeared 2025-04-05 00:53:03 +04:00
Ali 07e26d1395 fixed bug with universal field, and fixed table fields 2025-04-05 00:04:27 +04:00
Ali 1d7a662901 Fixed all known bugs, and added formulas for table rows. 2025-04-04 16:36:59 +04:00
Ali 36e1402a77 Added new trigger 2025-03-30 19:02:58 +04:00
Ali 282ba65f58 90% ready formula editor with small bugs 2025-03-28 20:15:29 +04:00
Ali 2f077b7752 Unomptimized code with universal fields, with bugs 2025-03-18 15:56:57 +04:00
Ali a8250e53e7 Added + button to triggers 2025-03-05 14:11:43 +04:00
Ali a1849cdd4c Added app formula editor 2025-02-27 19:25:36 +04:00
Ali ea92b6e9a9 feat: Initialize App 2025-02-27 19:01:56 +04:00