@codingfactory/inventory-locator-client 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +47 -0
- package/src/api/client.ts +31 -0
- package/src/components/counting/CountEntryForm.vue +833 -0
- package/src/components/counting/CountReport.vue +385 -0
- package/src/components/counting/CountSessionDetail.vue +650 -0
- package/src/components/counting/CountSessionList.vue +683 -0
- package/src/components/dashboard/InventoryDashboard.vue +670 -0
- package/src/components/dashboard/UnlocatedProducts.vue +468 -0
- package/src/components/labels/LabelBatchPrint.vue +528 -0
- package/src/components/labels/LabelPreview.vue +293 -0
- package/src/components/locations/InventoryLocatorShell.vue +408 -0
- package/src/components/locations/LocationBreadcrumb.vue +144 -0
- package/src/components/locations/LocationCodeBadge.vue +46 -0
- package/src/components/locations/LocationDetail.vue +884 -0
- package/src/components/locations/LocationForm.vue +360 -0
- package/src/components/locations/LocationSearchInput.vue +428 -0
- package/src/components/locations/LocationTree.vue +156 -0
- package/src/components/locations/LocationTreeNode.vue +280 -0
- package/src/components/locations/LocationTypeIcon.vue +58 -0
- package/src/components/products/LocationProductAdd.vue +637 -0
- package/src/components/products/LocationProductList.vue +547 -0
- package/src/components/products/ProductLocationList.vue +215 -0
- package/src/components/products/QuickMoveModal.vue +592 -0
- package/src/components/scanning/ScanHistory.vue +146 -0
- package/src/components/scanning/ScanResult.vue +350 -0
- package/src/components/scanning/ScannerOverlay.vue +696 -0
- package/src/components/shared/InvBadge.vue +71 -0
- package/src/components/shared/InvButton.vue +206 -0
- package/src/components/shared/InvCard.vue +254 -0
- package/src/components/shared/InvEmptyState.vue +132 -0
- package/src/components/shared/InvInput.vue +125 -0
- package/src/components/shared/InvModal.vue +296 -0
- package/src/components/shared/InvSelect.vue +155 -0
- package/src/components/shared/InvTable.vue +288 -0
- package/src/composables/useCountSessions.ts +184 -0
- package/src/composables/useLabelPrinting.ts +71 -0
- package/src/composables/useLocationBreadcrumbs.ts +19 -0
- package/src/composables/useLocationProducts.ts +125 -0
- package/src/composables/useLocationSearch.ts +46 -0
- package/src/composables/useLocations.ts +159 -0
- package/src/composables/useMovements.ts +71 -0
- package/src/composables/useScanner.ts +83 -0
- package/src/env.d.ts +7 -0
- package/src/index.ts +46 -0
- package/src/plugin.ts +14 -0
- package/src/stores/countStore.ts +95 -0
- package/src/stores/locationStore.ts +113 -0
- package/src/stores/scannerStore.ts +51 -0
- package/src/types/index.ts +216 -0
- package/src/utils/codeFormatter.ts +29 -0
- package/src/utils/locationIcons.ts +64 -0
- package/tsconfig.json +21 -0
- package/vite.config.ts +37 -0
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<nav class="location-breadcrumb" aria-label="Location path">
|
|
3
|
+
<ol class="location-breadcrumb__list">
|
|
4
|
+
<template v-if="shouldTruncate">
|
|
5
|
+
<li class="location-breadcrumb__item location-breadcrumb__item--ellipsis">
|
|
6
|
+
<span class="location-breadcrumb__ellipsis" aria-hidden="true">…</span>
|
|
7
|
+
</li>
|
|
8
|
+
<li
|
|
9
|
+
class="location-breadcrumb__item"
|
|
10
|
+
aria-hidden="true"
|
|
11
|
+
>
|
|
12
|
+
<span class="location-breadcrumb__separator">›</span>
|
|
13
|
+
</li>
|
|
14
|
+
</template>
|
|
15
|
+
<li
|
|
16
|
+
v-for="(segment, index) in visibleSegments"
|
|
17
|
+
:key="segment.id"
|
|
18
|
+
class="location-breadcrumb__item"
|
|
19
|
+
>
|
|
20
|
+
<span
|
|
21
|
+
v-if="index > 0 || shouldTruncate"
|
|
22
|
+
class="location-breadcrumb__separator"
|
|
23
|
+
aria-hidden="true"
|
|
24
|
+
>›</span>
|
|
25
|
+
<button
|
|
26
|
+
v-if="!isLast(index)"
|
|
27
|
+
type="button"
|
|
28
|
+
class="location-breadcrumb__link"
|
|
29
|
+
:aria-label="`Navigate to ${segment.name}`"
|
|
30
|
+
@click="emit('navigate', segment)"
|
|
31
|
+
>
|
|
32
|
+
{{ segment.name }}
|
|
33
|
+
</button>
|
|
34
|
+
<span
|
|
35
|
+
v-else
|
|
36
|
+
class="location-breadcrumb__current"
|
|
37
|
+
aria-current="location"
|
|
38
|
+
>
|
|
39
|
+
{{ segment.name }}
|
|
40
|
+
</span>
|
|
41
|
+
</li>
|
|
42
|
+
</ol>
|
|
43
|
+
</nav>
|
|
44
|
+
</template>
|
|
45
|
+
|
|
46
|
+
<script setup lang="ts">
|
|
47
|
+
import { computed } from 'vue'
|
|
48
|
+
import type { PathSegment } from '../../types'
|
|
49
|
+
|
|
50
|
+
const MAX_VISIBLE = 3
|
|
51
|
+
|
|
52
|
+
const props = defineProps<{
|
|
53
|
+
path: PathSegment[]
|
|
54
|
+
}>()
|
|
55
|
+
|
|
56
|
+
const emit = defineEmits<{
|
|
57
|
+
navigate: [segment: PathSegment]
|
|
58
|
+
}>()
|
|
59
|
+
|
|
60
|
+
const shouldTruncate = computed(() => props.path.length > MAX_VISIBLE)
|
|
61
|
+
|
|
62
|
+
const visibleSegments = computed(() => {
|
|
63
|
+
if (shouldTruncate.value) {
|
|
64
|
+
return props.path.slice(-MAX_VISIBLE)
|
|
65
|
+
}
|
|
66
|
+
return props.path
|
|
67
|
+
})
|
|
68
|
+
|
|
69
|
+
function isLast(index: number): boolean {
|
|
70
|
+
return index === visibleSegments.value.length - 1
|
|
71
|
+
}
|
|
72
|
+
</script>
|
|
73
|
+
|
|
74
|
+
<style scoped>
|
|
75
|
+
.location-breadcrumb {
|
|
76
|
+
overflow: hidden;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.location-breadcrumb__list {
|
|
80
|
+
display: flex;
|
|
81
|
+
align-items: center;
|
|
82
|
+
flex-wrap: nowrap;
|
|
83
|
+
gap: var(--space-1, 0.25rem);
|
|
84
|
+
margin: 0;
|
|
85
|
+
padding: 0;
|
|
86
|
+
list-style: none;
|
|
87
|
+
overflow: hidden;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.location-breadcrumb__item {
|
|
91
|
+
display: flex;
|
|
92
|
+
align-items: center;
|
|
93
|
+
gap: var(--space-1, 0.25rem);
|
|
94
|
+
min-width: 0;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.location-breadcrumb__separator {
|
|
98
|
+
color: var(--admin-text-tertiary);
|
|
99
|
+
font-size: var(--text-sm, 0.875rem);
|
|
100
|
+
flex-shrink: 0;
|
|
101
|
+
user-select: none;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.location-breadcrumb__ellipsis {
|
|
105
|
+
color: var(--admin-text-tertiary);
|
|
106
|
+
font-size: var(--text-sm, 0.875rem);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.location-breadcrumb__link {
|
|
110
|
+
display: inline-block;
|
|
111
|
+
padding: 0;
|
|
112
|
+
margin: 0;
|
|
113
|
+
border: none;
|
|
114
|
+
background: none;
|
|
115
|
+
font-size: var(--text-sm, 0.875rem);
|
|
116
|
+
color: var(--color-primary, #2563eb);
|
|
117
|
+
cursor: pointer;
|
|
118
|
+
white-space: nowrap;
|
|
119
|
+
overflow: hidden;
|
|
120
|
+
text-overflow: ellipsis;
|
|
121
|
+
max-width: 160px;
|
|
122
|
+
border-radius: 2px;
|
|
123
|
+
line-height: 1.4;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.location-breadcrumb__link:hover {
|
|
127
|
+
text-decoration: underline;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.location-breadcrumb__link:focus-visible {
|
|
131
|
+
outline: 2px solid var(--admin-focus-ring, #2563eb);
|
|
132
|
+
outline-offset: 2px;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.location-breadcrumb__current {
|
|
136
|
+
font-size: var(--text-sm, 0.875rem);
|
|
137
|
+
font-weight: 600;
|
|
138
|
+
color: var(--admin-text-primary);
|
|
139
|
+
white-space: nowrap;
|
|
140
|
+
overflow: hidden;
|
|
141
|
+
text-overflow: ellipsis;
|
|
142
|
+
max-width: 200px;
|
|
143
|
+
}
|
|
144
|
+
</style>
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<span
|
|
3
|
+
class="location-code-badge"
|
|
4
|
+
:title="code"
|
|
5
|
+
>
|
|
6
|
+
{{ displayCode }}
|
|
7
|
+
</span>
|
|
8
|
+
</template>
|
|
9
|
+
|
|
10
|
+
<script setup lang="ts">
|
|
11
|
+
import { computed } from 'vue'
|
|
12
|
+
import { truncateCode } from '../../utils/codeFormatter'
|
|
13
|
+
|
|
14
|
+
const props = withDefaults(defineProps<{
|
|
15
|
+
code: string
|
|
16
|
+
truncate?: boolean
|
|
17
|
+
maxSegments?: number
|
|
18
|
+
}>(), {
|
|
19
|
+
truncate: false,
|
|
20
|
+
maxSegments: 2,
|
|
21
|
+
})
|
|
22
|
+
|
|
23
|
+
const displayCode = computed(() => {
|
|
24
|
+
if (props.truncate) {
|
|
25
|
+
return truncateCode(props.code, props.maxSegments)
|
|
26
|
+
}
|
|
27
|
+
return props.code
|
|
28
|
+
})
|
|
29
|
+
</script>
|
|
30
|
+
|
|
31
|
+
<style scoped>
|
|
32
|
+
.location-code-badge {
|
|
33
|
+
display: inline-flex;
|
|
34
|
+
align-items: center;
|
|
35
|
+
padding: 2px var(--space-2, 0.5rem);
|
|
36
|
+
border-radius: 9999px;
|
|
37
|
+
font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace;
|
|
38
|
+
font-size: var(--text-xs, 0.75rem);
|
|
39
|
+
font-weight: 500;
|
|
40
|
+
line-height: 1.4;
|
|
41
|
+
white-space: nowrap;
|
|
42
|
+
background: var(--admin-card-bg);
|
|
43
|
+
border: 1px solid var(--admin-border);
|
|
44
|
+
color: var(--admin-text-secondary);
|
|
45
|
+
}
|
|
46
|
+
</style>
|