61 lines
2.5 KiB
Plaintext
61 lines
2.5 KiB
Plaintext
package templates
|
||
|
||
import "dealroom/internal/model"
|
||
|
||
templ StageBadge(stage string) {
|
||
<span class={ "text-xs px-1.5 py-0.5 rounded-full font-medium",
|
||
templ.KV("bg-gray-700 text-gray-300", stage == "prospect" || stage == "pipeline"),
|
||
templ.KV("bg-blue-500/10 text-blue-400", stage == "internal"),
|
||
templ.KV("bg-teal-500/10 text-teal-400", stage == "initial_marketing" || stage == "initial_review"),
|
||
templ.KV("bg-amber-500/10 text-amber-400", stage == "ioi" || stage == "due_diligence"),
|
||
templ.KV("bg-green-500/10 text-green-400", stage == "loi" || stage == "final_negotiation"),
|
||
templ.KV("bg-emerald-500/20 text-emerald-400", stage == "closed"),
|
||
templ.KV("bg-red-500/10 text-red-400", stage == "dead") }>
|
||
{ model.StageName(stage) }
|
||
</span>
|
||
}
|
||
|
||
templ StatusIcon(status string) {
|
||
if status == "fulfilled" {
|
||
<span class="text-green-400" title="Fulfilled">✅</span>
|
||
} else if status == "partial" {
|
||
<span class="text-amber-400" title="Partial">⚠️</span>
|
||
} else if status == "not_applicable" {
|
||
<span class="text-gray-500" title="N/A">➖</span>
|
||
} else {
|
||
<span class="text-red-400" title="Missing">🔴</span>
|
||
}
|
||
}
|
||
|
||
templ PriorityBadge(priority string) {
|
||
if priority == "high" {
|
||
<span class="text-xs px-1.5 py-0.5 rounded bg-red-500/10 text-red-400 font-medium">High</span>
|
||
} else if priority == "medium" {
|
||
<span class="text-xs px-1.5 py-0.5 rounded bg-amber-500/10 text-amber-400 font-medium">Med</span>
|
||
} else {
|
||
<span class="text-xs px-1.5 py-0.5 rounded bg-gray-700 text-gray-400 font-medium">Low</span>
|
||
}
|
||
}
|
||
|
||
templ FileStatusBadge(status string) {
|
||
if status == "reviewed" {
|
||
<span class="text-xs px-1.5 py-0.5 rounded-full bg-green-500/10 text-green-400 font-medium">Reviewed</span>
|
||
} else if status == "flagged" {
|
||
<span class="text-xs px-1.5 py-0.5 rounded-full bg-amber-500/10 text-amber-400 font-medium">Flagged</span>
|
||
} else if status == "processing" {
|
||
<span class="text-xs px-1.5 py-0.5 rounded-full bg-teal-500/10 text-teal-400 font-medium">Processing</span>
|
||
} else {
|
||
<span class="text-xs px-1.5 py-0.5 rounded-full bg-gray-700 text-gray-400 font-medium">Uploaded</span>
|
||
}
|
||
}
|
||
|
||
templ ContactTypeBadge(contactType string) {
|
||
if contactType == "buyer" {
|
||
<span class="text-xs px-1.5 py-0.5 rounded bg-amber-500/10 text-amber-400 font-medium">Buyer</span>
|
||
} else if contactType == "advisor" {
|
||
<span class="text-xs px-1.5 py-0.5 rounded bg-teal-500/10 text-teal-400 font-medium">Advisor</span>
|
||
} else {
|
||
<span class="text-xs px-1.5 py-0.5 rounded bg-green-500/10 text-green-400 font-medium">Internal</span>
|
||
}
|
||
}
|