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
@@ -68,7 +68,7 @@ export default function m(props: EventOrder_historyProps): any {
68
68
  {
69
69
  item.status == 0 ?
70
70
  <View style={applyStyle({ flexDirection: 'row', alignItems: 'center', justifyContent: 'space-between', alignContent: 'center', paddingHorizontal: 15 })}>
71
- <EventCountdown_base expired={moment(item.exp_payment).serverFormat('YYYY-MM-DD HH:mm:ss')} style={applyStyle({ flex: 1, fontSize: 12, color: LibStyle.colorRed, fontFamily: "ArialBold", fontWeight: "normal", fontStyle: "normal" })} />
71
+ <EventCountdown_base expired={moment(item.exp_payment).serverFormat('YYYY-MM-DD HH:mm:ss')} timezone={item?.timezone} style={applyStyle({ flex: 1, fontSize: 12, color: LibStyle.colorRed, fontFamily: "ArialBold", fontWeight: "normal", fontStyle: "normal" })} />
72
72
  <Text allowFontScaling={false} style={applyStyle({ flex: 1, flexWrap: 'wrap', padding: 10, paddingHorizontal: 0, textAlign: 'right', fontFamily: "ArialBold", fontSize: 12, fontWeight: "normal", fontStyle: "normal", letterSpacing: 0, color: LibStyle.colorRed })}>{item.booking_code}</Text>
73
73
  </View>
74
74
  :
@@ -97,7 +97,7 @@ export default function m(props: EventOrder_itemProps): any {
97
97
  item?.status == 0 ?
98
98
  <View style={applyStyle({ flex: 1, flexDirection: 'row', alignItems: 'center', justifyContent: 'space-between', alignContent: 'center', paddingHorizontal: 15 })}>
99
99
  <View style={{ flex: 1 }}>
100
- <EventCountdown_base expired={LibUtils.moment(item?.exp_payment).serverFormat('YYYY-MM-DD HH:mm:ss', item?.timezone)} style={applyStyle({ fontSize: 12, color: LibStyle.colorRed, fontFamily: "ArialBold", fontWeight: "normal", fontStyle: "normal" })} />
100
+ <EventCountdown_base expired={LibUtils.moment(item?.exp_payment).serverFormat('YYYY-MM-DD HH:mm:ss', item?.timezone)} timezone={item?.timezone} style={applyStyle({ fontSize: 12, color: LibStyle.colorRed, fontFamily: "ArialBold", fontWeight: "normal", fontStyle: "normal" })} />
101
101
  </View>
102
102
  {
103
103
  !!item?.booking_code &&
@@ -71,7 +71,7 @@ export default function m(props: EventOrder_lotteryProps): any {
71
71
  }
72
72
 
73
73
  LibDialog.confirm(esp.lang("event/order_lottery", "confirm"), esp.lang("event/order_lottery", "confirm_point"), esp.lang("event/order_lottery", "yes"), () => {
74
- LibProgress.show("Mohon tunggu")
74
+ LibProgress.show(esp.lang("event/order_lottery", "please_wait"))
75
75
  new LibCurl("event_order_detail_luckydraw_claim?id=" + id, post, (res: any) => {
76
76
  LibProgress.hide()
77
77
  esp.log(res);
@@ -14,6 +14,7 @@ import { LibPicture } from 'esoftplay/cache/lib/picture/import';
14
14
  import { LibProgress } from 'esoftplay/cache/lib/progress/import';
15
15
  import { LibStyle } from 'esoftplay/cache/lib/style/import';
16
16
  import { LibTextstyle } from 'esoftplay/cache/lib/textstyle/import';
17
+ import { LibTheme } from 'esoftplay/cache/lib/theme/import';
17
18
  import { LibToastProperty } from 'esoftplay/cache/lib/toast/import';
18
19
  import { LibUtils } from 'esoftplay/cache/lib/utils/import';
19
20
  import esp from 'esoftplay/esp';
@@ -22,7 +23,7 @@ import moment from 'esoftplay/moment';
22
23
  import useSafeState from 'esoftplay/state';
23
24
 
24
25
  import React, { useEffect } from 'react';
25
- import { Pressable, RefreshControl, ScrollView, Text, TouchableOpacity, View } from 'react-native';
26
+ import { RefreshControl, ScrollView, Text, TouchableOpacity, View } from 'react-native';
26
27
 
27
28
 
28
29
  export interface EventOrder_rescheduleArgs {
@@ -108,7 +109,7 @@ export default function m(props: EventOrder_rescheduleProps): any {
108
109
  LibProgress.hide()
109
110
  LibNavigation.backToRoot()
110
111
  LibNavigation.navigate('event/order')
111
- LibNavigation.navigate('event/order_detail', { url: res.url })
112
+ // LibNavigation.navigate('event/order_detail', { url: res.url })
112
113
  }, (error) => {
113
114
  LibProgress.hide()
114
115
  LibDialog.warning(esp.lang("event/order_reschedule", "process_er"), error?.message)
@@ -291,7 +292,7 @@ export default function m(props: EventOrder_rescheduleProps): any {
291
292
  </View>
292
293
  </View>
293
294
  <View style={applyStyle({ marginLeft: 10, flexDirection: 'column', marginRight: 6 })} >
294
- <Text allowFontScaling={false} style={applyStyle({ fontFamily: "Arial", fontSize: 12, fontWeight: "bold", fontStyle: "normal", letterSpacing: 0, textAlign: "right", color: _selectTicket ? "#3ea4dc" : '#999', opacity: opacityPassed })} >{LibUtils.money(item1.price, item1.currency)}</Text>
295
+ {/* <Text allowFontScaling={false} style={applyStyle({ fontFamily: "Arial", fontSize: 12, fontWeight: "bold", fontStyle: "normal", letterSpacing: 0, textAlign: "right", color: _selectTicket ? "#3ea4dc" : '#999', opacity: opacityPassed })} >{LibUtils.money(item1.price, item1.currency)}</Text> */}
295
296
  </View>
296
297
 
297
298
  <TouchableOpacity onPress={() => {
@@ -313,7 +314,6 @@ export default function m(props: EventOrder_rescheduleProps): any {
313
314
  )
314
315
  }
315
316
 
316
- esp.log(result);
317
317
  function renderRefundList(item: any, i: number) {
318
318
  let _selectTicket = item.hasOwnProperty('check') && item.check == 1
319
319
  const styleID_12nkjf: any = { marginLeft: 10, textDecorationLine: 'line-through', textDecorationStyle: 'solid', opacity: item.is_refundable == 1 ? 1 : 0.5, marginTop: 4, fontFamily: "Arial", fontSize: 12, fontWeight: "normal", fontStyle: "normal", letterSpacing: 0, color: _selectTicket ? "#3ea4dc" : '#999' }
@@ -333,9 +333,15 @@ export default function m(props: EventOrder_rescheduleProps): any {
333
333
  <LibTextstyle textStyle='caption1' text={esp.lang("event/order_reschedule", "chared", item.qty_shared)} style={{ color: 'orange' }} />
334
334
  }
335
335
  <Text allowFontScaling={false} style={{ opacity: item.is_refundable == 1 ? 1 : 0.5, fontFamily: "Arial", fontSize: 10, marginBottom: 4, fontWeight: "normal", fontStyle: "normal", letterSpacing: 0.23, color: LibStyle.colorRed }}>{item.refund == "0.00" ? esp.lang("event/order_reschedule", "cant_refund") : esp.lang("event/order_reschedule", "refundable", LibUtils.numberAbsolute(item.refund).toString())}</Text>
336
- <Text allowFontScaling={false} style={applyStyle({ fontFamily: "Arial", fontSize: 14, fontWeight: "bold", fontStyle: "normal", letterSpacing: 0, color: _selectTicket ? "#3ea4dc" : '#999' })}>{esp.lang("ticket/refund", "ticket")} {item.price_name + " (" + item.qty + " " + esp.lang("ticket/refund", "ticket") + ") "}</Text>
336
+ <Text allowFontScaling={false} style={applyStyle({ fontFamily: "Arial", fontSize: 14, fontWeight: "bold", fontStyle: "normal", letterSpacing: 0, color: _selectTicket ? "#3ea4dc" : LibTheme._colorTextSecondary() })}>{esp.lang("ticket/refund", "ticket")} {item.price_name + " (" + item.qty + " " + esp.lang("ticket/refund", "ticket") + ") "}</Text>
337
337
  <View style={{ flexDirection: 'row', alignContent: 'center', alignItems: 'center' }}>
338
- <Text allowFontScaling={false} style={applyStyle({ marginTop: 4, fontFamily: "Arial", fontSize: 12, fontWeight: "normal", fontStyle: "normal", letterSpacing: 0, color: _selectTicket ? "#3ea4dc" : '#999' })}>{LibUtils.money(item.price_cancellable, item.currency)}</Text>
338
+ <View style={{ flexDirection: 'row', marginTop: 4, alignContent: 'center', alignItems: 'center' }}>
339
+ <Text allowFontScaling={false} style={applyStyle({ fontFamily: "Arial", fontSize: 16, fontWeight: "normal", fontStyle: "normal", letterSpacing: 0, color: _selectTicket ? "#3ea4dc" : LibTheme._colorTextSecondary() })}>{LibUtils.money(item.total, item.currency)}</Text>
340
+ {
341
+ item?.tax != "0" &&
342
+ <Text allowFontScaling={false} style={{ marginLeft: 10, fontFamily: "Arial", fontSize: 12, fontWeight: "normal", fontStyle: "normal", letterSpacing: 0, color: LibTheme._colorTextTertiary() }}>{esp.lang("event/order_reschedule", "price+tax")}</Text>
343
+ }
344
+ </View>
339
345
  {
340
346
  item.refund != "0.00" && item.refund != "100.00" &&
341
347
  <Text allowFontScaling={false} style={styleID_12nkjf}>{LibUtils.money(item.price)}</Text>
@@ -362,16 +368,20 @@ export default function m(props: EventOrder_rescheduleProps): any {
362
368
  <EventHeader title={result?.global_refundable == 1 ? esp.lang("event/order_reschedule", "refund_rescedule") : esp.lang("event/order_reschedule", "rescedule")} />
363
369
  {
364
370
  result?.global_refundable == 1 &&
365
- <View style={{ margin: 15, marginBottom: 0, flexDirection: 'row' }}>
371
+ <View style={{ margin: 15, padding: 3, borderRadius: 5, backgroundColor: '#fff', flexDirection: 'row' }}>
366
372
  {
367
373
  defaultTabs.map((item: any, i: number) => {
374
+ let active = item.id == activeTab
368
375
  return (
369
- <Pressable onPress={() => {
370
- loadData()
371
- setActiveTab(item.id)()
372
- }} key={i} style={{ flex: 1, padding: 10, borderTopLeftRadius: 10, borderTopRightRadius: 10, backgroundColor: item.id == activeTab ? "#fff" : LibStyle.colorBgGrey }}>
373
- <Text allowFontScaling={false} style={{ opacity: item.id == activeTab ? 1 : 0.7, alignSelf: 'center', textAlign: 'center', fontFamily: "Arial", fontWeight: item.id == activeTab ? "bold" : "normal", fontStyle: "normal", letterSpacing: 0, color: item.id == activeTab ? "#000" : "#aab0b7" }} >{item.title}</Text>
374
- </Pressable>
376
+ <TouchableOpacity
377
+ key={i}
378
+ onPress={() => {
379
+ loadData()
380
+ setActiveTab(item.id)()
381
+ }}
382
+ style={{ borderRadius: 5, padding: 5, alignContent: 'center', alignItems: 'center', justifyContent: 'center', flex: 1, backgroundColor: active ? LibStyle.colorPrimary : '#fff', marginRight: 1, marginLeft: 1 }}>
383
+ <Text allowFontScaling={false} style={{ fontSize: active ? 16 : 12, color: active ? "#fff" : "#000", fontWeight: active ? 'bold' : 'normal' }}>{item?.title}</Text>
384
+ </TouchableOpacity>
375
385
  )
376
386
  })
377
387
  }
@@ -381,8 +391,11 @@ export default function m(props: EventOrder_rescheduleProps): any {
381
391
  <ScrollView refreshControl={
382
392
  <RefreshControl refreshing={refreshing} onRefresh={onRefresh} />
383
393
  }>
384
- <View style={{ marginTop: result?.global_refundable == 1 ? 0 : 10, margin: 15, borderTopLeftRadius: 0, borderTopRightRadius: 0, borderRadius: 10, backgroundColor: '#fff', paddingBottom: activeTab == 2 ? 10 : 0 }}>
385
- <LibPicture source={{ uri: result?.image }} style={applyStyle({ borderTopLeftRadius: 0, borderTopRightRadius: 0, height: imgHeight, width: imgWidth, resizeMode: 'cover' })} />
394
+ <View style={{ marginTop: result?.global_refundable == 1 ? 0 : 10, margin: 15, borderRadius: 10, backgroundColor: '#fff', paddingBottom: activeTab == 2 ? 10 : 0 }}>
395
+ {
396
+ result?.image != "" &&
397
+ <LibPicture source={{ uri: result?.image }} style={applyStyle({ height: imgHeight, width: imgWidth, resizeMode: 'cover' })} />
398
+ }
386
399
 
387
400
  <View style={{ flexDirection: 'row', margin: 14, marginTop: 4, justifyContent: 'space-between' }}>
388
401
  <Text allowFontScaling={false} style={{ marginTop: 14, fontFamily: "Arial", fontSize: 20, fontWeight: "bold", fontStyle: "normal", letterSpacing: 0, color: "#484848" }}>{result?.title}</Text>
@@ -401,7 +414,7 @@ export default function m(props: EventOrder_rescheduleProps): any {
401
414
 
402
415
  {
403
416
  activeTab == 2 &&
404
- <View style={{ padding: 14, backgroundColor: '#f1f2f3' }}>
417
+ <View style={{ padding: 14, marginTop: 10, backgroundColor: '#f1f2f3' }}>
405
418
  <Text style={{ fontFamily: "Arial", fontSize: 12, fontWeight: "bold", fontStyle: "normal", letterSpacing: 0 }} >{esp.lang("event/order_reschedule", "ready_ticket")}</Text>
406
419
  </View>
407
420
  }
@@ -40,16 +40,28 @@ export default function m(props: EventOrder_share_toProps): any {
40
40
  const [trxId] = useSafeState(EventTransaction().getTrxId())
41
41
 
42
42
  const [result, setResult] = useSafeState<any>()
43
+ const [addOnsBooked, setAddOnsBooked] = useSafeState<any>()
43
44
 
44
45
  function loadData(): void {
45
46
  new LibCurl(url, null, (res) => {
46
47
  setResult(res)
48
+ if (res?.hasOwnProperty('url_addons_booked')) {
49
+ loadDataAddonsBooked(res?.url_addons_booked)
50
+ }
47
51
  }, (error) => {
48
52
  LibDialog.warning(esp.lang("event/order_share_to", "load_error"), error?.message);
49
53
  LibNavigation.back()
50
54
  })
51
55
  }
52
56
 
57
+ function loadDataAddonsBooked(url: any) {
58
+ new LibCurl(url, null, (res) => {
59
+ setAddOnsBooked(res)
60
+ }, (error) => {
61
+ LibDialog.warning(esp.lang("event/order_share_to", "load_error"), error?.message);
62
+ })
63
+ }
64
+
53
65
  useEffect(() => {
54
66
  loadData()
55
67
  }, [])
@@ -97,6 +109,8 @@ export default function m(props: EventOrder_share_toProps): any {
97
109
  )
98
110
  }
99
111
 
112
+ esp.log(addOnsBooked);
113
+
100
114
  return (
101
115
  <LibKeyboard_avoid style={{ flex: 1, backgroundColor: '#fff' }}>
102
116
  <EventHeader title={esp.lang("event/order_share_to", "title_share_ticket_to", esp.appjson().expo.name)} />
@@ -86,7 +86,7 @@ export default function m(props: EventOrder_waitingProps): any {
86
86
  item?.status == 0 ?
87
87
  <View style={applyStyle({ marginHorizontal: 25, marginBottom: 10, flex: 1, borderTopColor: "#000", borderTopWidth: 1, flexDirection: 'row', alignItems: 'center', justifyContent: 'space-between', alignContent: 'center' })}>
88
88
  <View style={{ flex: 1 }}>
89
- <EventCountdown_base expired={LibUtils.moment(item?.exp_payment).serverFormat('YYYY-MM-DD HH:mm:ss', item?.timezone)} style={applyStyle({ fontSize: 12, color: LibStyle.colorRed, fontFamily: "ArialBold", fontWeight: "normal", fontStyle: "normal" })} />
89
+ <EventCountdown_base expired={LibUtils.moment(item?.exp_payment).serverFormat('YYYY-MM-DD HH:mm:ss', item?.timezone)} timezone={item?.timezone} style={applyStyle({ fontSize: 12, color: LibStyle.colorRed, fontFamily: "ArialBold", fontWeight: "normal", fontStyle: "normal" })} />
90
90
  </View>
91
91
  {
92
92
  !!item?.booking_code &&
@@ -0,0 +1,18 @@
1
+ // withHooks
2
+
3
+ import useGlobalSubscriber from 'esoftplay/subscribe';
4
+
5
+
6
+ export interface EventPayment_subscribeArgs {
7
+
8
+ }
9
+ export interface EventPayment_subscribeProps {
10
+
11
+ }
12
+
13
+ export const reBooking = useGlobalSubscriber()
14
+ export const reTryBooking = useGlobalSubscriber()
15
+
16
+ export default function m(props: EventPayment_subscribeProps): any {
17
+ return null
18
+ }
@@ -0,0 +1,35 @@
1
+ // withHooks
2
+
3
+ import { EventButton } from 'esoftplay/cache/event/button/import';
4
+ import { EventHeader } from 'esoftplay/cache/event/header/import';
5
+ import { LibFont } from 'esoftplay/cache/lib/font/import';
6
+ import { LibNavigation } from 'esoftplay/cache/lib/navigation/import';
7
+ import { LibStyle } from 'esoftplay/cache/lib/style/import';
8
+ import React from 'react';
9
+ import { ScrollView, Text, View } from 'react-native';
10
+
11
+
12
+ export interface EventPoint_eventsArgs {
13
+
14
+ }
15
+ export interface EventPoint_eventsProps {
16
+
17
+ }
18
+ export default function m(props: EventPoint_eventsProps): any {
19
+ return (
20
+ <View style={{ flex: 1, backgroundColor: LibStyle.colorBgGrey }}>
21
+ <EventHeader title='Pilih Event Aktif' />
22
+ <ScrollView>
23
+ <View style={{ margin: 15, }}>
24
+ <Text allowFontScaling={false} style={{ marginTop: 20, fontSize: 20, fontFamily: LibFont('ArialBold') }}>Pilih Event Aktif</Text>
25
+ <Text allowFontScaling={false} style={{ fontFamily: LibFont('SFProText'), marginTop: 3 }}>Silahkan pilih event untuk melihat point anda</Text>
26
+ </View>
27
+
28
+ </ScrollView>
29
+ <EventButton style={{ margin: 15 }} label='Selanjutnya' backgroundColor='#002045' onPress={() => {
30
+ LibNavigation.navigate('event/point_summary')
31
+ }} />
32
+
33
+ </View>
34
+ )
35
+ }
@@ -0,0 +1,101 @@
1
+ // withHooks
2
+ import { EventButton } from 'esoftplay/cache/event/button/import';
3
+ import { EventHeader } from 'esoftplay/cache/event/header/import';
4
+ import { LibIcon } from 'esoftplay/cache/lib/icon/import';
5
+ import { LibNavigation } from 'esoftplay/cache/lib/navigation/import';
6
+ import { LibStyle } from 'esoftplay/cache/lib/style/import';
7
+ import { useEffect } from 'react';
8
+
9
+ import React from 'react';
10
+ import { ScrollView, Text, TouchableOpacity, View } from 'react-native';
11
+ import Animated, { useAnimatedStyle, useSharedValue, withRepeat, withTiming } from 'react-native-reanimated';
12
+
13
+
14
+ export interface EventPoint_redemptionArgs {
15
+
16
+ }
17
+ export interface EventPoint_redemptionProps {
18
+
19
+ }
20
+ export default function m(props: EventPoint_redemptionProps): any {
21
+ const opacity = useSharedValue(1)
22
+
23
+ useEffect(() => {
24
+ opacity.value = withRepeat(
25
+ withTiming(0.7, {
26
+ duration: 1000,
27
+ }),
28
+ -1, // infinite
29
+ true // reverse
30
+ )
31
+ }, [])
32
+ const animatedStyle = useAnimatedStyle(() => ({
33
+ opacity: opacity.value,
34
+ }))
35
+
36
+ let mainColor = /* exchange */"#059669" /* redem #002045 */
37
+
38
+ return (
39
+ <View style={{ flex: 1, backgroundColor: LibStyle.colorBgGrey }}>
40
+ <EventHeader title='Point Redemption' subtitle='NAMA EVENT NIH' />
41
+ <ScrollView>
42
+ <TouchableOpacity onPress={() => {
43
+ LibNavigation.navigateForResult('component/scanner').then((value) => {
44
+ LibNavigation.navigate('event/point_redemption_input', { qr: value })
45
+ })
46
+ }} style={{ margin: 10, backgroundColor: '#fff', borderRadius: 10, overflow: 'hidden', ...LibStyle.elevation(2) }}>
47
+ <View style={{ backgroundColor: '#002045', padding: 30 }}>
48
+ <Animated.View style={[
49
+ {
50
+ width: 50,
51
+ height: 50,
52
+ borderRadius: 25,
53
+ backgroundColor: '#4A607A',
54
+ justifyContent: 'center', alignContent: 'center', alignItems: 'center', alignSelf: 'center'
55
+ },
56
+ animatedStyle,
57
+ ]}>
58
+ <LibIcon name='qrcode-scan' color='#fff' size={30} />
59
+ </Animated.View>
60
+ </View>
61
+ <View style={{ padding: 10 }}>
62
+ <View style={{ flexDirection: 'row' }}>
63
+ <View style={{ flex: 1, marginRight: 10 }}>
64
+ <Text allowFontScaling={false} style={{ fontSize: 17, fontWeight: 'bold' }}>Penukaran Point</Text>
65
+ <Text allowFontScaling={false} style={{}}>Pindai QR member untuk menambahkan poin dari struk belanja{/* atau memproses penukaran poin. */}</Text>
66
+ </View>
67
+ <View>
68
+ <View style={{ padding: 5, borderRadius: 5, backgroundColor: '#FFEFD7' }}>
69
+ <LibIcon name='shield-key-outline' />
70
+ </View>
71
+ </View>
72
+ </View>
73
+ </View>
74
+ <EventButton style={{ margin: 10 }} label='Scan QR Member' backgroundColor='#001B3C' onPress={() => {
75
+ LibNavigation.navigateForResult('component/scanner').then((value) => {
76
+ LibNavigation.navigate('event/point_redemption_input', { qr: value })
77
+ // LibNavigation.navigate('event/point_redemption_exchange', { qr: value })
78
+ })
79
+ }} />
80
+ </TouchableOpacity>
81
+
82
+ <Text allowFontScaling={false} style={{ margin: 10, marginBottom: 0, letterSpacing: 1.5, fontWeight: 'bold' }}>RIWAYAT PENUKARAN</Text>
83
+
84
+ <View style={{ margin: 10, marginBottom: 0, borderWidth: 1, borderColor: '#C5C7C8', borderRadius: 10, padding: 10, flexDirection: 'row' }}>
85
+ <View>
86
+ <View style={{ padding: 5, borderRadius: 5, backgroundColor: '#B2C8E6' }}>
87
+ <LibIcon name={'file-document'} color='#fff' />
88
+ </View>
89
+ </View>
90
+ <View style={{ flex: 1, marginLeft: 10, alignContent: 'center', justifyContent: 'center' }}>
91
+ <Text allowFontScaling={false} style={{ fontSize: 16 }}>{"Redeem struk belanja"}</Text>
92
+ </View>
93
+ <View style={{ alignContent: 'center', justifyContent: 'center' }}>
94
+ <Text allowFontScaling={false} style={{ fontSize: 22, fontWeight: 'bold', color: LibStyle.colorGreen }}>{"+ 400"}</Text>
95
+ </View>
96
+ </View>
97
+
98
+ </ScrollView>
99
+ </View>
100
+ )
101
+ }
@@ -0,0 +1,60 @@
1
+ // withHooks
2
+ import { EventButton } from 'esoftplay/cache/event/button/import';
3
+ import { EventHeader } from 'esoftplay/cache/event/header/import';
4
+ import { LibFont } from 'esoftplay/cache/lib/font/import';
5
+ import { LibIcon } from 'esoftplay/cache/lib/icon/import';
6
+ import { LibPicture } from 'esoftplay/cache/lib/picture/import';
7
+ import { LibStyle } from 'esoftplay/cache/lib/style/import';
8
+
9
+ import React from 'react';
10
+ import { ScrollView, Text, TouchableOpacity, View } from 'react-native';
11
+
12
+
13
+ export interface EventPoint_redemption_exchangeArgs {
14
+
15
+ }
16
+ export interface EventPoint_redemption_exchangeProps {
17
+
18
+ }
19
+ export default function m(props: EventPoint_redemption_exchangeProps): any {
20
+ return (
21
+ <View style={{ flex: 1, backgroundColor: LibStyle.colorBgGrey }}>
22
+ <EventHeader />
23
+ <ScrollView>
24
+
25
+ <View style={{ margin: 15, marginBottom: 0, padding: 10, borderRadius: 10, backgroundColor: '#059669', overflow: 'hidden' }}>
26
+ <View style={{ opacity: 0.3, height: 100, width: 150, top: -40, right: -40, position: 'absolute', }}>
27
+ <LibIcon name='shield-check' size={150} color='#fff' />
28
+ </View>
29
+ <View style={{ marginBottom: 20, flexDirection: 'row' }}>
30
+ <LibPicture source={{ uri: 'https://0.soompi.io/wp-content/uploads/2025/11/17232014/karina-chanel-beauty-2.jpg' }} style={{ height: 50, width: 50, borderRadius: 30 }} />
31
+ <View style={{ marginLeft: 10, alignContent: 'center', justifyContent: 'center', }}>
32
+ <Text allowFontScaling={false} style={{ fontWeight: 'bold', fontSize: 16, color: '#fff' }}>{"KATARINABLUEEE"}</Text>
33
+ <Text allowFontScaling={false} style={{ letterSpacing: 1, color: '#fff' }}>{"katarinabluee@gmail.com"}</Text>
34
+ </View>
35
+ </View>
36
+ <Text allowFontScaling={false} style={{ color: '#fff', fontFamily: LibFont('SFProText'), letterSpacing: 1, fontSize: 12 }}>{"POINT TERSEDIA"}</Text>
37
+ <Text allowFontScaling={false} style={{ color: '#fff', marginTop: 5, fontFamily: LibFont('DecoNumbers'), fontSize: 36, letterSpacing: 1.5 }}>{"1000"}<Text style={{ fontSize: 14, fontWeight: 'normal' }}>{" POINT"}</Text> </Text>
38
+ </View>
39
+
40
+ <Text allowFontScaling={false} style={{ margin: 15, marginBottom: 0, letterSpacing: 1.5, fontWeight: 'bold' }}>REWARD TERSEDIA</Text>
41
+
42
+ <TouchableOpacity style={{ margin: 15, marginBottom: 0, borderWidth: 1, borderColor: '#C5C7C8', backgroundColor: '#fff', borderRadius: 10, padding: 10, flexDirection: 'row', alignContent: 'center', alignItems: 'center' }}>
43
+ <View>
44
+ <View style={{ padding: 5, borderRadius: 5, backgroundColor: '#4EDEA3' }}>
45
+ <LibIcon name={'medal'} color='#fff' />
46
+ </View>
47
+ </View>
48
+ <View style={{ flex: 1, marginLeft: 10, marginRight: 10, alignContent: 'center', justifyContent: 'center' }}>
49
+ <Text allowFontScaling={false} style={{ fontFamily: LibFont('ArialBold'), fontSize: 16 }}>{"Redeem struk belanja untuk tas bigbang besar warna kuning"}</Text>
50
+ <Text allowFontScaling={false} style={{ marginTop: 5, fontSize: 20, fontFamily: LibFont('DecoNumbers'), color: LibStyle.colorGreen }}>{"400 Point"}</Text>
51
+ </View>
52
+ <LibIcon name='checkbox-blank-circle-outline' color='#059669' />
53
+ </TouchableOpacity>
54
+
55
+ </ScrollView>
56
+ <EventButton style={{ margin: 10 }} backgroundColor={"#059669"} label='TUKARKAN' onPress={() => { }} />
57
+
58
+ </View>
59
+ )
60
+ }
@@ -0,0 +1,56 @@
1
+ // withHooks
2
+ import { EventButton } from 'esoftplay/cache/event/button/import';
3
+ import { EventHeader } from 'esoftplay/cache/event/header/import';
4
+ import { LibFont } from 'esoftplay/cache/lib/font/import';
5
+ import { LibInput } from 'esoftplay/cache/lib/input/import';
6
+ import { LibKeyboard_avoid } from 'esoftplay/cache/lib/keyboard_avoid/import';
7
+ import { LibNavigation } from 'esoftplay/cache/lib/navigation/import';
8
+ import { LibPicture } from 'esoftplay/cache/lib/picture/import';
9
+ import { LibStyle } from 'esoftplay/cache/lib/style/import';
10
+
11
+ import React from 'react';
12
+ import { ScrollView, Text, View } from 'react-native';
13
+
14
+
15
+ export interface EventPoint_redemption_inputArgs {
16
+
17
+ }
18
+ export interface EventPoint_redemption_inputProps {
19
+
20
+ }
21
+ export default function m(props: EventPoint_redemption_inputProps): any {
22
+ const { qr } = LibNavigation.getArgsAll(props)
23
+
24
+ return (
25
+ <View style={{ flex: 1, backgroundColor: LibStyle.colorBgGrey }}>
26
+ <EventHeader title='Input Kupon Member' />
27
+ <LibKeyboard_avoid>
28
+ <ScrollView>
29
+ <View style={{ margin: 15, marginBottom: 0, backgroundColor: '#fff', padding: 10, borderWidth: 1, borderRadius: 10, borderColor: '#7992BD', flexDirection: 'row' }}>
30
+ <LibPicture source={{ uri: 'https://0.soompi.io/wp-content/uploads/2025/11/17232014/karina-chanel-beauty-2.jpg' }} style={{ height: 50, width: 50, borderRadius: 30 }} />
31
+ <View style={{ marginLeft: 10, alignContent: 'center', justifyContent: 'center', }}>
32
+ <Text allowFontScaling={false} style={{ fontWeight: 'bold', fontSize: 16, color: '#002045' }}>{"KATARINABLUEEE"}</Text>
33
+ <Text allowFontScaling={false} style={{ letterSpacing: 1 }}>{"katarinabluee@gmail.com"}</Text>
34
+ </View>
35
+ </View>
36
+
37
+ <View style={{ margin: 15, backgroundColor: '#002045', padding: 10, borderRadius: 10 }}>
38
+ <Text allowFontScaling={false} style={{ color: '#fff', letterSpacing: 1 }}>{"Point saat ini"}</Text>
39
+ <Text allowFontScaling={false} style={{ color: '#fff', fontFamily: LibFont('DecoNumbers'), fontSize: 40, marginTop: 5, letterSpacing: 1.5 }}>{"1000"}</Text>
40
+ </View>
41
+
42
+ <Text allowFontScaling={false} style={{ alignSelf: 'center', fontWeight: 'bold', marginTop: 15, fontSize: 16, color: '#002045' }}>{"MASUKKAN TOTAL HARGA STRUK"}</Text>
43
+ <View style={{ flex: 1, width: LibStyle.width / 2, alignSelf: 'center' }}>
44
+ <LibInput
45
+ style={{ textAlign: 'center', fontSize: 30, marginTop: -10 }}
46
+ keyboardType='phone-pad'
47
+ />
48
+ </View>
49
+ </ScrollView>
50
+ <EventButton style={{ margin: 15 }} label='Lanjutkan Penukaran' backgroundColor='#002045' onPress={() => {
51
+ LibNavigation.navigate('event/point_redemption_success')
52
+ }} />
53
+ </LibKeyboard_avoid>
54
+ </View>
55
+ )
56
+ }
@@ -0,0 +1,50 @@
1
+ // withHooks
2
+ import { EventButton } from 'esoftplay/cache/event/button/import';
3
+ import { EventHeader } from 'esoftplay/cache/event/header/import';
4
+ import { LibFont } from 'esoftplay/cache/lib/font/import';
5
+ import { LibIcon } from 'esoftplay/cache/lib/icon/import';
6
+ import { LibPicture } from 'esoftplay/cache/lib/picture/import';
7
+ import { LibStyle } from 'esoftplay/cache/lib/style/import';
8
+
9
+ import React from 'react';
10
+ import { ScrollView, Text, View } from 'react-native';
11
+
12
+
13
+ export interface EventPoint_redemption_successArgs {
14
+
15
+ }
16
+ export interface EventPoint_redemption_successProps {
17
+
18
+ }
19
+ export default function m(props: EventPoint_redemption_successProps): any {
20
+ return (
21
+ <View style={{ flex: 1, backgroundColor: LibStyle.colorBgGrey }}>
22
+ <EventHeader />
23
+ <ScrollView>
24
+ <View style={{ padding: 10, marginTop: 30, alignContent: 'center', alignItems: 'center', justifyContent: 'center' }}>
25
+ <View style={{ height: 100, width: 100, alignContent: 'center', alignItems: 'center', justifyContent: 'center', borderRadius: 50, backgroundColor: '#002045' }}>
26
+ <LibIcon name='check-circle' color='#fff' size={50} />
27
+ </View>
28
+ <Text allowFontScaling={false} style={{ marginTop: 20, fontSize: 20, fontFamily: LibFont('ArialBold') }}>Point berhasil ditambahkan</Text>
29
+ <Text allowFontScaling={false} style={{ fontFamily: LibFont('SFProText'), marginTop: 3 }}>Transaksi telah berhasil diproses.</Text>
30
+ </View>
31
+
32
+ <View style={{ margin: 15, padding: 10, backgroundColor: '#fff', borderRadius: 10 }}>
33
+ <View style={{ paddingBottom: 10, flexDirection: 'row', borderBottomWidth: 1, borderBottomColor: LibStyle.colorBgGrey }}>
34
+ <LibPicture source={{ uri: 'https://0.soompi.io/wp-content/uploads/2025/11/17232014/karina-chanel-beauty-2.jpg' }} style={{ height: 50, width: 50, borderRadius: 30 }} />
35
+ <View style={{ marginLeft: 10, alignContent: 'center', justifyContent: 'center', }}>
36
+ <Text allowFontScaling={false} style={{ fontWeight: 'bold', fontSize: 16, color: '#002045' }}>{"KATARINABLUEEE"}</Text>
37
+ <Text allowFontScaling={false} style={{ letterSpacing: 1 }}>{"katarinabluee@gmail.com"}</Text>
38
+ </View>
39
+ </View>
40
+ <View style={{ marginTop: 15, borderRadius: 10, padding: 10, backgroundColor: '#AEC7F5' }}>
41
+ <Text allowFontScaling={false} style={{ color: '#000', letterSpacing: 1, fontFamily: LibFont('SFProText') }}>{"Point diperoleh"}</Text>
42
+ <Text allowFontScaling={false} style={{ color: '#002045', marginTop: 5, fontFamily: LibFont('DecoNumbers'), fontSize: 40, letterSpacing: 1.5 }}>{"+1000"}<Text style={{ fontSize: 14 }}> point</Text></Text>
43
+ </View>
44
+ </View>
45
+
46
+ </ScrollView>
47
+ <EventButton style={{ margin: 10 }} backgroundColor={"#002045"} label='Kembali' onPress={() => { }} />
48
+ </View>
49
+ )
50
+ }
@@ -0,0 +1,48 @@
1
+ // withHooks
2
+ import { EventHeader } from 'esoftplay/cache/event/header/import';
3
+ import { LibFont } from 'esoftplay/cache/lib/font/import';
4
+ import { LibIcon } from 'esoftplay/cache/lib/icon/import';
5
+ import { LibStyle } from 'esoftplay/cache/lib/style/import';
6
+
7
+ import React from 'react';
8
+ import { ScrollView, Text, View } from 'react-native';
9
+
10
+
11
+ export interface EventPoint_summaryArgs {
12
+
13
+ }
14
+ export interface EventPoint_summaryProps {
15
+
16
+ }
17
+ export default function m(props: EventPoint_summaryProps): any {
18
+ return (
19
+ <View style={{ flex: 1, backgroundColor: LibStyle.colorBgGrey }}>
20
+ <EventHeader title='Point Saya' />
21
+ <ScrollView>
22
+
23
+ <View style={{ margin: 15, marginBottom: 0, padding: 10, borderRadius: 10, backgroundColor: '#059669', height: 120, overflow: 'scroll' }}>
24
+ <View style={{ opacity: 0.3, height: 100, width: 150, top: -40, right: -40, position: 'absolute', }}>
25
+ <LibIcon name='star-circle' size={150} color='#fff' />
26
+ </View>
27
+ <Text allowFontScaling={false} style={{ color: '#fff', fontFamily: LibFont('SFProText'), letterSpacing: 1, fontSize: 12 }}>{"POINT SAAT INI"}</Text>
28
+ <Text allowFontScaling={false} style={{ color: '#fff', marginTop: 5, fontFamily: LibFont('DecoNumbers'), fontSize: 40, letterSpacing: 1.5 }}>{"1000"}<Text style={{ fontSize: 14, fontWeight: 'normal' }}>{" POINT"}</Text> </Text>
29
+ </View>
30
+
31
+ <View style={{ margin: 15, marginBottom: 0,backgroundColor:'#E1E3E4', borderWidth: 1, borderColor: '#C5C7C8', borderRadius: 10, padding: 10, flexDirection: 'row' }}>
32
+ <View>
33
+ <View style={{ padding: 5, borderRadius: 333, backgroundColor: '#059669' }}>
34
+ <LibIcon name={'piggy-bank-outline'} color='#fff' />
35
+ </View>
36
+ </View>
37
+ <View style={{ flex: 1, marginLeft: 10 }}>
38
+ <Text allowFontScaling={false} style={{ fontSize: 12, letterSpacing: 1.5, fontWeight: 'bold' }}>{"CARA DAPAT POINT"}</Text>
39
+ <Text allowFontScaling={false} style={{ fontSize: 12, letterSpacing: 1 }}>{"Dapatkan poin dengan melakukan pembelian di area event dan menukarka struk pembelian ke booth penukaran"}</Text>
40
+ </View>
41
+ </View>
42
+
43
+ <Text allowFontScaling={false} style={{ margin: 15, marginBottom: 0, letterSpacing: 1.5, fontWeight: 'bold' }}>RIWAYAT PENUKARAN</Text>
44
+
45
+ </ScrollView>
46
+ </View>
47
+ )
48
+ }
package/event/popup.tsx CHANGED
@@ -29,7 +29,7 @@ export default function m(props: EventPopupProps): any {
29
29
  }
30
30
  if (props.qrcode)
31
31
  post.qr = props.qrcode?.trim?.()
32
- new LibCurl('user', post,
32
+ new LibCurl('user_search', post,
33
33
  (res, msg) => {
34
34
  setData(res)
35
35
  },
@@ -52,7 +52,7 @@ export default function m(props: EventPopupProps): any {
52
52
  <View style={{ alignItems: 'center' }} >
53
53
  <LibPicture
54
54
  source={{ uri: data.image }}
55
- style={{ width: 100, height: 100, borderRadius: 50 }}
55
+ style={{ width: 80, height: 80, borderRadius: 40 }}
56
56
  />
57
57
  <Text style={{ textAlign: 'center', marginTop: 20, fontFamily: "Arial", fontSize: 14, fontWeight: "bold", color: "#4a4a4a" }} >{data.name}</Text>
58
58
  <Text style={{ textAlign: 'center', fontFamily: "Arial", fontSize: 10, fontWeight: "bold", lineHeight: 22, color: "#b7b7b7" }} >{data.email}</Text>
@@ -63,12 +63,12 @@ export default function m(props: EventPopupProps): any {
63
63
 
64
64
  <View style={{ flexDirection: 'row', marginTop: 20 }} >
65
65
  <TouchableOpacity onPress={props.cancel} style={{ flex: 1, marginHorizontal: 5 }} >
66
- <View style={{ height: 40, borderRadius: 25, justifyContent: 'center', alignItems: 'center' }} >
66
+ <View style={{ height: 40, borderRadius: 5, justifyContent: 'center', alignItems: 'center' }} >
67
67
  <Text style={{ fontFamily: "Arial", fontSize: 15, fontWeight: "normal", lineHeight: 22, color: LibStyle.colorRed }} >{esp.lang("event/popup", "cancel")}</Text>
68
68
  </View>
69
69
  </TouchableOpacity>
70
70
  <TouchableOpacity onPress={props.redirect} style={{ flex: 1, marginHorizontal: 5 }} >
71
- <View style={{ height: 40, borderRadius: 25, backgroundColor: LibStyle.colorGreen, justifyContent: 'center', alignItems: 'center' }} >
71
+ <View style={{ height: 40, borderRadius: 5, backgroundColor: LibStyle.colorGreen, justifyContent: 'center', alignItems: 'center' }} >
72
72
  <Text style={{ fontFamily: "Arial", fontSize: 15, fontWeight: "normal", lineHeight: 22, color: "white" }} >{esp.lang("event/popup", "confirm")}</Text>
73
73
  </View>
74
74
  </TouchableOpacity>