Adding UACDiameterRangemm
This commit is contained in:
1 parent
d8db87c13e
commit
597cf68157
7 files changed
+36
-2
No files matched your search
@@ -1,4 +1,3 @@
|
||||
[ ] Add support for UAC Type column in OData Query as well as attachment point inference
|
||||
[ ] Drop 'id' from UI tables, add 'date added / updated'
|
||||
[ ] Adapter Rings should get two attachment points
|
||||
[ ] Add 'on_website' boolean to augmented part
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
"""imported_parts_uac_diameter_range
|
||||
|
||||
Revision ID: 2b3c4d5e6f7a
|
||||
Revises: 1c2d3e4f5a6b
|
||||
Create Date: 2026-09-21 00:00:00.000000
|
||||
"""
|
||||
|
||||
from collections.abc import Sequence
|
||||
|
||||
import sqlalchemy as sa
|
||||
|
||||
from alembic import op
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision: str = "2b3c4d5e6f7a"
|
||||
down_revision: str | None = "1c2d3e4f5a6b"
|
||||
branch_labels: str | Sequence[str] | None = None
|
||||
depends_on: str | Sequence[str] | None = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
with op.batch_alter_table("imported_parts", schema=None) as batch_op:
|
||||
batch_op.add_column(sa.Column("UACDiameterRangemm", sa.String(), nullable=True))
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
with op.batch_alter_table("imported_parts", schema=None) as batch_op:
|
||||
batch_op.drop_column("UACDiameterRangemm")
|
||||
@@ -13,6 +13,7 @@ _FIELDS = frozenset(
|
||||
"ProductODmm",
|
||||
"ProductODin",
|
||||
"TBXThreadAttribute",
|
||||
"UACDiameterRangemm",
|
||||
}
|
||||
)
|
||||
|
||||
@@ -26,6 +27,7 @@ SORT_COLUMNS = {
|
||||
"ProductODmm": ImportedPart.ProductODmm,
|
||||
"ProductODin": ImportedPart.ProductODin,
|
||||
"TBXThreadAttribute": ImportedPart.TBXThreadAttribute,
|
||||
"UACDiameterRangemm": ImportedPart.UACDiameterRangemm,
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -19,3 +19,4 @@ class ImportedPart(Base):
|
||||
ProductODmm: Mapped[str | None] = mapped_column(nullable=True, default=None)
|
||||
ProductODin: Mapped[str | None] = mapped_column(nullable=True, default=None)
|
||||
TBXThreadAttribute: Mapped[str | None] = mapped_column(nullable=True, default=None)
|
||||
UACDiameterRangemm: Mapped[str | None] = mapped_column(nullable=True, default=None)
|
||||
@@ -12,6 +12,7 @@ class ImportedPartRead(BaseModel):
|
||||
ProductODmm: str | None
|
||||
ProductODin: str | None
|
||||
TBXThreadAttribute: str | None
|
||||
UACDiameterRangemm: str | None
|
||||
|
||||
|
||||
class ImportedPartConfigRead(BaseModel):
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
{{ sort_th("ProductODmm", "OD (mm)", sort_headers) }}
|
||||
{{ sort_th("ProductODin", "OD (in)", sort_headers) }}
|
||||
{{ sort_th("TBXThreadAttribute", "Thread Attribute", sort_headers) }}
|
||||
{{ sort_th("UACDiameterRangemm", "UAC Diameter Range (mm)", sort_headers) }}
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -25,9 +26,10 @@
|
||||
<td>{{ p.ProductODmm or '—' }}</td>
|
||||
<td>{{ p.ProductODin or '—' }}</td>
|
||||
<td>{{ p.TBXThreadAttribute or '—' }}</td>
|
||||
<td>{{ p.UACDiameterRangemm or '—' }}</td>
|
||||
</tr>
|
||||
{% else %}
|
||||
<tr><td colspan="8" class="muted">No imported parts. Use Refresh to sync from OData.</td></tr>
|
||||
<tr><td colspan="9" class="muted">No imported parts. Use Refresh to sync from OData.</td></tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@@ -1233,6 +1233,7 @@ _IMPORTED_PARTS_SORT_COLUMNS = [
|
||||
"ProductODmm",
|
||||
"ProductODin",
|
||||
"TBXThreadAttribute",
|
||||
"UACDiameterRangemm",
|
||||
]
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user