tnx-shared 5.3.57 → 5.3.59

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.
@@ -51431,18 +51431,11 @@ class SplashComponentV1Component extends ComponentBase {
51431
51431
  switchApp(item) {
51432
51432
  this.loaded = false;
51433
51433
  if (item.target == '_blank') {
51434
- if (!item.defaultRedirect) {
51435
- item.defaultRedirect = '';
51436
- }
51437
- // NamNH tip trick cho mot so may bi loi item.url = 'main' -> redirect sai khi click vao cac phan he
51438
- if (item.url == item.defaultRedirect) {
51439
- item.url = '/' + item.code.toLowerCase();
51434
+ let url = item.url;
51435
+ if (item.defaultRedirect) {
51436
+ url += `/${item.defaultRedirect}`;
51440
51437
  }
51441
- let link = `${item.url}/${item.defaultRedirect}`;
51442
- if (!link.startsWith('/') && !link.startsWith('http')) {
51443
- link = '/' + link;
51444
- }
51445
- top.location.href = link;
51438
+ top.location.href = url;
51446
51439
  }
51447
51440
  else {
51448
51441
  if (item.defaultRedirect != '' && !this.rootContext.data.flags.menuTopOpenning) {
@@ -51616,18 +51609,11 @@ class SplashComponentV2Component extends ComponentBase {
51616
51609
  switchApp(item) {
51617
51610
  this.loaded = false;
51618
51611
  if (item.target == '_blank') {
51619
- if (!item.defaultRedirect) {
51620
- item.defaultRedirect = '';
51621
- }
51622
- // NamNH tip trick cho mot so may bi loi item.url = 'main' -> redirect sai khi click vao cac phan he
51623
- if (item.url == item.defaultRedirect) {
51624
- item.url = '/' + item.code.toLowerCase();
51612
+ let url = item.url;
51613
+ if (item.defaultRedirect) {
51614
+ url += `/${item.defaultRedirect}`;
51625
51615
  }
51626
- let link = `${item.url}/${item.defaultRedirect}`;
51627
- if (!link.startsWith('/') && !link.startsWith('http')) {
51628
- link = '/' + link;
51629
- }
51630
- top.location.href = link;
51616
+ top.location.href = url;
51631
51617
  }
51632
51618
  else {
51633
51619
  if (item.defaultRedirect != '' && !this.rootContext.data.flags.menuTopOpenning) {
@@ -51808,18 +51794,11 @@ class SplashComponentV3Component extends ComponentBase {
51808
51794
  switchApp(item) {
51809
51795
  this.loaded = false;
51810
51796
  if (item.target == '_blank') {
51811
- if (!item.defaultRedirect) {
51812
- item.defaultRedirect = '';
51813
- }
51814
- // NamNH tip trick cho mot so may bi loi item.url = 'main' -> redirect sai khi click vao cac phan he
51815
- if (item.url == item.defaultRedirect) {
51816
- item.url = '/' + item.code.toLowerCase();
51797
+ let url = item.url;
51798
+ if (item.defaultRedirect) {
51799
+ url += `/${item.defaultRedirect}`;
51817
51800
  }
51818
- let link = `${item.url}/${item.defaultRedirect}`;
51819
- if (!link.startsWith('/') && !link.startsWith('http')) {
51820
- link = '/' + link;
51821
- }
51822
- top.location.href = link;
51801
+ top.location.href = url;
51823
51802
  }
51824
51803
  else {
51825
51804
  if (item.defaultRedirect != '' && !this.rootContext.data.flags.menuTopOpenning) {
@@ -52000,18 +51979,11 @@ class SplashComponentV4Component extends ComponentBase {
52000
51979
  switchApp(item) {
52001
51980
  this.loaded = false;
52002
51981
  if (item.target == '_blank') {
52003
- if (!item.defaultRedirect) {
52004
- item.defaultRedirect = '';
52005
- }
52006
- // NamNH tip trick cho mot so may bi loi item.url = 'main' -> redirect sai khi click vao cac phan he
52007
- if (item.url == item.defaultRedirect) {
52008
- item.url = '/' + item.code.toLowerCase();
51982
+ let url = item.url;
51983
+ if (item.defaultRedirect) {
51984
+ url += `/${item.defaultRedirect}`;
52009
51985
  }
52010
- let link = `${item.url}/${item.defaultRedirect}`;
52011
- if (!link.startsWith('/') && !link.startsWith('http')) {
52012
- link = '/' + link;
52013
- }
52014
- top.location.href = link;
51986
+ top.location.href = url;
52015
51987
  }
52016
51988
  else {
52017
51989
  if (item.defaultRedirect != '' && !this.rootContext.data.flags.menuTopOpenning) {