feat: replace SVG icons with Lucide icons in reference data pages
- Updated the "Nueva Sección" button in customs_sections, customs_warehouses, incoterms, invoice_types, material_types, payment_methods, pedimento_codes, pedimento_regimens, sectors, states, transport_modes, and transport_types pages to use the Plus icon from Lucide. - Updated the "Actualizar" button in the same pages to use the RefreshCw icon from Lucide. - Added a new edit dialog component for customs brokers with a comprehensive form for editing broker details, including validation and loading states.
This commit is contained in:
@@ -1,67 +0,0 @@
|
||||
"""Add timestamp fields to classes table
|
||||
|
||||
Revision ID: add_timestamps_classes
|
||||
Revises: 7937209f9718
|
||||
Create Date: 2025-11-16 00:20:00.000000
|
||||
|
||||
"""
|
||||
from typing import Sequence, Union
|
||||
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision: str = 'add_timestamps_classes'
|
||||
down_revision: Union[str, None] = '7937209f9718'
|
||||
branch_labels: Union[str, Sequence[str], None] = None
|
||||
depends_on: Union[str, Sequence[str], None] = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
# Add created_at column with default value
|
||||
op.execute("""
|
||||
ALTER TABLE a76.classes
|
||||
ADD COLUMN created_at TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP NOT NULL
|
||||
""")
|
||||
|
||||
# Add updated_at column with default value
|
||||
op.execute("""
|
||||
ALTER TABLE a76.classes
|
||||
ADD COLUMN updated_at TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP NOT NULL
|
||||
""")
|
||||
|
||||
# Add deleted_at column (nullable for soft deletes)
|
||||
op.execute("""
|
||||
ALTER TABLE a76.classes
|
||||
ADD COLUMN deleted_at TIMESTAMP WITH TIME ZONE
|
||||
""")
|
||||
|
||||
# Create trigger to auto-update updated_at
|
||||
op.execute("""
|
||||
CREATE OR REPLACE FUNCTION a76.update_classes_updated_at()
|
||||
RETURNS TRIGGER AS $$
|
||||
BEGIN
|
||||
NEW.updated_at = CURRENT_TIMESTAMP;
|
||||
RETURN NEW;
|
||||
END;
|
||||
$$ language 'plpgsql';
|
||||
""")
|
||||
|
||||
op.execute("""
|
||||
CREATE TRIGGER update_classes_updated_at
|
||||
BEFORE UPDATE ON a76.classes
|
||||
FOR EACH ROW
|
||||
EXECUTE FUNCTION a76.update_classes_updated_at();
|
||||
""")
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
# Drop trigger and function
|
||||
op.execute("DROP TRIGGER IF EXISTS update_classes_updated_at ON a76.classes")
|
||||
op.execute("DROP FUNCTION IF EXISTS a76.update_classes_updated_at()")
|
||||
|
||||
# Drop columns
|
||||
op.execute("ALTER TABLE a76.classes DROP COLUMN IF EXISTS deleted_at")
|
||||
op.execute("ALTER TABLE a76.classes DROP COLUMN IF EXISTS updated_at")
|
||||
op.execute("ALTER TABLE a76.classes DROP COLUMN IF EXISTS created_at")
|
||||
Reference in New Issue
Block a user