4ec55e7290
The HTML entity sweep script had a bug where it wrote empty files for any
view that contained no target Unicode characters, zeroing out 215 view files.
All views restored from the pre-sweep commit (cefdf3e).
Bulk gift certificate feature:
- BulkCreateGiftCertificateDto with Quantity (1-500), Amount, Reason, Expiry, Notes
- GenerateBulkGiftCertificatePdfAsync on IPdfService / PdfService: one Letter page
per cert, reusing the same purple/gold branded ComposeGiftCertificateContent helper
- GiftCertificatesController: BulkCreate GET/POST, BulkResult GET, BulkDownloadPdf POST
- Views: BulkCreate.cshtml (form with live total preview), BulkResult.cshtml (table +
Download All PDF button that POSTs cert IDs to avoid URL length limits)
- gift-certificate-bulk.js: live preview + spinner/disable on submit
- Index.cshtml: Bulk Create button added alongside New Certificate
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
180 lines
11 KiB
Plaintext
180 lines
11 KiB
Plaintext
@model PowderCoating.Application.DTOs.Company.UpdateCompanyDto
|
|
|
|
@{
|
|
ViewData["Title"] = "Edit Company";
|
|
ViewData["PageIcon"] = "bi-building-gear";
|
|
var planConfigs = ((IEnumerable<PowderCoating.Core.Entities.SubscriptionPlanConfig>)ViewBag.PlanConfigs)
|
|
.OrderBy(c => c.SortOrder).ToList();
|
|
}
|
|
|
|
<div class="container">
|
|
<div class="row justify-content-center">
|
|
<div class="col-lg-10">
|
|
<div class="d-flex justify-content-between mb-4">
|
|
<a asp-action="Index" class="btn btn-outline-secondary">
|
|
<i class="bi bi-arrow-left me-1"></i>Back to List
|
|
</a>
|
|
<a asp-controller="SubscriptionManagement" asp-action="Manage" asp-route-id="@Model.Id"
|
|
class="btn btn-outline-info">
|
|
<i class="bi bi-credit-card me-1"></i>Subscription & Features
|
|
</a>
|
|
</div>
|
|
|
|
<div class="card shadow-sm">
|
|
<div class="card-body">
|
|
<form asp-action="Edit" method="post">
|
|
<input type="hidden" asp-for="Id" />
|
|
<partial name="_ValidationSummary" />
|
|
|
|
<h5 class="card-title mb-3 pb-2 border-bottom">Company Information</h5>
|
|
<div class="row g-3 mb-4">
|
|
<div class="col-md-6">
|
|
<label asp-for="CompanyName" class="form-label">Company Name *</label>
|
|
<input asp-for="CompanyName" class="form-control" />
|
|
<span asp-validation-for="CompanyName" class="text-danger"></span>
|
|
</div>
|
|
<div class="col-md-6">
|
|
<label asp-for="CompanyCode" class="form-label">Company Code</label>
|
|
<input asp-for="CompanyCode" class="form-control" maxlength="10" />
|
|
<span asp-validation-for="CompanyCode" class="text-danger"></span>
|
|
</div>
|
|
</div>
|
|
|
|
<h5 class="card-title mb-3 pb-2 border-bottom">Primary Contact</h5>
|
|
<div class="row g-3 mb-4">
|
|
<div class="col-md-6">
|
|
<label asp-for="PrimaryContactName" class="form-label">Contact Name *</label>
|
|
<input asp-for="PrimaryContactName" class="form-control" />
|
|
<span asp-validation-for="PrimaryContactName" class="text-danger"></span>
|
|
</div>
|
|
<div class="col-md-6">
|
|
<label asp-for="PrimaryContactEmail" class="form-label">Contact Email *</label>
|
|
<input asp-for="PrimaryContactEmail" class="form-control" type="email" />
|
|
<span asp-validation-for="PrimaryContactEmail" class="text-danger"></span>
|
|
</div>
|
|
<div class="col-md-6">
|
|
<label asp-for="Phone" class="form-label">Phone</label>
|
|
<input asp-for="Phone" class="form-control" />
|
|
<span asp-validation-for="Phone" class="text-danger"></span>
|
|
</div>
|
|
</div>
|
|
|
|
<h5 class="card-title mb-3 pb-2 border-bottom">Address</h5>
|
|
<div class="row g-3 mb-4">
|
|
<div class="col-12">
|
|
<label asp-for="Address" class="form-label">Street Address</label>
|
|
<input asp-for="Address" class="form-control" />
|
|
<span asp-validation-for="Address" class="text-danger"></span>
|
|
</div>
|
|
<div class="col-md-4">
|
|
<label asp-for="City" class="form-label">City</label>
|
|
<input asp-for="City" class="form-control" />
|
|
<span asp-validation-for="City" class="text-danger"></span>
|
|
</div>
|
|
<div class="col-md-4">
|
|
<label asp-for="State" class="form-label">State</label>
|
|
<input asp-for="State" class="form-control" maxlength="2" />
|
|
<span asp-validation-for="State" class="text-danger"></span>
|
|
</div>
|
|
<div class="col-md-4">
|
|
<label asp-for="ZipCode" class="form-label">Zip Code</label>
|
|
<input asp-for="ZipCode" class="form-control" />
|
|
<span asp-validation-for="ZipCode" class="text-danger"></span>
|
|
</div>
|
|
</div>
|
|
|
|
<h5 class="card-title mb-3 pb-2 border-bottom">Subscription Details</h5>
|
|
<div class="row g-3 mb-4">
|
|
<div class="col-md-4">
|
|
<label asp-for="SubscriptionPlan" class="form-label">Plan</label>
|
|
<select asp-for="SubscriptionPlan" class="form-select">
|
|
@foreach (var plan in planConfigs)
|
|
{
|
|
<option value="@plan.Plan">@plan.DisplayName</option>
|
|
}
|
|
</select>
|
|
<span asp-validation-for="SubscriptionPlan" class="text-danger"></span>
|
|
</div>
|
|
<div class="col-md-4">
|
|
<label asp-for="SubscriptionStartDate" class="form-label">Start Date</label>
|
|
<input asp-for="SubscriptionStartDate" class="form-control" type="date" />
|
|
<span asp-validation-for="SubscriptionStartDate" class="text-danger"></span>
|
|
</div>
|
|
<div class="col-md-4">
|
|
<label asp-for="SubscriptionEndDate" class="form-label">End Date</label>
|
|
<input asp-for="SubscriptionEndDate" class="form-control" type="date" />
|
|
<span asp-validation-for="SubscriptionEndDate" class="text-danger"></span>
|
|
</div>
|
|
<div class="col-md-6">
|
|
<label asp-for="TimeZone" class="form-label">Time Zone</label>
|
|
<select asp-for="TimeZone" class="form-select">
|
|
<option value="America/New_York">Eastern Time (ET)</option>
|
|
<option value="America/Chicago">Central Time (CT)</option>
|
|
<option value="America/Denver">Mountain Time (MT)</option>
|
|
<option value="America/Phoenix">Arizona Time (MT - No DST)</option>
|
|
<option value="America/Los_Angeles">Pacific Time (PT)</option>
|
|
<option value="America/Anchorage">Alaska Time (AKT)</option>
|
|
<option value="Pacific/Honolulu">Hawaii Time (HT)</option>
|
|
</select>
|
|
<span asp-validation-for="TimeZone" class="text-danger"></span>
|
|
</div>
|
|
<div class="col-md-6">
|
|
<div class="form-check form-switch mt-4">
|
|
<input asp-for="IsActive" class="form-check-input" type="checkbox" />
|
|
<label asp-for="IsActive" class="form-check-label">Company Active</label>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<h5 class="card-title mb-3 pb-2 border-bottom">Feature Overrides</h5>
|
|
<p class="text-muted small mb-3">Override plan-level feature access for this company. Leave blank (—) to inherit from the subscription plan.</p>
|
|
<div class="row g-3 mb-4">
|
|
<div class="col-md-6">
|
|
<label class="form-label fw-medium">Online Payments</label>
|
|
<select asp-for="OnlinePaymentsOverride" class="form-select">
|
|
<option value="">— Use plan default —</option>
|
|
<option value="true">Force Enable</option>
|
|
<option value="false">Force Disable</option>
|
|
</select>
|
|
<div class="form-text">Stripe Connect invoice payments. Still requires the company to connect their Stripe account.</div>
|
|
</div>
|
|
<div class="col-md-6">
|
|
<label class="form-label fw-medium">Accounting Module</label>
|
|
<select asp-for="AccountingOverride" class="form-select">
|
|
<option value="">— Use plan default —</option>
|
|
<option value="true">Force Enable</option>
|
|
<option value="false">Force Disable</option>
|
|
</select>
|
|
<div class="form-text">Chart of Accounts, Bills, Expenses, and Accounting Export.</div>
|
|
</div>
|
|
</div>
|
|
|
|
<h5 class="card-title mb-3 pb-2 border-bottom">SMS Override</h5>
|
|
<p class="text-muted small mb-3">Use this to immediately cut off SMS for a company — for example if they are sending abusive messages or have a billing dispute. This overrides the plan entitlement and the company's own opt-in setting.</p>
|
|
<div class="mb-4">
|
|
<div class="form-check form-switch">
|
|
<input asp-for="SmsDisabledByAdmin" class="form-check-input" type="checkbox" role="switch" id="SmsDisabledByAdmin" />
|
|
<label asp-for="SmsDisabledByAdmin" class="form-check-label fw-medium text-danger">Force-disable SMS for this company</label>
|
|
</div>
|
|
<div class="form-text">When checked, no outbound SMS will be sent for this company regardless of their plan or own settings.</div>
|
|
</div>
|
|
|
|
<div class="d-flex gap-2 justify-content-end">
|
|
<a asp-action="Index" class="btn btn-outline-secondary">Cancel</a>
|
|
<button type="submit" class="btn btn-primary">
|
|
<i class="bi bi-save me-1"></i>Save Changes
|
|
</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
@section Scripts {
|
|
@{
|
|
await Html.RenderPartialAsync("_ValidationScriptsPartial");
|
|
}
|
|
}
|