esoftplay-event 0.0.2-u → 0.0.2-w
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 +1 -0
- package/event/countdown.tsx +10 -6
- package/event/detail.tsx +1 -0
- package/event/order_detail.tsx +7 -2
- package/event/order_detail_upgrade.tsx +1 -1
- package/event/order_detail_upgrade_payment.tsx +4 -3
- package/event/order_reschedule.tsx +29 -16
- package/id.json +1 -0
- package/package.json +1 -1
package/event/artist.tsx
CHANGED
|
@@ -39,6 +39,7 @@ export default function m(props: BigbangArtistProps): any {
|
|
|
39
39
|
|
|
40
40
|
new LibCurl(url, null,
|
|
41
41
|
(res) => {
|
|
42
|
+
esp.modProp("event/countdown").eventURI.set(url)
|
|
42
43
|
esp.log({ res });
|
|
43
44
|
new LibCurl(res?.[0]?.url_event || `event_detail/${res?.[0]?.event_id}`, null, (res) => {
|
|
44
45
|
setResultEvent(res)
|
package/event/countdown.tsx
CHANGED
|
@@ -23,6 +23,8 @@ export const countdownTime = useGlobalState<any>('0')
|
|
|
23
23
|
|
|
24
24
|
export const releaseQueue = useGlobalSubscriber()
|
|
25
25
|
|
|
26
|
+
export const eventURI = useGlobalState<string>('')
|
|
27
|
+
|
|
26
28
|
export default function m(props: EventCountdownProps): any {
|
|
27
29
|
const [timer] = countdownTime.useState()
|
|
28
30
|
const routes = UserRoutes.state().useSelector((x) => x?.routes)
|
|
@@ -36,6 +38,7 @@ export default function m(props: EventCountdownProps): any {
|
|
|
36
38
|
doneQueue(pathQueue, event_id, key, () => { })
|
|
37
39
|
EventQueue_pricingProperty.state().reset()
|
|
38
40
|
countdownTime.reset()
|
|
41
|
+
eventURI.reset()
|
|
39
42
|
}
|
|
40
43
|
})
|
|
41
44
|
|
|
@@ -57,13 +60,14 @@ export default function m(props: EventCountdownProps): any {
|
|
|
57
60
|
<EventCountdown_timestamp
|
|
58
61
|
onExpired={() => {
|
|
59
62
|
const routeNames = UserRoutes.state()?.get()?.routes?.map?.((x: any) => x.name)
|
|
60
|
-
if (routeNames.includes("event/artist"))
|
|
61
|
-
LibNavigation.navigate("event/artist")
|
|
62
|
-
else if (routeNames.includes("event/detail"))
|
|
63
|
-
LibNavigation.navigate("event/detail")
|
|
64
|
-
|
|
65
|
-
|
|
63
|
+
if (routeNames.includes("event/artist")) {
|
|
64
|
+
LibNavigation.navigate("event/artist", { url: eventURI.get() })
|
|
65
|
+
} else if (routeNames.includes("event/detail")) {
|
|
66
|
+
LibNavigation.navigate("event/detail", { url: eventURI.get() })
|
|
67
|
+
}
|
|
68
|
+
LibNavigation.backToRoot()
|
|
66
69
|
countdownTime.reset()
|
|
70
|
+
eventURI.reset()
|
|
67
71
|
}}
|
|
68
72
|
expiredTimestamp={timer}
|
|
69
73
|
style={{ color: "#fff" }} />
|
package/event/detail.tsx
CHANGED
|
@@ -41,6 +41,7 @@ export default function m(props: EventDetailProps): any {
|
|
|
41
41
|
function loadData(): void {
|
|
42
42
|
// CacheHit.doHit(url)
|
|
43
43
|
new LibCurl(url, null, (res, msg) => {
|
|
44
|
+
esp.modProp("event/countdown").eventURI.set(url)
|
|
44
45
|
EventFirebase_socketProperty.eventIdQueue.set(res.id)
|
|
45
46
|
setResult(res)
|
|
46
47
|
if (res.allotment) {
|
package/event/order_detail.tsx
CHANGED
|
@@ -154,6 +154,7 @@ export default function m(props: EventOrder_detailProps): any {
|
|
|
154
154
|
}, 1)
|
|
155
155
|
}
|
|
156
156
|
|
|
157
|
+
|
|
157
158
|
function loadDataAddonsBooked(url: string) {
|
|
158
159
|
new LibCurl(url, null, (ress: any) => {
|
|
159
160
|
setAddOnsBooked(ress)
|
|
@@ -683,7 +684,11 @@ export default function m(props: EventOrder_detailProps): any {
|
|
|
683
684
|
<LibSlidingup ref={dialogQtyAddons}>
|
|
684
685
|
<View style={{ backgroundColor: 'white', maxHeight: LibStyle.height - (LibStyle.height / 3), borderTopRightRadius: 20, borderTopLeftRadius: 20, padding: 20 }}>
|
|
685
686
|
<Text style={{ fontFamily: "Arial", fontSize: 12, fontWeight: "bold", color: "#b7b7b7" }} >{esp.lang("event/order_detail", "addons")}</Text>
|
|
686
|
-
<Text style={{ fontFamily: "Arial",
|
|
687
|
+
<Text style={{ fontFamily: "Arial", fontSize: 16, fontWeight: "bold", color: "#4a4a4a" }} >{getSelectedAddon()?.title}</Text>
|
|
688
|
+
{
|
|
689
|
+
getSelectedAddon()?.info != "" &&
|
|
690
|
+
<EventHtmltext style={{ fontFamily: "Arial", marginBottom: 10, fontSize: 12, marginLeft: 10, color: "#b7b7b7" }} >{getSelectedAddon()?.info}</EventHtmltext>
|
|
691
|
+
}
|
|
687
692
|
|
|
688
693
|
<ScrollView>
|
|
689
694
|
<Text allowFontScaling={false} style={{ marginVertical: 10, fontFamily: "Arial", fontSize: 16, fontWeight: "bold", fontStyle: "normal", letterSpacing: 1.5, color: "#000" }}>{esp.lang("event/order_detail_share", "chose_ticket")}</Text>
|
|
@@ -794,7 +799,7 @@ export default function m(props: EventOrder_detailProps): any {
|
|
|
794
799
|
icon={'plus-circle-outline'}
|
|
795
800
|
title={item?.title}
|
|
796
801
|
subtitle={item?.ondate != "0000-00-00" ? LibUtils.moment(item.ondate).format("DD MMM YYYY") : ''}
|
|
797
|
-
info={item
|
|
802
|
+
info={item?.info}
|
|
798
803
|
/>
|
|
799
804
|
)
|
|
800
805
|
})
|
|
@@ -114,7 +114,7 @@ export default function m(props: EventOrder_detail_upgradeProps): any {
|
|
|
114
114
|
<EventHtmltext allowFontScaling={false} style={{ flexWrap: 'wrap', fontFamily: "Arial", fontSize: 11, fontStyle: "normal", letterSpacing: 0, color: '#999' }}>{item.info}</EventHtmltext>
|
|
115
115
|
}
|
|
116
116
|
</View>
|
|
117
|
-
<Text allowFontScaling={false} style={{ textAlign: 'center', fontSize: 14, fontWeight: 'bold', marginTop: 5, color: item.status != 1 ? "#c9c9c9" : selTic ? LibStyle.colorBlue : "#000" }}>{"+ "
|
|
117
|
+
<Text allowFontScaling={false} style={{ textAlign: 'center', fontSize: 14, fontWeight: 'bold', marginTop: 5, color: item.status != 1 ? "#c9c9c9" : selTic ? LibStyle.colorBlue : "#000" }}>{"+ "}{item?.is_remainer == "0" ? LibUtils.money(item?.price_difference, item?.currency) : LibUtils.money(item?.amount_difference, item?.currency)}</Text>
|
|
118
118
|
|
|
119
119
|
</View>
|
|
120
120
|
</View>
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { useMemo, useRef } from 'react';
|
|
3
3
|
|
|
4
4
|
import { BigbangPayment_detail_ticket, BigbangPayment_detail_ticketProperty } from 'esoftplay/cache/bigbang/payment_detail_ticket/import';
|
|
5
|
-
import { BigbangPayment_list } from "esoftplay/cache/bigbang/payment_list/import";
|
|
5
|
+
import { BigbangPayment_list, BigbangPayment_listProperty } from "esoftplay/cache/bigbang/payment_list/import";
|
|
6
6
|
import { EventButton } from "esoftplay/cache/event/button/import";
|
|
7
7
|
import { EventHeader } from "esoftplay/cache/event/header/import";
|
|
8
8
|
import { EventTransaction } from 'esoftplay/cache/event/transaction/import';
|
|
@@ -28,9 +28,10 @@ export interface EventOrder_detail_upgrade_paymentArgs {
|
|
|
28
28
|
export interface EventOrder_detail_upgrade_paymentProps {
|
|
29
29
|
|
|
30
30
|
}
|
|
31
|
+
|
|
31
32
|
export default function m(props: EventOrder_detail_upgrade_paymentProps): any {
|
|
32
33
|
const { dataTicket, selectedTicket, fee_platform, fee_custom }: any = LibNavigation.getArgsAll(props)
|
|
33
|
-
const [selectedPayment, setSelectedPayment] =
|
|
34
|
+
const [selectedPayment, setSelectedPayment] = BigbangPayment_listProperty.paymentState.useState()
|
|
34
35
|
const [charge, setCharge] = useSafeState<any>(0)
|
|
35
36
|
const [chargePercent, setChargePercent] = useSafeState<any>()
|
|
36
37
|
|
|
@@ -111,7 +112,7 @@ export default function m(props: EventOrder_detail_upgrade_paymentProps): any {
|
|
|
111
112
|
return (percent * amount) / 100
|
|
112
113
|
}
|
|
113
114
|
|
|
114
|
-
const price = Number(selectedTicket?.selected_ticket?.price_to)
|
|
115
|
+
const price = Number(selectedTicket?.selected_ticket?.price_to || selectedTicket?.selected_ticket?.amount_difference)
|
|
115
116
|
const qty = Number(dataTicket?.qty_upgrade)
|
|
116
117
|
|
|
117
118
|
const calculate = PaymentFee_calculate(price, qty,
|
|
@@ -14,6 +14,7 @@ import { LibPicture } from 'esoftplay/cache/lib/picture/import';
|
|
|
14
14
|
import { LibProgress } from 'esoftplay/cache/lib/progress/import';
|
|
15
15
|
import { LibStyle } from 'esoftplay/cache/lib/style/import';
|
|
16
16
|
import { LibTextstyle } from 'esoftplay/cache/lib/textstyle/import';
|
|
17
|
+
import { LibTheme } from 'esoftplay/cache/lib/theme/import';
|
|
17
18
|
import { LibToastProperty } from 'esoftplay/cache/lib/toast/import';
|
|
18
19
|
import { LibUtils } from 'esoftplay/cache/lib/utils/import';
|
|
19
20
|
import esp from 'esoftplay/esp';
|
|
@@ -22,7 +23,7 @@ import moment from 'esoftplay/moment';
|
|
|
22
23
|
import useSafeState from 'esoftplay/state';
|
|
23
24
|
|
|
24
25
|
import React, { useEffect } from 'react';
|
|
25
|
-
import {
|
|
26
|
+
import { RefreshControl, ScrollView, Text, TouchableOpacity, View } from 'react-native';
|
|
26
27
|
|
|
27
28
|
|
|
28
29
|
export interface EventOrder_rescheduleArgs {
|
|
@@ -108,7 +109,7 @@ export default function m(props: EventOrder_rescheduleProps): any {
|
|
|
108
109
|
LibProgress.hide()
|
|
109
110
|
LibNavigation.backToRoot()
|
|
110
111
|
LibNavigation.navigate('event/order')
|
|
111
|
-
LibNavigation.navigate('event/order_detail', { url: res.url })
|
|
112
|
+
// LibNavigation.navigate('event/order_detail', { url: res.url })
|
|
112
113
|
}, (error) => {
|
|
113
114
|
LibProgress.hide()
|
|
114
115
|
LibDialog.warning(esp.lang("event/order_reschedule", "process_er"), error?.message)
|
|
@@ -291,7 +292,7 @@ export default function m(props: EventOrder_rescheduleProps): any {
|
|
|
291
292
|
</View>
|
|
292
293
|
</View>
|
|
293
294
|
<View style={applyStyle({ marginLeft: 10, flexDirection: 'column', marginRight: 6 })} >
|
|
294
|
-
<Text allowFontScaling={false} style={applyStyle({ fontFamily: "Arial", fontSize: 12, fontWeight: "bold", fontStyle: "normal", letterSpacing: 0, textAlign: "right", color: _selectTicket ? "#3ea4dc" : '#999', opacity: opacityPassed })} >{LibUtils.money(item1.price, item1.currency)}</Text>
|
|
295
|
+
{/* <Text allowFontScaling={false} style={applyStyle({ fontFamily: "Arial", fontSize: 12, fontWeight: "bold", fontStyle: "normal", letterSpacing: 0, textAlign: "right", color: _selectTicket ? "#3ea4dc" : '#999', opacity: opacityPassed })} >{LibUtils.money(item1.price, item1.currency)}</Text> */}
|
|
295
296
|
</View>
|
|
296
297
|
|
|
297
298
|
<TouchableOpacity onPress={() => {
|
|
@@ -313,7 +314,6 @@ export default function m(props: EventOrder_rescheduleProps): any {
|
|
|
313
314
|
)
|
|
314
315
|
}
|
|
315
316
|
|
|
316
|
-
esp.log(result);
|
|
317
317
|
function renderRefundList(item: any, i: number) {
|
|
318
318
|
let _selectTicket = item.hasOwnProperty('check') && item.check == 1
|
|
319
319
|
const styleID_12nkjf: any = { marginLeft: 10, textDecorationLine: 'line-through', textDecorationStyle: 'solid', opacity: item.is_refundable == 1 ? 1 : 0.5, marginTop: 4, fontFamily: "Arial", fontSize: 12, fontWeight: "normal", fontStyle: "normal", letterSpacing: 0, color: _selectTicket ? "#3ea4dc" : '#999' }
|
|
@@ -333,9 +333,15 @@ export default function m(props: EventOrder_rescheduleProps): any {
|
|
|
333
333
|
<LibTextstyle textStyle='caption1' text={esp.lang("event/order_reschedule", "chared", item.qty_shared)} style={{ color: 'orange' }} />
|
|
334
334
|
}
|
|
335
335
|
<Text allowFontScaling={false} style={{ opacity: item.is_refundable == 1 ? 1 : 0.5, fontFamily: "Arial", fontSize: 10, marginBottom: 4, fontWeight: "normal", fontStyle: "normal", letterSpacing: 0.23, color: LibStyle.colorRed }}>{item.refund == "0.00" ? esp.lang("event/order_reschedule", "cant_refund") : esp.lang("event/order_reschedule", "refundable", LibUtils.numberAbsolute(item.refund).toString())}</Text>
|
|
336
|
-
<Text allowFontScaling={false} style={applyStyle({ fontFamily: "Arial", fontSize: 14, fontWeight: "bold", fontStyle: "normal", letterSpacing: 0, color: _selectTicket ? "#3ea4dc" :
|
|
336
|
+
<Text allowFontScaling={false} style={applyStyle({ fontFamily: "Arial", fontSize: 14, fontWeight: "bold", fontStyle: "normal", letterSpacing: 0, color: _selectTicket ? "#3ea4dc" : LibTheme._colorTextSecondary() })}>{esp.lang("ticket/refund", "ticket")} {item.price_name + " (" + item.qty + " " + esp.lang("ticket/refund", "ticket") + ") "}</Text>
|
|
337
337
|
<View style={{ flexDirection: 'row', alignContent: 'center', alignItems: 'center' }}>
|
|
338
|
-
<
|
|
338
|
+
<View style={{ flexDirection: 'row', marginTop: 4, alignContent: 'center', alignItems: 'center' }}>
|
|
339
|
+
<Text allowFontScaling={false} style={applyStyle({ fontFamily: "Arial", fontSize: 16, fontWeight: "normal", fontStyle: "normal", letterSpacing: 0, color: _selectTicket ? "#3ea4dc" : LibTheme._colorTextSecondary() })}>{LibUtils.money(item.total, item.currency)}</Text>
|
|
340
|
+
{
|
|
341
|
+
item?.tax != "0" &&
|
|
342
|
+
<Text allowFontScaling={false} style={{ marginLeft: 10, fontFamily: "Arial", fontSize: 12, fontWeight: "normal", fontStyle: "normal", letterSpacing: 0, color: LibTheme._colorTextTertiary() }}>{esp.lang("event/order_reschedule", "price+tax")}</Text>
|
|
343
|
+
}
|
|
344
|
+
</View>
|
|
339
345
|
{
|
|
340
346
|
item.refund != "0.00" && item.refund != "100.00" &&
|
|
341
347
|
<Text allowFontScaling={false} style={styleID_12nkjf}>{LibUtils.money(item.price)}</Text>
|
|
@@ -362,16 +368,20 @@ export default function m(props: EventOrder_rescheduleProps): any {
|
|
|
362
368
|
<EventHeader title={result?.global_refundable == 1 ? esp.lang("event/order_reschedule", "refund_rescedule") : esp.lang("event/order_reschedule", "rescedule")} />
|
|
363
369
|
{
|
|
364
370
|
result?.global_refundable == 1 &&
|
|
365
|
-
<View style={{ margin: 15,
|
|
371
|
+
<View style={{ margin: 15, padding: 3, borderRadius: 5, backgroundColor: '#fff', flexDirection: 'row' }}>
|
|
366
372
|
{
|
|
367
373
|
defaultTabs.map((item: any, i: number) => {
|
|
374
|
+
let active = item.id == activeTab
|
|
368
375
|
return (
|
|
369
|
-
<
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
376
|
+
<TouchableOpacity
|
|
377
|
+
key={i}
|
|
378
|
+
onPress={() => {
|
|
379
|
+
loadData()
|
|
380
|
+
setActiveTab(item.id)()
|
|
381
|
+
}}
|
|
382
|
+
style={{ borderRadius: 5, padding: 5, alignContent: 'center', alignItems: 'center', justifyContent: 'center', flex: 1, backgroundColor: active ? LibStyle.colorPrimary : '#fff', marginRight: 1, marginLeft: 1 }}>
|
|
383
|
+
<Text allowFontScaling={false} style={{ fontSize: active ? 16 : 12, color: active ? "#fff" : "#000", fontWeight: active ? 'bold' : 'normal' }}>{item?.title}</Text>
|
|
384
|
+
</TouchableOpacity>
|
|
375
385
|
)
|
|
376
386
|
})
|
|
377
387
|
}
|
|
@@ -381,8 +391,11 @@ export default function m(props: EventOrder_rescheduleProps): any {
|
|
|
381
391
|
<ScrollView refreshControl={
|
|
382
392
|
<RefreshControl refreshing={refreshing} onRefresh={onRefresh} />
|
|
383
393
|
}>
|
|
384
|
-
<View style={{ marginTop: result?.global_refundable == 1 ? 0 : 10, margin: 15,
|
|
385
|
-
|
|
394
|
+
<View style={{ marginTop: result?.global_refundable == 1 ? 0 : 10, margin: 15, borderRadius: 10, backgroundColor: '#fff', paddingBottom: activeTab == 2 ? 10 : 0 }}>
|
|
395
|
+
{
|
|
396
|
+
result?.image != "" &&
|
|
397
|
+
<LibPicture source={{ uri: result?.image }} style={applyStyle({ height: imgHeight, width: imgWidth, resizeMode: 'cover' })} />
|
|
398
|
+
}
|
|
386
399
|
|
|
387
400
|
<View style={{ flexDirection: 'row', margin: 14, marginTop: 4, justifyContent: 'space-between' }}>
|
|
388
401
|
<Text allowFontScaling={false} style={{ marginTop: 14, fontFamily: "Arial", fontSize: 20, fontWeight: "bold", fontStyle: "normal", letterSpacing: 0, color: "#484848" }}>{result?.title}</Text>
|
|
@@ -401,7 +414,7 @@ export default function m(props: EventOrder_rescheduleProps): any {
|
|
|
401
414
|
|
|
402
415
|
{
|
|
403
416
|
activeTab == 2 &&
|
|
404
|
-
<View style={{ padding: 14, backgroundColor: '#f1f2f3' }}>
|
|
417
|
+
<View style={{ padding: 14, marginTop: 10, backgroundColor: '#f1f2f3' }}>
|
|
405
418
|
<Text style={{ fontFamily: "Arial", fontSize: 12, fontWeight: "bold", fontStyle: "normal", letterSpacing: 0 }} >{esp.lang("event/order_reschedule", "ready_ticket")}</Text>
|
|
406
419
|
</View>
|
|
407
420
|
}
|
package/id.json
CHANGED
|
@@ -1126,6 +1126,7 @@
|
|
|
1126
1126
|
"no": "Tidak",
|
|
1127
1127
|
"no_ticket_need_reschedule_or_refund": "Tidak ada Tiket yang perlu di Reschedule / Refund",
|
|
1128
1128
|
"ok": "Ok",
|
|
1129
|
+
"price+tax": "(harga + pajak)",
|
|
1129
1130
|
"process_er": "Oops",
|
|
1130
1131
|
"qty_left": "Tersisa %s Tiket",
|
|
1131
1132
|
"ready_ticket": "Tiket yang Tersedia",
|