esoftplay-event 0.0.1-e → 0.0.1-g
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 +1 -1
- package/event/artist.tsx +7 -1
- package/event/artist_detail.tsx +1 -1
- package/event/artistv2.tsx +165 -0
- package/event/detail.tsx +15 -35
- package/event/order_detail_upgrade.tsx +10 -4
- package/event/order_detail_upgrade_payment.tsx +5 -5
- package/event/order_detail_waiting.tsx +23 -10
- package/event/secure_page.tsx +4 -2
- package/event/ticket_list.tsx +3 -4
- package/event/ticket_list2.tsx +5 -3
- package/package.json +1 -1
package/config.json
CHANGED
package/event/artist.tsx
CHANGED
|
@@ -14,6 +14,7 @@ import { LibPicture } from 'esoftplay/cache/lib/picture/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 { UserClass } from 'esoftplay/cache/user/class/import';
|
|
17
18
|
import esp from 'esoftplay/esp';
|
|
18
19
|
import moment from 'esoftplay/moment';
|
|
19
20
|
import useSafeState from 'esoftplay/state';
|
|
@@ -39,6 +40,7 @@ export default function m(props: BigbangArtistProps): any {
|
|
|
39
40
|
|
|
40
41
|
function loadData(): void {
|
|
41
42
|
/* get detail event untuk dapat config antrian */
|
|
43
|
+
|
|
42
44
|
new LibCurl(url, null,
|
|
43
45
|
(res) => {
|
|
44
46
|
new LibCurl(res?.[0]?.url_event || `event_detail/${res?.[0]?.event_id}`, null, (res) => {
|
|
@@ -63,7 +65,11 @@ export default function m(props: BigbangArtistProps): any {
|
|
|
63
65
|
}
|
|
64
66
|
|
|
65
67
|
useEffect(() => {
|
|
66
|
-
|
|
68
|
+
if (esp.isDebug("") && UserClass.state().get().email == "bagus@fisip.net") {
|
|
69
|
+
LibNavigation.replace('event/artistv2')
|
|
70
|
+
} else {
|
|
71
|
+
loadData?.()
|
|
72
|
+
}
|
|
67
73
|
}, [])
|
|
68
74
|
|
|
69
75
|
const itemWidth = (LibStyle.width - 2)
|
package/event/artist_detail.tsx
CHANGED
|
@@ -174,7 +174,7 @@ export default function m(props: EventArtist_detailProps): any {
|
|
|
174
174
|
})
|
|
175
175
|
}
|
|
176
176
|
} else {
|
|
177
|
-
if (
|
|
177
|
+
if (selectedTicket?.hasOwnProperty("has_addition") && selectedTicket?.has_addition == 1) {
|
|
178
178
|
LibNavigation.navigateForResult('event/additional', { type_ticket: selectedTicket?.type, ondate: selectedTicket?.list?.ondate, event_id: data?.event_id, qty: qty, data: dataPost, price_id: selectedTicket?.price_id }, 221).then((additions) => {
|
|
179
179
|
if (additions != "") {
|
|
180
180
|
dataPost.addition = additions
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
// withHooks
|
|
2
|
+
|
|
3
|
+
import { applyStyle } from 'esoftplay';
|
|
4
|
+
import { EventCountdownProperty } from 'esoftplay/cache/event/countdown/import';
|
|
5
|
+
import { EventFirebase_socket, EventFirebase_socketProperty } from 'esoftplay/cache/event/firebase_socket/import';
|
|
6
|
+
import { EventHeader } from 'esoftplay/cache/event/header/import';
|
|
7
|
+
import { EventIndexProperty } from 'esoftplay/cache/event/index/import';
|
|
8
|
+
import { EventMessage } from 'esoftplay/cache/event/message/import';
|
|
9
|
+
import { LibCurl } from 'esoftplay/cache/lib/curl/import';
|
|
10
|
+
import { LibList } from 'esoftplay/cache/lib/list/import';
|
|
11
|
+
import { LibLoading } from 'esoftplay/cache/lib/loading/import';
|
|
12
|
+
import { LibNavigation } from 'esoftplay/cache/lib/navigation/import';
|
|
13
|
+
import { LibPicture } from 'esoftplay/cache/lib/picture/import';
|
|
14
|
+
import { LibStyle } from 'esoftplay/cache/lib/style/import';
|
|
15
|
+
import { LibToastProperty } from 'esoftplay/cache/lib/toast/import';
|
|
16
|
+
import { LibUtils } from 'esoftplay/cache/lib/utils/import';
|
|
17
|
+
import esp from 'esoftplay/esp';
|
|
18
|
+
import moment from 'esoftplay/moment';
|
|
19
|
+
import useSafeState from 'esoftplay/state';
|
|
20
|
+
import React, { useEffect } from 'react';
|
|
21
|
+
import { Text, TouchableOpacity, View } from 'react-native';
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
moment().locale('id')
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
export interface EventArtistv2Props {
|
|
28
|
+
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export default function m(props: EventArtistv2Props): any {
|
|
32
|
+
const [result, setResult] = useSafeState<any>()
|
|
33
|
+
const [resultEvent, setResultEvent] = useSafeState<any>()
|
|
34
|
+
const [error, setError] = useSafeState<any>('')
|
|
35
|
+
const { isInPricingQueueConfig } = EventFirebase_socket()
|
|
36
|
+
|
|
37
|
+
const { title, has_addition } = LibNavigation.getArgsAll(props)
|
|
38
|
+
const url = LibNavigation.getArgs(props, 'url', 'https://storage.googleapis.com/bbo-test-images/images/modules/api/event_artist/411.json')
|
|
39
|
+
|
|
40
|
+
function loadData(): void {
|
|
41
|
+
/* get detail event untuk dapat config antrian */
|
|
42
|
+
|
|
43
|
+
// new LibCurl(url, null,
|
|
44
|
+
new LibCurl('v2/event_artist&event_id=411', null,
|
|
45
|
+
(res) => {
|
|
46
|
+
esp.log({ res });
|
|
47
|
+
new LibCurl(res?.[0]?.url_event || `event_detail/${res?.[0]?.event_id}`, null, (res) => {
|
|
48
|
+
setResultEvent(res)
|
|
49
|
+
if (res?.id) {
|
|
50
|
+
EventFirebase_socketProperty.eventIdQueue.set(res?.id)
|
|
51
|
+
}
|
|
52
|
+
if (res.allotment) {
|
|
53
|
+
esp.modProp("event/firebase_socket").userIdKeyReplacer.set({
|
|
54
|
+
t: Number(res.allotment.t),
|
|
55
|
+
s: Number(res.allotment.s),
|
|
56
|
+
priority: 1
|
|
57
|
+
})
|
|
58
|
+
}
|
|
59
|
+
}, (err) => {
|
|
60
|
+
|
|
61
|
+
}, 0)
|
|
62
|
+
setResult(res)
|
|
63
|
+
}, (err) => {
|
|
64
|
+
setError(err?.message)
|
|
65
|
+
}, 1)
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
useEffect(() => {
|
|
69
|
+
loadData?.()
|
|
70
|
+
}, [])
|
|
71
|
+
|
|
72
|
+
const itemWidth = (LibStyle.width - 2)
|
|
73
|
+
const itemHeight = itemWidth * 9 / 16
|
|
74
|
+
|
|
75
|
+
let subs = {
|
|
76
|
+
is_subscribed: resultEvent?.config?.is_subscribed,
|
|
77
|
+
is_subscribed_default: resultEvent?.config?.is_subscribed_default,
|
|
78
|
+
is_subscribed_label: resultEvent?.config?.is_subscribed_label
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
function renderItem(item: any, index: number) {
|
|
82
|
+
const styleId_Z2g4Hs7: any = { backgroundColor: '#FFC523', width: itemWidth, height: itemHeight, margin: 0.5, justifyContent: 'center', alignItems: 'center' }
|
|
83
|
+
let isNotAvailable = item?.price_list?.every((v: any) => v.status == 0)
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
return (
|
|
87
|
+
<TouchableOpacity key={index} onPress={() => {
|
|
88
|
+
if (isNotAvailable) {
|
|
89
|
+
LibToastProperty.show(esp.lang("event/artist", "ticket_not_available"))
|
|
90
|
+
} else {
|
|
91
|
+
EventIndexProperty.isLogin(() => {
|
|
92
|
+
let newItem = {
|
|
93
|
+
has_addition: has_addition,
|
|
94
|
+
...item,
|
|
95
|
+
}
|
|
96
|
+
if (item.book_available == 1) {
|
|
97
|
+
if (isInPricingQueueConfig(item.event_id)) {
|
|
98
|
+
LibNavigation.navigateForResult('event/queue_pricing', { event_id: item?.event_id, autoPass: false }).then((v) => {
|
|
99
|
+
EventCountdownProperty.countdownTime.set(moment().add(EventFirebase_socketProperty.eventQueueConfig.get(item?.event_id).time, 'seconds').localeFormat('YYYY-MM-DD HH:mm:ss'))
|
|
100
|
+
if (item?.config?.hasOwnProperty('multiprice') && item?.config?.multiprice == 1) {
|
|
101
|
+
LibNavigation.navigate('event/artist_detail_multi', {
|
|
102
|
+
data: newItem,
|
|
103
|
+
subscribed: subs
|
|
104
|
+
})
|
|
105
|
+
} else {
|
|
106
|
+
LibNavigation.navigate('event/artist_detail', {
|
|
107
|
+
data: newItem,
|
|
108
|
+
subscribed: subs
|
|
109
|
+
})
|
|
110
|
+
}
|
|
111
|
+
})
|
|
112
|
+
} else {
|
|
113
|
+
if (item?.config?.hasOwnProperty('multiprice') && item?.config?.multiprice == 1) {
|
|
114
|
+
LibNavigation.navigate('event/artist_detail_multi', {
|
|
115
|
+
data: newItem,
|
|
116
|
+
subscribed: subs
|
|
117
|
+
})
|
|
118
|
+
} else {
|
|
119
|
+
LibNavigation.navigate('event/artist_detail', {
|
|
120
|
+
data: newItem,
|
|
121
|
+
subscribed: subs
|
|
122
|
+
})
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
} else {
|
|
126
|
+
LibToastProperty.show(esp.lang("event/artist_detail", "book_available", moment(item?.start_booking).serverFormat("DD MMMM YYYY HH:mm:ss")))
|
|
127
|
+
}
|
|
128
|
+
})
|
|
129
|
+
}
|
|
130
|
+
}} >
|
|
131
|
+
{
|
|
132
|
+
item && item.image != "" ?
|
|
133
|
+
<LibPicture style={applyStyle({ opacity: isNotAvailable ? 0.3 : 1, backgroundColor: '#f2f3f4', width: itemWidth, height: itemHeight, margin: 0.5 })} source={{ uri: item.image }} />
|
|
134
|
+
:
|
|
135
|
+
<View style={styleId_Z2g4Hs7}>
|
|
136
|
+
<Text numberOfLines={2} style={styleId_2cYE4h}>{item.title}</Text>
|
|
137
|
+
</View>
|
|
138
|
+
}
|
|
139
|
+
</TouchableOpacity >
|
|
140
|
+
)
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
return (
|
|
144
|
+
<View style={{ flex: 1, backgroundColor: 'white' }} >
|
|
145
|
+
<EventHeader title={title ? title : resultEvent?.event_title} iconShare={resultEvent?.url_share_artist && resultEvent?.url_share_artist !== ""}
|
|
146
|
+
onPressShare={() => {
|
|
147
|
+
LibUtils.share(resultEvent?.url_share_artist)
|
|
148
|
+
}} />
|
|
149
|
+
{
|
|
150
|
+
!result && !error ? <LibLoading /> :
|
|
151
|
+
<LibList
|
|
152
|
+
data={result}
|
|
153
|
+
keyExtractor={(item) => item.id}
|
|
154
|
+
onRefresh={loadData}
|
|
155
|
+
staticHeight={itemHeight + 1}
|
|
156
|
+
renderItem={renderItem}
|
|
157
|
+
ListEmptyComponent={
|
|
158
|
+
<EventMessage message={error} />
|
|
159
|
+
}
|
|
160
|
+
/>
|
|
161
|
+
}
|
|
162
|
+
</View>
|
|
163
|
+
)
|
|
164
|
+
}
|
|
165
|
+
const styleId_2cYE4h: any = { padding: 15, color: 'white', fontSize: 24 }
|
package/event/detail.tsx
CHANGED
|
@@ -269,43 +269,23 @@ export default function m(props: EventDetailProps): any {
|
|
|
269
269
|
</TouchableOpacity>
|
|
270
270
|
}
|
|
271
271
|
<TouchableOpacity onPress={() => {
|
|
272
|
-
EventIndexProperty.isLogin(() => {
|
|
273
|
-
|
|
272
|
+
EventIndexProperty.isLogin(async () => {
|
|
274
273
|
if (isInPricingQueueConfig(result.id)) {
|
|
275
|
-
LibNavigation.navigateForResult('event/queue_pricing', { event_id: result?.id })
|
|
276
|
-
LibNavigation.navigate(result?.config?.hasOwnProperty('multiprice') && result?.config?.multiprice == 1 ? 'event/ticket_list2' : 'event/ticket_list', {
|
|
277
|
-
url: result.url_price,
|
|
278
|
-
has_addition: result?.has_addition,
|
|
279
|
-
has_addition_global: result?.has_addition_global,
|
|
280
|
-
fee_platform: {
|
|
281
|
-
fee_platform_amount: result?.fee_platform_amount,
|
|
282
|
-
fee_platform_type: result?.fee_platform_type,
|
|
283
|
-
},
|
|
284
|
-
subscribed: {
|
|
285
|
-
is_subscribed: result?.config?.is_subscribed,
|
|
286
|
-
is_subscribed_default: result?.config?.is_subscribed_default,
|
|
287
|
-
is_subscribed_label: result?.config?.is_subscribed_label
|
|
288
|
-
},
|
|
289
|
-
show_fee_percentage: result?.config?.show_fee_percentage
|
|
290
|
-
})
|
|
291
|
-
})
|
|
292
|
-
} else {
|
|
293
|
-
LibNavigation.navigate(result?.config?.hasOwnProperty('multiprice') && result?.config?.multiprice == 1 ? 'event/ticket_list2' : 'event/ticket_list', {
|
|
294
|
-
url: result.url_price,
|
|
295
|
-
has_addition: result?.has_addition,
|
|
296
|
-
has_addition_global: result?.has_addition_global,
|
|
297
|
-
fee_platform: {
|
|
298
|
-
fee_platform_amount: result?.fee_platform_amount,
|
|
299
|
-
fee_platform_type: result?.fee_platform_type,
|
|
300
|
-
},
|
|
301
|
-
subscribed: {
|
|
302
|
-
is_subscribed: result?.config?.is_subscribed,
|
|
303
|
-
is_subscribed_default: result?.config?.is_subscribed_default,
|
|
304
|
-
is_subscribed_label: result?.config?.is_subscribed_label
|
|
305
|
-
},
|
|
306
|
-
show_fee_percentage: result?.config?.show_fee_percentage
|
|
307
|
-
})
|
|
274
|
+
await LibNavigation.navigateForResult('event/queue_pricing', { event_id: result?.id })
|
|
308
275
|
}
|
|
276
|
+
LibNavigation.navigate(result?.config?.hasOwnProperty('multiprice') && result?.config?.multiprice == 1 ? 'event/ticket_list2' : 'event/ticket_list', {
|
|
277
|
+
url: result.url_price,
|
|
278
|
+
fee_platform: {
|
|
279
|
+
fee_platform_amount: result?.fee_platform_amount,
|
|
280
|
+
fee_platform_type: result?.fee_platform_type,
|
|
281
|
+
},
|
|
282
|
+
subscribed: {
|
|
283
|
+
is_subscribed: result?.config?.is_subscribed,
|
|
284
|
+
is_subscribed_default: result?.config?.is_subscribed_default,
|
|
285
|
+
is_subscribed_label: result?.config?.is_subscribed_label
|
|
286
|
+
},
|
|
287
|
+
show_fee_percentage: result?.config?.show_fee_percentage
|
|
288
|
+
})
|
|
309
289
|
|
|
310
290
|
})
|
|
311
291
|
}} style={applyStyle({ width: result?.url_artist != "" ? (LibStyle.width - 30) * 0.5 : LibStyle.width - 20, borderWidth: 2, borderColor: LibStyle.colorGreen, height: 40, borderRadius: 16, backgroundColor: LibStyle.colorGreen, flexDirection: 'row', alignItems: 'center', alignContent: 'center', justifyContent: 'center', paddingHorizontal: 9 })} >
|
|
@@ -139,10 +139,18 @@ export default function m(props: EventOrder_detail_upgradeProps): any {
|
|
|
139
139
|
<EventButton label={esp.lang("event/order_detail_upgrade", "btn_next")} onPress={() => {
|
|
140
140
|
if (selectedTicket) {
|
|
141
141
|
if (selectedTicket?.selected_ticket?.use_seat == 1 && selectedTicket?.selected_ticket?.seat_autopick == 0) {
|
|
142
|
-
LibNavigation.navigateForResult('event/seat_map', {
|
|
142
|
+
LibNavigation.navigateForResult(esp.isDebug("") ? 'event/seat_map_new' : 'event/seat_map', {
|
|
143
143
|
url: 'event_seat',
|
|
144
144
|
dataTicket: selectedTicket
|
|
145
145
|
}).then((value) => {
|
|
146
|
+
let seatData: any = {}
|
|
147
|
+
if (esp.isDebug("")) {
|
|
148
|
+
seatData.seat_label = value?.seat_label
|
|
149
|
+
} else {
|
|
150
|
+
seatData.row_id = value?.row_id
|
|
151
|
+
seatData.column_id = value?.column_id
|
|
152
|
+
seatData.seat_name = value?.seat_name
|
|
153
|
+
}
|
|
146
154
|
LibNavigation.navigate('event/order_detail_upgrade_payment', {
|
|
147
155
|
dataTicket: {
|
|
148
156
|
url_payment: result?.url_payment,
|
|
@@ -157,9 +165,7 @@ export default function m(props: EventOrder_detail_upgradeProps): any {
|
|
|
157
165
|
},
|
|
158
166
|
selectedTicket: {
|
|
159
167
|
...selectedTicket,
|
|
160
|
-
|
|
161
|
-
column_id: value?.column_id,
|
|
162
|
-
seat_name: value?.seat_name,
|
|
168
|
+
...seatData
|
|
163
169
|
},
|
|
164
170
|
fee_platform: {
|
|
165
171
|
fee_platform_amount: selectedTicket?.selected_ticket?.fee_platform_amount,
|
|
@@ -70,7 +70,10 @@ export default function m(props: EventOrder_detail_upgrade_paymentProps): any {
|
|
|
70
70
|
new LibCurl('event_order_detail_upgrade_checkout', post, (res, msg) => {
|
|
71
71
|
LibProgress.hide()
|
|
72
72
|
LibNavigation.reset()
|
|
73
|
-
if (res?.hasOwnProperty('
|
|
73
|
+
if (res?.hasOwnProperty('url_mobile') && res?.url_mobile != null) {
|
|
74
|
+
Linking.openURL(res?.url_mobile)
|
|
75
|
+
LibNavigation.push('event/order_detail_waiting', { url: res?.url })
|
|
76
|
+
} else if (res?.hasOwnProperty('url_web') && res?.url_web != null) {
|
|
74
77
|
LibNavigation.navigateForResult('payment/cc_web', {
|
|
75
78
|
...res,
|
|
76
79
|
statusSuccess: [1]
|
|
@@ -84,9 +87,6 @@ export default function m(props: EventOrder_detail_upgrade_paymentProps): any {
|
|
|
84
87
|
LibNavigation.push('event/order')
|
|
85
88
|
}
|
|
86
89
|
})
|
|
87
|
-
} else if (res?.hasOwnProperty('url_mobile') && res?.url_mobile != null) {
|
|
88
|
-
Linking.openURL(res?.url_mobile)
|
|
89
|
-
LibNavigation.push('event/order_detail_waiting', { url: res?.url })
|
|
90
90
|
} else {
|
|
91
91
|
if (res?.url?.includes("waiting")) {
|
|
92
92
|
LibNavigation.push('event/order_waiting')
|
|
@@ -148,8 +148,8 @@ export default function m(props: EventOrder_detail_upgrade_paymentProps): any {
|
|
|
148
148
|
}
|
|
149
149
|
}
|
|
150
150
|
}}>
|
|
151
|
-
{/* detail */}
|
|
152
151
|
|
|
152
|
+
{/* detail */}
|
|
153
153
|
<View style={{ backgroundColor: 'white' }}>
|
|
154
154
|
<BigbangPayment_detail
|
|
155
155
|
ondate={dataTicket?.ondate}
|
|
@@ -53,9 +53,9 @@ export default function m(props: EventOrder_waitingProps): any {
|
|
|
53
53
|
useEffect(() => {
|
|
54
54
|
loadData()
|
|
55
55
|
stateData.reset()
|
|
56
|
-
LibAutoreload.set(() => {
|
|
57
|
-
|
|
58
|
-
}, 6000)
|
|
56
|
+
// LibAutoreload.set(() => {
|
|
57
|
+
// loadData()
|
|
58
|
+
// }, 6000)
|
|
59
59
|
return () => LibAutoreload.clear()
|
|
60
60
|
}, [])
|
|
61
61
|
|
|
@@ -148,16 +148,29 @@ export default function m(props: EventOrder_waitingProps): any {
|
|
|
148
148
|
send_image: result?.image,
|
|
149
149
|
}, 123).then((value) => {
|
|
150
150
|
|
|
151
|
-
let module = ['event/order', 'payment/cc_web']
|
|
151
|
+
// let module = ['event/order', 'payment/cc_web']
|
|
152
152
|
|
|
153
153
|
LibNavigation.backToRoot()
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
154
|
+
LibNavigation.navigateForResult('payment/cc_web', {
|
|
155
|
+
...value,
|
|
156
|
+
statusSuccess: [1]
|
|
157
|
+
}).then((res) => {
|
|
158
|
+
LibNavigation.backToRoot()
|
|
159
|
+
LibNavigation.push('user/profile')
|
|
160
|
+
if (res?.hasOwnProperty('params_error') || res?.hasOwnProperty('failed')) {
|
|
161
|
+
LibNavigation.push('event/order_waiting')
|
|
162
|
+
LibNavigation.push('event/order_detail_waiting', { url: res?.url })
|
|
163
|
+
} else {
|
|
164
|
+
LibNavigation.push('event/order')
|
|
159
165
|
}
|
|
160
|
-
)
|
|
166
|
+
})
|
|
167
|
+
// module?.map((item: any) => LibNavigation.push(item,
|
|
168
|
+
// {
|
|
169
|
+
// ...value,
|
|
170
|
+
// url: value.url,
|
|
171
|
+
// title: esp.lang("bigbang/loading_page", "success")
|
|
172
|
+
// }
|
|
173
|
+
// ))
|
|
161
174
|
})
|
|
162
175
|
|
|
163
176
|
// cancel booking ini
|
package/event/secure_page.tsx
CHANGED
|
@@ -22,8 +22,10 @@ export default function m(): any {
|
|
|
22
22
|
return () => {
|
|
23
23
|
if (!__DEV__)
|
|
24
24
|
if (can_screencapture != 1) {
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
setTimeout(() => {
|
|
26
|
+
RNPrevent?.disableSecureView?.()
|
|
27
|
+
RNPrevent?.enabled?.(false)
|
|
28
|
+
}, 500)
|
|
27
29
|
// subs?.remove?.()
|
|
28
30
|
}
|
|
29
31
|
}
|
package/event/ticket_list.tsx
CHANGED
|
@@ -134,13 +134,13 @@ export default function m(props: EventTicket_listProps): any {
|
|
|
134
134
|
|
|
135
135
|
const [pendingData] = EventLoading_pageProperty.state().useState()
|
|
136
136
|
|
|
137
|
-
const { url, fee_platform,
|
|
137
|
+
const { url, fee_platform, subscribed, show_fee_percentage }: any = useRef(LibNavigation.getArgsAll(props)).current
|
|
138
138
|
|
|
139
139
|
const [deeplinkParams] = UseDeeplinkProperty.params.useState()
|
|
140
140
|
const [timer] = EventCountdownProperty.countdownTime.useState()
|
|
141
141
|
|
|
142
142
|
const [unAvailableResult, setUnavailableResult] = useLazyState<any>()
|
|
143
|
-
const [availableResult, setAvailableResult
|
|
143
|
+
const [availableResult, setAvailableResult] = useSafeState<Result>()
|
|
144
144
|
const [urlPayment, setUrlPayment] = useLazyState<any>()
|
|
145
145
|
|
|
146
146
|
const [qty, setQty, getQty] = useSafeState<number>(1)
|
|
@@ -180,7 +180,6 @@ export default function m(props: EventTicket_listProps): any {
|
|
|
180
180
|
|
|
181
181
|
function loadData() {
|
|
182
182
|
new LibCurl(url, null, (res, msg) => {
|
|
183
|
-
|
|
184
183
|
const availablePriceType = LibObject.update(res, (arr: any[]) => arr.filter((x) => x.status != 0))('price_type')
|
|
185
184
|
const unAvailablePriceType = LibObject.update(res, (arr: any[]) => arr.filter((x) => x.status == 0))('price_type')
|
|
186
185
|
|
|
@@ -258,7 +257,7 @@ export default function m(props: EventTicket_listProps): any {
|
|
|
258
257
|
}
|
|
259
258
|
|
|
260
259
|
function checkAddition(newDataPost: any) {
|
|
261
|
-
if ((
|
|
260
|
+
if ((selectedTicket?.hasOwnProperty("has_addition") && selectedTicket?.has_addition == 1)) {
|
|
262
261
|
LibNavigation.navigateForResult('event/additional', { type_ticket: selectedTicket?.type, ondate: selectedTicket?.list?.ondate, event_id: availableResult?.id, qty: getQty(), price_id: selectedTicket?.price_id }, 321).then((additions) => {
|
|
263
262
|
if (additions != "") {
|
|
264
263
|
newDataPost.addition = additions
|
package/event/ticket_list2.tsx
CHANGED
|
@@ -135,11 +135,12 @@ export default function m(props: EventTicket_list2Props): any {
|
|
|
135
135
|
|
|
136
136
|
const [pendingData] = EventLoading_pageProperty.state().useState()
|
|
137
137
|
|
|
138
|
-
const {
|
|
138
|
+
const { url, fee_platform, subscribed, show_fee_percentage }: any = useRef(LibNavigation.getArgsAll(props)).current
|
|
139
139
|
|
|
140
140
|
const [deeplinkParams] = UseDeeplinkProperty.params.useState()
|
|
141
141
|
const [timer] = EventCountdownProperty.countdownTime.useState()
|
|
142
142
|
const [unAvailableResult, setUnavailableResult] = useLazyState<any>()
|
|
143
|
+
const [, setHasAdditionGlobal, getHasAdditionGlobal] = useLazyState<any>()
|
|
143
144
|
const [availableResult, setAvailableResult, getAvailableResult] = useSafeState<Result>()
|
|
144
145
|
const [, setDataPostBooking, getDataPostBooking] = useLazyState<any>([])
|
|
145
146
|
const [dataAddition, setDataAddition] = useSafeState<any>([])
|
|
@@ -209,7 +210,7 @@ export default function m(props: EventTicket_list2Props): any {
|
|
|
209
210
|
})
|
|
210
211
|
|
|
211
212
|
|
|
212
|
-
if (
|
|
213
|
+
if (getHasAdditionGlobal() == 1) {
|
|
213
214
|
LibNavigation.navigateForResult('event/additional', {
|
|
214
215
|
event_id: dataEvent?.event_id,
|
|
215
216
|
qty: 1,
|
|
@@ -231,7 +232,7 @@ export default function m(props: EventTicket_list2Props): any {
|
|
|
231
232
|
|
|
232
233
|
|
|
233
234
|
const [ticketAdditional, resetTicketAdditional] = taskAdditional((item: any) => new Promise((next) => {
|
|
234
|
-
if (
|
|
235
|
+
if (item.has_addition && item.has_addition == 1) {
|
|
235
236
|
LibNavigation.navigateForResult('event/additional', {
|
|
236
237
|
event_id: dataEvent?.event_id,
|
|
237
238
|
qty: item.qty,
|
|
@@ -297,6 +298,7 @@ export default function m(props: EventTicket_list2Props): any {
|
|
|
297
298
|
setUnavailableResult(unAvailablePriceType)
|
|
298
299
|
setAvailableResult(availablePriceType)
|
|
299
300
|
setUrlPayment(res?.url_payment)
|
|
301
|
+
setHasAdditionGlobal(res?.has_addition_global)
|
|
300
302
|
|
|
301
303
|
if (res.form_allotment == 1) {
|
|
302
304
|
releaseQueue()
|