esoftplay-event 0.0.2-w → 0.0.2-x
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_new.tsx +565 -0
- package/event/artist.tsx +6 -6
- package/event/artist_detail.tsx +5 -3
- package/event/artist_detailv2.tsx +129 -69
- package/event/artistv2.tsx +2 -11
- package/event/capture.tsx +2 -0
- package/event/detail.tsx +9 -13
- package/event/detail2.tsx +63 -61
- package/event/loading_page.tsx +62 -82
- package/event/order_detail.tsx +6 -4
- 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/schedule.tsx +1 -1
- package/event/schedule2.tsx +86 -0
- package/event/seat_map_new.tsx +4 -4
- package/event/ticket_list2.tsx +13 -3
- package/event/ticket_list_item.tsx +61 -0
- package/event/ticket_list_new.tsx +710 -0
- package/event/tms_dashboard.tsx +62 -25
- package/event/tms_gate.tsx +7 -13
- package/event/tms_home.tsx +4 -4
- package/id.json +5 -1
- package/package.json +1 -1
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
// withHooks
|
|
2
|
+
import { EventHeader } from 'esoftplay/cache/event/header/import';
|
|
3
|
+
import { LibCurl } from 'esoftplay/cache/lib/curl/import';
|
|
4
|
+
import { LibLoading } from 'esoftplay/cache/lib/loading/import';
|
|
5
|
+
import { LibNavigation } from 'esoftplay/cache/lib/navigation/import';
|
|
6
|
+
import { LibPicture } from 'esoftplay/cache/lib/picture/import';
|
|
7
|
+
import { LibStyle } from 'esoftplay/cache/lib/style/import';
|
|
8
|
+
import { LibToastProperty } from 'esoftplay/cache/lib/toast/import';
|
|
9
|
+
import { LibVideoProperty } from 'esoftplay/cache/lib/video/import';
|
|
10
|
+
import { LibWebview } from 'esoftplay/cache/lib/webview/import';
|
|
11
|
+
import esp from 'esoftplay/esp';
|
|
12
|
+
import useSafeState from 'esoftplay/state';
|
|
13
|
+
import { useEffect } from 'react';
|
|
14
|
+
|
|
15
|
+
import React from 'react';
|
|
16
|
+
import { ScrollView, Text, TouchableOpacity, View } from 'react-native';
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
export interface EventSchedule2Args {
|
|
20
|
+
|
|
21
|
+
}
|
|
22
|
+
export interface EventSchedule2Props {
|
|
23
|
+
|
|
24
|
+
}
|
|
25
|
+
function m(props: EventSchedule2Props): any {
|
|
26
|
+
const { url } = LibNavigation.getArgsAll(props)
|
|
27
|
+
|
|
28
|
+
const [result, setResult] = useSafeState()
|
|
29
|
+
|
|
30
|
+
useEffect(() => {
|
|
31
|
+
loadData()
|
|
32
|
+
}, [])
|
|
33
|
+
|
|
34
|
+
function loadData() {
|
|
35
|
+
new LibCurl(url, null, (res, msg) => {
|
|
36
|
+
setResult(res)
|
|
37
|
+
}, (err) => {
|
|
38
|
+
LibToastProperty.show(err?.message)
|
|
39
|
+
})
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
if (!result) {
|
|
43
|
+
return <LibLoading />
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
function renderArtist(item: any, i: number) {
|
|
47
|
+
return (
|
|
48
|
+
<View key={i} style={{ margin: 15 }}>
|
|
49
|
+
{
|
|
50
|
+
item?.image != "" &&
|
|
51
|
+
<LibPicture source={{ uri: item?.image }} style={{ height: LibStyle.width * 9 / 16, width: LibStyle.width, marginTop: -15, marginLeft: -15, resizeMode: 'cover' }} />
|
|
52
|
+
}
|
|
53
|
+
<Text allowFontScaling={false} style={{ marginTop: 10, fontFamily: "Arial", fontSize: 16, fontWeight: "bold", fontStyle: "normal", letterSpacing: 0, marginBottom: 7 }}>{item?.name || ""}</Text>
|
|
54
|
+
<View style={{ borderRadius: 10, overflow: 'hidden' }}>
|
|
55
|
+
{
|
|
56
|
+
item?.description != "" &&
|
|
57
|
+
<LibWebview source={{ html: item?.description }} onFinishLoad={() => { }} style={{ marginLeft: -20 }} />
|
|
58
|
+
}
|
|
59
|
+
</View>
|
|
60
|
+
{
|
|
61
|
+
item?.video != "" &&
|
|
62
|
+
<>
|
|
63
|
+
<Text allowFontScaling={false} style={{ marginLeft: 0, marginHorizontal: 20, marginTop: 10, fontFamily: "Arial", fontSize: 13, fontWeight: "bold", fontStyle: "normal", lineHeight: 22, letterSpacing: 0, color: "#4a4a4a" }} >{esp.lang("event/schedule", "text_vide")}</Text>
|
|
64
|
+
<TouchableOpacity style={{ borderRadius: 10, overflow: 'hidden' }} onPress={() => LibNavigation.navigate('lib/video', { code: item?.video })} >
|
|
65
|
+
<LibPicture source={{ uri: LibVideoProperty.getUrlThumbnail(item?.video) }} style={{ height: LibStyle.width * 9 / 16, width: LibStyle.width - 30, marginLeft: 0, marginHorizontal: 20, resizeMode: 'cover' }} />
|
|
66
|
+
</TouchableOpacity>
|
|
67
|
+
</>
|
|
68
|
+
}
|
|
69
|
+
</View>
|
|
70
|
+
)
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
return (
|
|
74
|
+
<View style={{ flex: 1, backgroundColor: LibStyle.colorBgGrey }}>
|
|
75
|
+
<EventHeader />
|
|
76
|
+
|
|
77
|
+
<ScrollView>
|
|
78
|
+
{
|
|
79
|
+
result?.length > 0 && result?.map?.(renderArtist)
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
</ScrollView>
|
|
83
|
+
|
|
84
|
+
</View>
|
|
85
|
+
)
|
|
86
|
+
}
|
package/event/seat_map_new.tsx
CHANGED
|
@@ -43,7 +43,7 @@ export function clearHoldedSeats() {
|
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
export default function m(props: any): any {
|
|
46
|
-
const { dataTicket
|
|
46
|
+
const { dataTicket } = LibNavigation.getArgsAll<any>(props)
|
|
47
47
|
const qty = dataTicket?.qty
|
|
48
48
|
|
|
49
49
|
const eventData = {
|
|
@@ -282,7 +282,7 @@ export default function m(props: any): any {
|
|
|
282
282
|
price_id: dataTicket?.selected_ticket?.price_id,
|
|
283
283
|
ondate: dataTicket?.ondate || dataTicket?.selected_ticket?.list?.ondate
|
|
284
284
|
}, (res, msg) => {
|
|
285
|
-
|
|
285
|
+
|
|
286
286
|
setBoundingBox(res.metadata.bounding_box)
|
|
287
287
|
let x = res.layout.split(';').map((item: any) => item.split(',')).map(([x, y, seatName, status]: any) => [Number(x), Number(y), seatName, Number(status)])
|
|
288
288
|
let updated = updateIndexByRes(x, seatBooked)
|
|
@@ -306,6 +306,7 @@ export default function m(props: any): any {
|
|
|
306
306
|
}, (res, msg) => {
|
|
307
307
|
loadDataSeatmap(res)
|
|
308
308
|
setErrBookedSeat(undefined)
|
|
309
|
+
|
|
309
310
|
}, (err) => {
|
|
310
311
|
setErrBookedSeat(err?.message)
|
|
311
312
|
})
|
|
@@ -335,7 +336,7 @@ export default function m(props: any): any {
|
|
|
335
336
|
|
|
336
337
|
return (
|
|
337
338
|
<View key={scale} style={{ flex: 1, backgroundColor: LibStyle.colorBgGrey }} >
|
|
338
|
-
<EventHeader title={esp.lang("event/seat_map", "header_title")} />
|
|
339
|
+
<EventHeader title={esp.lang("event/seat_map", "header_title")} subtitle={dataTicket?.selected_ticket?.type} />
|
|
339
340
|
<View style={{ flex: 1 }}>
|
|
340
341
|
<View style={{ marginBottom: 5, }}>
|
|
341
342
|
<ScrollView style={{ padding: 10, paddingLeft: 0, }} horizontal>
|
|
@@ -358,7 +359,6 @@ export default function m(props: any): any {
|
|
|
358
359
|
style={{
|
|
359
360
|
width: width * scale,
|
|
360
361
|
height: height * scale,
|
|
361
|
-
padding: 10,
|
|
362
362
|
backgroundColor: LibStyle.colorBgGrey,
|
|
363
363
|
|
|
364
364
|
}}>
|
package/event/ticket_list2.tsx
CHANGED
|
@@ -139,7 +139,7 @@ export default function m(props: EventTicket_list2Props): any {
|
|
|
139
139
|
|
|
140
140
|
const [unAvailableResult, setUnavailableResult] = useLazyState<any>()
|
|
141
141
|
const [, setHasAdditionGlobal, getHasAdditionGlobal] = useLazyState<any>()
|
|
142
|
-
const [availableResult, setAvailableResult, getAvailableResult] = useSafeState<
|
|
142
|
+
const [availableResult, setAvailableResult, getAvailableResult] = useSafeState<any>()
|
|
143
143
|
const [, setDataPostBooking, getDataPostBooking] = useLazyState<any>([])
|
|
144
144
|
const [dataAddition, setDataAddition] = useSafeState<any>([])
|
|
145
145
|
const [isPass, setIsPass] = useSafeState(true)
|
|
@@ -252,6 +252,7 @@ export default function m(props: EventTicket_list2Props): any {
|
|
|
252
252
|
}
|
|
253
253
|
|
|
254
254
|
const selectedPriceIds = getDataPostBooking().filter((x: any) => x.selected == 1).map((x: any) => x.price_id)
|
|
255
|
+
|
|
255
256
|
curlPriceConfig(selectedPriceIds, (filteredFee) => {
|
|
256
257
|
const editedDataTicket = getDataPostBooking().map((item: any) => {
|
|
257
258
|
const priceId = item.price_id;
|
|
@@ -263,10 +264,20 @@ export default function m(props: EventTicket_list2Props): any {
|
|
|
263
264
|
}
|
|
264
265
|
return item;
|
|
265
266
|
})
|
|
267
|
+
|
|
268
|
+
// esp.log({
|
|
269
|
+
// order_type: EventConfigProperty?.state()?.get()?.order_type?.ticket,
|
|
270
|
+
// dataEvent: dataEvent,
|
|
271
|
+
// dataTicket: editedDataTicket.filter((x: any) => x.selected == 1),
|
|
272
|
+
// subscribed: subscribed,
|
|
273
|
+
// url_payment: urlPayment,
|
|
274
|
+
// show_fee_percentage
|
|
275
|
+
// });
|
|
276
|
+
|
|
266
277
|
LibNavigation.navigate('payment/ticket_multi', {
|
|
267
278
|
order_type: EventConfigProperty?.state()?.get()?.order_type?.ticket,
|
|
268
279
|
dataEvent: dataEvent,
|
|
269
|
-
dataTicket: editedDataTicket,
|
|
280
|
+
dataTicket: editedDataTicket?.filter((item: any) => item.selected == 1),
|
|
270
281
|
subscribed: subscribed,
|
|
271
282
|
url_payment: urlPayment,
|
|
272
283
|
show_fee_percentage
|
|
@@ -304,7 +315,6 @@ export default function m(props: EventTicket_list2Props): any {
|
|
|
304
315
|
|
|
305
316
|
function loadData() {
|
|
306
317
|
new LibCurl(url, null, (res, msg) => {
|
|
307
|
-
esp.log(res, url);
|
|
308
318
|
const availablePriceType = LibObject.update(res, (arr: any[]) => arr.filter((x) => x.status != 0))('price_type')
|
|
309
319
|
const unAvailablePriceType = LibObject.update(res, (arr: any[]) => arr.filter((x) => x.status == 0))('price_type')
|
|
310
320
|
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
// withHooks
|
|
2
|
+
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { View } from 'react-native';
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
export interface EventTicket_list_itemArgs {
|
|
8
|
+
|
|
9
|
+
}
|
|
10
|
+
export interface EventTicket_list_itemProps {
|
|
11
|
+
|
|
12
|
+
}
|
|
13
|
+
export default function m(props: EventTicket_list_itemProps): any {
|
|
14
|
+
let priceList = [
|
|
15
|
+
{
|
|
16
|
+
"price_id": "2679",
|
|
17
|
+
"name": "Online Generate",
|
|
18
|
+
"price_date": "0",
|
|
19
|
+
"use_code": "0",
|
|
20
|
+
"price_type_info": "",
|
|
21
|
+
"status": "1",
|
|
22
|
+
"currency": "IDR",
|
|
23
|
+
"qty_min": "1",
|
|
24
|
+
"qty_max": "10",
|
|
25
|
+
"label": "",
|
|
26
|
+
"label_color": "#000000",
|
|
27
|
+
"list": [
|
|
28
|
+
{
|
|
29
|
+
"date_id": 0,
|
|
30
|
+
"ondate": "0000-00-00",
|
|
31
|
+
"price": "0.00",
|
|
32
|
+
"status": "1",
|
|
33
|
+
"quota_used": 0,
|
|
34
|
+
"show_price": 1,
|
|
35
|
+
"index_id": "2679-0000-00-00"
|
|
36
|
+
}
|
|
37
|
+
],
|
|
38
|
+
"url_config": "https://api.test.bbo.co.id/v2/event_detail_price_config"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"price_id": "2680",
|
|
42
|
+
"name": "Online by date Generate",
|
|
43
|
+
"price_date": "1",
|
|
44
|
+
"use_code": "0",
|
|
45
|
+
"price_type_info": "",
|
|
46
|
+
"status": 0,
|
|
47
|
+
"currency": "IDR",
|
|
48
|
+
"qty_min": "1",
|
|
49
|
+
"qty_max": "10",
|
|
50
|
+
"label": "",
|
|
51
|
+
"label_color": "#000000",
|
|
52
|
+
"list": [],
|
|
53
|
+
"url_config": "https://api.test.bbo.co.id/v2/event_detail_price_config"
|
|
54
|
+
}
|
|
55
|
+
]
|
|
56
|
+
|
|
57
|
+
return (
|
|
58
|
+
<View>
|
|
59
|
+
</View>
|
|
60
|
+
)
|
|
61
|
+
}
|