* 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: 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
* feat: improved duplicate
* feat: enhance item duplication process with transaction handling and error logging for attachments and fields
* feat: add error logging during transaction rollback in item duplication process for better debugging
* feat: don't try and rollback is the commit succeeded
* feat: add customizable duplication options for items, including prefix and field copying settings in API and UI
* fix: simplify duplication checks for custom fields, attachments, and maintenance entries in ItemsRepository duplication method
* refactor: import DuplicateSettings type from composables and sort import issues
* 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.
* 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>
* 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
* fix vue version issue
* new patch API endpoint
* doc-gen
* new API class method for patch operations
* add quantity patch UI support
* fix typegen errors
* fix ts errors
* remove overflow-hidden on when no collapsed
* fix recently added on homescreen
* fix delete account formatting
* add manufacturer to search
* move nav button to left
* introduce scaffold for new models
* wip: shoutrrr wrapper (may remove)
* update schema files
* gen: ent code
* gen: migrations
* go mod tidy
* add group_id to notifier
* db migration
* new mapper helpers
* notifier repo
* introduce experimental adapter pattern for hdlrs
* refactor adapters to fit more common use cases
* new routes for notifiers
* update errors to fix validation panic
* go tidy
* reverse checkbox label display
* wip: notifiers UI
* use badges instead of text
* improve documentation
* add scaffold schema reference
* remove notifier service
* refactor schema folder
* support group edges via scaffold
* delete test file
* include link to API docs
* audit and update documentation + improve format
* refactor schema edges
* refactor
* add custom validator
* set validate + order fields by name
* fix failing tests
* new PR tasks
* add homebox to know words
* formatting
* bump deps
* generate db models
* ts errors
* drop id
* fix accessor
* drop unused time field
* change CI
* add expected error
* add type check
* resolve serveral type errors
* hoise in CI
* make login case insensitive
* expand query to support by Field and By AID search
* type generation
* new API callers
* rework search to support field queries
* improve unnecessary data fetches
* clear stores on logout
* change verbage
* add labels
* location tree API
* test fixes
* initial tree location elements
* locations tree page
* update meta-data
* code-gen
* store item display preferences
* introduce basic table/card view elements
* codegen
* set parent location during location creation
* add item support for tree query
* refactor tree view
* wip: location selector improvements
* type gen
* rename items -> search
* remove various log statements
* fix markdown rendering for description
* update location selectors
* fix tests
* fix currency tests
* formatting
* add date format and orDefault helpers
* introduce new statistics calculations queries
* rework statistics endpoints
* code generation
* fix styles on photo card
* label and location aggregation endpoints
* code-gen
* cleanup parser and defaults
* remove debug point
* setup E2E Testing
* linters
* formatting
* fmt plus name support on time series data
* code gen
* schema changes
* db generate
* db migration
* add role based middleware
* implement attachment token access
* generate docs
* implement role based auth
* replace attachment specific tokens with gen token
* run linter
* cleanup temporary token implementation
Add archive option feature. Archived items can only be seen on the items page when including archived is selected. Archived items are excluded from the count and from other views
* initial UI for currency selection
* add task to purge invitation tokens
* group API contracts
* fix type import
* use auth middleware
* add currency setting support (UI)
* use group settings for format currency
* fix casing
* format readme
* update logo
* format html
* add logo to docs
* repository for document and document tokens
* add attachments type and repository
* autogenerate types via scripts
* use autogenerated types
* attachment type updates
* add insured and quantity fields for items
* implement HasID interface for entities
* implement label updates for items
* implement service update method
* WIP item update client side actions
* check err on attachment
* finish types for basic items editor
* remove unused var
* house keeping