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.
Files changed (100) hide show
  1. package/event/additional.tsx +1 -1
  2. package/event/additional_input.tsx +15 -0
  3. package/event/additional_new.tsx +565 -0
  4. package/event/artist.tsx +14 -34
  5. package/event/artist_detail.tsx +336 -239
  6. package/event/artist_detail_multi.tsx +266 -157
  7. package/event/artist_detailv2.tsx +129 -69
  8. package/event/artistv2.tsx +5 -13
  9. package/event/button.tsx +2 -2
  10. package/event/button_order_detail.tsx +20 -8
  11. package/event/capture.tsx +2 -0
  12. package/event/checkout.ts +135 -0
  13. package/event/countdown.tsx +13 -9
  14. package/event/countdown_base.tsx +88 -48
  15. package/event/countdown_event.tsx +3 -0
  16. package/event/countdown_timestamp.tsx +106 -0
  17. package/event/coupon.tsx +1 -1
  18. package/event/coupon_generate.tsx +35 -22
  19. package/event/detail.tsx +9 -15
  20. package/event/detail2.tsx +63 -61
  21. package/event/dialog_custom.tsx +67 -0
  22. package/event/exchange_ticket_list.tsx +23 -14
  23. package/event/exchange_ticket_result.tsx +1 -1
  24. package/event/firebase_socket.ts +14 -12
  25. package/event/htmltext.tsx +40 -28
  26. package/event/index.tsx +8 -2
  27. package/event/label_input.tsx +2 -2
  28. package/event/layout.tsx +312 -0
  29. package/event/loading_page.tsx +62 -82
  30. package/event/message.tsx +2 -2
  31. package/event/order_detail.tsx +408 -477
  32. package/event/order_detail_addons.tsx +60 -0
  33. package/event/order_detail_addons_booked.tsx +61 -0
  34. package/event/order_detail_coupon.tsx +66 -0
  35. package/event/order_detail_instruction.tsx +96 -0
  36. package/event/order_detail_payment.tsx +1 -1
  37. package/event/order_detail_reschedule.tsx +109 -0
  38. package/event/order_detail_return.tsx +231 -0
  39. package/event/order_detail_review.tsx +174 -0
  40. package/event/order_detail_share.tsx +304 -0
  41. package/event/order_detail_tnc.tsx +76 -0
  42. package/event/order_detail_upgrade.tsx +140 -90
  43. package/event/order_detail_upgrade_payment.tsx +120 -38
  44. package/event/order_detail_visitor.tsx +21 -10
  45. package/event/order_detail_waiting.tsx +3 -3
  46. package/event/order_history.tsx +1 -1
  47. package/event/order_item.tsx +1 -1
  48. package/event/order_lottery.tsx +1 -1
  49. package/event/order_reschedule.tsx +29 -16
  50. package/event/order_share_to.tsx +14 -0
  51. package/event/order_waiting.tsx +1 -1
  52. package/event/payment_subscribe.tsx +18 -0
  53. package/event/point_events.tsx +35 -0
  54. package/event/point_redemption.tsx +101 -0
  55. package/event/point_redemption_exchange.tsx +60 -0
  56. package/event/point_redemption_input.tsx +56 -0
  57. package/event/point_redemption_success.tsx +50 -0
  58. package/event/point_summary.tsx +48 -0
  59. package/event/popup.tsx +4 -4
  60. package/event/queue.tsx +111 -0
  61. package/event/queue_pricing.tsx +17 -6
  62. package/event/review_add.tsx +2 -2
  63. package/event/scan_item.tsx +1 -1
  64. package/event/schedule.tsx +33 -30
  65. package/event/schedule2.tsx +86 -0
  66. package/event/seat.tsx +135 -374
  67. package/event/seat_map.tsx +8 -8
  68. package/event/seat_map_new.tsx +211 -38
  69. package/event/step.tsx +1 -1
  70. package/event/test.tsx +8 -8
  71. package/event/ticket.tsx +326 -0
  72. package/event/ticket_list.tsx +316 -258
  73. package/event/ticket_list2.tsx +349 -224
  74. package/event/ticket_list_item.tsx +61 -0
  75. package/event/ticket_list_new.tsx +710 -0
  76. package/event/tms_add_result.tsx +10 -5
  77. package/event/tms_check_ticket_result.tsx +16 -7
  78. package/event/tms_dashboard.tsx +87 -12
  79. package/event/tms_gate.tsx +32 -15
  80. package/event/tms_home.tsx +178 -92
  81. package/event/tms_idcard.tsx +43 -26
  82. package/event/tms_in.tsx +2 -3
  83. package/event/tms_in_failed.tsx +1 -1
  84. package/event/tms_in_hall.tsx +4 -1
  85. package/event/tms_in_hall_failed.tsx +36 -16
  86. package/event/tms_in_log.tsx +9 -11
  87. package/event/tms_in_success.tsx +13 -8
  88. package/event/tms_log.tsx +16 -17
  89. package/event/tms_out_hall_failed.tsx +1 -1
  90. package/event/tms_out_temporary.tsx +3 -4
  91. package/event/token_order.tsx +103 -0
  92. package/event/token_payment.tsx +79 -0
  93. package/event/visitor_index.tsx +60 -49
  94. package/event/visitor_input.tsx +336 -54
  95. package/event/visitor_inputv2.tsx +173 -88
  96. package/event/voucher.tsx +1 -1
  97. package/id.json +76 -4
  98. package/package.json +1 -1
  99. package/event/secure_page.debug.tsx +0 -34
  100. package/event/secure_page.live.tsx +0 -35
package/event/seat.tsx CHANGED
@@ -1,7 +1,6 @@
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 { EventOrder_detailProperty } from 'esoftplay/cache/event/order_detail/import';
5
4
  import { LibCurl } from 'esoftplay/cache/lib/curl/import';
6
5
  import { LibDialog } from 'esoftplay/cache/lib/dialog/import';
7
6
  import { LibIcon } from 'esoftplay/cache/lib/icon/import';
@@ -9,17 +8,15 @@ import { LibLoading } from 'esoftplay/cache/lib/loading/import';
9
8
  import { LibNavigation } from 'esoftplay/cache/lib/navigation/import';
10
9
  import { LibObject } from 'esoftplay/cache/lib/object/import';
11
10
  import { LibPicture } from 'esoftplay/cache/lib/picture/import';
12
- import { LibProgress } from 'esoftplay/cache/lib/progress/import';
13
11
  import { LibStyle } from 'esoftplay/cache/lib/style/import';
14
12
  import { LibToastProperty } from 'esoftplay/cache/lib/toast/import';
15
13
  import { LibUtils } from 'esoftplay/cache/lib/utils/import';
16
14
  import esp from 'esoftplay/esp';
17
15
  import useSafeState from 'esoftplay/state';
18
16
 
19
- import { EventIndexProperty } from 'esoftplay/cache/event/index/import';
20
- import { EventTransaction } from 'esoftplay/cache/event/transaction/import';
17
+ import { applyStyle } from 'esoftplay';
21
18
  import React, { useEffect } from 'react';
22
- import { Pressable, ScrollView, Text, TouchableOpacity, View } from 'react-native';
19
+ import { Pressable, Text, TouchableOpacity, View } from 'react-native';
23
20
  import Animated, { Extrapolate, interpolate, useAnimatedScrollHandler, useAnimatedStyle, useSharedValue } from 'react-native-reanimated';
24
21
 
25
22
 
@@ -30,8 +27,7 @@ export interface EventSeatProps {
30
27
 
31
28
  }
32
29
  export default function m(props: EventSeatProps): any {
33
- const { url, dataTicket, receiver_email, shared, booking_id, returnTicket } = LibNavigation.getArgsAll(props)
34
- const [trxId] = useSafeState(EventTransaction().getTrxId())
30
+ const { url, dataTicket } = LibNavigation.getArgsAll(props)
35
31
 
36
32
  const [result, setResult] = useSafeState<any>(undefined)
37
33
  const [counter, setCounter] = useSafeState<any>(0)
@@ -103,33 +99,9 @@ export default function m(props: EventSeatProps): any {
103
99
  ]
104
100
 
105
101
  useEffect(() => {
106
- if (shared) {
107
- loadSeatShared()
108
- } else if (returnTicket) {
109
- loadSeatReturn()
110
- } else {
111
- loadDataSize()
112
- }
102
+ loadDataSize()
113
103
  }, [])
114
104
 
115
- function loadSeatShared() {
116
- let post = {
117
- event_id: dataTicket?.event_id,
118
- booking_id: booking_id,
119
- price_id: dataTicket?.selected_ticket?.list?.price_id || dataTicket?.selected_ticket?.price_id,
120
- ondate: dataTicket?.selected_ticket?.list?.ondate,
121
- }
122
- new LibCurl(url, post, (res, msg) => { // event_seat_shared
123
- for (let i = 0; i < res.list.length; i++) {
124
- res.list[i].check = false
125
- }
126
- setResult(res)
127
- }, (error) => {
128
- LibDialog.warning(esp.lang("event/seat", "load_shared_failed"), error?.message)
129
- LibNavigation.back()
130
- })
131
- }
132
-
133
105
  function loadDataSize() {
134
106
  let post = {
135
107
  event_id: dataTicket?.event_id,
@@ -185,18 +157,6 @@ export default function m(props: EventSeatProps): any {
185
157
  }, 1)
186
158
  }
187
159
 
188
- function loadSeatReturn() {
189
- new LibCurl(url, null, (res) => {
190
- for (let i = 0; i < res.tickets.length; i++) {
191
- res.tickets[i].check = false
192
- }
193
- setResult(res)
194
- }, (error) => {
195
- LibDialog.warning(esp.lang("event/seat", "load_return_failed"), error?.message);
196
- LibNavigation.back()
197
- }, 1)
198
- }
199
-
200
160
  function next() {
201
161
  if (dataTicket?.qty != counter) {
202
162
  LibToastProperty.show(esp.lang("event/seat", "select_seat"))
@@ -221,75 +181,6 @@ export default function m(props: EventSeatProps): any {
221
181
  LibNavigation.sendBackResult(value)
222
182
  }
223
183
 
224
- function shareTicket(p: any) {
225
- if (dataTicket?.qty != counter) {
226
- LibToastProperty.show(esp.lang("event/seat", "select_seat1"))
227
- return
228
- }
229
-
230
- let seatName = result?.list?.filter((item: any) => item.check).map((it: any) => it.seat_name)
231
- let _bookingMemberId = result?.list?.filter((item: any) => item.check).map((it: any) => it.id)
232
-
233
- LibDialog.confirm(esp.lang("event/seat", "share_title"), esp.lang("event/seat", "share_msg"), esp.lang("event/seat", "share_confirm"), () => {
234
- let post = {
235
- receiver_email: receiver_email,
236
- booking_id: result?.booking_id,
237
- qty_shared: dataTicket?.qty,
238
- seat_name: seatName.join('|'),
239
- booking_member_id: _bookingMemberId.join('|'),
240
- trx_id: trxId,
241
- pin: p
242
- }
243
-
244
- LibProgress.show(esp.lang("event/seat", "share_wait"))
245
- new LibCurl('event_booking_shared?id=' + dataTicket?.event_id, post, (res, msg) => {
246
- EventOrder_detailProperty.subscribe().trigger()
247
- EventIndexProperty.reload.trigger() //reload data order
248
- // LibNotify(res)
249
- LibProgress.hide()
250
- LibDialog.info(esp.lang("event/seat", "share_ok"), msg)
251
- LibNavigation.back()
252
- LibNavigation.back()
253
- }, (error) => {
254
- LibProgress.hide()
255
- LibDialog.warning(esp.lang("event/seat", "share_no"), error?.message);
256
- // LibNavigation.back()
257
- })
258
- }, esp.lang("event/seat", "share_cancel"), () => {
259
-
260
- })
261
- }
262
-
263
- function sendBackTicket(p: any) {
264
- if (dataTicket?.qty != counter) {
265
- LibToastProperty.show(esp.lang("event/seat", "select_seat2"))
266
- return
267
- }
268
-
269
- LibDialog.confirm(esp.lang("event/seat", "ticket_title"), esp.lang("event/seat", "ticket_msg"), esp.lang("event/seat", "ticket_confirm"), () => {
270
- LibProgress.show(esp.lang("event/seat", "ticket_wait"))
271
-
272
- let _bookingMemberId = result?.tickets?.filter((item: any) => item.check).map((it: any) => it.id)
273
-
274
- let post = {
275
- booking_member_id: _bookingMemberId.join('|'),
276
- pin: p
277
- }
278
- new LibCurl('event_booking_shared_return?booking_id=' + result?.booking_id + '&qty_shared=' + dataTicket?.qty, post, (res, msg) => {
279
- // LibNotify(res)
280
- EventOrder_detailProperty.subscribe().trigger()
281
- LibProgress.hide()
282
- LibDialog.info(esp.lang("event/seat", "ticket_ok"), msg)
283
- LibNavigation.back()
284
- LibNavigation.back()
285
- }, (error) => {
286
- LibProgress.hide()
287
- LibDialog.warning(esp.lang("event/seat", "ticket_failed"), error?.message);
288
- // LibNavigation.back()
289
- }, 1)
290
- }, esp.lang("event/seat", "ticket_cancel"), () => { })
291
- }
292
-
293
184
  const viewImageMap = (image: string) => {
294
185
  return (
295
186
  <View>
@@ -334,17 +225,14 @@ export default function m(props: EventSeatProps): any {
334
225
  const margin = sizeBox / 9
335
226
  const fontSize = sizeBox / 3
336
227
  function renderRow(row: any, i: number) {
337
- const styleId_2sAMKr: any = { marginLeft: 5, marginRight: 5, flexDirection: 'row' }
338
228
  return (
339
- <View key={i} style={styleId_2sAMKr}>
229
+ <View key={i} style={applyStyle({ marginLeft: 5, marginRight: 5, flexDirection: 'row' })}>
340
230
  {
341
231
  row?.map((col: any, i1: number) => {
342
232
  const { colorBackground, colorBorder, fontColor } = renderStyleSeat(col)
343
- const styleId_Z11LKot: any = { margin: margin, marginBottom: 0, marginRight: sizeBox / 9, marginLeft: margin, height: sizeBox, width: sizeBox, backgroundColor: colorBackground, borderWidth: 1, borderColor: colorBorder, borderRadius: 4, justifyContent: 'center', alignContent: 'center', alignItems: 'center' }
344
- const styleId_Z6RdsD: any = { fontFamily: "Arial", fontSize: fontSize, fontWeight: "normal", textAlign: 'center', fontStyle: "normal", letterSpacing: 0, color: fontColor }
345
233
  return (
346
- <TouchableOpacity onPress={toggleSeat(col, i, i1)} key={i1} style={styleId_Z11LKot}>
347
- <Text allowFontScaling={false} style={styleId_Z6RdsD}>{col.name}</Text>
234
+ <TouchableOpacity onPress={toggleSeat(col, i, i1)} key={i1} style={applyStyle({ margin: margin, marginBottom: 0, marginRight: sizeBox / 9, marginLeft: margin, height: sizeBox, width: sizeBox, backgroundColor: colorBackground, borderWidth: 1, borderColor: colorBorder, borderRadius: 4, justifyContent: 'center', alignContent: 'center', alignItems: 'center' })}>
235
+ <Text allowFontScaling={false} style={applyStyle({ fontFamily: "Arial", fontSize: fontSize, fontWeight: "normal", textAlign: 'center', fontStyle: "normal", letterSpacing: 0, color: fontColor })}>{col.name}</Text>
348
236
  </TouchableOpacity>
349
237
  )
350
238
  })
@@ -353,283 +241,156 @@ export default function m(props: EventSeatProps): any {
353
241
  )
354
242
  }
355
243
 
356
- function renderTicketShare(item: any, i: number) {
357
- let _selectTicket = item.hasOwnProperty('check') && item.check
358
- return (
359
- <TouchableOpacity onPress={() => {
360
- if (counter + 1 > dataTicket?.qty && !item.check) {
361
- alertSelectSeat()
362
- } else {
363
- let a = LibObject.set(result, item.check == false ? true : false)('list', i, 'check')
364
- setResult(a)
365
- setCounter(item.check ? counter - 1 : counter + 1)
366
- }
367
- }} key={i} style={styleId_Z1ppFKw}>
368
- <Text allowFontScaling={false}>{item.seat_name}</Text>
369
- <TouchableOpacity onPress={() => {
370
- if (!item.check && counter + 1 > dataTicket?.qty) {
371
- alertSelectSeat()
372
- } else {
373
- let a = LibObject.set(result, item.check == false ? true : false)('list', i, 'check')
374
- setResult(a)
375
- setCounter(!item.check ? counter + 1 : counter - 1)
376
- }
377
- }} style={styleId_ZE3xEb} >
378
- <LibIcon name={_selectTicket ? "checkbox-marked-circle" : "radiobox-blank"} size={22} color={_selectTicket ? "#3ea4dc" : "#434343"} />
379
- </TouchableOpacity>
380
- </TouchableOpacity>
381
- )
382
- }
383
-
384
- function renderTicketReturn(item: any, i: number) {
385
- let _selectTicket = item.hasOwnProperty('check') && item.check
386
- return (
387
- <TouchableOpacity onPress={() => {
388
- if (counter + 1 > dataTicket?.qty && !item.check) {
389
- alertSelectSeat()
390
- } else {
391
- let a = LibObject.set(result, item.check == false ? true : false)('tickets', i, 'check')
392
- setResult(a)
393
- setCounter(item.check ? counter - 1 : counter + 1)
394
- }
395
- }} key={i} style={styleId_Z1ppFKw}>
396
- <Text allowFontScaling={false}>{item.seat_name}</Text>
397
- <TouchableOpacity onPress={() => {
398
- if (!item.check && counter + 1 > dataTicket?.qty) {
399
- alertSelectSeat()
400
- } else {
401
- let a = LibObject.set(result, item.check == false ? true : false)('tickets', i, 'check')
402
- setResult(a)
403
- setCounter(!item.check ? counter + 1 : counter - 1)
404
- }
405
- }} style={styleId_ZE3xEb} >
406
- <LibIcon name={_selectTicket ? "checkbox-marked-circle" : "radiobox-blank"} size={22} color={_selectTicket ? "#3ea4dc" : "#434343"} />
407
- </TouchableOpacity>
408
- </TouchableOpacity>
409
- )
410
- }
411
-
412
244
  useEffect(() => {
413
245
  return () => LibNavigation.cancelBackResult(LibNavigation.getResultKey(props))
414
246
  }, [])
415
247
 
416
-
417
-
418
-
419
- // view untuk share tiket
420
- if (shared) {
421
- return (
422
- <View style={{ flex: 1, backgroundColor: '#fff' }}>
423
- <EventHeader title={esp.lang("event/seat", "header_title")} />
424
- {
425
- !result ?
426
- <LibLoading />
427
- :
428
- <>
429
- <ScrollView>
430
- <Text allowFontScaling={false} style={{ margin: 15, fontFamily: "Arial", fontSize: 12, fontWeight: "bold", fontStyle: "normal", letterSpacing: 0, color: '#999' }}>{esp.lang("event/seat", "seat_qty", LibUtils.number(dataTicket?.qty - counter))}</Text>
431
- <View style={{ margin: 15, marginTop: 0 }}>
432
- {
433
- result?.list?.length > 0 && result?.list?.map?.(renderTicketShare)
434
- }
435
- </View>
436
-
437
- </ScrollView>
438
- <View style={{ paddingVertical: 10, paddingHorizontal: 20 }} >
439
- <EventButton label={esp.lang("event/seat", "next")} onPress={() => {
440
- LibNavigation.navigateForResult("bigbang/payment_pin", undefined, 1132).then((p) => {
441
- if (p) {
442
- shareTicket(p)
443
- }
444
- })
445
- }} style={{ backgroundColor: dataTicket?.qty != counter ? LibStyle.colorGrey : LibStyle.colorPrimary }} />
446
- </View>
447
- </>
448
- }
449
- </View>
450
- )
451
- } else if (returnTicket) {
452
- return (
453
- <View style={{ flex: 1, backgroundColor: '#fff' }}>
454
- <EventHeader title={esp.lang("event/seat", "header_title_return")} subtitle={esp.lang("event/seat", "header_subtitle_return")} />
455
- {
456
- !result ?
457
- <LibLoading />
248
+ return (
249
+ <View style={{ flex: 1, backgroundColor: '#fff' }}>
250
+ <EventHeader title={esp.lang("event/seat", "header_title_select")} subtitle={dataTicket?.selected_ticket?.type} />
251
+ {
252
+ !result ?
253
+ <LibLoading />
254
+ :
255
+ result == "none" ?
256
+ <View style={{ flex: 1, margin: 10, marginBottom: 0, justifyContent: 'center', alignContent: 'center', alignItems: 'center' }}>
257
+ <TouchableOpacity onPress={() => {
258
+ LibNavigation.navigateForResult('event/seat_map', {
259
+ x: resultDataSize.seat_column,
260
+ y: resultDataSize.seat_row,
261
+ url: url,
262
+ event_id: dataTicket?.event_id,
263
+ price_id: dataTicket?.selected_ticket?.list?.price_id || dataTicket?.selected_ticket?.price_id,
264
+ ondate: dataTicket?.selected_ticket?.list?.ondate,
265
+ }, 345).then((item: any) => {
266
+ setResult(undefined)
267
+ loadSeat(item)
268
+ })
269
+ }} style={{ alignContent: 'center', alignItems: 'center', padding: 10, borderRadius: 5, backgroundColor: LibStyle.colorPrimary }}>
270
+ <Text allowFontScaling={false} style={{ fontFamily: "Arial", fontSize: 14, fontStyle: "normal", letterSpacing: 0, color: '#000' }}>{esp.lang("event/seat", "reselect")}</Text>
271
+ </TouchableOpacity>
272
+ </View>
458
273
  :
459
274
  <>
460
- <ScrollView>
461
- <Text allowFontScaling={false} style={{ margin: 15, fontFamily: "Arial", fontSize: 12, fontWeight: "bold", fontStyle: "normal", letterSpacing: 0, color: '#999' }}>{esp.lang("event/seat", "return_seat", LibUtils.number(dataTicket?.qty - counter))}</Text>
462
- <View style={{ margin: 15, marginTop: 0 }}>
463
- {
464
- result?.tickets?.length > 0 && result?.tickets?.map?.(renderTicketReturn)
465
- }
466
- </View>
467
- </ScrollView>
468
- <View style={{ paddingVertical: 10, paddingHorizontal: 20 }} >
469
- <EventButton label={esp.lang("event/seat", "next")} onPress={() => {
470
- LibNavigation.navigateForResult("bigbang/payment_pin", undefined, 1132).then((p) => {
471
- if (p) {
472
- sendBackTicket(p)
473
- }
474
- })
475
-
476
- }} style={{ backgroundColor: dataTicket?.qty != counter ? LibStyle.colorGrey : LibStyle.colorPrimary }} />
477
- </View>
478
- </>
479
- }
480
- </View>
481
- )
482
- } else {
483
- return (
484
- <View style={{ flex: 1, backgroundColor: '#fff' }}>
485
- <EventHeader title={esp.lang("event/seat", "header_title_select")} subtitle={dataTicket?.selected_ticket?.type} />
486
- {
487
- !result ?
488
- <LibLoading />
489
- :
490
- result == "none" ?
491
- <View style={{ flex: 1, margin: 10, marginBottom: 0, justifyContent: 'center', alignContent: 'center', alignItems: 'center' }}>
492
- <TouchableOpacity onPress={() => {
493
- LibNavigation.navigateForResult('event/seat_map', {
494
- x: resultDataSize.seat_column,
495
- y: resultDataSize.seat_row,
496
- url: url,
497
- event_id: dataTicket?.event_id,
498
- price_id: dataTicket?.selected_ticket?.list?.price_id || dataTicket?.selected_ticket?.price_id,
499
- ondate: dataTicket?.selected_ticket?.list?.ondate,
500
- }, 345).then((item: any) => {
501
- setResult(undefined)
502
- loadSeat(item)
503
- })
504
- }} style={{ alignContent: 'center', alignItems: 'center', padding: 10, borderRadius: 5, backgroundColor: LibStyle.colorPrimary }}>
505
- <Text allowFontScaling={false} style={{ fontFamily: "Arial", fontSize: 14, fontStyle: "normal", letterSpacing: 0, color: '#000' }}>{esp.lang("event/seat", "reselect")}</Text>
506
- </TouchableOpacity>
507
- </View>
508
- :
509
- <>
510
- <View style={{ margin: 10, marginBottom: 0, flexDirection: 'row', justifyContent: 'space-between', alignContent: 'center', alignItems: 'center' }}>
511
- <View style={{ flex: 1 }}>
512
- {/* {
513
- Number(resultDataSize.seat_column) * Number(resultDataSize.seat_row) > 100 &&
514
- <TouchableOpacity onPress={() => {
515
- LibNavigation.navigateForResult('event/seat_map', {
516
- x: resultDataSize.seat_column,
517
- y: resultDataSize.seat_row,
518
- url: url,
519
- event_id: event_id,
520
- price_id: price_id,
521
- on_date: on_date,
522
- }, 345).then((item: any) => {
523
- setResult(undefined)
524
- loadSeat(item)
525
- })
526
- }} style={{ marginRight: 20, alignContent: 'center', alignItems: 'center', padding: 5, borderRadius: 5, backgroundColor: LibStyle.colorPrimary }}>
527
- <Text allowFontScaling={false} style={{ fontFamily: "Arial", fontSize: 12, fontStyle: "normal", letterSpacing: 0, color: '#000' }}>Pilih Ulang</Text>
528
- </TouchableOpacity>
529
- } */}
530
- </View>
531
- <View style={{ flex: 1, alignContent: 'center', alignItems: 'center' }}>
532
- <Text allowFontScaling={false} style={{ textAlign: 'center', fontFamily: "Arial", fontSize: 14, fontWeight: "bold", fontStyle: "normal", letterSpacing: 0, color: '#000' }}>{dataTicket?.selected_ticket?.type}</Text>
533
- </View>
534
- {
535
- result?.image_map != "" ?
275
+ <View style={{ margin: 10, marginBottom: 0, flexDirection: 'row', justifyContent: 'space-between', alignContent: 'center', alignItems: 'center' }}>
276
+ <View style={{ flex: 1 }}>
277
+ {/* {
278
+ Number(resultDataSize.seat_column) * Number(resultDataSize.seat_row) > 100 &&
536
279
  <TouchableOpacity onPress={() => {
537
- if (result?.image_map == "") {
538
- LibToastProperty.show(esp.lang("event/seat", "empty_image"))
539
- } else {
540
- LibDialog.custom(viewImageMap(result?.image_map))
541
- }
542
- }} style={{ flex: 1, justifyContent: 'flex-end', alignContent: 'flex-end', alignItems: 'flex-end' }} hitSlop={{ top: 10, left: 10, right: 10, bottom: 10 }}>
543
- <Text allowFontScaling={false} style={{ fontFamily: "Arial", fontSize: 12, fontStyle: "normal", letterSpacing: 0, color: LibStyle.colorBlue }}>{esp.lang("event/seat", "show_map")}</Text>
280
+ LibNavigation.navigateForResult('event/seat_map', {
281
+ x: resultDataSize.seat_column,
282
+ y: resultDataSize.seat_row,
283
+ url: url,
284
+ event_id: event_id,
285
+ price_id: price_id,
286
+ on_date: on_date,
287
+ }, 345).then((item: any) => {
288
+ setResult(undefined)
289
+ loadSeat(item)
290
+ })
291
+ }} style={{ marginRight: 20, alignContent: 'center', alignItems: 'center', padding: 5, borderRadius: 5, backgroundColor: LibStyle.colorPrimary }}>
292
+ <Text allowFontScaling={false} style={{ fontFamily: "Arial", fontSize: 12, fontStyle: "normal", letterSpacing: 0, color: '#000' }}>Pilih Ulang</Text>
544
293
  </TouchableOpacity>
545
- :
546
- <View style={{ flex: 1 }} />
547
- }
294
+ } */}
548
295
  </View>
549
-
550
- <View style={{ margin: 30, marginTop: 10, marginBottom: 10, borderBottomLeftRadius: 15, borderBottomRightRadius: 15, padding: 5, justifyContent: 'center', alignItems: 'center', alignContent: 'center', backgroundColor: LibStyle.colorGreen }}>
551
- <Text allowFontScaling={false} style={{ fontFamily: "Arial", fontSize: 14, fontWeight: "bold", fontStyle: "normal", letterSpacing: 0, color: '#fff' }}>{esp.lang("event/seat", "front")}</Text>
296
+ <View style={{ flex: 1, alignContent: 'center', alignItems: 'center' }}>
297
+ <Text allowFontScaling={false} style={{ textAlign: 'center', fontFamily: "Arial", fontSize: 14, fontWeight: "bold", fontStyle: "normal", letterSpacing: 0, color: '#000' }}>{dataTicket?.selected_ticket?.type}</Text>
552
298
  </View>
299
+ {
300
+ result?.image_map != "" ?
301
+ <TouchableOpacity onPress={() => {
302
+ if (result?.image_map == "") {
303
+ LibToastProperty.show(esp.lang("event/seat", "empty_image"))
304
+ } else {
305
+ LibDialog.custom(viewImageMap(result?.image_map))
306
+ }
307
+ }} style={{ flex: 1, justifyContent: 'flex-end', alignContent: 'flex-end', alignItems: 'flex-end' }} hitSlop={{ top: 10, left: 10, right: 10, bottom: 10 }}>
308
+ <Text allowFontScaling={false} style={{ fontFamily: "Arial", fontSize: 12, fontStyle: "normal", letterSpacing: 0, color: LibStyle.colorBlue }}>{esp.lang("event/seat", "show_map")}</Text>
309
+ </TouchableOpacity>
310
+ :
311
+ <View style={{ flex: 1 }} />
312
+ }
313
+ </View>
314
+
315
+ <View style={{ margin: 30, marginTop: 10, marginBottom: 10, borderBottomLeftRadius: 15, borderBottomRightRadius: 15, padding: 5, justifyContent: 'center', alignItems: 'center', alignContent: 'center', backgroundColor: LibStyle.colorGreen }}>
316
+ <Text allowFontScaling={false} style={{ fontFamily: "Arial", fontSize: 14, fontWeight: "bold", fontStyle: "normal", letterSpacing: 0, color: '#fff' }}>{esp.lang("event/seat", "front")}</Text>
317
+ </View>
553
318
 
554
- <View key={sizeBox} style={{ flex: 3, marginVertical: 10 }}>
555
- <View style={{ flex: 1, flexDirection: 'row', margin: 10, marginVertical: 0 }} >
319
+ <View key={sizeBox} style={{ flex: 3, marginVertical: 10 }}>
320
+ <View style={{ flex: 1, flexDirection: 'row', margin: 10, marginVertical: 0 }} >
321
+ <Animated.ScrollView
322
+ horizontal
323
+ scrollEventThrottle={16}
324
+ overScrollMode="never"
325
+ showsHorizontalScrollIndicator={false}
326
+ onContentSizeChange={(width, height) => {
327
+ setCompleteScrollBarWidth(width)
328
+ }}
329
+ onLayout={(x) => {
330
+ setVisibleScrollBarWidth(x.nativeEvent.layout.width)
331
+ }}
332
+ onScroll={scrollHandlerX}>
556
333
  <Animated.ScrollView
557
- horizontal
558
334
  scrollEventThrottle={16}
559
335
  overScrollMode="never"
560
- showsHorizontalScrollIndicator={false}
336
+ showsVerticalScrollIndicator={false}
561
337
  onContentSizeChange={(width, height) => {
562
- setCompleteScrollBarWidth(width)
338
+ setCompleteScrollBarHeight(height)
563
339
  }}
564
340
  onLayout={(x) => {
565
- setVisibleScrollBarWidth(x.nativeEvent.layout.width)
341
+ setVisibleScrollBarHeight(x.nativeEvent.layout.height)
566
342
  }}
567
- onScroll={scrollHandlerX}>
568
- <Animated.ScrollView
569
- scrollEventThrottle={16}
570
- overScrollMode="never"
571
- showsVerticalScrollIndicator={false}
572
- onContentSizeChange={(width, height) => {
573
- setCompleteScrollBarHeight(height)
574
- }}
575
- onLayout={(x) => {
576
- setVisibleScrollBarHeight(x.nativeEvent.layout.height)
577
- }}
578
- onScroll={scrollHandlerY}>
579
- <View>
580
- {result?.list?.map?.(renderRow)}
581
- </View>
582
- </Animated.ScrollView>
343
+ onScroll={scrollHandlerY}>
344
+ <View>
345
+ {result?.list?.map?.(renderRow)}
346
+ </View>
583
347
  </Animated.ScrollView>
584
- <View style={{ width: 8, height: "100%", backgroundColor: "#c9c9c9", borderRadius: 4 }}>
585
- <Animated.View style={[{ width: 8, height: scrollIndicatorHeightSize, backgroundColor: LibStyle.colorPrimary, borderRadius: 4 }, styleY]} />
586
- </View>
587
- </View>
588
- <View style={{ width: LibStyle.width - 28, margin: 10, height: 8, backgroundColor: "#c9c9c9", borderRadius: 4 }}>
589
- <Animated.View style={[{ width: scrollIndicatorWidthSize, height: 8, backgroundColor: LibStyle.colorPrimary, borderRadius: 4 }, styleX]} />
348
+ </Animated.ScrollView>
349
+ <View style={{ width: 8, height: "100%", backgroundColor: "#c9c9c9", borderRadius: 4 }}>
350
+ <Animated.View style={[{ width: 8, height: scrollIndicatorHeightSize, backgroundColor: LibStyle.colorPrimary, borderRadius: 4 }, styleY]} />
590
351
  </View>
591
352
  </View>
592
- <View style={{ flexDirection: 'row', justifyContent: 'space-around' }} >
593
- <Pressable
594
- style={{ opacity: sizeBox == 10 ? 0.2 : 1, height: 60, borderRadius: 30, ...LibStyle.elevation(3), backgroundColor: 'white', width: 60, justifyContent: 'center', alignItems: 'center' }}
595
- onPress={() => setSizeBox(sizeBox >= 20 ? sizeBox - 10 : 10)} >
596
- <LibIcon.MaterialIcons name='zoom-out' size={24} />
597
- </Pressable>
598
- <Pressable
599
- style={{ opacity: sizeBox == 40 ? 0.2 : 1, height: 60, borderRadius: 30, ...LibStyle.elevation(3), backgroundColor: 'white', width: 60, justifyContent: 'center', alignItems: 'center' }}
600
- onPress={() => setSizeBox(sizeBox <= 30 ? sizeBox + 10 : 40)} >
601
- <LibIcon.MaterialIcons name='zoom-in' size={24} />
602
- </Pressable>
353
+ <View style={{ width: LibStyle.width - 28, margin: 10, height: 8, backgroundColor: "#c9c9c9", borderRadius: 4 }}>
354
+ <Animated.View style={[{ width: scrollIndicatorWidthSize, height: 8, backgroundColor: LibStyle.colorPrimary, borderRadius: 4 }, styleX]} />
603
355
  </View>
356
+ </View>
357
+ <View style={{ flexDirection: 'row', justifyContent: 'space-around' }} >
358
+ <Pressable
359
+ style={{ opacity: sizeBox == 10 ? 0.2 : 1, height: 60, borderRadius: 30, ...LibStyle.elevation(3), backgroundColor: 'white', width: 60, justifyContent: 'center', alignItems: 'center' }}
360
+ onPress={() => setSizeBox(sizeBox >= 20 ? sizeBox - 10 : 10)} >
361
+ <LibIcon.MaterialIcons name='zoom-out' size={24} />
362
+ </Pressable>
363
+ <Pressable
364
+ style={{ opacity: sizeBox == 40 ? 0.2 : 1, height: 60, borderRadius: 30, ...LibStyle.elevation(3), backgroundColor: 'white', width: 60, justifyContent: 'center', alignItems: 'center' }}
365
+ onPress={() => setSizeBox(sizeBox <= 30 ? sizeBox + 10 : 40)} >
366
+ <LibIcon.MaterialIcons name='zoom-in' size={24} />
367
+ </Pressable>
368
+ </View>
604
369
 
605
- <View style={{ flex: 0.1 }} />
606
-
607
- <View style={{ paddingVertical: 10, paddingHorizontal: 10 }} >
608
- <View style={{ marginHorizontal: 0, margin: 10, marginBottom: 15, flexDirection: 'row', justifyContent: 'space-between', alignContent: 'center', alignItems: 'center' }}>
609
- <Text allowFontScaling={false} style={{ marginLeft: 5, fontFamily: "Arial", fontSize: 12, fontWeight: "bold", fontStyle: "normal", letterSpacing: 0, color: '#999' }}>{esp.lang("event/seat", "select_seat_1", LibUtils.number(dataTicket?.qty - counter))}</Text>
610
- <View style={{ flexDirection: 'row' }}>
611
- {
612
- explanation.map((item, i) => {
613
- return (
614
- <View key={i} style={{ flexDirection: 'row', alignContent: 'center', justifyContent: 'center', alignItems: 'center', marginRight: 5 }}>
615
- <View key={i} style={{ height: 20, width: 20, borderRadius: 4, borderWidth: 1, borderColor: item.borderColor, backgroundColor: item.backgroundColor }} />
616
- <Text allowFontScaling={false} style={{ marginLeft: 5, fontFamily: "Arial", fontSize: 8, fontWeight: "bold", fontStyle: "normal", letterSpacing: 0, color: '#999' }}>{item.text}</Text>
617
- </View>
618
- )
619
- })
620
- }
621
- </View>
370
+ <View style={{ flex: 0.1 }} />
371
+
372
+ <View style={{ paddingVertical: 10, paddingHorizontal: 10 }} >
373
+ <View style={{ marginHorizontal: 0, margin: 10, marginBottom: 15, flexDirection: 'row', justifyContent: 'space-between', alignContent: 'center', alignItems: 'center' }}>
374
+ <Text allowFontScaling={false} style={{ marginLeft: 5, fontFamily: "Arial", fontSize: 12, fontWeight: "bold", fontStyle: "normal", letterSpacing: 0, color: '#999' }}>{esp.lang("event/seat", "select_seat_1", LibUtils.number(dataTicket?.qty - counter))}</Text>
375
+ <View style={{ flexDirection: 'row' }}>
376
+ {
377
+ explanation.map((item, i) => {
378
+ return (
379
+ <View key={i} style={{ flexDirection: 'row', alignContent: 'center', justifyContent: 'center', alignItems: 'center', marginRight: 5 }}>
380
+ <View key={i} style={{ height: 20, width: 20, borderRadius: 4, borderWidth: 1, borderColor: item.borderColor, backgroundColor: item.backgroundColor }} />
381
+ <Text allowFontScaling={false} style={{ marginLeft: 5, fontFamily: "Arial", fontSize: 8, fontWeight: "bold", fontStyle: "normal", letterSpacing: 0, color: '#999' }}>{item.text}</Text>
382
+ </View>
383
+ )
384
+ })
385
+ }
622
386
  </View>
623
- <EventButton label={esp.lang("event/seat", "next")} onPress={() => {
624
- next()
625
- }} style={{ backgroundColor: dataTicket?.qty != counter ? LibStyle.colorGrey : LibStyle.colorPrimary }} />
626
387
  </View>
627
- </>
628
- }
629
- </View>
630
- )
631
- }
632
-
633
- }
634
- const styleId_Z1ppFKw: any = { borderRadius: 4, alignContent: 'center', alignItems: 'center', backgroundColor: '#f5f5f5', marginBottom: 5, padding: 10, flexDirection: 'row', justifyContent: 'space-between', flex: 1 }
635
- const styleId_ZE3xEb: any = { padding: 8, opacity: 1 }
388
+ <EventButton label={esp.lang("event/seat", "next")} onPress={() => {
389
+ next()
390
+ }} style={{ backgroundColor: dataTicket?.qty != counter ? LibStyle.colorGrey : LibStyle.colorPrimary }} />
391
+ </View>
392
+ </>
393
+ }
394
+ </View>
395
+ )
396
+ }
@@ -386,16 +386,16 @@ function toBase26(num: number) {
386
386
 
387
387
  function getLegends() {
388
388
  const colors: any = [
389
- ["#F1F1F1", esp.lang("event/seat_map", "available"), 0],
390
- ["#8EF67B", esp.lang("event/seat_map", "chosen"), "-1"],
389
+ ["#fff", esp.lang("event/seat_map", "available"), 0],
390
+ // ["#8EF67B", esp.lang("event/seat_map", "chosen"), "-1"],
391
391
  ["#2EBBE8", esp.lang("event/seat_map", "reserved"), 3],
392
- ["#6C432C", esp.lang("event/seat_map", "chosen_by"), 7],
393
- ["#fff", esp.lang("event/seat_map", "way"), 5],
394
- ["#9FA1A4", esp.lang("event/seat_map", "not_sold"), 1],
392
+ // ["#6C432C", esp.lang("event/seat_map", "chosen_by"), 7],
393
+ // ["#f1f2f3", esp.lang("event/seat_map", "way"), 5],
394
+ // ["#9FA1A4", esp.lang("event/seat_map", "not_sold"), 1],
395
395
  ["#6B71E6", esp.lang("event/seat_map", "seat_hold"), 2],
396
- ["#FF4866", esp.lang("event/seat_map", "wall"), 6],
397
- ["#FFA601", esp.lang("event/seat_map", "other_type"), 4],
398
- ["purple", esp.lang("event/seat_map", "stage"), 8]
396
+ // ["#FF4866", esp.lang("event/seat_map", "wall"), 6],
397
+ // ["#FFA601", esp.lang("event/seat_map", "other_type"), 4],
398
+ // ["purple", esp.lang("event/seat_map", "stage"), 8]
399
399
  ]
400
400
  return colors
401
401
  }