Fix Olist import state after yield update
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 54s
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 54s
This commit is contained in:
@@ -167,7 +167,11 @@ const OlistSync = () => {
|
|||||||
setImportMessage('');
|
setImportMessage('');
|
||||||
try {
|
try {
|
||||||
const result = await importFinalizedProductionOrderCsv(file.name, await file.text());
|
const result = await importFinalizedProductionOrderCsv(file.name, await file.text());
|
||||||
setImportData({ runs: result.runs, recommendations: result.recommendations });
|
setImportData({
|
||||||
|
runs: result.runs,
|
||||||
|
recommendations: result.recommendations,
|
||||||
|
supplierRecommendations: result.supplierRecommendations
|
||||||
|
});
|
||||||
setImportMessage(`${result.imported.toLocaleString('pt-BR')} novas · ${result.updated.toLocaleString('pt-BR')} atualizadas · ${result.skipped.toLocaleString('pt-BR')} ignoradas.`);
|
setImportMessage(`${result.imported.toLocaleString('pt-BR')} novas · ${result.updated.toLocaleString('pt-BR')} atualizadas · ${result.skipped.toLocaleString('pt-BR')} ignoradas.`);
|
||||||
} catch (actionError) {
|
} catch (actionError) {
|
||||||
setError(actionError instanceof Error ? actionError.message : 'Não foi possível importar as OPs finalizadas.');
|
setError(actionError instanceof Error ? actionError.message : 'Não foi possível importar as OPs finalizadas.');
|
||||||
|
|||||||
Reference in New Issue
Block a user