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
@@ -1,133 +0,0 @@
1
- // withHooks
2
-
3
- import { useEffect } from 'react';
4
-
5
- import { EventTms_homeProperty } from 'esoftplay/cache/event/tms_home/import';
6
- import { EventTms_out_hall_successProperty } from 'esoftplay/cache/event/tms_out_hall_success/import';
7
- import { EventTms_logProperty } from 'esoftplay/cache/event/tms_log/import';
8
- import { LibLoading } from 'esoftplay/cache/lib/loading/import';
9
- import { LibStyle } from 'esoftplay/cache/lib/style/import';
10
- import { LibTextstyle } from 'esoftplay/cache/lib/textstyle/import';
11
- import { LibUtils } from 'esoftplay/cache/lib/utils/import';
12
- import { UseCondition } from 'esoftplay/cache/use/condition/import';
13
- import esp from 'esoftplay/esp';
14
- import useSafeState from 'esoftplay/state';
15
- import { useTimeout } from 'esoftplay/timeout';
16
- import React from 'react';
17
- import { Pressable, Text, View } from 'react-native';
18
-
19
-
20
- export interface EventTms_out_hall_logArgs {
21
-
22
- }
23
- export interface EventTms_out_hall_logProps {
24
- onPress: (type: string, title: string) => void
25
- }
26
-
27
- export interface HallOutLogItem {
28
- text: string
29
- subtitle: string
30
- value: string
31
- onPress: () => void
32
- valuecolor?: string
33
- }
34
-
35
- function Item(props: HallOutLogItem) {
36
- return (
37
- <Pressable
38
- onPress={() => {
39
- props.onPress()
40
- }} style={{ flexDirection: 'row', justifyContent: 'space-between', alignContent: 'center', alignItems: 'center', marginHorizontal: 15, paddingVertical: 6, borderBottomWidth: 1, borderBottomColor: LibStyle.colorLightGrey }}>
41
- <View>
42
- <LibTextstyle text={props.text} textStyle="subhead" />
43
- <Text style={{ letterSpacing: 0.5, marginTop: 3, fontSize: 12, color: LibStyle.colorBrown }}>{props.subtitle}</Text>
44
- </View>
45
- <LibTextstyle text={LibUtils.number(props.value)} style={{ color: props.valuecolor ? props.valuecolor : "#000" }} textStyle="title2" />
46
- </Pressable>
47
- )
48
- }
49
-
50
- export default function m(props: EventTms_out_hall_logProps): any {
51
- const logHallOut = EventTms_homeProperty.counterState().useSelector(s => s)
52
- const backupHallOut = EventTms_out_hall_successProperty.syncHallOut().useSelector(s => s)
53
- const [loading, setLoading] = useSafeState<boolean>(true)
54
- const timeout = useTimeout()
55
-
56
- function syncHallOutData() {
57
- EventTms_homeProperty.subscribeSyncHallOut().trigger(EventTms_out_hall_successProperty.syncHallOut().get())
58
- timeout(() => {
59
- setLoading(false)
60
- }, 1000)
61
- }
62
-
63
- function forceSyncHallOutData() {
64
- EventTms_homeProperty.subscribeSyncHallOutReset().trigger(EventTms_out_hall_successProperty.syncHallOut().get())
65
- timeout(() => {
66
- setLoading(false)
67
- }, 1000)
68
- }
69
-
70
- useEffect(() => {
71
- syncHallOutData()
72
- }, [])
73
-
74
- if (loading) {
75
- return <LibLoading />
76
- }
77
-
78
- const sumValue = EventTms_logProperty.sumValuesPerCategory(logHallOut)
79
-
80
- return (
81
- <View style={{ flex: 1, backgroundColor: '#fff', margin: 17, marginTop: 0, paddingBottom: 10, marginBottom: 0, borderBottomRightRadius: 10, borderBottomLeftRadius: 10, ...LibStyle.elevation(2) }}>
82
- <Item subtitle={esp.lang("event/tms_out_hall_log", "ticket_scanned_hall_out")} text={esp.lang("event/tms_out_hall_log", "scan_hall_out")} value={sumValue?.hall_out_scan} onPress={() => {
83
- if (sumValue?.hall_out_scan) {
84
- props.onPress("hall_out_scan", esp.lang("event/tms_out_hall_log", "scan_hall_out"))
85
- }
86
- }} />
87
- <Item subtitle={esp.lang("event/tms_out_hall_log", "scanned_ticket_hall_put")} text={esp.lang("event/tms_out_hall_log", "qty_scan_hall_out")} value={sumValue?.hall_out_ticket} onPress={() => {
88
- if (sumValue?.hall_out_ticket) {
89
- props.onPress("hall_out_ticket", esp.lang("event/tms_out_hall_log", "qty_scan_hall_out"))
90
- }
91
-
92
- }} />
93
- <Item subtitle={esp.lang("event/tms_out_hall_log", "ticket_success_scanned_hall_out")} text={esp.lang("event/tms_out_hall_log", "opengate_hall_out")} value={sumValue?.hall_out_opengate} onPress={() => {
94
- if (sumValue?.hall_out_opengate) {
95
- props.onPress("hall_out_opengate", esp.lang("event/tms_out_hall_log", "opengate_hall_out"))
96
- }
97
-
98
- }} />
99
- <Item subtitle={esp.lang("event/tms_out_hall_log", "idcard_scanned_hall_out")} text={esp.lang("event/tms_out_hall_log", "opengate_hall_out_idcard")} value={sumValue?.hall_out_opengate_idcard} onPress={() => {
100
- if (sumValue?.hall_out_opengate_idcard) {
101
- props.onPress("hall_out_opengate_idcard", esp.lang("event/tms_out_hall_log", "opengate_hall_out_idcard"))
102
- }
103
-
104
- }} />
105
- <Item subtitle={esp.lang("event/tms_out_hall_log", "data_send_to_server")} text={esp.lang("event/tms_out_hall_log", "data_send")} value={sumValue?.hall_out_send} onPress={() => {
106
- if (sumValue?.hall_out_send) {
107
- props.onPress("hall_out_send", esp.lang("event/tms_out_hall_log", "data_send"))
108
- }
109
- }} />
110
- <Item subtitle={esp.lang("event/tms_out_hall_log", "data_not_send_to_server")} text={esp.lang("event/tms_out_hall_log", "data_not_send")} valuecolor={LibStyle.colorRed} value={backupHallOut.length} onPress={() => {
111
-
112
- }} />
113
-
114
- <View style={{ marginHorizontal: 15 }} >
115
- <UseCondition
116
- if={backupHallOut.length == 0}
117
- fallback={
118
- <Pressable onPress={() => {
119
- setLoading(true)
120
- forceSyncHallOutData()
121
- }}>
122
- <Text allowFontScaling={false} style={{ textAlign: 'center' }}>{esp.lang("event/tms_out_hall_log", "wait")}<Text style={{ color: LibStyle.colorBlue, textDecorationStyle: 'solid', textDecorationLine: 'underline' }}>{esp.lang("event/tms_out_hall_log", "click")}</Text> {esp.lang("event/tms_out_hall_log", "retry")}</Text>
123
- </Pressable>
124
- } >
125
- <LibTextstyle textStyle='callout'
126
- style={{ textAlign: 'center', marginTop: 15 }}
127
- text={esp.lang("event/tms_out_hall_log", "all_data_send")} />
128
- </UseCondition>
129
- </View>
130
-
131
- </View >
132
- )
133
- }
@@ -1,130 +0,0 @@
1
- // withHooks
2
- import { useEffect, useRef } from 'react';
3
-
4
- import { LibNavigation } from 'esoftplay/cache/lib/navigation/import';
5
- import { LibObject } from 'esoftplay/cache/lib/object/import';
6
- import { LibPicture } from 'esoftplay/cache/lib/picture/import';
7
- import { LibStatusbar } from 'esoftplay/cache/lib/statusbar/import';
8
- import { LibStyle } from 'esoftplay/cache/lib/style/import';
9
- import useGlobalState, { useGlobalReturn } from 'esoftplay/global';
10
- import { LinearGradient } from 'expo-linear-gradient';
11
-
12
- import { EventTms_homeProperty } from 'esoftplay/cache/event/tms_home/import';
13
- import esp from 'esoftplay/esp';
14
- import useSafeState from 'esoftplay/state';
15
- import React from 'react';
16
- import { Animated, Easing, Pressable, Text, View } from 'react-native';
17
-
18
- export interface EventTms_out_hall_successArgs {
19
-
20
- }
21
- export interface EventTms_out_hall_successProps {
22
-
23
- }
24
-
25
- const dataListHallOut = useGlobalState<any[]>([], { persistKey: 'ticket_list_hall_out', loadOnInit: true, inFastStorage: true })
26
- export function syncHallOut(): useGlobalReturn<any[]> {
27
- return dataListHallOut
28
- }
29
-
30
- export default function m(props: EventTms_out_hall_successProps): any {
31
- const { scan_type, data, url, post, url_ticket_update, url_ticket_detail, price_type, gate_type, event_id, selectGate, typeScanner, event_title, configPriority }: any = LibNavigation.getArgsAll<any>(props)
32
-
33
- const [isPaused, setIsPaused] = useSafeState<boolean>(false)
34
- const progress = useRef(new Animated.Value(0)).current;
35
- const animation = useRef<Animated.CompositeAnimation | null>(null);
36
- const [pausedValue, setPausedValue] = useSafeState(0);
37
-
38
- function animateProgressBar() {
39
- const duration = 1000; // Ubah durasi animasi sesuai kebutuhan Anda
40
-
41
- if (!isPaused) {
42
- animation.current = Animated.timing(progress, {
43
- toValue: 1,
44
- duration: duration - duration * pausedValue,
45
- easing: Easing.linear,
46
- useNativeDriver: false,
47
- });
48
-
49
- animation.current.start(({ finished }) => {
50
- if (finished) {
51
- setIsPaused(false);
52
- setPausedValue(0);
53
-
54
- // script next nya disini
55
- LibNavigation.replace('component/scanner', {
56
- selectGate: selectGate,
57
- fromPage: 'event/tms_home',
58
- event_id: event_id,
59
- event_title: event_title,
60
- typeScanner: typeScanner,
61
- gate_type: gate_type,
62
- price_type: price_type,
63
- url_ticket_detail: url_ticket_detail,
64
- url_ticket_update: url_ticket_update,
65
- configPriority: configPriority,
66
- scan_type: scan_type
67
- })
68
- }
69
- });
70
- } else {
71
- if (animation.current) {
72
- animation.current.stop(); // Hentikan animasi
73
- animation.current = null;
74
- }
75
- setPausedValue(progress._value);
76
- }
77
- setIsPaused(!isPaused);
78
- }
79
-
80
- useEffect(() => {
81
- dataListHallOut.get()
82
- EventTms_homeProperty.addCounterHallOutOpenGate(1, "0")
83
- createDataHallOut()
84
- animateProgressBar()
85
- }, [])
86
-
87
- function createDataHallOut() {
88
- dataListHallOut.set(LibObject.push(dataListHallOut.get(), [url, post])())
89
- EventTms_homeProperty.subscribeSyncHallOut().trigger(dataListHallOut.get())
90
- }
91
-
92
- const widthInterpolate = progress.interpolate({
93
- inputRange: [0, 1],
94
- outputRange: ['0%', '100%'],
95
- });
96
-
97
- return (
98
- <View style={{ flex: 1 }}>
99
- <LibStatusbar style='light' />
100
- <Pressable
101
- onPressIn={animateProgressBar}
102
- onPressOut={animateProgressBar}
103
- style={{ backgroundColor: '#000', height: LibStyle.height }}>
104
- <LibPicture source={{ uri: 'https://www.w3schools.com/howto/img_avatar.png' }} style={{ width: LibStyle.width, height: LibStyle.height - (LibStyle.height / 4) }} resizeMode={"cover"} />
105
-
106
- <View style={{ marginTop: LibStyle.STATUSBAR_HEIGHT + 5, alignSelf: 'center', height: 5, width: LibStyle.width - 20, backgroundColor: 'rgba(255,255,255,0.3)', borderRadius: 10, position: 'absolute', top: 5, }}>
107
- <Animated.View style={{ width: widthInterpolate, height: 5, backgroundColor: LibStyle.colorPrimary, borderRadius: 10, }} />
108
- </View>
109
-
110
- <LinearGradient
111
- // Background Linear Gradient
112
- style={{
113
- height: LibStyle.height - (LibStyle.height / 3),
114
- width: LibStyle.width,
115
- position: 'absolute',
116
- left: 0,
117
- right: 0,
118
- bottom: 0,
119
- }}
120
- colors={['rgba(255,255,255,0)', 'rgba(0,0,0,0.55)', 'rgba(0,0,0,1)', 'rgba(0,0,0,1)']}>
121
- <View style={{ flex: 1, padding: 15, justifyContent: 'flex-end', paddingBottom: 100, alignContent: 'center', alignItems: 'center' }}>
122
- <Text allowFontScaling={false} style={{ textAlign: 'center', flexWrap: 'wrap', fontSize: 35, letterSpacing: 2, fontWeight: '900', color: '#fff' }}>{data[0]?.price_name}</Text>
123
- <Text allowFontScaling={false} style={{ textAlign: 'center', fontSize: 26, marginTop: 20, color: '#fff' }}>{esp.lang("event/tms_out_hall_success", "exit")}</Text>
124
- </View>
125
-
126
- </LinearGradient>
127
- </Pressable>
128
- </View>
129
- )
130
- }