summaryrefslogtreecommitdiff
path: root/import
AgeCommit message (Collapse)AuthorFilesLines
2026-05-27Update stock menu and component importerLester Caine4-7/+91
- Menu: add List Components and Create a Component; park My Assemblies until multiple kit elves are active; keep Create an Assembly - ImportSimpleComponent: look up supplier via SCREF xkey_ext in liberty_xref rather than contact title; add #URL xref for column 5 - load_simple_components_2.php: new loader for 6-column CSV with URL - Fix fgetcsv() missing escape param deprecation in both loaders Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-26Add simplified component importer (title, desc, supplier, PN, price)Lester Caine2-0/+227
Looks up supplier by contact title (case-insensitive, cached). Inserts #SUP (xref=contact content_id), #PN (xkey_ext), #PR (xkey) all at xorder=1 as one supplier group. Supplier xrefs skipped with a warning if contact not found. Supports ?clear=y to wipe and reload. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-26Simplify expunge helper — delegate to StockAssembly::expunge()Lester Caine1-8/+5
Now that LibertyContent::expunge() handles liberty_xref, setting mContentId and calling expunge() is sufficient. StockAssembly::expunge() covers component_map and stock_assembly; LibertyContent::expunge() covers the rest. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-26Replace ORM-based expunge with direct DB deletesLester Caine1-10/+9
lookup() with null content_type_guid was unreliable. Direct deletes cover all related tables (liberty_xref, component_map, stock_assembly, liberty_content and support tables) in the correct order. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-26Fix expunge: use StockAssembly::lookup() instead of broken load() callLester Caine1-3/+2
load() ignores its argument and reads mContentId/mAssemblyId from the object — passing an array did nothing. lookup(['content_id'=>...]) returns a fully loaded assembly ready for expunge(). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-26Add clear=y support to simple assembly importerLester Caine2-10/+56
stockExpungeAssemblyByTitle() deletes liberty_xref (missed by LibertyContent::expunge), then calls StockAssembly::expunge() for the rest. Loader slurps CSV first, clears matching titles when clear=y, then re-imports. deleted count reported to template. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-26Fix assembly description storage and empty-assembly listingLester Caine1-1/+1
Use format_guid=bithtml so bithtml_verify_data moves edit into content_store[data]; plain has no verify_function so edit was dropped. Set show_empty=true in list_assemblies so assemblies with only xref data (no BOM) are not filtered from the list. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-26Add simplified assembly importer for 4-column CSV (title, desc, KLPR, KLURL)Lester Caine2-0/+139
Creates assembly content and inserts KLPR/KLURL xrefs directly. Existing assemblies matched by title are skipped. fgetcsv uses explicit escape='' for RFC 4180 compliance. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-26Add xref support, assembly/component views, and import toolingLester Caine4-0/+290
- add_xref.php, edit_xref.php: xref record add/edit for stock content types - admin xref group/source pages for stock_assembly and stock_component - assembly_views/: auto_flow, fixed_grid, position_number, simple_list layouts - Full assembly and component listing, tree, ordering, and detail pages - Import tooling (ImportAssembly, ImportComponent, load scripts) - liberty_plugins for assembly and component data types - schema_inc.php updated; StockAssembly, StockBase, StockComponent, StockMovement classes updated with xref group/item/multiple renames - Templates updated throughout for xref rename (source→item, group→x_group) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>