esoftplay-event 0.0.0-c → 0.0.0-d
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/artist.tsx +4 -5
- package/event/artist_detail.tsx +17 -17
- package/event/artist_detail_multi.tsx +10 -10
- package/event/block.tsx +56 -0
- package/event/capture.tsx +39 -0
- package/event/config.ts +24 -3
- package/event/countdown.tsx +2 -2
- package/event/counter_cashier.tsx +2 -2
- package/event/counter_eo.tsx +6 -6
- package/event/counter_lm.tsx +6 -6
- package/event/counter_user_list.tsx +2 -2
- package/event/coupon_claim_reimburse_history.tsx +1 -2
- package/event/coupon_detail.tsx +2 -2
- package/event/detail.tsx +6 -5
- package/event/distribution_lock.ts +18 -0
- package/event/entrance.tsx +2 -2
- package/event/exchange_ticket.tsx +3 -3
- package/event/exit_log.tsx +2 -3
- package/event/header.tsx +2 -2
- package/event/header_home.tsx +3 -7
- package/event/htmltext.tsx +61 -0
- package/event/index.tsx +39 -7
- package/event/item.tsx +3 -4
- package/event/loading_page.tsx +7 -7
- package/event/log.tsx +7 -9
- package/event/order_detail.tsx +9 -9
- package/event/order_detail_payment.tsx +6 -6
- package/event/order_detail_upgrade.tsx +1 -2
- package/event/order_detail_upgrade_button.tsx +1 -2
- package/event/order_detail_waiting.tsx +10 -8
- package/event/order_item.tsx +2 -2
- package/event/order_share_to.tsx +9 -9
- package/event/order_waiting.tsx +1 -2
- package/event/popup.tsx +82 -0
- package/event/queue_pricing.tsx +2 -3
- package/event/seat.tsx +4 -3
- package/event/seat_map.tsx +20 -20
- package/event/seat_map_test.tsx +3 -3
- package/event/secure_page.tsx +33 -0
- package/event/share.ts +20 -0
- package/event/slidingup.tsx +37 -0
- package/event/tap.tsx +30 -0
- package/event/ticket_list.tsx +10 -10
- package/event/ticket_list2.tsx +5 -6
- package/event/tms_add.tsx +3 -3
- package/event/tms_check_code.tsx +3 -3
- package/event/tms_check_ticket.tsx +3 -3
- package/event/tms_in.tsx +2 -2
- package/event/tms_log.tsx +7 -8
- package/event/tms_out_log.tsx +2 -3
- package/id.json +13 -0
- package/package.json +1 -1
- package/publisher.js +1 -1
package/event/artist.tsx
CHANGED
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
import { applyStyle } from 'esoftplay';
|
|
4
4
|
import { EventCountdownProperty } from 'esoftplay/cache/event/countdown/import';
|
|
5
|
-
import { EventFirebase_socketProperty } from 'esoftplay/cache/event/firebase_socket/import';
|
|
5
|
+
import { EventFirebase_socket, EventFirebase_socketProperty } from 'esoftplay/cache/event/firebase_socket/import';
|
|
6
6
|
import { EventHeader } from 'esoftplay/cache/event/header/import';
|
|
7
|
+
import { EventIndexProperty } from 'esoftplay/cache/event/index/import';
|
|
7
8
|
import { EventMessage } from 'esoftplay/cache/event/message/import';
|
|
8
9
|
import { LibCurl } from 'esoftplay/cache/lib/curl/import';
|
|
9
10
|
import { LibList } from 'esoftplay/cache/lib/list/import';
|
|
@@ -13,13 +14,11 @@ import { LibPicture } from 'esoftplay/cache/lib/picture/import';
|
|
|
13
14
|
import { LibStyle } from 'esoftplay/cache/lib/style/import';
|
|
14
15
|
import { LibToastProperty } from 'esoftplay/cache/lib/toast/import';
|
|
15
16
|
import { LibUtils } from 'esoftplay/cache/lib/utils/import';
|
|
16
|
-
import { UserProfileProperty } from 'esoftplay/cache/user/profile/import';
|
|
17
17
|
import esp from 'esoftplay/esp';
|
|
18
18
|
import moment from 'esoftplay/moment';
|
|
19
19
|
import useSafeState from 'esoftplay/state';
|
|
20
20
|
import React, { useEffect } from 'react';
|
|
21
21
|
import { Text, TouchableOpacity, View } from 'react-native';
|
|
22
|
-
import useFirebaseSocket from '../lib/firebase_socket';
|
|
23
22
|
|
|
24
23
|
|
|
25
24
|
moment().locale('id')
|
|
@@ -33,7 +32,7 @@ export default function m(props: BigbangArtistProps): any {
|
|
|
33
32
|
const [result, setResult] = useSafeState<any>()
|
|
34
33
|
const [resultEvent, setResultEvent] = useSafeState<any>()
|
|
35
34
|
const [error, setError] = useSafeState<any>('')
|
|
36
|
-
const { isInPricingQueueConfig } =
|
|
35
|
+
const { isInPricingQueueConfig } = EventFirebase_socket()
|
|
37
36
|
|
|
38
37
|
const { title, has_addition } = LibNavigation.getArgsAll(props)
|
|
39
38
|
const url = LibNavigation.getArgs(props, 'url', 'event_artist')
|
|
@@ -89,7 +88,7 @@ export default function m(props: BigbangArtistProps): any {
|
|
|
89
88
|
if (isNotAvailable) {
|
|
90
89
|
LibToastProperty.show(esp.lang("event/artist", "ticket_not_available"))
|
|
91
90
|
} else {
|
|
92
|
-
|
|
91
|
+
EventIndexProperty.isLogin(() => {
|
|
93
92
|
let newItem = {
|
|
94
93
|
has_addition: has_addition,
|
|
95
94
|
...item,
|
package/event/artist_detail.tsx
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
// withHooks
|
|
2
2
|
|
|
3
3
|
import { applyStyle } from 'esoftplay';
|
|
4
|
-
import { BboConfigProperty } from 'esoftplay/cache/bbo/config/import';
|
|
5
4
|
import { EventButton } from 'esoftplay/cache/event/button/import';
|
|
5
|
+
import { EventConfigProperty } from 'esoftplay/cache/event/config/import';
|
|
6
6
|
import { EventCountdownProperty } from 'esoftplay/cache/event/countdown/import';
|
|
7
7
|
import { EventHeader } from 'esoftplay/cache/event/header/import';
|
|
8
|
+
import { EventHtmltext } from 'esoftplay/cache/event/htmltext/import';
|
|
9
|
+
import { EventIndexProperty } from 'esoftplay/cache/event/index/import';
|
|
10
|
+
import { EventShare } from 'esoftplay/cache/event/share/import';
|
|
8
11
|
import { LibCarrousel } from 'esoftplay/cache/lib/carrousel/import';
|
|
9
12
|
import { LibCurl } from 'esoftplay/cache/lib/curl/import';
|
|
10
|
-
import { LibHtmltext } from 'esoftplay/cache/lib/htmltext/import';
|
|
11
13
|
import { LibIcon } from 'esoftplay/cache/lib/icon/import';
|
|
12
14
|
import { LibLoading } from 'esoftplay/cache/lib/loading/import';
|
|
13
15
|
import { LibNavigation } from 'esoftplay/cache/lib/navigation/import';
|
|
14
16
|
import { LibObject } from 'esoftplay/cache/lib/object/import';
|
|
15
17
|
import { LibPicture } from 'esoftplay/cache/lib/picture/import';
|
|
16
|
-
import { LibShare } from 'esoftplay/cache/lib/share/import';
|
|
17
18
|
import { LibSlidingup } from 'esoftplay/cache/lib/slidingup/import';
|
|
18
19
|
import { LibStyle } from 'esoftplay/cache/lib/style/import';
|
|
19
20
|
import { LibToastProperty } from 'esoftplay/cache/lib/toast/import';
|
|
20
21
|
import { LibUtils } from 'esoftplay/cache/lib/utils/import';
|
|
21
22
|
import { LibVideoProperty } from 'esoftplay/cache/lib/video/import';
|
|
22
23
|
import { LibWebview } from 'esoftplay/cache/lib/webview/import';
|
|
23
|
-
import { UserProfileProperty } from 'esoftplay/cache/user/profile/import';
|
|
24
24
|
import esp from 'esoftplay/esp';
|
|
25
25
|
import moment from 'esoftplay/moment';
|
|
26
26
|
import useSafeState from 'esoftplay/state';
|
|
@@ -39,7 +39,7 @@ export default function m(props: EventArtist_detailProps): any {
|
|
|
39
39
|
const { data, subscribed } = LibNavigation.getArgsAll(props)
|
|
40
40
|
const startBooking = moment(data?.start_booking).serverFormat('YYYY-MM-DD HH:mm:ss')
|
|
41
41
|
const date = moment().localeFormat('YYYY-MM-DD HH:mm:ss')
|
|
42
|
-
const [
|
|
42
|
+
const [eventConfig] = EventConfigProperty.state().useState()
|
|
43
43
|
|
|
44
44
|
const [selectedTicket, setSelectedTicket, getSelectedTicket] = useSafeState<any>()
|
|
45
45
|
const [priceList, setPriceList] = useSafeState<any>()
|
|
@@ -47,7 +47,7 @@ export default function m(props: EventArtist_detailProps): any {
|
|
|
47
47
|
|
|
48
48
|
useEffect(() => {
|
|
49
49
|
loadDataPrice()
|
|
50
|
-
|
|
50
|
+
EventConfigProperty.curlConfig('v2/config_order_type')
|
|
51
51
|
return () => { EventCountdownProperty.releaseQueue.trigger() }
|
|
52
52
|
}, [])
|
|
53
53
|
|
|
@@ -129,7 +129,7 @@ export default function m(props: EventArtist_detailProps): any {
|
|
|
129
129
|
if (selectedTicket?.use_seat == 1) {
|
|
130
130
|
if (selectedTicket?.config && selectedTicket?.config?.seat_autopick == 1) {
|
|
131
131
|
LibNavigation.navigate('payment/ticket', {
|
|
132
|
-
order_type:
|
|
132
|
+
order_type: eventConfig?.order_type?.ticket,
|
|
133
133
|
tax: getSelectedTicket()?.tax || data?.tax,
|
|
134
134
|
dataBookingEvent: { ...dataPost, qty: qty },
|
|
135
135
|
subscribed: subscribed
|
|
@@ -149,7 +149,7 @@ export default function m(props: EventArtist_detailProps): any {
|
|
|
149
149
|
dataPost.addition = additions
|
|
150
150
|
}
|
|
151
151
|
LibNavigation.navigate('payment/ticket', {
|
|
152
|
-
order_type:
|
|
152
|
+
order_type: eventConfig?.order_type?.ticket,
|
|
153
153
|
tax: getSelectedTicket()?.tax || data?.tax,
|
|
154
154
|
dataBookingEvent: dataPost,
|
|
155
155
|
fee_platform: {
|
|
@@ -161,7 +161,7 @@ export default function m(props: EventArtist_detailProps): any {
|
|
|
161
161
|
})
|
|
162
162
|
} else {
|
|
163
163
|
LibNavigation.navigate('payment/ticket', {
|
|
164
|
-
order_type:
|
|
164
|
+
order_type: eventConfig?.order_type?.ticket,
|
|
165
165
|
tax: getSelectedTicket()?.tax || data?.tax,
|
|
166
166
|
dataBookingEvent: dataPost,
|
|
167
167
|
fee_platform: {
|
|
@@ -180,7 +180,7 @@ export default function m(props: EventArtist_detailProps): any {
|
|
|
180
180
|
dataPost.addition = additions
|
|
181
181
|
}
|
|
182
182
|
LibNavigation.navigate('payment/ticket', {
|
|
183
|
-
order_type:
|
|
183
|
+
order_type: eventConfig?.order_type?.ticket,
|
|
184
184
|
tax: getSelectedTicket()?.tax || data?.tax,
|
|
185
185
|
dataBookingEvent: dataPost,
|
|
186
186
|
fee_platform: {
|
|
@@ -192,7 +192,7 @@ export default function m(props: EventArtist_detailProps): any {
|
|
|
192
192
|
})
|
|
193
193
|
} else {
|
|
194
194
|
LibNavigation.navigate('payment/ticket', {
|
|
195
|
-
order_type:
|
|
195
|
+
order_type: eventConfig?.order_type?.ticket,
|
|
196
196
|
tax: getSelectedTicket()?.tax || data?.tax,
|
|
197
197
|
dataBookingEvent: dataPost,
|
|
198
198
|
fee_platform: {
|
|
@@ -226,17 +226,17 @@ export default function m(props: EventArtist_detailProps): any {
|
|
|
226
226
|
{
|
|
227
227
|
icon: 'icons/ic_facebook.png',
|
|
228
228
|
title: 'Facebook',
|
|
229
|
-
onPress: () => {
|
|
229
|
+
onPress: () => { EventShare.facebook(data?.url) }
|
|
230
230
|
},
|
|
231
231
|
{
|
|
232
232
|
icon: 'icons/ic_whatsapp.png',
|
|
233
233
|
title: 'Whatsapp',
|
|
234
|
-
onPress: () => {
|
|
234
|
+
onPress: () => { EventShare.whatsapp(data?.url) }
|
|
235
235
|
},
|
|
236
236
|
{
|
|
237
237
|
icon: 'icons/ic_twitter.png',
|
|
238
238
|
title: 'Twitter',
|
|
239
|
-
onPress: () => {
|
|
239
|
+
onPress: () => { EventShare.twitter(data?.url) }
|
|
240
240
|
},
|
|
241
241
|
{
|
|
242
242
|
icon: 'icons/ic_copy.png',
|
|
@@ -418,7 +418,7 @@ export default function m(props: EventArtist_detailProps): any {
|
|
|
418
418
|
{
|
|
419
419
|
data?.book_available == 1 ?
|
|
420
420
|
<EventButton label={esp.lang("event/artist_detail", "buy_ticket")} onPress={() => {
|
|
421
|
-
|
|
421
|
+
EventIndexProperty.isLogin(() => {
|
|
422
422
|
showSchedule.current?.show()
|
|
423
423
|
})
|
|
424
424
|
}} style={applyStyle({ backgroundColor: LibStyle.colorGreen })} />
|
|
@@ -446,7 +446,7 @@ export default function m(props: EventArtist_detailProps): any {
|
|
|
446
446
|
}} key={i} style={{ overflow: 'hidden', margin: 15, marginBottom: 5, backgroundColor: '#fff', borderRadius: 10, ...LibStyle.elevation(2), borderWidth: 1, borderColor: selTic ? LibStyle.colorBlue : LibStyle.colorBgGrey }}>
|
|
447
447
|
<View style={{ padding: 10, backgroundColor: '#f1f2f3', borderTopLeftRadius: 10, borderTopRightRadius: 10 }}>
|
|
448
448
|
<View style={{ alignContent: 'center', alignItems: 'center', flexDirection: 'row', justifyContent: 'space-between', }}>
|
|
449
|
-
<
|
|
449
|
+
<EventHtmltext allowFontScaling={false} style={{ opacity: textOpacity, fontWeight: 'bold' }}>{item.type}</EventHtmltext>
|
|
450
450
|
{
|
|
451
451
|
item.qty_min > 1 &&
|
|
452
452
|
<Text style={{ color: LibStyle.colorRed, fontSize: 10, fontWeight: 'normal' }}> {"(" + esp.lang("event/ticket_list", "min_order") + LibUtils.number(item.qty_min) + ")"}</Text>
|
|
@@ -501,7 +501,7 @@ export default function m(props: EventArtist_detailProps): any {
|
|
|
501
501
|
</View>
|
|
502
502
|
:
|
|
503
503
|
<EventButton label={esp.lang("event/artist_detail", "buy_ticket")} onPress={() => {
|
|
504
|
-
|
|
504
|
+
EventIndexProperty.isLogin(() => {
|
|
505
505
|
proceedToPayment()
|
|
506
506
|
})
|
|
507
507
|
}} style={{ backgroundColor: LibStyle.colorGreen, marginTop: 2, marginHorizontal: 15 }} />
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
// withHooks
|
|
2
2
|
|
|
3
3
|
import { applyStyle } from 'esoftplay';
|
|
4
|
-
import { BboConfigProperty } from 'esoftplay/cache/bbo/config/import';
|
|
5
4
|
import { EventButton } from 'esoftplay/cache/event/button/import';
|
|
5
|
+
import { EventConfigProperty } from 'esoftplay/cache/event/config/import';
|
|
6
6
|
import { EventCountdownProperty } from 'esoftplay/cache/event/countdown/import';
|
|
7
7
|
import { EventHeader } from 'esoftplay/cache/event/header/import';
|
|
8
|
+
import { EventIndexProperty } from 'esoftplay/cache/event/index/import';
|
|
9
|
+
import { EventShare } from 'esoftplay/cache/event/share/import';
|
|
8
10
|
import { LibCarrousel } from 'esoftplay/cache/lib/carrousel/import';
|
|
9
11
|
import { LibCurl } from 'esoftplay/cache/lib/curl/import';
|
|
10
12
|
import { LibIcon } from 'esoftplay/cache/lib/icon/import';
|
|
@@ -12,7 +14,6 @@ import { LibLoading } from 'esoftplay/cache/lib/loading/import';
|
|
|
12
14
|
import { LibNavigation } from 'esoftplay/cache/lib/navigation/import';
|
|
13
15
|
import { LibObject } from 'esoftplay/cache/lib/object/import';
|
|
14
16
|
import { LibPicture } from 'esoftplay/cache/lib/picture/import';
|
|
15
|
-
import { LibShare } from 'esoftplay/cache/lib/share/import';
|
|
16
17
|
import { LibSlidingup } from 'esoftplay/cache/lib/slidingup/import';
|
|
17
18
|
import { LibStyle } from 'esoftplay/cache/lib/style/import';
|
|
18
19
|
import { LibToastProperty } from 'esoftplay/cache/lib/toast/import';
|
|
@@ -20,7 +21,6 @@ import { LibUtils } from 'esoftplay/cache/lib/utils/import';
|
|
|
20
21
|
import { LibVideoProperty } from 'esoftplay/cache/lib/video/import';
|
|
21
22
|
import { LibWebview } from 'esoftplay/cache/lib/webview/import';
|
|
22
23
|
import { UseTasks } from 'esoftplay/cache/use/tasks/import';
|
|
23
|
-
import { UserProfileProperty } from 'esoftplay/cache/user/profile/import';
|
|
24
24
|
import esp from 'esoftplay/esp';
|
|
25
25
|
import useLazyState from 'esoftplay/lazy';
|
|
26
26
|
import moment from 'esoftplay/moment';
|
|
@@ -86,7 +86,7 @@ export default function m(props: EventArtist_detail_multiProps): any {
|
|
|
86
86
|
|
|
87
87
|
|
|
88
88
|
useEffect(() => {
|
|
89
|
-
|
|
89
|
+
EventConfigProperty.curlConfig('v2/config_order_type')
|
|
90
90
|
loadDataPrice()
|
|
91
91
|
return () => { EventCountdownProperty.releaseQueue.trigger() }
|
|
92
92
|
}, [])
|
|
@@ -178,7 +178,7 @@ export default function m(props: EventArtist_detail_multiProps): any {
|
|
|
178
178
|
dataEvent.addition = dataAddition
|
|
179
179
|
}
|
|
180
180
|
LibNavigation.navigate('payment/ticket_multi', {
|
|
181
|
-
order_type:
|
|
181
|
+
order_type: EventConfigProperty?.state()?.get()?.order_type?.ticket,
|
|
182
182
|
fee_platform: {
|
|
183
183
|
fee_platform_amount: data?.fee_platform_amount,
|
|
184
184
|
fee_platform_type: data?.fee_platform_type,
|
|
@@ -225,17 +225,17 @@ export default function m(props: EventArtist_detail_multiProps): any {
|
|
|
225
225
|
{
|
|
226
226
|
icon: 'icons/ic_facebook.png',
|
|
227
227
|
title: 'Facebook',
|
|
228
|
-
onPress: () => {
|
|
228
|
+
onPress: () => { EventShare.facebook(data?.url) }
|
|
229
229
|
},
|
|
230
230
|
{
|
|
231
231
|
icon: 'icons/ic_whatsapp.png',
|
|
232
232
|
title: 'Whatsapp',
|
|
233
|
-
onPress: () => {
|
|
233
|
+
onPress: () => { EventShare.whatsapp(data?.url) }
|
|
234
234
|
},
|
|
235
235
|
{
|
|
236
236
|
icon: 'icons/ic_twitter.png',
|
|
237
237
|
title: 'Twitter',
|
|
238
|
-
onPress: () => {
|
|
238
|
+
onPress: () => { EventShare.twitter(data?.url) }
|
|
239
239
|
},
|
|
240
240
|
{
|
|
241
241
|
icon: 'icons/ic_copy.png',
|
|
@@ -452,7 +452,7 @@ export default function m(props: EventArtist_detail_multiProps): any {
|
|
|
452
452
|
{
|
|
453
453
|
data?.book_available == 1 ?
|
|
454
454
|
<EventButton label={esp.lang("event/artist_detail", "buy_ticket")} onPress={() => {
|
|
455
|
-
|
|
455
|
+
EventIndexProperty.isLogin(() => {
|
|
456
456
|
showSchedule.current?.show()
|
|
457
457
|
})
|
|
458
458
|
}} style={applyStyle({ backgroundColor: LibStyle.colorGreen })} />
|
|
@@ -528,7 +528,7 @@ export default function m(props: EventArtist_detail_multiProps): any {
|
|
|
528
528
|
</View>
|
|
529
529
|
:
|
|
530
530
|
<EventButton label={esp.lang("event/artist_detail", "buy_ticket")} onPress={() => {
|
|
531
|
-
|
|
531
|
+
EventIndexProperty.isLogin(() => {
|
|
532
532
|
proceedToPayment()
|
|
533
533
|
})
|
|
534
534
|
}} style={{ backgroundColor: LibStyle.colorGreen, marginTop: 2, marginHorizontal: 15 }} />
|
package/event/block.tsx
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
// noPage
|
|
2
|
+
// withHooks
|
|
3
|
+
// import Storage from '@react-native-async-storage/async-storage';
|
|
4
|
+
|
|
5
|
+
import { LibCurl } from 'esoftplay/cache/lib/curl/import';
|
|
6
|
+
import { LibObject } from 'esoftplay/cache/lib/object/import';
|
|
7
|
+
import useGlobalState from 'esoftplay/global';
|
|
8
|
+
import FastStorage from 'esoftplay/mmkv';
|
|
9
|
+
import useSafeState from 'esoftplay/state';
|
|
10
|
+
|
|
11
|
+
import React, { useEffect } from 'react';
|
|
12
|
+
import { View } from 'react-native';
|
|
13
|
+
|
|
14
|
+
export interface EventBlockArgs {
|
|
15
|
+
|
|
16
|
+
}
|
|
17
|
+
export interface EventBlockProps {
|
|
18
|
+
cache?: boolean,
|
|
19
|
+
url: string,
|
|
20
|
+
LoadingView?: any,
|
|
21
|
+
ErrorView?: (error: string) => any,
|
|
22
|
+
render: (data: any, setData?: (d: any) => void) => any
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
FastStorage.removeItem("event/block")
|
|
26
|
+
const blockState = useGlobalState({}, { persistKey: 'event/block2', inFastStorage: true, loadOnInit: true })
|
|
27
|
+
|
|
28
|
+
export default function m(props: EventBlockProps): any {
|
|
29
|
+
const [data, setData] = useSafeState(blockState.get('block-' + props.url))
|
|
30
|
+
const [error, setError] = useSafeState('')
|
|
31
|
+
|
|
32
|
+
useEffect(() => {
|
|
33
|
+
new LibCurl(props.url, null, (res, msg) => {
|
|
34
|
+
setData(res)
|
|
35
|
+
if (props.cache && isValidJSON(res)) {
|
|
36
|
+
blockState.set(LibObject.set(blockState.get(), res)('block-' + props.url))
|
|
37
|
+
}
|
|
38
|
+
}, (msg: any) => setError(msg?.message))
|
|
39
|
+
}, [props.url])
|
|
40
|
+
|
|
41
|
+
if (error != '') return props.ErrorView ? props.ErrorView(error) : null
|
|
42
|
+
if (!data) return props.LoadingView || <View style={styleId_ZyMPQq} />
|
|
43
|
+
return props.render(data, setData)
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
function isValidJSON(jsonObject: any) {
|
|
48
|
+
try {
|
|
49
|
+
JSON.parse(JSON.stringify(jsonObject));
|
|
50
|
+
return true;
|
|
51
|
+
} catch (e) {
|
|
52
|
+
return false;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
const styleId_ZyMPQq: any = { margin: 4, borderRadius: 2, flex: 1, padding: 20, backgroundColor: '#f1f2f3' }
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
// noPage
|
|
2
|
+
import { LibToastProperty } from 'esoftplay/cache/lib/toast/import';
|
|
3
|
+
import esp from 'esoftplay/esp';
|
|
4
|
+
|
|
5
|
+
import * as FileSystem from 'expo-file-system';
|
|
6
|
+
import * as MediaLibrary from 'expo-media-library';
|
|
7
|
+
import { Platform } from 'react-native';
|
|
8
|
+
import { captureRef } from "react-native-view-shot";
|
|
9
|
+
|
|
10
|
+
export default class m {
|
|
11
|
+
static capture(ref: any, name: string): void {
|
|
12
|
+
MediaLibrary.requestPermissionsAsync().then((r) => {
|
|
13
|
+
if (r.granted) {
|
|
14
|
+
captureRef(ref, {
|
|
15
|
+
format: "jpg",
|
|
16
|
+
quality: 0.8
|
|
17
|
+
}).then(
|
|
18
|
+
(images: string) => {
|
|
19
|
+
const uriArray = images.split("/");
|
|
20
|
+
const nameToChange = uriArray[uriArray.length - 1];
|
|
21
|
+
const renamedURI = images.replace(nameToChange, name.replace(/\s/g, '_') + ".jpg");
|
|
22
|
+
if (Platform.OS == 'ios') {
|
|
23
|
+
MediaLibrary.saveToLibraryAsync(images)
|
|
24
|
+
LibToastProperty.show(esp.lang("lib/capture", "saved_to_gallery"))
|
|
25
|
+
return
|
|
26
|
+
}
|
|
27
|
+
FileSystem.copyAsync({ from: images, to: renamedURI }).then(() => {
|
|
28
|
+
MediaLibrary.saveToLibraryAsync(renamedURI)
|
|
29
|
+
LibToastProperty.show(esp.lang("lib/capture", "saved_to_dcim"))
|
|
30
|
+
}).catch((r) => {
|
|
31
|
+
|
|
32
|
+
})
|
|
33
|
+
},
|
|
34
|
+
error => LibToastProperty.show(error)
|
|
35
|
+
)
|
|
36
|
+
}
|
|
37
|
+
})
|
|
38
|
+
}
|
|
39
|
+
}
|
package/event/config.ts
CHANGED
|
@@ -1,4 +1,25 @@
|
|
|
1
|
-
//
|
|
2
|
-
|
|
1
|
+
// useLibs
|
|
2
|
+
// noPage
|
|
3
|
+
import { LibCurl } from "esoftplay/cache/lib/curl/import"
|
|
4
|
+
import { LibObject } from "esoftplay/cache/lib/object/import"
|
|
5
|
+
import useGlobalState, { useGlobalReturn } from "esoftplay/global"
|
|
3
6
|
|
|
4
|
-
|
|
7
|
+
const config = useGlobalState({}, { persistKey: 'bbo-config', loadOnInit: true, inFastStorage: true })
|
|
8
|
+
|
|
9
|
+
export function state(): useGlobalReturn<any> {
|
|
10
|
+
return config
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export default config
|
|
14
|
+
|
|
15
|
+
export function addConfig(name: string, data: any) {
|
|
16
|
+
config.set(LibObject.set(config.get(), data)(name))
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export function curlConfig(url: string) {
|
|
20
|
+
new LibCurl(url, null, (res, msg) => {
|
|
21
|
+
addConfig(Object.keys(res)[0], res[Object.keys(res)[0]])
|
|
22
|
+
}, err => {
|
|
23
|
+
|
|
24
|
+
})
|
|
25
|
+
}
|
package/event/countdown.tsx
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// withHooks
|
|
2
2
|
|
|
3
3
|
import { EventCountdown_base } from 'esoftplay/cache/event/countdown_base/import';
|
|
4
|
+
import { EventFirebase_socket } from 'esoftplay/cache/event/firebase_socket/import';
|
|
4
5
|
import { EventQueue_pricingProperty } from 'esoftplay/cache/event/queue_pricing/import';
|
|
5
6
|
import { LibNavigation } from 'esoftplay/cache/lib/navigation/import';
|
|
6
7
|
import { LibStyle } from 'esoftplay/cache/lib/style/import';
|
|
@@ -10,7 +11,6 @@ import useGlobalState from 'esoftplay/global';
|
|
|
10
11
|
import useGlobalSubscriber from 'esoftplay/subscribe';
|
|
11
12
|
import React, { useEffect } from 'react';
|
|
12
13
|
import Animated, { useAnimatedStyle, useSharedValue, withRepeat, withTiming } from 'react-native-reanimated';
|
|
13
|
-
import useFirebaseSocket from '../lib/firebase_socket';
|
|
14
14
|
|
|
15
15
|
export interface EventCountdownArgs {
|
|
16
16
|
|
|
@@ -26,7 +26,7 @@ export const releaseQueue = useGlobalSubscriber()
|
|
|
26
26
|
export default function m(props: EventCountdownProps): any {
|
|
27
27
|
const [timer] = countdownTime.useState()
|
|
28
28
|
const routes = UserRoutes.state().useSelector((x) => x?.routes)
|
|
29
|
-
const { doneQueue, isInPricingQueueConfig } =
|
|
29
|
+
const { doneQueue, isInPricingQueueConfig } = EventFirebase_socket();
|
|
30
30
|
|
|
31
31
|
const animatedValue = useSharedValue(0)
|
|
32
32
|
|
|
@@ -10,13 +10,13 @@ import { LibIcon } from 'esoftplay/cache/lib/icon/import';
|
|
|
10
10
|
import { LibLoading } from 'esoftplay/cache/lib/loading/import';
|
|
11
11
|
import { LibNavigation } from 'esoftplay/cache/lib/navigation/import';
|
|
12
12
|
import { LibStyle } from 'esoftplay/cache/lib/style/import';
|
|
13
|
-
import { UserPopup } from 'esoftplay/cache/user/popup/import';
|
|
14
13
|
import esp from 'esoftplay/esp';
|
|
15
14
|
import useSafeState from 'esoftplay/state';
|
|
16
15
|
|
|
17
16
|
import { EventButton } from 'esoftplay/cache/event/button/import';
|
|
18
17
|
import { EventHeader } from 'esoftplay/cache/event/header/import';
|
|
19
18
|
import { EventInput_rectangle } from 'esoftplay/cache/event/input_rectangle/import';
|
|
19
|
+
import { EventPopup } from 'esoftplay/cache/event/popup/import';
|
|
20
20
|
import { LibSlidingup } from 'esoftplay/cache/lib/slidingup/import';
|
|
21
21
|
import React, { useEffect, useRef } from 'react';
|
|
22
22
|
import { Pressable, RefreshControl, ScrollView, Text, View } from 'react-native';
|
|
@@ -166,7 +166,7 @@ export default function m(props: EventCounter_cashierProps): any {
|
|
|
166
166
|
<LibSlidingup ref={dialogUser}>
|
|
167
167
|
<View style={{ backgroundColor: '#fff', borderTopLeftRadius: 20, borderTopRightRadius: 20 }}>
|
|
168
168
|
<View style={{ height: 4, width: 32, borderRadius: 2, backgroundColor: "#C6C6C6", marginTop: 10, marginBottom: 10, alignSelf: 'center' }} />
|
|
169
|
-
<
|
|
169
|
+
<EventPopup email={email.trim()} redirect={() => {
|
|
170
170
|
addLM()
|
|
171
171
|
}} cancel={() => {
|
|
172
172
|
dialogUser.current?.hide()
|
package/event/counter_eo.tsx
CHANGED
|
@@ -13,16 +13,16 @@ import { LibNavigation } from 'esoftplay/cache/lib/navigation/import';
|
|
|
13
13
|
import { LibStyle } from 'esoftplay/cache/lib/style/import';
|
|
14
14
|
import { LibToastProperty } from 'esoftplay/cache/lib/toast/import';
|
|
15
15
|
import { LibUtils } from 'esoftplay/cache/lib/utils/import';
|
|
16
|
-
import { UserPopup } from 'esoftplay/cache/user/popup/import';
|
|
17
16
|
import esp from 'esoftplay/esp';
|
|
18
17
|
import useSafeState from 'esoftplay/state';
|
|
19
18
|
|
|
20
|
-
import { BboConfigProperty } from 'esoftplay/cache/bbo/config/import';
|
|
21
19
|
import { EventButton } from 'esoftplay/cache/event/button/import';
|
|
20
|
+
import { EventConfigProperty } from 'esoftplay/cache/event/config/import';
|
|
22
21
|
import { EventHeader } from 'esoftplay/cache/event/header/import';
|
|
23
22
|
import { EventInput_rectangle } from 'esoftplay/cache/event/input_rectangle/import';
|
|
24
23
|
import { EventLabel_input } from 'esoftplay/cache/event/label_input/import';
|
|
25
24
|
import { EventMessage } from 'esoftplay/cache/event/message/import';
|
|
25
|
+
import { EventPopup } from 'esoftplay/cache/event/popup/import';
|
|
26
26
|
import { LibSlidingup } from 'esoftplay/cache/lib/slidingup/import';
|
|
27
27
|
import React, { useEffect, useRef } from 'react';
|
|
28
28
|
import { Pressable, RefreshControl, ScrollView, Text, TouchableOpacity, View } from 'react-native';
|
|
@@ -54,7 +54,7 @@ export default function m(props: EventCounter_eoProps): any {
|
|
|
54
54
|
const dialogAdd = useRef<LibSlidingup>(null)
|
|
55
55
|
const dialogUser = useRef<LibSlidingup>(null)
|
|
56
56
|
const dialogListLM = useRef<LibSlidingup>(null)
|
|
57
|
-
const [
|
|
57
|
+
const [eventConfig] = EventConfigProperty.state().useState()
|
|
58
58
|
|
|
59
59
|
const [email, setEmail] = useSafeState<string>('')
|
|
60
60
|
// result
|
|
@@ -69,7 +69,7 @@ export default function m(props: EventCounter_eoProps): any {
|
|
|
69
69
|
});
|
|
70
70
|
|
|
71
71
|
useEffect(() => {
|
|
72
|
-
|
|
72
|
+
EventConfigProperty.curlConfig('v2/config_event')
|
|
73
73
|
loadData()
|
|
74
74
|
}, [])
|
|
75
75
|
|
|
@@ -368,7 +368,7 @@ export default function m(props: EventCounter_eoProps): any {
|
|
|
368
368
|
<View style={{ backgroundColor: '#fff', padding: 10, paddingLeft: 0, borderRadius: 15, marginBottom: 0, flexDirection: 'row', flexWrap: 'wrap' }}>
|
|
369
369
|
|
|
370
370
|
{
|
|
371
|
-
|
|
371
|
+
eventConfig?.event?.cashier_type?.map(renderTypeCashier)
|
|
372
372
|
}
|
|
373
373
|
|
|
374
374
|
</View>
|
|
@@ -420,7 +420,7 @@ export default function m(props: EventCounter_eoProps): any {
|
|
|
420
420
|
<LibSlidingup ref={dialogUser}>
|
|
421
421
|
<View style={{ backgroundColor: '#fff', borderTopLeftRadius: 20, borderTopRightRadius: 20 }}>
|
|
422
422
|
<View style={{ height: 4, width: 32, borderRadius: 2, backgroundColor: "#C6C6C6", marginTop: 10, marginBottom: 10, alignSelf: 'center' }} />
|
|
423
|
-
<
|
|
423
|
+
<EventPopup email={email.trim()} redirect={() => {
|
|
424
424
|
if (selectedTypeAdd?.id == 2) {
|
|
425
425
|
addCashier()
|
|
426
426
|
} else {
|
package/event/counter_lm.tsx
CHANGED
|
@@ -14,16 +14,16 @@ import { LibNavigation } from 'esoftplay/cache/lib/navigation/import';
|
|
|
14
14
|
import { LibStyle } from 'esoftplay/cache/lib/style/import';
|
|
15
15
|
import { LibToastProperty } from 'esoftplay/cache/lib/toast/import';
|
|
16
16
|
import { LibUtils } from 'esoftplay/cache/lib/utils/import';
|
|
17
|
-
import { UserPopup } from 'esoftplay/cache/user/popup/import';
|
|
18
17
|
import esp from 'esoftplay/esp';
|
|
19
18
|
import useSafeState from 'esoftplay/state';
|
|
20
19
|
|
|
21
|
-
import { BboConfigProperty } from 'esoftplay/cache/bbo/config/import';
|
|
22
20
|
import { EventButton } from 'esoftplay/cache/event/button/import';
|
|
21
|
+
import { EventConfigProperty } from 'esoftplay/cache/event/config/import';
|
|
23
22
|
import { EventHeader } from 'esoftplay/cache/event/header/import';
|
|
24
23
|
import { EventInput_rectangle } from 'esoftplay/cache/event/input_rectangle/import';
|
|
25
24
|
import { EventLabel_input } from 'esoftplay/cache/event/label_input/import';
|
|
26
25
|
import { EventMessage } from 'esoftplay/cache/event/message/import';
|
|
26
|
+
import { EventPopup } from 'esoftplay/cache/event/popup/import';
|
|
27
27
|
import { LibSlidingup } from 'esoftplay/cache/lib/slidingup/import';
|
|
28
28
|
import React, { useEffect, useRef } from 'react';
|
|
29
29
|
import { Pressable, RefreshControl, ScrollView, Text, TouchableOpacity, View } from 'react-native';
|
|
@@ -39,7 +39,7 @@ export default function m(props: EventCounter_lmProps): any {
|
|
|
39
39
|
const { is_manager } = LibNavigation.getArgsAll(props)
|
|
40
40
|
const dialogAdd = useRef<LibSlidingup>(null)
|
|
41
41
|
const dialogUser = useRef<LibSlidingup>(null)
|
|
42
|
-
const [
|
|
42
|
+
const [eventConfig] = EventConfigProperty.state().useState()
|
|
43
43
|
|
|
44
44
|
const [email, setEmail] = useSafeState<string>('')
|
|
45
45
|
|
|
@@ -48,7 +48,7 @@ export default function m(props: EventCounter_lmProps): any {
|
|
|
48
48
|
const [refreshing, setRefreshing] = useSafeState<boolean>(false);
|
|
49
49
|
|
|
50
50
|
useEffect(() => {
|
|
51
|
-
|
|
51
|
+
EventConfigProperty.curlConfig('v2/config_event')
|
|
52
52
|
loadData()
|
|
53
53
|
}, [])
|
|
54
54
|
|
|
@@ -237,7 +237,7 @@ export default function m(props: EventCounter_lmProps): any {
|
|
|
237
237
|
<View style={{ backgroundColor: '#fff', padding: 10, paddingLeft: 0, borderRadius: 15, marginBottom: 0, flexDirection: 'row', flexWrap: 'wrap' }}>
|
|
238
238
|
|
|
239
239
|
{
|
|
240
|
-
|
|
240
|
+
eventConfig?.event?.cashier_type?.map(renderTypeCashier)
|
|
241
241
|
}
|
|
242
242
|
</View>
|
|
243
243
|
|
|
@@ -259,7 +259,7 @@ export default function m(props: EventCounter_lmProps): any {
|
|
|
259
259
|
<LibSlidingup ref={dialogUser}>
|
|
260
260
|
<View style={{ backgroundColor: '#fff', borderTopLeftRadius: 20, borderTopRightRadius: 20 }}>
|
|
261
261
|
<View style={{ height: 4, width: 32, borderRadius: 2, backgroundColor: "#C6C6C6", marginTop: 10, marginBottom: 10, alignSelf: 'center' }} />
|
|
262
|
-
<
|
|
262
|
+
<EventPopup email={email.trim()} redirect={() => {
|
|
263
263
|
addCashier()
|
|
264
264
|
}} cancel={() => {
|
|
265
265
|
dialogUser.current?.hide()
|
|
@@ -11,7 +11,6 @@ import { LibLoading } from 'esoftplay/cache/lib/loading/import';
|
|
|
11
11
|
import { LibNavigation } from 'esoftplay/cache/lib/navigation/import';
|
|
12
12
|
import { LibStyle } from 'esoftplay/cache/lib/style/import';
|
|
13
13
|
import { LibUtils } from 'esoftplay/cache/lib/utils/import';
|
|
14
|
-
import { UserPopup } from 'esoftplay/cache/user/popup/import';
|
|
15
14
|
import esp from 'esoftplay/esp';
|
|
16
15
|
import useSafeState from 'esoftplay/state';
|
|
17
16
|
|
|
@@ -19,6 +18,7 @@ import { EventButton } from 'esoftplay/cache/event/button/import';
|
|
|
19
18
|
import { EventHeader } from 'esoftplay/cache/event/header/import';
|
|
20
19
|
import { EventInput_rectangle } from 'esoftplay/cache/event/input_rectangle/import';
|
|
21
20
|
import { EventMessage } from 'esoftplay/cache/event/message/import';
|
|
21
|
+
import { EventPopup } from 'esoftplay/cache/event/popup/import';
|
|
22
22
|
import { LibSlidingup } from 'esoftplay/cache/lib/slidingup/import';
|
|
23
23
|
import React, { useEffect, useRef } from 'react';
|
|
24
24
|
import { Text, TouchableOpacity, View } from 'react-native';
|
|
@@ -185,7 +185,7 @@ export default function m(props: EventCounter_user_listProps): any {
|
|
|
185
185
|
<LibSlidingup ref={dialogUser}>
|
|
186
186
|
<View style={{ backgroundColor: '#fff', borderTopLeftRadius: 20, borderTopRightRadius: 20 }}>
|
|
187
187
|
<View style={{ height: 4, width: 32, borderRadius: 2, backgroundColor: "#C6C6C6", marginTop: 10, marginBottom: 10, alignSelf: 'center' }} />
|
|
188
|
-
<
|
|
188
|
+
<EventPopup email={email.trim()} redirect={() => {
|
|
189
189
|
addLM()
|
|
190
190
|
}} cancel={() => {
|
|
191
191
|
dialogUser.current?.hide()
|
|
@@ -12,8 +12,7 @@ import { LibStyle } from 'esoftplay/cache/lib/style/import';
|
|
|
12
12
|
import { LibUtils } from 'esoftplay/cache/lib/utils/import';
|
|
13
13
|
import useSafeState from 'esoftplay/state';
|
|
14
14
|
import React from 'react';
|
|
15
|
-
import { Text, View } from 'react-native';
|
|
16
|
-
import Pressable from '../lib/pressable';
|
|
15
|
+
import { Pressable, Text, View } from 'react-native';
|
|
17
16
|
|
|
18
17
|
|
|
19
18
|
export interface EventCoupon_claim_reimburse_historyArgs {
|
package/event/coupon_detail.tsx
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
// withHooks
|
|
2
2
|
|
|
3
3
|
import { EventHeader } from 'esoftplay/cache/event/header/import';
|
|
4
|
+
import { EventSecure_page } from 'esoftplay/cache/event/secure_page/import';
|
|
4
5
|
import { LibNavigation } from 'esoftplay/cache/lib/navigation/import';
|
|
5
6
|
import { LibPicture } from 'esoftplay/cache/lib/picture/import';
|
|
6
7
|
import { LibStyle } from 'esoftplay/cache/lib/style/import';
|
|
7
8
|
import { LibUtils } from 'esoftplay/cache/lib/utils/import';
|
|
8
|
-
import { UseSecure_page } from 'esoftplay/cache/use/secure_page/import';
|
|
9
9
|
import esp from 'esoftplay/esp';
|
|
10
10
|
import React from 'react';
|
|
11
11
|
import { ScrollView, Text, View } from 'react-native';
|
|
@@ -25,7 +25,7 @@ export interface VoucherCoupon_detailProps {
|
|
|
25
25
|
|
|
26
26
|
}
|
|
27
27
|
export default function m(props: VoucherCoupon_detailProps): any {
|
|
28
|
-
|
|
28
|
+
EventSecure_page()
|
|
29
29
|
const { qr, code, amount, image, info, title, status, event_name, merchant_name } = LibNavigation.getArgsAll(props)
|
|
30
30
|
|
|
31
31
|
return (
|