Enhance inventory management by updating timestamp type to DateTime, adding stale worklog display on the index page, and improving template styles and scripts for better user experience.

This commit is contained in:
Yaro Kasear 2025-06-16 10:26:30 -05:00
parent 0835248f34
commit 58754c71bd
7 changed files with 73 additions and 16 deletions

View file

@ -6,7 +6,7 @@ if TYPE_CHECKING:
from .work_log import WorkLog
from .rooms import Room
from sqlalchemy import Boolean, ForeignKeyConstraint, ForeignKey, Identity, Index, Integer, PrimaryKeyConstraint, String, Unicode, text
from sqlalchemy import Boolean, ForeignKeyConstraint, ForeignKey, Identity, Index, Integer, PrimaryKeyConstraint, String, Unicode, DateTime, text
from sqlalchemy.dialects.mssql import DATETIME2, MONEY
from sqlalchemy.orm import Mapped, mapped_column, relationship
import datetime
@ -20,7 +20,7 @@ class Inventory(db.Model):
)
id: Mapped[int] = mapped_column("ID", Integer, Identity(start=1, increment=1), primary_key=True)
timestamp: Mapped[datetime.datetime] = mapped_column('Date Entered', DATETIME2)
timestamp: Mapped[datetime.datetime] = mapped_column('Date Entered', DateTime)
condition: Mapped[str] = mapped_column('Working Condition', Unicode(255))
needed: Mapped[str] = mapped_column("Needed", Unicode(255))
type_id: Mapped[int] = mapped_column('Item Type', Integer, ForeignKey("Items.ID"))