Redesign configurator UI with tabs and remove Excel export
- Add tab-based configurator (Base, Storage, PCI, Power, Accessories, Other) - Base tab: single-select with autocomplete for MB, CPU, MEM - Other tabs: multi-select with autocomplete and quantity input - Table view with LOT, Description, Price, Quantity, Total columns - Add configuration list page with create modal (opportunity number) - Remove Excel export functionality and excelize dependency - Increase component list limit from 100 to 5000 - Add web templates (base, index, configs, login, admin_pricing) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
52
web/templates/components_list.html
Normal file
52
web/templates/components_list.html
Normal file
@@ -0,0 +1,52 @@
|
||||
{{define "components_list.html"}}
|
||||
{{if .Components}}
|
||||
<div class="bg-white rounded-lg shadow overflow-hidden">
|
||||
<table class="w-full">
|
||||
<thead class="bg-gray-50">
|
||||
<tr>
|
||||
<th class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase">Артикул</th>
|
||||
<th class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase">Категория</th>
|
||||
<th class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase">Описание</th>
|
||||
<th class="px-4 py-3 text-right text-xs font-medium text-gray-500 uppercase">Цена</th>
|
||||
<th class="px-4 py-3 text-center text-xs font-medium text-gray-500 uppercase w-24"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="divide-y">
|
||||
{{range .Components}}
|
||||
<tr class="hover:bg-gray-50">
|
||||
<td class="px-4 py-3 text-sm font-medium font-mono">{{.LotName}}</td>
|
||||
<td class="px-4 py-3 text-sm">
|
||||
<span class="px-2 py-1 text-xs rounded bg-gray-100">{{.Category}}</span>
|
||||
</td>
|
||||
<td class="px-4 py-3 text-sm text-gray-500 max-w-md truncate">{{.Description}}</td>
|
||||
<td class="px-4 py-3 text-sm text-right font-medium">
|
||||
{{if .CurrentPrice}}
|
||||
${{printf "%.2f" (deref .CurrentPrice)}}
|
||||
{{else}}
|
||||
<span class="text-gray-400">—</span>
|
||||
{{end}}
|
||||
</td>
|
||||
<td class="px-4 py-3 text-center">
|
||||
{{if .CurrentPrice}}
|
||||
<button onclick="addToCart('{{jsesc .LotName}}', {{deref .CurrentPrice}}, '{{jsesc .Description}}')"
|
||||
class="px-3 py-1 bg-blue-600 text-white text-xs rounded hover:bg-blue-700">
|
||||
+ Добавить
|
||||
</button>
|
||||
{{else}}
|
||||
<span class="text-gray-400 text-xs">Нет цены</span>
|
||||
{{end}}
|
||||
</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<p class="text-center text-sm text-gray-500 mt-4">Найдено: {{.Total}}</p>
|
||||
|
||||
{{else}}
|
||||
<div class="bg-white rounded-lg shadow p-8 text-center text-gray-500">
|
||||
Компоненты не найдены
|
||||
</div>
|
||||
{{end}}
|
||||
{{end}}
|
||||
Reference in New Issue
Block a user