esoftplay-event 0.0.1-f → 0.0.1-h
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 +208 -0
- package/event/detail.tsx +15 -35
- package/event/order_detail.tsx +82 -15
- package/event/order_detail_upgrade.tsx +10 -4
- package/event/order_detail_upgrade_payment.tsx +1 -1
- package/event/order_detail_visitor.tsx +10 -30
- package/event/order_detail_waiting.tsx +23 -10
- package/event/order_share_to.tsx +1 -1
- package/event/seat.tsx +0 -1
- package/event/secure_page.debug.tsx +34 -0
- package/event/secure_page.live.tsx +35 -0
- package/event/secure_page.tsx +6 -5
- package/event/ticket_list.tsx +6 -10
- package/event/ticket_list2.tsx +5 -3
- package/event/tms_in_failed.tsx +1 -1
- package/event/tms_out_failed.tsx +1 -1
- package/id.json +2 -0
- package/package.json +1 -1
- package/event/firebase_socket.debug.ts +0 -260
- package/event/firebase_socket.live.ts +0 -335
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,208 @@
|
|
|
1
|
+
// withHooks
|
|
2
|
+
|
|
3
|
+
import { EventCountdownProperty } from 'esoftplay/cache/event/countdown/import';
|
|
4
|
+
import { EventFirebase_socket, EventFirebase_socketProperty } from 'esoftplay/cache/event/firebase_socket/import';
|
|
5
|
+
import { EventHeader } from 'esoftplay/cache/event/header/import';
|
|
6
|
+
import { EventIndexProperty } from 'esoftplay/cache/event/index/import';
|
|
7
|
+
import { EventMessage } from 'esoftplay/cache/event/message/import';
|
|
8
|
+
import { LibCarrousel } from 'esoftplay/cache/lib/carrousel/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
|
+
const width = LibStyle?.width
|
|
81
|
+
const sliderHeight = 0.50 * width
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
function renderItem(item: any, index: number) {
|
|
85
|
+
const styleId_Z2g4Hs7: any = { backgroundColor: '#FFC523', width: itemWidth, height: itemHeight, margin: 0.5, justifyContent: 'center', alignItems: 'center' }
|
|
86
|
+
|
|
87
|
+
if (item?.images?.length > 0) {
|
|
88
|
+
return (
|
|
89
|
+
<LibCarrousel
|
|
90
|
+
key={"p_slider"}
|
|
91
|
+
delay={4000}
|
|
92
|
+
style={{ height: sliderHeight, width: width }}
|
|
93
|
+
autoplay
|
|
94
|
+
>
|
|
95
|
+
{
|
|
96
|
+
item?.images?.map((item1: any, ii: number) => {
|
|
97
|
+
return (
|
|
98
|
+
<TouchableOpacity key={ii} onPress={() => {
|
|
99
|
+
esp.log("start");
|
|
100
|
+
EventIndexProperty.isLogin(async () => {
|
|
101
|
+
esp.log("1");
|
|
102
|
+
if (item.status == 1) {
|
|
103
|
+
esp.log("2");
|
|
104
|
+
if (isInPricingQueueConfig(item.event_id)) {
|
|
105
|
+
esp.log("3");
|
|
106
|
+
LibNavigation.navigateForResult('event/queue_pricing', { event_id: item?.event_id, autoPass: false })
|
|
107
|
+
}
|
|
108
|
+
esp.log("4");
|
|
109
|
+
EventCountdownProperty.countdownTime.set(moment().add(EventFirebase_socketProperty.eventQueueConfig.get(item?.event_id).time, 'seconds').localeFormat('YYYY-MM-DD HH:mm:ss'))
|
|
110
|
+
esp.log("5");
|
|
111
|
+
LibNavigation.navigate(item?.config?.hasOwnProperty('multiprice') && item?.config?.multiprice == 1 ?
|
|
112
|
+
'event/artist_detail_multi' :
|
|
113
|
+
'event/artist_detail', { url_price: item.url })
|
|
114
|
+
} else {
|
|
115
|
+
esp.log("6");
|
|
116
|
+
LibToastProperty.show(esp.lang("event/artist", "ticket_not_available"))
|
|
117
|
+
}
|
|
118
|
+
})
|
|
119
|
+
}} >
|
|
120
|
+
<LibPicture key={ii} source={{ uri: item1 }} style={{ height: sliderHeight, width: width, resizeMode: 'cover', backgroundColor: "#f1f2f3" }} />
|
|
121
|
+
</TouchableOpacity>
|
|
122
|
+
)
|
|
123
|
+
})
|
|
124
|
+
}
|
|
125
|
+
</LibCarrousel>
|
|
126
|
+
)
|
|
127
|
+
} else if (item?.images?.length == 1) {
|
|
128
|
+
return (
|
|
129
|
+
<TouchableOpacity key={index} onPress={() => {
|
|
130
|
+
esp.log("start");
|
|
131
|
+
EventIndexProperty.isLogin(async () => {
|
|
132
|
+
esp.log("1");
|
|
133
|
+
if (item.status == 1) {
|
|
134
|
+
esp.log("2");
|
|
135
|
+
if (isInPricingQueueConfig(item.event_id)) {
|
|
136
|
+
esp.log("3");
|
|
137
|
+
LibNavigation.navigateForResult('event/queue_pricing', { event_id: item?.event_id, autoPass: false })
|
|
138
|
+
}
|
|
139
|
+
esp.log("4");
|
|
140
|
+
EventCountdownProperty.countdownTime.set(moment().add(EventFirebase_socketProperty.eventQueueConfig.get(item?.event_id).time, 'seconds').localeFormat('YYYY-MM-DD HH:mm:ss'))
|
|
141
|
+
esp.log("5");
|
|
142
|
+
LibNavigation.navigate(item?.config?.hasOwnProperty('multiprice') && item?.config?.multiprice == 1 ?
|
|
143
|
+
'event/artist_detail_multi' :
|
|
144
|
+
'event/artist_detail', { url_price: item.url })
|
|
145
|
+
} else {
|
|
146
|
+
esp.log("6");
|
|
147
|
+
LibToastProperty.show(esp.lang("event/artist", "ticket_not_available"))
|
|
148
|
+
}
|
|
149
|
+
})
|
|
150
|
+
}} >
|
|
151
|
+
<LibPicture style={{ height: sliderHeight, width: width, resizeMode: 'cover', backgroundColor: "#f1f2f3" }} source={{ uri: item.images[0] }} />
|
|
152
|
+
</TouchableOpacity>
|
|
153
|
+
)
|
|
154
|
+
} else {
|
|
155
|
+
return (
|
|
156
|
+
<TouchableOpacity key={index} onPress={() => {
|
|
157
|
+
esp.log("start");
|
|
158
|
+
EventIndexProperty.isLogin(async () => {
|
|
159
|
+
esp.log("1");
|
|
160
|
+
if (item.status == 1) {
|
|
161
|
+
esp.log("2");
|
|
162
|
+
if (isInPricingQueueConfig(item.event_id)) {
|
|
163
|
+
esp.log("3");
|
|
164
|
+
LibNavigation.navigateForResult('event/queue_pricing', { event_id: item?.event_id, autoPass: false })
|
|
165
|
+
}
|
|
166
|
+
esp.log("4");
|
|
167
|
+
EventCountdownProperty.countdownTime.set(moment().add(EventFirebase_socketProperty.eventQueueConfig.get(item?.event_id).time, 'seconds').localeFormat('YYYY-MM-DD HH:mm:ss'))
|
|
168
|
+
esp.log("5");
|
|
169
|
+
LibNavigation.navigate(item?.config?.hasOwnProperty('multiprice') && item?.config?.multiprice == 1 ?
|
|
170
|
+
'event/artist_detail_multi' :
|
|
171
|
+
'event/artist_detail', { url_price: item.url })
|
|
172
|
+
} else {
|
|
173
|
+
esp.log("6");
|
|
174
|
+
LibToastProperty.show(esp.lang("event/artist", "ticket_not_available"))
|
|
175
|
+
}
|
|
176
|
+
})
|
|
177
|
+
}} style={styleId_Z2g4Hs7}>
|
|
178
|
+
<Text numberOfLines={2} style={styleId_2cYE4h}>{item.title}</Text>
|
|
179
|
+
|
|
180
|
+
</TouchableOpacity>
|
|
181
|
+
)
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
return (
|
|
187
|
+
<View style={{ flex: 1, backgroundColor: 'white' }} >
|
|
188
|
+
<EventHeader title={title ? title : resultEvent?.event_title} iconShare={resultEvent?.url_share_artist && resultEvent?.url_share_artist !== ""}
|
|
189
|
+
onPressShare={() => {
|
|
190
|
+
LibUtils.share(resultEvent?.url_share_artist)
|
|
191
|
+
}} />
|
|
192
|
+
{
|
|
193
|
+
!result && !error ? <LibLoading /> :
|
|
194
|
+
<LibList
|
|
195
|
+
data={result}
|
|
196
|
+
keyExtractor={(item) => item.id}
|
|
197
|
+
onRefresh={loadData}
|
|
198
|
+
staticHeight={itemHeight + 1}
|
|
199
|
+
renderItem={renderItem}
|
|
200
|
+
ListEmptyComponent={
|
|
201
|
+
<EventMessage message={error} />
|
|
202
|
+
}
|
|
203
|
+
/>
|
|
204
|
+
}
|
|
205
|
+
</View>
|
|
206
|
+
)
|
|
207
|
+
}
|
|
208
|
+
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 })} >
|
package/event/order_detail.tsx
CHANGED
|
@@ -20,6 +20,7 @@ import { UserClass } from 'esoftplay/cache/user/class/import';
|
|
|
20
20
|
|
|
21
21
|
import { applyStyle } from 'esoftplay';
|
|
22
22
|
import { EventAlert } from 'esoftplay/cache/event/alert/import';
|
|
23
|
+
import { EventConfigProperty } from 'esoftplay/cache/event/config/import';
|
|
23
24
|
import { EventHtmltext } from 'esoftplay/cache/event/htmltext/import';
|
|
24
25
|
import { EventIndexProperty } from 'esoftplay/cache/event/index/import';
|
|
25
26
|
import { EventOrder_detail_upgrade_button } from 'esoftplay/cache/event/order_detail_upgrade_button/import';
|
|
@@ -28,6 +29,7 @@ import { EventQr_bg } from 'esoftplay/cache/event/qr_bg/import';
|
|
|
28
29
|
import { EventRating } from 'esoftplay/cache/event/rating/import';
|
|
29
30
|
import { EventSecure_page } from 'esoftplay/cache/event/secure_page/import';
|
|
30
31
|
import { EventStep } from 'esoftplay/cache/event/step/import';
|
|
32
|
+
import { LibGradient } from 'esoftplay/cache/lib/gradient/import';
|
|
31
33
|
import { LibSlidingup } from 'esoftplay/cache/lib/slidingup/import';
|
|
32
34
|
import { UseCondition } from 'esoftplay/cache/use/condition/import';
|
|
33
35
|
import esp from 'esoftplay/esp';
|
|
@@ -174,6 +176,7 @@ export default function m(props: EventOrder_detailProps): any {
|
|
|
174
176
|
}
|
|
175
177
|
|
|
176
178
|
useEffect(() => {
|
|
179
|
+
EventConfigProperty.curlConfig('v2/config_order_type')
|
|
177
180
|
loadData()
|
|
178
181
|
}, [])
|
|
179
182
|
|
|
@@ -202,21 +205,6 @@ export default function m(props: EventOrder_detailProps): any {
|
|
|
202
205
|
setDataReview(subs.getValue())
|
|
203
206
|
})
|
|
204
207
|
|
|
205
|
-
function doCancel(url: string): void {
|
|
206
|
-
LibDialog.warningConfirm(esp.lang("event/order_detail", "confirm"), esp.lang("event/order_detail", "cancel_this_order"), esp.lang("event/order_detail", "btn_yes"), () => {
|
|
207
|
-
LibProgress.show(esp.lang("event/order_detail", "please_wait"))
|
|
208
|
-
new LibCurl(url, null, (result: any, msg: any) => {
|
|
209
|
-
LibProgress.hide()
|
|
210
|
-
LibNavigation.back()
|
|
211
|
-
}, (error: any) => {
|
|
212
|
-
LibDialog.warning(esp.lang("event/order_detail", "cancel_err"), error?.message);
|
|
213
|
-
LibProgress.hide()
|
|
214
|
-
}, 1)
|
|
215
|
-
}, esp.lang("event/order_detail", "btn_cancel"), () => {
|
|
216
|
-
|
|
217
|
-
})
|
|
218
|
-
}
|
|
219
|
-
|
|
220
208
|
function addReturn(): void {
|
|
221
209
|
if (qty < Number(result.qty_returnable)) {
|
|
222
210
|
setQty(qty + 1)
|
|
@@ -243,6 +231,55 @@ export default function m(props: EventOrder_detailProps): any {
|
|
|
243
231
|
}, esp.lang("event/order_detail", "btn_cancel"), () => { })
|
|
244
232
|
}
|
|
245
233
|
|
|
234
|
+
function loadDataAddons(id: any, url: string) {
|
|
235
|
+
LibProgress.show(esp.lang("event/order_detail", "wait"))
|
|
236
|
+
new LibCurl(url, null, (res: any, msg: any) => {
|
|
237
|
+
esp.log({ res });
|
|
238
|
+
LibProgress.hide()
|
|
239
|
+
let dataBookingEvent = {
|
|
240
|
+
event_id: res?.event_id,
|
|
241
|
+
event_title: res?.event_name,
|
|
242
|
+
selected_ticket: {
|
|
243
|
+
price_id: res?.price_id,
|
|
244
|
+
currency: res?.currency,
|
|
245
|
+
tax: res?.tax,
|
|
246
|
+
fee: res?.fee,
|
|
247
|
+
fee_percent: res?.fee_percent,
|
|
248
|
+
term: res?.term,
|
|
249
|
+
has_addition: res?.has_addition,
|
|
250
|
+
list: {
|
|
251
|
+
ondate: res?.ondate,
|
|
252
|
+
price: res?.price,
|
|
253
|
+
price_id: res?.price_id,
|
|
254
|
+
currency: res?.currency,
|
|
255
|
+
}
|
|
256
|
+
},
|
|
257
|
+
qty: result?.qty
|
|
258
|
+
}
|
|
259
|
+
let fee_platform = {
|
|
260
|
+
fee_platform_amount: res?.fee_platform?.fee_platform_amount,
|
|
261
|
+
fee_platform_type: res?.fee_platform?.fee_platform_type
|
|
262
|
+
}
|
|
263
|
+
let show_fee_percentage = res?.show_fee_percentage
|
|
264
|
+
let tax = res?.tax
|
|
265
|
+
let order_type = EventConfigProperty.state().get()?.order_type?.ticket
|
|
266
|
+
let addons_id = id
|
|
267
|
+
let booking_id_ref = result?.id
|
|
268
|
+
LibNavigation.navigate('payment/ticket', {
|
|
269
|
+
order_type: order_type,
|
|
270
|
+
tax: tax,
|
|
271
|
+
fee_platform: fee_platform,
|
|
272
|
+
dataBookingEvent: dataBookingEvent,
|
|
273
|
+
show_fee_percentage,
|
|
274
|
+
addons_id,
|
|
275
|
+
booking_id_ref
|
|
276
|
+
})
|
|
277
|
+
}, (err: any) => {
|
|
278
|
+
LibProgress.hide()
|
|
279
|
+
esp.log({ err });
|
|
280
|
+
}, 1)
|
|
281
|
+
}
|
|
282
|
+
|
|
246
283
|
if (result == undefined && !coupons) {
|
|
247
284
|
return (
|
|
248
285
|
<View style={{ flex: 1, backgroundColor: '#f6f6f6' }}>
|
|
@@ -498,6 +535,36 @@ export default function m(props: EventOrder_detailProps): any {
|
|
|
498
535
|
}} />
|
|
499
536
|
</UseCondition>
|
|
500
537
|
|
|
538
|
+
|
|
539
|
+
{/* tombol add on */}
|
|
540
|
+
|
|
541
|
+
{
|
|
542
|
+
result?.addons?.length > 0 && result?.addons?.map((item: any, i: number) => {
|
|
543
|
+
return (
|
|
544
|
+
<TouchableOpacity key={i} onPress={() => {
|
|
545
|
+
loadDataAddons(item?.addons_id, item?.url)
|
|
546
|
+
}}>
|
|
547
|
+
<LibGradient
|
|
548
|
+
colors={["#F2789F", "#F9C5D5", "#F9C5D5", "#F2789F",]}
|
|
549
|
+
direction='top-to-bottom'
|
|
550
|
+
style={{ margin: 15, flexDirection: 'row', backgroundColor: '#F2789F', marginBottom: 0, borderWidth: 1, borderColor: 'red', borderRadius: 7, overflow: 'hidden' }}
|
|
551
|
+
>
|
|
552
|
+
<View style={{ padding: 10, paddingHorizontal: 15, borderTopLeftRadius: 7, borderBottomLeftRadius: 7 }}>
|
|
553
|
+
<LibIcon name='plus-circle' size={40} color='#fff' style={{ opacity: 1 }} />
|
|
554
|
+
</View>
|
|
555
|
+
<View style={{ flex: 1, backgroundColor: '#fff', borderTopRightRadius: 7, borderBottomRightRadius: 7, borderTopLeftRadius: 50, borderBottomLeftRadius: 50, alignContent: 'center', justifyContent: 'center', paddingLeft: 30 }}>
|
|
556
|
+
<Text allowFontScaling={false} style={{ fontSize: 16, fontWeight: 'bold' }}>{item.title}</Text>
|
|
557
|
+
{
|
|
558
|
+
item.hasOwnProperty('subtitle') && item?.subtitle != "" &&
|
|
559
|
+
<Text allowFontScaling={false} numberOfLines={2} ellipsizeMode='tail' style={{ fontSize: 12, fontWeight: 'normal' }}>{item?.subtitle}</Text>
|
|
560
|
+
}
|
|
561
|
+
</View>
|
|
562
|
+
</LibGradient>
|
|
563
|
+
</TouchableOpacity>
|
|
564
|
+
)
|
|
565
|
+
})
|
|
566
|
+
}
|
|
567
|
+
|
|
501
568
|
{
|
|
502
569
|
// jika mau edit view dibawah ini, tekan ctrl + f terus paste prefik dibawah ini
|
|
503
570
|
// view_reviewed
|
|
@@ -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,
|
|
@@ -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}
|
|
@@ -32,7 +32,6 @@ export default function m(props: EventOrder_detail_visitorProps): any {
|
|
|
32
32
|
|
|
33
33
|
function loadData() {
|
|
34
34
|
new LibCurl(url, null, (res, msg) => {
|
|
35
|
-
esp.log({ res });
|
|
36
35
|
setResult(res)
|
|
37
36
|
}, (err) => {
|
|
38
37
|
setError(err)
|
|
@@ -106,11 +105,6 @@ export default function m(props: EventOrder_detail_visitorProps): any {
|
|
|
106
105
|
return finalResult
|
|
107
106
|
}
|
|
108
107
|
|
|
109
|
-
let filterBuyerVisitor = result?.tickets?.reduce((r: any, a: any) => {
|
|
110
|
-
r[a.email] = [...r[a.email] || [], a];
|
|
111
|
-
return r;
|
|
112
|
-
}, {});
|
|
113
|
-
|
|
114
108
|
return (
|
|
115
109
|
<View style={{ flex: 1, backgroundColor: LibStyle.colorBgGrey }}>
|
|
116
110
|
<EventHeader title={esp.lang("event/order_detail_visitor", "header")} />
|
|
@@ -123,44 +117,30 @@ export default function m(props: EventOrder_detail_visitorProps): any {
|
|
|
123
117
|
<ScrollView>
|
|
124
118
|
<View style={{ margin: 15, borderRadius: 10, backgroundColor: '#fff', padding: 10 }}>
|
|
125
119
|
{
|
|
126
|
-
|
|
120
|
+
result?.tickets?.map((item: any, i: number) => {
|
|
127
121
|
return (
|
|
128
122
|
<View key={i} style={{ marginLeft: 14, marginBottom: 15, flexDirection: 'row', alignContent: 'center', alignItems: 'center', justifyContent: 'space-between' }}>
|
|
129
123
|
<View style={{ flex: 1, flexDirection: 'row', alignContent: 'center', alignItems: 'center' }}>
|
|
130
124
|
<Text allowFontScaling={false} style={{ marginRight: 6, fontFamily: "Arial", fontSize: 30, fontWeight: "bold", fontStyle: "normal", letterSpacing: 0, color: "#484848" }}>{i + 1}.</Text>
|
|
131
125
|
<View style={{ flex: 1 }} >
|
|
132
126
|
<Text allowFontScaling={false} style={{ fontFamily: "Arial", marginTop: 10, fontSize: 10, fontWeight: "bold", fontStyle: "normal", letterSpacing: 0, color: "#c3c3c3" }}>{esp.lang("event/order_detail", "buyer_name")}</Text>
|
|
133
|
-
<Text allowFontScaling={false} style={{ fontFamily: "Arial", fontSize: 14, fontWeight: "normal", fontStyle: "normal", letterSpacing: 0, color: "#4a4a4a", marginTop: 4 }} ellipsizeMode='tail'>{item
|
|
127
|
+
<Text allowFontScaling={false} style={{ fontFamily: "Arial", fontSize: 14, fontWeight: "normal", fontStyle: "normal", letterSpacing: 0, color: "#4a4a4a", marginTop: 4 }} ellipsizeMode='tail'>{item?.name}</Text>
|
|
134
128
|
<Text allowFontScaling={false} style={{ fontFamily: "Arial", fontSize: 10, fontWeight: "bold", fontStyle: "normal", letterSpacing: 0, color: "#c3c3c3", marginTop: 10 }}>{esp.lang("event/order_detail", "phone_number")}</Text>
|
|
135
|
-
<Text allowFontScaling={false} style={{ fontFamily: "Arial", fontSize: 14, fontWeight: "normal", fontStyle: "normal", letterSpacing: 0, color: "#4a4a4a", marginTop: 4 }}>{item
|
|
129
|
+
<Text allowFontScaling={false} style={{ fontFamily: "Arial", fontSize: 14, fontWeight: "normal", fontStyle: "normal", letterSpacing: 0, color: "#4a4a4a", marginTop: 4 }}>{item?.phone == "" ? "-" : item?.phone.trim()}</Text>
|
|
136
130
|
</View>
|
|
137
131
|
</View>
|
|
138
|
-
<View style={{
|
|
139
|
-
|
|
140
|
-
|
|
132
|
+
<View style={{ alignContent: 'center', alignItems: 'center' }}>
|
|
133
|
+
{
|
|
134
|
+
item.hasOwnProperty('seat_name') && item?.seat_name != "" &&
|
|
135
|
+
<View style={{ paddingVertical: 5, paddingHorizontal: 7, borderWidth: 1, borderColor: '#000', backgroundColor: '#fff', borderRadius: 5, marginRight: 7 }}>
|
|
136
|
+
<Text allowFontScaling={false} style={{ fontWeight: 'bold', fontSize: 20, color: '#000' }}>{item.seat_name}</Text>
|
|
137
|
+
</View>
|
|
138
|
+
}
|
|
141
139
|
</View>
|
|
142
140
|
</View>
|
|
143
141
|
)
|
|
144
142
|
})
|
|
145
143
|
}
|
|
146
|
-
|
|
147
|
-
{
|
|
148
|
-
result?.flag?.use_seat == 1 &&
|
|
149
|
-
<>
|
|
150
|
-
<Text allowFontScaling={false} style={{ fontFamily: "Arial", fontSize: 14, fontWeight: "bold", fontStyle: "normal", letterSpacing: 0, color: "#4a4a4a" }}>{esp.lang("event/order_detail", "seat_number")}</Text>
|
|
151
|
-
<View style={{ flexDirection: 'row', flexWrap: 'wrap', marginLeft: -10, padding: 10 }}>
|
|
152
|
-
{
|
|
153
|
-
result?.tickets?.map((item: any, i: number) => {
|
|
154
|
-
return (
|
|
155
|
-
<View key={i} style={{ paddingVertical: 5, paddingHorizontal: 7, borderWidth: 1, borderColor: '#000', backgroundColor: '#fff', borderRadius: 5, marginRight: 7 }}>
|
|
156
|
-
<Text allowFontScaling={false} style={{ fontWeight: 'bold', fontSize: 20, color: '#000' }}>{item.seat_name}</Text>
|
|
157
|
-
</View>
|
|
158
|
-
)
|
|
159
|
-
})
|
|
160
|
-
}
|
|
161
|
-
</View>
|
|
162
|
-
</>
|
|
163
|
-
}
|
|
164
144
|
</View>
|
|
165
145
|
|
|
166
146
|
{
|
|
@@ -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/order_share_to.tsx
CHANGED