esoftplay-event 0.0.0-a

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 (121) hide show
  1. package/config.json +11 -0
  2. package/event/additional.tsx +188 -0
  3. package/event/additional_input.tsx +316 -0
  4. package/event/block_invitation.tsx +48 -0
  5. package/event/countdown.tsx +72 -0
  6. package/event/counter_cashier.tsx +180 -0
  7. package/event/counter_cashier_report.tsx +114 -0
  8. package/event/counter_cashier_sell.tsx +135 -0
  9. package/event/counter_eo.tsx +451 -0
  10. package/event/counter_history.tsx +74 -0
  11. package/event/counter_history_item.tsx +48 -0
  12. package/event/counter_info.tsx +96 -0
  13. package/event/counter_lm.tsx +273 -0
  14. package/event/counter_menu.tsx +85 -0
  15. package/event/counter_report.tsx +105 -0
  16. package/event/counter_report_breakdown.tsx +93 -0
  17. package/event/counter_report_detail.tsx +238 -0
  18. package/event/counter_report_detail_list.tsx +56 -0
  19. package/event/counter_request.tsx +136 -0
  20. package/event/counter_request_detail.tsx +211 -0
  21. package/event/counter_section.tsx +32 -0
  22. package/event/counter_send.tsx +277 -0
  23. package/event/counter_status.tsx +32 -0
  24. package/event/counter_type.tsx +23 -0
  25. package/event/counter_user_list.tsx +197 -0
  26. package/event/counter_user_list_item.tsx +143 -0
  27. package/event/coupon.tsx +124 -0
  28. package/event/coupon_claim.tsx +198 -0
  29. package/event/coupon_claim_detail.tsx +175 -0
  30. package/event/coupon_claim_history.tsx +279 -0
  31. package/event/coupon_claim_reimburse.tsx +111 -0
  32. package/event/coupon_claim_reimburse_history.tsx +72 -0
  33. package/event/coupon_claim_reimburse_history_detail.tsx +117 -0
  34. package/event/coupon_claim_staff.tsx +256 -0
  35. package/event/coupon_detail.tsx +98 -0
  36. package/event/coupon_event_list.tsx +77 -0
  37. package/event/coupon_generate.tsx +258 -0
  38. package/event/coupon_generate_event.tsx +79 -0
  39. package/event/coupon_generate_list.tsx +56 -0
  40. package/event/date_picker.tsx +152 -0
  41. package/event/detail.tsx +352 -0
  42. package/event/entrance.tsx +215 -0
  43. package/event/entrance_again.tsx +200 -0
  44. package/event/entrance_failed.tsx +190 -0
  45. package/event/entrance_idcard.tsx +203 -0
  46. package/event/entrance_list.tsx +264 -0
  47. package/event/entrance_list_item.tsx +88 -0
  48. package/event/entrance_log.tsx +130 -0
  49. package/event/entrance_success.tsx +155 -0
  50. package/event/entrance_warning.tsx +91 -0
  51. package/event/exchange_reward.tsx +31 -0
  52. package/event/exchange_reward_result.tsx +137 -0
  53. package/event/exchange_ticket.tsx +234 -0
  54. package/event/exchange_ticket_list.tsx +191 -0
  55. package/event/exchange_ticket_result.tsx +211 -0
  56. package/event/exit.tsx +91 -0
  57. package/event/exit_failed.tsx +135 -0
  58. package/event/exit_list.tsx +118 -0
  59. package/event/exit_log.tsx +131 -0
  60. package/event/exit_success.tsx +143 -0
  61. package/event/exit_temporary.tsx +226 -0
  62. package/event/hall_in.tsx +148 -0
  63. package/event/hall_in_failed.tsx +270 -0
  64. package/event/hall_in_list.tsx +222 -0
  65. package/event/hall_in_log.tsx +134 -0
  66. package/event/hall_in_success.tsx +132 -0
  67. package/event/hall_out.tsx +143 -0
  68. package/event/hall_out_failed.tsx +133 -0
  69. package/event/hall_out_list.tsx +215 -0
  70. package/event/hall_out_log.tsx +133 -0
  71. package/event/hall_out_success.tsx +130 -0
  72. package/event/list.tsx +219 -0
  73. package/event/list_filter.tsx +124 -0
  74. package/event/log.tsx +435 -0
  75. package/event/qc_idcard.tsx +209 -0
  76. package/event/qc_idcard_failed.tsx +78 -0
  77. package/event/qc_idcard_success.tsx +68 -0
  78. package/event/queue_out.tsx +186 -0
  79. package/event/queue_pricing.tsx +152 -0
  80. package/event/randomseat.tsx +33 -0
  81. package/event/review.tsx +117 -0
  82. package/event/review_add.tsx +342 -0
  83. package/event/review_detail.tsx +67 -0
  84. package/event/review_item.tsx +76 -0
  85. package/event/scan_item.tsx +66 -0
  86. package/event/schedule.tsx +135 -0
  87. package/event/seat.tsx +628 -0
  88. package/event/seat_autopick.tsx +120 -0
  89. package/event/seat_map.tsx +408 -0
  90. package/event/seat_map_matrix.tsx +94 -0
  91. package/event/seat_map_test.tsx +401 -0
  92. package/event/ticket_list.tsx +722 -0
  93. package/event/ticket_list2.tsx +680 -0
  94. package/event/timer.tsx +58 -0
  95. package/event/tms.tsx +103 -0
  96. package/event/tms_add.tsx +94 -0
  97. package/event/tms_add_result.tsx +175 -0
  98. package/event/tms_dashboard.tsx +89 -0
  99. package/event/tms_event_list.tsx +66 -0
  100. package/event/turnstile_event_gate.tsx +74 -0
  101. package/event/turnstile_event_item.tsx +41 -0
  102. package/event/turnstile_event_list.tsx +69 -0
  103. package/event/turnstile_event_ticket.tsx +95 -0
  104. package/event/turnstile_settings.tsx +327 -0
  105. package/event/turnstile_settings_otp.tsx +58 -0
  106. package/event/turnstile_settings_status.tsx +50 -0
  107. package/event/voucher.tsx +149 -0
  108. package/event/voucher_multi.tsx +181 -0
  109. package/fonts/Arial.ttf +0 -0
  110. package/fonts/ArialBold.ttf +0 -0
  111. package/fonts/DecoNumbers.ttf +0 -0
  112. package/fonts/MonoSpace.ttf +0 -0
  113. package/fonts/SFProText.ttf +0 -0
  114. package/fonts/digital.ttf +0 -0
  115. package/fonts/mono.ttf +0 -0
  116. package/id.json +1113 -0
  117. package/index.js +2 -0
  118. package/libs.json +1 -0
  119. package/mover.js +0 -0
  120. package/package.json +16 -0
  121. package/publisher.js +84 -0
@@ -0,0 +1,58 @@
1
+ // withHooks
2
+
3
+ import React from 'react';
4
+ import { StyleSheet, Text, View } from 'react-native';
5
+
6
+
7
+ export interface EventTimerArgs {
8
+
9
+ }
10
+ export interface EventTimerProps {
11
+
12
+ }
13
+
14
+ const formatTime = (time: number) => {
15
+ const hours = Math.floor(time / 3600);
16
+ const minutes = Math.floor((time % 3600) / 60);
17
+ const seconds = time % 60;
18
+
19
+ const formattedHours = hours.toString().padStart(2, '0');
20
+ const formattedMinutes = minutes.toString().padStart(2, '0');
21
+ const formattedSeconds = seconds.toString().padStart(2, '0');
22
+
23
+ return `${formattedHours}:${formattedMinutes}:${formattedSeconds}`;
24
+ }
25
+
26
+
27
+ export default function m(props: EventTimerProps): any {
28
+ const [elapsedTime, setElapsedTime] = React.useState(0);
29
+
30
+ React.useEffect(() => {
31
+ const interval = setInterval(() => {
32
+ setElapsedTime(prevElapsedTime => prevElapsedTime + 1);
33
+ }, 1000);
34
+ return () => clearInterval(interval);
35
+ }, []);
36
+
37
+ return (
38
+ <View style={styles.container}>
39
+ <Text style={styles.text}>{formatTime(elapsedTime)}</Text>
40
+ </View>
41
+ );
42
+
43
+ }
44
+ const styles = StyleSheet.create({
45
+ container: {
46
+ alignItems: 'center',
47
+ justifyContent: 'center',
48
+ backgroundColor: '#fff',
49
+ padding: 10,
50
+ borderRadius: 5,
51
+ borderWidth: 1,
52
+ borderColor: '#ddd',
53
+ },
54
+ text: {
55
+ fontSize: 20,
56
+ fontWeight: 'bold',
57
+ },
58
+ });
package/event/tms.tsx ADDED
@@ -0,0 +1,103 @@
1
+ // withHooks
2
+
3
+ import { applyStyle } from 'esoftplay';
4
+ import { ComponentHeader } from 'esoftplay/cache/component/header/import';
5
+ import { ComponentMessage } from 'esoftplay/cache/component/message/import';
6
+ import { LibCurl } from 'esoftplay/cache/lib/curl/import';
7
+ import { LibDialog } from 'esoftplay/cache/lib/dialog/import';
8
+ import { LibIcon } from 'esoftplay/cache/lib/icon/import';
9
+ import { LibInfinite } from 'esoftplay/cache/lib/infinite/import';
10
+ import { LibNavigation } from 'esoftplay/cache/lib/navigation/import';
11
+ import { LibPicture } from 'esoftplay/cache/lib/picture/import';
12
+ import { LibStyle } from 'esoftplay/cache/lib/style/import';
13
+ import { LibToastProperty } from 'esoftplay/cache/lib/toast/import';
14
+ import esp from 'esoftplay/esp';
15
+ import useGlobalSubscriber, { useGlobalSubscriberReturn } from 'esoftplay/subscribe';
16
+ import React, { useRef } from 'react';
17
+ import { Pressable, Text, TouchableOpacity, View } from 'react-native';
18
+
19
+ export interface EventTmsArgs {
20
+
21
+ }
22
+ export interface EventTmsProps {
23
+
24
+ }
25
+ const subs = useGlobalSubscriber()
26
+ export function subscribe(): useGlobalSubscriberReturn {
27
+ return subs
28
+ }
29
+
30
+ export default function m(props: EventTmsProps): any {
31
+ const { dataEO } = LibNavigation.getArgsAll<any>(props)
32
+ const ref = useRef<LibInfinite>(null)
33
+
34
+ function deleteTMS(url: string, name: string, index: number) {
35
+ LibDialog.warningConfirm(esp.lang("event/tms", "del_title"), esp.lang("event/tms", "del_msg", name), esp.lang("cashier/list", "dialog_delete_yes"), () => {
36
+ new LibCurl(url, null, (res, msg) => {
37
+ LibToastProperty.show(msg)
38
+ ref?.current?.loadData?.()
39
+ }, (msg) => {
40
+ LibDialog.warning(esp.lang("event/tms", "del_failed"), msg.message)
41
+ })
42
+ }, esp.lang("cashier/list", "dialog_delete_cancel"), () => { })
43
+ }
44
+
45
+ function renderItem(item: any, index: number) {
46
+ return (
47
+ <TouchableOpacity onPress={() => {
48
+ let dataEvent = {
49
+ id: dataEO?.id
50
+ }
51
+ LibNavigation.navigate('event/tms_add_result', { dataEvent: dataEvent, email: item.email.trim() })
52
+ }} key={index} style={applyStyle({ padding: 10, marginBottom: 4, flexDirection: 'row', alignItems: 'center', backgroundColor: 'white', borderRadius: 4, marginHorizontal: 10, marginTop: 10, borderLeftWidth: 2, borderLeftColor: LibStyle.colorGreen, ...LibStyle.elevation(2) })} >
53
+ <LibPicture source={{ uri: item.image }} style={applyStyle({ height: 40, width: 40, borderRadius: 20, backgroundColor: LibStyle.colorLightGrey })} />
54
+ <View style={{ flex: 1 }} >
55
+ <Text allowFontScaling={false} numberOfLines={3} ellipsizeMode="tail" style={applyStyle({ fontFamily: 'Arial', fontSize: 15, fontWeight: "600", color: "#4a4a4a", marginLeft: 10, marginRight: 10, flex: 1 })} >{item.name}</Text>
56
+ {
57
+ (!!item?.email)
58
+ &&
59
+ <Text allowFontScaling={false} style={[applyStyle({ marginTop: 3, fontFamily: 'Arial', fontSize: 13, color: "#c5c5c5", marginLeft: 10, marginRight: 10, flex: 1 })]} >{item?.email}</Text>
60
+ }
61
+ {
62
+ item?.access_resetable == 1 &&
63
+ <View style={{ flexDirection: 'row', marginLeft: 10, marginTop: 7 }}>
64
+ <View style={{ borderWidth: 1, borderRadius: 10, paddingVertical: 2, borderColor: LibStyle.colorGreen, backgroundColor: LibStyle.colorGreen, padding: 10, }}>
65
+ <Text allowFontScaling={false} style={{ color: '#fff' }}>{item?.access_resetable == 1 ? esp.lang("event/tms", "reset") : ""}</Text>
66
+ </View>
67
+ </View>
68
+ }
69
+ </View>
70
+ {
71
+ item?.url_delete != '' &&
72
+ <TouchableOpacity onPress={() => {
73
+ deleteTMS(item.url_delete, item?.name, index)
74
+ }} >
75
+ <View style={applyStyle({ padding: 7, borderRadius: 5, borderWidth: 1, borderColor: LibStyle.colorRed })} >
76
+ <LibIcon name='trash-can-outline' color={LibStyle.colorRed} size={16} />
77
+ </View>
78
+ </TouchableOpacity>
79
+ }
80
+ </TouchableOpacity>
81
+ )
82
+ }
83
+
84
+ subs.useSubscribe(() => {
85
+ ref?.current?.loadData?.()
86
+ })
87
+
88
+ return (
89
+ <View style={{ flex: 1, backgroundColor: '#fff' }}>
90
+ <ComponentHeader title={esp.lang("event/tms", "header")} subtitle={dataEO?.name} />
91
+ <LibInfinite
92
+ ref={ref}
93
+ // isDebug={1}
94
+ url={'event_tms_list?event_id=' + dataEO?.id}
95
+ errorView={(error: any) => (<ComponentMessage message={error} />)}
96
+ renderItem={renderItem}
97
+ />
98
+ <Pressable onPress={() => { LibNavigation.navigate('event/tms_add', { dataEvent: dataEO }) }} style={{ ...LibStyle.elevation(2), position: 'absolute', bottom: 15, right: 15, height: 50, width: 50, borderRadius: 25, backgroundColor: LibStyle.colorGreen, alignContent: 'center', alignItems: 'center', justifyContent: 'center' }}>
99
+ <LibIcon name='plus' color='#fff' size={26} />
100
+ </Pressable>
101
+ </View>
102
+ )
103
+ }
@@ -0,0 +1,94 @@
1
+ // withHooks
2
+
3
+ import { ComponentHeader } from 'esoftplay/cache/component/header/import';
4
+ import { ComponentTouchable } from 'esoftplay/cache/component/touchable/import';
5
+ import { LibInput_circle2 } from 'esoftplay/cache/lib/input_circle2/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
+ import esp from 'esoftplay/esp';
11
+ import useSafeState from 'esoftplay/state';
12
+ import React from 'react';
13
+ import { ScrollView, Text, View } from 'react-native';
14
+
15
+
16
+ export interface EventTms_addArgs {
17
+
18
+ }
19
+ export interface EventTms_addProps {
20
+
21
+ }
22
+ export default function m(props: EventTms_addProps): any {
23
+ let inputEmail = React.useRef<LibInput_circle2>(null)
24
+ const { dataEvent } = LibNavigation.getArgsAll(props)
25
+ const [email, setEmail] = useSafeState('')
26
+ const [qrcode, setQrcode] = useSafeState('')
27
+
28
+ // function addTMS() {
29
+ // let post = {
30
+ // email: email.trim(),
31
+ // event_id: dataEvent?.id,
32
+ // qr: qrcode.trim(),
33
+ // resetable: allowReset
34
+ // }
35
+
36
+ // new LibCurl('event_tms_add', post,
37
+ // (res, msg) => {
38
+ // EventTmsProperty.subscribe().trigger()
39
+ // dialogUser.current?.hide()
40
+ // LibToastProperty.show(msg)
41
+ // LibNavigation.back()
42
+ // }, (msg) => {
43
+ // LibDialog.warning(esp.lang("cashier/list", "text_failed_add"), msg?.message)
44
+ // }, 1
45
+ // )
46
+ // }
47
+
48
+ return (
49
+ <LibKeyboard_avoid style={{ flex: 1 }}>
50
+ <ComponentHeader title={esp.lang("event/tms_add", "header")} />
51
+ <View style={{ flex: 1, margin: 15, backgroundColor: '#fff', borderRadius: 10, ...LibStyle.elevation(2) }}>
52
+ <ScrollView style={{ flex: 1 }}>
53
+ <ComponentTouchable onPress={() => {
54
+ LibNavigation.navigateForResult('component/scanner', { fromPage: "event/tms_add" }).then((value: any) => {
55
+ LibNavigation.navigate('event/tms_add_result', { dataEvent: dataEvent, email: email.trim(), is_add: true, qr_code: value.trim() })
56
+ // setQrcode(value)
57
+ })
58
+ }}>
59
+ <View style={{ width: LibStyle.width - 30, overflow: 'hidden', borderTopLeftRadius: 10, borderTopRightRadius: 10, height: LibStyle.height * 0.5, backgroundColor: '#b8b7bf', justifyContent: 'center', alignContent: 'center', alignItems: 'center' }}>
60
+ <LibPicture source={esp.assets('icons/ic_barcode_white.png')} style={{ height: 250, width: 250 }} />
61
+ <Text allowFontScaling={false} style={{ fontFamily: "Arial", fontSize: 14, fontWeight: "bold", fontStyle: "normal", letterSpacing: 0, textAlign: "center", marginTop: 10, color: '#fff' }}>{esp.lang("transfer/index", "klik_here")}</Text>
62
+ </View>
63
+ </ComponentTouchable>
64
+ <Text allowFontScaling={false} style={{ opacity: 0.7, fontFamily: "Arial", fontSize: 14, fontWeight: "bold", fontStyle: "normal", letterSpacing: 0, textAlign: "center", marginTop: 20 }}>{esp.lang("event/tms_add", "scan_qr")}</Text>
65
+ <Text allowFontScaling={false} style={{ opacity: 0.6, fontFamily: "Arial", fontSize: 12, fontWeight: "normal", fontStyle: "normal", letterSpacing: 0, textAlign: "center", marginTop: 17 }}>{esp.lang("transfer/index", "or")}</Text>
66
+
67
+ <LibInput_circle2
68
+ ref={inputEmail}
69
+ onSubmitEditing={() => {
70
+ LibNavigation.navigate('event/tms_add_result', { dataEvent: dataEvent, email: email.trim(), is_add: true, qr_code: qrcode.trim() })
71
+ }}
72
+ onChangeText={(t) => setEmail(t)}
73
+ blurOnSubmit
74
+ returnKeyType="done"
75
+ autoCapitalize='none'
76
+ // autoFocus
77
+ style={{ borderColor: '#c4c4c4', height: 35, margin: 15, borderRadius: 5 }}
78
+ placeholder={esp.lang("event/tms_add", "placeholder_email")}
79
+ />
80
+
81
+ </ScrollView>
82
+
83
+ <ComponentTouchable onPress={() => {
84
+ LibNavigation.navigate('event/tms_add_result', { dataEvent: dataEvent, email: email.trim(), is_add: true, qr_code: qrcode.trim() })
85
+ }}>
86
+ <View style={{ margin: 15, marginTop: 20, height: 35, backgroundColor: "#6c432c", justifyContent: 'center', alignItems: 'center', paddingHorizontal: 9 }} >
87
+ <Text allowFontScaling={false} style={{ fontFamily: "ArialBold", fontSize: 12, textAlign: "center", textAlignVertical: 'center', color: 'white', marginRight: 13, marginLeft: 10 }} >{esp.lang("visitor/index", "submit")}</Text>
88
+ </View>
89
+
90
+ </ComponentTouchable>
91
+ </View >
92
+ </LibKeyboard_avoid>
93
+ )
94
+ }
@@ -0,0 +1,175 @@
1
+ // withHooks
2
+ import { useEffect } from 'react';
3
+
4
+ import { applyStyle } from 'esoftplay';
5
+ import { ComponentButton } from 'esoftplay/cache/component/button/import';
6
+ import { ComponentHeader } from 'esoftplay/cache/component/header/import';
7
+ import { EventTmsProperty } from 'esoftplay/cache/event/tms/import';
8
+ import { LibCurl } from 'esoftplay/cache/lib/curl/import';
9
+ import { LibDialog } from 'esoftplay/cache/lib/dialog/import';
10
+ import { LibIcon } from 'esoftplay/cache/lib/icon/import';
11
+ import { LibNavigation } from 'esoftplay/cache/lib/navigation/import';
12
+ import { LibObject } from 'esoftplay/cache/lib/object/import';
13
+ import { LibPicture } from 'esoftplay/cache/lib/picture/import';
14
+ import { LibProgress } from 'esoftplay/cache/lib/progress/import';
15
+ import { LibStyle } from 'esoftplay/cache/lib/style/import';
16
+ import { LibTextstyle } from 'esoftplay/cache/lib/textstyle/import';
17
+ import { LibToastProperty } from 'esoftplay/cache/lib/toast/import';
18
+ import { LibUtils } from 'esoftplay/cache/lib/utils/import';
19
+ import esp from 'esoftplay/esp';
20
+ import useSafeState from 'esoftplay/state';
21
+ import React from 'react';
22
+ import { Pressable, ScrollView, Text, TouchableOpacity, View } from 'react-native';
23
+
24
+
25
+ export interface EventTms_add_resultArgs {
26
+
27
+ }
28
+ export interface EventTms_add_resultProps {
29
+
30
+ }
31
+ export default function m(props: EventTms_add_resultProps): any {
32
+ const { dataEvent, email, qr_code, is_add } = LibNavigation.getArgsAll(props)
33
+ const [allowReset, setAllowReset] = useSafeState<any>(0)
34
+ const [ticketTypes, setTicketTypes] = useSafeState<any>()
35
+ const [dataTms, setDataTms] = useSafeState<any>()
36
+
37
+ useEffect(() => {
38
+ loadDataTickets()
39
+ loadDataTms()
40
+ }, [])
41
+
42
+ function loadDataTms() {
43
+ let post: any = {
44
+ // email: "bagus@fisip.net",
45
+ email: email?.trim(),
46
+ }
47
+ if (qr_code)
48
+ post.qr = qr_code?.trim()
49
+ new LibCurl('user', post,
50
+ (res, msg) => {
51
+ setDataTms(res)
52
+ },
53
+ (msg) => {
54
+ LibDialog.warningConfirm(esp.lang("event/tms_add_result", "oops"), msg?.message, esp.lang("event/tms_add_result", "confirm_back"), () => {
55
+ LibNavigation.back()
56
+ }, "", () => { })
57
+ }
58
+ )
59
+ }
60
+
61
+ function loadDataTickets() {
62
+ let post: any = {
63
+ event_id: dataEvent?.id
64
+ }
65
+
66
+ if (email) {
67
+ post.email = email
68
+ }
69
+
70
+ if (qr_code) {
71
+ post.qrcode = qr_code
72
+ }
73
+
74
+ new LibCurl('event_tms_access' + LibUtils.objectToUrlParam(post), null, (res, msg) => {
75
+ if (is_add) {
76
+ const updatedPrice = res.price.map((item: any) => {
77
+ return { ...item, is_selected: "1" };
78
+ });
79
+
80
+ const updatedData = { ...res, price: updatedPrice }; // Menggabungkan kembali data dengan price yang telah diperbarui
81
+ setTicketTypes(updatedData)
82
+
83
+ } else {
84
+ setTicketTypes(res)
85
+ }
86
+
87
+ setAllowReset(res?.is_resetable)
88
+
89
+ }, (err) => {
90
+ })
91
+ }
92
+
93
+ function addTMS() {
94
+ let ids = ticketTypes?.price?.filter((item: any) => item.is_selected == 1).map((it: any) => it.id)
95
+ let post: any = {
96
+ event_id: dataEvent?.id,
97
+ resetable: allowReset,
98
+ access_ticket: JSON.stringify(ids)
99
+ }
100
+
101
+ if (email) {
102
+ post.email = email.trim()
103
+ }
104
+ if (qr_code) {
105
+ post.qr = qr_code.trim()
106
+ }
107
+
108
+ LibProgress.show(esp.lang("event/tms_add_result", "wait"))
109
+ new LibCurl('event_tms_add', post,
110
+ (res, msg) => {
111
+ LibProgress.hide()
112
+ EventTmsProperty.subscribe().trigger()
113
+ LibToastProperty.show(msg)
114
+ LibNavigation.back()
115
+ if (is_add) {
116
+ LibNavigation.back()
117
+ }
118
+ }, (msg) => {
119
+ LibProgress.hide()
120
+ LibDialog.warning(esp.lang("cashier/list", "text_failed_add"), msg?.message)
121
+ }
122
+ )
123
+ }
124
+
125
+ return (
126
+ <View style={{ flex: 1 }}>
127
+ <ComponentHeader title={esp.lang("event/tms_add", "header")} />
128
+ <ScrollView style={{ padding: 15 }}>
129
+ <View style={{ flexDirection: 'row' }}>
130
+ <LibPicture
131
+ source={{ uri: dataTms?.image }}
132
+ style={{ width: 60, height: 60, borderRadius: 50 }}
133
+ />
134
+ <View style={{ marginLeft: 10, justifyContent: 'center' }}>
135
+ <Text allowFontScaling={false} numberOfLines={1} ellipsizeMode='tail' style={{ fontSize: 16, fontWeight: "bold", color: "#4a4a4a" }} >{dataTms?.name}</Text>
136
+ <Text allowFontScaling={false} style={{ fontSize: 12, fontWeight: "bold", lineHeight: 22, color: "#b7b7b7" }} >{dataTms?.email}</Text>
137
+ </View>
138
+ </View>
139
+
140
+ {
141
+ ticketTypes &&
142
+ <View style={{ marginTop: 10 }}>
143
+ <LibTextstyle textStyle='m_overline' text={esp.lang("event/tms_add_result", "ticket_type")} style={{ fontSize: 12, marginTop: 15, marginBottom: 15 }} />
144
+ {
145
+ ticketTypes?.price?.map((item: any, i: number) => {
146
+ return (
147
+ <TouchableOpacity key={i} onPress={() => {
148
+ setTicketTypes(LibObject.set(ticketTypes, item.is_selected == 1 ? 0 : 1)("price", i, 'is_selected'))
149
+ }} style={applyStyle({ marginBottom: 10, flexDirection: 'row', alignContent: 'center', alignItems: 'center' })} >
150
+ <LibIcon name={item.is_selected == 0 ? "checkbox-blank-outline" : "checkbox-marked"} color={item.is_selected == 0 ? "#000" : LibStyle.colorGreen} />
151
+ <Text allowFontScaling={false} style={applyStyle({ marginLeft: 8, color: item.is_selected == 0 ? "#000" : LibStyle.colorGreen, fontFamily: "Arial", fontSize: 14, fontWeight: "bold", fontStyle: "normal", letterSpacing: 0, paddingLeft: 3, paddingRight: 3 })}>{item.name}</Text>
152
+ </TouchableOpacity>
153
+ )
154
+ })
155
+ }
156
+ </View>
157
+ }
158
+
159
+ </ScrollView>
160
+ <View style={{ padding: 10 }}>
161
+ <Pressable onPress={() => { setAllowReset(allowReset == 1 ? 0 : 1) }} style={applyStyle({ marginBottom: 10, flexDirection: 'row', alignContent: 'center', alignItems: 'center' })} >
162
+ <LibIcon name={allowReset == 0 ? "checkbox-blank-outline" : "checkbox-marked"} color={allowReset == 0 ? "#000" : LibStyle.colorGreen} />
163
+ <Text allowFontScaling={false} style={applyStyle({ marginLeft: 8, color: allowReset == 0 ? "#000" : LibStyle.colorGreen, fontFamily: "Arial", fontSize: 14, fontWeight: "bold", fontStyle: "normal", letterSpacing: 0, paddingLeft: 3, paddingRight: 3 })}>{esp.lang("event/tms_add_result", "reset")}</Text>
164
+ </Pressable>
165
+ <ComponentButton
166
+ label={esp.lang("event/tms_add_result", "save")}
167
+ backgroundColor={LibStyle.colorGreen}
168
+ onPress={() => {
169
+ addTMS()
170
+ }}
171
+ />
172
+ </View>
173
+ </View>
174
+ )
175
+ }
@@ -0,0 +1,89 @@
1
+ // withHooks
2
+ import { ComponentHeader } from 'esoftplay/cache/component/header/import';
3
+ import { LibNavigation } from 'esoftplay/cache/lib/navigation/import';
4
+ import { LibPicture } from 'esoftplay/cache/lib/picture/import';
5
+ import { LibStyle } from 'esoftplay/cache/lib/style/import';
6
+ import { UserClass } from 'esoftplay/cache/user/class/import';
7
+ import esp from 'esoftplay/esp';
8
+
9
+ import React from 'react';
10
+ import { ScrollView, Text, TouchableOpacity, View } from 'react-native';
11
+
12
+
13
+ export interface EventTms_dashboardArgs {
14
+
15
+ }
16
+ export interface EventTms_dashboardProps {
17
+
18
+ }
19
+ export default function m(props: EventTms_dashboardProps): any {
20
+ const [user] = UserClass.state().useState()
21
+ let menus = [
22
+ {
23
+ id: 1,
24
+ title: esp.lang("user/profile", "tms_scanner"),
25
+ icon: 'menu/ic_turnstile.png',
26
+ active: 1,
27
+ color_accent: '#FFC523',
28
+ onPress: () => {
29
+ LibNavigation.navigateForResult('user/profile_tms_list', { data: user?.is_tms }).then((value) => {
30
+ LibNavigation.navigate('bigbang/gate', { is_scanner: value, typeScanner: 'tms' })
31
+ })
32
+ }
33
+ },
34
+ {
35
+ id: 2,
36
+ title: esp.lang("user/profile", "hall_scanner"),
37
+ icon: 'menu/ic_hall.png',
38
+ active: 1,
39
+ color_accent: '#01D0FB',
40
+ onPress: () => {
41
+ LibNavigation.navigateForResult('user/profile_tms_list', { data: user?.is_tms }).then((value) => {
42
+ LibNavigation.navigate('bigbang/gate', { is_scanner: value, typeScanner: 'hall' })
43
+ })
44
+ }
45
+ },
46
+ {
47
+ id: 3,
48
+ title: esp.lang("user/profile", "exchange"),
49
+ icon: 'menu/ic_redempt.png',
50
+ active: 1,
51
+ color_accent: '#D0004F',
52
+ onPress: () => {
53
+ LibNavigation.navigateForResult('user/profile_tms_list', { data: user?.is_tms }).then((value) => {
54
+ LibNavigation.navigate('event/exchange_ticket', { dataEvent: value })
55
+ })
56
+ }
57
+ },
58
+ ]
59
+
60
+ function renderMenu(item: any, i: number) {
61
+ return (
62
+ <TouchableOpacity
63
+ onPress={item.onPress}
64
+ key={i} style={{ ...LibStyle.elevation(3), backgroundColor: item.color_accent, paddingBottom: 3, margin: 10, marginBottom: 0 }}>
65
+ <View style={{ padding: 10, backgroundColor: '#fff', height: 80, }}>
66
+ <Text allowFontScaling={false} style={{ fontWeight: 'bold', fontSize: 18, letterSpacing: 1 }}>{item.title}</Text>
67
+
68
+ <View style={{ position: 'absolute', bottom: 10, right: 10 }}>
69
+ <LibPicture source={esp.assets(item.icon)} style={{ height: 50, width: 50 }} />
70
+ </View>
71
+
72
+ </View>
73
+ </TouchableOpacity>
74
+ )
75
+ }
76
+
77
+ return (
78
+ <View style={{ flex: 1, backgroundColor: LibStyle.colorBgGrey }}>
79
+ <ComponentHeader title={'Dashboard TMS'} />
80
+
81
+ <ScrollView>
82
+ {
83
+ menus?.map(renderMenu)
84
+ }
85
+ </ScrollView>
86
+
87
+ </View>
88
+ )
89
+ }
@@ -0,0 +1,66 @@
1
+ // withHooks
2
+
3
+ import { ComponentHeader } from 'esoftplay/cache/component/header/import';
4
+ import { LibNavigation } from 'esoftplay/cache/lib/navigation/import';
5
+ import { LibPicture } from 'esoftplay/cache/lib/picture/import';
6
+ import { LibUtils } from 'esoftplay/cache/lib/utils/import';
7
+ import esp from 'esoftplay/esp';
8
+ import React from 'react';
9
+ import { ScrollView, Text, TouchableOpacity, View } from 'react-native';
10
+
11
+
12
+ export interface EventTms_event_listArgs {
13
+
14
+ }
15
+ export interface EventTms_event_listProps {
16
+
17
+ }
18
+ export default function m(props: EventTms_event_listProps): any {
19
+ const { is_eo } = LibNavigation.getArgsAll(props)
20
+
21
+ if (is_eo?.length == 1) {
22
+ LibNavigation.back()
23
+ LibNavigation.navigate('event/tms', { dataEO: is_eo[0] })
24
+ }
25
+
26
+ function renderItem(item: any, i: number) {
27
+ return (
28
+ <TouchableOpacity onPress={() => {
29
+ LibNavigation.navigate('event/tms', { dataEO: item })
30
+ }} key={i} >
31
+ <View style={styleId_8oX1o}>
32
+ {
33
+ item.image != "" && item.image != null ?
34
+ <LibPicture source={{ uri: item.image }} style={styleId_P1YdJ} />
35
+ :
36
+ <View style={styleId_Z1FsLgN} />
37
+ }
38
+ <View style={styleId_Z1B8TCk}>
39
+ <Text allowFontScaling={false} style={styleId_Z2mC6aP}>{item.name || ""}</Text>
40
+ <Text allowFontScaling={false} style={styleId_Z1R4k1n} >{LibUtils.getDateRange(item.start_date, item.end_date, esp.lang("event/tms_event_list", "until"))}</Text>
41
+ </View>
42
+ </View>
43
+ </TouchableOpacity>
44
+
45
+ )
46
+ }
47
+
48
+ return (
49
+ <View style={{ flex: 1 }}>
50
+ <ComponentHeader title={esp.lang("user/profile_tms_list", "title_list_event")} />
51
+ <ScrollView showsVerticalScrollIndicator={false} >
52
+ {/* untuk scanner */}
53
+ {
54
+ is_eo?.map?.(renderItem)
55
+ }
56
+ </ScrollView>
57
+ </View>
58
+ )
59
+ }
60
+
61
+ const styleId_8oX1o: any = { marginTop: 10, backgroundColor: 'white', marginHorizontal: 15, flexDirection: 'row', padding: 10, alignItems: 'center', justifyContent: 'center' }
62
+ const styleId_P1YdJ: any = { borderRadius: 30, width: 60, height: 60 }
63
+ const styleId_Z1FsLgN: any = { borderRadius: 30, width: 60, height: 60, backgroundColor: 'grey' }
64
+ const styleId_Z1B8TCk: any = { paddingLeft: 10, paddingRight: 10, flex: 1 }
65
+ const styleId_Z2mC6aP: any = { fontSize: 16 }
66
+ const styleId_Z1R4k1n: any = { paddingTop: 10, fontFamily: "Arial", fontSize: 12, fontWeight: "bold", fontStyle: "normal", letterSpacing: 0, color: "#f39c12" }
@@ -0,0 +1,74 @@
1
+ // withHooks
2
+ import { ComponentHeader } from 'esoftplay/cache/component/header/import';
3
+ import { LibCurl } from 'esoftplay/cache/lib/curl/import';
4
+ import { LibIcon } from 'esoftplay/cache/lib/icon/import';
5
+ import { LibList } from 'esoftplay/cache/lib/list/import';
6
+ import { LibNavigation } from 'esoftplay/cache/lib/navigation/import';
7
+ import { LibStyle } from 'esoftplay/cache/lib/style/import';
8
+ import esp from 'esoftplay/esp';
9
+ import useSafeState from 'esoftplay/state';
10
+
11
+ import React, { useEffect } from 'react';
12
+ import { Text, TouchableOpacity, View } from 'react-native';
13
+
14
+
15
+ export interface EventTurnstile_event_gateArgs {
16
+
17
+ }
18
+ export interface EventTurnstile_event_gateProps {
19
+
20
+ }
21
+ export default function m(props: EventTurnstile_event_gateProps): any {
22
+ const { api_key, event_id } = LibNavigation.getArgsAll(props)
23
+ const [result, setResult] = useSafeState<any>(undefined)
24
+ const [selectGate, setSelectGate] = useSafeState<any>()
25
+ const [error, setError] = useSafeState<any>()
26
+
27
+ useEffect(() => {
28
+ return () => LibNavigation.cancelBackResult(LibNavigation.getResultKey(props))
29
+ }, [])
30
+
31
+ useEffect(() => {
32
+ loadDataGate()
33
+ }, [])
34
+
35
+ function loadDataGate() {
36
+ new LibCurl("gate_turnstile_event_gate?event_id=" + event_id, null, (res, msg) => {
37
+ setResult(res)
38
+ }, (err) => {
39
+ // setError(err)
40
+ }, 1)
41
+ }
42
+
43
+
44
+ function renderGate(item: any, i: number) {
45
+ let _selectGate = item.gate_id == selectGate?.gate_id
46
+
47
+ return (
48
+ <TouchableOpacity onPress={() => {
49
+ setSelectGate(item)
50
+ LibNavigation.sendBackResult(item)
51
+ }} style={styleId_Z1965m2} >
52
+ <View style={styleId_ZPIul6} >
53
+ <LibIcon name={_selectGate ? "radiobox-marked" : "radiobox-blank"} size={18} color={_selectGate ? "#3ea4dc" : "#434343"} />
54
+ <Text allowFontScaling={false} style={styleId_2eEf4t} >{item.gate_name}</Text>
55
+ </View>
56
+ </TouchableOpacity>
57
+ )
58
+ }
59
+
60
+
61
+ return (
62
+ <View style={{ flex: 1, backgroundColor: "#fff" }}>
63
+ <ComponentHeader title={esp.lang("event/turnstile_event_gate", "header_title")} />
64
+ <LibList
65
+ data={result}
66
+ onRefresh={loadDataGate}
67
+ renderItem={renderGate}
68
+ />
69
+ </View>
70
+ )
71
+ }
72
+ const styleId_Z1965m2: any = { borderBottomWidth: 1, borderBottomColor: LibStyle.colorBgGrey }
73
+ const styleId_ZPIul6: any = { margin: 15, width: LibStyle.width, flex: 1, flexDirection: 'row' }
74
+ const styleId_2eEf4t: any = { marginLeft: 10, fontFamily: "Arial", fontSize: 13, fontWeight: "bold", fontStyle: "normal", letterSpacing: 0/* , color: LibStyle.colorBlue */ }