;
diff --git a/frontend/components/ui/dialog/Dialog.vue b/frontend/components/ui/dialog/Dialog.vue
index 731b8b6e1..79e7960dc 100644
--- a/frontend/components/ui/dialog/Dialog.vue
+++ b/frontend/components/ui/dialog/Dialog.vue
@@ -1,8 +1,9 @@
diff --git a/frontend/components/ui/input/Input.vue b/frontend/components/ui/input/Input.vue
index ea4529312..15cb1bc2e 100644
--- a/frontend/components/ui/input/Input.vue
+++ b/frontend/components/ui/input/Input.vue
@@ -6,6 +6,8 @@
const props = defineProps<{
defaultValue?: string | number;
modelValue?: string | number;
+ inputmode?: HTMLAttributes["inputmode"];
+ pattern?: string;
class?: HTMLAttributes["class"];
}>();
@@ -28,5 +30,7 @@
props.class
)
"
+ :inputmode="inputmode"
+ :pattern="pattern"
/>
diff --git a/frontend/composables/use-preferences.ts b/frontend/composables/use-preferences.ts
index e9f99cee7..8a6dbcfa3 100644
--- a/frontend/composables/use-preferences.ts
+++ b/frontend/composables/use-preferences.ts
@@ -19,6 +19,7 @@ export type LocationViewPreferences = {
theme: DaisyTheme;
itemsPerTablePage: number;
tableHeaders?: TableHeaderType[];
+ tableHeadersBarcode?: TableHeaderType[];
displayLegacyHeader: boolean;
language?: string;
overrideFormatLocale?: string;
diff --git a/frontend/lib/api/__test__/user/items.test.ts b/frontend/lib/api/__test__/user/items.test.ts
index 3a50f61ea..f63ed51c5 100644
--- a/frontend/lib/api/__test__/user/items.test.ts
+++ b/frontend/lib/api/__test__/user/items.test.ts
@@ -40,6 +40,9 @@ describe("user should be able to create an item and add an attachment", () => {
description: "test-description",
quantity: 2,
locationId: location.id,
+ barcode: "",
+ manufacturer: "",
+ modelNumber: "",
});
expect(response.status).toBe(201);
@@ -75,6 +78,9 @@ describe("user should be able to create an item and add an attachment", () => {
description: faker.lorem.paragraph(1),
quantity: 2,
locationId: location.id,
+ barcode: "",
+ manufacturer: "",
+ modelNumber: "",
});
expect(response.status).toBe(201);
@@ -130,6 +136,9 @@ describe("user should be able to create an item and add an attachment", () => {
description: faker.lorem.paragraph(1),
quantity: 2,
locationId: location.id,
+ barcode: "",
+ manufacturer: "",
+ modelNumber: "",
});
expect(response.status).toBe(201);
@@ -182,6 +191,9 @@ describe("user should be able to create an item and add an attachment", () => {
description: faker.lorem.paragraph(1),
quantity: 2,
locationId: lastLocationId,
+ barcode: "",
+ manufacturer: "",
+ modelNumber: "",
});
expect(response.status).toBe(201);
@@ -207,6 +219,9 @@ describe("user should be able to create an item and add an attachment", () => {
description: "test-description",
quantity: 2,
locationId: parentLocation.id,
+ barcode: "",
+ manufacturer: "",
+ modelNumber: "",
});
expect(parentResponse.status).toBe(201);
expect(parent.id).toBeTruthy();
@@ -217,6 +232,9 @@ describe("user should be able to create an item and add an attachment", () => {
description: "test-description",
quantity: 2,
locationId: childsLocation.id,
+ barcode: "",
+ manufacturer: "",
+ modelNumber: "",
});
expect(child1Response.status).toBe(201);
const child1ItemUpdate = {
@@ -234,6 +252,9 @@ describe("user should be able to create an item and add an attachment", () => {
description: "test-description",
quantity: 2,
locationId: childsLocation.id,
+ barcode: "",
+ manufacturer: "",
+ modelNumber: "",
});
expect(child2Response.status).toBe(201);
const child2ItemUpdate = {
diff --git a/frontend/lib/api/types/data-contracts.ts b/frontend/lib/api/types/data-contracts.ts
index 460b84c73..ab86cb012 100644
--- a/frontend/lib/api/types/data-contracts.ts
+++ b/frontend/lib/api/types/data-contracts.ts
@@ -195,6 +195,8 @@ export interface EntItem {
archived: boolean;
/** AssetID holds the value of the "asset_id" field. */
asset_id: number;
+ /** Barcode holds the value of the "barcode" field. */
+ barcode: string;
/** CreatedAt holds the value of the "created_at" field. */
created_at: string;
/** Description holds the value of the "description" field. */
@@ -452,16 +454,14 @@ export interface EntUserEdges {
}
export interface BarcodeProduct {
- barcode: string;
imageBase64: string;
imageURL: string;
item: ItemCreate;
- manufacturer: string;
- /** Identifications */
- modelNumber: string;
/** Extras */
notes: string;
search_engine_name: string;
+ search_engine_product_url: string;
+ search_engine_url: string;
}
export interface Group {
@@ -505,11 +505,14 @@ export interface ItemAttachmentUpdate {
}
export interface ItemCreate {
+ barcode: string;
/** @maxLength 1000 */
description: string;
labelIds: string[];
/** Edges */
locationId: string;
+ manufacturer: string;
+ modelNumber: string;
/**
* @minLength 1
* @maxLength 255
@@ -533,6 +536,7 @@ export interface ItemOut {
/** @example "0" */
assetId: string;
attachments: ItemAttachment[];
+ barcode: string;
createdAt: Date | string;
description: string;
fields: ItemField[];
@@ -603,6 +607,7 @@ export interface ItemSummary {
export interface ItemUpdate {
archived: boolean;
assetId: string;
+ barcode: string;
/** @maxLength 1000 */
description: string;
fields: ItemField[];
diff --git a/frontend/locales/en.json b/frontend/locales/en.json
index f29cfd3b6..8f39c45bc 100644
--- a/frontend/locales/en.json
+++ b/frontend/locales/en.json
@@ -283,6 +283,7 @@
"associated_with_multiple": "This Asset Id is associated with multiple items",
"attachment": "Attachment",
"attachments": "Attachments",
+ "barcode": "Barcode",
"changes_persisted_immediately": "Changes to attachments will be saved immediately",
"created_at": "Created At",
"custom_fields": "Custom Fields",
diff --git a/frontend/package.json b/frontend/package.json
index 8163cb88d..eee5bbf64 100644
--- a/frontend/package.json
+++ b/frontend/package.json
@@ -64,6 +64,7 @@
"fuzzysort": "^3.1.0",
"h3": "^1.15.1",
"http-proxy": "^1.18.1",
+ "jsbarcode": "^3.12.1",
"lucide-vue-next": "^0.474.0",
"markdown-it": "^14.1.0",
"pinia": "^2.3.1",
diff --git a/frontend/pages/home/index.vue b/frontend/pages/home/index.vue
index e5a6d35be..c0ddede8e 100644
--- a/frontend/pages/home/index.vue
+++ b/frontend/pages/home/index.vue
@@ -42,7 +42,7 @@
{{ $t("items.no_results") }}
-
+
diff --git a/frontend/pages/item/[id]/index.vue b/frontend/pages/item/[id]/index.vue
index d642305be..315d17715 100644
--- a/frontend/pages/item/[id]/index.vue
+++ b/frontend/pages/item/[id]/index.vue
@@ -212,6 +212,12 @@
text: item.value?.manufacturer,
copyable: true,
},
+ {
+ name: "items.barcode",
+ text: item.value?.barcode,
+ type: "barcode",
+ copyable: true,
+ },
{
name: "items.insured",
text: item.value?.insured ? "Yes" : "No",
@@ -774,7 +780,7 @@
diff --git a/frontend/pages/item/[id]/index/edit.vue b/frontend/pages/item/[id]/index/edit.vue
index 54114811e..00b495ea0 100644
--- a/frontend/pages/item/[id]/index/edit.vue
+++ b/frontend/pages/item/[id]/index/edit.vue
@@ -200,6 +200,12 @@
ref: "manufacturer",
maxLength: 255,
},
+ {
+ type: "text",
+ label: "items.barcode",
+ ref: "barcode",
+ maxLength: 255,
+ },
{
type: "textarea",
label: "items.notes",
diff --git a/frontend/pages/label/[id].vue b/frontend/pages/label/[id].vue
index d9abeaf44..dd2182e2f 100644
--- a/frontend/pages/label/[id].vue
+++ b/frontend/pages/label/[id].vue
@@ -192,7 +192,7 @@
diff --git a/frontend/pages/location/[id].vue b/frontend/pages/location/[id].vue
index 94e16add1..55a87720d 100644
--- a/frontend/pages/location/[id].vue
+++ b/frontend/pages/location/[id].vue
@@ -217,7 +217,7 @@
diff --git a/frontend/pnpm-lock.yaml b/frontend/pnpm-lock.yaml
index 54b96ce30..c3491f00e 100644
--- a/frontend/pnpm-lock.yaml
+++ b/frontend/pnpm-lock.yaml
@@ -68,6 +68,9 @@ importers:
http-proxy:
specifier: ^1.18.1
version: 1.18.1
+ jsbarcode:
+ specifier: ^3.12.1
+ version: 3.12.1
lucide-vue-next:
specifier: ^0.474.0
version: 0.474.0(vue@3.4.8(typescript@5.6.2))
@@ -4367,6 +4370,9 @@ packages:
resolution: {integrity: sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==}
hasBin: true
+ jsbarcode@3.12.1:
+ resolution: {integrity: sha512-QZQSqIknC2Rr/YOUyOkCBqsoiBAOTYK+7yNN3JsqfoUtJtkazxNw1dmPpxuv7VVvqW13kA3/mKiLq+s/e3o9hQ==}
+
jsesc@3.0.2:
resolution: {integrity: sha512-xKqzzWXDttJuOcawBt4KnKHHIf5oQ/Cxax+0PWFG+DFDgHNAdi+TXECADI+RYiFUMmx8792xsMbbgXj4CwnP4g==}
engines: {node: '>=6'}
@@ -8569,7 +8575,7 @@ snapshots:
'@nuxtjs/eslint-config-typescript@12.1.0(eslint@8.57.1)(typescript@5.6.2)':
dependencies:
- '@nuxtjs/eslint-config': 12.0.0(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.6.2))(eslint-import-resolver-typescript@3.10.0(eslint-plugin-import@2.31.0)(eslint@8.57.1))(eslint@8.57.1)
+ '@nuxtjs/eslint-config': 12.0.0(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.6.2))(eslint-import-resolver-typescript@3.10.0)(eslint@8.57.1)
'@typescript-eslint/eslint-plugin': 6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.6.2))(eslint@8.57.1)(typescript@5.6.2)
'@typescript-eslint/parser': 6.21.0(eslint@8.57.1)(typescript@5.6.2)
eslint: 8.57.1
@@ -8582,10 +8588,10 @@ snapshots:
- supports-color
- typescript
- '@nuxtjs/eslint-config@12.0.0(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.6.2))(eslint-import-resolver-typescript@3.10.0(eslint-plugin-import@2.31.0)(eslint@8.57.1))(eslint@8.57.1)':
+ '@nuxtjs/eslint-config@12.0.0(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.6.2))(eslint-import-resolver-typescript@3.10.0)(eslint@8.57.1)':
dependencies:
eslint: 8.57.1
- eslint-config-standard: 17.1.0(eslint-plugin-import@2.31.0(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.6.2))(eslint-import-resolver-typescript@3.10.0)(eslint@8.57.1))(eslint-plugin-n@15.7.0(eslint@8.57.1))(eslint-plugin-promise@6.6.0(eslint@8.57.1))(eslint@8.57.1)
+ eslint-config-standard: 17.1.0(eslint-plugin-import@2.31.0)(eslint-plugin-n@15.7.0(eslint@8.57.1))(eslint-plugin-promise@6.6.0(eslint@8.57.1))(eslint@8.57.1)
eslint-plugin-import: 2.31.0(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.6.2))(eslint-import-resolver-typescript@3.10.0)(eslint@8.57.1)
eslint-plugin-n: 15.7.0(eslint@8.57.1)
eslint-plugin-node: 11.1.0(eslint@8.57.1)
@@ -10673,7 +10679,7 @@ snapshots:
dependencies:
eslint: 8.57.1
- eslint-config-standard@17.1.0(eslint-plugin-import@2.31.0(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.6.2))(eslint-import-resolver-typescript@3.10.0)(eslint@8.57.1))(eslint-plugin-n@15.7.0(eslint@8.57.1))(eslint-plugin-promise@6.6.0(eslint@8.57.1))(eslint@8.57.1):
+ eslint-config-standard@17.1.0(eslint-plugin-import@2.31.0)(eslint-plugin-n@15.7.0(eslint@8.57.1))(eslint-plugin-promise@6.6.0(eslint@8.57.1))(eslint@8.57.1):
dependencies:
eslint: 8.57.1
eslint-plugin-import: 2.31.0(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.6.2))(eslint-import-resolver-typescript@3.10.0)(eslint@8.57.1)
@@ -10703,7 +10709,7 @@ snapshots:
transitivePeerDependencies:
- supports-color
- eslint-module-utils@2.12.0(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.10.0(eslint-plugin-import@2.31.0)(eslint@8.57.1))(eslint@8.57.1):
+ eslint-module-utils@2.12.0(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.10.0)(eslint@8.57.1):
dependencies:
debug: 3.2.7
optionalDependencies:
@@ -10737,7 +10743,7 @@ snapshots:
doctrine: 2.1.0
eslint: 8.57.1
eslint-import-resolver-node: 0.3.9
- eslint-module-utils: 2.12.0(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.10.0(eslint-plugin-import@2.31.0)(eslint@8.57.1))(eslint@8.57.1)
+ eslint-module-utils: 2.12.0(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.10.0)(eslint@8.57.1)
hasown: 2.0.2
is-core-module: 2.16.1
is-glob: 4.0.3
@@ -11681,6 +11687,8 @@ snapshots:
dependencies:
argparse: 2.0.1
+ jsbarcode@3.12.1: {}
+
jsesc@3.0.2: {}
jsesc@3.1.0: {}
@@ -12311,7 +12319,7 @@ snapshots:
unenv: 1.10.0
unimport: 3.14.6(rollup@4.40.0)
unplugin: 1.16.1
- unplugin-vue-router: 0.10.9(rollup@4.40.0)(vue-router@4.5.0(vue@3.5.13(typescript@5.6.2)))(vue@3.5.13(typescript@5.6.2))
+ unplugin-vue-router: 0.10.9(rollup@4.40.0)(vue-router@4.5.0(vue@3.4.8(typescript@5.6.2)))(vue@3.5.13(typescript@5.6.2))
unstorage: 1.15.0(@netlify/blobs@8.2.0)(db0@0.3.2)(ioredis@5.6.1)
untyped: 1.5.2
vue: 3.5.13(typescript@5.6.2)
@@ -13942,7 +13950,7 @@ snapshots:
pathe: 2.0.3
picomatch: 4.0.2
- unplugin-vue-router@0.10.9(rollup@4.40.0)(vue-router@4.5.0(vue@3.5.13(typescript@5.6.2)))(vue@3.5.13(typescript@5.6.2)):
+ unplugin-vue-router@0.10.9(rollup@4.40.0)(vue-router@4.5.0(vue@3.4.8(typescript@5.6.2)))(vue@3.5.13(typescript@5.6.2)):
dependencies:
'@babel/types': 7.27.0
'@rollup/pluginutils': 5.1.4(rollup@4.40.0)
@@ -13959,7 +13967,7 @@ snapshots:
unplugin: 2.0.0-beta.1
yaml: 2.7.1
optionalDependencies:
- vue-router: 4.5.0(vue@3.5.13(typescript@5.6.2))
+ vue-router: 4.5.0(vue@3.4.8(typescript@5.6.2))
transitivePeerDependencies:
- rollup
- vue