feat: Implement client and provider management dashboard
- Added data table component for displaying clients and providers with infinite scroll functionality. - Created dropdown actions for each client/provider including copy ID, copy RFC, view details, edit, toggle status, and delete. - Implemented dialogs for creating, editing, viewing details, and deleting clients/providers. - Integrated API calls for fetching, creating, editing, deleting, and toggling status of clients/providers. - Enhanced error handling and loading states for better user experience. - Updated server-side logic to handle pagination and company selection for client/provider data retrieval.
This commit is contained in:
40
backend/api/v1/modules/a24/fa/fa_classes/models.py
Normal file
40
backend/api/v1/modules/a24/fa/fa_classes/models.py
Normal file
@@ -0,0 +1,40 @@
|
||||
from decimal import Decimal
|
||||
|
||||
from api.v1.common.base_models import TenantScopedMixin
|
||||
from core.database import Base
|
||||
from sqlalchemy import (
|
||||
Boolean,
|
||||
ForeignKeyConstraint,
|
||||
Integer,
|
||||
Numeric,
|
||||
PrimaryKeyConstraint,
|
||||
String,
|
||||
)
|
||||
from sqlalchemy.orm import Mapped, mapped_column
|
||||
|
||||
|
||||
class QClasses(Base, TenantScopedMixin):
|
||||
__tablename__ = "fa_classes" # QClases
|
||||
__table_args__ = (
|
||||
PrimaryKeyConstraint("id", name="qclases_pk"),
|
||||
ForeignKeyConstraint(
|
||||
["tenant_id"], ["a76.tenants.id"], name="fk_qclasses_tenants"
|
||||
),
|
||||
ForeignKeyConstraint(
|
||||
["company_id"], ["a76.company.id"], name="fk_qclasses_company"
|
||||
),
|
||||
ForeignKeyConstraint(["class_id"], ["classes.id"], name="fk_qclasses_classes"),
|
||||
{"schema": "a24"},
|
||||
)
|
||||
|
||||
id: Mapped[int] = mapped_column(Integer, primary_key=True)
|
||||
class_id: Mapped[int] = mapped_column(Integer, nullable=False)
|
||||
|
||||
import_tariff_code: Mapped[str] = mapped_column(String(10)) # FRACCIONIMPO
|
||||
import_tariff_type: Mapped[str] = mapped_column(String(6)) # TIPOFRACIMPO
|
||||
export_tariff_code: Mapped[str] = mapped_column(String(10)) # FRACCIONEXPO
|
||||
export_tariff_type: Mapped[str] = mapped_column(String(6)) # TIPOFRACEXPO
|
||||
depreciation_rate: Mapped[Decimal] = mapped_column(Numeric(5, 2)) # TASADEPRECIA
|
||||
fda_code: Mapped[str] = mapped_column(String(20)) # FDA
|
||||
eccn_code: Mapped[str] = mapped_column(String(20)) # ECCN
|
||||
class_enabled: Mapped[bool] = mapped_column(Boolean) # HABILITADESHABILITACLASE
|
||||
Reference in New Issue
Block a user