summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
8 daysExtend KLID enrichment to assembly tab on movement viewHEADmasterLester Caine1-0/+20
Apply the same linked_title suffix to the assembly xref group rows so kitlocker components show their KLID there too. INNER JOIN on KLID means assemblies (which have none) are untouched. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
8 daysShow KLID in brackets on movement xref quantity line itemsLester Caine1-1/+6
Extend the enrichBomDisplay JOIN to also fetch the KLID xref and append it to linked_title for any component that has a kitlocker listing. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
8 daysPersist filter params through smartlink sort clicks on list pagesLester Caine4-4/+18
Populate listInfo['parameters'] on list_movements, list_assemblies, and list_components so icontrol carries part_content_id/ref_type/user_id/ gallery_id/hide_kitlocker through sort URLs. Wire icontrol=$listInfo on list_movements.tpl sort headers which were previously missing it. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
8 daysAppend KLID in brackets to component title where availableLester Caine1-0/+9
Add klid correlated subquery to both load() and getList(), then append it in getTitleFromHash(). Enrich title in the getList() foreach so list pages see the updated value without calling getTitleFromHash() themselves. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
8 daysFix hide_kitlocker filter not persisting when uncheckedLester Caine2-2/+3
Unchecked checkboxes send nothing in the GET request, so the default-on guard reset the filter every time. Add a hidden sentinel field so PHP can distinguish a fresh page load (apply default) from a form submission with the box deliberately unchecked. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
8 daysFix assembly search returning no results in add_prebuildLester Caine1-2/+2
array_map over the content_id-keyed getList() result preserves associative keys, so json_encode produced a JS object instead of an array — making items.filter() throw TypeError. Wrap with array_values() to reindex. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
10 dayslist_kitlocker.tpl: switch to {pagination} plugin (same fix as list_stock)Lester Caine1-1/+1
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
10 dayslist_stock.tpl: switch from {include} to {pagination} plugin for page linksLester Caine1-1/+1
{include} skips the plugin's setup of \$pgnUrl from SCRIPT_NAME, so page link URLs were malformed. Matches the pattern used by list_movements and list_assemblies. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
10 daysFix list_stock pagination: assembly selector was clobbering \$listHashLester Caine1-2/+2
\$listHash = ['max_records' => 500] for the assembly dropdown overwrote the pagination listHash, making postGetList see max_records=500 and calculate total_pages=1. Renamed to \$asmHash. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
10 daysAdd pagination to list_stock.php, default 20 records per pageLester Caine2-0/+24
General list only (BOM view is assembly-bounded). Full result set is fetched and grouped in PHP first so shortages filter and CSV export see all rows; array_slice applies the page window after CSV exits. Extra URL params (user_id, find, shortages) are threaded into listInfo for the pagination links. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
10 daysGuard all CAST(xkey AS DOUBLE PRECISION) in list_stock.php against empty stringsLester Caine1-3/+5
Firebird throws -413 on CAST of empty string to DOUBLE PRECISION. The main xkey SUM was already guarded by SIMILAR TO on the JOIN, but bom_qty and both part_size subqueries (BOM view and general list) were not. Added SIMILAR TO guards to all three. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
10 daysFix list_elves.php: use gBitSystem->verifyPermission not ↵Lester Caine1-1/+1
gBitUser->requirePermission Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
10 daysAdd list_elves.php — kit elf roster with stock counts and linksLester Caine3-0/+104
Lists all contact persons with a linked user account (contact.role_id set). Shows assembly and movement counts as links to filtered list_assemblies, list_movements, and list_stock views. Menu entry added under p_contact_view gate between Assemblies and Components. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
10 daysShow view_kitlocker breadcrumb on all list_kitlocker views, not just ↵Lester Caine1-1/+1
stgrp-filtered Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
10 daysUse BitBase::prepGetList for max_records (reads DB config, default 10)Lester Caine1-10/+6
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
10 daysAdd pagination to list_kitlockerLester Caine2-4/+29
20 per page via BitBase::postGetList; stgrp filter preserved across pages. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
10 daysParse description data in list_kitlocker rather than escaping raw markupLester Caine2-2/+9
Add format_guid to query, call parseDataHash() per row in PHP, display parsed_data|strip_tags|truncate in template. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
11 daysAdd MERG group BOM importer; fix component_order linked_titleLester Caine3-2/+210
load_merg_bom.php reads a group CSV with assembly content_ids in the header row and creates SGL BOM xrefs for each non-zero quantity cell. Supports dry=1 preview and clear=1 to wipe existing BOM lines first. component_order.tpl was using xref_title/xref_data (the item type label, e.g. "Single Unit-1") instead of linked_title/linked_data (the actual component title and description from the joined content row). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
11 daysUse getParsedData() in assembly simple viewLester Caine1-1/+1
Replaces raw data|escape with parsed output so assembly descriptions render as HTML rather than escaped markup. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
11 daysAdd MERG group BOM stub importerLester Caine2-0/+196
Reads merg_group_<X>.csv from storage/stock/, matches Rapid order codes against existing #SUP xrefs, and creates placeholder components (RO<code>) for any not yet in the system. Supports dry=1 preview and update=1 to backfill descriptions on existing stubs still carrying RO* titles. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
14 daysFix ref_key not loading on edit; restrict movement type to ORDER/TRANSLester Caine2-0/+4
Add ref_key (xkey) subquery to StockMovement::load() — it was present in getList() but missing from load(), so the field always appeared blank on edit. Filter edit_movement.php refTypes query to ORDER and TRANS only; REQN and PBLD are created via their own dedicated entry points. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-15Use parsed_data in list_assemblies to avoid raw HTML in notes columnLester Caine1-2/+2
Replace $gal.data|truncate|escape with $gal.parsed_data|strip_tags|truncate so wiki/markdown notes render as plain text rather than showing raw tags. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-15Link prebuild count in user_galleries to its PBLD movement recordLester Caine2-2/+15
Add prebuild_content_id to StockAssembly::getList() (most recent PBLD movement for the assembly owner) and link both the Prebuilt label and count in user_galleries.tpl to view_movement.php?content_id=. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-14Fix CKEditor integration in edit_assembly and edit_stgrp_itemLester Caine3-13/+3
- edit_assembly.tpl: replace plain <textarea> with {textarea} plugin; omit id (defaults to LIBERTY_TEXT_AREA for CKEditor); rows=10 - edit_stgrp_item.tpl: remove double form-group wrapper; pass label directly to {textarea}; remove name='data' (use default 'edit') - edit_stgrp_item.php: read $_POST['edit'] not $_POST['data'] Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-14Add CLAUDE.md with stock package developer notesLester Caine1-0/+97
Covers file naming, template structure, multi-user kitelf filtering, movement model (REQN/PBLD/TRANS/ORDER), getList() enriched fields, edit_movement flags and xref display notes. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-14Add parsed_data, counts and kitlocker data to StockAssembly::getList()Lester Caine3-44/+41
- getList() now provides per-row: parsed_data (via parseDataHash), part_number (#SUP first), klid, component_count (BOM lines), prebuild_count (PBLD kit total for assembly owner) as correlated subqueries — removes need for supplementary queries in callers - list_assemblies.php: remove batch query block now redundant - user_galleries.tpl: show parsed_data in .content div; dl counts moved to panel-footer with margin-bottom:0; klid in panel-title second line; panel-heading tidied to title only Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-14Implement assembly_icons_inc and assembly_nav include patternLester Caine3-44/+23
Extract floaticon buttons into assembly_icons_inc.tpl and breadcrumb into assembly_nav.tpl; stock_simple_list_inc.tpl includes both. Restores the intended Bitweaver pattern that was left as empty stubs. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-14Rename stock_fixed_grid_inc.tpl to view_kitlocker.tplLester Caine2-1/+1
Template was the sole display template for view_kitlocker.php; _inc suffix was misleading since it is never included elsewhere. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-14Remove dead center_ component template filesLester Caine3-107/+0
center_list_components.tpl, center_component_comments.php and center_component_comments.tpl are unreferenced old embedded-center pattern remnants — same cleanup as center_list_assemblies.php. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-14Tidy assembly list templates; suppress sortby in kitelf grid viewLester Caine7-335/+129
- user_galleries.tpl: inline list_assemblies2 grid code directly; hide sortby bar when viewing by user_id (kitelf) since sorting is irrelevant - list_assemblies_simple.tpl renamed to list_assemblies.tpl (simple suffix never made sense); list_assemblies.php updated accordingly - Dead files removed: list_assemblies2.tpl, list_assemblies_simple.tpl, center_list_assemblies.php, center_list_components.php (unreferenced incomplete old embedded-center pattern) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-14Add liberty owner selector to edit_assembly and edit_movementLester Caine2-0/+4
Includes edit_content_owner_inc.tpl in both forms so admin users with p_liberty_edit_content_owner can reassign user_id (kitelf ownership) when liberty_allow_change_owner is active. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-14Add multi-user (kitelf) stock filtering and PBLD prebuild movement typeLester Caine15-92/+412
- list_movements/list_stock: filter by user_id (kitelf) with breadcrumb navigation; creator names in list_movements are clickable filter links - list_movements: unified part_content_id replaces separate assembly_content_id/component_content_id URL params; type-aware breadcrumb and qty column (assembly kit count vs component qty) - StockMovement::getList(): $partId/$partIsAsm collapse cmp/asm into one variable; unified part_qty/part_qty_type SELECT; PBLD added to all ref_type IN() lists and sort subqueries; lc.user_id added to SELECT - New PBLD (Prebuild) movement type: add_prebuild.php/tpl creates PBLD movements (assemblies only, BOM exploded, optional note); add_requisition retired from UI; PBLD handled in edit/view with isBuild/isPbld flags; view/edit show Build Date/Completed labels for PBLD - schema_inc.php: PBLD registered in stockmovement reference xref items - view_movement.tpl: updated to <header>/<section> pattern with kitelf breadcrumb; getDirection() explicit for PBLD Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-12stock: movement xref views use linked_title/linked_data; bomprt tidy; ↵Lester Caine6-46/+30
floaticon form fixes StockMovement::loadXrefInfo() — drop xref_title/xref_data enrichment (now from lc_linked JOIN); restore part_size/part_size_ext query; use array_map not array_column. stockmovement view_xref_bom_item/bomprt_item — switch to linked_title/linked_data. Movement bomprt qty: round(xkey/part_size, 3) of part_size (pieces-needed fraction). Both bomprt templates: drop notes row; drop part_size_ext (PRT = integer parts, not VOL). list_components: plain <form> (GET needs no CSRF), form-inline + form-group structure, hidden-print on floaticon; hide-kitlocker checkbox properly spaced. list_movements: hidden-print on floaticon div. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-12stock: BOM view uses linked_title/linked_data; loadXrefInfo only enriches ↵Lester Caine4-10/+12
part_size Component title and description in BOM view templates (view_xref_bom_item, view_xref_bomprt_item, print_bom) now use linked_title/linked_data from the lc_linked JOIN in loadContent() — same pattern as the supplier name fix. StockAssembly::loadXrefInfo() drops the title/data enrichment loop (now redundant) and only queries for part_size/part_size_ext from the PRT xref. array_column replaced with array_map to reliably call ArrayAccess offsetGet on LibertyXref objects. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-12stock: hide-kitlocker filter on list_components; fix supplier name in ↵Lester Caine4-2/+33
view_xref_sup_item list_components defaults to hiding kitlocker components (KLID xref present) but keeps those where the kitlocker contact is also the supplier (#SUP → SCREF='kitlocker') — parts kitlocker supplies to elves. Filter checkbox in the search form, defaults on. view_xref_sup_item: switch from xref_title (cross_ref_title = "Supplier") to linked_title (liberty_content.title of the linked contact) so the contact name appears as the link text. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-11StockBase: use xrefType()->loadContent() in loadXrefInfo()Lester Caine1-2/+1
Follows the new LibertyXrefType::loadContent() pattern — drops the direct LibertyXrefInfo construction now that loadContent() handles the dual-guid package/content-type query internally. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-11stock: remove orphaned add_xref/edit_xref files — all links already use ↵Lester Caine4-193/+0
liberty package versions Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-11stock: merge stgrp xrefs into kitlocker group at data level; revert stgrp ↵Lester Caine7-15/+37
template tag; drop sgGroup stash from component templates Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-10stock: add edit_stgrp_item.php/tpl for CKEditor editing of stgrp ↵Lester Caine4-2/+100
descriptions; parse_data in view_kitlocker; p_stock_admin edit icon in gallery Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-10stock: add Kitlocker entry to top of menu_stock.tplLester Caine1-0/+1
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-10stock: unify view/edit header structure — <header>/<section> pattern, ↵Lester Caine5-92/+58
floaticons top right, breadcrumbs below h1; remove assembly_nav and dead mItems table Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-10stock: add list_kitlocker.php — combined assembly/component kitlocker list ↵Lester Caine3-1/+99
with stgrp filter; gallery links to list_kitlocker; breadcrumb back link in header Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-10stock: add kitlocker gallery — view_kitlocker.php, ↵Lester Caine5-36/+84
stock_fixed_grid_inc.tpl, view_xref_kitlocker_group.tpl; stgrp getList filter; stgrp template field set to kitlocker Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-10stock: remove gallery layout machinery — drop pagination constants, ↵Lester Caine8-117/+5
getLayout/getAllLayouts, per-page config, admin UI; simplify mod_components and display inc Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-10stock: remove gallery layout machinery — assembly view hardcoded to ↵Lester Caine7-266/+0
simple_list; delete assembly_views/; drop pagination constants, getLayout/getAllLayouts, per-page config Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-10stock: rename PCK→PRT (fractional parts), add PCK as ordering pack-size ↵Lester Caine22-71/+72
tag; rename pack_size→part_size; bompck templates→bomprt; strip verbose labels (fraction), (H x W) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-09stock: kitlocker tab visibility; view icon cleanupLester Caine6-27/+57
- edit/view_component: hide kitlocker and stgrp xref tabs for non-kitlocker components (no KLID value); tabs appear at end when shown - view_component: floaticon moved inside header; protector services removed - view_component: edit/delete icons; remove redundant services_inc includes - view_movement: floaticon moved inside header div - assembly_icons_inc: remove stale Add Component link (edit BOM tab handles it) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-09stock: shortages CSV/order workflow; list header layoutLester Caine6-31/+466
- list_stock: CSV export and Create Order from shortages report; floaticon icons for print/CSV/order; filter form moved into header - add_order: new page — pre-populate draft ORDER movement from shortages list, editable qty/delete per line, supplier autocomplete - list_movements: print icon; filter form moved into floaticon header - list_assemblies_simple: print icon added to floaticon Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-09stock: remove show-zero filter; extend shortages to main listLester Caine2-18/+25
Zero stock is always relevant when movements are tracked. Shortages filter now applies to the main list (level < 0) as well as BOM view. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-09stock: PCK/SHT fractional display, movement qty summing, import qty typeLester Caine10-14/+163
Display fixes: - list_stock, list_movements, view_component: PCK stock divides by pack_size for fractional strip display; SHT shows 2 decimal places - list_movements: pack_size fetched per component for PCK display - All fractional formats use %.2f consistently StockMovement::getList component filter: - Replace INNER JOIN on xcmp with EXISTS subquery to avoid duplicate rows when a component appears multiple times in a movement BOM - cmp_qty now SUMs all matching xref rows so multi-assembly RQs show total quantity rather than silently dropping duplicate rows Movement BOM edit templates: - stockmovement/edit_xref_bom_item.tpl: proper edit form for SGL/SHT/VOL lines linking back to view_component - stockmovement/edit_xref_bompck_item.tpl: same for PCK with pack size hint Import: - ImportSimpleComponent: columns 6/7 (qty_type, qty_value) wired up; PCK/SHT/VOL writes qty xref so movement CSV imports pick up default type Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>