esoftplay-event 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (83) hide show
  1. package/event/artist.tsx +11 -7
  2. package/event/artist_detail.tsx +3 -5
  3. package/event/artist_detailv2.tsx +386 -0
  4. package/event/artistv2.tsx +162 -0
  5. package/event/button_order_detail.tsx +43 -0
  6. package/event/countdown_base.tsx +16 -3
  7. package/event/countdown_event.tsx +47 -0
  8. package/event/detail.tsx +30 -37
  9. package/event/detail2.tsx +354 -0
  10. package/event/exchange_ticket.tsx +1 -1
  11. package/event/exchange_ticket_list.tsx +2 -3
  12. package/event/exchange_ticket_result.tsx +1 -1
  13. package/event/firebase_socket.ts +8 -0
  14. package/event/loading_page.tsx +4 -2
  15. package/event/order.tsx +23 -36
  16. package/event/order_detail.tsx +119 -41
  17. package/event/order_detail_upgrade.tsx +8 -5
  18. package/event/order_detail_upgrade_payment.tsx +17 -11
  19. package/event/order_detail_visitor.tsx +33 -33
  20. package/event/order_detail_waiting.tsx +45 -20
  21. package/event/order_item.tsx +1 -1
  22. package/event/order_lottery.tsx +48 -36
  23. package/event/order_reschedule.tsx +50 -52
  24. package/event/order_share_to.tsx +11 -24
  25. package/event/order_share_to_detail.tsx +8 -3
  26. package/event/order_waiting.tsx +1 -1
  27. package/event/queue_pricing.tsx +16 -3
  28. package/event/refresh_button.tsx +3 -5
  29. package/event/scan_item.tsx +2 -2
  30. package/event/seat.tsx +19 -11
  31. package/event/seat_map_new.tsx +313 -0
  32. package/event/secure_page.debug.tsx +34 -0
  33. package/event/secure_page.live.tsx +35 -0
  34. package/event/secure_page.tsx +6 -5
  35. package/event/test.tsx +240 -155
  36. package/event/ticket_list.tsx +49 -21
  37. package/event/ticket_list2.tsx +83 -34
  38. package/event/tms_check_code.tsx +6 -0
  39. package/event/tms_check_ticket_result.tsx +36 -7
  40. package/event/tms_dashboard.tsx +85 -3
  41. package/event/tms_gate.tsx +6 -0
  42. package/event/tms_home.tsx +1 -4
  43. package/event/tms_in_failed.tsx +1 -1
  44. package/event/tms_in_log.tsx +2 -0
  45. package/event/tms_in_success.tsx +1 -1
  46. package/event/tms_log.tsx +10 -25
  47. package/event/tms_out.tsx +1 -1
  48. package/event/tms_out_failed.tsx +1 -1
  49. package/event/visitor_input.tsx +23 -5
  50. package/event/visitor_inputv2.tsx +397 -0
  51. package/event/voucher.tsx +2 -0
  52. package/event/voucher2.tsx +14 -6
  53. package/id.json +25 -9
  54. package/package.json +1 -1
  55. package/event/entrance.tsx +0 -215
  56. package/event/entrance_again.tsx +0 -199
  57. package/event/entrance_failed.tsx +0 -190
  58. package/event/entrance_idcard.tsx +0 -199
  59. package/event/entrance_list.tsx +0 -264
  60. package/event/entrance_list_item.tsx +0 -88
  61. package/event/entrance_log.tsx +0 -130
  62. package/event/entrance_success.tsx +0 -153
  63. package/event/entrance_warning.tsx +0 -91
  64. package/event/exit.tsx +0 -91
  65. package/event/exit_failed.tsx +0 -135
  66. package/event/exit_list.tsx +0 -118
  67. package/event/exit_log.tsx +0 -130
  68. package/event/exit_success.tsx +0 -143
  69. package/event/exit_temporary.tsx +0 -226
  70. package/event/firebase_socket.debug.ts +0 -260
  71. package/event/firebase_socket.live.ts +0 -335
  72. package/event/hall_in.tsx +0 -148
  73. package/event/hall_in_failed.tsx +0 -270
  74. package/event/hall_in_list.tsx +0 -222
  75. package/event/hall_in_log.tsx +0 -134
  76. package/event/hall_in_success.tsx +0 -132
  77. package/event/hall_out.tsx +0 -143
  78. package/event/hall_out_failed.tsx +0 -133
  79. package/event/hall_out_list.tsx +0 -215
  80. package/event/hall_out_log.tsx +0 -133
  81. package/event/hall_out_success.tsx +0 -130
  82. package/event/log.tsx +0 -433
  83. package/event/seat_map_test.tsx +0 -401
@@ -7,7 +7,7 @@ import { TextInput, View } from 'react-native';
7
7
 
8
8
 
9
9
  export interface EventCountdown_baseArgs {
10
-
10
+
11
11
  }
12
12
  export interface EventCountdown_baseProps {
13
13
  expired: string,
@@ -17,6 +17,7 @@ export interface EventCountdown_baseProps {
17
17
  onlyDay?: boolean
18
18
  onExpired?: () => void
19
19
  hideTimeUnit?: boolean
20
+ showDayUnit?: boolean
20
21
  }
21
22
 
22
23
  const fixSingleNumber = (number: number) => number < 10 ? '0' + number : number
@@ -24,7 +25,7 @@ const fixSingleNumber = (number: number) => number < 10 ? '0' + number : number
24
25
  export default function m(props: EventCountdown_baseProps): any {
25
26
  const ref = useRef<TextInput>(null)
26
27
  let timmer = useRef<any>(undefined).current
27
-
28
+
28
29
  useEffect(() => {
29
30
  countDown()
30
31
  return () => {
@@ -63,6 +64,18 @@ export default function m(props: EventCountdown_baseProps): any {
63
64
  }
64
65
  }
65
66
  ref?.current?.setNativeProps({ text: text.filter((x, i) => !isNaN(Number(x))).map((d, id) => d + (props?.hideTimeUnit ? '' : ' ' + t[id])).join(" : ") })
67
+ } else if (props?.showDayUnit && props?.hideTimeUnit) {
68
+ const data = text
69
+ .filter((x, i) => !isNaN(Number(x)))
70
+ .map((d, id) => {
71
+ return (d + (id == 0 ? " " + t[0] + " " : ""))
72
+ })
73
+ const firstData = data[0]
74
+ data.splice(0, 1)
75
+
76
+ ref?.current?.setNativeProps({
77
+ text: firstData + " " + data.join(" : ")
78
+ })
66
79
  } else {
67
80
  ref?.current?.setNativeProps({ text: text.filter((x, i) => !isNaN(Number(x))).map((d, id) => d + (props?.hideTimeUnit ? '' : ' ' + t[id])).join(" : ") })
68
81
  }
@@ -77,7 +90,7 @@ export default function m(props: EventCountdown_baseProps): any {
77
90
 
78
91
  return (
79
92
  <View style={props.containerStyle} >
80
- <TextInput ref={ref} editable={false} style={props.style} />
93
+ <TextInput ref={ref} editable={false} allowFontScaling={false} style={props.style} />
81
94
  </View>
82
95
  )
83
96
  }
@@ -0,0 +1,47 @@
1
+ // withHooks
2
+ // noPage
3
+
4
+ import { EventCountdown_base } from 'esoftplay/cache/event/countdown_base/import';
5
+ import { LibStyle } from 'esoftplay/cache/lib/style/import';
6
+ import React, { useEffect } from 'react';
7
+ import { StyleProp, Text, TextStyle, View, ViewStyle } from 'react-native';
8
+ import Animated, { useAnimatedStyle, useSharedValue, withRepeat, withTiming } from 'react-native-reanimated';
9
+
10
+
11
+ export interface EventCountdown_eventArgs {
12
+
13
+ }
14
+ export interface EventCountdown_eventProps {
15
+ date: string,
16
+ containerStyle?: StyleProp<ViewStyle>
17
+ bulletStyle?: StyleProp<ViewStyle>,
18
+ style?: StyleProp<TextStyle>
19
+ }
20
+ export default function m(props: EventCountdown_eventProps): any {
21
+ const opacity = useSharedValue(1)
22
+
23
+ useEffect(() => {
24
+ opacity.value = withRepeat(
25
+ withTiming(0.2, { duration: 500 }),
26
+ -1,
27
+ true
28
+ )
29
+ }, [])
30
+
31
+ const animatedStyle = useAnimatedStyle(() => ({
32
+ opacity: opacity.value
33
+ }))
34
+
35
+ return (
36
+ <View style={[{ flexDirection: 'row', alignItems: 'center' }, props?.containerStyle]}>
37
+ <Animated.View style={[{ marginRight: 5, width: 8, height: 8, borderRadius: 5, backgroundColor: LibStyle.colorGreen }, animatedStyle, props?.bulletStyle]} />
38
+ <Text allowFontScaling={false} style={[{ fontFamily: "Arial", fontSize: 11, fontWeight: "bold", fontStyle: "normal", letterSpacing: 0, color: "#4a4a4a" }, props?.style]}>{esp.lang("event/countdown_event", "ends")}</Text>
39
+ <EventCountdown_base
40
+ expired={props.date}
41
+ showDayUnit
42
+ hideTimeUnit
43
+ style={[{ fontFamily: "Arial", fontSize: 11, fontWeight: "bold", fontStyle: "normal", letterSpacing: 0, color: "#4a4a4a" }, props?.style]}
44
+ />
45
+ </View>
46
+ )
47
+ }
package/event/detail.tsx CHANGED
@@ -11,12 +11,14 @@ import { LibVideoProperty } from 'esoftplay/cache/lib/video/import';
11
11
  import { LibWebview } from 'esoftplay/cache/lib/webview/import';
12
12
 
13
13
  import { applyStyle } from 'esoftplay';
14
+ import { EventCountdown_event } from 'esoftplay/cache/event/countdown_event/import';
14
15
  import { EventFirebase_socket, EventFirebase_socketProperty } from 'esoftplay/cache/event/firebase_socket/import';
15
16
  import { EventHeader } from 'esoftplay/cache/event/header/import';
16
17
  import { EventIndexProperty } from 'esoftplay/cache/event/index/import';
17
18
  import { EventSlider } from 'esoftplay/cache/event/slider/import';
18
19
  import { UseCondition } from 'esoftplay/cache/use/condition/import';
19
20
  import { UseDeeplinkProperty } from 'esoftplay/cache/use/deeplink/import';
21
+ import { UserClass } from 'esoftplay/cache/user/class/import';
20
22
  import esp from 'esoftplay/esp';
21
23
  import moment from 'esoftplay/moment';
22
24
  import useSafeState from 'esoftplay/state';
@@ -34,6 +36,7 @@ export default function m(props: EventDetailProps): any {
34
36
  const url = LibNavigation.getArgs(props, 'url')
35
37
  const [deeplinkParams] = UseDeeplinkProperty.params.useState()
36
38
  const [priority, setPriority] = useSafeState(false)
39
+ const user = UserClass.state().get()
37
40
 
38
41
  moment().locale('id')
39
42
  function loadData(): void {
@@ -58,7 +61,12 @@ export default function m(props: EventDetailProps): any {
58
61
  }
59
62
 
60
63
  useEffect(() => {
61
- loadData()
64
+ if (esp.isDebug("") && user?.email == "bagus@fisip.net") {
65
+ LibNavigation.replace('event/detail2', { url: url })
66
+ } else {
67
+ loadData()
68
+ }
69
+ // loadData()
62
70
  }, [])
63
71
 
64
72
  if (!result) {
@@ -103,7 +111,6 @@ export default function m(props: EventDetailProps): any {
103
111
  priceRange = LibUtils.money(result.price_min, curr)
104
112
  }
105
113
 
106
-
107
114
  function renderTag(x: any, i: number) {
108
115
  return (
109
116
  <Pressable key={i} onPress={() => { LibNavigation.navigate('event/list', { url: x?.url, keywords: x?.title }) }} style={styleId_qGD26}>
@@ -113,15 +120,6 @@ export default function m(props: EventDetailProps): any {
113
120
  }
114
121
 
115
122
  const date = moment().localeFormat('YYYY-MM-DD HH:mm:ss')
116
- const startBooking = result?.start_booking;
117
- const startDate: any = new Date(startBooking);
118
- const currentDate: any = new Date();
119
-
120
- // Hitung selisih hari antara tanggal sekarang dan startBooking
121
- const diffTime = startDate - currentDate;
122
- const diffDays = diffTime / (1000 * 60 * 60 * 24);
123
-
124
- esp.log(result);
125
123
 
126
124
  return (
127
125
  <View style={{ flex: 1, backgroundColor: '#fff' }} >
@@ -140,6 +138,15 @@ export default function m(props: EventDetailProps): any {
140
138
  <LibPicture source={esp.assets('icons/ic_calendar_grey.png')} style={{ width: 14, height: 14 }} />
141
139
  <Text allowFontScaling={false} style={{ marginLeft: 10, fontFamily: "Arial", fontSize: 12, fontWeight: "bold", fontStyle: "normal", letterSpacing: 0, color: "#f39c12" }} >{result.status == 4 ? esp.lang("event/detail", "evn_pending") : LibUtils.getDateRange(result.start_date, result.end_date, esp.lang("event/detail", "until"))}</Text>
142
140
  </View>
141
+ {
142
+ esp.isDebug("show_countdown") && result?.countdown_booking == 1 && result?.start_date != "0000-00-00" && result.end_date != '0000-00-00' &&
143
+ <EventCountdown_event
144
+ date={(result?.end_date + " " + result?.end_time)}
145
+ style={{ fontSize: 12 }}
146
+ bulletStyle={{ width: 14, height: 14, borderRadius: 7, marginRight: 10 }}
147
+ containerStyle={{ marginHorizontal: 20, marginBottom: 10 }}
148
+ />
149
+ }
143
150
  <View style={{ flexDirection: 'row', marginBottom: 10, alignItems: 'center', marginHorizontal: 20 }} >
144
151
  <LibPicture source={esp.assets('icons/ic_tickets_grey.png')} style={{ width: 14, height: 14 }} />
145
152
  <Text allowFontScaling={false} style={{ marginLeft: 10, fontFamily: "Arial", fontSize: 12, fontWeight: "normal", fontStyle: "normal", letterSpacing: 0, color: "#2980b9" }} >{result?.price_type == 0 ? esp.lang("event/detail", "tb_announce") : isFree ? esp.lang("event/detail", "text_free") : priceRange}</Text>
@@ -256,7 +263,7 @@ export default function m(props: EventDetailProps): any {
256
263
  <View style={{ height: 35, borderRadius: 17, backgroundColor: LibStyle.colorLightGrey, justifyContent: 'center', alignItems: 'center', paddingHorizontal: 9 }} >
257
264
  <Text allowFontScaling={false} style={{ fontFamily: "ArialBold", fontSize: 12, textAlign: "center", textAlignVertical: 'center', color: 'black', marginHorizontal: 10 }} >
258
265
  {
259
- esp.lang("event/detail", "text_book_on", moment(result.start_booking).serverFormat('DD MMMM YYYY H:mm:ss'))
266
+ esp.lang("event/detail", "text_book_on", moment(result.start_booking).serverFormat('DD MMMM YYYY H:mm:ss', result?.timezone), result?.timezone_locale || "")
260
267
  }
261
268
  </Text>
262
269
  </View>
@@ -278,31 +285,17 @@ export default function m(props: EventDetailProps): any {
278
285
  </TouchableOpacity>
279
286
  }
280
287
  <TouchableOpacity onPress={() => {
281
- EventIndexProperty.isLogin(() => {
282
-
288
+ EventIndexProperty.isLogin(async () => {
283
289
  if (isInPricingQueueConfig(result.id)) {
284
- LibNavigation.navigateForResult('event/queue_pricing', { event_id: result?.id }).then((v) => {
285
- LibNavigation.navigate(result?.config?.hasOwnProperty('multiprice') && result?.config?.multiprice == 1 ? 'event/ticket_list2' : 'event/ticket_list', {
286
- url: result.url_price,
287
- has_addition: result?.has_addition,
288
- has_addition_global: result?.has_addition_global,
289
- fee_platform: {
290
- fee_platform_amount: result?.fee_platform_amount,
291
- fee_platform_type: result?.fee_platform_type,
292
- },
293
- subscribed: {
294
- is_subscribed: result?.config?.is_subscribed,
295
- is_subscribed_default: result?.config?.is_subscribed_default,
296
- is_subscribed_label: result?.config?.is_subscribed_label
297
- },
298
- show_fee_percentage: result?.config?.show_fee_percentage
299
- })
300
- })
301
- } else {
302
- LibNavigation.navigate(result?.config?.hasOwnProperty('multiprice') && result?.config?.multiprice == 1 ? 'event/ticket_list2' : 'event/ticket_list', {
290
+ await LibNavigation.navigateForResult('event/queue_pricing', { event_id: result?.id })
291
+ }
292
+ LibNavigation.navigate(
293
+ user?.config?.tester == 1 ?
294
+ 'event/ticket_list2'
295
+ :
296
+ (result?.config?.hasOwnProperty('multiprice') && result?.config?.multiprice == 1 ? 'event/ticket_list2' : 'event/ticket_list'),
297
+ {
303
298
  url: result.url_price,
304
- has_addition: result?.has_addition,
305
- has_addition_global: result?.has_addition_global,
306
299
  fee_platform: {
307
300
  fee_platform_amount: result?.fee_platform_amount,
308
301
  fee_platform_type: result?.fee_platform_type,
@@ -312,9 +305,9 @@ export default function m(props: EventDetailProps): any {
312
305
  is_subscribed_default: result?.config?.is_subscribed_default,
313
306
  is_subscribed_label: result?.config?.is_subscribed_label
314
307
  },
315
- show_fee_percentage: result?.config?.show_fee_percentage
308
+ show_fee_percentage: result?.config?.show_fee_percentage,
309
+ is_multiprice: result?.config?.multiprice == 1 ? 1 : 0,
316
310
  })
317
- }
318
311
 
319
312
  })
320
313
  }} style={applyStyle({ width: result?.url_artist != "" ? (LibStyle.width - 30) * 0.5 : LibStyle.width - 20, borderWidth: 2, borderColor: LibStyle.colorGreen, height: 40, borderRadius: 16, backgroundColor: LibStyle.colorGreen, flexDirection: 'row', alignItems: 'center', alignContent: 'center', justifyContent: 'center', paddingHorizontal: 9 })} >
@@ -0,0 +1,354 @@
1
+ // withHooks
2
+ import { applyStyle } from 'esoftplay';
3
+ import { EventFirebase_socket } from 'esoftplay/cache/event/firebase_socket/import';
4
+ import { EventHeader } from 'esoftplay/cache/event/header/import';
5
+ import { EventIndexProperty } from 'esoftplay/cache/event/index/import';
6
+ import { EventSlider } from 'esoftplay/cache/event/slider/import';
7
+ import { LibCurl } from 'esoftplay/cache/lib/curl/import';
8
+ import { LibDialog } from 'esoftplay/cache/lib/dialog/import';
9
+ import { LibNavigation } from 'esoftplay/cache/lib/navigation/import';
10
+ import { LibPicture } from 'esoftplay/cache/lib/picture/import';
11
+ import { LibProgress } from 'esoftplay/cache/lib/progress/import';
12
+ import { LibScroll } from 'esoftplay/cache/lib/scroll/import';
13
+ import { LibSkeleton } from 'esoftplay/cache/lib/skeleton/import';
14
+ import { LibStyle } from 'esoftplay/cache/lib/style/import';
15
+ import { LibUtils } from 'esoftplay/cache/lib/utils/import';
16
+ import { LibVideoProperty } from 'esoftplay/cache/lib/video/import';
17
+ import { LibWebview } from 'esoftplay/cache/lib/webview/import';
18
+ import { UseCondition } from 'esoftplay/cache/use/condition/import';
19
+ import { UseDeeplinkProperty } from 'esoftplay/cache/use/deeplink/import';
20
+ import { UserClass } from 'esoftplay/cache/user/class/import';
21
+ import esp from 'esoftplay/esp';
22
+ import useSafeState from 'esoftplay/state';
23
+ import { useEffect } from 'react';
24
+
25
+ import React from 'react';
26
+ import { Linking, Pressable, Text, TouchableOpacity, View } from 'react-native';
27
+ import MapView, { Marker } from 'react-native-maps';
28
+
29
+
30
+ export interface EventDetail2Args {
31
+
32
+ }
33
+ export interface EventDetail2Props {
34
+
35
+ }
36
+ export default function m(props: EventDetail2Props): any {
37
+ const { url } = LibNavigation.getArgsAll(props)
38
+
39
+
40
+ const { isInPricingQueueConfig } = EventFirebase_socket()
41
+ const [deeplinkParams] = UseDeeplinkProperty.params.useState()
42
+ const [result, setResult] = useSafeState()
43
+ const [priority, setPriority] = useSafeState(false)
44
+ const user = UserClass.state().get()
45
+
46
+ useEffect(() => {
47
+ loadData()
48
+ }, [])
49
+
50
+ function loadData() {
51
+ new LibCurl("v2/event_detail?event_id=443", null, (res, msg) => {
52
+ res.images = res?.images.map((url: string) => ({ image: url }));
53
+ setResult(res)
54
+ esp.log(res);
55
+ }, (error) => {
56
+ LibDialog.warning(esp.lang("event/detail", "load_failed"), error?.message)
57
+ LibNavigation.back()
58
+ })
59
+ }
60
+
61
+ function loadDataConfig(url: string) {
62
+ LibProgress.show("Mohon tunggu")
63
+ new LibCurl(url, null, (res, msg) => {
64
+ esp.log(res);
65
+ LibProgress.hide()
66
+ // return
67
+ LibNavigation.navigate(
68
+ user?.config?.tester == 1 ?
69
+ 'event/ticket_list2'
70
+ :
71
+ (res?.multiprice == 1 ? 'event/ticket_list2' : 'event/ticket_list'),
72
+ {
73
+ url: res.url_price,
74
+ is_multiprice: res?.multiprice == 1 ? 1 : 0,
75
+ })
76
+
77
+ }, (error) => {
78
+ LibProgress.hide()
79
+ LibDialog.warning(esp.lang("event/detail", "load_failed"), error?.message)
80
+ })
81
+ }
82
+
83
+ if (!result) {
84
+ let itemWidth = LibStyle.width - 60
85
+ return (
86
+ <View style={{ flex: 1 }}>
87
+ <EventHeader title={esp.lang("event/detail", "header_empty")} />
88
+ <LibSkeleton>
89
+ <View style={{ margin: 15, height: 9 / 16 * itemWidth, width: itemWidth, borderRadius: 10, backgroundColor: '#fff', alignSelf: 'center' }} />
90
+ <View style={{ marginLeft: 15, backgroundColor: 'white', width: '70%', height: 20, borderRadius: 10 }} />
91
+
92
+ <View style={{ marginTop: 20, marginLeft: 15, flexDirection: 'row', borderRadius: 10, alignContent: 'center', alignItems: 'center' }}>
93
+ <View style={{ width: 28, height: 28, borderRadius: 5, backgroundColor: 'white' }} />
94
+ <View style={{ width: '40%', backgroundColor: 'white', height: 15, borderRadius: 10, marginLeft: 5 }} />
95
+ </View>
96
+
97
+ <View style={{ marginTop: 10, marginLeft: 15, flexDirection: 'row', borderRadius: 10, alignContent: 'center', alignItems: 'center' }}>
98
+ <View style={{ width: 28, height: 28, borderRadius: 5, backgroundColor: 'white' }} />
99
+ <View style={{ width: '30%', backgroundColor: 'white', height: 15, borderRadius: 10, marginLeft: 5 }} />
100
+ </View>
101
+
102
+ <View style={{ margin: 15, borderRadius: 10, height: '20%', width: '90%', backgroundColor: '#fff' }} />
103
+ <View style={{ marginTop: 0, margin: 15, borderRadius: 10, height: '30%', width: '80%', backgroundColor: '#fff' }} />
104
+ <View style={{ marginTop: 0, margin: 15, borderRadius: 10, height: '10%', width: '90%', backgroundColor: '#fff' }} />
105
+ </LibSkeleton>
106
+ </View>
107
+ )
108
+ }
109
+
110
+ const hasLatlong = result?.location_latlong != '' && result?.location_latlong?.includes(',')
111
+ let lat = 0
112
+ let lng = 0
113
+ if (hasLatlong) {
114
+ lat = parseFloat(result.location_latlong?.split(',')[0])
115
+ lng = parseFloat(result.location_latlong?.split(',')[1])
116
+ }
117
+
118
+ const curr = result?.hasOwnProperty('currency') ? result?.currency : ''
119
+ const isFree = (result.price_min == result.price_max) && result.price_min == 0
120
+ let priceRange = esp.lang("event/detail", "start_from", LibUtils.money(result.price_min, curr)) /* + " s/d " + LibUtils.money(result.price_max, curr) */
121
+ if (result.price_min == result.price_max) {
122
+ priceRange = LibUtils.money(result.price_min, curr)
123
+ }
124
+
125
+
126
+ function renderTag(x: any, i: number) {
127
+ const styleId_qGD26: any = { marginTop: 5, padding: 7, paddingHorizontal: 10, marginRight: 5, borderRadius: 3, backgroundColor: LibStyle.colorGrey }
128
+ const styleId_Z2qkux5: any = { fontFamily: 'Arial', fontSize: 10, letterSpacing: 2, color: '#2980b9' }
129
+ return (
130
+ <Pressable key={i} onPress={() => { LibNavigation.navigate('event/list', { url: x?.url, keywords: x?.title }) }} style={styleId_qGD26}>
131
+ <Text allowFontScaling={false} numberOfLines={1} style={styleId_Z2qkux5}>#{String(x?.title).toLowerCase()}</Text>
132
+ </Pressable>
133
+ )
134
+ }
135
+
136
+ const date = LibUtils.moment().localeFormat('YYYY-MM-DD HH:mm:ss')
137
+
138
+ return (
139
+ <View style={{ flex: 1, backgroundColor: '#fff' }} >
140
+ <EventHeader
141
+ title={result.title}
142
+ iconShare={result?.url_share && result?.url_share !== ""}
143
+ onPressShare={() => {
144
+ LibUtils.share(result?.url_share)
145
+ }}
146
+ />
147
+
148
+ <LibScroll onRefresh={loadData}>
149
+ <EventSlider images={result.images} onIndexChange={(i) => { }} />
150
+ <Text allowFontScaling={false} style={{ marginTop: -10, fontFamily: "Arial", fontSize: 18, fontWeight: "bold", fontStyle: "normal", lineHeight: 22, letterSpacing: 0, color: "#4a4a4a", margin: 20 }} >{result.title}</Text>
151
+ <View style={{ flexDirection: 'row', marginBottom: 10, alignItems: 'center', marginHorizontal: 20 }} >
152
+ <LibPicture source={esp.assets('icons/ic_calendar_grey.png')} style={{ width: 14, height: 14 }} />
153
+ <Text allowFontScaling={false} style={{ marginLeft: 10, fontFamily: "Arial", fontSize: 12, fontWeight: "bold", fontStyle: "normal", letterSpacing: 0, color: "#f39c12" }} >{result.status == 4 ? esp.lang("event/detail", "evn_pending") : LibUtils.getDateRange(result.start_date, result.end_date, esp.lang("event/detail", "until"))}</Text>
154
+ </View>
155
+ <View style={{ flexDirection: 'row', marginBottom: 10, alignItems: 'center', marginHorizontal: 20 }} >
156
+ <LibPicture source={esp.assets('icons/ic_tickets_grey.png')} style={{ width: 14, height: 14 }} />
157
+ <Text allowFontScaling={false} style={{ marginLeft: 10, fontFamily: "Arial", fontSize: 12, fontWeight: "normal", fontStyle: "normal", letterSpacing: 0, color: "#2980b9" }} >{result?.price_type == 0 ? esp.lang("event/detail", "tb_announce") : isFree ? esp.lang("event/detail", "text_free") : priceRange}</Text>
158
+ </View>
159
+
160
+ {
161
+ result?.event_tag?.length > 0 &&
162
+ <View style={{ flexDirection: 'row', alignItems: 'center', flexWrap: 'wrap', marginLeft: 17, marginTop: 5 }}>
163
+ {
164
+ result?.event_tag?.map?.(renderTag)
165
+ }
166
+ </View>
167
+ }
168
+
169
+ <View style={{ marginHorizontal: 20, flexDirection: 'row', justifyContent: 'space-between', alignItems: 'center', alignContent: 'center' }}>
170
+ <Text allowFontScaling={false} style={{ marginTop: 10, fontFamily: "Arial", fontSize: 13, fontWeight: "bold", fontStyle: "normal", lineHeight: 22, letterSpacing: 0, color: "#4a4a4a" }} >{esp.lang("event/detail", "text_about_event")}</Text>
171
+ {
172
+ result && result.files !== '' &&
173
+ <TouchableOpacity onPress={() => {
174
+ Linking.canOpenURL(result.files).then((t) => {
175
+ Linking.openURL(result.files)
176
+ })
177
+ }} >
178
+ <Text allowFontScaling={false} style={{ fontFamily: "Arial", fontSize: 10, fontWeight: "bold", fontStyle: "normal", lineHeight: 22, letterSpacing: 0, color: LibStyle.colorRed }} >{esp.lang("event/detail", "text_show_brochure")}</Text>
179
+ </TouchableOpacity>
180
+ }
181
+ </View>
182
+ <LibWebview source={{ html: result.description }} onFinishLoad={() => { }} />
183
+ {
184
+ result && result.youtube !== "" &&
185
+ <>
186
+ <Text allowFontScaling={false} style={{ marginHorizontal: 20, marginTop: 10, fontFamily: "Arial", fontSize: 13, fontWeight: "bold", fontStyle: "normal", lineHeight: 22, letterSpacing: 0, color: "#4a4a4a" }} >{esp.lang("event/detail", "text_video")}</Text>
187
+ <Pressable onPress={() => LibNavigation.navigate('lib/video', { code: result.youtube })} >
188
+ <LibPicture source={{ uri: LibVideoProperty.getUrlThumbnail(result.youtube) }} style={{ height: LibStyle.width * 9 / 16, width: LibStyle.width - 40, marginHorizontal: 20, resizeMode: 'cover' }} />
189
+ </Pressable>
190
+ </>
191
+ }
192
+ {
193
+ result.address != undefined && result.address != "" &&
194
+ <>
195
+ <Text allowFontScaling={false} style={{ marginHorizontal: 20, marginTop: 10, fontFamily: "Arial", fontSize: 13, fontWeight: "bold", fontStyle: "normal", lineHeight: 22, letterSpacing: 0, color: "#4a4a4a" }} >{esp.lang("event/detail", "text_location")}</Text>
196
+ <View style={{ flexDirection: 'row', marginBottom: 10, alignItems: 'center', marginHorizontal: 20 }} >
197
+ <LibPicture source={esp.assets('icons/ic_pin_grey.png')} style={{ width: 14, height: 14 }} />
198
+ <Text allowFontScaling={false} style={{ marginLeft: 10, fontFamily: "Arial", fontSize: 12, fontWeight: "normal", fontStyle: "normal", letterSpacing: 0, color: "#9b9b9b", flex: 1 }} >{result.address + ' ' + result.location_name}</Text>
199
+ </View>
200
+ </>
201
+ }
202
+ {
203
+ result.location_latlong !== '' && hasLatlong &&
204
+ <Pressable onPress={() => LibUtils.mapTo(result.location_name, result.location_latlong)} >
205
+ <View pointerEvents="none" style={{ marginHorizontal: 20, borderRadius: 10, backgroundColor: '#999', height: 180, marginBottom: 24, overflow: 'hidden' }} >
206
+ <MapView
207
+ style={{ flex: 1 }}
208
+ liteMode
209
+ initialRegion={{ latitude: lat, longitude: lng, latitudeDelta: 0.0122, longitudeDelta: 0.0121 }}>
210
+ <Marker
211
+ onPress={() => { LibUtils.mapTo(result.location_name, result.location_latlong) }}
212
+ coordinate={{ latitude: lat, longitude: lng }}
213
+ title={result.title}
214
+ description={result.address}
215
+ />
216
+ </MapView>
217
+ </View>
218
+ </Pressable>
219
+ }
220
+
221
+ {
222
+ result?.image_map !== "" &&
223
+ <>
224
+ <Text allowFontScaling={false} style={{ marginBottom: 10, marginHorizontal: 20, marginTop: 10, fontFamily: "Arial", fontSize: 13, fontWeight: "bold", fontStyle: "normal", lineHeight: 22, letterSpacing: 0, color: "#4a4a4a" }} >{esp.lang("event/detail", "text_layout")}</Text>
225
+ <Pressable onPress={() => {
226
+ LibNavigation.navigate('lib/gallery', { image: result?.image_map })
227
+ }}>
228
+ <LibPicture source={{ uri: result?.image_map }} style={{ height: 0.50 * LibStyle.width - 30, width: LibStyle.width - 30, alignSelf: 'center' }} resizeMode="contain" />
229
+ </Pressable>
230
+ </>
231
+ }
232
+ {
233
+ result?.event_cat?.length > 0 &&
234
+ <>
235
+ <Text allowFontScaling={false} style={{ marginHorizontal: 20, fontFamily: "Arial", fontSize: 13, fontWeight: "bold", fontStyle: "normal", lineHeight: 22, letterSpacing: 0, color: "#4a4a4a" }} >{esp.lang("event/detail", "text_event_cat")}</Text>
236
+ <View style={{ flexDirection: 'row', alignItems: 'center', flexWrap: 'wrap', marginLeft: 17, marginTop: 5 }}>
237
+ {
238
+ result?.event_cat?.map?.((x: any, i: number) => (
239
+ <Pressable key={i} onPress={() => { LibNavigation.navigate('event/list', { url: 'event', cat_id: x?.id }) }} style={{ marginTop: 5, padding: 7, paddingHorizontal: 10, marginRight: 5, borderRadius: 3, backgroundColor: LibStyle.colorGrey }}>
240
+ <Text allowFontScaling={false} numberOfLines={1} style={{ fontFamily: 'Arial', fontSize: 10, letterSpacing: 2, color: '#2980b9' }}>{x?.title}</Text>
241
+ </Pressable>
242
+ ))
243
+ }
244
+ </View>
245
+ </>
246
+ }
247
+
248
+ </LibScroll>
249
+
250
+ {/* 0=pending, 1=active, 2=done, 3=cancel (posisi tdnya pending lalu diaktifkan ketika wktunya udah lewat), 4=postpone(sudah lewat tapi jangan done) */}
251
+
252
+ {
253
+ result?.status == 1 ?
254
+ <View style={{ paddingVertical: 5, paddingHorizontal: 10 }} >
255
+ {
256
+ deeplinkParams?.type == 'event-voucher' &&
257
+ <Text allowFontScaling={false} style={{ color: "coral", fontSize: 12, fontWeight: 'bold', marginBottom: 5 }}>{esp.lang("event/detail", "voucher_embed") + deeplinkParams?.code}</Text>
258
+ }
259
+ {
260
+ result?.book_available == 0 ?
261
+ <>
262
+ {
263
+ result.end_booking <= date && result.end_booking != '0000-00-00 00:00:00' ?
264
+ <View style={{ height: 35, borderRadius: 17, backgroundColor: LibStyle.colorLightGrey, justifyContent: 'center', alignItems: 'center', paddingHorizontal: 9 }} >
265
+ <Text allowFontScaling={false} style={{ fontFamily: "ArialBold", fontSize: 12, textAlign: "center", textAlignVertical: 'center', color: 'black', marginHorizontal: 10 }} >{esp.lang("event/detail", "text_booking_end")}</Text>
266
+ </View>
267
+ :
268
+ <View style={{ height: 35, borderRadius: 17, backgroundColor: LibStyle.colorLightGrey, justifyContent: 'center', alignItems: 'center', paddingHorizontal: 9 }} >
269
+ <Text allowFontScaling={false} style={{ fontFamily: "ArialBold", fontSize: 12, textAlign: "center", textAlignVertical: 'center', color: 'black', marginHorizontal: 10 }} >
270
+ {
271
+ esp.lang("event/detail", "text_book_on", LibUtils.moment(result.start_booking).serverFormat('DD MMMM YYYY H:mm:ss', result?.timezone), result?.timezone_locale || "")
272
+ }
273
+ </Text>
274
+ </View>
275
+ }
276
+ </>
277
+ :
278
+ <View style={{ flexDirection: 'row', justifyContent: 'space-between' }}>
279
+ {
280
+ result?.url_artist != "" &&
281
+ <TouchableOpacity onPress={() => {
282
+ // LibNavigation.navigate('event/artist', { title: result?.title, url: result?.url_artist, has_addition: result?.has_addition })
283
+ LibNavigation.navigate('event/artist', {
284
+ title: result?.title,
285
+ url: result?.url_artist,
286
+ has_addition: result?.has_addition
287
+ })
288
+ }} style={applyStyle({ width: (LibStyle.width - 30) * 0.5, borderWidth: 2, borderColor: LibStyle.colorGreen, height: 40, borderRadius: 16, backgroundColor: 'white', flexDirection: 'row', alignItems: 'center', alignContent: 'center', justifyContent: 'center', paddingHorizontal: 9 })} >
289
+ <Text allowFontScaling={false} style={applyStyle({ fontFamily: "ArialBold", fontSize: 14, textAlign: "center", textAlignVertical: 'center', color: LibStyle.colorGreen })} >{esp.lang("event/detail", "line_up")}</Text>
290
+ </TouchableOpacity>
291
+ }
292
+ <TouchableOpacity onPress={() => {
293
+ EventIndexProperty.isLogin(async () => {
294
+ if (isInPricingQueueConfig(result.id)) {
295
+ await LibNavigation.navigateForResult('event/queue_pricing', { event_id: result?.id })
296
+ }
297
+ loadDataConfig(result?.url_config)
298
+ return
299
+ LibNavigation.navigate(
300
+ user?.config?.tester == 1 ?
301
+ 'event/ticket_list2'
302
+ :
303
+ (result?.config?.hasOwnProperty('multiprice') && result?.config?.multiprice == 1 ? 'event/ticket_list2' : 'event/ticket_list'),
304
+ {
305
+ url: result.url_price,
306
+ fee_platform: {
307
+ fee_platform_amount: result?.fee_platform_amount,
308
+ fee_platform_type: result?.fee_platform_type,
309
+ },
310
+ subscribed: {
311
+ is_subscribed: result?.config?.is_subscribed,
312
+ is_subscribed_default: result?.config?.is_subscribed_default,
313
+ is_subscribed_label: result?.config?.is_subscribed_label
314
+ },
315
+ show_fee_percentage: result?.config?.show_fee_percentage,
316
+ is_multiprice: result?.config?.multiprice == 1 ? 1 : 0,
317
+ })
318
+ })
319
+
320
+ }} style={applyStyle({ width: result?.url_artist != "" ? (LibStyle.width - 30) * 0.5 : LibStyle.width - 20, borderWidth: 2, borderColor: LibStyle.colorGreen, height: 40, borderRadius: 16, backgroundColor: LibStyle.colorGreen, flexDirection: 'row', alignItems: 'center', alignContent: 'center', justifyContent: 'center', paddingHorizontal: 9 })} >
321
+ <Text allowFontScaling={false} style={applyStyle({ fontFamily: "ArialBold", fontSize: 14, textAlign: "center", textAlignVertical: 'center', color: "#fff" })} >{esp.lang("event/detail", "text_buy_ticket")}</Text>
322
+ </TouchableOpacity>
323
+ <UseCondition if={priority} >
324
+ <View pointerEvents='none' style={{ height: 20, position: "absolute", right: 0, top: 0, bottom: 0, left: 0 }} >
325
+ <LibSkeleton
326
+ colors={['#fffdb8', '#fdf68c', '#f4cd2a', '#f4cd2a', '#d28d0d', '#fffdb8', '#fdf68c', '#f4cd2a', '#f4cd2a', '#d28d0d', '#fffdb8', '#fdf68c', '#f4cd2a', '#f4cd2a', '#d28d0d']}>
327
+ <Text style={{ color: "white", fontWeight: "bold", fontSize: 9, alignSelf: 'center', textAlign: 'center' }} >{esp.lang("event/detail", "priority_label")}</Text>
328
+ </LibSkeleton>
329
+ </View>
330
+ </UseCondition>
331
+ </View>
332
+ }
333
+ </View>
334
+ :
335
+ result.status == 2 ? /* done */
336
+ <View style={{ flexDirection: 'row', paddingVertical: 5, paddingHorizontal: 10 }} >
337
+ <View style={{ flex: 1, height: 35, borderRadius: 17, backgroundColor: LibStyle.colorLightGrey, justifyContent: 'center', alignItems: 'center', paddingHorizontal: 9 }} >
338
+ <Text allowFontScaling={false} style={{ fontFamily: "ArialBold", fontSize: 12, textAlign: "center", textAlignVertical: 'center', color: 'black', marginRight: 10, marginLeft: 10 }} >{esp.lang("event/detail", "event_done")}</Text>
339
+ </View>
340
+ </View>
341
+ :
342
+ result.status == 4 ? /* postpone(sudah lewat tapi jangan done) */
343
+ <View style={{ flexDirection: 'row', paddingVertical: 5, paddingHorizontal: 10 }} >
344
+ <View style={{ flex: 1, height: 35, borderRadius: 17, backgroundColor: LibStyle.colorLightGrey, justifyContent: 'center', alignItems: 'center', paddingHorizontal: 9 }} >
345
+ <Text allowFontScaling={false} style={{ fontFamily: "ArialBold", fontSize: 12, textAlign: "center", textAlignVertical: 'center', color: 'black', marginRight: 10, marginLeft: 10 }} >{esp.lang("event/detail", "event_postpone")}</Text>
346
+ </View>
347
+ </View>
348
+ :
349
+ null
350
+ }
351
+
352
+ </View >
353
+ )
354
+ }
@@ -151,7 +151,7 @@ export default function m(props: EventExchange_ticketProps): any {
151
151
  <EventHeader title={esp.lang("event/exchange_ticket", "header")} subtitle={dataEvent?.name} />
152
152
  <ScrollView style={{ flex: 1 }} refreshControl={<RefreshControl refreshing={refreshing} onRefresh={onRefresh} />}>
153
153
  <Pressable onPress={() => {
154
- LibNavigation.navigate('event/exchange_ticket_list', { dataEvent: dataEvent })
154
+ LibNavigation.navigate('event/exchange_ticket_list')
155
155
  }} style={{ margin: 15, marginBottom: 0, padding: 10, borderWidth: 1, backgroundColor: '#fff', borderColor: LibStyle.colorRed, flex: 1, borderRadius: 10, flexDirection: 'row', justifyContent: 'space-between', alignContent: 'center', alignItems: 'center' }}>
156
156
  <Text allowFontScaling={false}>{esp.lang("event/exchange_ticket", "exchange_history")}</Text>
157
157
  <LibIcon name='chevron-right' />
@@ -5,11 +5,11 @@ import { EventButton } from 'esoftplay/cache/event/button/import';
5
5
  import { EventExchange_ticketProperty } from 'esoftplay/cache/event/exchange_ticket/import';
6
6
  import { EventExchange_ticket_resultProperty } from 'esoftplay/cache/event/exchange_ticket_result/import';
7
7
  import { EventHeader } from 'esoftplay/cache/event/header/import';
8
+ import { EventTms_dashboardProperty } from 'esoftplay/cache/event/tms_dashboard/import';
8
9
  import { LibCollaps } from 'esoftplay/cache/lib/collaps/import';
9
10
  import { LibDialog } from 'esoftplay/cache/lib/dialog/import';
10
11
  import { LibIcon } from 'esoftplay/cache/lib/icon/import';
11
12
  import { LibList } from 'esoftplay/cache/lib/list/import';
12
- import { LibNavigation } from 'esoftplay/cache/lib/navigation/import';
13
13
  import { LibProgress } from 'esoftplay/cache/lib/progress/import';
14
14
  import { LibSlidingup } from 'esoftplay/cache/lib/slidingup/import';
15
15
  import { LibStyle } from 'esoftplay/cache/lib/style/import';
@@ -32,7 +32,6 @@ export interface EventExchange_ticket_listProps {
32
32
  }
33
33
 
34
34
  export default function m(props: EventExchange_ticket_listProps): any {
35
- const { dataEvent } = LibNavigation.getArgsAll(props)
36
35
  const log = EventExchange_ticketProperty.stateExchangeLog.useSelector(s => s)
37
36
  const backup = EventExchange_ticket_resultProperty.stateListConfirm().useSelector(s => s)
38
37
  const selectedRef = useRef<LibSlidingup>(null)
@@ -163,7 +162,7 @@ export default function m(props: EventExchange_ticket_listProps): any {
163
162
  domain: esp.config('domain'),
164
163
  tms_name: UserClass.state().get('name'),
165
164
  email: UserClass.state().get('email'),
166
- event_name: dataEvent?.name,
165
+ event_name: EventTms_dashboardProperty.closingDataState()?.get()?.event_name,
167
166
  data: EventExchange_ticketProperty.stateExchangeLog.get()
168
167
  }, undefined, 2), '-1001737180019', undefined, () => {
169
168
  EventExchange_ticketProperty.stateExchangeLog.reset()