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,149 @@
1
+ // withHooks
2
+ import { ComponentHeader } from 'esoftplay/cache/component/header/import';
3
+ import { ComponentLabel_input } from 'esoftplay/cache/component/label_input/import';
4
+ import { ComponentTouchable } from 'esoftplay/cache/component/touchable/import';
5
+ import { LibCurl } from 'esoftplay/cache/lib/curl/import';
6
+ import { LibInput } from 'esoftplay/cache/lib/input/import';
7
+ import { LibNavigation } from 'esoftplay/cache/lib/navigation/import';
8
+ import { LibProgress } from 'esoftplay/cache/lib/progress/import';
9
+ import { LibStyle } from 'esoftplay/cache/lib/style/import';
10
+
11
+ import { LibDialog } from 'esoftplay/cache/lib/dialog/import';
12
+ import esp from 'esoftplay/esp';
13
+ import useSafeState from 'esoftplay/state';
14
+ import React, { useEffect } from 'react';
15
+ import { ScrollView, Text, View } from 'react-native';
16
+
17
+
18
+ export interface EventVoucherArgs {
19
+ defaultCode?: string
20
+ event_id: number,
21
+ price_id: string,
22
+ from?: string,
23
+ ondate?: string
24
+ qty?: string
25
+ bundling_id?: string //untuk registrasi pos, kiriman dari pos/pricing_payment
26
+ }
27
+ export interface EventVoucherProps {
28
+
29
+ }
30
+ export default function m(props: EventVoucherProps): any {
31
+ let { event_id, price_id, from, defaultCode, bundling_id, ondate, qty }: any = LibNavigation.getArgsAll(props)
32
+ let [result, setResult] = useSafeState<any>()
33
+ let [showText, setShowText] = useSafeState<boolean>(false)
34
+ let voucherCode = React.useRef<LibInput>(null)
35
+
36
+ useEffect(() => {
37
+ return () => LibNavigation.cancelBackResult(LibNavigation.getResultKey(props))
38
+ }, [])
39
+
40
+ function checkVoucher() {
41
+ let post = {
42
+ voucher_code: voucherCode.current!.getText(),
43
+ event_id: event_id,
44
+ price_id: price_id,
45
+ ondate: ondate,
46
+ qty: qty
47
+ }
48
+
49
+
50
+ let url = "event_booking_voucher_check"
51
+
52
+ LibProgress.show(esp.lang("event/voucher", "check_wait"))
53
+ new LibCurl(url, post, (res, msg) => {
54
+ setShowText(true)
55
+ setResult(res)
56
+ LibProgress.hide()
57
+ }, (error) => {
58
+ LibDialog.warning("Oops", error?.message)
59
+ setShowText(false)
60
+ LibProgress.hide()
61
+
62
+ }, 1)
63
+ }
64
+
65
+ function checkVoucherPos() {
66
+ let post = {
67
+ code: voucherCode.current!.getText(),
68
+ bundling_id: bundling_id || ""
69
+ }
70
+
71
+ let url = "pos_discount_check"
72
+
73
+ LibProgress.show(esp.lang("event/voucher", "check_wait"))
74
+ new LibCurl(url, post, (res, msg) => {
75
+ setShowText(true)
76
+ setResult(res)
77
+ LibProgress.hide()
78
+ }, (error) => {
79
+ LibDialog.warning("Oops", error?.message)
80
+ setShowText(false)
81
+ LibProgress.hide()
82
+
83
+ }, 1)
84
+ }
85
+
86
+
87
+ return (
88
+ <View style={{ flex: 1, backgroundColor: '#fff' }}>
89
+ <ComponentHeader title={esp.lang("event/voucher", "header")} />
90
+ <ScrollView>
91
+ <View style={{ margin: 15, marginTop: 0 }}>
92
+ <ComponentLabel_input label={esp.lang("event/voucher", "voucher_or_referral_code")} mandatory />
93
+ </View>
94
+ <View testID='input_voucher'>
95
+ <LibInput
96
+ ref={voucherCode}
97
+ label=""
98
+ editable={showText ? false : true}
99
+ defaultValue={defaultCode}
100
+ autoCapitalize={"characters"}
101
+ returnKeyType="go"
102
+ onSubmitEditing={() => {
103
+ if (from == 'pos/pricing_payment') /* untuk register pos, bawa props bundling_id: bundling yg dipilih saat register */ {
104
+ checkVoucherPos()
105
+ } else {
106
+ checkVoucher()
107
+ }
108
+ }}
109
+ style={{ marginTop: -20, backgroundColor: LibStyle.colorGrey, letterSpacing: 0, fontSize: 30, textAlign: 'center' }} />
110
+ </View>
111
+ {
112
+ showText &&
113
+ <Text allowFontScaling={false} style={{ marginLeft: 15, fontFamily: "Arial", fontSize: 10, fontWeight: "bold", fontStyle: "normal", letterSpacing: 0, color: LibStyle.colorPrimary }} >{esp.lang("bigbang/payment", "text_alert")}</Text>
114
+ }
115
+ <ComponentTouchable testID='use_voucher' onPress={() => {
116
+ if (!showText) {
117
+ if (from == 'pos/pricing_payment') /* untuk register pos, bawa props bundling_id: bundling yg dipilih saat register */ {
118
+ checkVoucherPos()
119
+ } else {
120
+ checkVoucher()
121
+ }
122
+ }
123
+ }}>
124
+ <View style={{ alignSelf: 'flex-end', marginRight: 15, marginBottom: 10, marginLeft: 10, width: 68, height: 35, borderRadius: 3, backgroundColor: showText ? '#8e8e8e' : LibStyle.colorGreen, alignContent: 'center', alignItems: 'center', justifyContent: 'center' }}>
125
+ <Text allowFontScaling={false} style={{ fontFamily: "Arial", fontSize: 12, fontWeight: "bold", fontStyle: "normal", letterSpacing: 0, textAlign: "center", color: '#fff' }}>{esp.lang("bigbang/payment", "button_use")}</Text>
126
+ </View>
127
+ </ComponentTouchable>
128
+
129
+ </ScrollView>
130
+ {
131
+ result &&
132
+ <ComponentTouchable testID='claim_now' onPress={() => {
133
+ if (result) {
134
+ let data = {
135
+ ...result,
136
+ code: voucherCode?.current?.getText()
137
+ }
138
+ LibNavigation.sendBackResult(data)
139
+ }
140
+ }}>
141
+ <View style={{ marginHorizontal: 15, marginVertical: 10, height: 35, borderRadius: 17.5, backgroundColor: result ? "#00b894" : LibStyle.colorGrey, alignItems: 'center', justifyContent: 'center', flexDirection: 'row' }} >
142
+ <Text allowFontScaling={false} style={{ fontFamily: "Arial", fontSize: 13, fontWeight: "bold", fontStyle: "normal", letterSpacing: 0, textAlign: "center", color: '#fff' }} >{esp.lang("bigbang/payment", "claim")}</Text>
143
+ </View>
144
+ </ComponentTouchable>
145
+ }
146
+
147
+ </View>
148
+ )
149
+ }
@@ -0,0 +1,181 @@
1
+ // withHooks
2
+ import { ComponentHeader } from 'esoftplay/cache/component/header/import';
3
+ import { ComponentTouchable } from 'esoftplay/cache/component/touchable/import';
4
+ import { LibCurl } from 'esoftplay/cache/lib/curl/import';
5
+ import { LibDialog } from 'esoftplay/cache/lib/dialog/import';
6
+ import { LibIcon } from 'esoftplay/cache/lib/icon/import';
7
+ import { LibInput } from 'esoftplay/cache/lib/input/import';
8
+ import { LibKeyboard_avoid } from 'esoftplay/cache/lib/keyboard_avoid/import';
9
+ import { LibNavigation } from 'esoftplay/cache/lib/navigation/import';
10
+ import { LibObject } from 'esoftplay/cache/lib/object/import';
11
+ import { LibProgress } from 'esoftplay/cache/lib/progress/import';
12
+ import { LibSlidingup } from 'esoftplay/cache/lib/slidingup/import';
13
+ import { LibStyle } from 'esoftplay/cache/lib/style/import';
14
+ import { LibToastProperty } from 'esoftplay/cache/lib/toast/import';
15
+ import esp from 'esoftplay/esp';
16
+ import useSafeState from 'esoftplay/state';
17
+ import { useEffect, useRef } from 'react';
18
+
19
+ import React from 'react';
20
+ import { Pressable, ScrollView, Text, TouchableOpacity, View } from 'react-native';
21
+
22
+
23
+ export interface EventVoucher_multiArgs {
24
+
25
+ }
26
+ export interface EventVoucher_multiProps {
27
+
28
+ }
29
+
30
+ export type DataTicket = Array<{
31
+ "list_id": string,
32
+ "date_id": number,
33
+ "ondate": string,
34
+ "price_id": string,
35
+ "price": string,
36
+ "quota": string,
37
+ "quota_used": string,
38
+ "show_limit": number,
39
+ "status": number,
40
+ "show_price": number,
41
+ "currency": string,
42
+ "schedule": {
43
+ "info": string,
44
+ "artist": [],
45
+ },
46
+ "selected": number,
47
+ "qty": string,
48
+ "seat_autopick": number,
49
+ "use_seat": string,
50
+ "type": string,
51
+ "tax": string,
52
+ "term": Array<string>,
53
+ }>
54
+
55
+ export default function m(props: EventVoucher_multiProps): any {
56
+ const { dataTicket, event_id } = LibNavigation.getArgsAll(props)
57
+ let [data, setData, getData] = useSafeState<any>(dataTicket)
58
+ let [dataPost, setDataPost, getDataPost] = useSafeState<any>()
59
+ let voucherCode = useRef<LibInput>(null)
60
+ const dialogInput = useRef<LibSlidingup>(null)
61
+
62
+
63
+ useEffect(() => {
64
+ // dialogInput.current?.show()
65
+ return () => LibNavigation.cancelBackResult(LibNavigation.getResultKey(props))
66
+ }, [])
67
+
68
+ function checkVoucher() {
69
+ let post = {
70
+ voucher_code: voucherCode.current!.getText(),
71
+ event_id: event_id,
72
+ price_id: getDataPost().price_id,
73
+ ondate: getDataPost().ondate,
74
+ qty: dataTicket?.qty
75
+ }
76
+
77
+
78
+ let url = "event_booking_voucher_check"
79
+ LibProgress.show(esp.lang("event/voucher", "check_wait"))
80
+ new LibCurl(url, post, (res, msg) => {
81
+ let newRes = {
82
+ voucher_code: post?.voucher_code,
83
+ ...res
84
+ }
85
+ // setResult(res)
86
+ let a = LibObject.set(getData(), newRes)(getDataPost().index, 'voucher')
87
+ setData(a)
88
+ LibProgress.hide()
89
+ LibToastProperty.show(msg)
90
+ dialogInput?.current?.hide()
91
+ }, (error) => {
92
+ LibDialog.warning("Oops", error?.message)
93
+ LibProgress.hide()
94
+
95
+ }, 1)
96
+ }
97
+
98
+ return (
99
+ <View style={{ flex: 1, backgroundColor: LibStyle.colorBgGrey }}>
100
+ <ComponentHeader title={esp.lang("event/voucher", "header")} />
101
+ <LibKeyboard_avoid style={{ flex: 1, marginBottom: 15 }}>
102
+ <ScrollView>
103
+ {
104
+ data?.length > 0 && data?.map((item: any, i: number) => {
105
+ return (
106
+ <View style={{ borderRadius: 5, margin: 5, backgroundColor: '#fff' }}>
107
+
108
+ <View style={{ margin: 15, marginTop: 0 }}>
109
+ <View style={{ marginTop: 15, flexDirection: 'row', alignContent: 'center', alignItems: 'center', justifyContent: 'space-between' }}>
110
+ <Text allowFontScaling={false} style={{ flex: 1, fontWeight: 'bold' }}>{">"} {item.type}</Text>
111
+ {
112
+ item.hasOwnProperty('voucher') &&
113
+ <TouchableOpacity onPress={() => {
114
+ let a = LibObject.removeKeys(getData(), ['voucher'])(i)
115
+ setData(a)
116
+ }} style={{ flex: 1 }}>
117
+ <LibIcon name='close-circle' style={{ alignSelf: 'flex-end' }} color={LibStyle.colorRed} />
118
+ </TouchableOpacity>
119
+ }
120
+ </View>
121
+ <TouchableOpacity testID='voucher' onPress={() => {
122
+ let post = {
123
+ index: i,
124
+ price_id: item.price_id,
125
+ ondate: item.ondate,
126
+ type: item.type
127
+ }
128
+ setDataPost(post)
129
+ dialogInput.current?.show()
130
+ }} style={{ flex: 1, borderRadius: 10, borderColor: item.hasOwnProperty('voucher') ? LibStyle.colorGreen : "#c9c9c9", borderWidth: 1, backgroundColor: '#fff', padding: 7, marginTop: 10, marginBottom: 0, flexDirection: 'row', justifyContent: 'space-between', alignContent: 'center', alignItems: 'center' }}>
131
+ <Text allowFontScaling={false} style={{ flexWrap: 'wrap', marginLeft: 15, fontSize: 12, fontWeight: "normal", fontStyle: "normal", lineHeight: 13, letterSpacing: 0, textAlign: "left", color: item.hasOwnProperty('voucher') ? LibStyle.colorGreen : "#707070" }}>
132
+ {item.hasOwnProperty('voucher') ? esp.lang("bigbang/payment", "success_use_code") : esp.lang("bigbang/payment", "input_code")}
133
+ {item.hasOwnProperty('voucher') && <Text style={{ color: item.hasOwnProperty('voucher') ? LibStyle.colorGreen : "#000", fontWeight: 'bold' }}> {item?.voucher?.voucher_code}</Text>}
134
+ </Text>
135
+ <LibIcon name="chevron-right" color={item.hasOwnProperty('voucher') ? LibStyle.colorGreen : "#000"} />
136
+ </TouchableOpacity>
137
+ </View>
138
+ </View>
139
+ )
140
+ })
141
+ }
142
+ </ScrollView>
143
+ </LibKeyboard_avoid>
144
+ <ComponentTouchable testID='claim_now' onPress={() => {
145
+ LibNavigation.sendBackResult(getData())
146
+ }}>
147
+ <View style={{ marginHorizontal: 15, marginVertical: 10, height: 35, borderRadius: 17.5, backgroundColor: "#00b894", alignItems: 'center', justifyContent: 'center', flexDirection: 'row' }} >
148
+ <Text allowFontScaling={false} style={{ fontFamily: "Arial", fontSize: 13, fontWeight: "bold", fontStyle: "normal", letterSpacing: 0, textAlign: "center", color: '#fff' }} >{esp.lang("bigbang/payment", "claim")}</Text>
149
+ </View>
150
+ </ComponentTouchable>
151
+
152
+ <LibSlidingup ref={dialogInput} >
153
+ <View style={[{ maxHeight: LibStyle.height * 0.7, borderTopLeftRadius: 10, borderTopRightRadius: 10, backgroundColor: '#fff' }]}>
154
+ <View style={{ padding: 16, paddingBottom: 0, flexDirection: 'row', alignItems: 'center' }} >
155
+ <Text allowFontScaling={false} style={{ flex: 1, fontFamily: "ArialBold", fontSize: 18, fontWeight: "bold", fontStyle: "normal", letterSpacing: 0, color: "#4a4a4a" }}>{esp.lang("event/voucher", "voucher_or_referral_code")}</Text>
156
+ <Pressable onPress={() => dialogInput.current?.hide()} >
157
+ <LibIcon name='close' />
158
+ </Pressable>
159
+ </View>
160
+ <Text allowFontScaling={false} style={{ marginLeft: 16, marginTop: 10, fontSize: 14, fontStyle: "normal", letterSpacing: 0, color: "#4a4a4a" }}>{getDataPost()?.type}</Text>
161
+
162
+ <LibInput
163
+ ref={voucherCode}
164
+ label=""
165
+ autoCapitalize={"characters"}
166
+ returnKeyType="go"
167
+ onSubmitEditing={() => {
168
+ checkVoucher()
169
+ }}
170
+ style={{ backgroundColor: LibStyle.colorGrey, letterSpacing: 0, fontSize: 30, textAlign: 'center' }} />
171
+ <TouchableOpacity testID='use_voucher' onPress={() => {
172
+ checkVoucher()
173
+ }} style={{ alignSelf: 'flex-end', marginBottom: 15, marginRight: 15, width: 68, height: 35, borderRadius: 3, backgroundColor: LibStyle.colorGreen, alignContent: 'center', alignItems: 'center', justifyContent: 'center' }}>
174
+ <Text allowFontScaling={false} style={{ fontFamily: "Arial", fontSize: 12, fontWeight: "bold", fontStyle: "normal", letterSpacing: 0, textAlign: "center", color: '#fff' }}>{esp.lang("bigbang/payment", "button_use")}</Text>
175
+ </TouchableOpacity>
176
+ </View>
177
+
178
+ </LibSlidingup>
179
+ </View>
180
+ )
181
+ }
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
package/fonts/mono.ttf ADDED
Binary file