ngx-sp-infra 6.5.3 → 6.5.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -9742,17 +9742,17 @@ class SearchInputComponent {
|
|
|
9742
9742
|
const hostname = window.location.host.includes("localhost") ? "siscandesv6.sispro.com.br" : window.location.host;
|
|
9743
9743
|
const baseURL = `https://${hostname}/SisproErpCloud`;
|
|
9744
9744
|
if (item.RotaV6 && item.RotaV6 !== '') {
|
|
9745
|
-
|
|
9746
|
-
|
|
9747
|
-
|
|
9745
|
+
// Normaliza os nomes para remover acentos
|
|
9746
|
+
const nomeProjeto = item.Projeto.normalize('NFD').replace(/[\u0300-\u036f]/g, '');
|
|
9747
|
+
const nomeProjetoRota = item.RotaV6.split('/')[0].normalize('NFD').replace(/[\u0300-\u036f]/g, '');
|
|
9748
|
+
let isCorporativo = nomeProjeto != nomeProjetoRota;
|
|
9748
9749
|
const targetRoute = `${baseURL}/${isCorporativo ? 'Corporativo/' : ''}${item.RotaV6}`;
|
|
9749
|
-
|
|
9750
|
-
window.location.replace(targetRoute);
|
|
9750
|
+
window.location.assign(targetRoute);
|
|
9751
9751
|
}
|
|
9752
9752
|
else {
|
|
9753
9753
|
// Se a RotaOS começar com '/', não adiciona outra '/'
|
|
9754
9754
|
const targetRoute = `${baseURL}${item.RotaOS[0] === '/' ? '' : '/'}${item.RotaOS}`;
|
|
9755
|
-
window.location.
|
|
9755
|
+
window.location.assign(targetRoute);
|
|
9756
9756
|
}
|
|
9757
9757
|
}
|
|
9758
9758
|
highlightList(pesquisa) {
|