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,273 @@
1
+ // withHooks
2
+ import { ComponentButton } from 'esoftplay/cache/component/button/import';
3
+ import { ComponentHeader } from 'esoftplay/cache/component/header/import';
4
+ import { ComponentLabel_input } from 'esoftplay/cache/component/label_input/import';
5
+ import { ComponentMessage } from 'esoftplay/cache/component/message/import';
6
+ import { ComponentSlidingup } from 'esoftplay/cache/component/slidingup/import';
7
+ import { EventCounter_eoProperty } from 'esoftplay/cache/event/counter_eo/import';
8
+ import { EventCounter_history_item } from 'esoftplay/cache/event/counter_history_item/import';
9
+ import { EventCounter_info } from 'esoftplay/cache/event/counter_info/import';
10
+ import { EventCounter_menu } from 'esoftplay/cache/event/counter_menu/import';
11
+ import { EventCounter_section } from 'esoftplay/cache/event/counter_section/import';
12
+ import { EventCounter_user_list_item } from 'esoftplay/cache/event/counter_user_list_item/import';
13
+ import { LibCurl } from 'esoftplay/cache/lib/curl/import';
14
+ import { LibDialog } from 'esoftplay/cache/lib/dialog/import';
15
+ import { LibFocus } from 'esoftplay/cache/lib/focus/import';
16
+ import { LibIcon } from 'esoftplay/cache/lib/icon/import';
17
+ import { LibInput_rectangle } from 'esoftplay/cache/lib/input_rectangle/import';
18
+ import { LibLoading } from 'esoftplay/cache/lib/loading/import';
19
+ import { LibNavigation } from 'esoftplay/cache/lib/navigation/import';
20
+ import { LibStyle } from 'esoftplay/cache/lib/style/import';
21
+ import { LibToastProperty } from 'esoftplay/cache/lib/toast/import';
22
+ import { LibUtils } from 'esoftplay/cache/lib/utils/import';
23
+ import { UserPopup } from 'esoftplay/cache/user/popup/import';
24
+ import esp from 'esoftplay/esp';
25
+ import useSafeState from 'esoftplay/state';
26
+
27
+ import { BboConfigProperty } from 'esoftplay/cache/bbo/config/import';
28
+ import React, { useEffect, useRef } from 'react';
29
+ import { Pressable, RefreshControl, ScrollView, Text, TouchableOpacity, View } from 'react-native';
30
+
31
+
32
+ export interface EventCounter_lmArgs {
33
+
34
+ }
35
+ export interface EventCounter_lmProps {
36
+
37
+ }
38
+ export default function m(props: EventCounter_lmProps): any {
39
+ const { is_manager } = LibNavigation.getArgsAll(props)
40
+ const dialogAdd = useRef<ComponentSlidingup>(null)
41
+ const dialogUser = useRef<ComponentSlidingup>(null)
42
+ const [bboConfig] = BboConfigProperty.state().useState()
43
+
44
+ const [email, setEmail] = useSafeState<string>('')
45
+
46
+ const [result, setResult] = useSafeState<any>()
47
+ const [typeCashier, setTypeCashier] = useSafeState<any>();
48
+ const [refreshing, setRefreshing] = useSafeState<boolean>(false);
49
+
50
+ useEffect(() => {
51
+ BboConfigProperty.curlConfig('v2/config_event')
52
+ loadData()
53
+ }, [])
54
+
55
+ function loadData() {
56
+ new LibCurl('event_manager_home?event_id=' + is_manager?.id, null, (res, msg) => {
57
+ setResult(res)
58
+ setRefreshing(false)
59
+ }, (error) => {
60
+ LibDialog.warning(esp.lang("event/counter_lm", "load_failed"), error?.message)
61
+ LibNavigation.back()
62
+ setRefreshing(false)
63
+ }, 1)
64
+ }
65
+
66
+ function onRefresh() {
67
+ setRefreshing(true)
68
+ loadData()
69
+ }
70
+
71
+ function addCashier() {
72
+ if (!typeCashier) {
73
+ LibToastProperty.show(esp.lang("event/counter_eo", "select_cashier_first"))
74
+ return
75
+ }
76
+
77
+ let post = {
78
+ event_id: is_manager?.id,
79
+ email: email.trim(),
80
+ is_digital: typeCashier.id
81
+ }
82
+
83
+ LibDialog.confirm(esp.lang("event/counter_lm", "cashier_title"), esp.lang("event/counter_lm", "cashier_msg"), esp.lang("event/counter_lm", "cashier_confirm"), () => {
84
+ new LibCurl('event_seller_edit', post, (res, msg) => {
85
+ LibDialog.info(esp.lang("event/counter_lm", "cashier_ok"), msg)
86
+ loadData()
87
+ dialogUser.current?.hide()
88
+ }, (error) => {
89
+ LibDialog.warning(esp.lang("event/counter_lm", "cashier_failed"), error?.message)
90
+ dialogUser.current?.hide()
91
+ }, 1)
92
+ }, esp.lang("event/counter_lm", "cashier_cancel"), () => { })
93
+
94
+ }
95
+
96
+ function deleteCashier(_email: string) {
97
+ let post = {
98
+ event_id: is_manager?.id,
99
+ email: _email.trim()
100
+ }
101
+
102
+ LibDialog.confirm(esp.lang("event/counter_lm", "delete_title"), esp.lang("event/counter_lm", "delete_msg"), esp.lang("event/counter_lm", "delete_confirm"), () => {
103
+ new LibCurl('event_seller_delete', post, (res, msg) => {
104
+ LibDialog.info(esp.lang("event/counter_lm", "delete_ok"), msg)
105
+ loadData()
106
+ }, (error) => {
107
+ LibDialog.warning(esp.lang("event/counter_lm", "delete_failed"), error?.message)
108
+ }, 1)
109
+ }, esp.lang("event/counter_lm", "delete_cancel"), () => { })
110
+ }
111
+
112
+ if (!result) {
113
+ return (
114
+ <LibLoading />
115
+ )
116
+ }
117
+
118
+ function renderMoneyRequest(item: any, i: number) {
119
+ return (
120
+ <View key={i} style={styleId_ZEwY6z}>
121
+ <EventCounter_history_item item={item} is_ticket={false} onPress={() => LibNavigation.navigate('event/counter_request_detail', { url: item.url, status_user: 2 })} />
122
+ </View>
123
+ )
124
+ }
125
+
126
+ function renderTicketRequest(item: any, i: number) {
127
+ return (
128
+ <View key={i} style={styleId_ZEwY6z}>
129
+ <EventCounter_history_item item={item} is_ticket={true} onPress={() => LibNavigation.navigate('event/counter_request_detail', { url: item.url, status_user: 2 })} />
130
+ </View>
131
+ )
132
+ }
133
+
134
+ function renderSeller(item: any, i: number) {
135
+ return (
136
+ <EventCounter_user_list_item {...item} key={i} showDelete={is_manager?.add_tms == 1 ? true : false} onDelete={() => { deleteCashier(item.email) }} />
137
+ )
138
+ }
139
+
140
+ function renderTypeCashier(item: any, i: number) {
141
+ const styleId_Z23v85x: any = { marginLeft: 5, flexWrap: 'wrap', fontFamily: 'SFProText', color: Number(item.debit) == 0 ? "#717171" : "#000" }
142
+ const styleId_1eMW7i: any = { marginBottom: 5, marginTop: 5, marginRight: 10, flexDirection: 'row', alignContent: 'center', alignItems: 'center', justifyContent: 'center' }
143
+ return (
144
+ <Pressable key={i} onPress={() => {
145
+ setTypeCashier(item)
146
+ }} style={styleId_1eMW7i} hitSlop={{ top: 10, left: 10, right: 10, bottom: 10 }}>
147
+ <LibIcon name={item.id == typeCashier?.id ? "radiobox-marked" : "radiobox-blank"} color={item.id == typeCashier?.id ? "#009AE4" : "#000"} />
148
+ <Text allowFontScaling={false} style={styleId_Z23v85x}>{item.title}</Text>
149
+ </Pressable>
150
+ )
151
+ }
152
+
153
+ return (
154
+ <View style={{ flex: 1, backgroundColor: '#fff' }}>
155
+ <ComponentHeader title={esp.lang("event/counter_lm", "header_title")} subtitle={is_manager?.name} bgColor={"#00AA43"} titleColor="#fff" notif />
156
+ <LibFocus onFocus={loadData} />
157
+ {/* status_user 1 EO, 2 LM, 3 Seller */}
158
+ {/* user_type kenapa 3, karena untuk menambahkan Kasir */}
159
+ <EventCounter_menu colorTheme={"#00AA43"} event_id={is_manager?.id} user_type={3} status_user={2} />
160
+ <ScrollView style={{ marginTop: -20, backgroundColor: "#EEF1F8", borderTopLeftRadius: 15, borderTopRightRadius: 15 }} refreshControl={
161
+ <RefreshControl refreshing={refreshing} onRefresh={onRefresh} />
162
+ }>
163
+ {/* active balance */}
164
+ <EventCounter_info colorTheme={"#00AA43"} amount={result?.money} ticket={result?.ticket} event_id={is_manager?.id} status_user={2} />
165
+
166
+ {/* request */}
167
+ {
168
+ result?.money_request?.length > 0 &&
169
+ <EventCounter_section icon="chevron-right-circle" onPress={() => { LibNavigation.navigate('event/counter_request', { event_id: is_manager?.id, status_user: 2 }) }} title={esp.lang("event/counter_lm", "recent_money")} />
170
+ }
171
+ {
172
+ result?.money_request?.length > 0 && result?.money_request?.map(renderMoneyRequest)
173
+ }
174
+
175
+ {
176
+ result?.ticket_request?.length > 0 &&
177
+ <EventCounter_section icon="chevron-right-circle" onPress={() => { LibNavigation.navigate('event/counter_request', { event_id: is_manager?.id, status_user: 2 }) }} title={esp.lang("event/counter_lm", "recent_ticket")} />
178
+ }
179
+ {
180
+ result?.ticket_request?.length > 0 && result?.ticket_request?.map(renderTicketRequest)
181
+ }
182
+
183
+
184
+ {/* Kasir */}
185
+ <EventCounter_section icon="plus-circle" showIcon={is_manager?.add_tms == 1 ? true : false} onPress={() => { dialogAdd.current?.show() }} title={esp.lang("event/counter_lm", "cashier")} />
186
+
187
+ {
188
+ result?.seller?.map(renderSeller)
189
+ }
190
+
191
+ {
192
+ result?.seller?.length == 0 &&
193
+ <View style={{ margin: 15, marginTop: 0, borderRadius: 15, overflow: 'hidden' }}>
194
+ <ComponentMessage message={esp.lang("event/counter_lm", "cashier_empty")} />
195
+ </View>
196
+ }
197
+
198
+ {
199
+ result?.seller?.length > 9 &&
200
+ <TouchableOpacity onPress={() => { LibNavigation.navigate('event/counter_user_list', { event_id: is_manager?.id, status_user: 2 }) }} style={{ marginTop: 15, justifyContent: 'center', alignSelf: 'center', width: 104, height: 23, borderRadius: 11.5, backgroundColor: "#fff", borderStyle: "solid", borderWidth: 1, borderColor: "#e1e1e1" }}>
201
+ <Text allowFontScaling={false} style={{ alignSelf: 'center', textAlign: 'center', fontFamily: "Arial", fontSize: 11, fontWeight: "bold", fontStyle: "normal", letterSpacing: 0, color: "#9b9b9b" }}>{esp.lang("event/counter_lm", "show_adll")}</Text>
202
+ </TouchableOpacity>
203
+
204
+ }
205
+
206
+ </ScrollView>
207
+
208
+ <ComponentSlidingup ref={dialogAdd}>
209
+ <View style={{ backgroundColor: '#fff', borderTopLeftRadius: 20, borderTopRightRadius: 20 }}>
210
+ <View style={{ height: 4, width: 32, borderRadius: 2, backgroundColor: "#C6C6C6", marginTop: 10, marginBottom: 10, alignSelf: 'center' }} />
211
+ <View style={{ margin: 15 }}>
212
+ <ComponentLabel_input label={esp.lang("event/counter_eo", "label_email")} />
213
+
214
+ <LibInput_rectangle
215
+ autoCapitalize="none"
216
+ onChangeText={(t) => {
217
+ LibUtils.debounce(() => {
218
+ setEmail(t)
219
+ }, 500)
220
+ }}
221
+ style={{ borderColor: '#c4c4c4', height: 35, marginTop: 8, borderRadius: 15, }}
222
+ keyboardType="email-address"
223
+ placeholder={esp.lang("event/counter_lm", "email")}
224
+ onSubmitEditing={() => {
225
+ if (EventCounter_eoProperty.checkEmail(email.trim())) {
226
+ if (!typeCashier) {
227
+ LibToastProperty.show(esp.lang("event/counter_eo", "select_cashier_first"))
228
+ } else {
229
+ dialogAdd.current?.hide()
230
+ dialogUser.current?.show()
231
+ }
232
+ }
233
+ }}
234
+ />
235
+
236
+ <ComponentLabel_input label={esp.lang("event/counter_lm", "label_type")} />
237
+ <View style={{ backgroundColor: '#fff', padding: 10, paddingLeft: 0, borderRadius: 15, marginBottom: 0, flexDirection: 'row', flexWrap: 'wrap' }}>
238
+
239
+ {
240
+ bboConfig?.event?.cashier_type?.map(renderTypeCashier)
241
+ }
242
+ </View>
243
+
244
+ <ComponentButton label={esp.lang("event/counter_lm", "btn_next")} style={{ borderRadius: 15, marginTop: 20 }} backgroundColor={email == "" ? LibStyle.colorGrey : "#00AA43"} onPress={() => {
245
+ if (EventCounter_eoProperty.checkEmail(email.trim())) {
246
+ if (!typeCashier) {
247
+ LibToastProperty.show(esp.lang("event/counter_eo", "select_cashier_first"))
248
+ } else {
249
+ dialogAdd.current?.hide()
250
+ dialogUser.current?.show()
251
+ }
252
+
253
+ }
254
+ }} />
255
+ </View>
256
+ </View>
257
+ </ComponentSlidingup>
258
+
259
+ <ComponentSlidingup ref={dialogUser}>
260
+ <View style={{ backgroundColor: '#fff', borderTopLeftRadius: 20, borderTopRightRadius: 20 }}>
261
+ <View style={{ height: 4, width: 32, borderRadius: 2, backgroundColor: "#C6C6C6", marginTop: 10, marginBottom: 10, alignSelf: 'center' }} />
262
+ <UserPopup email={email.trim()} redirect={() => {
263
+ addCashier()
264
+ }} cancel={() => {
265
+ dialogUser.current?.hide()
266
+ }} />
267
+ </View>
268
+ </ComponentSlidingup>
269
+
270
+ </View >
271
+ )
272
+ }
273
+ const styleId_ZEwY6z: any = { margin: 15, marginTop: 0, borderRadius: 15, backgroundColor: '#fff', overflow: 'hidden' }
@@ -0,0 +1,85 @@
1
+ // withHooks
2
+ import { LibIcon } from 'esoftplay/cache/lib/icon/import';
3
+ import { LibNavigation } from 'esoftplay/cache/lib/navigation/import';
4
+ import esp from 'esoftplay/esp';
5
+
6
+ import React from 'react';
7
+ import { Text, TouchableOpacity, View } from 'react-native';
8
+
9
+
10
+ export interface EventCounter_menuArgs {
11
+
12
+ }
13
+ export interface EventCounter_menuProps {
14
+ colorTheme: string,
15
+ event_id: any,
16
+ user_type?: number,
17
+ status_user?: number
18
+ }
19
+ export default function m(props: EventCounter_menuProps): any {
20
+
21
+ let arrMenu = [
22
+ {
23
+ title: esp.lang("event/counter_menu", "menu_send"),
24
+ icon: "send",
25
+ show: 1,
26
+ navigate: "event/counter_send",
27
+ },
28
+ {
29
+ title: esp.lang("event/counter_menu", "menu_approve"),
30
+ icon: "download-box-outline",
31
+ show: 1,
32
+ navigate: 'event/counter_request',
33
+ },
34
+ {
35
+ title: esp.lang("event/counter_menu", "menu_history"),
36
+ icon: "history",
37
+ show: 1,
38
+ navigate: "event/counter_history"
39
+ },
40
+ {
41
+ title: esp.lang("event/counter_menu", "menu_scan"),
42
+ icon: "qrcode-scan",
43
+ show: 1,
44
+ navigate: 'component/scanner'
45
+ },
46
+ // {
47
+ // title: esp.lang("event/counter_menu", "menu_report"),
48
+ // icon: "book-lock",
49
+ // show: props.status_user == 2 ? 1 : 0,
50
+ // navigate: 'event/counter_report'
51
+ // },
52
+ ]
53
+
54
+ const styleId_brLTP: any = { paddingBottom: 30, padding: 15, backgroundColor: props.colorTheme, flexDirection: 'row', justifyContent: 'space-between' }
55
+
56
+ function renderMenu(item: any, i: number) {
57
+ return (
58
+ <TouchableOpacity onPress={() => {
59
+ LibNavigation.navigate(item.navigate, {
60
+ event_id: props.event_id,
61
+ fromPage: 'event/counter_eo',
62
+ user_type: props?.user_type,
63
+ status_user: props?.status_user
64
+ })
65
+ }} key={i} style={styleId_ZmGELw}>
66
+ <View style={styleId_86CJp}>
67
+ <LibIcon name={item.icon} style={styleId_1ovWUw} color="#fff" />
68
+ </View>
69
+ <Text allowFontScaling={false} style={styleId_Z1QT107}>{item.title}</Text>
70
+ </TouchableOpacity>
71
+ )
72
+ }
73
+
74
+ return (
75
+ <View style={styleId_brLTP}>
76
+ {
77
+ arrMenu.filter((x: any) => x.show == 1).map(renderMenu)
78
+ }
79
+ </View>
80
+ )
81
+ }
82
+ const styleId_ZmGELw: any = { flex: 1, alignContent: 'center', alignItems: 'center', justifyContent: 'center' }
83
+ const styleId_86CJp: any = { backgroundColor: 'rgba( 255, 255, 255, 0.40 )', padding: 15, borderRadius: 10 }
84
+ const styleId_1ovWUw: any = { opacity: 1 }
85
+ const styleId_Z1QT107: any = { height: 30, textAlign: 'center', fontFamily: 'SFProText', margin: 10, marginTop: 5, color: '#fff', marginBottom: 0, fontSize: 10 }
@@ -0,0 +1,105 @@
1
+ // withHooks
2
+ import { ComponentHeader } from 'esoftplay/cache/component/header/import';
3
+ import { ComponentMessage } from 'esoftplay/cache/component/message/import';
4
+ import { LibCurl } from 'esoftplay/cache/lib/curl/import';
5
+ import { LibIcon } from 'esoftplay/cache/lib/icon/import';
6
+ import { LibList } from 'esoftplay/cache/lib/list/import';
7
+ import { LibLoading } from 'esoftplay/cache/lib/loading/import';
8
+ import { LibNavigation } from 'esoftplay/cache/lib/navigation/import';
9
+ import { LibPicture } from 'esoftplay/cache/lib/picture/import';
10
+ import { LibStyle } from 'esoftplay/cache/lib/style/import';
11
+ import { LibUtils } from 'esoftplay/cache/lib/utils/import';
12
+ import esp from 'esoftplay/esp';
13
+ import useSafeState from 'esoftplay/state';
14
+
15
+ import React, { useEffect } from 'react';
16
+ import { KeyboardAvoidingView, Text, TouchableOpacity, View } from 'react-native';
17
+
18
+
19
+ export interface EventCounter_reportArgs {
20
+
21
+ }
22
+ export interface EventCounter_reportProps {
23
+
24
+ }
25
+ export default function m(props: EventCounter_reportProps): any {
26
+
27
+ const { event_id, status_user } = LibNavigation.getArgsAll(props)
28
+ const [result, setResult] = useSafeState<any>()
29
+ const [error, setError] = useSafeState<any>()
30
+
31
+ useEffect(() => {
32
+ loadData()
33
+ }, [])
34
+
35
+ function loadData() {
36
+ new LibCurl("event_manager_seller_ticket&event_id=" + event_id, null, (res, msg) => {
37
+ setResult(res)
38
+ }, (error) => {
39
+ setError(error)
40
+ }, 1)
41
+ }
42
+
43
+ function renderItem(item: any, i: number) {
44
+ return (
45
+ <TouchableOpacity key={i} onPress={() => { LibNavigation.navigate('event/counter_report_detail', { url: item.url }) }} style={styleId_2eynEH}>
46
+ <View style={styleId_1AVyQt}>
47
+ <View style={styleId_1C9dY0}>
48
+ <LibPicture source={{ uri: item.image }} style={styleId_ZXW56z} resizeMode="cover" />
49
+ </View>
50
+ <View style={styleId_Nnnug}>
51
+ <Text allowFontScaling={false} style={styleId_Z2nlhWI}>{item.name}</Text>
52
+ <Text allowFontScaling={false} style={styleId_Z15uvuH}>{item.email}</Text>
53
+ </View>
54
+
55
+ </View>
56
+ <LibIcon name={"chevron-right-circle-outline"} />
57
+ </TouchableOpacity>
58
+ )
59
+ }
60
+
61
+ return (
62
+ <View style={{ flex: 1, backgroundColor: "#EEF1F8" }}>
63
+ <ComponentHeader title={esp.lang("event/counter_report", "header_title")} subtitle={status_user == 1 ? esp.lang("event/counter_report", "sub_eo") : status_user == 2 ? esp.lang("event/counter_report", "sub_lm") : esp.lang("event/counter_report", "sub_cashier")} />
64
+ <KeyboardAvoidingView style={{ flex: 1 }}>
65
+ <LibList
66
+ data={result}
67
+ onRefresh={loadData}
68
+ ListHeaderComponent={() => {
69
+ return (
70
+ <View style={{ flexDirection: 'row', justifyContent: 'space-between', padding: 15, paddingBottom: 0 }}>
71
+ <View />
72
+ <Text allowFontScaling={false} style={{ fontFamily: "Arial", fontSize: 12, fontStyle: "normal", letterSpacing: 0, color: "#000" }}>{LibUtils.getCurrentDateTime("DD MMMM YYYY")}</Text>
73
+ </View>
74
+ )
75
+ }}
76
+ ListEmptyComponent={() => {
77
+ if (error) {
78
+ return (
79
+ <View style={{ margin: 15, borderRadius: 15, marginBottom: 0, backgroundColor: '#fff', overflow: 'hidden' }}>
80
+ <ComponentMessage message={error?.message} />
81
+ </View>
82
+ )
83
+ } else {
84
+ return (
85
+ <View style={{ flex: 1, height: LibStyle.height - (LibStyle.STATUSBAR_HEIGHT + 60), alignContent: 'center', alignItems: 'center', alignSelf: 'center', justifyContent: 'center' }}>
86
+ <LibLoading />
87
+ </View>
88
+ )
89
+ }
90
+ }}
91
+ renderItem={renderItem}
92
+ />
93
+
94
+ </KeyboardAvoidingView>
95
+ </View>
96
+ )
97
+ }
98
+
99
+ const styleId_Z2nlhWI: any = { flexWrap: 'wrap', fontFamily: 'SFProText', fontWeight: 'bold' }
100
+ const styleId_Z15uvuH: any = { flexWrap: 'wrap', fontWeight: 'normal', fontSize: 10 }
101
+ const styleId_ZXW56z: any = { height: 50, width: 50, borderRadius: 10 }
102
+ const styleId_2eynEH: any = { margin: 15, marginBottom: 2, padding: 10, justifyContent: 'space-between', alignContent: 'center', alignItems: 'center', flexDirection: 'row', borderRadius: 15, backgroundColor: '#fff', ...LibStyle.elevation(2) }
103
+ const styleId_1AVyQt: any = { flexDirection: 'row', alignContent: 'center', alignItems: 'center' }
104
+ const styleId_1C9dY0: any = { height: 50, width: 50, borderRadius: 10, backgroundColor: '#fff', ...LibStyle.elevation(10) }
105
+ const styleId_Nnnug: any = { marginLeft: 8 }
@@ -0,0 +1,93 @@
1
+ // withHooks
2
+ import { ComponentHeader } from 'esoftplay/cache/component/header/import';
3
+ import { EventCounter_report_detailProperty } from 'esoftplay/cache/event/counter_report_detail/import';
4
+ import { LibNavigation } from 'esoftplay/cache/lib/navigation/import';
5
+ import { LibStyle } from 'esoftplay/cache/lib/style/import';
6
+ import esp from 'esoftplay/esp';
7
+
8
+ import React from 'react';
9
+ import { ScrollView, Text, TouchableOpacity, View } from 'react-native';
10
+
11
+
12
+ export interface EventCounter_report_breakdownArgs {
13
+
14
+ }
15
+ export interface EventCounter_report_breakdownProps {
16
+
17
+ }
18
+
19
+ export interface ReportDetailItem2 extends EventCounter_report_breakdownProps {
20
+ title: string
21
+ value: string
22
+ valueColor?: string
23
+ colorBg?: string
24
+ onPress: () => void,
25
+ }
26
+
27
+ function Item(props: ReportDetailItem2) {
28
+ return (
29
+ <View style={{ backgroundColor: props.colorBg ? props.colorBg : "transparant", flexDirection: 'row', justifyContent: 'space-between', alignContent: 'center', alignItems: 'center', marginBottom: 7 }}>
30
+ <Text allowFontScaling={false} style={{ fontFamily: 'SFProText', flex: 2, fontSize: 12 }}>{props.title}</Text>
31
+ <View>
32
+ <Text allowFontScaling={false} style={{ textAlign: 'right', marginLeft: 10, fontFamily: 'SFProText', flex: 1, fontWeight: 'bold', fontSize: 14, color: props.valueColor ? props.valueColor : "#000" }}>{props.value}</Text>
33
+ <TouchableOpacity style={{ marginTop: 5 }} onPress={props.onPress}>
34
+ <Text allowFontScaling={false} style={{ textDecorationLine: 'underline', textAlign: 'right', marginLeft: 10, fontFamily: 'SFProText', flex: 1, fontWeight: 'normal', fontSize: 12, color: LibStyle.colorBlue }}>{esp.lang("event/counter_report_breakdown", "show_detail")}</Text>
35
+ </TouchableOpacity>
36
+ </View>
37
+ </View>
38
+ )
39
+ }
40
+
41
+ export default function m(props: EventCounter_report_breakdownProps): any {
42
+ const { data, type } = LibNavigation.getArgsAll(props)
43
+
44
+ return (
45
+ <View style={{ flex: 1, backgroundColor: '#fff' }}>
46
+ <ComponentHeader title={esp.lang("event/counter_report_breakdown", "header_title")} />
47
+
48
+ <View style={{ margin: 10, borderRadius: 5, backgroundColor: LibStyle.colorBgGrey }}>
49
+ <ScrollView style={{ padding: 10 }}>
50
+ {
51
+ data.hasOwnProperty("modal") &&
52
+ <Item
53
+ title={esp.lang("event/counter_report_breakdown", "modal")}
54
+ value={EventCounter_report_detailProperty.showValueExtention(type, data?.modal?.total)}
55
+ onPress={() => { LibNavigation.navigate('event/counter_report_detail_list', { url: data?.modal?.url }) }}
56
+ />
57
+ }
58
+ {
59
+ data?.transaction?.total > 0 &&
60
+ <Item
61
+ title={esp.lang("event/counter_report_breakdown", "total_transaction")}
62
+ value={EventCounter_report_detailProperty.showValueExtention(type, data?.transaction?.total)}
63
+ onPress={() => { LibNavigation.navigate('event/counter_report_detail_list', { url: data?.transaction?.url }) }}
64
+ />
65
+ }
66
+ {
67
+ data?.transaction_edc?.total > 0 &&
68
+ <Item
69
+ title={esp.lang("event/counter_report_breakdown", "total_transaction_with_edc")}
70
+ value={EventCounter_report_detailProperty.showValueExtention(type, data?.transaction_edc?.total)}
71
+ onPress={() => { LibNavigation.navigate('event/counter_report_detail_list', { url: data?.transaction_edc?.url }) }}
72
+ />
73
+ }
74
+ {
75
+ data?.transfer?.total > 0 &&
76
+ <Item
77
+ title={esp.lang("event/counter_report_breakdown", "transfer")}
78
+ value={EventCounter_report_detailProperty.showValueExtention(type, data?.transfer?.total)}
79
+ onPress={() => { LibNavigation.navigate('event/counter_report_detail_list', { url: data?.transfer?.url }) }}
80
+ />
81
+ }
82
+
83
+ <View style={{ width: LibStyle.width - 20, height: 1, backgroundColor: LibStyle.colorTextCaption, marginBottom: 10 }} />
84
+ <View style={{ flexDirection: 'row', justifyContent: 'space-between', alignContent: 'center', alignItems: 'center', marginBottom: 7 }}>
85
+ <Text allowFontScaling={false} style={{ fontFamily: 'SFProText', flex: 2, fontSize: 12 }}>{esp.lang("event/counter_report_breakdown", "total")}</Text>
86
+ <Text allowFontScaling={false} style={{ textAlign: 'right', marginLeft: 10, fontFamily: 'SFProText', flex: 1, fontWeight: 'bold', fontSize: 14, color: LibStyle.colorGreen }}>{EventCounter_report_detailProperty.showValueExtention(type, data?.total)}</Text>
87
+ </View>
88
+ </ScrollView>
89
+ </View>
90
+
91
+ </View>
92
+ )
93
+ }