Catalogue 0.1.3: Markup pricing, item search and a card view
Catalogue 0.1.3 adds pricing with a catalogue markup, a search over items, and a card view for the admin lists. Deleting now asks for confirmation in a dialog.
What’s new
- An item’s price is now its Base Price, “Cost/purchase price before catalogue markup.” A catalogue gets a Markup Percentage (0 to 1000), and its item tables show the computed Price next to the base price.
- The Catalogues tab can search items across all catalogues, and a catalogue’s page searches its own items by name, description or SKU.
- Every list can switch between a table and a card layout, remembered in the browser. On small screens row actions fold into a menu.
- Delete and Delete Forever open a confirmation dialog instead of an inline step that did not work.
- Restoring an item also restores its deleted category and catalogue. Reordering categories can no longer leave two in the same place, and a failed manufacturer and supplier link now shows a warning.
Upgrading
The item column price becomes base_price and catalogues get markup_percentage, both from PhoenixKit core’s migrations: update PhoenixKit and run mix phoenix_kit.update first. The package now needs Phoenix LiveView 1.1.
Full release notes: Catalogue 0.1.3
0.1.3 · 31 March 2026
Added
- Pricing system — rename
pricetobase_priceon items, addmarkup_percentageto catalogues (default 0%), computed sale price viaItem.sale_price/2andCatalogue.item_pricing/1 - Search —
search_items/2for global cross-catalogue search,search_items_in_catalogue/3for catalogue-scoped search,search_items_in_category/3for category-scoped search; matches name, description, SKU via case-insensitive ILIKE with special character sanitization - Reusable components (
PhoenixKitCatalogue.Web.Components):item_table/1— configurable data-driven table with selectable columns, opt-in actions, card view togglesearch_input/1— search bar with debounce and clear buttonsearch_results_summary/1— result count displayempty_state/1— centered empty state cardview_mode_toggle/1— global table/card toggle syncing multiple tables via shared storage key
- Card view — all tables (catalogues, manufacturers, suppliers, items) support table/card view toggle with localStorage persistence; card titles are clickable links
- Inline actions — table row actions render as inline buttons on desktop, collapse to dropdown menu on mobile (via
table_row_menumode="auto") Catalogue.swap_category_positions/2— atomic position swap in a transactionCatalogue.list_items/1— global item listing with status filter and limitCatalogue.item_count_for_catalogue/1andcategory_count_for_catalogue/1— active counts- Gettext localization — all component text (column headers, actions, tooltips, result counts) localizable via PhoenixKit’s Gettext backend
- Graceful error handling — components never crash; unknown columns, unloaded associations, nil values, and bad path functions produce “—” placeholders and Logger warnings
- All item list/search functions now consistently preload
category: :catalogueand:manufacturer
Fixed
- Category reorder now atomic (wrapped in transaction instead of two separate updates)
sync_manufacturer_suppliers/2andsync_supplier_manufacturers/2now return{:ok, :synced}or{:error, reason}instead of silently swallowing errorsrestore_item/1now cascades upward to both parent category AND parent catalogue (was only restoring category)deleted_item_count_for_catalogue/1uses single JOIN query instead of two separate queries- Removed misleading
list_uncategorized_items_for_catalogue/2(ignored catalogue param), replaced withlist_uncategorized_items/1 - Confirm-delete flows use modal dialogs instead of broken inline two-step pattern
- Forms use
action="#"to prevent HTTP POST fallback before LiveView connects - Added
:phoenix_kittoextra_applicationsfor module discovery
Changed
- All LiveViews migrated to use PhoenixKit core components (
table_default,table_row_menu,status_badge,admin_page_header,confirm_modal,icon) - Removed all inline HTML tables, SVG icons, and local badge/format helpers in favour of shared components
- Manufacturer/supplier form save flows now handle sync errors with warning flash messages
Catalogue 0.1.3. Install or update: {:phoenix_kit_catalogue, "~> 0.1"}, then mix deps.get && mix phoenix_kit.update. Full history: CHANGELOG.