* feat: Add item templates feature (#435)
Add ability to create and manage item templates for quick item creation.
Templates store default values and custom fields that can be applied
when creating new items.
Backend changes:
- New ItemTemplate and TemplateField Ent schemas
- Template CRUD API endpoints
- Create item from template endpoint
Frontend changes:
- Templates management page with create/edit/delete
- Template selector in item creation modal
- 'Use as Template' action on item detail page
- Templates link in navigation menu
* refactor: Improve template item creation with a single query
- Add `CreateFromTemplate` method to ItemsRepository that creates items with all template data (including custom fields) in a single atomic transaction, replacing the previous two-phase create-then-update pattern
- Fix `GetOne` to require group ID parameter so templates can only be accessed by users in the owning group (security fix)
- Simplify `HandleItemTemplatesCreateItem` handler using the new transactional method
* Refactor item template types and formatting
Updated type annotations in CreateModal.vue to use specific ItemTemplate types instead of 'any'. Improved code formatting for template fields and manufacturer display. Also refactored warranty field logic in item details page for better readability. This resolves the linter issues as well that the bot in github keeps nagging at.
* Add 'id' property to template fields
Introduces an 'id' property to each field object in CreateModal.vue and item details page to support unique identification of fields. This change prepares the codebase for future enhancements that may require field-level identification.
* Removed redundant SQL migrations.
Removed redundant SQL migrations per @tankerkiller125's findings.
* Updates to PR #1099.
Regarding pull #1099. Fixed an issue causing some conflict with GUIDs and old rows in the migration files.
* Add new fields and location edge to ItemTemplate
Addresses recommendations from @tonyaellie.
* Relocated add template button
* Added more default fields to the template
* Added translation of all strings (think so?)
* Make oval buttons round
* Added duplicate button to the template (this required a rewrite of the migration files, I made sure only 1 exists per DB type)
* Added a Save as template button to a item detail view (this creates a template with all the current data of that item)
* Changed all occurrences of space to gap and flex where applicable.
* Made template selection persistent after item created.
* Collapsible template info on creation view.
* Updates to translation and fix for labels/locations
I also added a test in here because I keep missing small function tests. That should prevent that from happening again.
* Linted
* Bring up to date with main, fix some lint/type check issues
* In theory fix playwright tests
* Fix defaults being unable to be nullable/empty (and thus limiting flexibility)
* Last few fixes I think
* Forgot to fix the golang tests
---------
Co-authored-by: Matthew Kilgore <matthew@kilgore.dev>
* feat: implement example of data table
* feat: load item data into table
* chore: begin switching dialogs
* feat: implement old dialog for controlling headers and page size
* feat: get table into relatively usable state
* feat: enhance dropdown actions for multi-selection and CSV download
* feat: enhance table cell and dropdown button styles for better usability
* feat: json download for table
* feat: add expanded row component for item details in data table
* chore: add translation support
* feat: restore table on home page
* fix: oops need ids
* feat: move card view to use tanstack to allow for pagination
* feat: switch the items search to use ItemViewSelectable
* fix: update pagination handling and improve button click logic
* feat: improve selectable table
* feat: add indeterminate to checkbox
* feat: overhaul maintenance dialog to use new system and add maintenance options to table
* feat: add label ids and location id to item patch api
* feat: change location and labels in table view
* feat: add quick actions preference and enable toggle in table settings
* fix: lint
* fix: remove sized 1 pages
* fix: attempt to fix type error
* fix: various issues
* fix: remove
* fix: refactor item fetching logic to use useAsyncData for improved reactivity and improve use confirm
* fix: sort backend issues
* fix: enhance CSV export functionality by escaping fields to prevent formula injection
* fix: put aria sort on th not button
* chore: update api types
* feat: begin upgrading deps, still very buggy
* feat: progress
* feat: sort all type issues
* fix: sort type issues
* fix: import sonner styles
* fix: nuxt is the enemy
* fix: try sorting issue with workflows
* fix: update vitest config for dynamic import of path and defineConfig
* fix: add missing import
* fix: add time out to try and fix issues
* fix: add ui:ci:preview task for frontend build in CI mode
* fix: i was silly
* feat: add go:ci:with-frontend task for CI mode and remove ui:ci:preview from e2e workflow
* fix: update baseURL in Playwright config for local testing to use port 7745
* fix: update E2E_BASE_URL and remove wait for timeout in login test for smoother execution
* chore: remove unused lunr and add types for semver
* fix: try pinning using dlx
* chore: update typecheck command in package.json and clean up tailwind config
* chore: add vite as a dep
* fix: tests
* fix: wait for toast
* fix: use first
* feat: try adding waiting?
* fix: i was stupid
* fix: one day it will work (apple)
* fix: api
* fix: booleans are the enemy
* feat: try switching from blob to file
* Revert "feat: try switching from blob to file"
This reverts commit 3728b444e6.
* feat: sort themes and remove daisyui
* docs: update docs to reflect daisyui being removed
* feat: remove specific colours for better theme compatibility
* Add e2e testing for frontend
* Hopefully working CI/CD for playwright
* Fix run name
* Trying to fix the CI/CD stuff
* Try this again, although Vite apparently has playwright?
* Fix vitetest
* Add registration tests
* Safer kill of testing dependencies
* These might not last.
* feat: Add iPhone and Android device testing
* fix: Minor fixes, set registration to "fixme" as it fails frequently for some reason.
* fix: Make sure the OS dependencies get installed
* fix: For now remove mobile, they seem to be very hit or miss.
* Use sharding based testing
* Fix some minor mess ups
* Forgot PNPM for the merge
* feat: begin switching sonner, currently this breaks all alerts
* feat: switch to using new sonner and fix class names
* feat: add Shortcut component for improved keyboard shortcuts display in default layout
* feat: rewrite quick menu modal in shadcn
* feat: update QuickMenu modal placeholders and localize no results message in default layout
* feat: begin switching modals in layout to use shadcn dialog, needs bug fixing
* feat: implement DialogProvider for consistent dialog management across components
* fix: types
* feat: begin adding shadcn label selector (wip)
* feat: shadcnify textarea
* feat: begin adding location selector
* feat: add hotkey support for opening create modals in dialog provider components
* fix: update click event on NuxtLink and reorder sidebar menu item IDs for consistency
* feat: unify shortcut text across create modals and sort issue with text centring
* feat: prevent dialog from opening when a dialog alert is open
* fix: prevent potential out of bounds error
* feat: enhance button group UI in create modals for better layout and introduce new item photo label in the form
* fix: search on label selector
* chore: lint
* fix: oops
* feat: make selector usable
* feat: add actual data to label selector
* feat: label selector kinda works
* fix: add legacy selector for edit page
* fix: enable camera capture in image upload for CreateModal component
* fix: z levels for sidebar mobile
* fix: gap between inputs
* feat: update radix-vue, custom search function for location selector
* feat: add fuzzysort (can always remove it and go to lunr if we want to)
* feat: limit label name to 50 characters in create modal and selector, helps with issues with ui not working with larger labels, as it is only enforced on the frontend could be easily bypassed but thats a them problem
* feat: add colours to toast
* chore: lint
* feat: abstract the dialog for creation modals
* feat: add drawer component and responsive dialog for create modals
* feat: enhance photo preview in CreateModal
* fix: remember state of sidebar
* feat: add ui functionality for changing primary image
* feat: use button for file upload
* style: lint
* fix: dont clone asset id
* fix: using create and add label breaks selector
* chore: oops remove logging
* chore: lint
* fix: cut length of label dramatically to ensure maximal compatibility, not sure if too much
* fix: more limiting of label length
* feat: update reka-ui (prev radix-vue)
* chore: cleanup dialog provider and siebar provider a bit
* fix: improve accessibility
* fix: docs for shadcn error
* fix: hack to prevent issues with lots of toasts in quick succession
* feat: cleanup toast file and lint
* feat: improvements to dialog scroll and disable the ability to set default photo for now
* feat: add tooltips for photo buttons
* chore: substring to length check
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* [VNEXT] feat: Multi-DB type support (#291)
* feat: Multi-DB type URL formats and config
* fix: remove legacy sqlite path config and minor other things
* fix: dumb eslint issues
* fix: dumb eslint issues
* fix: application can be tested with sqlite
* fix: minor config formatting
* chore: some cleanup
* feat: postgres migration creation now works
The migration creation for postgres now works properly.
Removed MySQL support, having too many issues with it at this time.
* chore: revert some strings back to bytes as they should be
* feat: improve languages support
* feat: add locale time ago formatting and the local name for the language in language dropdown
* Update FUNDING.yml
* chore: remove some more mysql stuff
* fix: coderabbit security recommendations
* fix: validate postgres sslmode
* Update migrations.go
* fix: postgres migration creation now works
* fix: errors in raw sql queries
* fix: lint error, and simpler SQL query
* fix: migrations directory string
* fix: stats related test
* fix: sql query
* Update TextArea.vue
* Update TextField.vue
* chore: run integration testing on multiple postgresql versions
* chore: jobs should run for vnext branch PRs
* fix: missed $ for Postgres testing
* fix: environment variable for db ssl mode
* fix: lint issue from a merge
* chore: trying to fix postgresql testing
* chore: trying to fix postgresql testing
* fix: trying to fix postgresql testing
* fix: trying to fix postgresql testing
---------
Co-authored-by: tonya <tonya@tokia.dev>
* fix: publish docker vnext branch
* Add upgrade guide documentation
* chore: add new config options to documentation
* Update vnext (#314)
* feat: make 404 follow theme and add a return home page
* feat: sanitise translations when using v-html
* chore: Add native API docs to website
* chore: remove try it button from api docs
---------
Co-authored-by: tonyaellie <tonya@tokia.dev>
* Update Dockerfile
Update dockerfile to test the theory of data folder breaking in vnext
* fix: broken docker image
* fix: statistics
* feat: support mm, cm and inches for label generation
* [VNEXT] feat: Multi-DB type support (#291)
* feat: Multi-DB type URL formats and config
* fix: remove legacy sqlite path config and minor other things
* fix: dumb eslint issues
* fix: dumb eslint issues
* fix: application can be tested with sqlite
* fix: minor config formatting
* chore: some cleanup
* feat: postgres migration creation now works
The migration creation for postgres now works properly.
Removed MySQL support, having too many issues with it at this time.
* chore: revert some strings back to bytes as they should be
* feat: improve languages support
* feat: add locale time ago formatting and the local name for the language in language dropdown
* Update FUNDING.yml
* chore: remove some more mysql stuff
* fix: coderabbit security recommendations
* fix: validate postgres sslmode
* Update migrations.go
* fix: postgres migration creation now works
* fix: errors in raw sql queries
* fix: lint error, and simpler SQL query
* fix: migrations directory string
* fix: stats related test
* fix: sql query
* Update TextArea.vue
* Update TextField.vue
* chore: run integration testing on multiple postgresql versions
* chore: jobs should run for vnext branch PRs
* fix: missed $ for Postgres testing
* fix: environment variable for db ssl mode
* fix: lint issue from a merge
* chore: trying to fix postgresql testing
* chore: trying to fix postgresql testing
* fix: trying to fix postgresql testing
* fix: trying to fix postgresql testing
---------
Co-authored-by: tonya <tonya@tokia.dev>
* fix: publish docker vnext branch
* Add upgrade guide documentation
* chore: add new config options to documentation
* Update Dockerfile
Update dockerfile to test the theory of data folder breaking in vnext
* fix: broken docker image
* fix: statistics
* feat: support mm, cm and inches for label generation
* Update go dependencies
* Update documentation
* Slight update to docker actions
* Small doc update
* More doc changes
* Sort out migrations
* Temp fix to broken stats test
* Update dependencies
* Update documentation
* Fix broken merge
* Fix docker image sqlite path
* Fix minor taskfile issue
---------
Co-authored-by: tonya <tonya@tokia.dev>
Co-authored-by: Katos <7927609+katosdev@users.noreply.github.com>
* chore: get front end tests passing
* chore: add @vue/runtime-core to fix types for $t
* chore: sort lockfile
* Discard changes to frontend/pnpm-lock.yaml
* chore: sort lockfile
* chore: fix some type errors
* chore: switch from nuxi typecheck to vue-tsc to force a known good version
* chore: linting
* chore: update pnpm version in frontend test
* feat: add proper pagination type (need to sort why it still doesn't work)
* chore: format imports and initialize totalPrice in label page to null when no label is present
* chore: update pnpm to v9.12.2, merge ItemSummaryPaginationResult with PaginationResult, and handle error in label generator more gracefully
* chore: lint
---------
Co-authored-by: Matt Kilgore <matthew@kilgore.dev>
* use vue component for date picker
* zero out database fields even when set to 0001-xx-xx
* fix wrong datetime display + improved datepicker
* fix ts error
* zero out times
* add date-fns to dependencies
* fix error when item doesn't have photo attachment
* automatically detect image types and set primary photo if first
* remove charts.js from libs
Former-commit-id: 321a83b634
* rough implementation of WS based event system for server side notifications of mutation
* fix test construction
* fix deadlock on event bus
* disable linter error
* add item mutation events
* remove old event bus code
* refactor event system to use composables
* refresh items table when new item is added
* fix create form errors
* cleanup unnecessary calls
* fix importer erorrs + limit fn calls on import
Former-commit-id: 2cbcc8bb1d