esoftplay-event 0.0.2 → 0.0.3
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 +1 -1
- package/event/additional_input.tsx +15 -0
- package/event/additional_new.tsx +565 -0
- package/event/artist.tsx +14 -34
- package/event/artist_detail.tsx +336 -239
- package/event/artist_detail_multi.tsx +266 -157
- package/event/artist_detailv2.tsx +129 -69
- package/event/artistv2.tsx +5 -13
- package/event/button.tsx +2 -2
- package/event/button_order_detail.tsx +20 -8
- package/event/capture.tsx +2 -0
- package/event/checkout.ts +135 -0
- package/event/countdown.tsx +13 -9
- package/event/countdown_base.tsx +88 -48
- package/event/countdown_event.tsx +3 -0
- package/event/countdown_timestamp.tsx +106 -0
- package/event/coupon.tsx +1 -1
- package/event/coupon_generate.tsx +35 -22
- package/event/detail.tsx +9 -15
- package/event/detail2.tsx +63 -61
- package/event/dialog_custom.tsx +67 -0
- package/event/exchange_ticket_list.tsx +23 -14
- package/event/exchange_ticket_result.tsx +1 -1
- package/event/firebase_socket.ts +14 -12
- package/event/htmltext.tsx +40 -28
- package/event/index.tsx +8 -2
- package/event/label_input.tsx +2 -2
- package/event/layout.tsx +312 -0
- package/event/loading_page.tsx +62 -82
- package/event/message.tsx +2 -2
- package/event/order_detail.tsx +408 -477
- package/event/order_detail_addons.tsx +60 -0
- package/event/order_detail_addons_booked.tsx +61 -0
- package/event/order_detail_coupon.tsx +66 -0
- package/event/order_detail_instruction.tsx +96 -0
- package/event/order_detail_payment.tsx +1 -1
- package/event/order_detail_reschedule.tsx +109 -0
- package/event/order_detail_return.tsx +231 -0
- package/event/order_detail_review.tsx +174 -0
- package/event/order_detail_share.tsx +304 -0
- package/event/order_detail_tnc.tsx +76 -0
- package/event/order_detail_upgrade.tsx +140 -90
- package/event/order_detail_upgrade_payment.tsx +120 -38
- package/event/order_detail_visitor.tsx +21 -10
- package/event/order_detail_waiting.tsx +3 -3
- package/event/order_history.tsx +1 -1
- package/event/order_item.tsx +1 -1
- package/event/order_lottery.tsx +1 -1
- package/event/order_reschedule.tsx +29 -16
- package/event/order_share_to.tsx +14 -0
- package/event/order_waiting.tsx +1 -1
- package/event/payment_subscribe.tsx +18 -0
- package/event/point_events.tsx +35 -0
- package/event/point_redemption.tsx +101 -0
- package/event/point_redemption_exchange.tsx +60 -0
- package/event/point_redemption_input.tsx +56 -0
- package/event/point_redemption_success.tsx +50 -0
- package/event/point_summary.tsx +48 -0
- package/event/popup.tsx +4 -4
- package/event/queue.tsx +111 -0
- package/event/queue_pricing.tsx +17 -6
- package/event/review_add.tsx +2 -2
- package/event/scan_item.tsx +1 -1
- package/event/schedule.tsx +33 -30
- package/event/schedule2.tsx +86 -0
- package/event/seat.tsx +135 -374
- package/event/seat_map.tsx +8 -8
- package/event/seat_map_new.tsx +211 -38
- package/event/step.tsx +1 -1
- package/event/test.tsx +8 -8
- package/event/ticket.tsx +326 -0
- package/event/ticket_list.tsx +316 -258
- package/event/ticket_list2.tsx +349 -224
- package/event/ticket_list_item.tsx +61 -0
- package/event/ticket_list_new.tsx +710 -0
- package/event/tms_add_result.tsx +10 -5
- package/event/tms_check_ticket_result.tsx +16 -7
- package/event/tms_dashboard.tsx +87 -12
- package/event/tms_gate.tsx +32 -15
- package/event/tms_home.tsx +178 -92
- package/event/tms_idcard.tsx +43 -26
- package/event/tms_in.tsx +2 -3
- package/event/tms_in_failed.tsx +1 -1
- package/event/tms_in_hall.tsx +4 -1
- package/event/tms_in_hall_failed.tsx +36 -16
- package/event/tms_in_log.tsx +9 -11
- package/event/tms_in_success.tsx +13 -8
- package/event/tms_log.tsx +16 -17
- package/event/tms_out_hall_failed.tsx +1 -1
- package/event/tms_out_temporary.tsx +3 -4
- package/event/token_order.tsx +103 -0
- package/event/token_payment.tsx +79 -0
- package/event/visitor_index.tsx +60 -49
- package/event/visitor_input.tsx +336 -54
- package/event/visitor_inputv2.tsx +173 -88
- package/event/voucher.tsx +1 -1
- package/id.json +76 -4
- package/package.json +1 -1
- package/event/secure_page.debug.tsx +0 -34
- package/event/secure_page.live.tsx +0 -35
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { useEffect } from 'react';
|
|
3
3
|
|
|
4
4
|
import { EventButton } from 'esoftplay/cache/event/button/import';
|
|
5
|
+
import { EventFirebase_socket } from 'esoftplay/cache/event/firebase_socket/import';
|
|
5
6
|
import { EventTms_homeProperty } from 'esoftplay/cache/event/tms_home/import';
|
|
6
7
|
import { LibCurl } from 'esoftplay/cache/lib/curl/import';
|
|
7
8
|
import { LibDialog } from 'esoftplay/cache/lib/dialog/import';
|
|
@@ -33,7 +34,7 @@ export default function m(props: EventTms_in_hall_failedProps): any {
|
|
|
33
34
|
|
|
34
35
|
const [, setData, getData] = useSafeState()
|
|
35
36
|
const [qty, setQty, getQty] = useSafeState(1)
|
|
36
|
-
|
|
37
|
+
const { get } = EventFirebase_socket()
|
|
37
38
|
const qtyRef = React.useRef<LibSlidingup>(null)
|
|
38
39
|
|
|
39
40
|
useEffect(() => {
|
|
@@ -56,6 +57,24 @@ export default function m(props: EventTms_in_hall_failedProps): any {
|
|
|
56
57
|
})
|
|
57
58
|
}
|
|
58
59
|
|
|
60
|
+
function mainPath(qr: string) {
|
|
61
|
+
let a = ['event', event_id, '1', qr]
|
|
62
|
+
return a.join('/')
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
function isGateCheckValid(onValid: Function) {
|
|
67
|
+
get(mainPath(encodeURIComponent(encodeURIComponent(postGetData.user_qr))), getData()?.gate?.id, (res) => {
|
|
68
|
+
const errorMessage = Object.values(res)?.[0]?.[4]
|
|
69
|
+
if (Boolean(errorMessage)) {
|
|
70
|
+
Alert.alert("Oops!", errorMessage)
|
|
71
|
+
} else {
|
|
72
|
+
onValid()
|
|
73
|
+
}
|
|
74
|
+
})
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
|
|
59
78
|
function forceEntrance() {
|
|
60
79
|
let dataEntranceIn = []
|
|
61
80
|
let dataEntranceBackIn = []
|
|
@@ -77,7 +96,7 @@ export default function m(props: EventTms_in_hall_failedProps): any {
|
|
|
77
96
|
qr: encodeURIComponent(postGetData.user_qr),
|
|
78
97
|
trx_id: new Date().getTime() + "" + UserClass.state().get()?.id,
|
|
79
98
|
event_id: event_id,
|
|
80
|
-
gate_id: getData()
|
|
99
|
+
gate_id: getData()?.gate?.id,
|
|
81
100
|
is_tms: 1,
|
|
82
101
|
qty: getQty(),
|
|
83
102
|
tms_id: UserClass.state().get()?.id,
|
|
@@ -180,10 +199,10 @@ export default function m(props: EventTms_in_hall_failedProps): any {
|
|
|
180
199
|
{
|
|
181
200
|
msgError?.result?.length > 0 && msgError?.result?.map((item: any, i: number) => {
|
|
182
201
|
return (
|
|
183
|
-
<View key={i} style={{ marginBottom: 5, backgroundColor: "#fff", borderRadius: 10, overflow: 'hidden' }}>
|
|
202
|
+
<View key={i} style={{ marginHorizontal: 10, marginBottom: 5, backgroundColor: "#fff", borderRadius: 10, overflow: 'hidden' }}>
|
|
184
203
|
{
|
|
185
204
|
item.hasOwnProperty("status_label") && item?.status_label != "" &&
|
|
186
|
-
<View style={{ backgroundColor: '#37c2d0', padding: 10, }} >
|
|
205
|
+
<View style={{ backgroundColor: item?.status_scanned == 1 ? '#37c2d0' : '#ffcb3dff', padding: 10, }} >
|
|
187
206
|
<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
207
|
</View>
|
|
189
208
|
}
|
|
@@ -195,7 +214,7 @@ export default function m(props: EventTms_in_hall_failedProps): any {
|
|
|
195
214
|
<View style={{ flex: 2 }}>
|
|
196
215
|
<Text allowFontScaling={false} style={{ marginBottom: 5, fontWeight: 'bold', textAlign: 'center', fontSize: 14 }}>{esp.lang("event/tms_in_hall_failed", "time")}</Text>
|
|
197
216
|
{
|
|
198
|
-
item?.hall_scanned != "0000-00-00 00:00:00" &&
|
|
217
|
+
item.hasOwnProperty("hall_scanned") && item?.hall_scanned != "0000-00-00 00:00:00" &&
|
|
199
218
|
<Text allowFontScaling={false} style={{ textAlign: 'center', fontSize: 12 }}>{LibUtils.moment(item?.hall_scanned).localeFormat("DD MMM H:mm:ss ")}</Text>
|
|
200
219
|
}
|
|
201
220
|
</View>
|
|
@@ -226,7 +245,7 @@ export default function m(props: EventTms_in_hall_failedProps): any {
|
|
|
226
245
|
qtyRef.current?.show()
|
|
227
246
|
} else if (validDataLength == 1) {
|
|
228
247
|
setQty(1)
|
|
229
|
-
forceEntrance
|
|
248
|
+
isGateCheckValid(forceEntrance)
|
|
230
249
|
}
|
|
231
250
|
})
|
|
232
251
|
}} style={{ marginHorizontal: 20, flex: 1, height: 40, borderRadius: 5, backgroundColor: LibStyle.colorPrimary, justifyContent: 'center', alignContent: 'center', alignItems: 'center', ...LibStyle.elevation(10) }} >
|
|
@@ -235,16 +254,14 @@ export default function m(props: EventTms_in_hall_failedProps): any {
|
|
|
235
254
|
</View>
|
|
236
255
|
</UseCondition>
|
|
237
256
|
<View style={{ flexDirection: 'row', width: LibStyle.width - 40, alignItems: 'center', marginVertical: 10, justifyContent: 'space-between' }}>
|
|
238
|
-
<
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
}, esp.lang("event/tms_in_failed", "warn_no"), () => { })
|
|
257
|
+
<Pressable onPress={() => {
|
|
258
|
+
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"), () => {
|
|
259
|
+
sendTelegram()
|
|
260
|
+
}, esp.lang("event/tms_in_failed", "warn_no"), () => { })
|
|
243
261
|
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
</UseCondition>
|
|
262
|
+
}} 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) }}>
|
|
263
|
+
<Text allowFontScaling={false} style={{ textAlign: 'center', fontWeight: 'bold', color: "#fff" }}>{esp.lang("event/tms_in_hall_failed", "report_error")}</Text>
|
|
264
|
+
</Pressable>
|
|
248
265
|
<Pressable onPress={getBack} style={{ width: (LibStyle.width - 45) * 0.5, backgroundColor: LibStyle.colorGreen, height: 40, borderRadius: 5, borderWidth: 5, borderColor: LibStyle.colorGreen, justifyContent: 'center', alignContent: 'center', alignItems: 'center', ...LibStyle.elevation(10) }}>
|
|
249
266
|
<Text allowFontScaling={false} style={{ fontWeight: 'bold', color: "#fff" }}>{esp.lang("event/tms_in_hall_failed", "back")}</Text>
|
|
250
267
|
</Pressable>
|
|
@@ -262,7 +279,10 @@ export default function m(props: EventTms_in_hall_failedProps): any {
|
|
|
262
279
|
<LibIcon.SimpleLineIcons size={40} name='plus' />
|
|
263
280
|
</Pressable>
|
|
264
281
|
</View>
|
|
265
|
-
<EventButton label='Force Entrance' onPress={() => {
|
|
282
|
+
<EventButton label='Force Entrance' onPress={() => {
|
|
283
|
+
qtyRef.current?.hide()
|
|
284
|
+
isGateCheckValid(forceEntrance)
|
|
285
|
+
}} />
|
|
266
286
|
</View>
|
|
267
287
|
</LibSlidingup >
|
|
268
288
|
</View >
|
package/event/tms_in_log.tsx
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
// withHooks
|
|
2
2
|
import { EventTms_homeProperty } from 'esoftplay/cache/event/tms_home/import';
|
|
3
|
-
import { EventTms_in_successProperty } from 'esoftplay/cache/event/tms_in_success/import';
|
|
4
3
|
import { EventTms_logProperty } from 'esoftplay/cache/event/tms_log/import';
|
|
5
4
|
import { LibLoading } from 'esoftplay/cache/lib/loading/import';
|
|
6
5
|
import { LibStyle } from 'esoftplay/cache/lib/style/import';
|
|
7
6
|
import { LibTextstyle } from 'esoftplay/cache/lib/textstyle/import';
|
|
8
7
|
import { LibUtils } from 'esoftplay/cache/lib/utils/import';
|
|
9
|
-
import { UseCondition } from 'esoftplay/cache/use/condition/import';
|
|
10
8
|
import esp from 'esoftplay/esp';
|
|
11
9
|
import useSafeState from 'esoftplay/state';
|
|
12
10
|
import { useTimeout } from 'esoftplay/timeout';
|
|
@@ -45,21 +43,21 @@ function Item(props: EntranceLogItem) {
|
|
|
45
43
|
|
|
46
44
|
export default function m(props: EventTms_in_logProps): any {
|
|
47
45
|
const log = EventTms_homeProperty.counterState().useSelector(s => s)
|
|
48
|
-
const backup = EventTms_in_successProperty.syncUsedTiket().useSelector(s => s)
|
|
46
|
+
// const backup = EventTms_in_successProperty.syncUsedTiket().useSelector(s => s)
|
|
49
47
|
const [loading, setLoading] = useSafeState<boolean>(true)
|
|
50
48
|
const timeout = useTimeout()
|
|
51
49
|
|
|
52
50
|
esp.log({ log });
|
|
53
51
|
|
|
54
52
|
function syncData() {
|
|
55
|
-
EventTms_homeProperty.subscribeSync().trigger(EventTms_in_successProperty.syncUsedTiket().get())
|
|
53
|
+
// EventTms_homeProperty.subscribeSync().trigger(EventTms_in_successProperty.syncUsedTiket().get())
|
|
56
54
|
timeout(() => {
|
|
57
55
|
setLoading(false)
|
|
58
56
|
}, 1000)
|
|
59
57
|
}
|
|
60
58
|
|
|
61
59
|
function forceSyncData() {
|
|
62
|
-
EventTms_homeProperty.subscribeSyncReset().trigger(EventTms_in_successProperty.syncUsedTiket().get())
|
|
60
|
+
// EventTms_homeProperty.subscribeSyncReset().trigger(EventTms_in_successProperty.syncUsedTiket().get())
|
|
63
61
|
timeout(() => {
|
|
64
62
|
setLoading(false)
|
|
65
63
|
}, 1000)
|
|
@@ -105,12 +103,12 @@ export default function m(props: EventTms_in_logProps): any {
|
|
|
105
103
|
}
|
|
106
104
|
|
|
107
105
|
}} />
|
|
108
|
-
<Item text={esp.lang("event/tms_in_log", "data_not_send")} subtitle={esp.lang("event/tms_in_log", "data_not_send_to_server")} value={
|
|
106
|
+
<Item text={esp.lang("event/tms_in_log", "data_not_send")} subtitle={esp.lang("event/tms_in_log", "data_not_send_to_server")} value={"0"} valuecolor={LibStyle.colorRed} onPress={() => {
|
|
109
107
|
|
|
110
108
|
}} />
|
|
111
109
|
|
|
112
|
-
<View style={{ marginHorizontal: 15 }} >
|
|
113
|
-
<UseCondition
|
|
110
|
+
{/* <View style={{ marginHorizontal: 15 }} > */}
|
|
111
|
+
{/* <UseCondition
|
|
114
112
|
if={backup.length == 0}
|
|
115
113
|
fallback={
|
|
116
114
|
<Pressable onPress={() => {
|
|
@@ -124,9 +122,9 @@ export default function m(props: EventTms_in_logProps): any {
|
|
|
124
122
|
<LibTextstyle textStyle='callout'
|
|
125
123
|
style={{ textAlign: 'center', marginTop: 10 }}
|
|
126
124
|
text={esp.lang("event/tms_in_log", "all_data_send")} />
|
|
127
|
-
</UseCondition>
|
|
128
|
-
</View>
|
|
129
|
-
</View
|
|
125
|
+
</UseCondition> */}
|
|
126
|
+
{/* </View> */}
|
|
127
|
+
</View>
|
|
130
128
|
)
|
|
131
129
|
}
|
|
132
130
|
|
package/event/tms_in_success.tsx
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
// withHooks
|
|
2
2
|
import { LibNavigation } from 'esoftplay/cache/lib/navigation/import';
|
|
3
|
-
import { LibObject } from 'esoftplay/cache/lib/object/import';
|
|
4
3
|
import { LibPicture } from 'esoftplay/cache/lib/picture/import';
|
|
5
4
|
import { LibStatusbar } from 'esoftplay/cache/lib/statusbar/import';
|
|
6
5
|
import { LibStyle } from 'esoftplay/cache/lib/style/import';
|
|
@@ -9,8 +8,9 @@ import { UserClass } from 'esoftplay/cache/user/class/import';
|
|
|
9
8
|
import { useRef } from 'react';
|
|
10
9
|
|
|
11
10
|
import { EventTms_homeProperty } from 'esoftplay/cache/event/tms_home/import';
|
|
11
|
+
import { LibCurl } from 'esoftplay/cache/lib/curl/import';
|
|
12
|
+
import { reportApiError } from 'esoftplay/error';
|
|
12
13
|
import esp from 'esoftplay/esp';
|
|
13
|
-
import useGlobalState, { useGlobalReturn } from 'esoftplay/global';
|
|
14
14
|
import useSafeState from 'esoftplay/state';
|
|
15
15
|
import { LinearGradient } from 'expo-linear-gradient';
|
|
16
16
|
import React, { useEffect } from 'react';
|
|
@@ -24,10 +24,10 @@ export interface EventTms_in_successProps {
|
|
|
24
24
|
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
export const syncUsedTiketState = useGlobalState<any[]>([], { persistKey: 'event_entrance_success_tiket_sync', loadOnInit: true, inFastStorage: true })
|
|
28
|
-
export function syncUsedTiket(): useGlobalReturn<any[]> {
|
|
29
|
-
|
|
30
|
-
}
|
|
27
|
+
// export const syncUsedTiketState = useGlobalState<any[]>([], { persistKey: 'event_entrance_success_tiket_sync', loadOnInit: true, inFastStorage: true })
|
|
28
|
+
// export function syncUsedTiket(): useGlobalReturn<any[]> {
|
|
29
|
+
// return syncUsedTiketState
|
|
30
|
+
// }
|
|
31
31
|
|
|
32
32
|
export default function m(props: EventTms_in_successProps): any {
|
|
33
33
|
const { scan_type, url_ticket_update, url_ticket_detail, price_type, selectedTicket, gate_type, qr_code, event_id, selectGate, typeScanner, event_title, qty, configPriority } = LibNavigation.getArgsAll<any>(props)
|
|
@@ -108,8 +108,13 @@ export default function m(props: EventTms_in_successProps): any {
|
|
|
108
108
|
scanned: LibUtils.moment().localeFormat('YYYY-MM-DD HH:mm:ss'),
|
|
109
109
|
}
|
|
110
110
|
EventTms_homeProperty.addCounterEntranceOpenGate(1, selectedTicket?.price_id)
|
|
111
|
-
|
|
112
|
-
|
|
111
|
+
new LibCurl(url, post, (res, msg) => {
|
|
112
|
+
// console.log("SUCCESS CUY", res, msg)
|
|
113
|
+
// syncUsedTiketState.set(LibObject.push(syncUsedTiketState.get(), [url, post])())
|
|
114
|
+
// EventTms_homeProperty.subscribeSync().trigger(syncUsedTiketState.get())
|
|
115
|
+
}, (err) => {
|
|
116
|
+
reportApiError(url, JSON.stringify({ post, response: err }))
|
|
117
|
+
})
|
|
113
118
|
}
|
|
114
119
|
|
|
115
120
|
const widthInterpolate = progress.interpolate({
|
package/event/tms_log.tsx
CHANGED
|
@@ -8,7 +8,6 @@ import { EventTms_homeProperty } from 'esoftplay/cache/event/tms_home/import';
|
|
|
8
8
|
import { EventTms_in_hall_log } from 'esoftplay/cache/event/tms_in_hall_log/import';
|
|
9
9
|
import { EventTms_in_hall_successProperty } from 'esoftplay/cache/event/tms_in_hall_success/import';
|
|
10
10
|
import { EventTms_in_log } from 'esoftplay/cache/event/tms_in_log/import';
|
|
11
|
-
import { EventTms_in_successProperty } from 'esoftplay/cache/event/tms_in_success/import';
|
|
12
11
|
import { EventTms_out_hall_log } from 'esoftplay/cache/event/tms_out_hall_log/import';
|
|
13
12
|
import { EventTms_out_hall_successProperty } from 'esoftplay/cache/event/tms_out_hall_success/import';
|
|
14
13
|
import { EventTms_out_log } from 'esoftplay/cache/event/tms_out_log/import';
|
|
@@ -104,8 +103,8 @@ export default function m(props: EventTms_logProps): any {
|
|
|
104
103
|
const event_id = EventTms_dashboardProperty?.closingDataState()?.get().event_id
|
|
105
104
|
const gate_id = EventTms_dashboardProperty?.closingDataState()?.get().gate_id
|
|
106
105
|
|
|
107
|
-
const backupEntrance = EventTms_in_successProperty.syncUsedTiket().useSelector(s => s)
|
|
108
|
-
const
|
|
106
|
+
// const backupEntrance = EventTms_in_successProperty.syncUsedTiket().useSelector(s => s)
|
|
107
|
+
// const useDetectStateChange(backupEntrance, 10000)
|
|
109
108
|
|
|
110
109
|
const backupExit = EventTms_out_successProperty.syncTicketExit().useSelector(s => s)
|
|
111
110
|
const isStuckExit = useDetectStateChange(backupExit, 10000)
|
|
@@ -154,7 +153,7 @@ export default function m(props: EventTms_logProps): any {
|
|
|
154
153
|
|
|
155
154
|
// reset counter
|
|
156
155
|
EventTms_homeProperty.counterState().reset()
|
|
157
|
-
EventTms_in_successProperty.syncUsedTiket().reset()
|
|
156
|
+
// EventTms_in_successProperty.syncUsedTiket().reset()
|
|
158
157
|
EventTms_out_successProperty.syncTicketExit().reset()
|
|
159
158
|
EventTms_in_hall_successProperty.syncHallIn().reset()
|
|
160
159
|
EventTms_out_hall_successProperty.syncHallOut().reset()
|
|
@@ -262,8 +261,8 @@ export default function m(props: EventTms_logProps): any {
|
|
|
262
261
|
</LibCollaps>
|
|
263
262
|
|
|
264
263
|
</ScrollView>
|
|
265
|
-
<UseCondition if={backupExit.length == 0 &&
|
|
266
|
-
<UseCondition if={
|
|
264
|
+
<UseCondition if={backupExit.length == 0 && backupHall.length == 0 && backupHall_out.length == 0} fallback={
|
|
265
|
+
<UseCondition if={isStuckExit || isStuckHall || isStuckHall_out} >
|
|
267
266
|
<View style={{ padding: 10 }}>
|
|
268
267
|
<LibTextstyle textStyle='caption2' text={esp.lang("event/tms_log", "alert")} />
|
|
269
268
|
<EventButton
|
|
@@ -272,17 +271,17 @@ export default function m(props: EventTms_logProps): any {
|
|
|
272
271
|
backgroundColor='#000'
|
|
273
272
|
onPress={() => {
|
|
274
273
|
LibDialog.confirm(esp.lang("event/tms_log", "send_title"), esp.lang("event/tms_log", "send_msg"), esp.lang("event/tms_log", "send_ok"), () => {
|
|
275
|
-
if (backupEntrance.length > 0) {
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
}
|
|
274
|
+
// if (backupEntrance.length > 0) {
|
|
275
|
+
// counter = counter + 1
|
|
276
|
+
// Storage.setItem('event/tms_in_log_copy_scanned', JSON.stringify(backupEntrance)).then(() => {
|
|
277
|
+
// sendFileTelegram('event/tms_in_log_copy_scanned', () => {
|
|
278
|
+
// counterDone = counterDone + 1
|
|
279
|
+
// if (counter == counterDone) {
|
|
280
|
+
// closing()
|
|
281
|
+
// }
|
|
282
|
+
// })
|
|
283
|
+
// })
|
|
284
|
+
// }
|
|
286
285
|
|
|
287
286
|
if (backupExit.length > 0) {
|
|
288
287
|
counter = counter + 1
|
|
@@ -101,7 +101,7 @@ export default function m(props: EventTms_out_hall_failedProps): any {
|
|
|
101
101
|
</View>
|
|
102
102
|
<View style={{ flex: 1, justifyContent: 'center', paddingVertical: 5 }}>
|
|
103
103
|
{
|
|
104
|
-
item?.scanned != "0000-00-00 00:00:00" &&
|
|
104
|
+
item?.hasOwnProperty("scanned") && item?.scanned != "0000-00-00 00:00:00" &&
|
|
105
105
|
<Text allowFontScaling={false} style={{ textAlign: 'center', fontSize: 12 }}>{LibUtils.moment(item.hall_scanned).localeFormat("DD MMM H:mm:ss ")}</Text>
|
|
106
106
|
}
|
|
107
107
|
</View>
|
|
@@ -12,12 +12,11 @@ import { LibToastProperty } from 'esoftplay/cache/lib/toast/import';
|
|
|
12
12
|
import { applyStyle } from 'esoftplay';
|
|
13
13
|
import { EventButton } from 'esoftplay/cache/event/button/import';
|
|
14
14
|
import { EventHeader } from 'esoftplay/cache/event/header/import';
|
|
15
|
-
import { LibIcon } from 'esoftplay/cache/lib/icon/import';
|
|
16
15
|
import { LibPicture } from 'esoftplay/cache/lib/picture/import';
|
|
17
16
|
import esp from 'esoftplay/esp';
|
|
18
17
|
import useSafeState from 'esoftplay/state';
|
|
19
18
|
import React, { useEffect } from 'react';
|
|
20
|
-
import { ScrollView, Text,
|
|
19
|
+
import { ScrollView, Text, View } from 'react-native';
|
|
21
20
|
|
|
22
21
|
|
|
23
22
|
export interface EventTms_out_temporaryArgs {
|
|
@@ -231,7 +230,7 @@ export default function m(props: EventTms_out_temporaryProps): any {
|
|
|
231
230
|
</View>
|
|
232
231
|
</ScrollView>
|
|
233
232
|
<View style={{ padding: 10, backgroundColor: '#fff' }}>
|
|
234
|
-
<View style={{ flexDirection: 'row', justifyContent: 'space-between', marginBottom: 10, alignContent: 'center', alignItems: 'center' }}>
|
|
233
|
+
{/* <View style={{ flexDirection: 'row', justifyContent: 'space-between', marginBottom: 10, alignContent: 'center', alignItems: 'center' }}>
|
|
235
234
|
<Text allowFontScaling={false} numberOfLines={2} ellipsizeMode={'tail'} style={{ flex: 1, fontWeight: 'bold', fontSize: 14, letterSpacing: 1 }}>{esp.lang("event/tms_in_list", "total_ticket_use", result?.list?.filter((it: any) => it.checked == 1).length)}</Text>
|
|
236
235
|
<TouchableOpacity onPress={() => {
|
|
237
236
|
toggleCheckedAll()
|
|
@@ -239,7 +238,7 @@ export default function m(props: EventTms_out_temporaryProps): any {
|
|
|
239
238
|
<Text allowFontScaling={false} style={applyStyle({ fontFamily: "ArialBold", fontSize: 14, textAlign: "center", textAlignVertical: 'center', color: '#fff', marginRight: 15 })} >{useAll ? esp.lang("event/tms_in_list", "cancel_use") : esp.lang("event/tms_in_list", "use_all")}</Text>
|
|
240
239
|
<LibIcon.Ionicons size={18} color="#fff" name={useAll ? "close" : "checkmark-done"} />
|
|
241
240
|
</TouchableOpacity>
|
|
242
|
-
</View>
|
|
241
|
+
</View> */}
|
|
243
242
|
|
|
244
243
|
<EventButton
|
|
245
244
|
label={esp.lang("event/tms_out_temporary", "btn_exit")}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
// withHooks
|
|
2
|
+
import { EventHeader } from 'esoftplay/cache/event/header/import';
|
|
3
|
+
import { LibIcon } from 'esoftplay/cache/lib/icon/import';
|
|
4
|
+
import { LibStyle } from 'esoftplay/cache/lib/style/import';
|
|
5
|
+
import esp from 'esoftplay/esp';
|
|
6
|
+
import { useRef } from 'react';
|
|
7
|
+
|
|
8
|
+
import { applyStyle } from 'esoftplay';
|
|
9
|
+
import { EventButton } from 'esoftplay/cache/event/button/import';
|
|
10
|
+
import { EventOrder_status } from 'esoftplay/cache/event/order_status/import';
|
|
11
|
+
import { EventSection_menu } from 'esoftplay/cache/event/section_menu/import';
|
|
12
|
+
import { LibNavigation } from 'esoftplay/cache/lib/navigation/import';
|
|
13
|
+
import { LibScroll } from 'esoftplay/cache/lib/scroll/import';
|
|
14
|
+
import { LibSlidingup } from 'esoftplay/cache/lib/slidingup/import';
|
|
15
|
+
import { LibTextstyle } from 'esoftplay/cache/lib/textstyle/import';
|
|
16
|
+
import { LibUtils } from 'esoftplay/cache/lib/utils/import';
|
|
17
|
+
import useSafeState from 'esoftplay/state';
|
|
18
|
+
import React from 'react';
|
|
19
|
+
import { Pressable, ScrollView, Text, View } from 'react-native';
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
export interface EventToken_orderArgs {
|
|
23
|
+
|
|
24
|
+
}
|
|
25
|
+
export interface EventToken_orderProps {
|
|
26
|
+
|
|
27
|
+
}
|
|
28
|
+
export default function m(props: EventToken_orderProps): any {
|
|
29
|
+
|
|
30
|
+
const allStatus = EventOrder_status()
|
|
31
|
+
const statusCode = LibNavigation.getArgs(props, 'status', esp.isDebug("filter") ? '0,1,2,3,4,5,6,7,10' : '1')
|
|
32
|
+
const [status, setStatus] = useSafeState(statusCode)
|
|
33
|
+
const [code, setCode] = useSafeState(statusCode)
|
|
34
|
+
const [selectedDate, setSelectedDate] = useSafeState({ date_start: '', date_end: '', id: 1, title: esp.lang("event/order", "all_date") })
|
|
35
|
+
const [selectedDateRange, setSelectedDateRange] = useSafeState({ date_start: LibUtils.moment().localeFormat("YYYY-MM-DD"), date_end: LibUtils.moment().localeFormat("YYYY-MM-DD") })
|
|
36
|
+
|
|
37
|
+
const statusRef = useRef<LibSlidingup>(null)
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
return (
|
|
41
|
+
<View style={{ flex: 1, backgroundColor: LibStyle.colorBgGrey }}>
|
|
42
|
+
<EventHeader title='Riwayar Transaksi Token' />
|
|
43
|
+
<View style={{ minHeight: 50, }} >
|
|
44
|
+
<LibScroll
|
|
45
|
+
initialNumToRender={20}
|
|
46
|
+
horizontal
|
|
47
|
+
>
|
|
48
|
+
<View style={{ width: 10 }} />
|
|
49
|
+
<Pressable
|
|
50
|
+
onPress={() => { statusRef.current?.show() }}
|
|
51
|
+
style={applyStyle({ height: 30, marginVertical: 10, marginRight: 10, borderRadius: 12, backgroundColor: 'white', borderColor: '#ccc', borderWidth: 1, paddingHorizontal: 10, justifyContent: 'center', flexDirection: 'row', alignItems: 'center' })} >
|
|
52
|
+
<LibTextstyle textStyle='footnote' text={allStatus[allStatus.findIndex((x) => String(x.code) == status)]?.text || esp.lang("event/order", "all_statis")} style={applyStyle({ fontSize: 11, color: "#4E4E4E", marginRight: 5 })} />
|
|
53
|
+
<LibIcon name='chevron-down' style={applyStyle({ color: "#4E4E4E" })} />
|
|
54
|
+
</Pressable>
|
|
55
|
+
</LibScroll>
|
|
56
|
+
<EventSection_menu size='line' />
|
|
57
|
+
</View>
|
|
58
|
+
<ScrollView>
|
|
59
|
+
<Pressable onPress={() => {
|
|
60
|
+
|
|
61
|
+
}} style={{ padding: 7, margin: 15, marginTop: 10, backgroundColor: '#fff', marginBottom: 0, borderRadius: 5, borderWidth: 1, borderColor: LibStyle.colorPrimary, flexDirection: 'row', justifyContent: 'space-between', alignItems: 'center' }}>
|
|
62
|
+
<Text allowFontScaling={false} style={{ marginLeft: 8 }}>{esp.lang("event/order", "wawit")}</Text>
|
|
63
|
+
<View style={{ flexDirection: 'row', alignItems: 'center' }}>
|
|
64
|
+
{/* {
|
|
65
|
+
badge != 0 &&
|
|
66
|
+
<View style={{ backgroundColor: LibStyle.colorRed, height: 17, padding: 5, paddingVertical: 2, borderRadius: 10, alignContent: 'center', alignItems: 'center' }}>
|
|
67
|
+
<Text allowFontScaling={false} style={{ fontFamily: "ArialBold", fontSize: 12, letterSpacing: 0, color: "#ffffff" }}>{badge > 99 ? "99+" : LibUtils.number(badge)}</Text>
|
|
68
|
+
</View>
|
|
69
|
+
} */}
|
|
70
|
+
<LibIcon name='chevron-right' />
|
|
71
|
+
</View>
|
|
72
|
+
</Pressable>
|
|
73
|
+
</ScrollView>
|
|
74
|
+
<LibSlidingup ref={statusRef} onChangeShow={(s) => { if (!s) setCode(status) }} >
|
|
75
|
+
<View style={applyStyle({ backgroundColor: 'white', paddingHorizontal: 17, borderTopLeftRadius: 10, borderTopRightRadius: 10, maxHeight: LibStyle.height * 0.9 })}>
|
|
76
|
+
<View style={applyStyle({ flexDirection: 'row', alignItems: 'center', marginTop: 15 })}>
|
|
77
|
+
<Pressable onPress={() => { statusRef.current?.hide() }} style={applyStyle({ marginRight: 10 })} >
|
|
78
|
+
<LibIcon name='close' />
|
|
79
|
+
</Pressable>
|
|
80
|
+
<LibTextstyle textStyle='footnote' text={esp.lang("event/order", "Transaction_Status")} style={applyStyle({ fontWeight: 'bold', fontSize: 14, color: "#4E4E4E" })} />
|
|
81
|
+
</View>
|
|
82
|
+
<ScrollView>
|
|
83
|
+
<Pressable onPress={() => { setCode('0,1,2,3,4,5,6,7,10') }} style={applyStyle({ flexDirection: 'row', alignItems: 'center', borderBottomWidth: 1, borderBottomColor: '#e6e6e6', paddingVertical: 12 })}>
|
|
84
|
+
<LibTextstyle textStyle='footnote' text={esp.lang("event/order", "All_Transaction_Status")} style={applyStyle({ flex: 1, fontWeight: 'bold', fontSize: 10, color: "#4E4E4E" })} />
|
|
85
|
+
<LibIcon.Ionicons name={code == '0,1,2,3,4,5,6,7,10' ? 'radio-button-on' : 'radio-button-off'} color={code == '0,1,2,3,4,5,6,7,10' ? LibStyle.colorPrimary : '#4E4E4E'} />
|
|
86
|
+
</Pressable>
|
|
87
|
+
{
|
|
88
|
+
allStatus?.filter((item: any) => item.publish == 1).map((it: any, i: number) => {
|
|
89
|
+
return (
|
|
90
|
+
<Pressable key={i} onPress={() => setCode(it.code)} style={applyStyle({ flexDirection: 'row', alignItems: 'center', borderBottomWidth: 1, borderBottomColor: '#e6e6e6', paddingVertical: 12 })}>
|
|
91
|
+
<LibTextstyle textStyle='footnote' text={it.text} style={applyStyle({ flex: 1, fontWeight: 'bold', fontSize: 10, color: "#4E4E4E" })} />
|
|
92
|
+
<LibIcon.Ionicons name={it.code == code ? 'radio-button-on' : 'radio-button-off'} color={it.code == code ? LibStyle.colorPrimary : '#4E4E4E'} />
|
|
93
|
+
</Pressable>
|
|
94
|
+
)
|
|
95
|
+
})
|
|
96
|
+
}
|
|
97
|
+
</ScrollView>
|
|
98
|
+
<EventButton label={esp.lang("event/order", "apply")} style={applyStyle({ fontSize: 14, marginVertical: 15 })} backgroundColor={LibStyle.colorPrimary} onPress={() => { setStatus(code); statusRef.current?.hide() }} />
|
|
99
|
+
</View>
|
|
100
|
+
</LibSlidingup>
|
|
101
|
+
</View>
|
|
102
|
+
)
|
|
103
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
// withHooks
|
|
2
|
+
import { BigbangPayment_list } from 'esoftplay/cache/bigbang/payment_list/import';
|
|
3
|
+
import { EventHeader } from 'esoftplay/cache/event/header/import';
|
|
4
|
+
import { LibIcon } from 'esoftplay/cache/lib/icon/import';
|
|
5
|
+
import { LibStyle } from 'esoftplay/cache/lib/style/import';
|
|
6
|
+
import { LibUtils } from 'esoftplay/cache/lib/utils/import';
|
|
7
|
+
|
|
8
|
+
import React from 'react';
|
|
9
|
+
import { ScrollView, Text, TouchableOpacity, View } from 'react-native';
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
export interface EventToken_paymentArgs {
|
|
13
|
+
|
|
14
|
+
}
|
|
15
|
+
export interface EventToken_paymentProps {
|
|
16
|
+
|
|
17
|
+
}
|
|
18
|
+
export default function m(props: EventToken_paymentProps): any {
|
|
19
|
+
|
|
20
|
+
let items = [
|
|
21
|
+
{
|
|
22
|
+
id: 1,
|
|
23
|
+
title: 'ID Card + Token',
|
|
24
|
+
price: 20000,
|
|
25
|
+
qty: 1
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
id: 2,
|
|
29
|
+
title: 'Token',
|
|
30
|
+
price: 7500,
|
|
31
|
+
qty: 1
|
|
32
|
+
}
|
|
33
|
+
]
|
|
34
|
+
|
|
35
|
+
return (
|
|
36
|
+
<View style={{ flex: 1 }}>
|
|
37
|
+
<EventHeader title='Beli IDCard/Token' />
|
|
38
|
+
<ScrollView>
|
|
39
|
+
|
|
40
|
+
{
|
|
41
|
+
items?.map((item: any, i: number) => {
|
|
42
|
+
return (
|
|
43
|
+
<View key={i} style={{ ...LibStyle.elevation(3), backgroundColor: '#fff', margin: 15, paddingHorizontal: 10, borderRadius: 5, marginBottom: 0, flex: 1, flexDirection: 'row', alignContent: 'center', alignItems: 'center' }}>
|
|
44
|
+
<View style={{ flex: 2 }}>
|
|
45
|
+
<Text allowFontScaling={false}>{item?.title}</Text>
|
|
46
|
+
<Text allowFontScaling={false}>{LibUtils.money(item?.price)}</Text>
|
|
47
|
+
</View>
|
|
48
|
+
<View style={{ flex: 1 }}>
|
|
49
|
+
<View style={{ flexDirection: 'row', marginVertical: 10, alignContent: 'center', alignItems: 'center', alignSelf: 'center' }}>
|
|
50
|
+
<TouchableOpacity onPress={() => { /* min() */ }}>
|
|
51
|
+
<View style={{ width: 28, height: 28, borderRadius: 6, backgroundColor: "#ecf0f1", alignContent: 'center', alignItems: 'center' }}>
|
|
52
|
+
<LibIcon name="minus" color="#e74c3c" />
|
|
53
|
+
</View>
|
|
54
|
+
</TouchableOpacity>
|
|
55
|
+
<Text style={{ fontFamily: "Arial", fontSize: 20, fontWeight: "bold", fontStyle: "normal", letterSpacing: 0, color: "#9b9b9b", marginLeft: 15, marginRight: 15 }}>{item?.qty}</Text>
|
|
56
|
+
<TouchableOpacity onPress={() => { /* add(item?.quota, item?.quota_used) */ }}>
|
|
57
|
+
<View style={{ width: 28, height: 28, borderRadius: 6, backgroundColor: "#ecf0f1", alignContent: 'center', alignItems: 'center' }}>
|
|
58
|
+
<LibIcon name="plus" color="#16a085" />
|
|
59
|
+
</View>
|
|
60
|
+
</TouchableOpacity>
|
|
61
|
+
</View>
|
|
62
|
+
</View>
|
|
63
|
+
</View>
|
|
64
|
+
)
|
|
65
|
+
})
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
<BigbangPayment_list
|
|
69
|
+
priceTotal={100000}
|
|
70
|
+
order_type={1}
|
|
71
|
+
paymentId={2}
|
|
72
|
+
onPressPayment={() => {
|
|
73
|
+
|
|
74
|
+
}}
|
|
75
|
+
/>
|
|
76
|
+
</ScrollView>
|
|
77
|
+
</View>
|
|
78
|
+
)
|
|
79
|
+
}
|