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.
- package/config.json +11 -0
- package/event/additional.tsx +188 -0
- package/event/additional_input.tsx +316 -0
- package/event/block_invitation.tsx +48 -0
- package/event/countdown.tsx +72 -0
- package/event/counter_cashier.tsx +180 -0
- package/event/counter_cashier_report.tsx +114 -0
- package/event/counter_cashier_sell.tsx +135 -0
- package/event/counter_eo.tsx +451 -0
- package/event/counter_history.tsx +74 -0
- package/event/counter_history_item.tsx +48 -0
- package/event/counter_info.tsx +96 -0
- package/event/counter_lm.tsx +273 -0
- package/event/counter_menu.tsx +85 -0
- package/event/counter_report.tsx +105 -0
- package/event/counter_report_breakdown.tsx +93 -0
- package/event/counter_report_detail.tsx +238 -0
- package/event/counter_report_detail_list.tsx +56 -0
- package/event/counter_request.tsx +136 -0
- package/event/counter_request_detail.tsx +211 -0
- package/event/counter_section.tsx +32 -0
- package/event/counter_send.tsx +277 -0
- package/event/counter_status.tsx +32 -0
- package/event/counter_type.tsx +23 -0
- package/event/counter_user_list.tsx +197 -0
- package/event/counter_user_list_item.tsx +143 -0
- package/event/coupon.tsx +124 -0
- package/event/coupon_claim.tsx +198 -0
- package/event/coupon_claim_detail.tsx +175 -0
- package/event/coupon_claim_history.tsx +279 -0
- package/event/coupon_claim_reimburse.tsx +111 -0
- package/event/coupon_claim_reimburse_history.tsx +72 -0
- package/event/coupon_claim_reimburse_history_detail.tsx +117 -0
- package/event/coupon_claim_staff.tsx +256 -0
- package/event/coupon_detail.tsx +98 -0
- package/event/coupon_event_list.tsx +77 -0
- package/event/coupon_generate.tsx +258 -0
- package/event/coupon_generate_event.tsx +79 -0
- package/event/coupon_generate_list.tsx +56 -0
- package/event/date_picker.tsx +152 -0
- package/event/detail.tsx +352 -0
- package/event/entrance.tsx +215 -0
- package/event/entrance_again.tsx +200 -0
- package/event/entrance_failed.tsx +190 -0
- package/event/entrance_idcard.tsx +203 -0
- package/event/entrance_list.tsx +264 -0
- package/event/entrance_list_item.tsx +88 -0
- package/event/entrance_log.tsx +130 -0
- package/event/entrance_success.tsx +155 -0
- package/event/entrance_warning.tsx +91 -0
- package/event/exchange_reward.tsx +31 -0
- package/event/exchange_reward_result.tsx +137 -0
- package/event/exchange_ticket.tsx +234 -0
- package/event/exchange_ticket_list.tsx +191 -0
- package/event/exchange_ticket_result.tsx +211 -0
- package/event/exit.tsx +91 -0
- package/event/exit_failed.tsx +135 -0
- package/event/exit_list.tsx +118 -0
- package/event/exit_log.tsx +131 -0
- package/event/exit_success.tsx +143 -0
- package/event/exit_temporary.tsx +226 -0
- package/event/hall_in.tsx +148 -0
- package/event/hall_in_failed.tsx +270 -0
- package/event/hall_in_list.tsx +222 -0
- package/event/hall_in_log.tsx +134 -0
- package/event/hall_in_success.tsx +132 -0
- package/event/hall_out.tsx +143 -0
- package/event/hall_out_failed.tsx +133 -0
- package/event/hall_out_list.tsx +215 -0
- package/event/hall_out_log.tsx +133 -0
- package/event/hall_out_success.tsx +130 -0
- package/event/list.tsx +219 -0
- package/event/list_filter.tsx +124 -0
- package/event/log.tsx +435 -0
- package/event/qc_idcard.tsx +209 -0
- package/event/qc_idcard_failed.tsx +78 -0
- package/event/qc_idcard_success.tsx +68 -0
- package/event/queue_out.tsx +186 -0
- package/event/queue_pricing.tsx +152 -0
- package/event/randomseat.tsx +33 -0
- package/event/review.tsx +117 -0
- package/event/review_add.tsx +342 -0
- package/event/review_detail.tsx +67 -0
- package/event/review_item.tsx +76 -0
- package/event/scan_item.tsx +66 -0
- package/event/schedule.tsx +135 -0
- package/event/seat.tsx +628 -0
- package/event/seat_autopick.tsx +120 -0
- package/event/seat_map.tsx +408 -0
- package/event/seat_map_matrix.tsx +94 -0
- package/event/seat_map_test.tsx +401 -0
- package/event/ticket_list.tsx +722 -0
- package/event/ticket_list2.tsx +680 -0
- package/event/timer.tsx +58 -0
- package/event/tms.tsx +103 -0
- package/event/tms_add.tsx +94 -0
- package/event/tms_add_result.tsx +175 -0
- package/event/tms_dashboard.tsx +89 -0
- package/event/tms_event_list.tsx +66 -0
- package/event/turnstile_event_gate.tsx +74 -0
- package/event/turnstile_event_item.tsx +41 -0
- package/event/turnstile_event_list.tsx +69 -0
- package/event/turnstile_event_ticket.tsx +95 -0
- package/event/turnstile_settings.tsx +327 -0
- package/event/turnstile_settings_otp.tsx +58 -0
- package/event/turnstile_settings_status.tsx +50 -0
- package/event/voucher.tsx +149 -0
- package/event/voucher_multi.tsx +181 -0
- package/fonts/Arial.ttf +0 -0
- package/fonts/ArialBold.ttf +0 -0
- package/fonts/DecoNumbers.ttf +0 -0
- package/fonts/MonoSpace.ttf +0 -0
- package/fonts/SFProText.ttf +0 -0
- package/fonts/digital.ttf +0 -0
- package/fonts/mono.ttf +0 -0
- package/id.json +1113 -0
- package/index.js +2 -0
- package/libs.json +1 -0
- package/mover.js +0 -0
- package/package.json +16 -0
- package/publisher.js +84 -0
|
@@ -0,0 +1,451 @@
|
|
|
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_history_item } from 'esoftplay/cache/event/counter_history_item/import';
|
|
8
|
+
import { EventCounter_info } from 'esoftplay/cache/event/counter_info/import';
|
|
9
|
+
import { EventCounter_menu } from 'esoftplay/cache/event/counter_menu/import';
|
|
10
|
+
import { EventCounter_section } from 'esoftplay/cache/event/counter_section/import';
|
|
11
|
+
import { EventCounter_user_list_item } from 'esoftplay/cache/event/counter_user_list_item/import';
|
|
12
|
+
import { LibCurl } from 'esoftplay/cache/lib/curl/import';
|
|
13
|
+
import { LibDialog } from 'esoftplay/cache/lib/dialog/import';
|
|
14
|
+
import { LibFocus } from 'esoftplay/cache/lib/focus/import';
|
|
15
|
+
import { LibIcon } from 'esoftplay/cache/lib/icon/import';
|
|
16
|
+
import { LibInput_rectangle } from 'esoftplay/cache/lib/input_rectangle/import';
|
|
17
|
+
import { LibLoading } from 'esoftplay/cache/lib/loading/import';
|
|
18
|
+
import { LibNavigation } from 'esoftplay/cache/lib/navigation/import';
|
|
19
|
+
import { LibStyle } from 'esoftplay/cache/lib/style/import';
|
|
20
|
+
import { LibToastProperty } from 'esoftplay/cache/lib/toast/import';
|
|
21
|
+
import { LibUtils } from 'esoftplay/cache/lib/utils/import';
|
|
22
|
+
import { UserPopup } from 'esoftplay/cache/user/popup/import';
|
|
23
|
+
import esp from 'esoftplay/esp';
|
|
24
|
+
import useSafeState from 'esoftplay/state';
|
|
25
|
+
|
|
26
|
+
import { BboConfigProperty } from 'esoftplay/cache/bbo/config/import';
|
|
27
|
+
import React, { useEffect, useRef } from 'react';
|
|
28
|
+
import { Pressable, RefreshControl, ScrollView, Text, TouchableOpacity, View } from 'react-native';
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
export interface EventCounter_eoArgs {
|
|
32
|
+
|
|
33
|
+
}
|
|
34
|
+
export interface EventCounter_eoProps {
|
|
35
|
+
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export function checkEmail(email: string) {
|
|
39
|
+
if (email == '') {
|
|
40
|
+
LibToastProperty.show(esp.lang("event/counter_eo", "empty_email"))
|
|
41
|
+
return false
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
let reg = /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/;
|
|
45
|
+
if (reg.test(email) === false) {
|
|
46
|
+
LibToastProperty.show(esp.lang("event/counter_eo", "invalid_email"));
|
|
47
|
+
return false;
|
|
48
|
+
}
|
|
49
|
+
return true
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export default function m(props: EventCounter_eoProps): any {
|
|
53
|
+
const { is_eo } = LibNavigation.getArgsAll(props)
|
|
54
|
+
const dialogAdd = useRef<ComponentSlidingup>(null)
|
|
55
|
+
const dialogUser = useRef<ComponentSlidingup>(null)
|
|
56
|
+
const dialogListLM = useRef<ComponentSlidingup>(null)
|
|
57
|
+
const [bboConfig] = BboConfigProperty.state().useState()
|
|
58
|
+
|
|
59
|
+
const [email, setEmail] = useSafeState<string>('')
|
|
60
|
+
// result
|
|
61
|
+
const [result, setResult] = useSafeState<any>()
|
|
62
|
+
const [refreshing, setRefreshing] = useSafeState<boolean>(false);
|
|
63
|
+
|
|
64
|
+
const [typeCashier, setTypeCashier] = useSafeState<any>();
|
|
65
|
+
const [selectedLM, setSelectedLM] = useSafeState<any>();
|
|
66
|
+
const [selectedTypeAdd, setSelectedTypeAdd] = useSafeState<any>({
|
|
67
|
+
id: 1,
|
|
68
|
+
title: esp.lang("event/counter_eo", "loket_manager")
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
useEffect(() => {
|
|
72
|
+
BboConfigProperty.curlConfig('v2/config_event')
|
|
73
|
+
loadData()
|
|
74
|
+
}, [])
|
|
75
|
+
|
|
76
|
+
function loadData() {
|
|
77
|
+
new LibCurl('event_eo_home?event_id=' + is_eo?.id, null, (res, msg) => {
|
|
78
|
+
setResult(res)
|
|
79
|
+
setRefreshing(false)
|
|
80
|
+
}, (error) => {
|
|
81
|
+
LibDialog.warning(esp.lang("event/counter_eo", "failed_load"), error?.message)
|
|
82
|
+
LibNavigation.back()
|
|
83
|
+
setRefreshing(false)
|
|
84
|
+
}, 1)
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
function onRefresh() {
|
|
88
|
+
setRefreshing(true)
|
|
89
|
+
loadData()
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
function addLM() {
|
|
93
|
+
let post = {
|
|
94
|
+
event_id: is_eo?.id,
|
|
95
|
+
email: email.trim()
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
LibDialog.confirm(esp.lang("event/counter_eo", "add_title"), esp.lang("event/counter_eo", "add_msg"), esp.lang("event/counter_eo", "add_confirm"), () => {
|
|
99
|
+
new LibCurl('event_manager_edit', post, (res, msg) => {
|
|
100
|
+
LibDialog.info(esp.lang("event/counter_eo", "add_ok"), msg)
|
|
101
|
+
loadData()
|
|
102
|
+
dialogUser.current?.hide()
|
|
103
|
+
}, (error) => {
|
|
104
|
+
LibDialog.warning(esp.lang("event/counter_eo", "add_failed"), error?.message)
|
|
105
|
+
dialogUser.current?.hide()
|
|
106
|
+
}, 1)
|
|
107
|
+
}, esp.lang("event/counter_eo", "add_cancel"), () => { })
|
|
108
|
+
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
function deleteLM(_email: string) {
|
|
112
|
+
let post = {
|
|
113
|
+
event_id: is_eo?.id,
|
|
114
|
+
email: _email.trim()
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
LibDialog.confirm(esp.lang("event/counter_eo", "delete_title"), esp.lang("event/counter_eo", "delete_msg"), esp.lang("event/counter_eo", "delete_confirm"), () => {
|
|
118
|
+
new LibCurl('event_manager_delete', post, (res, msg) => {
|
|
119
|
+
LibDialog.info(esp.lang("event/counter_eo", "delete_ok"), msg)
|
|
120
|
+
loadData()
|
|
121
|
+
}, (error) => {
|
|
122
|
+
LibDialog.warning(esp.lang("event/counter_eo", "delete_fail"), error?.message)
|
|
123
|
+
}, 1)
|
|
124
|
+
}, esp.lang("event/counter_eo", "delete_cancel"), () => { })
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
function addCashier() {
|
|
128
|
+
if (selectedTypeAdd.id == 2 && !typeCashier) {
|
|
129
|
+
LibToastProperty.show(esp.lang("event/counter_eo", "select_cashier_first"))
|
|
130
|
+
return
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
if (selectedTypeAdd.id == 2 && !selectedLM) {
|
|
134
|
+
LibToastProperty.show(esp.lang("event/counter_eo", "empty_lm"))
|
|
135
|
+
return
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
let post = {
|
|
140
|
+
event_id: is_eo?.id,
|
|
141
|
+
email: email.trim(),
|
|
142
|
+
manager_id: selectedLM?.user_id,
|
|
143
|
+
is_digital: typeCashier?.id
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
LibDialog.confirm(esp.lang("event/counter_eo", "cashier_title"), esp.lang("event/counter_eo", "cashier_msg"), esp.lang("event/counter_eo", "cashier_confirm"), () => {
|
|
147
|
+
new LibCurl('event_seller_edit', post, (res, msg) => {
|
|
148
|
+
LibDialog.info(esp.lang("event/counter_eo", "cashier_ok"), msg)
|
|
149
|
+
loadData()
|
|
150
|
+
dialogUser.current?.hide()
|
|
151
|
+
}, (error) => {
|
|
152
|
+
LibDialog.warning(esp.lang("event/counter_eo", "cashier_failed"), error?.message)
|
|
153
|
+
dialogUser.current?.hide()
|
|
154
|
+
}, 1)
|
|
155
|
+
}, esp.lang("event/counter_eo", "cashier_cancel"), () => { })
|
|
156
|
+
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
function deleteCashier(_email: string) {
|
|
160
|
+
let post = {
|
|
161
|
+
event_id: is_eo?.id,
|
|
162
|
+
email: _email.trim()
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
LibDialog.confirm(esp.lang("event/counter_eo", "delete_cashier_title"), esp.lang("event/counter_eo", "delete_cashier_msg"), esp.lang("event/counter_eo", "delete_cashier_confirm"), () => {
|
|
166
|
+
new LibCurl('event_seller_delete', post, (res, msg) => {
|
|
167
|
+
LibDialog.info(esp.lang("event/counter_eo", "delete_cashier_ok"), msg)
|
|
168
|
+
loadData()
|
|
169
|
+
}, (error) => {
|
|
170
|
+
LibDialog.warning(esp.lang("event/counter_eo", "delete_cashier_failed"), error?.message)
|
|
171
|
+
}, 1)
|
|
172
|
+
}, esp.lang("event/counter_eo", "delete_cashier_cancel"), () => { })
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
let a = [
|
|
176
|
+
{
|
|
177
|
+
id: 1,
|
|
178
|
+
title: esp.lang("event/counter_eo", "id1")
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
id: 2,
|
|
182
|
+
title: esp.lang("event/counter_eo", "id2")
|
|
183
|
+
},
|
|
184
|
+
]
|
|
185
|
+
|
|
186
|
+
if (!result) {
|
|
187
|
+
return (
|
|
188
|
+
<LibLoading />
|
|
189
|
+
)
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
function renderMoneyRequest(item: any, i: number) {
|
|
193
|
+
return (
|
|
194
|
+
<View key={i} style={styleId_ZEwY6z}>
|
|
195
|
+
<EventCounter_history_item item={item} is_ticket={false} onPress={() => LibNavigation.navigate('event/counter_request_detail', { url: item.url, status_user: 1 })} />
|
|
196
|
+
</View>
|
|
197
|
+
)
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
function renderTicketRequest(item: any, i: number) {
|
|
201
|
+
return (
|
|
202
|
+
<View style={styleId_ZEwY6z}>
|
|
203
|
+
<EventCounter_history_item item={item} is_ticket={true} onPress={() => LibNavigation.navigate('event/counter_request_detail', { url: item.url, status_user: 1 })} />
|
|
204
|
+
</View>
|
|
205
|
+
)
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
function renderManager(item: any, i: number) {
|
|
209
|
+
return (
|
|
210
|
+
<EventCounter_user_list_item
|
|
211
|
+
{...item}
|
|
212
|
+
showDelete={is_eo?.add_tms == 1 ? true : false}
|
|
213
|
+
onDelete={() => {
|
|
214
|
+
deleteLM(item.email)
|
|
215
|
+
}}
|
|
216
|
+
showSellers
|
|
217
|
+
showDeleteSellers
|
|
218
|
+
onDeleteSellers={(email: string) => {
|
|
219
|
+
deleteCashier(email)
|
|
220
|
+
}}
|
|
221
|
+
/>
|
|
222
|
+
)
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
function renderItem(item: any, i: number) {
|
|
226
|
+
return (
|
|
227
|
+
<Pressable key={i} onPress={() => {
|
|
228
|
+
setSelectedTypeAdd(item)
|
|
229
|
+
setSelectedLM(undefined)
|
|
230
|
+
}} style={{ flex: 1, padding: 7, backgroundColor: item.id == selectedTypeAdd?.id ? "#009AE4" : "#EEF1F8" }}>
|
|
231
|
+
<Text allowFontScaling={false} style={{ alignSelf: 'center', textAlign: 'center', fontFamily: "Arial", fontWeight: item.id == selectedTypeAdd?.id ? "bold" : "normal", fontStyle: "normal", letterSpacing: 0, color: item.id == selectedTypeAdd?.id ? "#fff" : "#000" }}>{item.title}</Text>
|
|
232
|
+
</Pressable>
|
|
233
|
+
)
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
function renderListManage(item: any, i: number) {
|
|
237
|
+
return (
|
|
238
|
+
<EventCounter_user_list_item {...item} onSelect={() => {
|
|
239
|
+
dialogListLM.current?.hide()
|
|
240
|
+
setSelectedLM(item)
|
|
241
|
+
}} />
|
|
242
|
+
)
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
function renderTypeCashier(item: any, i: number) {
|
|
246
|
+
const styleId_Z23v85x: any = { marginLeft: 5, flexWrap: 'wrap', fontFamily: 'SFProText', color: Number(item.debit) == 0 ? "#717171" : "#000" }
|
|
247
|
+
const styleId_1eMW7i: any = { marginBottom: 5, marginTop: 5, marginRight: 10, flexDirection: 'row', alignContent: 'center', alignItems: 'center', justifyContent: 'center' }
|
|
248
|
+
return (
|
|
249
|
+
<Pressable key={i} onPress={() => {
|
|
250
|
+
setTypeCashier(item)
|
|
251
|
+
}} style={styleId_1eMW7i} hitSlop={{ top: 10, left: 10, right: 10, bottom: 10 }}>
|
|
252
|
+
<LibIcon name={item.id == typeCashier?.id ? "radiobox-marked" : "radiobox-blank"} color={item.id == typeCashier?.id ? "#009AE4" : "#000"} />
|
|
253
|
+
<Text allowFontScaling={false} style={styleId_Z23v85x}>{item.title}</Text>
|
|
254
|
+
</Pressable>
|
|
255
|
+
)
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
return (
|
|
259
|
+
<View style={{ flex: 1, backgroundColor: '#fff' }}>
|
|
260
|
+
<LibFocus onFocus={loadData} />
|
|
261
|
+
<ComponentHeader title={esp.lang("event/counter_eo", "header_title")} subtitle={is_eo?.name} bgColor={"#009AE4"} titleColor="#fff" notif />
|
|
262
|
+
{/* status_user 1 EO, 2 LM, 3 Seller */}
|
|
263
|
+
{/* user_type kenapa 2, karena untuk menambahkan Loket Manager */}
|
|
264
|
+
<EventCounter_menu colorTheme={"#009AE4"} event_id={is_eo?.id} user_type={2} status_user={1} />
|
|
265
|
+
<ScrollView style={{ marginTop: -20, backgroundColor: "#EEF1F8", borderTopLeftRadius: 15, borderTopRightRadius: 15 }} refreshControl={
|
|
266
|
+
<RefreshControl refreshing={refreshing} onRefresh={onRefresh} />
|
|
267
|
+
}>
|
|
268
|
+
|
|
269
|
+
{/* active balance */}
|
|
270
|
+
<EventCounter_info colorTheme={"#009AE4"} amount={result?.money} ticket={result?.ticket} event_id={is_eo?.id} status_user={1} />
|
|
271
|
+
|
|
272
|
+
{/* request */}
|
|
273
|
+
|
|
274
|
+
{
|
|
275
|
+
result?.money_request?.length > 0 &&
|
|
276
|
+
<EventCounter_section icon="chevron-right-circle" onPress={() => { LibNavigation.navigate('event/counter_request', { event_id: is_eo?.id, status_user: 1 }) }} title={esp.lang("event/counter_eo", "recent_money")} />
|
|
277
|
+
}
|
|
278
|
+
{
|
|
279
|
+
result?.money_request?.length > 0 && result?.money_request?.map(renderMoneyRequest)
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
{
|
|
283
|
+
result?.ticket_request?.length > 0 &&
|
|
284
|
+
<EventCounter_section icon="chevron-right-circle" onPress={() => { LibNavigation.navigate('event/counter_request', { event_id: is_eo?.id, status_user: 1 }) }} title={esp.lang("event/counter_eo", "recent_ticket")} />
|
|
285
|
+
}
|
|
286
|
+
{
|
|
287
|
+
result?.ticket_request?.length > 0 && result?.ticket_request?.map(renderTicketRequest)
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
{/* loket manager */}
|
|
291
|
+
<EventCounter_section icon="plus-circle" onPress={() => {
|
|
292
|
+
dialogAdd.current?.show()
|
|
293
|
+
// initial state
|
|
294
|
+
setSelectedTypeAdd({
|
|
295
|
+
id: 1,
|
|
296
|
+
title: esp.lang("event/counter_eo", "loket")
|
|
297
|
+
})
|
|
298
|
+
setSelectedLM(undefined)
|
|
299
|
+
}} showIcon={is_eo?.add_tms == 1 ? true : false} title={esp.lang("event/counter_eo", "title_lm")} />
|
|
300
|
+
|
|
301
|
+
{
|
|
302
|
+
result?.manager?.map(renderManager)
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
{
|
|
306
|
+
result?.manager?.length == 0 &&
|
|
307
|
+
<View style={{ margin: 15, borderRadius: 15, marginTop: 0, backgroundColor: '#fff', overflow: 'hidden' }}>
|
|
308
|
+
<ComponentMessage message={esp.lang("event/counter_eo", "empty_lm1")} />
|
|
309
|
+
</View>
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
{
|
|
313
|
+
result?.manager?.length > 9 &&
|
|
314
|
+
<TouchableOpacity onPress={() => { LibNavigation.navigate('event/counter_user_list', { event_id: is_eo?.id, status_user: 1 }) }} style={{ marginTop: 15, justifyContent: 'center', alignSelf: 'center', width: 104, height: 23, borderRadius: 11.5, backgroundColor: "#fff", borderStyle: "solid", borderWidth: 1, borderColor: "#e1e1e1" }}>
|
|
315
|
+
<Text allowFontScaling={false} style={{ alignSelf: 'center', textAlign: 'center', fontFamily: "Arial", fontSize: 11, fontWeight: "bold", fontStyle: "normal", letterSpacing: 0, color: "#9b9b9b" }}>{esp.lang("event/counter_eo", "show_all")}</Text>
|
|
316
|
+
</TouchableOpacity>
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
</ScrollView>
|
|
320
|
+
|
|
321
|
+
<ComponentSlidingup ref={dialogAdd}>
|
|
322
|
+
<View style={{ backgroundColor: '#fff', borderTopLeftRadius: 20, borderTopRightRadius: 20 }}>
|
|
323
|
+
<View style={{ height: 4, width: 32, borderRadius: 2, backgroundColor: "#C6C6C6", marginTop: 10, marginBottom: 10, alignSelf: 'center' }} />
|
|
324
|
+
<View style={{ margin: 15 }}>
|
|
325
|
+
|
|
326
|
+
<View style={{ flexDirection: 'row', borderRadius: 15, overflow: 'hidden' }}>
|
|
327
|
+
{
|
|
328
|
+
a.map(renderItem)
|
|
329
|
+
}
|
|
330
|
+
</View>
|
|
331
|
+
|
|
332
|
+
<ComponentLabel_input label={esp.lang("event/counter_eo", "label_email")} />
|
|
333
|
+
|
|
334
|
+
<LibInput_rectangle
|
|
335
|
+
autoCapitalize="none"
|
|
336
|
+
onChangeText={(t) => {
|
|
337
|
+
LibUtils.debounce(() => {
|
|
338
|
+
setEmail(t)
|
|
339
|
+
}, 500)
|
|
340
|
+
}}
|
|
341
|
+
style={{ borderColor: '#c4c4c4', height: 35, marginTop: 8, borderRadius: 15, }}
|
|
342
|
+
placeholder={esp.lang("event/counter_eo", "email")}
|
|
343
|
+
keyboardType="email-address"
|
|
344
|
+
onSubmitEditing={() => {
|
|
345
|
+
if (checkEmail(email.trim())) {
|
|
346
|
+
if (selectedTypeAdd?.id == 2) {
|
|
347
|
+
if (!typeCashier) {
|
|
348
|
+
LibToastProperty.show(esp.lang("event/counter_eo", "select_cashier_first"))
|
|
349
|
+
} else if (!selectedLM) {
|
|
350
|
+
LibToastProperty.show(esp.lang("event/counter_eo", "lm_not_select"))
|
|
351
|
+
} else {
|
|
352
|
+
dialogAdd.current?.hide()
|
|
353
|
+
dialogUser.current?.show()
|
|
354
|
+
}
|
|
355
|
+
} else {
|
|
356
|
+
dialogAdd.current?.hide()
|
|
357
|
+
dialogUser.current?.show()
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
}}
|
|
361
|
+
/>
|
|
362
|
+
|
|
363
|
+
|
|
364
|
+
{
|
|
365
|
+
selectedTypeAdd?.id == 2 &&
|
|
366
|
+
<View>
|
|
367
|
+
<ComponentLabel_input label={esp.lang("event/counter_eo", "label_type")} />
|
|
368
|
+
<View style={{ backgroundColor: '#fff', padding: 10, paddingLeft: 0, borderRadius: 15, marginBottom: 0, flexDirection: 'row', flexWrap: 'wrap' }}>
|
|
369
|
+
|
|
370
|
+
{
|
|
371
|
+
bboConfig?.event?.cashier_type?.map(renderTypeCashier)
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
</View>
|
|
375
|
+
{
|
|
376
|
+
selectedLM ?
|
|
377
|
+
<EventCounter_user_list_item
|
|
378
|
+
email={selectedLM?.email}
|
|
379
|
+
image={selectedLM?.image}
|
|
380
|
+
name={selectedLM?.name}
|
|
381
|
+
user_id={selectedLM?.user_id}
|
|
382
|
+
showChange
|
|
383
|
+
style={{ ...LibStyle.elevation(2), marginTop: 10, margin: 0 }}
|
|
384
|
+
onChange={() => {
|
|
385
|
+
dialogListLM.current?.show()
|
|
386
|
+
}}
|
|
387
|
+
/>
|
|
388
|
+
:
|
|
389
|
+
<TouchableOpacity onPress={() => {
|
|
390
|
+
dialogListLM.current?.show()
|
|
391
|
+
}} style={{ ...LibStyle.elevation(2), marginTop: 10, backgroundColor: '#fff', padding: 10, borderRadius: 15, flexDirection: 'row', justifyContent: 'space-between', alignContent: 'center', alignItems: 'center' }}>
|
|
392
|
+
<Text allowFontScaling={false} style={{ flexWrap: 'wrap', fontFamily: 'SFProText', fontWeight: 'bold' }}>{esp.lang("event/counter_eo", "select_lm")}</Text>
|
|
393
|
+
<LibIcon name={"chevron-right-circle-outline"} color="#009AE4" />
|
|
394
|
+
</TouchableOpacity>
|
|
395
|
+
}
|
|
396
|
+
</View>
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
<ComponentButton label={esp.lang("event/counter_eo", "btn_next")} style={{ borderRadius: 15, marginTop: 30 }} backgroundColor={email == "" ? LibStyle.colorGrey : "#009AE4"} onPress={() => {
|
|
400
|
+
if (checkEmail(email.trim())) {
|
|
401
|
+
if (selectedTypeAdd?.id == 2) {
|
|
402
|
+
if (!typeCashier) {
|
|
403
|
+
LibToastProperty.show(esp.lang("event/counter_eo", "select_cashier_first"))
|
|
404
|
+
} else if (!selectedLM) {
|
|
405
|
+
LibToastProperty.show(esp.lang("event/counter_eo", "lm_not_select"))
|
|
406
|
+
} else {
|
|
407
|
+
dialogAdd.current?.hide()
|
|
408
|
+
dialogUser.current?.show()
|
|
409
|
+
}
|
|
410
|
+
} else {
|
|
411
|
+
dialogAdd.current?.hide()
|
|
412
|
+
dialogUser.current?.show()
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
}} />
|
|
416
|
+
</View>
|
|
417
|
+
</View>
|
|
418
|
+
</ComponentSlidingup>
|
|
419
|
+
|
|
420
|
+
<ComponentSlidingup ref={dialogUser}>
|
|
421
|
+
<View style={{ backgroundColor: '#fff', borderTopLeftRadius: 20, borderTopRightRadius: 20 }}>
|
|
422
|
+
<View style={{ height: 4, width: 32, borderRadius: 2, backgroundColor: "#C6C6C6", marginTop: 10, marginBottom: 10, alignSelf: 'center' }} />
|
|
423
|
+
<UserPopup email={email.trim()} redirect={() => {
|
|
424
|
+
if (selectedTypeAdd?.id == 2) {
|
|
425
|
+
addCashier()
|
|
426
|
+
} else {
|
|
427
|
+
addLM()
|
|
428
|
+
}
|
|
429
|
+
}} cancel={() => {
|
|
430
|
+
dialogUser.current?.hide()
|
|
431
|
+
}} />
|
|
432
|
+
</View>
|
|
433
|
+
</ComponentSlidingup>
|
|
434
|
+
|
|
435
|
+
<ComponentSlidingup ref={dialogListLM}>
|
|
436
|
+
<View style={{ backgroundColor: '#fff', borderTopLeftRadius: 20, borderTopRightRadius: 20, maxHeight: LibStyle.height / 2 }}>
|
|
437
|
+
<View style={{ height: 4, width: 32, borderRadius: 2, backgroundColor: "#C6C6C6", marginTop: 10, marginBottom: 10, alignSelf: 'center' }} />
|
|
438
|
+
<ScrollView>
|
|
439
|
+
{
|
|
440
|
+
result?.manager?.map(renderListManage)
|
|
441
|
+
}
|
|
442
|
+
</ScrollView>
|
|
443
|
+
</View>
|
|
444
|
+
</ComponentSlidingup>
|
|
445
|
+
|
|
446
|
+
|
|
447
|
+
|
|
448
|
+
</View>
|
|
449
|
+
)
|
|
450
|
+
}
|
|
451
|
+
const styleId_ZEwY6z: any = { margin: 15, marginTop: 0, borderRadius: 15, backgroundColor: '#fff', overflow: 'hidden' }
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
// withHooks
|
|
2
|
+
import { ComponentHeader } from 'esoftplay/cache/component/header/import';
|
|
3
|
+
import { ComponentMessage } from 'esoftplay/cache/component/message/import';
|
|
4
|
+
import { EventCounter_history_item } from 'esoftplay/cache/event/counter_history_item/import';
|
|
5
|
+
import { EventCounter_type } from 'esoftplay/cache/event/counter_type/import';
|
|
6
|
+
import { LibInfinite } from 'esoftplay/cache/lib/infinite/import';
|
|
7
|
+
import { LibNavigation } from 'esoftplay/cache/lib/navigation/import';
|
|
8
|
+
import { LibStyle } from 'esoftplay/cache/lib/style/import';
|
|
9
|
+
import esp from 'esoftplay/esp';
|
|
10
|
+
import useSafeState from 'esoftplay/state';
|
|
11
|
+
|
|
12
|
+
import React from 'react';
|
|
13
|
+
import { Pressable, Text, View } from 'react-native';
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
export interface EventCounter_historyArgs {
|
|
17
|
+
|
|
18
|
+
}
|
|
19
|
+
export interface EventCounter_historyProps {
|
|
20
|
+
|
|
21
|
+
}
|
|
22
|
+
export default function m(props: EventCounter_historyProps): any {
|
|
23
|
+
const { event_id, status_user, tabActive } = LibNavigation.getArgsAll(props)
|
|
24
|
+
|
|
25
|
+
const type = EventCounter_type()
|
|
26
|
+
const [activeTab, setActiveTab] = useSafeState<any>(tabActive ? tabActive : 1)
|
|
27
|
+
|
|
28
|
+
let a = status_user == 1 ? 'event_eo_ticket_mutation?event_id=' + event_id : status_user == 2 ? 'event_manager_ticket_mutation?event_id=' + event_id : 'event_seller_ticket_mutation?event_id=' + event_id
|
|
29
|
+
let b = status_user == 1 ? 'event_eo_money_mutation?event_id=' + event_id : status_user == 2 ? 'event_manager_money_mutation?event_id=' + event_id : 'event_seller_money_mutation?event_id=' + event_id
|
|
30
|
+
let url = activeTab == 1 ? a : b
|
|
31
|
+
|
|
32
|
+
function renderItem(item: any, i: number) {
|
|
33
|
+
return (
|
|
34
|
+
<EventCounter_history_item key={i} item={item} show_icon onPress={() => {/* LibNavigation.navigate('event/counter_request_detail') */ }} is_ticket={activeTab == 1 ? true : false} />
|
|
35
|
+
)
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
function renderType(item: any, i: number) {
|
|
39
|
+
return (
|
|
40
|
+
<Pressable key={i} onPress={() => {
|
|
41
|
+
setActiveTab(item.id)
|
|
42
|
+
}} style={{ ...LibStyle.elevation(item.id == activeTab ? 3 : 0), flex: 1, padding: 7, backgroundColor: item.id == activeTab ? "#fff" : "#EEF1F8", borderRadius: 10 }}>
|
|
43
|
+
<Text allowFontScaling={false} style={{ alignSelf: 'center', textAlign: 'center', fontFamily: "Arial", fontWeight: item.id == activeTab ? "bold" : "normal", fontStyle: "normal", letterSpacing: 0, color: item.id == activeTab ? "#000" : "#aab0b7" }}>{item.title}</Text>
|
|
44
|
+
</Pressable>
|
|
45
|
+
)
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
return (
|
|
49
|
+
<View style={{ flex: 1, backgroundColor: LibStyle.colorBgGrey }}>
|
|
50
|
+
<ComponentHeader title={esp.lang("event/counter_history", "header_title")} subtitle={status_user == 1 ? esp.lang("event/counter_history", "subtitle_eo") : status_user == 2 ? esp.lang("event/counter_history", "subtitle_lm") : esp.lang("event/counter_history", "subtitle_cashier")} />
|
|
51
|
+
<LibInfinite
|
|
52
|
+
url={url}
|
|
53
|
+
key={activeTab}
|
|
54
|
+
|
|
55
|
+
errorView={(error: any) => {
|
|
56
|
+
return (
|
|
57
|
+
<View style={{ margin: 15, borderRadius: 15, backgroundColor: '#fff', overflow: 'hidden' }}>
|
|
58
|
+
<ComponentMessage message={error} />
|
|
59
|
+
</View>
|
|
60
|
+
)
|
|
61
|
+
}}
|
|
62
|
+
ListHeaderComponent={
|
|
63
|
+
<View style={{ flexDirection: 'row', borderRadius: 10, padding: 3, overflow: 'hidden', backgroundColor: LibStyle.colorBgGrey }}>
|
|
64
|
+
{
|
|
65
|
+
type.map(renderType)
|
|
66
|
+
}
|
|
67
|
+
</View>
|
|
68
|
+
}
|
|
69
|
+
style={{ margin: 15, borderRadius: 15, backgroundColor: '#fff' }}
|
|
70
|
+
renderItem={renderItem}
|
|
71
|
+
/>
|
|
72
|
+
</View>
|
|
73
|
+
)
|
|
74
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
// withHooks
|
|
2
|
+
// noPage
|
|
3
|
+
import { applyStyle } from 'esoftplay';
|
|
4
|
+
import { LibStyle } from 'esoftplay/cache/lib/style/import';
|
|
5
|
+
import { LibUtils } from 'esoftplay/cache/lib/utils/import';
|
|
6
|
+
|
|
7
|
+
import React from 'react';
|
|
8
|
+
import { Pressable, Text, View } from 'react-native';
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
export interface EventCounter_history_itemArgs {
|
|
12
|
+
|
|
13
|
+
}
|
|
14
|
+
export interface EventCounter_history_itemProps {
|
|
15
|
+
onPress?: () => void,
|
|
16
|
+
// amount: any,
|
|
17
|
+
// created?: string,
|
|
18
|
+
// event_id?: string,
|
|
19
|
+
// id?: string,
|
|
20
|
+
// is_credit: any,
|
|
21
|
+
// ondate?: string,
|
|
22
|
+
// saldo?: string,
|
|
23
|
+
// title?: string,
|
|
24
|
+
// type?: string,
|
|
25
|
+
// type_id?: string,
|
|
26
|
+
// user_id?: string,
|
|
27
|
+
|
|
28
|
+
is_ticket: boolean,
|
|
29
|
+
show_icon?: boolean
|
|
30
|
+
|
|
31
|
+
item: any
|
|
32
|
+
}
|
|
33
|
+
export default function m(props: EventCounter_history_itemProps): any {
|
|
34
|
+
let item = props.item
|
|
35
|
+
return (
|
|
36
|
+
<Pressable onPress={() => { props.onPress && props.onPress() }} style={applyStyle({ padding: 10, flexDirection: 'row', justifyContent: 'space-between', alignContent: 'center', alignItems: 'center', borderBottomColor: "#EEF1F8", borderBottomWidth: 1 })}>
|
|
37
|
+
<View style={applyStyle({ flex: 3 })}>
|
|
38
|
+
<Text allowFontScaling={false} style={applyStyle({ fontSize: 14 })}>{item?.title}</Text>
|
|
39
|
+
{
|
|
40
|
+
item?.hasOwnProperty("price_name") && item?.price_name != "" &&
|
|
41
|
+
<Text allowFontScaling={false} style={applyStyle({ fontSize: 10, marginTop: 2, marginBottom: 7, })}>{item?.price_name} {item?.ondate != "0000-00-00" && "- " + LibUtils.moment(item?.ondate).localeFormat("D MMM YYYY")}</Text>
|
|
42
|
+
}
|
|
43
|
+
<Text allowFontScaling={false} style={applyStyle({ fontSize: 10, color: "#797979" })}>{LibUtils.moment(item?.created).serverFormat("DD MMMM YYYY HH:mm:ss")}</Text>
|
|
44
|
+
</View>
|
|
45
|
+
<Text allowFontScaling={false} style={applyStyle({ flex: 1, textAlign: 'right', fontWeight: 'bold', fontSize: 12, color: item?.hasOwnProperty('is_credit') ? (item?.is_credit == 0 ? LibStyle.colorGreen : LibStyle.colorRed) : "#000" })}>{props.show_icon && (item?.hasOwnProperty('is_credit') ? (item?.is_credit == 0 ? "+" : "-") : "")} {props.is_ticket ? LibUtils.number(item?.amount) + " Tiket" : LibUtils.money(item?.amount)}</Text>
|
|
46
|
+
</Pressable>
|
|
47
|
+
)
|
|
48
|
+
}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
// withHooks
|
|
2
|
+
// noPage
|
|
3
|
+
import { applyStyle } from 'esoftplay';
|
|
4
|
+
import { LibNavigation } from 'esoftplay/cache/lib/navigation/import';
|
|
5
|
+
import { LibStyle } from 'esoftplay/cache/lib/style/import';
|
|
6
|
+
import { LibUtils } from 'esoftplay/cache/lib/utils/import';
|
|
7
|
+
import esp from 'esoftplay/esp';
|
|
8
|
+
|
|
9
|
+
import React from 'react';
|
|
10
|
+
import { Text, TouchableOpacity, View } from 'react-native';
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
export interface EventCounter_infoArgs {
|
|
14
|
+
|
|
15
|
+
}
|
|
16
|
+
export interface EventCounter_infoProps {
|
|
17
|
+
colorTheme: string
|
|
18
|
+
amount?: any
|
|
19
|
+
ticket?: any
|
|
20
|
+
event_id: any,
|
|
21
|
+
status_user?: number
|
|
22
|
+
}
|
|
23
|
+
export default function m(props: EventCounter_infoProps): any {
|
|
24
|
+
function isEvenNumber(value: number) {
|
|
25
|
+
if (value % 2 == 0)
|
|
26
|
+
return true;
|
|
27
|
+
else
|
|
28
|
+
return false;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
function renderTicket(item: any, i: number) {
|
|
32
|
+
return (
|
|
33
|
+
<TouchableOpacity onPress={() => {
|
|
34
|
+
LibNavigation.navigate('event/counter_history', { event_id: props?.event_id, status_user: props.status_user, tabActive: 1 })
|
|
35
|
+
}} style={{ padding: 10, flexDirection: 'row', alignContent: 'center', alignItems: 'center', paddingVertical: 5, backgroundColor: isEvenNumber(i) ? "#fff" : LibStyle.colorBgGrey }}>
|
|
36
|
+
<View style={applyStyle({ flex: 3, marginTop: 5, marginBottom: 5 })}>
|
|
37
|
+
<Text allowFontScaling={false} style={applyStyle({ flexWrap: 'wrap', fontSize: 12 })}>{item.price_name}</Text>
|
|
38
|
+
{
|
|
39
|
+
item.ondate != "0000-00-00" &&
|
|
40
|
+
<Text allowFontScaling={false} style={applyStyle({ flexWrap: 'wrap', fontSize: 12 })}>( {LibUtils.moment(item.ondate).localeFormat("D MMM YYYY")} )</Text>
|
|
41
|
+
}
|
|
42
|
+
</View>
|
|
43
|
+
<View style={applyStyle({ flex: 1, marginTop: 5, marginBottom: 5 })}>
|
|
44
|
+
<Text allowFontScaling={false} style={applyStyle({ fontSize: 12, textAlign: 'right' })}>{item.debit}</Text>
|
|
45
|
+
</View>
|
|
46
|
+
<View style={applyStyle({ flex: 1, marginTop: 5, marginBottom: 5 })}>
|
|
47
|
+
<Text allowFontScaling={false} style={applyStyle({ fontSize: 12, textAlign: 'right' })}>{item.credit}</Text>
|
|
48
|
+
</View>
|
|
49
|
+
<View style={applyStyle({ flex: 1, marginTop: 5, marginBottom: 5 })}>
|
|
50
|
+
<Text allowFontScaling={false} style={applyStyle({ fontSize: 12, textAlign: 'right' })}>{Number(item.debit) - Number(item.credit)}</Text>
|
|
51
|
+
</View>
|
|
52
|
+
</TouchableOpacity>
|
|
53
|
+
)
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
return (
|
|
57
|
+
<View style={{ margin: 15, marginBottom: 10, marginTop: 25, backgroundColor: '#fff', borderRadius: 15, padding: 10 }}>
|
|
58
|
+
<View style={{ flexDirection: 'row', justifyContent: 'space-between' }}>
|
|
59
|
+
<TouchableOpacity onPress={() => { LibNavigation.navigate('event/counter_history', { event_id: props?.event_id, status_user: props.status_user, tabActive: 2 }) }} style={{ padding: 10, borderRadius: 15, backgroundColor: LibStyle.colorPrimaryDark, width: (LibStyle.width - 60) * 0.5 }}>
|
|
60
|
+
<Text allowFontScaling={false} style={{ fontSize: 10, color: "#000" }}>{esp.lang("event/counter_info", "debit_detail")}</Text>
|
|
61
|
+
<Text allowFontScaling={false} style={{ flex: 1, flexWrap: 'wrap', fontSize: 16, fontWeight: 'bold', color: "#000" }}>{LibUtils.money(props.amount?.debit_today)}</Text>
|
|
62
|
+
<Text allowFontScaling={false} style={{ marginTop: 10, textAlign: 'right', fontSize: 8, color: "#000" }}>{esp.lang("event/counter_info", "debit", LibUtils.money(props.amount?.debit))}</Text>
|
|
63
|
+
</TouchableOpacity>
|
|
64
|
+
<TouchableOpacity onPress={() => { LibNavigation.navigate('event/counter_history', { event_id: props?.event_id, status_user: props.status_user, tabActive: 2 }) }} style={{ padding: 10, borderRadius: 15, backgroundColor: props.colorTheme, width: (LibStyle.width - 60) * 0.5 }}>
|
|
65
|
+
<Text allowFontScaling={false} style={{ fontSize: 10, color: "#fff" }}>{esp.lang("event/counter_info", "credit_today")}</Text>
|
|
66
|
+
<Text allowFontScaling={false} style={{ flex: 1, flexWrap: 'wrap', fontSize: 16, fontWeight: 'bold', color: "#fff" }}>{LibUtils.money(props.amount?.credit_today)}</Text>
|
|
67
|
+
<Text allowFontScaling={false} style={{ marginTop: 10, textAlign: 'right', fontSize: 8, color: "#fff" }}>{esp.lang("event/counter_info", "credit", LibUtils.money(props.amount?.credit))}</Text>
|
|
68
|
+
</TouchableOpacity>
|
|
69
|
+
</View>
|
|
70
|
+
|
|
71
|
+
{
|
|
72
|
+
props.ticket?.length > 0 &&
|
|
73
|
+
<View style={{ flex: 1, marginTop: 10, overflow: 'hidden', borderWidth: 0.5, borderRadius: 15, borderColor: "#717171" }}>
|
|
74
|
+
<View style={{ padding: 10, borderTopLeftRadius: 15, borderTopRightRadius: 15, flexDirection: 'row', backgroundColor: '#f1f2f3' }}>
|
|
75
|
+
<View style={{ flex: 3 }}>
|
|
76
|
+
<Text allowFontScaling={false} style={applyStyle({ fontSize: 14 })}>{esp.lang("event/counter_info", "ticket_type")}</Text>
|
|
77
|
+
</View>
|
|
78
|
+
<View style={{ flex: 1 }}>
|
|
79
|
+
<Text allowFontScaling={false} style={applyStyle({ fontSize: 14, textAlign: 'right' })}>{esp.lang("event/counter_info", "i_debit")}</Text>
|
|
80
|
+
</View>
|
|
81
|
+
<View style={{ flex: 1 }}>
|
|
82
|
+
<Text allowFontScaling={false} style={applyStyle({ fontSize: 14, textAlign: 'right' })}>{esp.lang("event/counter_info", "i_credit")}</Text>
|
|
83
|
+
</View>
|
|
84
|
+
<View style={{ flex: 1 }}>
|
|
85
|
+
<Text allowFontScaling={false} style={applyStyle({ fontSize: 14, textAlign: 'right' })}>{esp.lang("event/counter_info", "i_saldo")}</Text>
|
|
86
|
+
</View>
|
|
87
|
+
</View>
|
|
88
|
+
{
|
|
89
|
+
props.ticket?.sort((a: any, b: any) => a.price_name > b.price_name || a.ondate?.split('-').reverse().join('') > b.ondate?.split('-').reverse().join('') ? 1 : -1).map(renderTicket)
|
|
90
|
+
}
|
|
91
|
+
</View>
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
</View>
|
|
95
|
+
)
|
|
96
|
+
}
|