kupos-ui-components-lib 7.0.10 → 8.0.2

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.
@@ -1,4 +1,4 @@
1
1
  import React from "react";
2
2
  import { FilterBarProps } from "./tyoes";
3
- declare const FilterBarDesktop: ({ t, serviceList, setServiceList, allSchedules, showReturnTripModal, filterArrData, isBlankTicket, operatorId, filtersArray, setFiltersArray, metaData, busTerminals, setTypes, colors, icons, translation, isTrain, isPeru, hideOperator, setCoachLoading, setCoachKey, isTurbus, }: FilterBarProps) => React.JSX.Element;
3
+ declare const FilterBarDesktop: ({ t, serviceList, setServiceList, allSchedules, showReturnTripModal, filterArrData, isBlankTicket, operatorId, filtersArray, setFiltersArray, metaData, busTerminals, setTypes, colors, icons, translation, isTrain, isPeru, hideOperator, setCoachLoading, setCoachKey, }: FilterBarProps) => React.JSX.Element;
4
4
  export default FilterBarDesktop;
@@ -1,7 +1,7 @@
1
1
  import React from "react";
2
2
  import commonService from "../../utils/CommonService";
3
3
  import ServiceFilter from "./ServiceFilter";
4
- const FilterBarDesktop = ({ t, serviceList, setServiceList, allSchedules, showReturnTripModal, filterArrData, isBlankTicket, operatorId, filtersArray, setFiltersArray, metaData, busTerminals, setTypes, colors, icons, translation, isTrain, isPeru, hideOperator, setCoachLoading, setCoachKey, isTurbus, }) => {
4
+ const FilterBarDesktop = ({ t, serviceList, setServiceList, allSchedules, showReturnTripModal, filterArrData, isBlankTicket, operatorId, filtersArray, setFiltersArray, metaData, busTerminals, setTypes, colors, icons, translation, isTrain, isPeru, hideOperator, setCoachLoading, setCoachKey, }) => {
5
5
  const filterBy = (filters) => {
6
6
  try {
7
7
  let routes = allSchedules;
@@ -135,6 +135,29 @@ const FilterBarDesktop = ({ t, serviceList, setServiceList, allSchedules, showRe
135
135
  // }
136
136
  }
137
137
  if (isPeru) {
138
+ // if (fil.type == "seat_types") {
139
+ // let activeOptions = fil.options.filter((it) => it.active);
140
+ // filteredRoutes = filteredRoutes.filter((it) => {
141
+ // if (activeOptions && activeOptions.length) {
142
+ // // Check if ANY of the active filter options match ANY seat type
143
+ // for (let f of activeOptions) {
144
+ // if (f.active) {
145
+ // const filterValue = f.value.toLowerCase();
146
+ // // Check if this filter value appears in any seat type label
147
+ // const hasMatchingSeatType = it.seat_types.some(
148
+ // (bt) => bt?.label?.toLowerCase().indexOf(filterValue) > -1
149
+ // );
150
+ // if (hasMatchingSeatType) {
151
+ // return true;
152
+ // }
153
+ // }
154
+ // }
155
+ // return false;
156
+ // } else {
157
+ // return true;
158
+ // }
159
+ // });
160
+ // }
138
161
  if (fil.type === "seat_types") {
139
162
  const activeOptions = fil.options.filter((it) => it.active);
140
163
  filteredRoutes = filteredRoutes.filter((route) => {
@@ -151,22 +174,30 @@ const FilterBarDesktop = ({ t, serviceList, setServiceList, allSchedules, showRe
151
174
  });
152
175
  }
153
176
  }
154
- else if (isTurbus) {
155
- if (fil.type === "seat_types") {
156
- const activeOptions = fil.options.filter((it) => it.active);
157
- filteredRoutes = filteredRoutes.filter((route) => {
158
- var _a;
159
- if (!activeOptions.length)
160
- return true;
161
- const seatLabels = ((_a = route === null || route === void 0 ? void 0 : route.fare_str) === null || _a === void 0 ? void 0 : _a.split(",").map((item) => { var _a; return (_a = item.split(":")[0]) === null || _a === void 0 ? void 0 : _a.trim().toLowerCase(); }).filter(Boolean)) || [];
162
- return activeOptions.some((opt) => {
163
- const filterValue = opt.value.trim().toLowerCase();
164
- return seatLabels.includes(filterValue);
165
- });
166
- });
167
- }
168
- }
169
177
  else {
178
+ // if (fil.type == "seat_types") {
179
+ // let activeOptions = fil.options.filter((it) => it.active);
180
+ // filteredRoutes = filteredRoutes.filter((it) => {
181
+ // if (activeOptions && activeOptions.length) {
182
+ // // Check if ANY of the active filter options match ANY seat type
183
+ // for (let f of activeOptions) {
184
+ // if (f.active) {
185
+ // const filterValue = f.value.toLowerCase();
186
+ // // Check if this filter value appears in any seat type label
187
+ // const hasMatchingSeatType = it.seat_types.some(
188
+ // (bt) => bt?.label?.toLowerCase().indexOf(filterValue) > -1
189
+ // );
190
+ // if (hasMatchingSeatType) {
191
+ // return true;
192
+ // }
193
+ // }
194
+ // }
195
+ // return false;
196
+ // } else {
197
+ // return true;
198
+ // }
199
+ // });
200
+ // }
170
201
  if (fil.type === "seat_types") {
171
202
  const activeOptions = fil.options.filter((it) => it.active);
172
203
  filteredRoutes = filteredRoutes.filter((route) => {
@@ -151,9 +151,7 @@ class ServiceFilter extends React.Component {
151
151
  this.props.t("RESULTS_PAGE." + option.title),
152
152
  React.createElement("img", { src: this.props.icons.downArrow, alt: "downArrow", className: `${isOpen ? "rotate-180" : ""} w-[auto] h-[9px] transition-all duration-300 cursor-pointer` }))),
153
153
  React.createElement("div", { className: ` transition-all duration-300 ease-in-out
154
- ${isOpen
155
- ? "max-h-[500px] opacity-100 translate-y-0"
156
- : "max-h-0 opacity-0 -translate-y-1"}
154
+ ${isOpen ? " opacity-100 translate-y-0" : "max-h-0 opacity-0 -translate-y-1"}
157
155
  ` }, (isOpen ||
158
156
  (!this.props.isTrain &&
159
157
  option.type !== "operator" &&
@@ -35,5 +35,4 @@ export interface FilterBarProps {
35
35
  isPeru?: boolean;
36
36
  setCoachLoading?: any;
37
37
  setCoachKey?: any;
38
- isTurbus?: boolean;
39
38
  }
@@ -177,7 +177,7 @@ const renderSummaryDetailsCard = ({ serviceName, date, source, dest, boardingSta
177
177
  duration,
178
178
  " horas")))))));
179
179
  };
180
- const PaymentSideBarDesktop = ({ serviceNameOnward, serviceNameReturn, metaData, currencySign, dateOnward, dateReturn, sourceOnward, sourceReturn, destinationOnward, destinationReturn, boardingStageOnward, boardingStageReturn, droppingStageOnward, droppingStageReturn, boardingTimeOnward, boardingTimeReturn, droppingTimeOnward, droppingTimeReturn, durationOnward, durationReturn, selectSeatOnward, selectSeatReturn, journeyTypeActive, setJourneyTypeActive, translation, trainTypeOnward, trainTypeReturn, colors, trainType, icons, selectedOnward, selectedReturn, conexionChecked, conexionPassengers, returnConexionFare, conexionFare, loginData, checkWhatsappEligibility, removeDiscountAtomValue, netFare, promoCode, onPromoRemove, isAgency, agencyFee, walletMoney, virtualMoney, virtualLimit, showUsd, netFareInUsd, renderDiscount, discountAmount, walletLabel, creditosLabel, currency, customSideBarwidth, isLinatal, blankTicketValue, isTurbus, muvifyMoney, }) => {
180
+ const PaymentSideBarDesktop = ({ serviceNameOnward, serviceNameReturn, metaData, currencySign, dateOnward, dateReturn, sourceOnward, sourceReturn, destinationOnward, destinationReturn, boardingStageOnward, boardingStageReturn, droppingStageOnward, droppingStageReturn, boardingTimeOnward, boardingTimeReturn, droppingTimeOnward, droppingTimeReturn, durationOnward, durationReturn, selectSeatOnward, selectSeatReturn, journeyTypeActive, setJourneyTypeActive, translation, trainTypeOnward, trainTypeReturn, colors, trainType, icons, selectedOnward, selectedReturn, conexionChecked, conexionPassengers, returnConexionFare, conexionFare, loginData, checkWhatsappEligibility, removeDiscountAtomValue, netFare, promoCode, onPromoRemove, isAgency, agencyFee, walletMoney, virtualMoney, virtualLimit, showUsd, netFareInUsd, renderDiscount, discountAmount, walletLabel, creditosLabel, currency, customSideBarwidth, isLinatal, }) => {
181
181
  // REMOVED AM/PM DUPLICATION AND ADDED 24 HOUR TIME FORMAT IN BOARDING STAGE
182
182
  const depTime = droppingTimeOnward || "";
183
183
  const returnTime = droppingTimeReturn || "";
@@ -356,9 +356,7 @@ const PaymentSideBarDesktop = ({ serviceNameOnward, serviceNameReturn, metaData,
356
356
  selectedOnward[1][key],
357
357
  " "),
358
358
  " x ",
359
- val.is_pet_seat
360
- ? "Asiento Mascota"
361
- : CommonService.capitalize(val.type)
359
+ val.is_pet_seat ? "Asiento Mascota" : val.type
362
360
  // CommonService.capitalize(
363
361
  // CommonService.getSeatName(val.type),
364
362
  // )
@@ -380,9 +378,7 @@ const PaymentSideBarDesktop = ({ serviceNameOnward, serviceNameReturn, metaData,
380
378
  selectedReturn[1][key],
381
379
  " "),
382
380
  " x ",
383
- val.is_pet_seat
384
- ? "Asiento Mascota"
385
- : CommonService.capitalize(val.type)
381
+ val.is_pet_seat ? "Asiento Mascota" : val.type
386
382
  // CommonService.capitalize(
387
383
  // CommonService.getSeatName(val.type)
388
384
  // )
@@ -413,33 +409,13 @@ const PaymentSideBarDesktop = ({ serviceNameOnward, serviceNameReturn, metaData,
413
409
  React.createElement("div", { className: "duration-mouseover font9", style: { lineHeight: "1.3" } },
414
410
  React.createElement("span", null, translation === null || translation === void 0 ? void 0 : translation.whatsappInfoIcon)))), amount: metaData.whatsapp_delivery_charges, className: "font10", customStyle: { color: colors === null || colors === void 0 ? void 0 : colors.whatsappDeliveryChargesColor } })) : null,
415
411
  removeDiscountAtomValue && (React.createElement(PaymentItem, { label: "Cup\u00F3n", amount: CommonService.currency(netFare, currencySign), isNegative: true, currency: "" })),
416
- (blankTicketValue === null || blankTicketValue === void 0 ? void 0 : blankTicketValue.blank_ticket_amount) && selectSeatOnward && isTurbus
417
- ? selectSeatOnward.map((val, key) => {
418
- var _a;
419
- return (React.createElement("div", { key: key, className: "payment-seat-row flex-row font13-33 " },
420
- React.createElement("div", null,
421
- React.createElement("span", null, (_a = selectSeatOnward === null || selectSeatOnward === void 0 ? void 0 : selectSeatOnward.selectedSeatsToBook) === null || _a === void 0 ? void 0 : _a.length),
422
- " x ",
423
- "Vuelta\u00A0en\u00A0blanco:"),
424
- React.createElement("div", { className: "bold-text font13-33" },
425
- "CLP",
426
- " ",
427
- CommonService.currency(blankTicketValue === null || blankTicketValue === void 0 ? void 0 : blankTicketValue.blank_ticket_amount).split(",")[0])));
428
- })
429
- : null,
430
- isTurbus ? (React.createElement("div", { style: { margin: "6px 0" } }, !blankTicketValue || !(blankTicketValue === null || blankTicketValue === void 0 ? void 0 : blankTicketValue.blank_ticket_amount)
431
- ? renderDiscount(discountAmount)
432
- : null)) : (React.createElement("div", { style: { margin: "6px 0" } }, renderDiscount(discountAmount))),
433
- isTurbus && (React.createElement(PaymentItem, { label: "Descuento", amount: CommonService.currency(discountAmount ? discountAmount : 0, currencySign), currency: "CLP", customStyle: { color: colors === null || colors === void 0 ? void 0 : colors.agencyFeePriceColor } })),
412
+ React.createElement("div", { style: { margin: "6px 0" } }, renderDiscount(discountAmount)),
434
413
  React.createElement(PaymentItem, { label: `${translation === null || translation === void 0 ? void 0 : translation.promotionalCode}:`, amount: CommonService.currency((promoCode === null || promoCode === void 0 ? void 0 : promoCode.promoCouponAmount) ? promoCode === null || promoCode === void 0 ? void 0 : promoCode.promoCouponAmount : 0, currencySign), className: "text-[13.33px]", currency: currency, customStyle: { color: colors === null || colors === void 0 ? void 0 : colors.promoCodePriceColor } }),
435
414
  (promoCode === null || promoCode === void 0 ? void 0 : promoCode.promoCouponAmount) ? (React.createElement("div", { className: "promocode font10 flex items-center gap-[5px]" },
436
415
  React.createElement("div", null, promoCode === null || promoCode === void 0 ? void 0 : promoCode.promoCode),
437
416
  React.createElement("span", { className: "promo-remove", onClick: onPromoRemove },
438
417
  React.createElement("img", { src: icons === null || icons === void 0 ? void 0 : icons.closeIcon, alt: "close", className: "w-[16px] h-[16px]" })))) : null,
439
418
  isAgency && (React.createElement(PaymentItem, { label: translation === null || translation === void 0 ? void 0 : translation.agencyFee, amount: CommonService.currency(agencyFee ? agencyFee : 0, currencySign), currency: "", customStyle: { color: colors === null || colors === void 0 ? void 0 : colors.agencyFeePriceColor } })),
440
- muvifyMoney &&
441
- isTurbus &&
442
- (!blankTicketValue || !(blankTicketValue === null || blankTicketValue === void 0 ? void 0 : blankTicketValue.blank_ticket_amount)) ? (React.createElement(PaymentItem, { label: walletLabel, amount: CommonService.currency(muvifyMoney, currencySign), currency: "" })) : null,
443
419
  walletMoney ? (React.createElement(PaymentItem, { label: walletLabel, amount: CommonService.currency(walletMoney, currencySign), currency: "" })) : null,
444
420
  virtualMoney ? (React.createElement(PaymentItem, { label: React.createElement("span", { className: "secondary-text " }, `${creditosLabel}(${virtualLimit}%)`), amount: CommonService.currency(virtualMoney, currencySign), customStyle: { color: "var(--secondary-color)" }, currency: "" })) : null,
445
421
  showUsd ? (React.createElement(PaymentItem, { label: React.createElement("span", { className: "secondary-text" }, translation === null || translation === void 0 ? void 0 : translation.showUsd), className: "text-[13.33px]", amount: CommonService.currency(isAgency ? netFareInUsd + agencyFee : netFareInUsd, currencySign), currency: "USD", customStyle: { color: "var(--secondary-color)" } })) : null),
@@ -101,9 +101,4 @@ export interface PaymentSideBarProps {
101
101
  customSideBarwidth?: string;
102
102
  isLinatal?: boolean;
103
103
  isTacna?: boolean;
104
- blankTicketValue?: {
105
- blank_ticket_amount?: number;
106
- };
107
- isTurbus?: boolean;
108
- muvifyMoney?: number;
109
104
  }
@@ -373,11 +373,11 @@ function ServiceItemPB({ serviceItem, onBookButtonPress, colors, metaData, child
373
373
  const sortedSeatTypes = getSortedSeatTypes();
374
374
  if (removeDuplicateSeats) {
375
375
  return uniqueSeats.map((val, key) => SEAT_EXCEPTIONS.includes(val.label) ? null : (React.createElement("span", { key: key, className: `flex items-center justify-between text-[13.33px] ${isSoldOut ? "text-[#c0c0c0]" : ""}` }, typeof val.label === "string" || typeof val.label === "number"
376
- ? truncateSeatLabel(val.label)
376
+ ? val.label
377
377
  : null)));
378
378
  }
379
379
  return sortedSeatTypes.map((val, key) => SEAT_EXCEPTIONS.includes(val.label) ? null : (React.createElement("span", { key: key, className: `flex items-center justify-between text-[13.33px] ${isSoldOut ? "text-[#c0c0c0]" : ""}` }, typeof val.label === "string" || typeof val.label === "number"
380
- ? truncateSeatLabel(val.label)
380
+ ? val.label
381
381
  : null)));
382
382
  };
383
383
  const getSeatPrice = () => {
package/dist/styles.css CHANGED
@@ -330,9 +330,6 @@
330
330
  .max-h-\[66vh\] {
331
331
  max-height: 66vh;
332
332
  }
333
- .max-h-\[500px\] {
334
- max-height: 500px;
335
- }
336
333
  .min-h-\[2\.5rem\] {
337
334
  min-height: 2.5rem;
338
335
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kupos-ui-components-lib",
3
- "version": "7.0.10",
3
+ "version": "8.0.2",
4
4
  "description": "A reusable UI components package",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -25,7 +25,6 @@ const FilterBarDesktop = ({
25
25
  hideOperator,
26
26
  setCoachLoading,
27
27
  setCoachKey,
28
- isTurbus,
29
28
  }: FilterBarProps) => {
30
29
  const filterBy = (filters) => {
31
30
  try {
@@ -168,6 +167,30 @@ const FilterBarDesktop = ({
168
167
  // }
169
168
  }
170
169
  if (isPeru) {
170
+ // if (fil.type == "seat_types") {
171
+ // let activeOptions = fil.options.filter((it) => it.active);
172
+
173
+ // filteredRoutes = filteredRoutes.filter((it) => {
174
+ // if (activeOptions && activeOptions.length) {
175
+ // // Check if ANY of the active filter options match ANY seat type
176
+ // for (let f of activeOptions) {
177
+ // if (f.active) {
178
+ // const filterValue = f.value.toLowerCase();
179
+ // // Check if this filter value appears in any seat type label
180
+ // const hasMatchingSeatType = it.seat_types.some(
181
+ // (bt) => bt?.label?.toLowerCase().indexOf(filterValue) > -1
182
+ // );
183
+ // if (hasMatchingSeatType) {
184
+ // return true;
185
+ // }
186
+ // }
187
+ // }
188
+ // return false;
189
+ // } else {
190
+ // return true;
191
+ // }
192
+ // });
193
+ // }
171
194
  if (fil.type === "seat_types") {
172
195
  const activeOptions = fil.options.filter((it) => it.active);
173
196
 
@@ -184,26 +207,31 @@ const FilterBarDesktop = ({
184
207
  });
185
208
  });
186
209
  }
187
- } else if (isTurbus) {
188
- if (fil.type === "seat_types") {
189
- const activeOptions = fil.options.filter((it) => it.active);
190
-
191
- filteredRoutes = filteredRoutes.filter((route) => {
192
- if (!activeOptions.length) return true;
193
-
194
- const seatLabels =
195
- route?.fare_str
196
- ?.split(",")
197
- .map((item) => item.split(":")[0]?.trim().toLowerCase())
198
- .filter(Boolean) || [];
199
-
200
- return activeOptions.some((opt) => {
201
- const filterValue = opt.value.trim().toLowerCase();
202
- return seatLabels.includes(filterValue);
203
- });
204
- });
205
- }
206
210
  } else {
211
+ // if (fil.type == "seat_types") {
212
+ // let activeOptions = fil.options.filter((it) => it.active);
213
+
214
+ // filteredRoutes = filteredRoutes.filter((it) => {
215
+ // if (activeOptions && activeOptions.length) {
216
+ // // Check if ANY of the active filter options match ANY seat type
217
+ // for (let f of activeOptions) {
218
+ // if (f.active) {
219
+ // const filterValue = f.value.toLowerCase();
220
+ // // Check if this filter value appears in any seat type label
221
+ // const hasMatchingSeatType = it.seat_types.some(
222
+ // (bt) => bt?.label?.toLowerCase().indexOf(filterValue) > -1
223
+ // );
224
+ // if (hasMatchingSeatType) {
225
+ // return true;
226
+ // }
227
+ // }
228
+ // }
229
+ // return false;
230
+ // } else {
231
+ // return true;
232
+ // }
233
+ // });
234
+ // }
207
235
  if (fil.type === "seat_types") {
208
236
  const activeOptions = fil.options.filter((it) => it.active);
209
237
 
@@ -96,11 +96,11 @@ class ServiceFilter extends React.Component<
96
96
  (opt: any, optIndex: number) => ({
97
97
  ...opt,
98
98
  originalOptionIndex: optIndex,
99
- })
99
+ }),
100
100
  );
101
101
  let newSeatOrder = [...optionsWithOriginalIndex].sort(
102
102
  (a: any, b: any) =>
103
- SEAT_ORDER.indexOf(a.label) - SEAT_ORDER.indexOf(b.label)
103
+ SEAT_ORDER.indexOf(a.label) - SEAT_ORDER.indexOf(b.label),
104
104
  );
105
105
  newArr.push({ ...val, options: newSeatOrder, originalIndex });
106
106
  } else {
@@ -238,9 +238,7 @@ class ServiceFilter extends React.Component<
238
238
  <div
239
239
  className={` transition-all duration-300 ease-in-out
240
240
  ${
241
- isOpen
242
- ? "max-h-[500px] opacity-100 translate-y-0"
243
- : "max-h-0 opacity-0 -translate-y-1"
241
+ isOpen ? " opacity-100 translate-y-0" : "max-h-0 opacity-0 -translate-y-1"
244
242
  }
245
243
  `}
246
244
  >
@@ -300,8 +298,8 @@ class ServiceFilter extends React.Component<
300
298
  label = val.trText
301
299
  ? val.trText
302
300
  : val.spText
303
- ? val.spText
304
- : val.label;
301
+ ? val.spText
302
+ : val.label;
305
303
  }
306
304
 
307
305
  return (
@@ -311,7 +309,7 @@ class ServiceFilter extends React.Component<
311
309
  onClick(
312
310
  val.originalOptionIndex !== undefined
313
311
  ? val.originalOptionIndex
314
- : i
312
+ : i,
315
313
  )
316
314
  }
317
315
  style={{
@@ -373,9 +371,9 @@ class ServiceFilter extends React.Component<
373
371
  ? this.renderFilterItem(
374
372
  val,
375
373
  (i) => onFilterSelected(val.originalIndex, i),
376
- key
374
+ key,
377
375
  )
378
- : null
376
+ : null,
379
377
  )}
380
378
  </div>
381
379
  </div>
@@ -1,30 +1,30 @@
1
1
  export interface MobileFilterBarProps {
2
- typeOfComponent: string;
3
- variant: string;
4
- tripStep: number;
5
- isOpen: boolean;
6
- setIsOpen: (value: boolean) => void;
7
- icons: {
8
- crossIcon: string;
9
- checkBoxIcon: string;
10
- };
11
- colors: {
12
- kuposButtonColor?: string;
13
- buttonTextColor?: string;
14
- };
15
- busTerminals: any;
16
- myFilters: any;
17
- setMyFilters: any;
18
- serviceListReturn: any;
19
- onwardMaster: any;
20
- setOnwardMaster: any;
21
- returnMaster: any;
22
- setReturnMaster: any;
23
- setActiveSortTab: any;
24
- serviceListOnward: any;
25
- setServiceListReturnFiltered: any;
26
- blankTicket?: boolean;
27
- setServiceListOnwardFiltered: any;
28
- setFiltersSelectedOnward: any;
29
- setFiltersSelectedReturn: any;
2
+ typeOfComponent: string;
3
+ variant: string;
4
+ tripStep: number;
5
+ isOpen: boolean;
6
+ setIsOpen: (value: boolean) => void;
7
+ icons:{
8
+ crossIcon: string;
9
+ checkBoxIcon: string;
10
+ }
11
+ colors: {
12
+ kuposButtonColor?: string;
13
+ buttonTextColor?: string;
14
+ }
15
+ busTerminals: any;
16
+ myFilters: any;
17
+ setMyFilters: any;
18
+ serviceListReturn: any;
19
+ onwardMaster: any;
20
+ setOnwardMaster: any;
21
+ returnMaster: any;
22
+ setReturnMaster: any;
23
+ setActiveSortTab: any;
24
+ serviceListOnward: any;
25
+ setServiceListReturnFiltered: any;
26
+ blankTicket?: boolean
27
+ setServiceListOnwardFiltered: any;
28
+ setFiltersSelectedOnward: any;
29
+ setFiltersSelectedReturn: any;
30
30
  }
@@ -1,37 +1,38 @@
1
1
  export interface FilterBarProps {
2
- variant?: "mobile" | "desktop";
3
- t?: (key: string) => string;
4
- serviceList?: any;
5
- setServiceList?: any;
6
- allSchedules?: any;
7
- showReturnTripModal?: boolean;
8
- filterArrData?: any;
9
- isBlankTicket?: boolean;
10
- operatorId?: any;
11
- filtersArray?: any;
12
- setFiltersArray?: any;
13
- metaData?: any;
14
- busTerminals?: any;
15
- setTypes?: any;
16
- hideOperator?: boolean;
17
- colors: {
18
- selectedColor?: string;
19
- selectedTextColor?: string;
20
- };
21
- icons?: {
22
- iconSunrise?: string;
23
- iconSunriseOrange?: string;
24
- iconMorning?: string;
25
- iconMorningOrange?: string;
26
- iconSunset?: string;
27
- iconSunsetOrange?: string;
28
- iconNight?: string;
29
- iconNightOrange?: string;
30
- };
31
- translation?: { [key: string]: string };
32
- isTrain?: boolean;
33
- isPeru?: boolean;
34
- setCoachLoading?: any;
35
- setCoachKey?: any;
36
- isTurbus?: boolean;
37
- }
2
+ variant?: "mobile" | "desktop";
3
+ t?: (key: string) => string;
4
+ serviceList?: any;
5
+ setServiceList?: any;
6
+ allSchedules?: any;
7
+ showReturnTripModal?: boolean;
8
+ filterArrData?: any;
9
+ isBlankTicket?: boolean;
10
+ operatorId?: any;
11
+ filtersArray?: any;
12
+ setFiltersArray?: any;
13
+ metaData?: any;
14
+ busTerminals?: any;
15
+ setTypes?: any;
16
+ hideOperator?: boolean;
17
+ colors: {
18
+ selectedColor?: string;
19
+ selectedTextColor?: string;
20
+
21
+ };
22
+ icons?: {
23
+ iconSunrise?: string;
24
+ iconSunriseOrange?: string;
25
+ iconMorning?: string;
26
+ iconMorningOrange?: string;
27
+ iconSunset?: string;
28
+ iconSunsetOrange?: string;
29
+ iconNight?: string;
30
+ iconNightOrange?: string;
31
+ };
32
+ translation?: { [key: string]: string };
33
+ isTrain?: boolean;
34
+ isPeru?: boolean;
35
+ setCoachLoading?: any;
36
+ setCoachKey?: any;
37
+
38
+ }
@@ -332,9 +332,6 @@ const PaymentSideBarDesktop: React.FC<PaymentSideBarProps> = ({
332
332
  currency,
333
333
  customSideBarwidth,
334
334
  isLinatal,
335
- blankTicketValue,
336
- isTurbus,
337
- muvifyMoney,
338
335
  }) => {
339
336
  // REMOVED AM/PM DUPLICATION AND ADDED 24 HOUR TIME FORMAT IN BOARDING STAGE
340
337
  const depTime = droppingTimeOnward || "";
@@ -579,9 +576,7 @@ const PaymentSideBarDesktop: React.FC<PaymentSideBarProps> = ({
579
576
  <span>{selectedOnward[1][key]} </span>
580
577
  {" x "}
581
578
  {
582
- val.is_pet_seat
583
- ? "Asiento Mascota"
584
- : CommonService.capitalize(val.type)
579
+ val.is_pet_seat ? "Asiento Mascota" : val.type
585
580
  // CommonService.capitalize(
586
581
  // CommonService.getSeatName(val.type),
587
582
  // )
@@ -615,9 +610,7 @@ const PaymentSideBarDesktop: React.FC<PaymentSideBarProps> = ({
615
610
  <span>{selectedReturn[1][key]} </span>
616
611
  {" x "}
617
612
  {
618
- val.is_pet_seat
619
- ? "Asiento Mascota"
620
- : CommonService.capitalize(val.type)
613
+ val.is_pet_seat ? "Asiento Mascota" : val.type
621
614
  // CommonService.capitalize(
622
615
  // CommonService.getSeatName(val.type)
623
616
  // )
@@ -700,56 +693,9 @@ const PaymentSideBarDesktop: React.FC<PaymentSideBarProps> = ({
700
693
  />
701
694
  )}
702
695
 
703
- {blankTicketValue?.blank_ticket_amount && selectSeatOnward && isTurbus
704
- ? selectSeatOnward.map((val, key) => {
705
- return (
706
- <div
707
- key={key}
708
- className="payment-seat-row flex-row font13-33 "
709
- >
710
- <div>
711
- <span>
712
- {selectSeatOnward?.selectedSeatsToBook?.length}
713
- </span>
714
- {" x "}
715
- Vuelta en blanco:
716
- </div>
717
- <div className="bold-text font13-33">
718
- CLP{" "}
719
- {
720
- CommonService.currency(
721
- blankTicketValue?.blank_ticket_amount
722
- ).split(",")[0]
723
- }
724
- </div>
725
- </div>
726
- );
727
- })
728
- : null}
729
-
730
- {isTurbus ? (
731
- <div style={{ margin: "6px 0" }}>
732
- {!blankTicketValue || !blankTicketValue?.blank_ticket_amount
733
- ? renderDiscount(discountAmount)
734
- : null}
735
- </div>
736
- ) : (
737
- <div style={{ margin: "6px 0" }}>
738
- {renderDiscount(discountAmount)}
739
- </div>
740
- )}
741
-
742
- {isTurbus && (
743
- <PaymentItem
744
- label={"Descuento"}
745
- amount={CommonService.currency(
746
- discountAmount ? discountAmount : 0,
747
- currencySign
748
- )}
749
- currency="CLP"
750
- customStyle={{ color: colors?.agencyFeePriceColor }}
751
- />
752
- )}
696
+ <div style={{ margin: "6px 0" }}>
697
+ {renderDiscount(discountAmount)}
698
+ </div>
753
699
 
754
700
  <PaymentItem
755
701
  label={`${translation?.promotionalCode}:`}
@@ -786,16 +732,6 @@ const PaymentSideBarDesktop: React.FC<PaymentSideBarProps> = ({
786
732
  />
787
733
  )}
788
734
 
789
- {muvifyMoney &&
790
- isTurbus &&
791
- (!blankTicketValue || !blankTicketValue?.blank_ticket_amount) ? (
792
- <PaymentItem
793
- label={walletLabel}
794
- amount={CommonService.currency(muvifyMoney, currencySign)}
795
- currency=""
796
- />
797
- ) : null}
798
-
799
735
  {walletMoney ? (
800
736
  <PaymentItem
801
737
  label={walletLabel}
@@ -100,7 +100,4 @@ export interface PaymentSideBarProps {
100
100
  customSideBarwidth?: string;
101
101
  isLinatal?: boolean;
102
102
  isTacna?: boolean;
103
- blankTicketValue?: { blank_ticket_amount?: number };
104
- isTurbus?: boolean;
105
- muvifyMoney?: number;
106
103
  }
@@ -487,7 +487,7 @@ function ServiceItemPB({
487
487
  }`}
488
488
  >
489
489
  {typeof val.label === "string" || typeof val.label === "number"
490
- ? truncateSeatLabel(val.label)
490
+ ? val.label
491
491
  : null}
492
492
  </span>
493
493
  )
@@ -502,7 +502,7 @@ function ServiceItemPB({
502
502
  }`}
503
503
  >
504
504
  {typeof val.label === "string" || typeof val.label === "number"
505
- ? truncateSeatLabel(val.label)
505
+ ? val.label
506
506
  : null}
507
507
  </span>
508
508
  )