{{define "asset"}} {{template "head" .}} {{template "topbar" .}} {{template "breadcrumbs" .}}

Server Card

Vendor Serial{{.Asset.VendorSerial}}
Vendor{{if .Asset.Vendor}}{{.Asset.Vendor}}{{else}}—{{end}}
Model{{if .Asset.Model}}{{.Asset.Model}}{{else}}—{{end}}
Asset Tag{{if .Asset.MachineTag}}{{.Asset.MachineTag}}{{else}}—{{end}}
Status{{assetStatusText .AssetStatus}}
Customer{{if .Asset.CustomerID}}{{if .CustomerName}}{{.CustomerName}}{{else}}Assigned{{end}}{{else}}Stock{{end}}
Location{{if .Asset.LocationID}}{{if .LocationName}}{{.LocationName}}{{else}}Assigned{{end}}{{else}}—{{end}}
Project{{.ProjectName}}

Current Components

{{if .Components}} {{range .Components}} {{end}}
Status Vendor Serial Vendor Model Lot First Seen
{{componentStatusText (index $.ComponentStatusByID .ID)}} {{.VendorSerial}} {{if .Vendor}}{{.Vendor}}{{else}}—{{end}} {{if .Model}}{{.Model}}{{else}}—{{end}} {{lotCode .LotID $.LotCodes}} {{formatTimePtr .FirstSeenAt}}
{{else}}
No active components.
{{end}}

Movement & Events

{{if .Events}}
{{range .Events}}
{{formatTime .EventTime}}
{{.EventType}}
Asset {{assetLabel .MachineID $.AssetLabelByID}} · Component {{componentLabel .PartID $.ComponentLabelByID}}
Firmware {{if .FirmwareVersion}}{{.FirmwareVersion}}{{else}}—{{end}}
{{end}}
{{else}}
No timeline events.
{{end}}

Linked Tickets

{{if .Tickets}}
{{range .Tickets}}
{{.Title}}
{{.Source}} · {{.ExternalID}} · {{.Status}} · Opened {{formatTimePtr .OpenedAt}}
{{if .URL}}{{end}}
{{end}}
{{else}}
No linked tickets.
{{end}}
{{end}}