75 lines
2.7 KiB
Plaintext
75 lines
2.7 KiB
Plaintext
@page
|
|
@model GanjooRazor.Areas.Admin.Pages.ExpensesModel
|
|
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
|
|
@{
|
|
Layout = "_AdminLayout";
|
|
ViewData["Title"] = "هزینهها";
|
|
ViewData["WideShell"] = true;
|
|
}
|
|
<div class="up-page-header">
|
|
<h1>@ViewData["Title"]</h1>
|
|
</div>
|
|
|
|
@if (!string.IsNullOrEmpty(Model.LastMessage))
|
|
{
|
|
<div class="up-alert up-alert--info">@Model.LastMessage</div>
|
|
}
|
|
|
|
<div class="up-card">
|
|
<h2 class="up-card__title">هزینهٔ جدید</h2>
|
|
<form method="post" class="up-form">
|
|
<div class="up-field">
|
|
<label asp-for="Expense.ExpenseDate">تاریخ</label>
|
|
<input type="date" asp-for="Expense.ExpenseDate" />
|
|
</div>
|
|
<div class="up-field">
|
|
<label asp-for="Expense.Amount">مبلغ</label>
|
|
<input type="number" asp-for="Expense.Amount" />
|
|
</div>
|
|
<div class="up-field">
|
|
<label asp-for="Expense.Unit">واحد</label>
|
|
<input asp-for="Expense.Unit" />
|
|
</div>
|
|
<div class="up-field">
|
|
<label asp-for="Expense.Description">شرح</label>
|
|
<input asp-for="Expense.Description" />
|
|
</div>
|
|
<div class="up-form-actions">
|
|
<button type="submit" class="up-btn up-btn--success">ثبت هزینهٔ جدید</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
|
|
<div class="up-form-actions" style="margin-bottom:var(--up-space-3);">
|
|
<a href="/donate" target="_blank" class="up-btn up-btn--ghost">مشاهدهٔ صفحه</a>
|
|
<a role="button" onclick="rebuildDonationsPage()" class="up-btn up-btn--ghost" title="بازسازی صفحهٔ کمکها">بازسازی صفحهٔ کمکها</a>
|
|
</div>
|
|
@if (!string.IsNullOrEmpty(Model.ShowAccountInfo))
|
|
{
|
|
<p class="up-hint">@Model.ShowAccountInfo</p>
|
|
}
|
|
|
|
@if (Model.Expenses != null)
|
|
{
|
|
<table>
|
|
<tr>
|
|
<th>تاریخ</th>
|
|
<th>مبلغ</th>
|
|
<th>شرح</th>
|
|
<th>#</th>
|
|
</tr>
|
|
@foreach (var expense in Model.Expenses)
|
|
{
|
|
<tr id="tr-@expense.Id">
|
|
<td>@RMuseum.Services.Implementation.LanguageUtils.FormatDate(expense.ExpenseDate)</td>
|
|
<td>@RMuseum.Services.Implementation.LanguageUtils.FormatMoney(expense.Amount)</td>
|
|
<td>@expense.Description</td>
|
|
<td>
|
|
<a role="button" href="/Admin/ExpenseEdit/?id=@expense.Id" class="up-icon-btn" title="ویرایش" aria-label="ویرایش این هزینه">✎</a>
|
|
<a role="button" onclick="deleteItem(@expense.Id, 'هزینه')" class="up-icon-btn" title="حذف" aria-label="حذف این هزینه">🗑</a>
|
|
</td>
|
|
</tr>
|
|
}
|
|
</table>
|
|
}
|