Tech Tools section with a code generator, toner report that names the part, toner forecasting, warranty proof of cover, application uploads

This commit is contained in:
2026-08-12 11:51:38 -04:00
parent 568dfbb91c
commit d32513727b
38 changed files with 2667 additions and 779 deletions

View File

@@ -48,6 +48,14 @@ class Warranty(db.Model):
# When a provider lookup last refreshed this record.
lastcheckeddate = db.Column(db.DateTime)
notes = db.Column(db.Text)
# Proof of cover: the purchase invoice, the extended-warranty certificate,
# whatever the vendor sent. A provider lookup answers "is it covered"; this
# answers "prove it" months later, when the email it arrived in is gone.
# Stores the served URL, not the original filename - see the upload route.
proofurl = db.Column(db.String(500))
prooffilename = db.Column(db.String(255))
isactive = db.Column(db.Boolean, nullable=False, server_default='1')
links = db.relationship('WarrantyAsset', back_populates='warranty',
@@ -68,6 +76,8 @@ class Warranty(db.Model):
'enddate': self.enddate.isoformat() if self.enddate else None,
'lastcheckeddate': self.lastcheckeddate.isoformat() + 'Z' if self.lastcheckeddate else None,
'notes': self.notes,
'proofurl': self.proofurl,
'prooffilename': self.prooffilename,
'isactive': bool(self.isactive),
'status': status,
'statuscolor': STATUS_COLORS.get(status, STATUS_COLORS['unknown']),