Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 | 1x 1x 1x 1x 1x 1x 1x 3x 1x 1x 1x 3x 3x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 2x 2x 3x 5x 2x 2x 3x 2x 1x 1x 1x 5x 2x 2x 2x 2x 1x 1x 2x 1x 3x 1x 1x 1x 1x 1x 1x 5x | <script setup lang="ts">
import { computed, onMounted, ref, watch } from "vue";
import type { BusinessId, Warehouse } from "@plain-journal/foundation";
import {
type InventoryCommandPhase,
useAdminInventoryStore,
} from "../entities/admin-inventory";
import { useStaffSessionStore } from "../stores/session";
import {
PjActionGroup,
PjButton,
PjField,
PjStatusNotice,
} from "@plain-journal/ui";
import { ListWorkbench } from "../shared/ui";
const session = useStaffSessionStore();
const inventory = useAdminInventoryStore();
const selectedWarehouseId = ref<BusinessId | null>(null);
const roles = computed(() => session.profile?.roles ?? []);
const accessContext = computed(() => ({
authorized: Boolean(
session.authenticated
&& roles.value.some((role) => ["ADMIN", "WAREHOUSE"].includes(role)),
),
operatorId: session.profile?.id ?? null,
accessToken: session.requestAuthority,
}));
const selectedWarehouse = computed<Warehouse | null>(() =>
inventory.warehouses.find((warehouse) => warehouse.id === selectedWarehouseId.value)
?? inventory.warehouses[0]
?? null,
);
function noticeTone(
phase: InventoryCommandPhase,
): "neutral" | "processing" | "unknown" | "success" | "danger" {
switch (phase) {
case "processing":
return "processing";
case "unknown":
return "unknown";
case "accepted":
return "success";
case "rejected":
return "danger";
default:
return "neutral";
}
}
function noticeTitle(phase: InventoryCommandPhase): string {
switch (phase) {
case "processing":
return "库存命令正在确认";
case "unknown":
return "库存命令结果未知";
case "accepted":
return "Inventory 已确认";
case "rejected":
return "命令已被明确拒绝";
default:
return "库存命令";
}
}
function loadWarehouses() {
return inventory.loadWarehouses(accessContext.value);
}
function selectWarehouse(warehouse: Warehouse) {
selectedWarehouseId.value = warehouse.id;
inventory.lookup.warehouseId = warehouse.id;
inventory.adjustment.warehouseId = warehouse.id;
}
watch(accessContext, (context) => {
inventory.synchronizeAccess(context);
});
watch(
() => inventory.warehouses.map((warehouse) => warehouse.id),
(warehouseIds) => {
if (warehouseIds.length > 0 && !warehouseIds.includes(selectedWarehouseId.value ?? "")) {
selectedWarehouseId.value = warehouseIds[0] ?? null;
}
},
{ immediate: true },
);
watch(selectedWarehouse, (warehouse) => {
Iif (!warehouse) {
return;
}
Eif (!inventory.lookup.warehouseId) {
inventory.lookup.warehouseId = warehouse.id;
}
Eif (!inventory.adjustment.warehouseId) {
inventory.adjustment.warehouseId = warehouse.id;
}
});
onMounted(() => {
inventory.synchronizeAccess(accessContext.value);
void loadWarehouses();
});
</script>
<template>
<ListWorkbench label="库存清单工作区" class="inventory-workbench">
<template #filters>
<div class="inventory-scope-pane">
<header class="inventory-scope-pane__header">
<p class="eyebrow">Inventory 所有者域</p>
<h1>仓库与库存</h1>
<p>先选定经营仓库,再查询或调整一条 SKU 库存事实。</p>
</header>
<section class="inventory-scope" aria-labelledby="inventory-authority-title">
<p class="eyebrow">最终裁决边界</p>
<h2 id="inventory-authority-title">MySQL 保存最终事实</h2>
<p>Redis 不保存最终库存;普通库存查询也不能证明某条结果未知的流水已经成功。</p>
</section>
<dl class="inventory-scope-facts">
<div><dt>当前权限</dt><dd>ADMIN / WAREHOUSE</dd></div>
<div><dt>可见仓库</dt><dd>{{ inventory.warehouses.length }} 个</dd></div>
<div><dt>当前对象</dt><dd>{{ selectedWarehouse?.code ?? "尚未选择" }}</dd></div>
</dl>
<PjStatusNotice
v-if="inventory.commandPhase !== 'idle'"
class="inventory-command-notice"
:tone="noticeTone(inventory.commandPhase)"
:title="noticeTitle(inventory.commandPhase)"
:assertive="inventory.commandPhase === 'rejected'"
>
<p>{{ inventory.commandMessage }}</p>
<p v-if="inventory.pendingReferenceNo">
待确认业务号:<code>{{ inventory.pendingReferenceNo }}</code>
· {{ inventory.pendingCommandLabel }}
</p>
<template #actions>
<PjActionGroup :stack-on-compact="true">
<PjButton
v-if="inventory.commandPhase === 'unknown'"
variant="text"
:loading="inventory.submitting"
@click="inventory.readPendingAuthority(accessContext)"
>
读取权威事实
</PjButton>
<PjButton
v-if="inventory.commandPhase === 'unknown' && inventory.pendingCommand?.kind === 'adjustment'"
variant="text"
:loading="inventory.submitting"
@click="inventory.retryPending(accessContext)"
>
使用原流水重试
</PjButton>
<PjButton
v-if="['accepted', 'rejected'].includes(inventory.commandPhase)"
variant="text"
@click="inventory.resetCommandNotice"
>
收起结果
</PjButton>
</PjActionGroup>
</template>
</PjStatusNotice>
<PjButton variant="text" :loading="inventory.loadingWarehouses" @click="loadWarehouses">
重新读取仓库事实
</PjButton>
</div>
</template>
<template #list>
<div class="inventory-list-pane">
<header class="inventory-panel-header">
<div>
<p class="eyebrow">仓库事实</p>
<h2 id="warehouses-title">经营仓库</h2>
</div>
<small>{{ inventory.warehouses.length }} 个 · 选择后带入库存上下文</small>
</header>
<PjStatusNotice
v-if="inventory.loadError"
tone="danger"
title="仓库事实读取未完成"
assertive
>
<p>{{ inventory.loadError }}</p>
</PjStatusNotice>
<div v-if="!inventory.loadingWarehouses && inventory.warehouses.length === 0" class="inventory-empty">
<strong>当前没有可见仓库</strong>
<span>可创建仓库,或重新读取 Inventory 权威事实。</span>
</div>
<ol v-else class="inventory-warehouse-list" aria-labelledby="warehouses-title">
<li v-for="warehouse in inventory.warehouses" :key="warehouse.id">
<button
type="button"
:class="{ 'is-selected': selectedWarehouse?.id === warehouse.id }"
:aria-pressed="selectedWarehouse?.id === warehouse.id"
@click="selectWarehouse(warehouse)"
>
<span>
<small>{{ warehouse.code }}</small>
<h3>{{ warehouse.name }}</h3>
<code>{{ warehouse.id }}</code>
</span>
<span class="inventory-warehouse-list__meta">
<b>{{ warehouse.status }}</b>
<small>版本 {{ warehouse.version }}</small>
</span>
</button>
</li>
</ol>
<section class="inventory-create" aria-labelledby="warehouse-create-title">
<header>
<div>
<p class="eyebrow">新增对象</p>
<h2 id="warehouse-create-title">创建仓库</h2>
</div>
<small>唯一代码 + 名称</small>
</header>
<form class="inventory-form inventory-form--create" @submit.prevent="inventory.createWarehouse(accessContext)">
<PjField
v-slot="{ describedBy }"
label="仓库代码"
for-id="warehouse-code"
hint="结果未知时只能按唯一代码和名称重读核对。"
required
>
<input
id="warehouse-code"
v-model.trim="inventory.warehouseForm.code"
class="pj-control"
required
maxlength="40"
pattern="[A-Za-z0-9_\-]+"
:readonly="Boolean(inventory.pendingCommand)"
:aria-describedby="describedBy"
/>
</PjField>
<PjField v-slot="{ describedBy }" label="仓库名称" for-id="warehouse-name" required>
<input
id="warehouse-name"
v-model.trim="inventory.warehouseForm.name"
class="pj-control"
required
maxlength="100"
:readonly="Boolean(inventory.pendingCommand)"
:aria-describedby="describedBy"
/>
</PjField>
<PjButton type="submit" :disabled="inventory.commandBlocked">创建仓库</PjButton>
</form>
</section>
</div>
</template>
<template #detail>
<div class="inventory-detail-pane">
<article v-if="selectedWarehouse" class="inventory-detail">
<header class="inventory-detail__header">
<div>
<p class="eyebrow">{{ selectedWarehouse.code }} · 仓库 ID {{ selectedWarehouse.id }}</p>
<h2>{{ selectedWarehouse.name }}</h2>
<p>围绕同一仓库上下文读取当前库存,再提交一条可恢复的幂等调整。</p>
</div>
<span class="status-label">{{ selectedWarehouse.status }}</span>
</header>
<section class="inventory-detail__section" aria-labelledby="stock-title">
<header>
<div>
<p class="eyebrow">MySQL 权威库存</p>
<h2 id="stock-title">库存位置</h2>
</div>
<small>在手 − 预占 = 可用</small>
</header>
<form class="inventory-form inventory-form--lookup" @submit.prevent="inventory.lookupStock(accessContext)">
<PjField v-slot="{ describedBy }" label="仓库 ID" for-id="stock-warehouse-id" required>
<input
id="stock-warehouse-id"
v-model.trim="inventory.lookup.warehouseId"
class="pj-control"
required
inputmode="numeric"
pattern="[0-9]+"
:aria-describedby="describedBy"
/>
</PjField>
<PjField v-slot="{ describedBy }" label="SKU ID" for-id="stock-sku-id" required>
<input
id="stock-sku-id"
v-model.trim="inventory.lookup.skuId"
class="pj-control"
required
inputmode="numeric"
pattern="[0-9]+"
:aria-describedby="describedBy"
/>
</PjField>
<PjButton type="submit" :loading="inventory.stockBusy">查询当前库存</PjButton>
</form>
<PjStatusNotice
v-if="inventory.stockError"
class="inventory-inline-notice"
tone="danger"
title="库存事实读取未完成"
assertive
>
<p>{{ inventory.stockError }}</p>
</PjStatusNotice>
<dl v-if="inventory.stock" class="inventory-stock-facts">
<div><dt>在手</dt><dd>{{ inventory.stock.onHand }}</dd></div>
<div><dt>预占</dt><dd>{{ inventory.stock.reserved }}</dd></div>
<div><dt>可用</dt><dd>{{ inventory.stock.available }}</dd></div>
<div><dt>版本</dt><dd>{{ inventory.stock.version }}</dd></div>
</dl>
<div v-else class="inventory-stock-empty">
输入 SKU ID 后读取当前库存;页面不会用缓存或展示状态替代权威事实。
</div>
</section>
<section class="inventory-detail__section" aria-labelledby="adjustment-title">
<header>
<div>
<p class="eyebrow">幂等库存流水</p>
<h2 id="adjustment-title">调整在手库存</h2>
</div>
<small>同流水、同载荷才能安全重放</small>
</header>
<form class="inventory-form inventory-form--adjustment" @submit.prevent="inventory.adjustStock(accessContext)">
<PjField
v-slot="{ describedBy }"
label="流水号"
for-id="adjustment-movement-no"
hint="Inventory 以 movementNo 和完整载荷哈希裁决幂等。"
required
class="inventory-form__wide"
>
<input
id="adjustment-movement-no"
v-model.trim="inventory.adjustment.movementNo"
class="pj-control inventory-command-id"
required
maxlength="64"
readonly
:aria-describedby="describedBy"
/>
</PjField>
<PjField v-slot="{ describedBy }" label="仓库 ID" for-id="adjustment-warehouse-id" required>
<input
id="adjustment-warehouse-id"
v-model.trim="inventory.adjustment.warehouseId"
class="pj-control"
required
inputmode="numeric"
pattern="[0-9]+"
:readonly="Boolean(inventory.pendingCommand)"
:aria-describedby="describedBy"
/>
</PjField>
<PjField v-slot="{ describedBy }" label="SKU ID" for-id="adjustment-sku-id" required>
<input
id="adjustment-sku-id"
v-model.trim="inventory.adjustment.skuId"
class="pj-control"
required
inputmode="numeric"
pattern="[0-9]+"
:readonly="Boolean(inventory.pendingCommand)"
:aria-describedby="describedBy"
/>
</PjField>
<PjField
v-slot="{ describedBy }"
label="数量变化"
for-id="adjustment-quantity"
hint="正数入库,负数冲减;不能为 0。"
required
>
<input
id="adjustment-quantity"
v-model="inventory.adjustment.quantityDelta"
class="pj-control"
required
type="number"
min="-1000000000"
max="1000000000"
:readonly="Boolean(inventory.pendingCommand)"
:aria-describedby="describedBy"
/>
</PjField>
<PjField
v-slot="{ describedBy }"
label="调整原因"
for-id="adjustment-reason"
hint="原因进入不可变库存流水。"
required
class="inventory-form__wide"
>
<textarea
id="adjustment-reason"
v-model.trim="inventory.adjustment.reason"
class="pj-control"
required
maxlength="240"
rows="3"
:readonly="Boolean(inventory.pendingCommand)"
:aria-describedby="describedBy"
/>
</PjField>
<PjButton type="submit" :disabled="inventory.commandBlocked">提交 Inventory 调整</PjButton>
</form>
<p class="inventory-boundary">
当前数量与版本不能证明某条结果未知的流水已经成功;必须读取权威事实或沿用原 movementNo 重试。
</p>
</section>
</article>
<div v-else class="inventory-detail-empty">
<strong>选择一个经营仓库</strong>
<span>仓库选择只建立页面上下文,不复制或修改 Inventory 事实。</span>
</div>
</div>
</template>
</ListWorkbench>
</template>
<style scoped>
.inventory-workbench {
--pj-focus-ring: var(--pj-brand-primary);
--pj-color-focus: var(--pj-focus-ring);
}
.inventory-scope-pane,
.inventory-list-pane,
.inventory-detail-pane {
min-width: 0;
padding: clamp(1rem, 2vw, 1.75rem);
}
.inventory-scope-pane,
.inventory-list-pane,
.inventory-detail,
.inventory-detail-pane {
display: grid;
align-content: start;
gap: var(--pj-space-6);
}
.inventory-scope-pane__header h1,
.inventory-scope h2,
.inventory-panel-header h2,
.inventory-create h2,
.inventory-warehouse-list h3,
.inventory-detail__header h2,
.inventory-detail__section h2 {
margin: 0;
}
.inventory-scope-pane__header h1 {
font-size: clamp(1.7rem, 2.8vw, 2.45rem);
font-weight: 520;
letter-spacing: 0.035em;
}
.inventory-scope-pane__header > p:last-child,
.inventory-scope p:last-child,
.inventory-panel-header small,
.inventory-create header small,
.inventory-detail__header p:last-child,
.inventory-detail__section header small,
.inventory-stock-empty,
.inventory-boundary,
.inventory-empty span,
.inventory-detail-empty span {
color: var(--pj-text-secondary);
}
.inventory-scope,
.inventory-scope-facts,
.inventory-create,
.inventory-detail__section {
padding-top: var(--pj-space-5);
border-top: 1px solid var(--pj-border-subtle);
}
.inventory-scope {
display: grid;
gap: var(--pj-space-3);
}
.inventory-scope h2 {
font-size: var(--pj-font-size-md);
}
.inventory-scope-facts {
display: grid;
gap: var(--pj-space-3);
margin: 0;
}
.inventory-scope-facts div {
display: flex;
justify-content: space-between;
gap: var(--pj-space-3);
}
.inventory-scope-facts dt,
.inventory-stock-facts dt {
color: var(--pj-text-secondary);
font-size: var(--pj-font-size-xs);
}
.inventory-scope-facts dt {
white-space: nowrap;
}
.inventory-scope-facts dd,
.inventory-stock-facts dd {
margin: 0;
overflow-wrap: anywhere;
}
.inventory-scope-facts dd {
text-align: right;
}
.inventory-command-notice,
.inventory-command-notice :deep(.pj-status-notice__body),
.inventory-command-notice :deep(.pj-status-notice__content) {
min-width: 0;
}
.inventory-command-notice code {
overflow-wrap: anywhere;
}
.inventory-panel-header,
.inventory-create > header,
.inventory-detail__header,
.inventory-detail__section > header {
display: flex;
align-items: flex-start;
justify-content: space-between;
gap: var(--pj-space-4);
}
.inventory-panel-header h2,
.inventory-create h2,
.inventory-detail__section h2 {
font-size: var(--pj-font-size-lg);
font-weight: 560;
letter-spacing: 0.025em;
}
.inventory-warehouse-list {
display: grid;
margin: 0;
padding: 0;
list-style: none;
}
.inventory-warehouse-list li + li {
border-top: 1px solid var(--pj-border-subtle);
}
.inventory-warehouse-list button {
width: 100%;
min-width: 0;
display: grid;
grid-template-columns: minmax(0, 1fr) auto;
align-items: start;
gap: var(--pj-space-4);
padding: var(--pj-space-5) var(--pj-space-4);
border: 0;
color: inherit;
font: inherit;
text-align: left;
background: transparent;
cursor: pointer;
}
.inventory-warehouse-list button.is-selected {
background: color-mix(in srgb, var(--pj-brand-primary) 7%, transparent);
box-shadow: inset 0.2rem 0 var(--pj-brand-primary);
}
.inventory-warehouse-list button > span:first-child,
.inventory-warehouse-list small,
.inventory-warehouse-list code,
.inventory-warehouse-list b {
min-width: 0;
display: block;
}
.inventory-warehouse-list h3 {
margin-top: var(--pj-space-1);
overflow-wrap: anywhere;
font-size: var(--pj-font-size-md);
font-weight: 560;
}
.inventory-warehouse-list code {
margin-top: var(--pj-space-2);
overflow-wrap: anywhere;
color: var(--pj-text-secondary);
font-size: var(--pj-font-size-xs);
}
.inventory-warehouse-list__meta {
text-align: right;
}
.inventory-warehouse-list__meta b {
color: var(--pj-brand-primary);
font-size: var(--pj-font-size-xs);
}
.inventory-warehouse-list__meta small {
margin-top: var(--pj-space-2);
color: var(--pj-text-secondary);
}
.inventory-create {
display: grid;
gap: var(--pj-space-5);
}
.inventory-form {
min-width: 0;
display: grid;
align-items: end;
gap: var(--pj-space-5);
}
.inventory-form--create {
grid-template-columns: minmax(0, 1fr);
}
.inventory-detail {
max-width: 68rem;
}
.inventory-detail__header {
padding-bottom: var(--pj-space-6);
border-bottom: 1px solid var(--pj-border-subtle);
}
.inventory-detail__header > div {
min-width: 0;
}
.inventory-detail__header h2 {
overflow-wrap: anywhere;
font-size: var(--pj-font-size-xl);
font-weight: 520;
letter-spacing: 0.025em;
}
.inventory-detail__header p:last-child {
max-width: var(--pj-layout-reading);
margin-bottom: 0;
}
.inventory-detail__section {
display: grid;
gap: var(--pj-space-5);
padding-bottom: var(--pj-space-6);
border-bottom: 1px solid var(--pj-border-subtle);
}
.inventory-form--lookup {
grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
}
.inventory-form--adjustment {
grid-template-columns: repeat(3, minmax(0, 1fr));
}
.inventory-form__wide {
grid-column: 1 / -1;
}
.inventory-form textarea {
resize: vertical;
line-height: 1.5;
}
.inventory-command-id {
font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
font-size: var(--pj-font-size-xs);
}
.inventory-inline-notice {
margin-top: 0;
}
.inventory-stock-facts {
display: grid;
grid-template-columns: repeat(4, minmax(0, 1fr));
margin: 0;
border-block: 1px solid var(--pj-border-subtle);
}
.inventory-stock-facts div {
min-width: 0;
padding: var(--pj-space-4);
}
.inventory-stock-facts div + div {
border-left: 1px solid var(--pj-border-subtle);
}
.inventory-stock-facts dd {
margin-top: var(--pj-space-2);
font-size: var(--pj-font-size-lg);
}
.inventory-stock-empty,
.inventory-boundary {
padding-block: var(--pj-space-4);
border-block: 1px solid var(--pj-border-subtle);
font-size: var(--pj-font-size-sm);
}
.inventory-boundary {
margin: 0;
}
.inventory-empty,
.inventory-detail-empty {
min-height: 12rem;
display: grid;
place-content: center;
gap: var(--pj-space-2);
padding: var(--pj-space-6);
border-block: 1px solid var(--pj-border-subtle);
text-align: center;
}
@media (max-width: 72rem) {
.inventory-detail {
max-width: none;
}
}
@media (max-width: 60rem) {
.inventory-form--lookup,
.inventory-form--adjustment,
.inventory-stock-facts {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
}
@media (max-width: 48rem) {
.inventory-scope-pane,
.inventory-list-pane,
.inventory-detail-pane {
padding: var(--pj-space-5);
}
}
@media (max-width: 32rem) {
.inventory-panel-header,
.inventory-create > header,
.inventory-detail__header,
.inventory-detail__section > header {
align-items: flex-start;
flex-direction: column;
}
.inventory-form--lookup,
.inventory-form--adjustment,
.inventory-stock-facts {
grid-template-columns: minmax(0, 1fr);
}
.inventory-form__wide {
grid-column: auto;
}
.inventory-stock-facts div + div {
border-left: 0;
border-top: 1px solid var(--pj-border-subtle);
}
}
</style>
|