refactor: split admin.css monolith, standardize CSS architecture
- Split admin.css (3228 lines) into 12 focused files: variables, base, forms, buttons, layout, components, tables, skeleton, datepicker, filemanager, pagination, responsive - Extracted shared styles from offers.css and dashboard.css into components.css and forms.css (offers-* → admin-* prefix) - Standardized naming: dash-kpi-* → admin-kpi-*, session-* → dash-session-*, rich-editor → admin-rich-editor - Deleted duplicate offers-tabs (using admin-tabs everywhere) - Deduplicated DatePicker and FileManager CSS (~360 lines removed) - Added 16 utility classes to base.css (font sizes, widths, gaps, margins) - Deleted empty admin.css Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1011,14 +1011,14 @@ export default function OfferDetail() {
|
||||
|
||||
{/* Quotation Form */}
|
||||
<motion.div
|
||||
className={`offers-editor-section${isInvalidated || isLockedByOther ? " offers-readonly" : ""}`}
|
||||
className={`admin-editor-section${isInvalidated || isLockedByOther ? " offers-readonly" : ""}`}
|
||||
initial={{ opacity: 0, y: 12 }}
|
||||
animate={{ opacity: 1, y: 0 }}
|
||||
transition={{ duration: 0.25, delay: 0.06 }}
|
||||
>
|
||||
<h3 className="admin-card-title">Základní údaje</h3>
|
||||
<div className="admin-form">
|
||||
<div className="offers-form-row-3">
|
||||
<div className="admin-form-row admin-form-row-3">
|
||||
<FormField label="Číslo nabídky">
|
||||
<input
|
||||
type="text"
|
||||
@@ -1044,7 +1044,7 @@ export default function OfferDetail() {
|
||||
</FormField>
|
||||
<FormField label="Zákazník" error={errors.customer_id}>
|
||||
{form.customer_id ? (
|
||||
<div className="offers-customer-selected">
|
||||
<div className="admin-customer-selected">
|
||||
<span>{form.customer_name}</span>
|
||||
{!isInvalidated && !isLockedByOther && (
|
||||
<button
|
||||
@@ -1069,7 +1069,7 @@ export default function OfferDetail() {
|
||||
</div>
|
||||
) : (
|
||||
<div
|
||||
className="offers-customer-select"
|
||||
className="admin-customer-select"
|
||||
onClick={(e) => e.stopPropagation()}
|
||||
>
|
||||
<input
|
||||
@@ -1085,16 +1085,16 @@ export default function OfferDetail() {
|
||||
readOnly={isInvalidated || isLockedByOther}
|
||||
/>
|
||||
{showCustomerDropdown && !isInvalidated && (
|
||||
<div className="offers-customer-dropdown">
|
||||
<div className="admin-customer-dropdown">
|
||||
{filteredCustomers.length === 0 ? (
|
||||
<div className="offers-customer-dropdown-empty">
|
||||
<div className="admin-customer-dropdown-empty">
|
||||
Žádní zákazníci
|
||||
</div>
|
||||
) : (
|
||||
filteredCustomers.slice(0, 20).map((c) => (
|
||||
<div
|
||||
key={c.id}
|
||||
className="offers-customer-dropdown-item"
|
||||
className="admin-customer-dropdown-item"
|
||||
onMouseDown={() => selectCustomer(c)}
|
||||
>
|
||||
<div>{c.name}</div>
|
||||
@@ -1189,7 +1189,7 @@ export default function OfferDetail() {
|
||||
</FormField>
|
||||
</div>
|
||||
|
||||
<div className="offers-form-row-3">
|
||||
<div className="admin-form-row admin-form-row-3">
|
||||
<FormField label="Sazba DPH (%)">
|
||||
<div className="flex-row-gap">
|
||||
<select
|
||||
@@ -1332,18 +1332,18 @@ export default function OfferDetail() {
|
||||
</div>
|
||||
|
||||
{/* Totals */}
|
||||
<div className="offers-totals-summary">
|
||||
<div className="offers-totals-row">
|
||||
<div className="admin-totals-summary">
|
||||
<div className="admin-totals-row">
|
||||
<span>Mezisoučet:</span>
|
||||
<span>{formatCurrency(subtotal, form.currency)}</span>
|
||||
</div>
|
||||
{form.apply_vat && (
|
||||
<div className="offers-totals-row">
|
||||
<div className="admin-totals-row">
|
||||
<span>DPH ({form.vat_rate}%):</span>
|
||||
<span>{formatCurrency(vatAmount, form.currency)}</span>
|
||||
</div>
|
||||
)}
|
||||
<div className="offers-totals-row offers-totals-total">
|
||||
<div className="admin-totals-row admin-totals-total">
|
||||
<span>Celkem:</span>
|
||||
<span>{formatCurrency(total, form.currency)}</span>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user