-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmanufacturers.html
More file actions
136 lines (127 loc) · 4.35 KB
/
Copy pathmanufacturers.html
File metadata and controls
136 lines (127 loc) · 4.35 KB
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
<!-- Page Header -->
<app-page-header
title="Fabricantes e Marcas"
subtitle="Gerenciamento de marcas parceiras, logomarcas, slugs e presença institucional no catálogo."
[breadcrumbs]="[
{ label: 'Catálogo', route: '/catalog/products' },
{ label: 'Fabricantes' }
]"
>
<div actions class="flex items-center gap-2">
<app-button variant="primary" size="sm" iconStart="plus" (btnClick)="newManufacturer()">
Novo Fabricante
</app-button>
</div>
</app-page-header>
<!-- Quick KPI Summary Strip -->
<div class="grid grid-cols-1 sm:grid-cols-3 gap-3 mb-4">
<div
class="bg-white dark:bg-slate-800 rounded-xl p-3.5 border border-gray-200/80 dark:border-slate-700/80 flex items-center justify-between shadow-2xs"
>
<div class="flex items-center gap-3">
<div
class="w-8 h-8 rounded-lg bg-slate-100 dark:bg-slate-700 text-gray-700 dark:text-slate-300 flex items-center justify-center"
>
<app-icon name="building" size="w-4 h-4" />
</div>
<div>
<span class="text-[11px] font-medium text-gray-500 dark:text-slate-400 block">
Total de Fabricantes
</span>
<span class="text-sm font-bold text-gray-900 dark:text-slate-100">
{{ totalCount() }} cadastrados
</span>
</div>
</div>
</div>
<div
class="bg-white dark:bg-slate-800 rounded-xl p-3.5 border border-gray-200/80 dark:border-slate-700/80 flex items-center justify-between shadow-2xs"
>
<div class="flex items-center gap-3">
<div
class="w-8 h-8 rounded-lg bg-emerald-100 dark:bg-[#4F8A6B]/20 text-[#4F8A6B] dark:text-[#5BAE6A] flex items-center justify-center"
>
<app-icon name="check-circle" size="w-4 h-4" />
</div>
<div>
<span class="text-[11px] font-medium text-gray-500 dark:text-slate-400 block">
Fabricantes Ativos
</span>
<span class="text-sm font-bold text-gray-900 dark:text-slate-100">
{{ activeCount() }} marcas ativas
</span>
</div>
</div>
</div>
<div
class="bg-white dark:bg-slate-800 rounded-xl p-3.5 border border-gray-200/80 dark:border-slate-700/80 flex items-center justify-between shadow-2xs"
>
<div class="flex items-center gap-3">
<div
class="w-8 h-8 rounded-lg bg-blue-100 dark:bg-[#5A8DEE]/20 text-[#5A8DEE] flex items-center justify-center"
>
<app-icon name="globe" size="w-4 h-4" />
</div>
<div>
<span class="text-[11px] font-medium text-gray-500 dark:text-slate-400 block">
Com Website Oficial
</span>
<span class="text-sm font-bold text-gray-900 dark:text-slate-100">
{{ withWebsiteCount() }} verificados
</span>
</div>
</div>
</div>
</div>
<!-- Filter Toolbar -->
<app-toolbar>
<div start class="flex-1 grid grid-cols-1 sm:grid-cols-2 gap-3 w-full">
<app-search-input
[value]="searchQuery()"
(valueChange)="onSearchChange($event)"
placeholder="Filtrar por nome, slug ou website..."
/>
<app-select
[value]="selectedStatus()"
(valueChange)="onStatusChange($event)"
[options]="[]"
placeholder="Todos os Status"
/>
</div>
<div end class="flex items-center gap-2">
<app-button variant="ghost" size="sm" iconStart="refresh-cw" (btnClick)="resetFilters()">
Limpar
</app-button>
</div>
</app-toolbar>
<!-- Table + Integrated Pagination Container -->
<div class="w-full">
<app-data-table
[columns]="columns"
[data]="allManufacturers()"
[actions]="actions"
[loading]="loading()"
[roundedBottom]="false"
(actionClick)="onActionClick($event)"
/>
<app-pagination [pagination]="pagination()" (paginationChange)="onPaginationChange($event)" />
</div>
<!-- Delete Confirmation Dialog -->
<app-confirm-dialog
[isOpen]="deleteDialogOpen()"
title="Excluir Fabricante do Catálogo"
[message]="'Tem certeza de que deseja remover o fabricante ' + (selectedManufacturerForDelete()?.name || '') + '?'"
type="danger"
confirmText="Excluir Fabricante"
cancelText="Cancelar"
(confirmAction)="executeDelete()"
(cancelAction)="deleteDialogOpen.set(false)"
/>
<!-- Manufacturer Create / Edit / View Drawer Form -->
<app-manufacturer-form
[isOpen]="isFormOpen()"
[mode]="formMode()"
[manufacturer]="selectedManufacturer()"
(closeForm)="closeForm()"
(manufacturerSaved)="onManufacturerSaved()"
/>