+
@@ -395,7 +395,10 @@
@@ -757,10 +760,16 @@
@(Model.OperatingCosts?.AiContextProfile?.Length ?? 0)/2000
-
-
+
+
+
+
+
@@ -2274,6 +2283,32 @@
});
});
+ $('#btnGenerateAiDraft').on('click', function () {
+ const btn = $(this);
+ const existing = $('#aiContextProfile').val().trim();
+ if (existing && !confirm('This will replace your current profile text with a generated draft. Continue?')) return;
+ btn.prop('disabled', true).html(' Generating...');
+ $.ajax({
+ url: '@Url.Action("GenerateAiProfileDraft", "CompanySettings")',
+ type: 'GET',
+ success: function (response) {
+ if (response.success) {
+ $('#aiContextProfile').val(response.draft);
+ $('#aiProfileCharCount').text(response.draft.length);
+ showToast('info', 'Draft generated — review and edit it, then click Save AI Profile.');
+ } else {
+ showToast('error', response.message);
+ }
+ },
+ error: function () {
+ showToast('error', 'An error occurred while generating the draft.');
+ },
+ complete: function () {
+ btn.prop('disabled', false).html(' Generate from my settings');
+ }
+ });
+ });
+
// Quoting Calibration — save
$('#saveBlastProfile').on('click', function () {
var btn = $(this);
diff --git a/src/PowderCoating.Web/Views/SetupWizard/Step3.cshtml b/src/PowderCoating.Web/Views/SetupWizard/Step3.cshtml
index 8c5f467..85a97b9 100644
--- a/src/PowderCoating.Web/Views/SetupWizard/Step3.cshtml
+++ b/src/PowderCoating.Web/Views/SetupWizard/Step3.cshtml
@@ -88,7 +88,10 @@
diff --git a/src/PowderCoating.Web/Views/Shared/_Layout.cshtml b/src/PowderCoating.Web/Views/Shared/_Layout.cshtml
index 7653463..e145e03 100644
--- a/src/PowderCoating.Web/Views/Shared/_Layout.cshtml
+++ b/src/PowderCoating.Web/Views/Shared/_Layout.cshtml
@@ -2089,7 +2089,7 @@
@if (User.Identity?.IsAuthenticated == true)
{
- @await Html.PartialAsync("_AiQuickQuoteWidget")
+ @* @await Html.PartialAsync("_AiQuickQuoteWidget") *@
@await Html.PartialAsync("_AiHelpWidget")
}