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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user