ctt-puro 0.66.4 → 0.66.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.
@@ -4019,12 +4019,12 @@ class MapperService {
4019
4019
  return false;
4020
4020
  }
4021
4021
  }
4022
- buildUrl(linkValue) {
4022
+ buildUrl(linkValue, linkType) {
4023
4023
  if (!linkValue)
4024
4024
  return '';
4025
- // Si es restaurante, NO añadir prefijo de site
4026
4025
  const isRestaurant = /restaurante|restaurant/i.test(linkValue);
4027
- if (isRestaurant) {
4026
+ // Caso especial: restaurant SIN linkType → no prefijo
4027
+ if (isRestaurant && !linkType) {
4028
4028
  return linkValue;
4029
4029
  }
4030
4030
  let siteUrl = '';
@@ -5843,7 +5843,7 @@ class MapperService {
5843
5843
  ?.filter((item) => item.active)
5844
5844
  ?.map((link) => ({
5845
5845
  label: link?.name,
5846
- url: this.buildUrl(link?.linkValue),
5846
+ url: this.buildUrl(link?.linkValue, link?.linkType),
5847
5847
  linkType: 'internal',
5848
5848
  icon: link?.icon,
5849
5849
  mobile: link?.mobile,
@@ -5852,7 +5852,7 @@ class MapperService {
5852
5852
  ?.filter((item) => item.active && !item.mobile)
5853
5853
  ?.map((link) => ({
5854
5854
  label: link?.name,
5855
- url: this.buildUrl(link?.linkValue),
5855
+ url: this.buildUrl(link?.linkValue, link?.linkType),
5856
5856
  linkType: 'internal',
5857
5857
  icon: link?.icon,
5858
5858
  mobile: link?.mobile,
@@ -5865,7 +5865,7 @@ class MapperService {
5865
5865
  ?.filter((item) => item.active && item.mobile)
5866
5866
  ?.map((link) => ({
5867
5867
  label: link?.name,
5868
- url: this.buildUrl(link?.linkValue),
5868
+ url: this.buildUrl(link?.linkValue, link?.linkType),
5869
5869
  linkType: 'internal',
5870
5870
  })),
5871
5871
  };