esoftplay-event 0.0.0-a → 0.0.0-b
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 +11 -11
- package/event/alert.tsx +32 -0
- package/event/artist.tsx +166 -0
- package/event/artist_detail.tsx +520 -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 +11 -11
- package/event/counter_cashier_report.tsx +6 -6
- package/event/counter_cashier_sell.tsx +7 -7
- package/event/counter_eo.tsx +19 -19
- package/event/counter_history.tsx +4 -4
- package/event/counter_lm.tsx +16 -16
- package/event/counter_report.tsx +4 -4
- package/event/counter_report_breakdown.tsx +2 -2
- package/event/counter_report_detail.tsx +12 -12
- 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 +6 -6
- package/event/counter_user_list.tsx +13 -13
- 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/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/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 +10 -10
- 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/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_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,160 @@
|
|
|
1
|
+
// withHooks
|
|
2
|
+
|
|
3
|
+
import { applyStyle } from 'esoftplay';
|
|
4
|
+
import { EventHeader } from 'esoftplay/cache/event/header/import';
|
|
5
|
+
import { EventLabel_input } from 'esoftplay/cache/event/label_input/import';
|
|
6
|
+
import { EventTms_check_ticket } from 'esoftplay/cache/event/tms_check_ticket/import';
|
|
7
|
+
import { LibCurl } from 'esoftplay/cache/lib/curl/import';
|
|
8
|
+
import { LibDialog } from 'esoftplay/cache/lib/dialog/import';
|
|
9
|
+
import { LibInput_circle2 } from 'esoftplay/cache/lib/input_circle2/import';
|
|
10
|
+
import { LibNavigation } from 'esoftplay/cache/lib/navigation/import';
|
|
11
|
+
import { LibProgress } from 'esoftplay/cache/lib/progress/import';
|
|
12
|
+
import { LibStyle } from 'esoftplay/cache/lib/style/import';
|
|
13
|
+
import { LibTextstyle } from 'esoftplay/cache/lib/textstyle/import';
|
|
14
|
+
import { LibToastProperty } from 'esoftplay/cache/lib/toast/import';
|
|
15
|
+
import esp from 'esoftplay/esp';
|
|
16
|
+
import useSafeState from 'esoftplay/state';
|
|
17
|
+
import React from 'react';
|
|
18
|
+
import { Text, TouchableOpacity, View } from 'react-native';
|
|
19
|
+
import { ScrollView } from 'react-native-gesture-handler';
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
export interface EventTms_check_codeArgs {
|
|
23
|
+
|
|
24
|
+
}
|
|
25
|
+
export interface EventTms_check_codeProps {
|
|
26
|
+
|
|
27
|
+
}
|
|
28
|
+
export default function m(props: EventTms_check_codeProps): any {
|
|
29
|
+
let inputAccessCode = React.useRef<LibInput_circle2>(null)
|
|
30
|
+
const { event_id, gate } = LibNavigation.getArgsAll(props)
|
|
31
|
+
const [result, setResult] = useSafeState<any>()
|
|
32
|
+
|
|
33
|
+
const [tab, setTab] = useSafeState<any>({
|
|
34
|
+
id: 1,
|
|
35
|
+
title: esp.lang("event/tms_check_code", "title")
|
|
36
|
+
})
|
|
37
|
+
|
|
38
|
+
function doSubmit(reSubmit?: boolean): void {
|
|
39
|
+
inputAccessCode.current?.blur()
|
|
40
|
+
if (inputAccessCode.current?.getText() == '') {
|
|
41
|
+
LibToastProperty.show(esp.lang("visitor/index", "alert_error_not_empty_code"))
|
|
42
|
+
inputAccessCode.current?.focus()
|
|
43
|
+
return
|
|
44
|
+
}
|
|
45
|
+
var post = {
|
|
46
|
+
code: inputAccessCode.current?.getText().toUpperCase(),
|
|
47
|
+
event_id: event_id,
|
|
48
|
+
gate_id: gate?.id
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
if (reSubmit) {
|
|
52
|
+
delete post.event_id
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
LibProgress.show(esp.lang("visitor/index", "waiting_msg"))
|
|
56
|
+
new LibCurl('code_check', post, (res, msg) => {
|
|
57
|
+
setResult(res)
|
|
58
|
+
LibProgress.hide();
|
|
59
|
+
}, (err) => {
|
|
60
|
+
setResult(undefined)
|
|
61
|
+
LibProgress.hide();
|
|
62
|
+
LibDialog.warningConfirm(esp.lang("event/tms_check_code", "error"), err?.message, "Ok", () => {
|
|
63
|
+
|
|
64
|
+
}, "Cari lebih lanjut", () => {
|
|
65
|
+
doSubmit(true)
|
|
66
|
+
})
|
|
67
|
+
}, 1)
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
let tabs = [
|
|
71
|
+
{
|
|
72
|
+
id: 1,
|
|
73
|
+
title: esp.lang("event/tms_check_code", "ticket")
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
id: 2,
|
|
77
|
+
title: esp.lang("event/tms_check_code", "code")
|
|
78
|
+
}
|
|
79
|
+
]
|
|
80
|
+
|
|
81
|
+
function renderTabs(item: any, i: number) {
|
|
82
|
+
let tabsLength = 2
|
|
83
|
+
return (
|
|
84
|
+
<TouchableOpacity key={i} onPress={() => {
|
|
85
|
+
setTab(item)
|
|
86
|
+
}}>
|
|
87
|
+
<View style={applyStyle({ height: 43, width: LibStyle.width / tabsLength, alignItems: 'center', overflow: 'visible', justifyContent: 'center', backgroundColor: '#fff' })}>
|
|
88
|
+
<Text allowFontScaling={false} style={{
|
|
89
|
+
width: LibStyle.width / tabsLength, fontFamily: "Arial", fontSize: tab?.id == item?.id ? 16 : 14,
|
|
90
|
+
fontWeight: tab?.id == item?.id ? "bold" : "normal",
|
|
91
|
+
fontStyle: "normal", letterSpacing: 0, textAlign: "center",
|
|
92
|
+
color: tab?.id == item.id ? "#51b596" : "#c5c5c5"
|
|
93
|
+
}}>{item.title}</Text>
|
|
94
|
+
<View style={{ marginTop: 2, width: 5, height: 5, borderRadius: 2.5, alignItems: 'center', justifyContent: 'center', backgroundColor: LibStyle.colorRed, opacity: item?.total > 0 ? 1 : 0 }} />
|
|
95
|
+
<View style={{ width: (LibStyle.width / tabsLength) - 20, height: 3, backgroundColor: tab?.id == item?.id ? "#51b596" : "#fff", position: 'absolute', bottom: 0 }} />
|
|
96
|
+
</View>
|
|
97
|
+
</TouchableOpacity>
|
|
98
|
+
)
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
return (
|
|
102
|
+
<View style={{ flex: 1, backgroundColor: LibStyle.colorBgGrey }}>
|
|
103
|
+
<EventHeader title={tab?.title} />
|
|
104
|
+
<View style={{ flexDirection: 'row' }}>
|
|
105
|
+
{
|
|
106
|
+
tabs?.map(renderTabs)
|
|
107
|
+
}
|
|
108
|
+
</View>
|
|
109
|
+
{
|
|
110
|
+
tab?.id == 1 ?
|
|
111
|
+
<EventTms_check_ticket event_id={event_id} gate={gate} />
|
|
112
|
+
:
|
|
113
|
+
<ScrollView>
|
|
114
|
+
<View style={[{ margin: 15, backgroundColor: 'white', padding: 15, paddingTop: 8, borderRadius: 5 }, LibStyle.elevation(2)]}>
|
|
115
|
+
<EventLabel_input label={esp.lang("visitor/index", "label_input_code")} mandatory />
|
|
116
|
+
<LibInput_circle2
|
|
117
|
+
ref={inputAccessCode}
|
|
118
|
+
onSubmitEditing={() => doSubmit()}
|
|
119
|
+
blurOnSubmit
|
|
120
|
+
returnKeyType="done"
|
|
121
|
+
autoCapitalize='characters'
|
|
122
|
+
// autoFocus
|
|
123
|
+
style={{ borderColor: '#c4c4c4', height: 35, marginTop: 8, borderRadius: 5 }}
|
|
124
|
+
placeholder={esp.lang("visitor/index", "placeholder_input_code")}
|
|
125
|
+
/>
|
|
126
|
+
<TouchableOpacity onPress={() => { doSubmit() }}>
|
|
127
|
+
<View style={{ marginTop: 20, height: 35, borderRadius: 5, backgroundColor: "#6c432c", justifyContent: 'center', alignItems: 'center', paddingHorizontal: 9 }} >
|
|
128
|
+
<Text allowFontScaling={false} style={{ fontFamily: "ArialBold", fontSize: 12, textAlign: "center", textAlignVertical: 'center', color: 'white', marginRight: 13, marginLeft: 10 }} >{esp.lang("visitor/index", "submit")}</Text>
|
|
129
|
+
</View>
|
|
130
|
+
</TouchableOpacity>
|
|
131
|
+
</View>
|
|
132
|
+
{
|
|
133
|
+
result &&
|
|
134
|
+
<View style={[{ marginTop: 0, margin: 15, backgroundColor: 'white', padding: 15, paddingTop: 8, borderRadius: 5 }, LibStyle.elevation(2)]}>
|
|
135
|
+
<Text allowFontScaling={false} style={{ fontSize: 18, letterSpacing: 1.5, fontWeight: 'bold' }}>{esp.lang("event/tms_check_code", "input_code", String(inputAccessCode?.current?.getText?.()))}</Text>
|
|
136
|
+
{/* <LibTextstyle text={esp.lang("event/tms_check_code", "input_code", String(inputAccessCode?.current?.getText?.()))} textStyle="headline" style={{ fontWeight: 'bold' }} /> */}
|
|
137
|
+
{
|
|
138
|
+
result?.data?.hasOwnProperty("price_name") && result?.data?.price_name != "" &&
|
|
139
|
+
<Text allowFontScaling={false} style={{ fontSize: 16, letterSpacing: 1, marginTop: 4 }}>{result?.data?.price_name}</Text>
|
|
140
|
+
}
|
|
141
|
+
{
|
|
142
|
+
result?.data?.hasOwnProperty("title") && result?.data?.title != "" &&
|
|
143
|
+
<Text allowFontScaling={false} style={{ fontSize: 16, letterSpacing: 1, marginTop: 4 }}>{result?.data?.title}</Text>
|
|
144
|
+
}
|
|
145
|
+
{
|
|
146
|
+
result?.data?.hasOwnProperty("event_name") && result?.data?.event_name != "" &&
|
|
147
|
+
<LibTextstyle text={result?.data?.event_name} textStyle="m_overline" style={{ marginVertical: 5, fontSize: 12 }} />
|
|
148
|
+
}
|
|
149
|
+
{
|
|
150
|
+
result?.data?.hasOwnProperty("exhibitor_name") && result?.data?.exhibitor_name != "" &&
|
|
151
|
+
<LibTextstyle text={result?.data?.exhibitor_name} textStyle="headline" style={{ fontWeight: 'bold' }} />
|
|
152
|
+
}
|
|
153
|
+
<LibTextstyle text={result?.info} textStyle="m_body1" style={{ lineHeight: 20, marginTop: 10 }} />
|
|
154
|
+
</View>
|
|
155
|
+
}
|
|
156
|
+
</ScrollView>
|
|
157
|
+
}
|
|
158
|
+
</View>
|
|
159
|
+
)
|
|
160
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
// withHooks
|
|
2
|
+
|
|
3
|
+
import { LibInput_circle2 } from 'esoftplay/cache/lib/input_circle2/import';
|
|
4
|
+
import { LibKeyboard_avoid } from 'esoftplay/cache/lib/keyboard_avoid/import';
|
|
5
|
+
import { LibNavigation } from 'esoftplay/cache/lib/navigation/import';
|
|
6
|
+
import { LibPicture } from 'esoftplay/cache/lib/picture/import';
|
|
7
|
+
import { LibStyle } from 'esoftplay/cache/lib/style/import';
|
|
8
|
+
import { LibToastProperty } from 'esoftplay/cache/lib/toast/import';
|
|
9
|
+
import esp from 'esoftplay/esp';
|
|
10
|
+
import React from 'react';
|
|
11
|
+
import { ScrollView, Text, TouchableOpacity, View } from 'react-native';
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
export interface EventTms_check_ticketArgs {
|
|
15
|
+
|
|
16
|
+
}
|
|
17
|
+
export interface EventTms_check_ticketProps {
|
|
18
|
+
event_id: string,
|
|
19
|
+
gate?: any
|
|
20
|
+
}
|
|
21
|
+
export default function m(props: EventTms_check_ticketProps): any {
|
|
22
|
+
let inputAccessCode = React.useRef<LibInput_circle2>(null)
|
|
23
|
+
|
|
24
|
+
function doSubmit() {
|
|
25
|
+
|
|
26
|
+
inputAccessCode.current?.blur()
|
|
27
|
+
if (inputAccessCode.current?.getText() == '') {
|
|
28
|
+
LibToastProperty.show(esp.lang("visitor/index", "alert_error_not_empty_code"))
|
|
29
|
+
inputAccessCode.current?.focus()
|
|
30
|
+
return
|
|
31
|
+
}
|
|
32
|
+
LibNavigation.navigate('event/tms_check_ticket_result', { selectGate: props?.gate, event_id: props?.event_id, qr: inputAccessCode.current?.getText().toUpperCase() })
|
|
33
|
+
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
return (
|
|
37
|
+
<LibKeyboard_avoid style={{ flex: 1 }}>
|
|
38
|
+
<View style={{ flex: 1, margin: 15, backgroundColor: '#fff', borderRadius: 10, ...LibStyle.elevation(2) }}>
|
|
39
|
+
<ScrollView style={{ flex: 1 }}>
|
|
40
|
+
<TouchableOpacity onPress={() => {
|
|
41
|
+
LibNavigation.navigate('component/scanner', { selectGate: props?.gate, event_id: props?.event_id, fromPage: "event/tms_check_ticket" })
|
|
42
|
+
}}>
|
|
43
|
+
<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' }}>
|
|
44
|
+
<LibPicture source={esp.assets('icons/ic_barcode_white.png')} style={{ height: 250, width: 250 }} />
|
|
45
|
+
<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>
|
|
46
|
+
</View>
|
|
47
|
+
</TouchableOpacity>
|
|
48
|
+
<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_check_ticket", "scan_qr_ticket")}</Text>
|
|
49
|
+
<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>
|
|
50
|
+
|
|
51
|
+
<LibInput_circle2
|
|
52
|
+
ref={inputAccessCode}
|
|
53
|
+
onSubmitEditing={() => doSubmit()}
|
|
54
|
+
blurOnSubmit
|
|
55
|
+
returnKeyType="done"
|
|
56
|
+
autoCapitalize='characters'
|
|
57
|
+
// autoFocus
|
|
58
|
+
style={{ borderColor: '#c4c4c4', height: 35, margin: 15, borderRadius: 5 }}
|
|
59
|
+
placeholder={esp.lang("event/tms_check_ticket", "input_code")}
|
|
60
|
+
/>
|
|
61
|
+
|
|
62
|
+
</ScrollView>
|
|
63
|
+
|
|
64
|
+
<TouchableOpacity onPress={() => { doSubmit() }}>
|
|
65
|
+
<View style={{ margin: 15, marginTop: 20, height: 35, borderRadius: 5, backgroundColor: "#6c432c", justifyContent: 'center', alignItems: 'center', paddingHorizontal: 9 }} >
|
|
66
|
+
<Text allowFontScaling={false} style={{ fontFamily: "ArialBold", fontSize: 12, textAlign: "center", textAlignVertical: 'center', color: 'white', marginRight: 13, marginLeft: 10 }} >{esp.lang("visitor/index", "submit")}</Text>
|
|
67
|
+
</View>
|
|
68
|
+
</TouchableOpacity>
|
|
69
|
+
</View >
|
|
70
|
+
</LibKeyboard_avoid>
|
|
71
|
+
)
|
|
72
|
+
}
|
|
@@ -0,0 +1,384 @@
|
|
|
1
|
+
// withHooks
|
|
2
|
+
import { useEffect } from 'react';
|
|
3
|
+
|
|
4
|
+
import { EventHeader } from 'esoftplay/cache/event/header/import';
|
|
5
|
+
import { LibCurl } from 'esoftplay/cache/lib/curl/import';
|
|
6
|
+
import { LibCurl_view } from 'esoftplay/cache/lib/curl_view/import';
|
|
7
|
+
import { LibDialog } from 'esoftplay/cache/lib/dialog/import';
|
|
8
|
+
import { LibIcon } from 'esoftplay/cache/lib/icon/import';
|
|
9
|
+
import { LibLoading } from 'esoftplay/cache/lib/loading/import';
|
|
10
|
+
import { LibNavigation } from 'esoftplay/cache/lib/navigation/import';
|
|
11
|
+
import { LibObject } from 'esoftplay/cache/lib/object/import';
|
|
12
|
+
import { LibPicture } from 'esoftplay/cache/lib/picture/import';
|
|
13
|
+
import { LibProgress } from 'esoftplay/cache/lib/progress/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 esp from 'esoftplay/esp';
|
|
18
|
+
import useSafeState from 'esoftplay/state';
|
|
19
|
+
import React from 'react';
|
|
20
|
+
import { Pressable, RefreshControl, ScrollView, Text, TouchableOpacity, View } from 'react-native';
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
export interface EventTms_check_ticket_resultArgs {
|
|
24
|
+
|
|
25
|
+
}
|
|
26
|
+
export interface EventTms_check_ticket_resultProps {
|
|
27
|
+
|
|
28
|
+
}
|
|
29
|
+
export default function m(props: EventTms_check_ticket_resultProps): any {
|
|
30
|
+
const { qr, event_id, selectGate } = LibNavigation.getArgsAll(props)
|
|
31
|
+
const [data, setData] = useSafeState<any>()
|
|
32
|
+
const [refreshing, setRefreshing] = useSafeState<boolean>(false);
|
|
33
|
+
|
|
34
|
+
useEffect(() => {
|
|
35
|
+
loadData()
|
|
36
|
+
}, [])
|
|
37
|
+
|
|
38
|
+
function loadData() {
|
|
39
|
+
var post = {
|
|
40
|
+
user_qr: encodeURIComponent(qr),
|
|
41
|
+
event_id: event_id,
|
|
42
|
+
gate_id: selectGate?.id
|
|
43
|
+
}
|
|
44
|
+
LibProgress.show(esp.lang("visitor/index", "waiting_msg"))
|
|
45
|
+
new LibCurl('event_tms_check', post, (res, msg) => {
|
|
46
|
+
// esp.log(res);
|
|
47
|
+
let a = res?.bookings?.map((item: any) => ({
|
|
48
|
+
...item,
|
|
49
|
+
show_history_ticket: false,
|
|
50
|
+
show_history_hall: false,
|
|
51
|
+
show_history_share: false,
|
|
52
|
+
show_additional_info: false
|
|
53
|
+
}))
|
|
54
|
+
let b = {
|
|
55
|
+
...res,
|
|
56
|
+
bookings: a
|
|
57
|
+
}
|
|
58
|
+
esp.log(b);
|
|
59
|
+
setData(b)
|
|
60
|
+
setRefreshing(false)
|
|
61
|
+
LibProgress.hide();
|
|
62
|
+
}, (error) => {
|
|
63
|
+
LibProgress.hide();
|
|
64
|
+
setRefreshing(false)
|
|
65
|
+
LibDialog.warningConfirm(esp.lang("event/tms_check_ticket_result", "error"), error?.message, esp.lang("event/tms_check_ticket_result", "back"), () => LibNavigation.back(), "", () => { })
|
|
66
|
+
}, 1)
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
function onRefresh() {
|
|
70
|
+
setRefreshing(true)
|
|
71
|
+
loadData()
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
function renderTmsIn(item: any, i: number) {
|
|
75
|
+
return (
|
|
76
|
+
<View key={i} style={{ borderRadius: 5, margin: 2, padding: 5, backgroundColor: i % 2 ? '#fff' : LibStyle.colorGrey, borderBottomWidth: 1, borderBottomColor: LibStyle.colorBgGrey }}>
|
|
77
|
+
{
|
|
78
|
+
item.tms_name != "" &&
|
|
79
|
+
<Text allowFontScaling={false} style={{ paddingHorizontal: 5, fontSize: 14 }}>{item.tms_name}</Text>
|
|
80
|
+
}
|
|
81
|
+
<Text allowFontScaling={false} style={{ paddingHorizontal: 5, fontSize: 14 }}>{item?.scanned_in != "0000-00-00 00:00:00" ? LibUtils.moment(item.scanned_in).serverFormat("DD MMM HH:mm:ss ") : esp.lang("event/tms_check_ticket_result", "not_scan_in")}</Text>
|
|
82
|
+
|
|
83
|
+
</View>
|
|
84
|
+
)
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
function renderTmsOut(item: any, i: number) {
|
|
88
|
+
return (
|
|
89
|
+
<View key={i} style={{ borderRadius: 5, margin: 2, padding: 5, backgroundColor: i % 2 ? '#fff' : LibStyle.colorGrey, borderBottomWidth: 1, borderBottomColor: LibStyle.colorBgGrey }}>
|
|
90
|
+
{
|
|
91
|
+
item.tms_name_out != null && item.tms_name_out != "" &&
|
|
92
|
+
<Text allowFontScaling={false} style={{ paddingHorizontal: 5, fontSize: 14 }}>{item.tms_name_out}</Text>
|
|
93
|
+
}
|
|
94
|
+
<Text allowFontScaling={false} style={{ paddingHorizontal: 5, fontSize: 14 }}>{item?.scanned_out != "0000-00-00 00:00:00" ? LibUtils.moment(item.scanned_out).serverFormat("DD MMM HH:mm:ss ") : esp.lang("event/tms_check_ticket_result", "not_scan_out")}</Text>
|
|
95
|
+
</View>
|
|
96
|
+
)
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
function renderTempOut(item: any, i: number) {
|
|
100
|
+
return (
|
|
101
|
+
<View key={i} style={{ borderRadius: 5, margin: 2, padding: 5, backgroundColor: i % 2 ? '#fff' : LibStyle.colorGrey, borderBottomWidth: 1, borderBottomColor: LibStyle.colorBgGrey }}>
|
|
102
|
+
<Text allowFontScaling={false} style={{ paddingHorizontal: 5, fontSize: 14 }}>{item.hasOwnProperty("scanned_out_temporary") && item?.scanned_out_temporary != "0000-00-00 00:00:00" ? LibUtils.moment(item.scanned_out_temporary).serverFormat("DD MMM HH:mm:ss ") : "Belum pernah scan keluar sementara"}</Text>
|
|
103
|
+
</View>
|
|
104
|
+
)
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
function renderGate(item: any, i: number) {
|
|
108
|
+
return (
|
|
109
|
+
<View key={i} style={{ borderRadius: 5, margin: 2, padding: 5, backgroundColor: i % 2 ? '#fff' : LibStyle.colorGrey, borderBottomWidth: 1, borderBottomColor: LibStyle.colorBgGrey }}>
|
|
110
|
+
<Text allowFontScaling={false} style={{ paddingHorizontal: 5, fontSize: 14 }}>{item?.gate_name == "" ? "-" : item.gate_name}</Text>
|
|
111
|
+
</View>
|
|
112
|
+
)
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
function renderHallIn(item: any, i: number) {
|
|
116
|
+
return (
|
|
117
|
+
<View key={i} style={{ borderRadius: 5, margin: 2, padding: 5, backgroundColor: i % 2 ? '#fff' : LibStyle.colorGrey, borderBottomWidth: 1, borderBottomColor: LibStyle.colorBgGrey }}>
|
|
118
|
+
{
|
|
119
|
+
item.tms_name != "" &&
|
|
120
|
+
<Text allowFontScaling={false} style={{ paddingHorizontal: 5, fontSize: 14 }}>{item.tms_name}</Text>
|
|
121
|
+
}
|
|
122
|
+
<Text allowFontScaling={false} style={{ paddingHorizontal: 5, fontSize: 14 }}>{item?.scanned_in != "0000-00-00 00:00:00" ? LibUtils.moment(item.scanned_in).serverFormat("DD MMM HH:mm:ss ") : esp.lang("event/tms_check_ticket_result", "not_scan_in")}</Text>
|
|
123
|
+
|
|
124
|
+
</View>
|
|
125
|
+
)
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
function renderHallOut(item: any, i: number) {
|
|
129
|
+
return (
|
|
130
|
+
<View key={i} style={{ borderRadius: 5, margin: 2, padding: 5, backgroundColor: i % 2 ? '#fff' : LibStyle.colorGrey, borderBottomWidth: 1, borderBottomColor: LibStyle.colorBgGrey }}>
|
|
131
|
+
{
|
|
132
|
+
item.tms_name_out != "" &&
|
|
133
|
+
<Text allowFontScaling={false} style={{ paddingHorizontal: 5, fontSize: 14 }}>{item.tms_name_out}</Text>
|
|
134
|
+
}
|
|
135
|
+
<Text allowFontScaling={false} style={{ paddingHorizontal: 5, fontSize: 14 }}>{item?.scanned_out != "0000-00-00 00:00:00" ? LibUtils.moment(item.scanned_out).serverFormat("DD MMM HH:mm:ss ") : esp.lang("event/tms_check_ticket_result", "not_scan_out")}</Text>
|
|
136
|
+
|
|
137
|
+
</View>
|
|
138
|
+
)
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
function renderHall(item: any, i: number) {
|
|
142
|
+
return (
|
|
143
|
+
<View key={i} style={{ borderRadius: 5, margin: 2, padding: 5, backgroundColor: i % 2 ? '#fff' : LibStyle.colorGrey, borderBottomWidth: 1, borderBottomColor: LibStyle.colorBgGrey }}>
|
|
144
|
+
<Text allowFontScaling={false} style={{ paddingHorizontal: 5, fontSize: 14 }}>{item?.hall_name == "" ? "-" : item.hall_name}</Text>
|
|
145
|
+
</View>
|
|
146
|
+
)
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
function renderShared(item: any, i: number) {
|
|
150
|
+
return (
|
|
151
|
+
<View key={i} style={{ borderRadius: 5, margin: 2, flexDirection: 'row', justifyContent: 'space-between', alignContent: 'center', alignItems: 'center', padding: 5, backgroundColor: i % 2 ? '#fff' : LibStyle.colorGrey, borderBottomWidth: 1, borderBottomColor: LibStyle.colorBgGrey }}>
|
|
152
|
+
<Text allowFontScaling={false} numberOfLines={2} ellipsizeMode='tail' style={{ flex: 1, paddingHorizontal: 5, fontSize: 14 }}>{item.email}</Text>
|
|
153
|
+
<View style={{ width: 1, height: 15, backgroundColor: LibStyle.colorBrownLight }} />
|
|
154
|
+
<Text allowFontScaling={false} style={{ textAlign: 'center', flex: 1, paddingHorizontal: 5, fontSize: 14 }}>{LibUtils.number(item?.qty)}</Text>
|
|
155
|
+
</View>
|
|
156
|
+
)
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
function resetTicket(url: string) {
|
|
160
|
+
LibDialog.confirm(esp.lang("event/tms_check_ticket_result", "title"), esp.lang("event/tms_check_ticket_result", "message"), esp.lang("event/tms_check_ticket_result", "confirm"), () => {
|
|
161
|
+
LibProgress.show(esp.lang("visitor/index", "waiting_msg"))
|
|
162
|
+
new LibCurl().custom(url + "&t=" + new Date().getTime(), null, (res, msg) => {
|
|
163
|
+
LibProgress.hide()
|
|
164
|
+
if (res?.ok == 1) {
|
|
165
|
+
LibDialog.confirm(esp.lang("event/tms_check_ticket_result", "info"), res?.message, "Ok", () => {
|
|
166
|
+
LibNavigation.back()
|
|
167
|
+
}, "", () => { })
|
|
168
|
+
} else if (res?.ok == 0) {
|
|
169
|
+
LibDialog.warning(esp.lang("event/tms_check_ticket_result", "error_reset"), res?.message)
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
}, 1)
|
|
173
|
+
}, esp.lang("event/tms_check_ticket_result", "cancel"), () => { })
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
return (
|
|
177
|
+
<View style={{ flex: 1, backgroundColor: '#fff' }}>
|
|
178
|
+
<EventHeader title={qr} subtitle={data ? data?.event_name : ''} />
|
|
179
|
+
<ScrollView refreshControl={<RefreshControl refreshing={refreshing} onRefresh={onRefresh} />}>
|
|
180
|
+
{
|
|
181
|
+
data?.bookings?.length > 0 && data?.bookings?.map((item: any, i: number) => {
|
|
182
|
+
return (
|
|
183
|
+
<View key={i} style={{ margin: 10, marginBottom: 0, backgroundColor: LibStyle.colorBgGrey, borderRadius: 10, padding: 10 }}>
|
|
184
|
+
{/* header */}
|
|
185
|
+
<View style={{ flexDirection: 'row', justifyContent: 'space-between', alignContent: 'center', alignItems: 'center' }}>
|
|
186
|
+
<Text allowFontScaling={false} numberOfLines={2} ellipsizeMode='tail' style={{ fontSize: 16, fontWeight: 'bold', flex: 1 }}>{item?.tickets?.[0]?.price_name || item?.price_name}</Text>
|
|
187
|
+
{
|
|
188
|
+
data?.allowed_reset == 1 && item?.qty_used > 0 &&
|
|
189
|
+
<Pressable onPress={() => { resetTicket(item?.reset) }} style={{ ...LibStyle.elevation(3), justifyContent: 'center', marginLeft: 10, paddingVertical: 5, paddingHorizontal: 10, backgroundColor: LibStyle.colorRed, borderRadius: 5 }}>
|
|
190
|
+
<Text allowFontScaling={false} style={{ fontWeight: 'bold', color: '#fff' }}>{esp.lang("event/tms_check_ticket_result", "reset")}</Text>
|
|
191
|
+
</Pressable>
|
|
192
|
+
}
|
|
193
|
+
</View>
|
|
194
|
+
|
|
195
|
+
<View style={{ marginTop: 10, backgroundColor: '#fff', borderRadius: 10, paddingHorizontal: 10 }}>
|
|
196
|
+
<View style={{ flexDirection: 'row', alignContent: 'center', alignItems: 'center', justifyContent: 'space-between' }}>
|
|
197
|
+
<Text allowFontScaling={false} style={{ fontSize: 14 }}>{item?.code}</Text>
|
|
198
|
+
|
|
199
|
+
<View style={{ flexDirection: 'row', alignContent: 'center', alignItems: 'center' }}>
|
|
200
|
+
<Text allowFontScaling={false} style={{ marginLeft: 20, fontSize: 14, fontWeight: "normal", fontStyle: "normal", letterSpacing: 0, color: "#484848" }}>{"("}</Text>
|
|
201
|
+
<Text allowFontScaling={false} style={{ marginLeft: 4, fontSize: 30, fontWeight: "bold", fontStyle: "normal", letterSpacing: 0, color: "#484848" }}>{item?.qty}</Text>
|
|
202
|
+
<Text allowFontScaling={false} style={{ marginLeft: 4, fontSize: 14, fontWeight: "normal", fontStyle: "normal", letterSpacing: 0, color: "#484848" }}>{esp.lang("event/tms_check_ticket_result", "ticket")}{")"}</Text>
|
|
203
|
+
</View>
|
|
204
|
+
</View>
|
|
205
|
+
|
|
206
|
+
<UseCondition if={Boolean(item?.exhibitor?.title)} >
|
|
207
|
+
<Text allowFontScaling={false} style={{ fontSize: 12 }}>Exhibitor : {item?.exhibitor?.title}</Text>
|
|
208
|
+
</UseCondition>
|
|
209
|
+
<UseCondition if={Boolean(item?.exhibitor?.code)} >
|
|
210
|
+
<Text allowFontScaling={false} style={{ fontSize: 10 }}>CODE : {item?.exhibitor?.code}</Text>
|
|
211
|
+
</UseCondition>
|
|
212
|
+
|
|
213
|
+
<View style={{ flexDirection: 'row', alignItems: 'center', alignContent: 'center', marginTop: 5, marginBottom: 10 }}>
|
|
214
|
+
<LibIcon name='calendar-blank' size={18} style={{ marginRight: 5 }} />
|
|
215
|
+
{
|
|
216
|
+
item?.ondate == "0000-00-00" ?
|
|
217
|
+
<Text allowFontScaling={false} style={{ fontSize: 14 }}>{esp.lang("event/tms_check_ticket_result", "all_date")}</Text>
|
|
218
|
+
:
|
|
219
|
+
<Text allowFontScaling={false} style={{ fontSize: 14 }}>{LibUtils.moment(item?.ondate).localeFormat('DD MMMM YYYY')}</Text>
|
|
220
|
+
}
|
|
221
|
+
</View>
|
|
222
|
+
<View style={{ marginBottom: 10, flexDirection: 'row', flexWrap: 'wrap', marginLeft: -10 }}>
|
|
223
|
+
{
|
|
224
|
+
item?.tickets?.map((x: any, i: number) => {
|
|
225
|
+
if (x.seat_name != "") {
|
|
226
|
+
return (
|
|
227
|
+
<View key={i} style={{ marginLeft: 10, paddingVertical: 5, marginBottom: 7, paddingHorizontal: 7, borderWidth: 1, borderColor: '#000', backgroundColor: '#fff', borderRadius: 5 }}>
|
|
228
|
+
<Text allowFontScaling={false} style={{ fontWeight: 'bold', fontSize: 20, color: '#000' }}>{x.seat_name}</Text>
|
|
229
|
+
</View>
|
|
230
|
+
|
|
231
|
+
)
|
|
232
|
+
} else {
|
|
233
|
+
return null
|
|
234
|
+
}
|
|
235
|
+
})
|
|
236
|
+
}
|
|
237
|
+
</View>
|
|
238
|
+
<Text allowFontScaling={false} style={{ fontSize: 12, fontWeight: 'bold', color: item.is_available == 0 ? LibStyle.colorRed : LibStyle.colorGreen }}>{item.is_available == 0 ? "Not Available" : "Available"}</Text>
|
|
239
|
+
<View style={{ marginBottom: 10, flexDirection: 'row', alignContent: 'center', alignItems: 'center', justifyContent: 'space-between' }}>
|
|
240
|
+
<View style={{ flexDirection: 'row', justifyContent: 'space-between', flex: 1 }}>
|
|
241
|
+
<TouchableOpacity onPress={() => {
|
|
242
|
+
setData(LibObject.set(data, item.show_history_ticket ? false : true)("bookings", i, "show_history_ticket"))
|
|
243
|
+
}} style={{ flexDirection: 'row', alignContent: 'center', alignItems: 'center' }}>
|
|
244
|
+
<Text allowFontScaling={false} style={{ fontSize: 12, fontWeight: "normal", fontStyle: "normal", letterSpacing: 0, color: item?.qty_used == 0 ? "#484848" : LibStyle.colorBlue, textDecorationStyle: 'solid', textDecorationLine: item?.qty_used == 0 ? "none" : 'underline' }}>{item?.qty_used == 0 ? esp.lang("event/order", "have_not_been_used") : item?.qty_used + " " + esp.lang("event/order_detail", "used")}</Text>
|
|
245
|
+
</TouchableOpacity>
|
|
246
|
+
{
|
|
247
|
+
item?.tickets_share?.length > 0 &&
|
|
248
|
+
<TouchableOpacity onPress={() => {
|
|
249
|
+
setData(LibObject.set(data, item.show_history_share ? false : true)("bookings", i, "show_history_share"))
|
|
250
|
+
}}>
|
|
251
|
+
<Text allowFontScaling={false} style={{ fontSize: 12, fontWeight: "normal", fontStyle: "normal", letterSpacing: 0, color: LibStyle.colorBlue, textDecorationStyle: 'solid', textDecorationLine: 'underline' }}>{item?.tickets_share.reduce((acc: any, { qty = 0 }: any) => acc + qty, 0) + " Tiket dishare"}</Text>
|
|
252
|
+
</TouchableOpacity>
|
|
253
|
+
}
|
|
254
|
+
</View>
|
|
255
|
+
</View>
|
|
256
|
+
|
|
257
|
+
</View>
|
|
258
|
+
|
|
259
|
+
<View style={{ marginTop: 10, backgroundColor: '#fff', borderRadius: 10, paddingHorizontal: 10, padding: 10, }}>
|
|
260
|
+
<TouchableOpacity onPress={() => setData(LibObject.set(data, item.show_additional_info ? false : true)("bookings", i, "show_additional_info"))} style={{ flexDirection: 'row', justifyContent: 'space-between', alignContent: 'center', alignItems: 'center' }}>
|
|
261
|
+
<Text allowFontScaling={false} style={{ fontSize: 14 }}>{"Additional Info"}</Text>
|
|
262
|
+
<LibIcon name={item?.show_additional_info ? 'chevron-up' : 'chevron-down'} />
|
|
263
|
+
</TouchableOpacity >
|
|
264
|
+
{
|
|
265
|
+
item.show_additional_info &&
|
|
266
|
+
<LibCurl_view
|
|
267
|
+
url='event_tms_check_additional'
|
|
268
|
+
post={{
|
|
269
|
+
event_id: event_id,
|
|
270
|
+
code: item.code
|
|
271
|
+
}}
|
|
272
|
+
onSuccess={(res, msg) => {
|
|
273
|
+
return (
|
|
274
|
+
<View>
|
|
275
|
+
{
|
|
276
|
+
res?.map((item: any, i: number) => {
|
|
277
|
+
return (
|
|
278
|
+
<View key={i} style={{ marginTop: 7, paddingHorizontal: 10, paddingVertical: 5, borderRadius: 5, backgroundColor: LibStyle.colorBgGrey }}>
|
|
279
|
+
<Text allowFontScaling={false} numberOfLines={2} ellipsizeMode='tail' style={{ fontSize: 14, color: "#009688", fontWeight: 'bold', letterSpacing: 0.5, marginBottom: 5 }}>{item.question}</Text>
|
|
280
|
+
<Text allowFontScaling={false} style={{ fontSize: 12, color: '#000', marginRight: 6 }}>{item.answer}</Text>
|
|
281
|
+
</View>
|
|
282
|
+
)
|
|
283
|
+
})
|
|
284
|
+
}
|
|
285
|
+
</View>
|
|
286
|
+
)
|
|
287
|
+
}}
|
|
288
|
+
onLoading={<LibLoading />}
|
|
289
|
+
onError={(err: any) => {
|
|
290
|
+
return (
|
|
291
|
+
<View style={{ justifyContent: 'center', alignItems: 'center', padding: 10 }}>
|
|
292
|
+
<LibPicture source={esp.assets('img_failed_msg.png')} style={{ width: LibStyle.width / 3, height: 100, resizeMode: 'contain' }} />
|
|
293
|
+
<Text allowFontScaling={false} style={{ flexWrap: 'wrap', fontSize: 14, fontWeight: "bold", marginBottom: 5, color: "#4a4a4a", textAlign: "center" }}>{err?.message}</Text>
|
|
294
|
+
</View>
|
|
295
|
+
// <EventMessage message={err?.message} />
|
|
296
|
+
)
|
|
297
|
+
}}
|
|
298
|
+
/>
|
|
299
|
+
}
|
|
300
|
+
</View>
|
|
301
|
+
|
|
302
|
+
<View style={{ marginTop: 10, backgroundColor: '#fff', borderRadius: 10, paddingHorizontal: 10, padding: 10, }}>
|
|
303
|
+
<TouchableOpacity onPress={() => setData(LibObject.set(data, item.show_history_ticket ? false : true)("bookings", i, "show_history_ticket"))} style={{ flexDirection: 'row', justifyContent: 'space-between', alignContent: 'center', alignItems: 'center' }}>
|
|
304
|
+
<Text allowFontScaling={false} style={{ fontSize: 14 }}>{esp.lang("event/tms_check_ticket_result", "history_ticket")}</Text>
|
|
305
|
+
<LibIcon name={item?.show_history_ticket ? 'chevron-up' : 'chevron-down'} />
|
|
306
|
+
</TouchableOpacity >
|
|
307
|
+
{
|
|
308
|
+
item.show_history_ticket &&
|
|
309
|
+
<View style={{ marginTop: 10, }}>
|
|
310
|
+
<View style={{ marginBottom: 5, flex: 1, padding: 10, backgroundColor: "#37c2d0", borderWidth: 1, borderColor: LibStyle.colorBgGrey, borderRadius: 10 }}>
|
|
311
|
+
<Text allowFontScaling={false} style={{ marginBottom: 5, fontSize: 13, fontWeight: 'bold' }}>{esp.lang("event/tms_check_ticket_result", "tms_in")}</Text>
|
|
312
|
+
{item?.tickets?.map(renderTmsIn)}
|
|
313
|
+
</View>
|
|
314
|
+
<View style={{ marginBottom: 5, flex: 1, padding: 10, backgroundColor: "#37c2d0", borderWidth: 1, borderColor: LibStyle.colorBgGrey, borderRadius: 10 }}>
|
|
315
|
+
<Text allowFontScaling={false} style={{ marginBottom: 5, fontSize: 13, fontWeight: 'bold' }}>{esp.lang("event/tms_check_ticket_result", "tms_out")}</Text>
|
|
316
|
+
{item?.tickets?.map(renderTmsOut)}
|
|
317
|
+
</View>
|
|
318
|
+
|
|
319
|
+
<View style={{ marginBottom: 5, flex: 1, padding: 10, backgroundColor: "#37c2d0", borderWidth: 1, borderColor: LibStyle.colorBgGrey, borderRadius: 10 }}>
|
|
320
|
+
<Text allowFontScaling={false} style={{ marginBottom: 5, fontSize: 13, fontWeight: 'bold' }}>{esp.lang("event/tms_check_ticket_result", "scan_temp_out")}</Text>
|
|
321
|
+
{item?.tickets?.map(renderTempOut)}
|
|
322
|
+
</View>
|
|
323
|
+
<View style={{ marginBottom: 5, flex: 1, padding: 10, backgroundColor: "#37c2d0", borderWidth: 1, borderColor: LibStyle.colorBgGrey, borderRadius: 10 }}>
|
|
324
|
+
<Text allowFontScaling={false} style={{ marginBottom: 5, fontSize: 13, fontWeight: 'bold' }}>{esp.lang("event/tms_check_ticket_result", "gate_title")}</Text>
|
|
325
|
+
{item?.tickets?.map(renderGate)}
|
|
326
|
+
</View>
|
|
327
|
+
</View>
|
|
328
|
+
}
|
|
329
|
+
</View>
|
|
330
|
+
|
|
331
|
+
{
|
|
332
|
+
item.hall_history?.length > 0 &&
|
|
333
|
+
<View style={{ marginTop: 10, backgroundColor: '#fff', borderRadius: 10, paddingHorizontal: 10, padding: 10, }}>
|
|
334
|
+
<TouchableOpacity onPress={() => setData(LibObject.set(data, item.show_history_hall ? false : true)("bookings", i, "show_history_hall"))} style={{ flexDirection: 'row', justifyContent: 'space-between', alignContent: 'center', alignItems: 'center' }}>
|
|
335
|
+
<Text allowFontScaling={false} style={{ fontSize: 14 }}>{esp.lang("event/tms_check_ticket_result", "history_hall")}</Text>
|
|
336
|
+
<LibIcon name={item.show_history_hall ? 'chevron-up' : 'chevron-down'} />
|
|
337
|
+
</TouchableOpacity >
|
|
338
|
+
{
|
|
339
|
+
item.show_history_hall &&
|
|
340
|
+
<View style={{ marginTop: 10, }}>
|
|
341
|
+
<View style={{ marginBottom: 5, flex: 1, padding: 10, backgroundColor: "#FFC523", borderWidth: 1, borderColor: LibStyle.colorBgGrey, borderRadius: 10 }}>
|
|
342
|
+
<Text allowFontScaling={false} style={{ marginBottom: 5, fontSize: 13, fontWeight: 'bold' }}>{esp.lang("event/tms_check_ticket_result", "hall_in")}</Text>
|
|
343
|
+
{item?.hall_history?.map(renderHallIn)}
|
|
344
|
+
</View>
|
|
345
|
+
<View style={{ marginBottom: 5, flex: 1, padding: 10, backgroundColor: "#FFC523", borderWidth: 1, borderColor: LibStyle.colorBgGrey, borderRadius: 10 }}>
|
|
346
|
+
<Text allowFontScaling={false} style={{ marginBottom: 5, fontSize: 13, fontWeight: 'bold' }}>{esp.lang("event/tms_check_ticket_result", "hall_out")}</Text>
|
|
347
|
+
{item?.hall_history?.map(renderHallOut)}
|
|
348
|
+
</View>
|
|
349
|
+
<View style={{ marginBottom: 5, flex: 1, padding: 10, backgroundColor: "#FFC523", borderWidth: 1, borderColor: LibStyle.colorBgGrey, borderRadius: 10 }}>
|
|
350
|
+
<Text allowFontScaling={false} style={{ marginBottom: 5, fontSize: 13, fontWeight: 'bold' }}>{esp.lang("event/tms_check_ticket_result", "hall")}</Text>
|
|
351
|
+
{item?.hall_history?.map(renderHall)}
|
|
352
|
+
</View>
|
|
353
|
+
</View>
|
|
354
|
+
}
|
|
355
|
+
</View>
|
|
356
|
+
}
|
|
357
|
+
{
|
|
358
|
+
item?.tickets_share?.length > 0 &&
|
|
359
|
+
<View style={{ marginTop: 10, backgroundColor: '#fff', borderRadius: 10, paddingHorizontal: 10, padding: 10, }}>
|
|
360
|
+
<TouchableOpacity onPress={() => setData(LibObject.set(data, item.show_history_share ? false : true)("bookings", i, "show_history_share"))} style={{ flexDirection: 'row', justifyContent: 'space-between', alignContent: 'center', alignItems: 'center' }}>
|
|
361
|
+
<Text allowFontScaling={false} style={{ fontSize: 14 }}>{esp.lang("event/tms_check_ticket_result", "history_share_ticket")}</Text>
|
|
362
|
+
<LibIcon name={item.show_history_share ? 'chevron-up' : 'chevron-down'} />
|
|
363
|
+
</TouchableOpacity >
|
|
364
|
+
{
|
|
365
|
+
item.show_history_share &&
|
|
366
|
+
<View style={{ marginTop: 10, }}>
|
|
367
|
+
<View style={{ marginBottom: 5, flex: 1, padding: 10, backgroundColor: "#007BFF", borderWidth: 1, borderColor: LibStyle.colorBgGrey, borderRadius: 10 }}>
|
|
368
|
+
<Text allowFontScaling={false} style={{ color: '#fff', marginBottom: 5, fontSize: 13, fontWeight: 'bold' }}>{esp.lang("event/tms_check_ticket_result", "shared_to")}</Text>
|
|
369
|
+
{item?.tickets_share?.map(renderShared)}
|
|
370
|
+
</View>
|
|
371
|
+
</View>
|
|
372
|
+
}
|
|
373
|
+
</View>
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
</View>
|
|
377
|
+
)
|
|
378
|
+
})
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
</ScrollView>
|
|
382
|
+
</View>
|
|
383
|
+
)
|
|
384
|
+
}
|