ctt-puro 0.66.4 → 0.66.6
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.
package/fesm2022/ctt-puro.mjs
CHANGED
|
@@ -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
|
-
|
|
4026
|
+
// Caso especial: restaurant SIN linkType → no prefijo
|
|
4027
|
+
if (isRestaurant && !linkType) {
|
|
4028
4028
|
return linkValue;
|
|
4029
4029
|
}
|
|
4030
4030
|
let siteUrl = '';
|
|
@@ -5470,7 +5470,8 @@ class MapperService {
|
|
|
5470
5470
|
tag?.name === 'ListRestaurants'))),
|
|
5471
5471
|
buttons: [
|
|
5472
5472
|
Utils.mapButtons(1, restaurant?.buttons?.filter((btn) => btn?.linkType === 'self_link' ||
|
|
5473
|
-
btn?.linkType === 'external_link'
|
|
5473
|
+
btn?.linkType === 'external_link' ||
|
|
5474
|
+
btn?.linkType === 'internal_hotel_link')),
|
|
5474
5475
|
],
|
|
5475
5476
|
...(restaurant?.logos?.length
|
|
5476
5477
|
? {
|
|
@@ -5843,7 +5844,7 @@ class MapperService {
|
|
|
5843
5844
|
?.filter((item) => item.active)
|
|
5844
5845
|
?.map((link) => ({
|
|
5845
5846
|
label: link?.name,
|
|
5846
|
-
url: this.buildUrl(link?.linkValue),
|
|
5847
|
+
url: this.buildUrl(link?.linkValue, link?.linkType),
|
|
5847
5848
|
linkType: 'internal',
|
|
5848
5849
|
icon: link?.icon,
|
|
5849
5850
|
mobile: link?.mobile,
|
|
@@ -5852,7 +5853,7 @@ class MapperService {
|
|
|
5852
5853
|
?.filter((item) => item.active && !item.mobile)
|
|
5853
5854
|
?.map((link) => ({
|
|
5854
5855
|
label: link?.name,
|
|
5855
|
-
url: this.buildUrl(link?.linkValue),
|
|
5856
|
+
url: this.buildUrl(link?.linkValue, link?.linkType),
|
|
5856
5857
|
linkType: 'internal',
|
|
5857
5858
|
icon: link?.icon,
|
|
5858
5859
|
mobile: link?.mobile,
|
|
@@ -5865,7 +5866,7 @@ class MapperService {
|
|
|
5865
5866
|
?.filter((item) => item.active && item.mobile)
|
|
5866
5867
|
?.map((link) => ({
|
|
5867
5868
|
label: link?.name,
|
|
5868
|
-
url: this.buildUrl(link?.linkValue),
|
|
5869
|
+
url: this.buildUrl(link?.linkValue, link?.linkType),
|
|
5869
5870
|
linkType: 'internal',
|
|
5870
5871
|
})),
|
|
5871
5872
|
};
|