您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

78 行
2.6KB

  1. @extends('layout')
  2. @includes('includes/small-feature')
  3. <div class="container mx-auto px-8 py-8 md:py-16">
  4. <h1 class="text-3xl font-bold">
  5. {{ $item->sku }} &mdash; {{ $item->name }}
  6. </h1>
  7. @if($item->description)
  8. <p class="text-xl my-4">
  9. {{ $item->description }}
  10. </p>
  11. @endif
  12. <p class="text-gray-500">
  13. {{ $totalQuantity }} units in stock
  14. @if($item->reorder_level > 0)
  15. (reorder at {{ $item->reorder_level }})
  16. @endif
  17. </p>
  18. @if($canManage)
  19. <div class="flex space-x-4 my-4">
  20. <a href="{{ $receiveAction }}" class="bg-indigo-500 rounded-lg p-2 text-white">Receive stock</a>
  21. <a href="{{ $withdrawAction }}" class="bg-indigo-500 rounded-lg p-2 text-white">Withdraw stock</a>
  22. <a href="{{ $adjustAction }}" class="bg-indigo-500 rounded-lg p-2 text-white">Adjust stock</a>
  23. </div>
  24. @endif
  25. <h2 class="text-2xl font-bold mt-8">
  26. Stock by location
  27. </h2>
  28. @if(count($stock) === 0)
  29. <p class="text-gray-500 my-4">Not stored anywhere yet.</p>
  30. @endif
  31. <ul class="my-4 space-y-2">
  32. @foreach($stock as $row)
  33. <li class="bg-gray-50 rounded-lg p-4 flex justify-between items-center">
  34. <a href="{{ $row->locationRoute }}" class="font-bold underline">{{ $row->location->code }} &mdash; {{ $row->location->name }}</a>
  35. <span class="text-gray-500">{{ $row->quantity }} units</span>
  36. </li>
  37. @endforeach
  38. </ul>
  39. <h2 class="text-2xl font-bold mt-8">
  40. Recent activity
  41. </h2>
  42. @if(count($movements) === 0)
  43. <p class="text-gray-500 my-4">No stock movements yet.</p>
  44. @endif
  45. <ul class="my-4 space-y-2">
  46. @foreach($movements as $movement)
  47. <li class="bg-gray-50 rounded-lg p-2 flex justify-between items-center text-sm">
  48. <span>
  49. {{ $movement->type }} &mdash; {{ $movement->location->code }}
  50. @if($movement->notes)
  51. &mdash; {{ $movement->notes }}
  52. @endif
  53. </span>
  54. <span class="
  55. @if($movement->quantity_change < 0)
  56. text-red-500
  57. @endif
  58. @if($movement->quantity_change >= 0)
  59. text-green-600
  60. @endif
  61. ">
  62. @if($movement->quantity_change >= 0)
  63. +
  64. @endif
  65. {{ $movement->quantity_change }}
  66. </span>
  67. </li>
  68. @endforeach
  69. </ul>
  70. </div>

Powered by TurnKey Linux.