feat(dashboard): refactor location list UI to use data table (#13571)

* wip: convert location list to a table

* chore: changeset

* fix: rm search bluring on loading change

* feat: translations and palceholders, cleanup, make content more compact

* fix: delete message

* chore: optimise use memo

* fix: update toast

* feat: make stock location address searchable

* fix: search input blur on load finish
This commit is contained in:
Frane Polić
2025-09-24 10:29:13 +02:00
committed by GitHub
parent 6e806942c7
commit 10787c865f
15 changed files with 373 additions and 134 deletions

View File

@@ -4,14 +4,14 @@ import { StockLocation } from "@models"
const StockLocationAddress = model
.define("StockLocationAddress", {
id: model.id({ prefix: "laddr" }).primaryKey(),
address_1: model.text(),
address_2: model.text().nullable(),
address_1: model.text().searchable(),
address_2: model.text().searchable().nullable(),
company: model.text().nullable(),
city: model.text().nullable(),
country_code: model.text(),
city: model.text().searchable().nullable(),
country_code: model.text().searchable(),
phone: model.text().nullable(),
province: model.text().nullable(),
postal_code: model.text().nullable(),
province: model.text().searchable().nullable(),
postal_code: model.text().searchable().nullable(),
metadata: model.json().nullable(),
stock_locations: model.hasOne(() => StockLocation, {
mappedBy: "address",

View File

@@ -9,6 +9,7 @@ const StockLocation = model.define("StockLocation", {
.belongsTo(() => StockLocationAddress, {
mappedBy: "stock_locations",
})
.searchable()
.nullable(),
})