Add: Replace All option to text import UI

- Add replaceAll checkbox to ImportText view with warning
- Pass replaceAll parameter to import service
- Allows complete product catalog replacement via text import
- Enhanced documentation for unit types and variant collections
This commit is contained in:
2025-10-08 15:36:04 +01:00
parent 86e30d7203
commit 4f591418df
2 changed files with 19 additions and 2 deletions

View File

@@ -252,7 +252,7 @@ public class ProductsController : Controller
[HttpPost]
[ValidateAntiForgeryToken]
public async Task<IActionResult> ImportText(string textContent, IFormFile? file)
public async Task<IActionResult> ImportText(string textContent, IFormFile? file, bool replaceAll = false)
{
string importText = textContent;
@@ -277,7 +277,7 @@ public class ProductsController : Controller
try
{
var result = await _importService.ImportFromHumanTextAsync(importText);
var result = await _importService.ImportFromHumanTextAsync(importText, replaceAll);
ViewData["ImportResult"] = result;
return View("ImportResult", result);
}