feat(asset): add photos, monitor links and deletion

Apply asset_db_002_photos_monitors.sql before rebuilding web.

Restrict soft deletion to the super admin; retain reports and audit.
This commit is contained in:
2026-10-06 02:29:19 +09:00
parent bd0c47e6fc
commit b576dd1a38
19 changed files with 1075 additions and 37 deletions
+4 -1
View File
@@ -21,8 +21,11 @@ for configured in (True, False):
html = env.get_template("asset/index.html").render(
user={"email": "reader@test.local", "name": "Reader"}, nav_items=[], is_admin=False,
page_title="자산관리", page_subtitle="회사 자산을 한곳에서", categories=CATEGORIES, statuses=STATUSES,
csrf_token="browser-test", configured=configured)
csrf_token="browser-test", configured=configured, can_delete=False)
(out / ("asset_render.html" if configured else "asset_unconfigured.html")).write_text(html, encoding="utf-8")
(out / "asset_super.html").write_text(env.get_template("asset/index.html").render(
user={"email":"super@test.local","name":"Super"},nav_items=[],is_admin=True,
categories=CATEGORIES,statuses=STATUSES,csrf_token="browser-test",configured=True,can_delete=True),encoding="utf-8")
sample = ROOT / "KING-DESKTOP.XML"
raw = sample.read_bytes() if sample.exists() else report_xml()
(out / "asset_report.json").write_text(json.dumps(parse_hwinfo(raw), ensure_ascii=False), encoding="utf-8")