esoftplay-event 0.0.2 → 0.0.3
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/event/additional.tsx +1 -1
- package/event/additional_input.tsx +15 -0
- package/event/additional_new.tsx +565 -0
- package/event/artist.tsx +14 -34
- package/event/artist_detail.tsx +336 -239
- package/event/artist_detail_multi.tsx +266 -157
- package/event/artist_detailv2.tsx +129 -69
- package/event/artistv2.tsx +5 -13
- package/event/button.tsx +2 -2
- package/event/button_order_detail.tsx +20 -8
- package/event/capture.tsx +2 -0
- package/event/checkout.ts +135 -0
- package/event/countdown.tsx +13 -9
- package/event/countdown_base.tsx +88 -48
- package/event/countdown_event.tsx +3 -0
- package/event/countdown_timestamp.tsx +106 -0
- package/event/coupon.tsx +1 -1
- package/event/coupon_generate.tsx +35 -22
- package/event/detail.tsx +9 -15
- package/event/detail2.tsx +63 -61
- package/event/dialog_custom.tsx +67 -0
- package/event/exchange_ticket_list.tsx +23 -14
- package/event/exchange_ticket_result.tsx +1 -1
- package/event/firebase_socket.ts +14 -12
- package/event/htmltext.tsx +40 -28
- package/event/index.tsx +8 -2
- package/event/label_input.tsx +2 -2
- package/event/layout.tsx +312 -0
- package/event/loading_page.tsx +62 -82
- package/event/message.tsx +2 -2
- package/event/order_detail.tsx +408 -477
- package/event/order_detail_addons.tsx +60 -0
- package/event/order_detail_addons_booked.tsx +61 -0
- package/event/order_detail_coupon.tsx +66 -0
- package/event/order_detail_instruction.tsx +96 -0
- package/event/order_detail_payment.tsx +1 -1
- package/event/order_detail_reschedule.tsx +109 -0
- package/event/order_detail_return.tsx +231 -0
- package/event/order_detail_review.tsx +174 -0
- package/event/order_detail_share.tsx +304 -0
- package/event/order_detail_tnc.tsx +76 -0
- package/event/order_detail_upgrade.tsx +140 -90
- package/event/order_detail_upgrade_payment.tsx +120 -38
- package/event/order_detail_visitor.tsx +21 -10
- package/event/order_detail_waiting.tsx +3 -3
- package/event/order_history.tsx +1 -1
- package/event/order_item.tsx +1 -1
- package/event/order_lottery.tsx +1 -1
- package/event/order_reschedule.tsx +29 -16
- package/event/order_share_to.tsx +14 -0
- package/event/order_waiting.tsx +1 -1
- package/event/payment_subscribe.tsx +18 -0
- package/event/point_events.tsx +35 -0
- package/event/point_redemption.tsx +101 -0
- package/event/point_redemption_exchange.tsx +60 -0
- package/event/point_redemption_input.tsx +56 -0
- package/event/point_redemption_success.tsx +50 -0
- package/event/point_summary.tsx +48 -0
- package/event/popup.tsx +4 -4
- package/event/queue.tsx +111 -0
- package/event/queue_pricing.tsx +17 -6
- package/event/review_add.tsx +2 -2
- package/event/scan_item.tsx +1 -1
- package/event/schedule.tsx +33 -30
- package/event/schedule2.tsx +86 -0
- package/event/seat.tsx +135 -374
- package/event/seat_map.tsx +8 -8
- package/event/seat_map_new.tsx +211 -38
- package/event/step.tsx +1 -1
- package/event/test.tsx +8 -8
- package/event/ticket.tsx +326 -0
- package/event/ticket_list.tsx +316 -258
- package/event/ticket_list2.tsx +349 -224
- package/event/ticket_list_item.tsx +61 -0
- package/event/ticket_list_new.tsx +710 -0
- package/event/tms_add_result.tsx +10 -5
- package/event/tms_check_ticket_result.tsx +16 -7
- package/event/tms_dashboard.tsx +87 -12
- package/event/tms_gate.tsx +32 -15
- package/event/tms_home.tsx +178 -92
- package/event/tms_idcard.tsx +43 -26
- package/event/tms_in.tsx +2 -3
- package/event/tms_in_failed.tsx +1 -1
- package/event/tms_in_hall.tsx +4 -1
- package/event/tms_in_hall_failed.tsx +36 -16
- package/event/tms_in_log.tsx +9 -11
- package/event/tms_in_success.tsx +13 -8
- package/event/tms_log.tsx +16 -17
- package/event/tms_out_hall_failed.tsx +1 -1
- package/event/tms_out_temporary.tsx +3 -4
- package/event/token_order.tsx +103 -0
- package/event/token_payment.tsx +79 -0
- package/event/visitor_index.tsx +60 -49
- package/event/visitor_input.tsx +336 -54
- package/event/visitor_inputv2.tsx +173 -88
- package/event/voucher.tsx +1 -1
- package/id.json +76 -4
- package/package.json +1 -1
- package/event/secure_page.debug.tsx +0 -34
- package/event/secure_page.live.tsx +0 -35
package/event/ticket_list.tsx
CHANGED
|
@@ -1,38 +1,34 @@
|
|
|
1
1
|
// withHooks
|
|
2
2
|
import { EventButton } from 'esoftplay/cache/event/button/import';
|
|
3
3
|
import { EventHeader } from 'esoftplay/cache/event/header/import';
|
|
4
|
-
import { EventQueue_pricingProperty } from 'esoftplay/cache/event/queue_pricing/import';
|
|
5
4
|
import { LibCurl } from 'esoftplay/cache/lib/curl/import';
|
|
6
5
|
import { LibDialog } from 'esoftplay/cache/lib/dialog/import';
|
|
7
|
-
import { LibFocus } from 'esoftplay/cache/lib/focus/import';
|
|
8
6
|
import { LibIcon } from 'esoftplay/cache/lib/icon/import';
|
|
9
7
|
import { LibNavigation } from 'esoftplay/cache/lib/navigation/import';
|
|
10
8
|
import { LibObject } from 'esoftplay/cache/lib/object/import';
|
|
11
9
|
import { LibPicture } from 'esoftplay/cache/lib/picture/import';
|
|
12
10
|
import { LibSkeleton } from 'esoftplay/cache/lib/skeleton/import';
|
|
13
11
|
import { LibStyle } from 'esoftplay/cache/lib/style/import';
|
|
14
|
-
import { LibTextstyle } from 'esoftplay/cache/lib/textstyle/import';
|
|
15
12
|
import { LibToastProperty } from 'esoftplay/cache/lib/toast/import';
|
|
16
13
|
import { LibUtils } from 'esoftplay/cache/lib/utils/import';
|
|
17
14
|
import moment from 'esoftplay/moment';
|
|
18
15
|
|
|
19
16
|
import { applyStyle } from 'esoftplay';
|
|
20
17
|
import { EventConfigProperty } from 'esoftplay/cache/event/config/import';
|
|
21
|
-
import { EventCountdownProperty } from 'esoftplay/cache/event/countdown/import';
|
|
22
|
-
import { EventCountdown_base } from 'esoftplay/cache/event/countdown_base/import';
|
|
23
18
|
import { EventCountdown_event } from 'esoftplay/cache/event/countdown_event/import';
|
|
24
|
-
import { EventFirebase_socket, EventFirebase_socketProperty } from 'esoftplay/cache/event/firebase_socket/import';
|
|
25
19
|
import { EventHtmltext } from 'esoftplay/cache/event/htmltext/import';
|
|
20
|
+
import { EventLayout } from 'esoftplay/cache/event/layout/import';
|
|
26
21
|
import { EventLoading_pageProperty } from 'esoftplay/cache/event/loading_page/import';
|
|
27
|
-
import {
|
|
22
|
+
import { EventOrder_itemProperty } from 'esoftplay/cache/event/order_item/import';
|
|
23
|
+
import { EventQueue, EventQueueProperty } from 'esoftplay/cache/event/queue/import';
|
|
24
|
+
import { LibFocus } from 'esoftplay/cache/lib/focus/import';
|
|
28
25
|
import { LibProgress } from 'esoftplay/cache/lib/progress/import';
|
|
29
26
|
import { UseDeeplinkProperty } from 'esoftplay/cache/use/deeplink/import';
|
|
30
|
-
import { UserClass } from 'esoftplay/cache/user/class/import';
|
|
31
27
|
import esp from 'esoftplay/esp';
|
|
32
28
|
import useLazyState from 'esoftplay/lazy';
|
|
33
29
|
import useSafeState from 'esoftplay/state';
|
|
34
30
|
import React, { useEffect, useRef } from 'react';
|
|
35
|
-
import { Pressable, RefreshControl, ScrollView, Text, TouchableOpacity, View } from 'react-native';
|
|
31
|
+
import { ActivityIndicator, Pressable, RefreshControl, ScrollView, Text, TouchableOpacity, View } from 'react-native';
|
|
36
32
|
|
|
37
33
|
|
|
38
34
|
export interface EventTicket_listArgs {
|
|
@@ -127,60 +123,44 @@ export type Result = {
|
|
|
127
123
|
"more_url": string,
|
|
128
124
|
},
|
|
129
125
|
"url_share": string,
|
|
126
|
+
"url_price_config": string,
|
|
127
|
+
"passes"?: any
|
|
130
128
|
}
|
|
131
129
|
|
|
132
130
|
export default function m(props: EventTicket_listProps): any {
|
|
133
|
-
const checkCounter = useRef<number>(0)
|
|
134
|
-
let refTimeout = useRef<any>()
|
|
135
131
|
const [eventConfig] = EventConfigProperty.state().useState()
|
|
136
|
-
const { doneQueue, isInPricingQueueConfig, updateQueueExp } = EventFirebase_socket();
|
|
137
|
-
|
|
138
132
|
const [pendingData] = EventLoading_pageProperty.state().useState()
|
|
139
133
|
|
|
140
|
-
const { url, fee_platform, subscribed, show_fee_percentage }: any = useRef(LibNavigation.getArgsAll(props)).current
|
|
134
|
+
const { url, fee_platform, subscribed, show_fee_percentage, is_multiprice }: any = useRef(LibNavigation.getArgsAll(props)).current
|
|
141
135
|
|
|
142
136
|
const [deeplinkParams] = UseDeeplinkProperty.params.useState()
|
|
143
|
-
const [timer] = EventCountdownProperty.countdownTime.useState()
|
|
144
137
|
|
|
145
138
|
const [unAvailableResult, setUnavailableResult] = useLazyState<any>()
|
|
146
|
-
const [availableResult, setAvailableResult] = useSafeState<Result>()
|
|
139
|
+
const [availableResult, setAvailableResult, getAvailableResult] = useSafeState<Result>()
|
|
147
140
|
const [urlPayment, setUrlPayment] = useLazyState<any>()
|
|
148
141
|
|
|
149
142
|
const [qty, setQty, getQty] = useSafeState<number>(1)
|
|
150
143
|
const [selectedTicket, setSelectedTicket, getSelectedTicket] = useSafeState<any>()
|
|
151
144
|
|
|
152
|
-
const [isPass, setIsPass] = useSafeState(true)
|
|
153
145
|
const [showAll, setShowAll] = useSafeState<any>({});
|
|
154
146
|
|
|
147
|
+
const [loading, setLoading] = useSafeState<boolean>(false)
|
|
148
|
+
|
|
149
|
+
const [tab, setTab] = useSafeState(0)
|
|
150
|
+
const tabs = [
|
|
151
|
+
{ id: 1, title: "Pricing" },
|
|
152
|
+
{ id: 2, title: "Seat Layout" }
|
|
153
|
+
]
|
|
154
|
+
|
|
155
155
|
useEffect(() => {
|
|
156
156
|
EventConfigProperty.curlConfig('v2/config_order_type')
|
|
157
|
-
|
|
158
|
-
if (isInPricingQueueConfig(event_id))
|
|
159
|
-
EventCountdownProperty.countdownTime.set(moment().add(EventFirebase_socketProperty.eventQueueConfig.get(event_id).time, 'seconds').localeFormat('YYYY-MM-DD HH:mm:ss'))
|
|
160
|
-
// loadData()
|
|
161
|
-
getCheckCounter()
|
|
162
|
-
return () => {
|
|
163
|
-
clearTimeout(refTimeout.current)
|
|
164
|
-
EventCountdownProperty.releaseQueue.trigger()
|
|
165
|
-
}
|
|
157
|
+
loadData()
|
|
166
158
|
}, [])
|
|
167
159
|
|
|
168
160
|
function onRefresh() {
|
|
169
161
|
loadData()
|
|
170
162
|
}
|
|
171
163
|
|
|
172
|
-
function getCheckCounter() {
|
|
173
|
-
clearTimeout(refTimeout.current)
|
|
174
|
-
const { pathQueue, event_id } = EventQueue_pricingProperty.state().get()
|
|
175
|
-
if (event_id && isInPricingQueueConfig(event_id)) {
|
|
176
|
-
updateQueueExp(pathQueue, event_id)
|
|
177
|
-
checkCounter.current++
|
|
178
|
-
refTimeout.current = setTimeout(() => {
|
|
179
|
-
getCheckCounter()
|
|
180
|
-
}, 6000);
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
|
|
184
164
|
function loadData() {
|
|
185
165
|
new LibCurl(url, null, (res, msg) => {
|
|
186
166
|
const availablePriceType = LibObject.update(res, (arr: any[]) => arr.filter((x) => x.status != 0))('price_type')
|
|
@@ -198,10 +178,10 @@ export default function m(props: EventTicket_listProps): any {
|
|
|
198
178
|
})
|
|
199
179
|
}
|
|
200
180
|
|
|
201
|
-
if (res.form_allotment == 1) {
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
}
|
|
181
|
+
// if (res.form_allotment == 1) {
|
|
182
|
+
// releaseQueue()
|
|
183
|
+
// LibNavigation.push('event/queue_out', { event_id: res.id, notes: res.form_allotment_text })
|
|
184
|
+
// }
|
|
205
185
|
}, (error) => {
|
|
206
186
|
LibDialog.warningConfirm(esp.lang("event/ticket_list", "warn"), error?.message, "Ok", () => {
|
|
207
187
|
LibNavigation.back()
|
|
@@ -218,13 +198,31 @@ export default function m(props: EventTicket_listProps): any {
|
|
|
218
198
|
}
|
|
219
199
|
|
|
220
200
|
function min(): void {
|
|
221
|
-
|
|
222
|
-
|
|
201
|
+
const currentQty = getQty()
|
|
202
|
+
const selectedTicket = getSelectedTicket()
|
|
203
|
+
|
|
204
|
+
// kalau qty - 1 <= 0 → set qty 0 dan unselect tiket
|
|
205
|
+
if (currentQty - 1 <= 0) {
|
|
206
|
+
setQty(0)
|
|
207
|
+
setSelectedTicket(null) // atau undefined sesuai project
|
|
208
|
+
return
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
// ambil qty_min dengan cara manual
|
|
212
|
+
let qtyMin = 1 // default
|
|
213
|
+
if (selectedTicket && selectedTicket.qty_min) {
|
|
214
|
+
qtyMin = Number(selectedTicket.qty_min)
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
// kurangi qty tapi tetap patuhi qty_min
|
|
218
|
+
if (currentQty <= qtyMin) {
|
|
219
|
+
setQty(qtyMin)
|
|
223
220
|
} else {
|
|
224
|
-
setQty(
|
|
221
|
+
setQty(currentQty - 1)
|
|
225
222
|
}
|
|
226
223
|
}
|
|
227
224
|
|
|
225
|
+
|
|
228
226
|
function setQtyGlobal(value: any) {
|
|
229
227
|
let qty = 1
|
|
230
228
|
if (getSelectedTicket()?.qty_min) {
|
|
@@ -242,15 +240,15 @@ export default function m(props: EventTicket_listProps): any {
|
|
|
242
240
|
setQty(qty)
|
|
243
241
|
}
|
|
244
242
|
|
|
245
|
-
function releaseQueue() {
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
}
|
|
243
|
+
// function releaseQueue() {
|
|
244
|
+
// const { pathQueue, event_id, key } = EventQueue_pricingProperty.state().get()
|
|
245
|
+
// if (event_id && isInPricingQueueConfig(event_id)) {
|
|
246
|
+
// doneQueue(pathQueue, event_id, key, () => { })
|
|
247
|
+
// EventQueue_pricingProperty.state().reset()
|
|
248
|
+
// setIsPass(false)
|
|
249
|
+
// EventCountdownProperty.releaseQueue.trigger()
|
|
250
|
+
// }
|
|
251
|
+
// }
|
|
254
252
|
|
|
255
253
|
let dataPost: any = {
|
|
256
254
|
event_id: availableResult?.id,
|
|
@@ -262,32 +260,47 @@ export default function m(props: EventTicket_listProps): any {
|
|
|
262
260
|
qty: getQty(),
|
|
263
261
|
}
|
|
264
262
|
|
|
265
|
-
function checkAddition(newDataPost: any) {
|
|
263
|
+
async function checkAddition(newDataPost: any) {
|
|
266
264
|
if ((selectedTicket?.hasOwnProperty("has_addition") && selectedTicket?.has_addition == 1)) {
|
|
267
|
-
LibNavigation.navigateForResult('event/additional', { type_ticket: selectedTicket?.type, ondate: selectedTicket?.list?.ondate, event_id: availableResult?.id, qty: getQty(), price_id: selectedTicket?.price_id }, 321)
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
tax: selectedTicket?.tax == null ? 0 : selectedTicket?.tax,
|
|
274
|
-
fee_platform: fee_platform,
|
|
275
|
-
dataBookingEvent: { ...newDataPost, qty: getQty() },
|
|
276
|
-
subscribed: subscribed,
|
|
277
|
-
url_payment: urlPayment,
|
|
278
|
-
show_fee_percentage
|
|
279
|
-
})
|
|
280
|
-
})
|
|
281
|
-
} else {
|
|
265
|
+
const additions = await LibNavigation.navigateForResult('event/additional', { type_ticket: selectedTicket?.type, ondate: selectedTicket?.list?.ondate, event_id: availableResult?.id, qty: getQty(), price_id: selectedTicket?.price_id }, 321)
|
|
266
|
+
if (additions != "") {
|
|
267
|
+
newDataPost.addition = additions
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
curlPriceConfig(getSelectedTicket()?.price_id, (config) => {
|
|
282
271
|
LibNavigation.navigate('payment/ticket', {
|
|
283
272
|
order_type: eventConfig?.order_type?.ticket,
|
|
284
|
-
tax:
|
|
285
|
-
fee_platform:
|
|
273
|
+
tax: config?.tax || selectedTicket?.tax || 0,
|
|
274
|
+
fee_platform: config.hasOwnProperty('fee_platform_amount') ? {
|
|
275
|
+
fee_platform_amount: config?.fee_platform_amount || 0,
|
|
276
|
+
fee_platform_type: config?.fee_platform_type || "NONE"
|
|
277
|
+
} : fee_platform,
|
|
278
|
+
fee_custom: {
|
|
279
|
+
fee_custom_label: config?.fee_custom_label || "Custom Fee",
|
|
280
|
+
fee_custom_amount: config?.fee_custom_amount || 0,
|
|
281
|
+
fee_custom_type: config?.fee_custom_type || "NONE"
|
|
282
|
+
},
|
|
286
283
|
dataBookingEvent: { ...newDataPost, qty: getQty() },
|
|
287
284
|
subscribed: subscribed,
|
|
288
285
|
url_payment: urlPayment,
|
|
289
286
|
show_fee_percentage
|
|
290
287
|
})
|
|
288
|
+
})
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
function curlPriceConfig(price_id: string, onDone: (data: any) => void) {
|
|
292
|
+
setLoading(true)
|
|
293
|
+
if (getAvailableResult()?.url_price_config) {
|
|
294
|
+
new LibCurl(getAvailableResult()?.url_price_config, null, (res, msg) => {
|
|
295
|
+
setLoading(false)
|
|
296
|
+
onDone(res?.[price_id])
|
|
297
|
+
}, (err) => {
|
|
298
|
+
setLoading(false)
|
|
299
|
+
LibToastProperty.show(err?.message)
|
|
300
|
+
})
|
|
301
|
+
} else {
|
|
302
|
+
setLoading(false)
|
|
303
|
+
onDone({})
|
|
291
304
|
}
|
|
292
305
|
}
|
|
293
306
|
|
|
@@ -348,7 +361,7 @@ export default function m(props: EventTicket_listProps): any {
|
|
|
348
361
|
let colorBackground = item.status != 1 ? LibStyle.colorLightGrey : itemT.status != 1 ? LibStyle.colorLightGrey : colorDefault
|
|
349
362
|
let textOpacity = /* item.status == 1 ? 1 : */itemT?.status == 1 ? 1 : 0.3
|
|
350
363
|
|
|
351
|
-
let showCountDown =
|
|
364
|
+
let showCountDown = getAvailableResult()?.countdown_booking == "1" && itemT?.status == 1 && item?.status == 1 && item?.date_start != "0000-00-00 00:00:00" && item?.date_end != "0000-00-00 00:00:00" && moment(item?.date_end).format("YYYY-MM-DD HH:mm:ss") >= moment().format("YYYY-MM-DD HH:mm:ss")
|
|
352
365
|
let dateShowed = item?.price_date == 1 ?
|
|
353
366
|
moment(item?.date_end).format("YYYY-MM-DD HH:mm:ss") > moment(itemT?.ondate).format("YYYY-MM-DD HH:mm:ss") ? moment(itemT?.ondate).add(1, "days").format("YYYY-MM-DD HH:mm:ss") : item?.date_end
|
|
354
367
|
: item?.date_end
|
|
@@ -457,7 +470,7 @@ export default function m(props: EventTicket_listProps): any {
|
|
|
457
470
|
(ticketWithDate || ticketSpecial) && item.price_id == selectedTicket?.price_id && itemT.date_id == selectedTicket?.list?.date_id &&
|
|
458
471
|
<View style={applyStyle({ marginTop: 4, flexDirection: 'row', marginLeft: 8, alignContent: 'center', alignItems: 'center' })}>
|
|
459
472
|
<Pressable hitSlop={{ top: 15, left: 15, right: 15, bottom: 15 }} testID='minus_btn' onPress={() => { min() }}>
|
|
460
|
-
<View style={applyStyle({ padding: 1, borderRadius: 6, backgroundColor: "#ecf0f1", alignContent: 'center', alignItems: 'center' })}>
|
|
473
|
+
<View style={applyStyle({ padding: 1, borderRadius: 6, backgroundColor: "#ecf0f1", alignContent: 'center', alignItems: 'center', justifyContent: 'center' })}>
|
|
461
474
|
<LibIcon name="minus" color="#e74c3c" />
|
|
462
475
|
</View>
|
|
463
476
|
</Pressable>
|
|
@@ -466,7 +479,7 @@ export default function m(props: EventTicket_listProps): any {
|
|
|
466
479
|
<Pressable hitSlop={{ top: 15, left: 15, right: 15, bottom: 15 }} testID='plus_btn' onPress={() => {
|
|
467
480
|
add(itemT.quota, itemT.quota_used)
|
|
468
481
|
}}>
|
|
469
|
-
<View style={applyStyle({ padding: 1, borderRadius: 6, backgroundColor: "#ecf0f1", alignContent: 'center', alignItems: 'center' })}>
|
|
482
|
+
<View style={applyStyle({ padding: 1, borderRadius: 6, backgroundColor: "#ecf0f1", alignContent: 'center', alignItems: 'center', justifyContent: 'center' })}>
|
|
470
483
|
<LibIcon name="plus" color="#16a085" />
|
|
471
484
|
</View>
|
|
472
485
|
</Pressable>
|
|
@@ -500,7 +513,8 @@ export default function m(props: EventTicket_listProps): any {
|
|
|
500
513
|
schedule: itemT.schedule,
|
|
501
514
|
order_type: eventConfig?.order_type?.ticket,
|
|
502
515
|
tax: selectedTicket?.tax == null ? 0 : selectedTicket?.tax,
|
|
503
|
-
dataBookingEvent: dataPost
|
|
516
|
+
dataBookingEvent: dataPost,
|
|
517
|
+
is_multiprice: 0
|
|
504
518
|
})
|
|
505
519
|
}
|
|
506
520
|
|
|
@@ -528,36 +542,44 @@ export default function m(props: EventTicket_listProps): any {
|
|
|
528
542
|
}));
|
|
529
543
|
};
|
|
530
544
|
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
<
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
<View style={{ backgroundColor: '#fff', height: 42, width: 42, borderRadius: 3, marginRight: 10 }} />
|
|
548
|
-
<View style={{ width: '60%' }}>
|
|
549
|
-
<View style={{ backgroundColor: '#fff', height: 20, width: '40%' }} />
|
|
550
|
-
<View style={{ backgroundColor: '#fff', marginTop: 7, height: 14, width: '70%' }} />
|
|
551
|
-
</View>
|
|
545
|
+
if (!availableResult) {
|
|
546
|
+
return (
|
|
547
|
+
<View style={{ flex: 1, backgroundColor: "#fff" }}>
|
|
548
|
+
<EventHeader title={esp.lang("event/ticket_list", "buy_ticket")} subtitle={esp.lang("event/ticket_list", "choose_date")} />
|
|
549
|
+
<LibSkeleton>
|
|
550
|
+
{
|
|
551
|
+
listLength.map((item: any, i: number) => {
|
|
552
|
+
return (
|
|
553
|
+
<View key={i}>
|
|
554
|
+
<View style={{ height: 30, width: '100%', backgroundColor: '#fff' }} />
|
|
555
|
+
<View style={{ padding: 10, width: '100%', flexDirection: 'row', justifyContent: 'space-between', alignContent: 'center', alignItems: 'center' }}>
|
|
556
|
+
<View style={{ flexDirection: 'row' }}>
|
|
557
|
+
<View style={{ backgroundColor: '#fff', height: 42, width: 42, borderRadius: 3, marginRight: 10 }} />
|
|
558
|
+
<View style={{ width: '60%' }}>
|
|
559
|
+
<View style={{ backgroundColor: '#fff', height: 20, width: '40%' }} />
|
|
560
|
+
<View style={{ backgroundColor: '#fff', marginTop: 7, height: 14, width: '70%' }} />
|
|
552
561
|
</View>
|
|
553
|
-
<View style={{ backgroundColor: '#fff', height: 20, width: '10%' }} />
|
|
554
562
|
</View>
|
|
563
|
+
<View style={{ backgroundColor: '#fff', height: 20, width: '10%' }} />
|
|
555
564
|
</View>
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
}
|
|
559
|
-
|
|
560
|
-
|
|
565
|
+
</View>
|
|
566
|
+
)
|
|
567
|
+
})
|
|
568
|
+
}
|
|
569
|
+
</LibSkeleton>
|
|
570
|
+
</View>
|
|
571
|
+
)
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
return (
|
|
575
|
+
<EventQueue
|
|
576
|
+
event_id={Number(availableResult?.id)}>
|
|
577
|
+
<View style={{ flex: 1, backgroundColor: "#fff" }}>
|
|
578
|
+
<LibFocus onFocus={() => {
|
|
579
|
+
onRefresh();
|
|
580
|
+
}} />
|
|
581
|
+
<EventHeader title={esp.lang("event/ticket_list", "buy_ticket")} subtitle={esp.lang("event/ticket_list", "choose_date")} />
|
|
582
|
+
{
|
|
561
583
|
<>
|
|
562
584
|
{/* {
|
|
563
585
|
Object.values(pendingData).filter((item: any) => item?.order_type == "ticket").length > 0 &&
|
|
@@ -571,181 +593,217 @@ export default function m(props: EventTicket_listProps): any {
|
|
|
571
593
|
title={esp.lang("event/ticket_list", "pending", String(Object.values(pendingData).filter((item: any) => item?.order_type == "ticket").length))}
|
|
572
594
|
/>
|
|
573
595
|
} */}
|
|
574
|
-
{
|
|
575
|
-
isInPricingQueueConfig(availableResult?.id) && isPass ?
|
|
576
|
-
<LibEffect deps={[]}>
|
|
577
|
-
<View style={{ backgroundColor: LibStyle.colorGreen, margin: 16, borderRadius: 5, padding: 10, ...LibStyle.elevation(2) }} >
|
|
578
|
-
<LibTextstyle text={esp.lang("event/ticket_list", "select_ticket")} textStyle='caption1' style={{ color: 'white' }} />
|
|
579
|
-
<EventCountdown_base
|
|
580
|
-
onExpired={() => {
|
|
581
|
-
LibNavigation.navigate("event/detail")
|
|
582
|
-
}}
|
|
583
|
-
expired={timer}
|
|
584
|
-
style={{ color: "#fff", fontWeight: 'bold' }} />
|
|
585
|
-
</View>
|
|
586
|
-
</LibEffect>
|
|
587
|
-
: null
|
|
588
|
-
}
|
|
589
|
-
<ScrollView refreshControl={<RefreshControl refreshing={false} onRefresh={onRefresh} />}>
|
|
590
|
-
{
|
|
591
|
-
availableResult?.image_map != "" &&
|
|
592
|
-
<TouchableOpacity onPress={() => {
|
|
593
|
-
LibNavigation.navigate('lib/gallery', { image: availableResult?.image_map })
|
|
594
|
-
}} style={{ marginBottom: 10, marginTop: 20 }}>
|
|
595
|
-
<LibPicture source={{ uri: availableResult?.image_map }} style={applyStyle({ alignSelf: 'center', height: LibStyle.width * 0.5, width: LibStyle.width })} resizeMode="contain" />
|
|
596
|
-
</TouchableOpacity>
|
|
597
|
-
}
|
|
598
|
-
<View style={{ flex: 1 }}>
|
|
599
596
|
|
|
597
|
+
<EventQueueProperty.QueueCountdown
|
|
598
|
+
onExpired={() => {
|
|
599
|
+
LibNavigation.back()
|
|
600
|
+
}}
|
|
601
|
+
/>
|
|
602
|
+
|
|
603
|
+
{
|
|
604
|
+
esp.isDebug("") && availableResult?.price_type.some((x) => x.use_seat == "1") &&
|
|
605
|
+
<View style={{ height: 43, marginBottom: 2, flexDirection: 'row', backgroundColor: '#fff', borderBottomWidth: 1, borderBottomColor: '#f2f2f2' }} >
|
|
600
606
|
{
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
<View style={{
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
607
|
+
tabs.map((item: any, i: number) => (
|
|
608
|
+
<Pressable key={i} onPress={() => {
|
|
609
|
+
setTab(i)
|
|
610
|
+
}}>
|
|
611
|
+
<View style={{ height: 43, width: LibStyle.width / tabs.length, alignItems: 'center', overflow: 'visible', justifyContent: 'center', backgroundColor: '#fff' }}>
|
|
612
|
+
<Text style={{
|
|
613
|
+
width: LibStyle.width / tabs.length, fontSize: tab == i ? 13 : 12,
|
|
614
|
+
fontWeight: tab == i ? "bold" : "normal",
|
|
615
|
+
fontStyle: "normal", letterSpacing: 0, textAlign: "center",
|
|
616
|
+
color: tab == i ? LibStyle.colorPrimary : "#c5c5c5"
|
|
617
|
+
}}>{item.title}</Text>
|
|
618
|
+
<View style={{ marginTop: 2, width: 5, height: 5, borderRadius: 2.5, alignItems: 'center', justifyContent: 'center', backgroundColor: LibStyle.colorRed, opacity: item.total > 0 ? 1 : 0 }} />
|
|
619
|
+
<View style={{ width: (LibStyle.width / tabs.length) - 20, height: 3, backgroundColor: tab == i ? LibStyle.colorPrimary : "#fff", position: 'absolute', bottom: 0 }} />
|
|
620
|
+
</View>
|
|
621
|
+
</Pressable>
|
|
622
|
+
))
|
|
623
|
+
}
|
|
624
|
+
</View>
|
|
625
|
+
}
|
|
626
|
+
{
|
|
627
|
+
tab == 0 ?
|
|
628
|
+
<>
|
|
629
|
+
<ScrollView refreshControl={<RefreshControl refreshing={false} onRefresh={onRefresh} />}>
|
|
630
|
+
{
|
|
631
|
+
availableResult?.image_map != "" &&
|
|
632
|
+
<TouchableOpacity onPress={() => {
|
|
633
|
+
LibNavigation.navigate('lib/gallery', { image: availableResult?.image_map })
|
|
634
|
+
}} style={{ marginBottom: 10, marginTop: 20 }}>
|
|
635
|
+
<LibPicture source={{ uri: availableResult?.image_map }} style={applyStyle({ alignSelf: 'center', height: LibStyle.width * 0.5, width: LibStyle.width })} resizeMode="contain" />
|
|
636
|
+
</TouchableOpacity>
|
|
637
|
+
}
|
|
638
|
+
<View style={{ flex: 1 }}>
|
|
639
|
+
|
|
640
|
+
{
|
|
641
|
+
availableResult?.price_type?.map?.((item: any, i: number) => {
|
|
642
|
+
let textOpacity = item?.status == 1 ? 1 : 0.3
|
|
643
|
+
let filterFullData = availableResult?.price_type?.filter((it: any) => it.status != 0)
|
|
644
|
+
const displayedData = showAll[item.price_id] ? item?.list : item?.list.slice(0, maxDisplay);
|
|
645
|
+
|
|
646
|
+
let selTic = item.price_id == selectedTicket?.price_id
|
|
647
|
+
let ticketWithDate = item.price_date == 1 && item.use_code == 0
|
|
648
|
+
|
|
649
|
+
return (
|
|
650
|
+
<Pressable onPress={() => {
|
|
651
|
+
|
|
652
|
+
}} key={i} style={{ overflow: 'hidden', margin: 15, marginBottom: 5, backgroundColor: '#fff', borderRadius: 5, borderWidth: 1.5, borderColor: selTic ? LibStyle.colorBlue : LibStyle.colorBgGrey }}>
|
|
653
|
+
<View style={{ padding: 10, backgroundColor: '#f1f2f3', borderTopLeftRadius: 5, borderTopRightRadius: 5 }}>
|
|
654
|
+
{
|
|
655
|
+
item?.hasOwnProperty('label') && (item?.label != "" && item?.label != null) &&
|
|
656
|
+
<View style={applyStyle({ flexDirection: 'row' })}>
|
|
657
|
+
<View style={applyStyle({ alignContent: 'center', alignItems: 'center', justifyContent: 'center', borderWidth: 1, backgroundColor: item?.label_color, borderColor: item?.label_color, borderRadius: 3, padding: 2, paddingHorizontal: 5, opacity: 1 })}>
|
|
658
|
+
<Text allowFontScaling={false} style={{ fontSize: 10, fontStyle: "normal", letterSpacing: 0.5, color: EventOrder_itemProperty.textColor(item?.label_color), fontWeight: 'bold' }}>{item?.label}</Text>
|
|
659
|
+
</View>
|
|
660
|
+
</View>
|
|
661
|
+
}
|
|
622
662
|
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
663
|
+
<View style={{ alignContent: 'center', alignItems: 'center', flexDirection: 'row', justifyContent: 'space-between', }}>
|
|
664
|
+
<View style={{ flex: 2 }}>
|
|
665
|
+
<EventHtmltext allowFontScaling={false} style={{ opacity: textOpacity, fontWeight: 'bold' }}>{item.type}
|
|
666
|
+
{
|
|
667
|
+
item.qty_min > 1 &&
|
|
668
|
+
<Text style={{ color: LibStyle.colorRed, fontSize: 10, fontWeight: 'normal' }}> {"(" + esp.lang("event/ticket_list", "min_order") + LibUtils.number(item.qty_min) + ")"}</Text>
|
|
669
|
+
}
|
|
670
|
+
</EventHtmltext>
|
|
671
|
+
{
|
|
672
|
+
availableResult?.countdown_booking == "1" && displayedData?.length == 1 && item?.status == 1 && item?.date_start != "0000-00-00 00:00:00" && item?.date_end != "0000-00-00 00:00:00" && moment(item?.date_end).format("YYYY-MM-DD HH:mm:ss") >= moment().format("YYYY-MM-DD HH:mm:ss") &&
|
|
673
|
+
<EventCountdown_event date={item?.date_end} containerStyle={{ marginVertical: -5 }} />
|
|
674
|
+
}
|
|
675
|
+
{
|
|
676
|
+
deeplinkParams?.type == 'event-voucher' && deeplinkParams?.price_id == item.price_id ?
|
|
677
|
+
<Text allowFontScaling={false} style={{ color: "coral", fontSize: 12, fontWeight: 'bold' }}>{esp.lang("event/ticket_list", "applied_code", deeplinkParams?.code)}</Text>
|
|
678
|
+
: null
|
|
679
|
+
}
|
|
680
|
+
</View>
|
|
681
|
+
{
|
|
682
|
+
item?.status != 1 &&
|
|
683
|
+
<View style={applyStyle({ flex: 1, justifyContent: 'flex-end', flexDirection: 'row' })}>
|
|
684
|
+
<View style={applyStyle({ alignContent: 'center', alignItems: 'center', justifyContent: 'center', borderWidth: 1, backgroundColor: item.status == 0 ? LibStyle.colorRed : "#4cd964", borderColor: item.status == 0 ? LibStyle.colorRed : "#4cd964", borderRadius: 5, padding: 3, opacity: 0.8 })}>
|
|
685
|
+
<Text allowFontScaling={false} style={applyStyle({ fontSize: 10, fontStyle: "normal", letterSpacing: 0, color: /* item.status == 2 ? "#000" : */ "#fff", fontWeight: 'bold' })}>{item.status == 0 ? esp.lang("event/ticket_list", "sold_out") : esp.lang("event/ticket_list", "coming_soon")}</Text>
|
|
686
|
+
</View>
|
|
687
|
+
</View>
|
|
688
|
+
}
|
|
689
|
+
</View>
|
|
626
690
|
{
|
|
627
|
-
item.
|
|
628
|
-
<
|
|
691
|
+
item.info != "" && ticketWithDate &&
|
|
692
|
+
<View style={{ marginTop: 3, alignContent: 'center', alignItems: 'center', flexDirection: 'row', marginRight: 5 }}>
|
|
693
|
+
<Text allowFontScaling={false} style={{ fontSize: 12, color: LibStyle.colorBlue }}>{item.info}</Text>
|
|
694
|
+
</View>
|
|
629
695
|
}
|
|
630
|
-
</
|
|
696
|
+
</View>
|
|
631
697
|
{
|
|
632
|
-
|
|
633
|
-
<EventCountdown_event date={item?.date_end} containerStyle={{ marginVertical: -5 }} />
|
|
698
|
+
displayedData?.map((itemT: any, iT: number) => renderItem(item, itemT, iT))
|
|
634
699
|
}
|
|
700
|
+
|
|
635
701
|
{
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
702
|
+
filterFullData[i].list?.length > 3 &&
|
|
703
|
+
<TouchableOpacity onPress={() => {
|
|
704
|
+
handleShowAll(item.price_id)
|
|
705
|
+
}} style={{ borderTopColor: LibStyle.colorGrey, borderTopWidth: 0.8, flex: 1, padding: 8, flexDirection: 'row', alignContent: 'center', alignItems: 'center', justifyContent: 'center' }}>
|
|
706
|
+
<Text allowFontScaling={false} style={{ marginRight: 5, fontFamily: "Arial", fontSize: 12, fontWeight: "bold", fontStyle: "normal", letterSpacing: 0, color: LibStyle.colorBlue }}>{showAll[item.price_id] ? esp.lang("event/ticket_list", "see_less") : esp.lang("event/ticket_list", "see_more")}</Text>
|
|
707
|
+
<LibIcon name={showAll[item.price_id] ? 'chevron-up-circle-outline' : 'chevron-down-circle-outline'} color={LibStyle.colorBlue} size={18} />
|
|
708
|
+
</TouchableOpacity>
|
|
639
709
|
}
|
|
640
|
-
</View>
|
|
641
|
-
{
|
|
642
|
-
item?.status != 1 &&
|
|
643
|
-
<View style={applyStyle({ flexDirection: 'row' })}>
|
|
644
|
-
<View style={applyStyle({ alignContent: 'center', alignItems: 'center', justifyContent: 'center', borderWidth: 1, backgroundColor: item.status == 0 ? LibStyle.colorRed : "#4cd964", borderColor: item.status == 0 ? LibStyle.colorRed : "#4cd964", borderRadius: 5, padding: 3, opacity: 0.8 })}>
|
|
645
|
-
<Text allowFontScaling={false} style={applyStyle({ fontSize: 10, fontStyle: "normal", letterSpacing: 0, color: /* item.status == 2 ? "#000" : */ "#fff", fontWeight: 'bold' })}>{item.status == 0 ? esp.lang("event/ticket_list", "sold_out") : esp.lang("event/ticket_list", "coming_soon")}</Text>
|
|
646
|
-
</View>
|
|
647
|
-
</View>
|
|
648
|
-
}
|
|
649
|
-
</View>
|
|
650
|
-
{
|
|
651
|
-
item.info != "" && ticketWithDate &&
|
|
652
|
-
<View style={{ marginTop: 3, alignContent: 'center', alignItems: 'center', flexDirection: 'row', marginRight: 5 }}>
|
|
653
|
-
<Text allowFontScaling={false} style={{ fontSize: 12, color: LibStyle.colorBlue }}>{item.info}</Text>
|
|
654
|
-
</View>
|
|
655
|
-
}
|
|
656
|
-
</View>
|
|
657
|
-
{
|
|
658
|
-
displayedData?.map((itemT: any, iT: number) => renderItem(item, itemT, iT))
|
|
659
|
-
}
|
|
660
710
|
|
|
711
|
+
</Pressable>
|
|
712
|
+
)
|
|
713
|
+
})
|
|
714
|
+
}
|
|
715
|
+
|
|
716
|
+
{/* ini view yang dibawah */}
|
|
717
|
+
<View style={{ marginTop: 30 }}>
|
|
661
718
|
{
|
|
662
|
-
|
|
663
|
-
<
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
<Text allowFontScaling={false} style={{ marginRight: 5, fontFamily: "Arial", fontSize: 12, fontWeight: "bold", fontStyle: "normal", letterSpacing: 0, color: LibStyle.colorBlue }}>{showAll[item.price_id] ? esp.lang("event/ticket_list", "see_less") : esp.lang("event/ticket_list", "see_more")}</Text>
|
|
667
|
-
<LibIcon name={showAll[item.price_id] ? 'chevron-up-circle-outline' : 'chevron-down-circle-outline'} color={LibStyle.colorBlue} size={18} />
|
|
668
|
-
</TouchableOpacity>
|
|
719
|
+
unAvailableResult?.price_type?.length > 0 &&
|
|
720
|
+
<View style={{ margin: 15, marginTop: 0, marginBottom: 0, paddingBottom: 10, borderBottomWidth: 1, borderBottomColor: LibStyle.colorGrey }}>
|
|
721
|
+
<Text allowFontScaling={false} style={{ fontWeight: 'bold', fontSize: 16 }}>{esp.lang("event/ticket_list", "ticket_not_available")}</Text>
|
|
722
|
+
</View>
|
|
669
723
|
}
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
<View key={i} style={{ overflow: 'hidden', margin: 15, marginBottom: 5, backgroundColor: '#fff', borderRadius: 10, ...LibStyle.elevation(2), borderWidth: 1, borderColor: selTic ? LibStyle.colorBlue : LibStyle.colorBgGrey }}>
|
|
691
|
-
<View style={{ padding: 10, backgroundColor: '#f1f2f3', borderTopLeftRadius: 10, borderTopRightRadius: 10 }}>
|
|
692
|
-
<View style={{ alignContent: 'center', alignItems: 'center', flexDirection: 'row', justifyContent: 'space-between', }}>
|
|
693
|
-
<View style={{ flex: 3 }}>
|
|
694
|
-
<EventHtmltext allowFontScaling={false} style={{ opacity: textOpacity, fontWeight: 'bold' }}>{item.type}</EventHtmltext>
|
|
695
|
-
</View>
|
|
696
|
-
{
|
|
697
|
-
item?.status != 1 &&
|
|
698
|
-
<View style={applyStyle({ flex: 1, justifyContent: 'flex-end', flexDirection: 'row' })}>
|
|
699
|
-
<View style={applyStyle({ alignContent: 'center', alignItems: 'center', justifyContent: 'center', borderWidth: 1, backgroundColor: item.status == 0 ? LibStyle.colorRed : "#4cd964", borderColor: item.status == 0 ? LibStyle.colorRed : "#4cd964", borderRadius: 5, padding: 3, opacity: 0.8 })}>
|
|
700
|
-
<Text allowFontScaling={false} style={applyStyle({ fontSize: 10, fontStyle: "normal", letterSpacing: 0, color: /* item.status == 2 ? "#000" : */ "#fff", fontWeight: 'bold' })}>{item.status == 0 ? esp.lang("event/ticket_list", "sold_out") : esp.lang("event/ticket_list", "coming_soon")}</Text>
|
|
724
|
+
{
|
|
725
|
+
unAvailableResult?.price_type?.map?.((item: any, i: number) => {
|
|
726
|
+
let selTic = item.price_id == selectedTicket?.price_id
|
|
727
|
+
let textOpacity = item?.status == 1 ? 1 : 0.3
|
|
728
|
+
let ticketWithDate = item.price_date == 1 && item.use_code == 0
|
|
729
|
+
return (
|
|
730
|
+
<View key={i} style={{ overflow: 'hidden', margin: 15, marginBottom: 5, backgroundColor: '#fff', borderRadius: 10, ...LibStyle.elevation(2), borderWidth: 1, borderColor: selTic ? LibStyle.colorBlue : LibStyle.colorBgGrey }}>
|
|
731
|
+
<View style={{ padding: 10, backgroundColor: '#f1f2f3', borderTopLeftRadius: 10, borderTopRightRadius: 10 }}>
|
|
732
|
+
<View style={{ alignContent: 'center', alignItems: 'center', flexDirection: 'row', justifyContent: 'space-between', }}>
|
|
733
|
+
<View style={{ flex: 3 }}>
|
|
734
|
+
<EventHtmltext allowFontScaling={false} style={{ opacity: textOpacity, fontWeight: 'bold' }}>{item.type}</EventHtmltext>
|
|
735
|
+
</View>
|
|
736
|
+
{
|
|
737
|
+
item?.status != 1 &&
|
|
738
|
+
<View style={applyStyle({ flex: 1, justifyContent: 'flex-end', flexDirection: 'row' })}>
|
|
739
|
+
<View style={applyStyle({ alignContent: 'center', alignItems: 'center', justifyContent: 'center', borderWidth: 1, backgroundColor: item.status == 0 ? LibStyle.colorRed : "#4cd964", borderColor: item.status == 0 ? LibStyle.colorRed : "#4cd964", borderRadius: 5, padding: 3, opacity: 0.8 })}>
|
|
740
|
+
<Text allowFontScaling={false} style={applyStyle({ fontSize: 10, fontStyle: "normal", letterSpacing: 0, color: /* item.status == 2 ? "#000" : */ "#fff", fontWeight: 'bold' })}>{item.status == 0 ? esp.lang("event/ticket_list", "sold_out") : esp.lang("event/ticket_list", "coming_soon")}</Text>
|
|
741
|
+
</View>
|
|
742
|
+
</View>
|
|
743
|
+
}
|
|
701
744
|
</View>
|
|
745
|
+
{
|
|
746
|
+
item.info != "" && ticketWithDate &&
|
|
747
|
+
<View style={{ marginTop: 3, alignContent: 'center', alignItems: 'center', flexDirection: 'row', marginRight: 5 }}>
|
|
748
|
+
<Text allowFontScaling={false} style={{ fontSize: 12, color: LibStyle.colorBlue }}>{item.info}</Text>
|
|
749
|
+
</View>
|
|
750
|
+
}
|
|
702
751
|
</View>
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
item.info != "" && ticketWithDate &&
|
|
707
|
-
<View style={{ marginTop: 3, alignContent: 'center', alignItems: 'center', flexDirection: 'row', marginRight: 5 }}>
|
|
708
|
-
<Text allowFontScaling={false} style={{ fontSize: 12, color: LibStyle.colorBlue }}>{item.info}</Text>
|
|
752
|
+
{
|
|
753
|
+
item?.list?.map((itemT: any, iT: number) => renderItem(item, itemT, iT))
|
|
754
|
+
}
|
|
709
755
|
</View>
|
|
710
|
-
|
|
756
|
+
)
|
|
757
|
+
})
|
|
758
|
+
}
|
|
759
|
+
</View>
|
|
760
|
+
</View>
|
|
761
|
+
</ScrollView>
|
|
762
|
+
|
|
763
|
+
<View style={applyStyle({ margin: 10, marginVertical: 5 })}>
|
|
764
|
+
{
|
|
765
|
+
availableResult?.price_type_info != "" &&
|
|
766
|
+
<Text allowFontScaling={false} style={applyStyle({ marginBottom: 10, fontFamily: "Arial", fontSize: 13, fontWeight: "bold", fontStyle: "normal", letterSpacing: 0, color: LibStyle.colorBlue })} >{availableResult && availableResult?.hasOwnProperty("price_type_info") && availableResult?.price_type_info}</Text>
|
|
767
|
+
}
|
|
768
|
+
{
|
|
769
|
+
loading ?
|
|
770
|
+
<View style={{ minWidth: '100%', alignSelf: 'center' }} >
|
|
771
|
+
<View style={{ borderWidth: 1, borderColor: 'rgba(0, 0, 0, 0)', height: 40, borderRadius: 10, backgroundColor: "#e6e6e6", alignItems: 'center', justifyContent: 'center', paddingHorizontal: 9 }} >
|
|
772
|
+
<ActivityIndicator size={"small"} color={LibStyle.colorPrimary} />
|
|
711
773
|
</View>
|
|
712
|
-
{
|
|
713
|
-
item?.list?.map((itemT: any, iT: number) => renderItem(item, itemT, iT))
|
|
714
|
-
}
|
|
715
774
|
</View>
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
775
|
+
:
|
|
776
|
+
<EventButton testID={"next_btn"} label={esp.lang("event/ticket_list", "next")} onPress={() => {
|
|
777
|
+
if (!selectedTicket) {
|
|
778
|
+
LibToastProperty.show(esp.lang("event/ticket_list", "ticket_not_select"), 3000)
|
|
779
|
+
return
|
|
780
|
+
}
|
|
781
|
+
if (selectedTicket?.use_code == 1) {
|
|
782
|
+
checkInvBlock()
|
|
783
|
+
}
|
|
784
|
+
// else if (selectedTicket?.config?.seat_autopick == 1 && getQty() > 1) {
|
|
785
|
+
// chooseBestSeat()
|
|
786
|
+
// }
|
|
787
|
+
else {
|
|
788
|
+
nextStep();
|
|
789
|
+
}
|
|
723
790
|
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
<Text allowFontScaling={false} style={applyStyle({ marginBottom: 10, fontFamily: "Arial", fontSize: 13, fontWeight: "bold", fontStyle: "normal", letterSpacing: 0, color: LibStyle.colorBlue })} >{availableResult && availableResult?.hasOwnProperty("price_type_info") && availableResult?.price_type_info}</Text>
|
|
728
|
-
}
|
|
729
|
-
<EventButton testID={"next_btn"} label={esp.lang("event/ticket_list", "next")} onPress={() => {
|
|
730
|
-
if (!selectedTicket) {
|
|
731
|
-
LibToastProperty.show(esp.lang("event/ticket_list", "ticket_not_select"), 3000)
|
|
732
|
-
return
|
|
733
|
-
}
|
|
734
|
-
if (selectedTicket?.use_code == 1) {
|
|
735
|
-
checkInvBlock()
|
|
736
|
-
}
|
|
737
|
-
// else if (selectedTicket?.config?.seat_autopick == 1 && getQty() > 1) {
|
|
738
|
-
// chooseBestSeat()
|
|
739
|
-
// }
|
|
740
|
-
else {
|
|
741
|
-
nextStep();
|
|
742
|
-
}
|
|
791
|
+
}} style={applyStyle({ backgroundColor: selectedTicket ? LibStyle.colorPrimary : "#f1f2f3" })} />
|
|
792
|
+
}
|
|
793
|
+
</View>
|
|
743
794
|
|
|
744
|
-
|
|
745
|
-
|
|
795
|
+
</>
|
|
796
|
+
:
|
|
797
|
+
<EventLayout
|
|
798
|
+
is_multiprice={is_multiprice == 1 ? true : false}
|
|
799
|
+
result={availableResult}
|
|
800
|
+
priceTypes={[...availableResult.price_type, ...unAvailableResult?.price_type]}
|
|
801
|
+
/>
|
|
802
|
+
}
|
|
746
803
|
</>
|
|
747
|
-
|
|
804
|
+
}
|
|
748
805
|
|
|
749
|
-
|
|
806
|
+
</View>
|
|
807
|
+
</EventQueue>
|
|
750
808
|
)
|
|
751
809
|
}
|