esoftplay-event 0.0.0-a → 0.0.0-c
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.
- package/event/additional.tsx +4 -4
- package/event/additional_input.tsx +15 -15
- package/event/alert.tsx +32 -0
- package/event/artist.tsx +166 -0
- package/event/artist_detail.tsx +521 -0
- package/event/artist_detail_multi.tsx +548 -0
- package/event/badge.tsx +22 -0
- package/event/button.tsx +40 -0
- package/event/config.ts +4 -0
- package/event/countdown.tsx +5 -5
- package/event/countdown_base.tsx +83 -0
- package/event/counter_cashier.tsx +13 -13
- package/event/counter_cashier_report.tsx +6 -6
- package/event/counter_cashier_sell.tsx +7 -7
- package/event/counter_eo.tsx +21 -21
- package/event/counter_history.tsx +4 -4
- package/event/counter_lm.tsx +18 -18
- package/event/counter_report.tsx +4 -4
- package/event/counter_report_breakdown.tsx +2 -2
- package/event/counter_report_detail.tsx +15 -15
- package/event/counter_report_detail_list.tsx +4 -4
- package/event/counter_request.tsx +4 -4
- package/event/counter_request_detail.tsx +6 -6
- package/event/counter_send.tsx +9 -9
- package/event/counter_user_list.tsx +15 -15
- package/event/coupon.tsx +4 -4
- package/event/coupon_claim.tsx +4 -4
- package/event/coupon_claim_detail.tsx +8 -7
- package/event/coupon_claim_history.tsx +9 -9
- package/event/coupon_claim_reimburse.tsx +7 -8
- package/event/coupon_claim_reimburse_history.tsx +4 -4
- package/event/coupon_claim_reimburse_history_detail.tsx +4 -4
- package/event/coupon_claim_staff.tsx +10 -10
- package/event/coupon_detail.tsx +3 -3
- package/event/coupon_event_list.tsx +4 -4
- package/event/coupon_generate.tsx +4 -4
- package/event/coupon_generate_event.tsx +4 -4
- package/event/coupon_generate_list.tsx +2 -2
- package/event/date_picker.tsx +5 -5
- package/event/detail.tsx +12 -15
- package/event/entrance.tsx +17 -17
- package/event/entrance_again.tsx +22 -23
- package/event/entrance_failed.tsx +15 -15
- package/event/entrance_idcard.tsx +23 -23
- package/event/entrance_list.tsx +24 -24
- package/event/entrance_list_item.tsx +6 -6
- package/event/entrance_log.tsx +24 -24
- package/event/entrance_success.tsx +8 -8
- package/event/entrance_warning.tsx +14 -14
- package/event/exchange_reward.tsx +2 -2
- package/event/exchange_reward_result.tsx +7 -8
- package/event/exchange_ticket.tsx +11 -12
- package/event/exchange_ticket_list.tsx +10 -12
- package/event/exchange_ticket_result.tsx +11 -12
- package/event/exit.tsx +9 -9
- package/event/exit_failed.tsx +12 -12
- package/event/exit_list.tsx +15 -15
- package/event/exit_log.tsx +22 -22
- package/event/exit_success.tsx +8 -8
- package/event/exit_temporary.tsx +21 -21
- package/event/expander.tsx +36 -0
- package/event/fab.tsx +24 -0
- package/event/firebase_socket.ts +365 -0
- package/event/hall_in.tsx +13 -13
- package/event/hall_in_failed.tsx +22 -22
- package/event/hall_in_list.tsx +17 -17
- package/event/hall_in_log.tsx +24 -24
- package/event/hall_in_success.tsx +8 -8
- package/event/hall_out.tsx +13 -13
- package/event/hall_out_failed.tsx +11 -11
- package/event/hall_out_list.tsx +17 -17
- package/event/hall_out_log.tsx +24 -24
- package/event/hall_out_success.tsx +8 -8
- package/event/header.tsx +119 -0
- package/event/header_home.tsx +108 -0
- package/event/index.tsx +270 -0
- package/event/input_rectangle.tsx +208 -0
- package/event/item.tsx +40 -0
- package/event/label_input.tsx +23 -0
- package/event/list.tsx +20 -21
- package/event/list_filter.tsx +12 -13
- package/event/list_item.tsx +76 -0
- package/event/list_item2.tsx +78 -0
- package/event/loading_page.tsx +248 -0
- package/event/log.tsx +54 -54
- package/event/message.tsx +32 -0
- package/event/notice.tsx +41 -0
- package/event/order.tsx +323 -0
- package/event/order_detail.tsx +813 -0
- package/event/order_detail_payment.tsx +153 -0
- package/event/order_detail_upgrade.tsx +164 -0
- package/event/order_detail_upgrade_button.tsx +60 -0
- package/event/order_detail_upgrade_payment.tsx +221 -0
- package/event/order_detail_visitor.tsx +196 -0
- package/event/order_detail_waiting.tsx +520 -0
- package/event/order_history.tsx +101 -0
- package/event/order_item.tsx +118 -0
- package/event/order_lottery.tsx +172 -0
- package/event/order_reschedule.tsx +439 -0
- package/event/order_reschedule_list.tsx +85 -0
- package/event/order_share_to.tsx +219 -0
- package/event/order_share_to_detail.tsx +181 -0
- package/event/order_status.tsx +66 -0
- package/event/order_waiting.tsx +143 -0
- package/event/pending_trx.tsx +50 -0
- package/event/qc_idcard.tsx +12 -12
- package/event/qc_idcard_failed.tsx +4 -4
- package/event/qc_idcard_success.tsx +4 -4
- package/event/qr_bg.tsx +22 -0
- package/event/queue_out.tsx +3 -3
- package/event/queue_pricing.tsx +2 -3
- package/event/rating.tsx +49 -0
- package/event/rating_mini.tsx +35 -0
- package/event/refresh_button.tsx +40 -0
- package/event/review.tsx +3 -3
- package/event/review_add.tsx +8 -8
- package/event/review_detail.tsx +4 -4
- package/event/review_item.tsx +4 -4
- package/event/scan_item.tsx +2 -2
- package/event/schedule.tsx +8 -9
- package/event/seat.tsx +16 -18
- package/event/seat_autopick.tsx +4 -4
- package/event/seat_map.tsx +4 -4
- package/event/seat_map_test.tsx +2 -2
- package/event/section.tsx +35 -0
- package/event/section_menu.tsx +40 -0
- package/event/sheet.tsx +73 -0
- package/event/slider.tsx +46 -0
- package/event/step.tsx +29 -0
- package/event/ticket_list.tsx +15 -16
- package/event/ticket_list2.tsx +16 -17
- package/event/tms.tsx +4 -4
- package/event/tms_add.tsx +7 -8
- package/event/tms_add_result.tsx +4 -4
- package/event/tms_check_code.tsx +160 -0
- package/event/tms_check_ticket.tsx +72 -0
- package/event/tms_check_ticket_result.tsx +384 -0
- package/event/tms_dashboard.tsx +7 -7
- package/event/tms_event_list.tsx +46 -43
- package/event/tms_gate.tsx +96 -0
- package/event/tms_home.tsx +639 -0
- package/event/tms_idcard.tsx +203 -0
- package/event/tms_in.tsx +215 -0
- package/event/tms_in_again.tsx +199 -0
- package/event/tms_in_failed.tsx +190 -0
- package/event/tms_in_hall.tsx +148 -0
- package/event/tms_in_hall_failed.tsx +270 -0
- package/event/tms_in_hall_list.tsx +222 -0
- package/event/tms_in_hall_log.tsx +134 -0
- package/event/tms_in_hall_success.tsx +132 -0
- package/event/tms_in_list.tsx +264 -0
- package/event/tms_in_log.tsx +130 -0
- package/event/tms_in_success.tsx +155 -0
- package/event/tms_in_warning.tsx +91 -0
- package/event/tms_list_item.tsx +88 -0
- package/event/tms_log.tsx +435 -0
- package/event/tms_out.tsx +91 -0
- package/event/tms_out_failed.tsx +135 -0
- package/event/tms_out_hall.tsx +143 -0
- package/event/tms_out_hall_failed.tsx +133 -0
- package/event/tms_out_hall_list.tsx +215 -0
- package/event/tms_out_hall_log.tsx +133 -0
- package/event/tms_out_hall_success.tsx +130 -0
- package/event/tms_out_list.tsx +118 -0
- package/event/tms_out_log.tsx +131 -0
- package/event/tms_out_success.tsx +143 -0
- package/event/tms_out_temporary.tsx +226 -0
- package/event/toggle.tsx +30 -0
- package/event/transaction.ts +34 -0
- package/event/turnstile_event_gate.tsx +2 -2
- package/event/turnstile_event_list.tsx +4 -4
- package/event/turnstile_event_ticket.tsx +4 -4
- package/event/turnstile_settings.tsx +11 -11
- package/event/turnstile_settings_otp.tsx +4 -4
- package/event/turnstile_settings_status.tsx +2 -2
- package/event/voucher.tsx +9 -10
- package/event/voucher_multi.tsx +4 -5
- package/id.json +644 -0
- package/package.json +1 -1
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
// withHooks
|
|
2
|
+
import { applyStyle } from 'esoftplay';
|
|
3
|
+
import { EventTms_homeProperty } from 'esoftplay/cache/event/tms_home/import';
|
|
4
|
+
import { LibCurl } from 'esoftplay/cache/lib/curl/import';
|
|
5
|
+
import { LibDialog } from 'esoftplay/cache/lib/dialog/import';
|
|
6
|
+
import { LibNavigation } from 'esoftplay/cache/lib/navigation/import';
|
|
7
|
+
import { LibPicture } from 'esoftplay/cache/lib/picture/import';
|
|
8
|
+
import { LibStatusbar } from 'esoftplay/cache/lib/statusbar/import';
|
|
9
|
+
import { LibStyle } from 'esoftplay/cache/lib/style/import';
|
|
10
|
+
import { LibUtils } from 'esoftplay/cache/lib/utils/import';
|
|
11
|
+
import { UserClass } from 'esoftplay/cache/user/class/import';
|
|
12
|
+
import esp from 'esoftplay/esp';
|
|
13
|
+
import useSafeState from 'esoftplay/state';
|
|
14
|
+
|
|
15
|
+
import React, { useEffect } from 'react';
|
|
16
|
+
import { Pressable, ScrollView, Text, View } from 'react-native';
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
export interface EventTms_in_failedArgs {
|
|
20
|
+
|
|
21
|
+
}
|
|
22
|
+
export interface EventTms_in_failedProps {
|
|
23
|
+
|
|
24
|
+
}
|
|
25
|
+
export default function m(props: EventTms_in_failedProps): any {
|
|
26
|
+
const { scan_type, ticketItem, text, url_ticket_update, url_ticket_detail, price_type, gate_type, qr_code, event_id, selectGate, typeScanner, event_title, configPriority }: any = LibNavigation.getArgsAll(props)
|
|
27
|
+
|
|
28
|
+
const [result, setResult] = useSafeState<any>()
|
|
29
|
+
const [error, setError] = useSafeState<any>()
|
|
30
|
+
|
|
31
|
+
let url = url_ticket_detail + LibUtils.objectToUrlParam({
|
|
32
|
+
is_turnstile: 0,
|
|
33
|
+
price_id: ticketItem?.price_id == "staff" ? 0 : ticketItem?.price_id,
|
|
34
|
+
qr: encodeURIComponent(qr_code),
|
|
35
|
+
t: new Date().getTime()
|
|
36
|
+
})
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
useEffect(() => {
|
|
40
|
+
EventTms_homeProperty.addCounterEntranceScanFailed(1, ticketItem?.price_id)
|
|
41
|
+
if (ticketItem && url_ticket_detail) {
|
|
42
|
+
getDetailDataTicket()
|
|
43
|
+
}
|
|
44
|
+
}, [])
|
|
45
|
+
|
|
46
|
+
function getDetailDataTicket() {
|
|
47
|
+
new LibCurl(url, null, (res, msg) => {
|
|
48
|
+
setResult(res)
|
|
49
|
+
}, (err) => {
|
|
50
|
+
setError(err)
|
|
51
|
+
}, 1)
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
function getBack() {
|
|
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
|
+
function sendTelegram() {
|
|
71
|
+
let data = {
|
|
72
|
+
'#bbotms': ":",
|
|
73
|
+
reporter: {
|
|
74
|
+
email: UserClass.state().get().email,
|
|
75
|
+
name: UserClass.state().get().name
|
|
76
|
+
},
|
|
77
|
+
"event/gate/type": event_id + "/" + selectGate?.id + "/" + (gate_type == 1 ? "in" : "out"),
|
|
78
|
+
qr: qr_code,
|
|
79
|
+
type_ticket: ticketItem?.price_id,
|
|
80
|
+
qty: ticketItem?.qty,
|
|
81
|
+
qty_used: ticketItem?.qty_used,
|
|
82
|
+
qty_left: ticketItem?.qty_left,
|
|
83
|
+
data: {
|
|
84
|
+
res: result,
|
|
85
|
+
url: url
|
|
86
|
+
},
|
|
87
|
+
error_msg: text,
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
let post = {
|
|
91
|
+
text: String(JSON.stringify(data || {}, undefined, 2)).replace(/[\[\]\{\}\"]+/g, ''),
|
|
92
|
+
chat_id: '-1001737180019',
|
|
93
|
+
disable_web_page_preview: true
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
let _url = "https://api.telegram.org/bot923808407:AAEFBlllQNKCEn8E66fwEzCj5vs9qGwVGT4/sendMessage"
|
|
97
|
+
new LibCurl().custom(_url, post, (res, msg) => { })
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
return (
|
|
101
|
+
<View style={{ flex: 1 }}>
|
|
102
|
+
<LibStatusbar style='light' />
|
|
103
|
+
<View style={{ flex: 1 }}>
|
|
104
|
+
<LibPicture source={esp.assets('failed.png')} style={{ flex: 1, height: LibStyle.height, width: LibStyle.width }} /* resizeMode={"stretch"} */ />
|
|
105
|
+
</View>
|
|
106
|
+
|
|
107
|
+
<View style={{ flex: 1, position: 'absolute', top: 50, left: 0, right: 0, bottom: 0, alignItems: 'center', alignContent: 'center' }} >
|
|
108
|
+
<ScrollView>
|
|
109
|
+
<View style={{ marginBottom: 20, alignSelf: 'center', borderRadius: LibStyle.width / 3, padding: 10, backgroundColor: '#fff' }}>
|
|
110
|
+
<LibPicture
|
|
111
|
+
source={esp.assets('failed_icon.png')}
|
|
112
|
+
style={{ width: LibStyle.width / 3, height: LibStyle.width / 3 }}
|
|
113
|
+
/>
|
|
114
|
+
</View>
|
|
115
|
+
<Text allowFontScaling={false} style={{ fontWeight: 'bold', fontSize: 25, color: '#fff', marginHorizontal: 20, textAlign: 'center', letterSpacing: 1 }}>{text ? text : esp.lang("event/tms_in_failed", "ticket_out")}</Text>
|
|
116
|
+
{
|
|
117
|
+
result &&
|
|
118
|
+
<View style={[applyStyle({ marginTop: 10, padding: 10 }), { width: LibStyle.width }]}>
|
|
119
|
+
{
|
|
120
|
+
result?.length > 0 &&
|
|
121
|
+
<>
|
|
122
|
+
<Text allowFontScaling={false} style={{ fontSize: 20, color: '#fff', margin: 10, textAlign: 'center', letterSpacing: 1 }}>{esp.lang("event/tms_in_failed", "history")}</Text>
|
|
123
|
+
<Text allowFontScaling={false} style={{ marginTop: 0, fontSize: 16, color: '#fff', margin: 10, textAlign: 'center', letterSpacing: 1, fontWeight: 'bold' }}>{result?.[0].price_name}</Text>
|
|
124
|
+
<View style={{ flexDirection: 'row', justifyContent: 'space-between', backgroundColor: '#37c2d0', borderTopLeftRadius: 10, borderTopRightRadius: 10 }}>
|
|
125
|
+
<View style={{ flex: 1.5, justifyContent: 'center', borderRightWidth: 1, borderColor: LibStyle.colorBgGrey, paddingVertical: 5, padding: 5 }}>
|
|
126
|
+
<Text allowFontScaling={false} style={{ fontWeight: 'bold', textAlign: 'center', fontSize: 14 }}>{esp.lang("event/tms_in_failed", "code")}</Text>
|
|
127
|
+
</View>
|
|
128
|
+
<View style={{ flex: 1.2, justifyContent: 'center', paddingVertical: 5 }}>
|
|
129
|
+
<Text allowFontScaling={false} style={{ fontWeight: 'bold', textAlign: 'center', fontSize: 14 }}>{esp.lang("event/tms_in_failed", "used_time")}</Text>
|
|
130
|
+
</View>
|
|
131
|
+
<View style={{ flex: 2, justifyContent: 'center', borderLeftWidth: 1, borderColor: LibStyle.colorBgGrey, paddingVertical: 5 }}>
|
|
132
|
+
<Text allowFontScaling={false} style={{ fontWeight: 'bold', textAlign: 'center', fontSize: 14 }}>{esp.lang("event/tms_in_failed", "gate")}</Text>
|
|
133
|
+
</View>
|
|
134
|
+
</View>
|
|
135
|
+
</>
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
{
|
|
139
|
+
result && result?.map?.((item: any, i: number) => {
|
|
140
|
+
return (
|
|
141
|
+
<View key={i} style={{ backgroundColor: i % 2 ? '#fff' : LibStyle.colorGrey, flexDirection: 'row', justifyContent: 'space-between', borderBottomWidth: 1, borderBottomColor: LibStyle.colorBgGrey }}>
|
|
142
|
+
<View style={{ flex: 1.5, justifyContent: 'center', borderRightWidth: 1, borderColor: LibStyle.colorBgGrey, paddingVertical: 5, padding: 5 }}>
|
|
143
|
+
<Text allowFontScaling={false} numberOfLines={2} ellipsizeMode="tail" style={{ letterSpacing: 1, textAlign: 'center', fontSize: 12 }}>{item?.code}</Text>
|
|
144
|
+
</View>
|
|
145
|
+
<View style={{ flex: 1.2, justifyContent: 'center', paddingVertical: 5 }}>
|
|
146
|
+
{
|
|
147
|
+
item.scanned != "0000-00-00 00:00:00" &&
|
|
148
|
+
<Text allowFontScaling={false} style={{ textAlign: 'center', fontSize: 12 }}>{LibUtils.moment(item.scanned).localeFormat("DD MMM H:mm:ss ")}</Text>
|
|
149
|
+
}
|
|
150
|
+
</View>
|
|
151
|
+
<View style={{ flex: 2, justifyContent: 'center', borderLeftWidth: 1, borderColor: LibStyle.colorBgGrey, paddingVertical: 5 }}>
|
|
152
|
+
{
|
|
153
|
+
item.gate_name != null &&
|
|
154
|
+
<Text allowFontScaling={false} style={{ letterSpacing: 1, textAlign: 'center', fontSize: 12, }}>{item.tms_email + "\n" + item.gate_name + " - " + item.turnstile_id}</Text>
|
|
155
|
+
}
|
|
156
|
+
</View>
|
|
157
|
+
</View>
|
|
158
|
+
)
|
|
159
|
+
})
|
|
160
|
+
}
|
|
161
|
+
</View>
|
|
162
|
+
}
|
|
163
|
+
{
|
|
164
|
+
error &&
|
|
165
|
+
<View style={{ width: LibStyle.width - 40, justifyContent: 'center', alignItems: 'center', padding: 15, borderRadius: 10, marginTop: 100 }}>
|
|
166
|
+
<Text allowFontScaling={false} style={{ flexWrap: 'wrap', fontSize: 14, lineHeight: 20, fontWeight: "bold", marginBottom: 5, color: "#fff", textAlign: "center" }}>{error?.message}</Text>
|
|
167
|
+
</View>
|
|
168
|
+
}
|
|
169
|
+
</ScrollView>
|
|
170
|
+
<View style={{ flexDirection: 'row', width: LibStyle.width - 40, marginVertical: 10, justifyContent: 'space-between' }}>
|
|
171
|
+
<Pressable onPress={() => {
|
|
172
|
+
|
|
173
|
+
LibDialog.warningConfirm(esp.lang("event/tms_in_failed", "warn_title"), esp.lang("event/tms_in_failed", "warn_msg"), esp.lang("event/tms_in_failed", "warn_ok"), () => {
|
|
174
|
+
sendTelegram()
|
|
175
|
+
}, esp.lang("event/tms_in_failed", "warn_no"), () => { })
|
|
176
|
+
|
|
177
|
+
}} style={{ width: (LibStyle.width - 45) * 0.5, height: 43, borderRadius: 5, backgroundColor: LibStyle.colorRed, borderWidth: 3, borderColor: "#fff", justifyContent: 'center', alignContent: 'center', alignItems: 'center', ...LibStyle.elevation(10) }}>
|
|
178
|
+
<Text allowFontScaling={false} style={{ textAlign: 'center', fontSize: 14, fontWeight: 'bold', color: "#fff" }}>{esp.lang("event/tms_in_failed", "report")}</Text>
|
|
179
|
+
</Pressable>
|
|
180
|
+
<Pressable onPress={getBack} style={{ width: (LibStyle.width - 45) * 0.5, height: 43, borderRadius: 5, backgroundColor: LibStyle.colorGreen, justifyContent: 'center', alignContent: 'center', alignItems: 'center', ...LibStyle.elevation(10) }}>
|
|
181
|
+
<Text allowFontScaling={false} style={{ fontSize: 14, fontWeight: 'bold', color: "#fff" }}>{esp.lang("event/tms_in_failed", "back")}</Text>
|
|
182
|
+
</Pressable>
|
|
183
|
+
|
|
184
|
+
</View>
|
|
185
|
+
</View>
|
|
186
|
+
|
|
187
|
+
</View>
|
|
188
|
+
)
|
|
189
|
+
|
|
190
|
+
}
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
// withHooks
|
|
2
|
+
import { useEffect } from 'react';
|
|
3
|
+
|
|
4
|
+
import { EventTms_homeProperty } from 'esoftplay/cache/event/tms_home/import';
|
|
5
|
+
import { LibCurl } from 'esoftplay/cache/lib/curl/import';
|
|
6
|
+
import { LibLoading } from 'esoftplay/cache/lib/loading/import';
|
|
7
|
+
import { LibNavigation } from 'esoftplay/cache/lib/navigation/import';
|
|
8
|
+
import { LibObject } from 'esoftplay/cache/lib/object/import';
|
|
9
|
+
import { UserClass } from 'esoftplay/cache/user/class/import';
|
|
10
|
+
import esp from 'esoftplay/esp';
|
|
11
|
+
import React from 'react';
|
|
12
|
+
import { View } from 'react-native';
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
export interface EventTms_in_hallArgs {
|
|
16
|
+
|
|
17
|
+
}
|
|
18
|
+
export interface EventTms_in_hallProps {
|
|
19
|
+
|
|
20
|
+
}
|
|
21
|
+
export default function m(props: EventTms_in_hallProps): any {
|
|
22
|
+
const { scan_type, url_ticket_update, url_ticket_detail, price_type, gate_type, qr_code, event_id, selectGate, typeScanner, event_title, configPriority }: any = LibNavigation.getArgsAll<any>(props)
|
|
23
|
+
|
|
24
|
+
let args = {
|
|
25
|
+
selectGate: selectGate,
|
|
26
|
+
fromPage: 'event/tms_home',
|
|
27
|
+
event_id: event_id,
|
|
28
|
+
event_title: event_title,
|
|
29
|
+
typeScanner: typeScanner,
|
|
30
|
+
gate_type: gate_type,
|
|
31
|
+
price_type: price_type,
|
|
32
|
+
url_ticket_detail: url_ticket_detail,
|
|
33
|
+
url_ticket_update: url_ticket_update,
|
|
34
|
+
configPriority: configPriority,
|
|
35
|
+
scan_type: scan_type
|
|
36
|
+
}
|
|
37
|
+
useEffect(() => {
|
|
38
|
+
loadData()
|
|
39
|
+
}, [])
|
|
40
|
+
|
|
41
|
+
function loadData() {
|
|
42
|
+
EventTms_homeProperty.addCounterHallInScan(1, "0")
|
|
43
|
+
|
|
44
|
+
var post = {
|
|
45
|
+
event_id: event_id,
|
|
46
|
+
user_qr: qr_code,
|
|
47
|
+
hall_id: selectGate?.id
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
let ticketsData: any[] = [];
|
|
51
|
+
|
|
52
|
+
new LibCurl('event_tms_hall', post, (res) => {
|
|
53
|
+
res?.list?.forEach((item: any, i: number) => {
|
|
54
|
+
let foundIndex = ticketsData.findIndex((x: any) => x.price_id == item.price_id);
|
|
55
|
+
|
|
56
|
+
let newItem = {
|
|
57
|
+
...item,
|
|
58
|
+
checked: 0
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
if (foundIndex != -1) {
|
|
62
|
+
ticketsData[foundIndex].list.push(newItem);
|
|
63
|
+
ticketsData[foundIndex].qty += 1
|
|
64
|
+
} else {
|
|
65
|
+
ticketsData.push({
|
|
66
|
+
price_id: item.price_id,
|
|
67
|
+
price_name: item.price_name,
|
|
68
|
+
qty: 1,
|
|
69
|
+
list: [newItem]
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
esp.log({ res });
|
|
75
|
+
|
|
76
|
+
if (res?.hasOwnProperty("staff")) {
|
|
77
|
+
res?.staff?.map((it: any) => {
|
|
78
|
+
let x = {
|
|
79
|
+
...it,
|
|
80
|
+
price_id: "staff",
|
|
81
|
+
user_name: it.name,
|
|
82
|
+
user_image: it.image,
|
|
83
|
+
exhibitor_name: it.department_name + "-" + it.exhibitor_name,
|
|
84
|
+
checked: 0
|
|
85
|
+
}
|
|
86
|
+
ticketsData.push(x)
|
|
87
|
+
})
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
if (ticketsData.length == 1) { // cek jika tiket cuma 1
|
|
91
|
+
let tiket = ticketsData[0]
|
|
92
|
+
if (tiket.price_id == "staff") { // jika itu adalah id card
|
|
93
|
+
if (tiket.status_scanned == 2) {
|
|
94
|
+
/* 0 tidak diperbolehkan, 1 sudah didalam, 2 available */
|
|
95
|
+
LibNavigation.replace('event/tms_idcard', {
|
|
96
|
+
selectedTicket: { ...tiket, key: qr_code },
|
|
97
|
+
hall: "in",
|
|
98
|
+
...args
|
|
99
|
+
})
|
|
100
|
+
} else {
|
|
101
|
+
let err = {
|
|
102
|
+
message: tiket.status_label,
|
|
103
|
+
result: tiket.scanned_detail
|
|
104
|
+
}
|
|
105
|
+
LibNavigation.replace('event/tms_in_hall_failed', { msgError: err, ...args, postGetData: post })
|
|
106
|
+
}
|
|
107
|
+
} else { // jika itu adalah tiket
|
|
108
|
+
if (tiket.list?.length > 1) { // jika tiket itu mempunyai banyak qty
|
|
109
|
+
LibNavigation.replace('event/tms_in_hall_list', { data: ticketsData, ...args })
|
|
110
|
+
} else { // jika tiket itu cuma 1 qty
|
|
111
|
+
let defaultUse = LibObject.set(tiket?.list, tiket?.list?.[0]?.status_scanned != 2 ? 1 : 0)(0, 'checked')
|
|
112
|
+
let a = defaultUse?.filter((item: any) => item.checked == 1 && item.status_scanned != 2).map((it: any) => it.id)
|
|
113
|
+
let postOut = {
|
|
114
|
+
event_id: event_id,
|
|
115
|
+
ids: JSON.stringify(a),
|
|
116
|
+
hall_id: selectGate?.id,
|
|
117
|
+
trx_id: new Date().getTime() + "" + UserClass.state().get()?.id,
|
|
118
|
+
price_id: defaultUse?.filter((item: any) => item.checked == 1 && item.status_scanned != 2).map((it: any) => it.price_id)
|
|
119
|
+
}
|
|
120
|
+
if (a.length > 0) { // jika tiket itu bisa di pakai
|
|
121
|
+
let urlOut = "event_tms_hall_confirm"
|
|
122
|
+
LibNavigation.replace('event/tms_in_hall_success', { data: [tiket], ...args, url: urlOut, post: postOut })
|
|
123
|
+
} else { // jika tiket itu tidak bisa dipakai
|
|
124
|
+
let err = {
|
|
125
|
+
message: tiket?.list?.[0]?.status_label,
|
|
126
|
+
}
|
|
127
|
+
LibNavigation.replace('event/tms_in_hall_failed', { msgError: err, ...args, postGetData: post })
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
} else { // jika punya tiket banyak
|
|
132
|
+
LibNavigation.replace('event/tms_in_hall_list', { data: ticketsData, ...args })
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
}, (error) => { // jika tidak punya tiket
|
|
136
|
+
esp.log({ error });
|
|
137
|
+
|
|
138
|
+
LibNavigation.replace('event/tms_in_hall_failed', { msgError: error, ...args, postGetData: post })
|
|
139
|
+
}, 1)
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
return (
|
|
144
|
+
<View style={{ flex: 1, backgroundColor: '#fff' }}>
|
|
145
|
+
<LibLoading />
|
|
146
|
+
</View>
|
|
147
|
+
)
|
|
148
|
+
}
|
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
// withHooks
|
|
2
|
+
import { useEffect } from 'react';
|
|
3
|
+
|
|
4
|
+
import { EventTms_homeProperty } from 'esoftplay/cache/event/tms_home/import';
|
|
5
|
+
import { EventButton } from 'esoftplay/cache/event/button/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 { LibNavigation } from 'esoftplay/cache/lib/navigation/import';
|
|
10
|
+
import { LibPicture } from 'esoftplay/cache/lib/picture/import';
|
|
11
|
+
import { LibProgress } from 'esoftplay/cache/lib/progress/import';
|
|
12
|
+
import { LibSlidingup } from 'esoftplay/cache/lib/slidingup/import';
|
|
13
|
+
import { LibStatusbar } from 'esoftplay/cache/lib/statusbar/import';
|
|
14
|
+
import { LibStyle } from 'esoftplay/cache/lib/style/import';
|
|
15
|
+
import { LibUtils } from 'esoftplay/cache/lib/utils/import';
|
|
16
|
+
import { UseCondition } from 'esoftplay/cache/use/condition/import';
|
|
17
|
+
import { UserClass } from 'esoftplay/cache/user/class/import';
|
|
18
|
+
import esp from 'esoftplay/esp';
|
|
19
|
+
import useSafeState from 'esoftplay/state';
|
|
20
|
+
import React from 'react';
|
|
21
|
+
import { Alert, Pressable, ScrollView, Text, View } from 'react-native';
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
export interface EventTms_in_hall_failedArgs {
|
|
25
|
+
|
|
26
|
+
}
|
|
27
|
+
export interface EventTms_in_hall_failedProps {
|
|
28
|
+
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export default function m(props: EventTms_in_hall_failedProps): any {
|
|
32
|
+
const { scan_type, msgError, postGetData, url_ticket_update, url_ticket_detail, price_type, gate_type, event_id, selectGate, typeScanner, event_title, configPriority }: any = LibNavigation.getArgsAll<any>(props)
|
|
33
|
+
|
|
34
|
+
const [, setData, getData] = useSafeState()
|
|
35
|
+
const [qty, setQty, getQty] = useSafeState(1)
|
|
36
|
+
|
|
37
|
+
const qtyRef = React.useRef<LibSlidingup>(null)
|
|
38
|
+
|
|
39
|
+
useEffect(() => {
|
|
40
|
+
EventTms_homeProperty.addCounterHallInScanFailed(1, "0")
|
|
41
|
+
}, [])
|
|
42
|
+
|
|
43
|
+
function getBack() {
|
|
44
|
+
LibNavigation.replace('component/scanner', {
|
|
45
|
+
selectGate: selectGate,
|
|
46
|
+
fromPage: 'event/tms_home',
|
|
47
|
+
event_id: event_id,
|
|
48
|
+
event_title: event_title,
|
|
49
|
+
typeScanner: typeScanner,
|
|
50
|
+
gate_type: gate_type,
|
|
51
|
+
price_type: price_type,
|
|
52
|
+
url_ticket_detail: url_ticket_detail,
|
|
53
|
+
url_ticket_update: url_ticket_update,
|
|
54
|
+
configPriority: configPriority,
|
|
55
|
+
scan_type: scan_type,
|
|
56
|
+
})
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
function forceEntrance() {
|
|
60
|
+
let dataEntranceIn = []
|
|
61
|
+
let dataEntranceBackIn = []
|
|
62
|
+
let mustBeEntrance = 0
|
|
63
|
+
let doneEntrance = 0
|
|
64
|
+
|
|
65
|
+
const arr: any[] = msgError.result
|
|
66
|
+
dataEntranceIn = arr.filter((x: any) => x?.status_scanned == 2)
|
|
67
|
+
dataEntranceBackIn = arr.filter((x: any) => x?.status_scanned == 5)
|
|
68
|
+
|
|
69
|
+
qtyRef.current?.hide()
|
|
70
|
+
LibProgress.show("Processing")
|
|
71
|
+
|
|
72
|
+
if (dataEntranceIn.length > 0) {
|
|
73
|
+
mustBeEntrance += 1
|
|
74
|
+
let post = {
|
|
75
|
+
"target-url": "https://api.test.bbo.co.id/gate_checkin",
|
|
76
|
+
price_id: getData().ticket.price_id,
|
|
77
|
+
qr: encodeURIComponent(postGetData.user_qr),
|
|
78
|
+
trx_id: new Date().getTime() + "" + UserClass.state().get()?.id,
|
|
79
|
+
event_id: event_id,
|
|
80
|
+
gate_id: getData().gate.id,
|
|
81
|
+
is_tms: 1,
|
|
82
|
+
qty: getQty(),
|
|
83
|
+
tms_id: UserClass.state().get()?.id,
|
|
84
|
+
scanned: LibUtils.moment().format('YYYY-MM-DD HH:mm:ss'),
|
|
85
|
+
}
|
|
86
|
+
new LibCurl(url_ticket_update + "?is_turnstile=0", post,
|
|
87
|
+
(res) => {
|
|
88
|
+
doneEntrance += 1
|
|
89
|
+
if (mustBeEntrance <= doneEntrance) {
|
|
90
|
+
LibProgress.hide()
|
|
91
|
+
Alert.alert("Berhasil masuk ke Gate!", "Silahkan lanjutkan proses masuk ke hall", [
|
|
92
|
+
{
|
|
93
|
+
text: "OK", onPress: () => {
|
|
94
|
+
LibNavigation.replace("event/tms_in_hall", { scan_type, url_ticket_update, url_ticket_detail, price_type, gate_type, qr_code: postGetData.user_qr, event_id, selectGate, typeScanner, event_title, configPriority })
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
])
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
(error) => {
|
|
101
|
+
doneEntrance += 1
|
|
102
|
+
if (mustBeEntrance <= doneEntrance) {
|
|
103
|
+
LibProgress.hide()
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
)
|
|
107
|
+
}
|
|
108
|
+
if (dataEntranceBackIn.length > 0) {
|
|
109
|
+
mustBeEntrance += 1
|
|
110
|
+
var post = {
|
|
111
|
+
event_id: event_id,
|
|
112
|
+
ids: JSON.stringify(dataEntranceBackIn.map((x: any) => x.id_out_temporary).slice(0, getQty())),
|
|
113
|
+
gate_id: getData().gate.id,
|
|
114
|
+
}
|
|
115
|
+
new LibCurl('event_tms_out_temporary_in_confirm', post, (result, msg) => {
|
|
116
|
+
doneEntrance += 1
|
|
117
|
+
if (mustBeEntrance <= doneEntrance) {
|
|
118
|
+
LibProgress.hide()
|
|
119
|
+
Alert.alert("Berhasil masuk ke Gate!", "Silahkan lanjutkan proses masuk ke hall", [
|
|
120
|
+
{
|
|
121
|
+
text: "OK", onPress: () => {
|
|
122
|
+
LibNavigation.replace("event/tms_in_hall", { scan_type, url_ticket_update, url_ticket_detail, price_type, gate_type, qr_code: postGetData.user_qr, event_id, selectGate, typeScanner, event_title, configPriority })
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
])
|
|
126
|
+
// LibNavigation.replace("event/tms_in_hall", { scan_type, url_ticket_update, url_ticket_detail, price_type, gate_type, qr_code: postGetData.user_qr, event_id, selectGate, typeScanner, event_title, configPriority })
|
|
127
|
+
}
|
|
128
|
+
}, (error) => {
|
|
129
|
+
doneEntrance += 1
|
|
130
|
+
if (mustBeEntrance <= doneEntrance) {
|
|
131
|
+
LibProgress.hide()
|
|
132
|
+
}
|
|
133
|
+
})
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
function sendTelegram() {
|
|
138
|
+
let data = {
|
|
139
|
+
'#bbohallin': ":",
|
|
140
|
+
reporter: {
|
|
141
|
+
email: UserClass.state().get().email,
|
|
142
|
+
name: UserClass.state().get().name
|
|
143
|
+
},
|
|
144
|
+
url: "event_tms_hall",
|
|
145
|
+
post: postGetData,
|
|
146
|
+
error_msg: msgError,
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
let post = {
|
|
150
|
+
text: String(JSON.stringify(data || {}, undefined, 2)).replace(/[\[\]\{\}\"]+/g, ''),
|
|
151
|
+
chat_id: '-1001737180019',
|
|
152
|
+
disable_web_page_preview: true
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
let _url = "https://api.telegram.org/bot923808407:AAEFBlllQNKCEn8E66fwEzCj5vs9qGwVGT4/sendMessage"
|
|
156
|
+
new LibCurl().custom(_url, post, (res, msg) => { })
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
return (
|
|
160
|
+
<View style={{ flex: 1 }}>
|
|
161
|
+
<LibStatusbar style='light' />
|
|
162
|
+
<View style={{ flex: 1 }}>
|
|
163
|
+
<LibPicture source={esp.assets('failed.png')} style={{ flex: 1, height: LibStyle.height, width: LibStyle.width }} /* resizeMode={"stretch"} */ />
|
|
164
|
+
</View>
|
|
165
|
+
<View style={{ flex: 1, position: 'absolute', top: 50, left: 0, right: 0, bottom: 0, alignItems: 'center', alignContent: 'center' }} >
|
|
166
|
+
<ScrollView>
|
|
167
|
+
<View style={{ marginBottom: 20, alignSelf: 'center', borderRadius: LibStyle.width / 3, padding: 10, backgroundColor: '#fff' }}>
|
|
168
|
+
<LibPicture
|
|
169
|
+
source={esp.assets('failed_icon.png')}
|
|
170
|
+
style={{ width: LibStyle.width / 3, height: LibStyle.width / 3 }}
|
|
171
|
+
/>
|
|
172
|
+
</View>
|
|
173
|
+
<Text allowFontScaling={false} style={{ fontWeight: 'bold', fontSize: 25, color: '#fff', marginHorizontal: 20, textAlign: 'center', letterSpacing: 1 }}>{msgError?.message}</Text>
|
|
174
|
+
<ScrollView>
|
|
175
|
+
<View style={{ minHeight: LibStyle.height * 0.4, marginTop: 30 }}>
|
|
176
|
+
{
|
|
177
|
+
msgError?.result?.length > 0 &&
|
|
178
|
+
<Text allowFontScaling={false} style={{ textAlign: 'center', marginBottom: 10, fontSize: 18, fontWeight: "bold", fontStyle: "normal", letterSpacing: 1.5, color: "#fff" }}>{esp.lang("event/tms_in_hall_failed", "history_used")}</Text>
|
|
179
|
+
}
|
|
180
|
+
{
|
|
181
|
+
msgError?.result?.length > 0 && msgError?.result?.map((item: any, i: number) => {
|
|
182
|
+
return (
|
|
183
|
+
<View key={i} style={{ marginBottom: 5, backgroundColor: "#fff", borderRadius: 10, overflow: 'hidden' }}>
|
|
184
|
+
{
|
|
185
|
+
item.hasOwnProperty("status_label") && item?.status_label != "" &&
|
|
186
|
+
<View style={{ backgroundColor: '#37c2d0', padding: 10, }} >
|
|
187
|
+
<Text allowFontScaling={false} style={{ fontSize: 16, fontWeight: "bold", fontStyle: "normal", letterSpacing: 1.5, color: item?.status == 1 ? item?.status_background : "#fff" }}>{(item?.status_label)?.toUpperCase()}</Text>
|
|
188
|
+
</View>
|
|
189
|
+
}
|
|
190
|
+
<View style={{ padding: 10, flexDirection: 'row', justifyContent: 'space-between', }}>
|
|
191
|
+
<View style={{ flex: 1 }}>
|
|
192
|
+
<Text allowFontScaling={false} style={{ marginBottom: 5, fontWeight: 'bold', fontSize: 14 }}>{esp.lang("event/tms_in_hall_failed", "type")}</Text>
|
|
193
|
+
<Text allowFontScaling={false} numberOfLines={2} ellipsizeMode="tail" style={{ letterSpacing: 1, fontSize: 12 }}>{item?.price_name}</Text>
|
|
194
|
+
</View>
|
|
195
|
+
<View style={{ flex: 2 }}>
|
|
196
|
+
<Text allowFontScaling={false} style={{ marginBottom: 5, fontWeight: 'bold', textAlign: 'center', fontSize: 14 }}>{esp.lang("event/tms_in_hall_failed", "time")}</Text>
|
|
197
|
+
{
|
|
198
|
+
item?.hall_scanned != "0000-00-00 00:00:00" &&
|
|
199
|
+
<Text allowFontScaling={false} style={{ textAlign: 'center', fontSize: 12 }}>{LibUtils.moment(item?.hall_scanned).localeFormat("DD MMM H:mm:ss ")}</Text>
|
|
200
|
+
}
|
|
201
|
+
</View>
|
|
202
|
+
<View style={{ flex: 2 }}>
|
|
203
|
+
<Text allowFontScaling={false} style={{ marginBottom: 5, fontWeight: 'bold', textAlign: 'center', fontSize: 14 }}>{/*hall*/"TMS - Hall"}</Text>
|
|
204
|
+
{
|
|
205
|
+
item?.hall_name != null &&
|
|
206
|
+
<Text allowFontScaling={false} style={{ letterSpacing: 1, textAlign: 'center', fontSize: 12 }}>{item.hasOwnProperty("tms_email") ? item?.tms_email + "\n" + item?.hall_name : item?.hall_name}</Text>
|
|
207
|
+
}
|
|
208
|
+
</View>
|
|
209
|
+
|
|
210
|
+
</View>
|
|
211
|
+
</View>
|
|
212
|
+
)
|
|
213
|
+
})
|
|
214
|
+
}
|
|
215
|
+
</View>
|
|
216
|
+
</ScrollView>
|
|
217
|
+
</ScrollView>
|
|
218
|
+
<UseCondition if={msgError?.status_code == 'EV043'}>
|
|
219
|
+
<View style={{ flexDirection: 'row' }} >
|
|
220
|
+
<Pressable onPress={() => {
|
|
221
|
+
LibNavigation.navigateForResult("event/tms_gate_result", { type: "gate", event_id: event_id }, 2123).then((gate) => {
|
|
222
|
+
const ticket = msgError.result[0]
|
|
223
|
+
setData({ gate, ticket })
|
|
224
|
+
const validDataLength = msgError.result?.filter?.((x: any) => (x?.status_scanned == 2 || x?.status_scanned == 5))?.length
|
|
225
|
+
if (validDataLength > 1) {
|
|
226
|
+
qtyRef.current?.show()
|
|
227
|
+
} else if (validDataLength == 1) {
|
|
228
|
+
setQty(1)
|
|
229
|
+
forceEntrance()
|
|
230
|
+
}
|
|
231
|
+
})
|
|
232
|
+
}} style={{ marginHorizontal: 20, flex: 1, height: 40, borderRadius: 5, backgroundColor: LibStyle.colorPrimary, justifyContent: 'center', alignContent: 'center', alignItems: 'center', ...LibStyle.elevation(10) }} >
|
|
233
|
+
<Text allowFontScaling={false} style={{ textAlign: 'center', fontWeight: 'bold', color: "#fff" }}>PAKSA MASUK KE GATE</Text>
|
|
234
|
+
</Pressable>
|
|
235
|
+
</View>
|
|
236
|
+
</UseCondition>
|
|
237
|
+
<View style={{ flexDirection: 'row', width: LibStyle.width - 40, alignItems: 'center', marginVertical: 10, justifyContent: 'center' }}>
|
|
238
|
+
<UseCondition if={msgError?.status_code != 'EV043'}>
|
|
239
|
+
<Pressable onPress={() => {
|
|
240
|
+
LibDialog.warningConfirm(esp.lang("event/tms_in_failed", "warn_title"), esp.lang("event/tms_in_failed", "warn_msg"), esp.lang("event/tms_in_failed", "warn_ok"), () => {
|
|
241
|
+
sendTelegram()
|
|
242
|
+
}, esp.lang("event/tms_in_failed", "warn_no"), () => { })
|
|
243
|
+
|
|
244
|
+
}} style={{ width: (LibStyle.width - 45) * 0.5, height: 40, borderRadius: 5, backgroundColor: LibStyle.colorRed, borderWidth: 3, borderColor: "#fff", justifyContent: 'center', alignContent: 'center', alignItems: 'center', ...LibStyle.elevation(10) }}>
|
|
245
|
+
<Text allowFontScaling={false} style={{ textAlign: 'center', fontWeight: 'bold', color: "#fff" }}>{esp.lang("event/tms_in_hall_failed", "report_error")}</Text>
|
|
246
|
+
</Pressable>
|
|
247
|
+
</UseCondition>
|
|
248
|
+
<Pressable onPress={getBack} style={{ width: (LibStyle.width - 45) * 0.5, height: 40, borderRadius: 5, borderWidth: 5, borderColor: LibStyle.colorGreen, justifyContent: 'center', alignContent: 'center', alignItems: 'center', ...LibStyle.elevation(10) }}>
|
|
249
|
+
<Text allowFontScaling={false} style={{ fontWeight: 'bold', color: "#fff" }}>{esp.lang("event/tms_in_hall_failed", "back")}</Text>
|
|
250
|
+
</Pressable>
|
|
251
|
+
|
|
252
|
+
</View>
|
|
253
|
+
</View>
|
|
254
|
+
<LibSlidingup ref={qtyRef}>
|
|
255
|
+
<View style={{ backgroundColor: 'white', padding: 20, borderTopLeftRadius: 30, borderTopRightRadius: 30 }} >
|
|
256
|
+
<View style={{ flexDirection: 'row', padding: 20, alignItems: 'center' }} >
|
|
257
|
+
<Pressable onPress={() => { setQty(Math.max(1, qty - 1)) }} >
|
|
258
|
+
<LibIcon.SimpleLineIcons size={40} name='minus' />
|
|
259
|
+
</Pressable>
|
|
260
|
+
<Text allowFontScaling={false} style={{ fontSize: 50, fontWeight: 'bold', textAlign: 'center', flex: 1 }}>{qty}</Text>
|
|
261
|
+
<Pressable onPress={() => { setQty(Math.min(msgError.result?.filter?.((x: any) => (x?.status_scanned == 2 || x?.status_scanned == 5))?.length, qty + 1)) }} >
|
|
262
|
+
<LibIcon.SimpleLineIcons size={40} name='plus' />
|
|
263
|
+
</Pressable>
|
|
264
|
+
</View>
|
|
265
|
+
<EventButton label='Force Entrance' onPress={() => { forceEntrance() }} />
|
|
266
|
+
</View>
|
|
267
|
+
</LibSlidingup >
|
|
268
|
+
</View >
|
|
269
|
+
)
|
|
270
|
+
}
|