@bytebrand/fe-ui-core 4.1.21 → 4.1.22
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/package.json
CHANGED
|
@@ -263,7 +263,9 @@ const getDecoratedLightProps = (
|
|
|
263
263
|
get value() {
|
|
264
264
|
const offerAvailabilityMode = offer.availabilityMode;
|
|
265
265
|
const offerAvailabilityTimestamp = offer.availabilityFrom;
|
|
266
|
+
console.log(`%cqqq offerAvailabilityTimestamp = `, 'font-weight: bold;color: #90ee90', offerAvailabilityTimestamp);
|
|
266
267
|
const humanViewTime = moment.unix(offerAvailabilityTimestamp).format('DD.MM.YYYY');
|
|
268
|
+
console.log(`%cqqq humanViewTime = `, 'font-weight: bold;color: #90ee90', humanViewTime);
|
|
267
269
|
let offerAvailability: string;
|
|
268
270
|
switch (offerAvailabilityMode) {
|
|
269
271
|
case 'selector_availabilityMode_always':
|
|
@@ -278,8 +280,10 @@ const getDecoratedLightProps = (
|
|
|
278
280
|
|
|
279
281
|
if (moment.utc(offerAvailabilityTimestamp, 'X').isBefore()) {
|
|
280
282
|
offerAvailability = t('cbd:selector_availabilityMode_always');
|
|
281
|
-
} else {
|
|
283
|
+
} else if (!!offerAvailabilityTimestamp) {
|
|
282
284
|
offerAvailability = t('vehicleProps:value.fromDate', { date: humanViewTime });
|
|
285
|
+
} else {
|
|
286
|
+
offerAvailability = t('vehicleProps:value.onRequest'); // case when "availabilityFrom" is undefined
|
|
283
287
|
}
|
|
284
288
|
break;
|
|
285
289
|
|