Initial commit of LittleShop project (excluding large archives)

- BTCPay Server integration
- TeleBot Telegram bot
- Review system
- Admin area
- Docker deployment configuration

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-09-17 15:07:38 +01:00
parent bcca00ab39
commit e1b377a042
140 changed files with 32166 additions and 21089 deletions

View File

@@ -0,0 +1,149 @@
@model LittleShop.DTOs.ReviewDto
@{
ViewData["Title"] = "Review Details";
}
<div class="container-fluid">
<div class="row">
<div class="col-12">
<div class="d-flex justify-content-between align-items-center mb-3">
<h2><i class="fas fa-star me-2"></i>Review Details</h2>
<a asp-action="Index" class="btn btn-secondary">
<i class="fas fa-arrow-left me-1"></i>Back to Reviews
</a>
</div>
@if (TempData["SuccessMessage"] != null)
{
<div class="alert alert-success alert-dismissible fade show" role="alert">
@TempData["SuccessMessage"]
<button type="button" class="btn-close" data-bs-dismiss="alert"></button>
</div>
}
<div class="card shadow">
<div class="card-header bg-primary text-white">
<h5 class="mb-0">
<i class="fas fa-comment me-2"></i>Customer Review
@if (Model.IsVerifiedPurchase)
{
<span class="badge bg-success ms-2">
<i class="fas fa-check-circle"></i> Verified Purchase
</span>
}
@if (Model.IsApproved)
{
<span class="badge bg-info ms-2">
<i class="fas fa-check"></i> Approved
</span>
}
else
{
<span class="badge bg-warning ms-2">
<i class="fas fa-clock"></i> Pending Approval
</span>
}
</h5>
</div>
<div class="card-body">
<div class="row">
<div class="col-md-6">
<h6><i class="fas fa-box me-2"></i>Product Information</h6>
<p><strong>Product:</strong> @Model.ProductName</p>
<p><strong>Product ID:</strong> <code>@Model.ProductId</code></p>
</div>
<div class="col-md-6">
<h6><i class="fas fa-user me-2"></i>Customer Information</h6>
<p><strong>Customer:</strong> @Model.CustomerDisplayName</p>
<p><strong>Customer ID:</strong> <code>@Model.CustomerId</code></p>
<p><strong>Order ID:</strong> <code>@Model.OrderId</code></p>
</div>
</div>
<hr>
<div class="row">
<div class="col-md-12">
<h6><i class="fas fa-star me-2"></i>Review Details</h6>
<div class="mb-3">
<label class="form-label"><strong>Rating:</strong></label>
<div class="d-flex align-items-center">
@for (int i = 1; i <= 5; i++)
{
<i class="fas fa-star @(i <= Model.Rating ? "text-warning" : "text-muted") me-1"></i>
}
<span class="ms-2 h5 mb-0">@Model.Rating out of 5 stars</span>
</div>
</div>
@if (!string.IsNullOrEmpty(Model.Title))
{
<div class="mb-3">
<label class="form-label"><strong>Title:</strong></label>
<p class="form-control-plaintext">@Model.Title</p>
</div>
}
@if (!string.IsNullOrEmpty(Model.Comment))
{
<div class="mb-3">
<label class="form-label"><strong>Comment:</strong></label>
<div class="card">
<div class="card-body">
<p class="mb-0">@Model.Comment</p>
</div>
</div>
</div>
}
</div>
</div>
<hr>
<div class="row">
<div class="col-md-6">
<h6><i class="fas fa-info-circle me-2"></i>Review Metadata</h6>
<p><strong>Created:</strong> @Model.CreatedAt.ToString("MMM dd, yyyy 'at' h:mm tt")</p>
<p><strong>Updated:</strong> @Model.UpdatedAt.ToString("MMM dd, yyyy 'at' h:mm tt")</p>
@if (Model.IsApproved && Model.ApprovedAt.HasValue)
{
<p><strong>Approved:</strong> @Model.ApprovedAt.Value.ToString("MMM dd, yyyy 'at' h:mm tt")</p>
@if (!string.IsNullOrEmpty(Model.ApprovedByUsername))
{
<p><strong>Approved By:</strong> @Model.ApprovedByUsername</p>
}
}
</div>
<div class="col-md-6">
<h6><i class="fas fa-cogs me-2"></i>Actions</h6>
<div class="d-grid gap-2">
@if (!Model.IsApproved)
{
<form asp-action="Approve" asp-route-id="@Model.Id" method="post" class="d-inline">
<button type="submit" class="btn btn-success w-100"
onclick="return confirm('Approve this review for public display?')">
<i class="fas fa-check me-2"></i>Approve Review
</button>
</form>
}
<a asp-action="Edit" asp-route-id="@Model.Id" class="btn btn-outline-primary">
<i class="fas fa-edit me-2"></i>Edit Review
</a>
<form asp-action="Delete" asp-route-id="@Model.Id" method="post" class="d-inline">
<button type="submit" class="btn btn-outline-danger w-100"
onclick="return confirm('Are you sure you want to delete this review?')">
<i class="fas fa-trash me-2"></i>Delete Review
</button>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>

View File

@@ -0,0 +1,136 @@
@model IEnumerable<LittleShop.DTOs.ReviewDto>
@{
ViewData["Title"] = "Reviews";
}
<div class="container-fluid">
<div class="row">
<div class="col-12">
<div class="card shadow mb-4">
<div class="card-header py-3 d-flex justify-content-between align-items-center">
<h6 class="m-0 font-weight-bold text-primary">
<i class="fas fa-star me-2"></i>Customer Reviews
</h6>
<span class="badge badge-warning">@Model.Count() Pending Approval</span>
</div>
<div class="card-body">
@if (TempData["SuccessMessage"] != null)
{
<div class="alert alert-success alert-dismissible fade show" role="alert">
@TempData["SuccessMessage"]
<button type="button" class="btn-close" data-bs-dismiss="alert"></button>
</div>
}
@if (TempData["ErrorMessage"] != null)
{
<div class="alert alert-danger alert-dismissible fade show" role="alert">
@TempData["ErrorMessage"]
<button type="button" class="btn-close" data-bs-dismiss="alert"></button>
</div>
}
@if (!Model.Any())
{
<div class="text-center py-4">
<div class="mb-3">
<i class="fas fa-star fa-3x text-muted"></i>
</div>
<h5 class="text-muted">No pending reviews</h5>
<p class="text-muted">New customer reviews will appear here for approval.</p>
</div>
}
else
{
<div class="table-responsive">
<table class="table table-hover">
<thead class="table-light">
<tr>
<th>Product</th>
<th>Customer</th>
<th>Rating</th>
<th>Review</th>
<th>Order ID</th>
<th>Date</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
@foreach (var review in Model.OrderByDescending(r => r.CreatedAt))
{
<tr>
<td>
<strong>@review.ProductName</strong>
</td>
<td>
<span class="text-muted">@review.CustomerDisplayName</span>
@if (review.IsVerifiedPurchase)
{
<i class="fas fa-check-circle text-success ms-1" title="Verified Purchase"></i>
}
</td>
<td>
<div class="d-flex align-items-center">
@for (int i = 1; i <= 5; i++)
{
<i class="fas fa-star @(i <= review.Rating ? "text-warning" : "text-muted")"></i>
}
<span class="ms-2 text-muted">(@review.Rating/5)</span>
</div>
</td>
<td>
@if (!string.IsNullOrEmpty(review.Title))
{
<strong class="d-block">@review.Title</strong>
}
@if (!string.IsNullOrEmpty(review.Comment))
{
<span class="text-muted">
@(review.Comment.Length > 100 ? review.Comment.Substring(0, 100) + "..." : review.Comment)
</span>
}
</td>
<td>
<small class="text-monospace">@review.OrderId.ToString().Substring(0, 8)...</small>
</td>
<td>
<small>@review.CreatedAt.ToString("MMM dd, yyyy")</small>
</td>
<td>
<div class="btn-group" role="group">
<a asp-action="Details" asp-route-id="@review.Id"
class="btn btn-sm btn-outline-primary" title="View Details">
<i class="fas fa-eye"></i>
</a>
@if (!review.IsApproved)
{
<form asp-action="Approve" asp-route-id="@review.Id" method="post" class="d-inline">
<button type="submit" class="btn btn-sm btn-success"
onclick="return confirm('Approve this review?')" title="Approve">
<i class="fas fa-check"></i>
</button>
</form>
}
<a asp-action="Edit" asp-route-id="@review.Id"
class="btn btn-sm btn-outline-secondary" title="Edit">
<i class="fas fa-edit"></i>
</a>
<form asp-action="Delete" asp-route-id="@review.Id" method="post" class="d-inline">
<button type="submit" class="btn btn-sm btn-outline-danger"
onclick="return confirm('Delete this review?')" title="Delete">
<i class="fas fa-trash"></i>
</button>
</form>
</div>
</td>
</tr>
}
</tbody>
</table>
</div>
}
</div>
</div>
</div>
</div>
</div>