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:
@@ -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",
|
||||
|
||||
@@ -9,6 +9,7 @@ const StockLocation = model.define("StockLocation", {
|
||||
.belongsTo(() => StockLocationAddress, {
|
||||
mappedBy: "stock_locations",
|
||||
})
|
||||
.searchable()
|
||||
.nullable(),
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user