Show order id in invoice details even if orderUrl is not present

This commit is contained in:
nicolas.dorier 2022-07-07 21:54:45 +09:00
parent d6f13be95f
commit b8d509eb12
No known key found for this signature in database
GPG Key ID: 6618763EF09186FE

View File

@ -140,23 +140,28 @@
<th class="fw-semibold">Invoice Id</th>
<td>@Model.Id</td>
</tr>
@if (!string.IsNullOrEmpty(Model.TypedMetadata.OrderUrl))
@if (!string.IsNullOrEmpty(Model.TypedMetadata.OrderId))
{
<tr>
<th class="fw-semibold">Order Id</th>
<td>
<a href="@Model.TypedMetadata.OrderUrl" rel="noreferrer noopener" target="_blank">
@if (string.IsNullOrEmpty(Model.TypedMetadata.OrderId))
{
<span>View Order</span>
}
else
{
@Model.TypedMetadata.OrderId
}
</a>
@if (!string.IsNullOrEmpty(Model.TypedMetadata.OrderUrl))
{
<a href="@Model.TypedMetadata.OrderUrl" rel="noreferrer noopener" target="_blank">
@if (string.IsNullOrEmpty(Model.TypedMetadata.OrderId))
{
<span>View Order</span>
}
else
{
@Model.TypedMetadata.OrderId
}
</a>
}
else
{
<span>@Model.TypedMetadata.OrderId</span>
}
</td>
</tr>
}