esoftplay-event 0.0.1 → 0.0.2-b
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 +11 -7
- package/event/artist_detail.tsx +3 -5
- package/event/artist_detailv2.tsx +386 -0
- package/event/artistv2.tsx +162 -0
- package/event/button_order_detail.tsx +43 -0
- package/event/countdown_base.tsx +16 -3
- package/event/countdown_event.tsx +48 -0
- package/event/detail.tsx +30 -37
- package/event/detail2.tsx +354 -0
- package/event/exchange_ticket.tsx +1 -1
- package/event/exchange_ticket_list.tsx +2 -3
- package/event/exchange_ticket_result.tsx +1 -1
- package/event/firebase_socket.ts +21 -11
- package/event/loading_page.tsx +4 -2
- package/event/order.tsx +23 -36
- package/event/order_detail.tsx +204 -61
- package/event/order_detail_upgrade.tsx +8 -5
- package/event/order_detail_upgrade_payment.tsx +17 -11
- package/event/order_detail_visitor.tsx +33 -33
- package/event/order_detail_waiting.tsx +45 -20
- package/event/order_item.tsx +1 -1
- package/event/order_lottery.tsx +49 -37
- package/event/order_reschedule.tsx +50 -52
- package/event/order_share_to.tsx +11 -24
- package/event/order_share_to_detail.tsx +8 -3
- package/event/order_waiting.tsx +1 -1
- package/event/queue_pricing.tsx +16 -3
- package/event/refresh_button.tsx +3 -5
- package/event/scan_item.tsx +2 -2
- package/event/seat.tsx +34 -13
- package/event/seat_map_new.tsx +316 -0
- 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/test.tsx +240 -155
- package/event/ticket_list.tsx +48 -20
- package/event/ticket_list2.tsx +112 -39
- package/event/tms_check_code.tsx +6 -0
- package/event/tms_check_ticket_result.tsx +51 -13
- package/event/tms_dashboard.tsx +85 -3
- package/event/tms_gate.tsx +6 -0
- package/event/tms_home.tsx +1 -4
- package/event/tms_in_failed.tsx +1 -1
- package/event/tms_in_hall.tsx +4 -1
- package/event/tms_in_hall_failed.tsx +8 -10
- package/event/tms_in_log.tsx +2 -0
- package/event/tms_in_success.tsx +1 -1
- package/event/tms_log.tsx +10 -25
- package/event/tms_out.tsx +1 -1
- package/event/tms_out_failed.tsx +1 -1
- package/event/visitor_input.tsx +22 -5
- package/event/visitor_inputv2.tsx +453 -0
- package/event/voucher.tsx +2 -0
- package/event/voucher2.tsx +14 -6
- package/id.json +43 -9
- package/package.json +1 -1
- package/event/entrance.tsx +0 -215
- package/event/entrance_again.tsx +0 -199
- package/event/entrance_failed.tsx +0 -190
- package/event/entrance_idcard.tsx +0 -199
- package/event/entrance_list.tsx +0 -264
- package/event/entrance_list_item.tsx +0 -88
- package/event/entrance_log.tsx +0 -130
- package/event/entrance_success.tsx +0 -153
- package/event/entrance_warning.tsx +0 -91
- package/event/exit.tsx +0 -91
- package/event/exit_failed.tsx +0 -135
- package/event/exit_list.tsx +0 -118
- package/event/exit_log.tsx +0 -130
- package/event/exit_success.tsx +0 -143
- package/event/exit_temporary.tsx +0 -226
- package/event/firebase_socket.debug.ts +0 -260
- package/event/firebase_socket.live.ts +0 -335
- package/event/hall_in.tsx +0 -148
- package/event/hall_in_failed.tsx +0 -270
- package/event/hall_in_list.tsx +0 -222
- package/event/hall_in_log.tsx +0 -134
- package/event/hall_in_success.tsx +0 -132
- package/event/hall_out.tsx +0 -143
- package/event/hall_out_failed.tsx +0 -133
- package/event/hall_out_list.tsx +0 -215
- package/event/hall_out_log.tsx +0 -133
- package/event/hall_out_success.tsx +0 -130
- package/event/log.tsx +0 -433
- package/event/seat_map_test.tsx +0 -401
|
@@ -5,11 +5,11 @@ import { EventButton } from 'esoftplay/cache/event/button/import';
|
|
|
5
5
|
import { EventExchange_ticketProperty } from 'esoftplay/cache/event/exchange_ticket/import';
|
|
6
6
|
import { EventExchange_ticket_resultProperty } from 'esoftplay/cache/event/exchange_ticket_result/import';
|
|
7
7
|
import { EventHeader } from 'esoftplay/cache/event/header/import';
|
|
8
|
+
import { EventTms_dashboardProperty } from 'esoftplay/cache/event/tms_dashboard/import';
|
|
8
9
|
import { LibCollaps } from 'esoftplay/cache/lib/collaps/import';
|
|
9
10
|
import { LibDialog } from 'esoftplay/cache/lib/dialog/import';
|
|
10
11
|
import { LibIcon } from 'esoftplay/cache/lib/icon/import';
|
|
11
12
|
import { LibList } from 'esoftplay/cache/lib/list/import';
|
|
12
|
-
import { LibNavigation } from 'esoftplay/cache/lib/navigation/import';
|
|
13
13
|
import { LibProgress } from 'esoftplay/cache/lib/progress/import';
|
|
14
14
|
import { LibSlidingup } from 'esoftplay/cache/lib/slidingup/import';
|
|
15
15
|
import { LibStyle } from 'esoftplay/cache/lib/style/import';
|
|
@@ -32,7 +32,6 @@ export interface EventExchange_ticket_listProps {
|
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
export default function m(props: EventExchange_ticket_listProps): any {
|
|
35
|
-
const { dataEvent } = LibNavigation.getArgsAll(props)
|
|
36
35
|
const log = EventExchange_ticketProperty.stateExchangeLog.useSelector(s => s)
|
|
37
36
|
const backup = EventExchange_ticket_resultProperty.stateListConfirm().useSelector(s => s)
|
|
38
37
|
const selectedRef = useRef<LibSlidingup>(null)
|
|
@@ -163,7 +162,7 @@ export default function m(props: EventExchange_ticket_listProps): any {
|
|
|
163
162
|
domain: esp.config('domain'),
|
|
164
163
|
tms_name: UserClass.state().get('name'),
|
|
165
164
|
email: UserClass.state().get('email'),
|
|
166
|
-
event_name:
|
|
165
|
+
event_name: EventTms_dashboardProperty.closingDataState()?.get()?.event_name,
|
|
167
166
|
data: EventExchange_ticketProperty.stateExchangeLog.get()
|
|
168
167
|
}, undefined, 2), '-1001737180019', undefined, () => {
|
|
169
168
|
EventExchange_ticketProperty.stateExchangeLog.reset()
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// withHooks
|
|
2
2
|
import { EventExchange_ticketProperty } from 'esoftplay/cache/event/exchange_ticket/import';
|
|
3
3
|
import { EventHeader } from 'esoftplay/cache/event/header/import';
|
|
4
|
+
import { EventOrder_itemProperty } from 'esoftplay/cache/event/order_item/import';
|
|
4
5
|
import { LibCurl } from 'esoftplay/cache/lib/curl/import';
|
|
5
6
|
import { LibDialog } from 'esoftplay/cache/lib/dialog/import';
|
|
6
7
|
import { LibLoading } from 'esoftplay/cache/lib/loading/import';
|
|
@@ -9,7 +10,6 @@ import { LibObject } from 'esoftplay/cache/lib/object/import';
|
|
|
9
10
|
import { LibStyle } from 'esoftplay/cache/lib/style/import';
|
|
10
11
|
import { LibToastProperty } from 'esoftplay/cache/lib/toast/import';
|
|
11
12
|
import { LibUtils } from 'esoftplay/cache/lib/utils/import';
|
|
12
|
-
import { EventOrder_itemProperty } from 'esoftplay/cache/event/order_item/import';
|
|
13
13
|
import esp from 'esoftplay/esp';
|
|
14
14
|
import useGlobalState, { useGlobalReturn } from 'esoftplay/global';
|
|
15
15
|
import useSafeState from 'esoftplay/state';
|
package/event/firebase_socket.ts
CHANGED
|
@@ -26,6 +26,10 @@ const state = useGlobalState(0)
|
|
|
26
26
|
export const lastKeyInPages = useGlobalState<string[]>([])
|
|
27
27
|
export const userIdKeyReplacer = useGlobalState<any>({})
|
|
28
28
|
|
|
29
|
+
function isValidEventId(event_id: string): boolean {
|
|
30
|
+
return !!event_id && event_id !== "undefined"
|
|
31
|
+
}
|
|
32
|
+
|
|
29
33
|
export default function useFirebaseSocket() {
|
|
30
34
|
const [status] = state.useState()
|
|
31
35
|
const isDirect = EventTms_homeProperty.state()
|
|
@@ -109,7 +113,11 @@ export default function useFirebaseSocket() {
|
|
|
109
113
|
const instance: any = esp.mod("firestore/index")().instance()
|
|
110
114
|
const db = getFirestore(instance)
|
|
111
115
|
|
|
112
|
-
if (
|
|
116
|
+
if (!isValidEventId(event_id)) {
|
|
117
|
+
return
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
if (userIdKeyReplacer.get()?.priority == 1 && userIdKeyReplacer.get()?.t) {
|
|
113
121
|
const coll = collection(db, [getEventPath(), path, event_id].join('/'));
|
|
114
122
|
const q = query(coll, orderBy('t', 'asc'), where("t", "==", userIdKeyReplacer.get().t));
|
|
115
123
|
getDocs(q).then((doc) => {
|
|
@@ -160,17 +168,19 @@ export default function useFirebaseSocket() {
|
|
|
160
168
|
// get weather function
|
|
161
169
|
|
|
162
170
|
function getQueue(path: string, event_id: string, _limit: number, cb: (idx: number, key: string) => void) {
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
171
|
+
if (userIdKeyReplacer.get()?.s) {
|
|
172
|
+
const instance: any = esp.mod("firestore/index")().instance()
|
|
173
|
+
const db = getFirestore(instance)
|
|
174
|
+
const coll = collection(db, [getEventPath(), path, event_id].join('/'));
|
|
175
|
+
const q = query(coll, orderBy('s', 'asc'), where("s", "<", userIdKeyReplacer.get().s));
|
|
176
|
+
getCountFromServer(q).then((v) => {
|
|
177
|
+
cb(v.data().count, userIdKeyReplacer.get().id)
|
|
178
|
+
}).catch((e) => {
|
|
179
|
+
getQueue(path, event_id, _limit, cb)
|
|
180
|
+
console.log({ e })
|
|
181
|
+
})
|
|
182
|
+
}
|
|
167
183
|
|
|
168
|
-
getCountFromServer(q).then((v) => {
|
|
169
|
-
cb(v.data().count, userIdKeyReplacer.get().id)
|
|
170
|
-
}).catch((e) => {
|
|
171
|
-
getQueue(path, event_id, _limit, cb)
|
|
172
|
-
console.log({ e })
|
|
173
|
-
})
|
|
174
184
|
// /* cleanup */
|
|
175
185
|
// const cdate = getDateTimebyGmt7().getTime()
|
|
176
186
|
// if (!cdate) {
|
package/event/loading_page.tsx
CHANGED
|
@@ -100,7 +100,8 @@ export default function m(props: EventLoading_pageProps): any {
|
|
|
100
100
|
loadingState.set(LibObject.unset(loadingState.get(), post.trx_id)())
|
|
101
101
|
const ticketNotAvailableCodes = ['EV034', 'EV036', 'EV038', 'EV039', 'EV040']
|
|
102
102
|
if (ticketNotAvailableCodes.includes(error.status_code)) {
|
|
103
|
-
LibNavigation.
|
|
103
|
+
LibNavigation.back()
|
|
104
|
+
// LibNavigation.navigate(post?.is_multi == 1 ? 'event/ticket_list2' : 'event/ticket_list')
|
|
104
105
|
}
|
|
105
106
|
if (error.status_code == 'EV033') {
|
|
106
107
|
LibDialog.custom(
|
|
@@ -153,7 +154,8 @@ export default function m(props: EventLoading_pageProps): any {
|
|
|
153
154
|
loadingState.set(LibObject.unset(loadingState.get(), post.trx_id)())
|
|
154
155
|
const ticketNotAvailableCodes = ['EV034', 'EV036', 'EV038', 'EV039', 'EV040']
|
|
155
156
|
if (ticketNotAvailableCodes.includes(error.status_code)) {
|
|
156
|
-
LibNavigation.
|
|
157
|
+
LibNavigation.back()
|
|
158
|
+
// LibNavigation.navigate(post?.is_multi == 1 ? 'event/ticket_list2' : 'event/ticket_list')
|
|
157
159
|
}
|
|
158
160
|
if (error.status_code == 'EV033') {
|
|
159
161
|
LibDialog.custom(
|
package/event/order.tsx
CHANGED
|
@@ -128,7 +128,8 @@ export default function m(props: EventOrderProps): any {
|
|
|
128
128
|
function renderItem(item: any) {
|
|
129
129
|
return (
|
|
130
130
|
<EventOrder_item item={item} onPress={() => {
|
|
131
|
-
|
|
131
|
+
// 7 pembayaran kadaluarsa
|
|
132
|
+
LibNavigation.navigate(status == "7" ? 'event/order_detail_waiting' : 'event/order_detail', { url: item.url })
|
|
132
133
|
}} />
|
|
133
134
|
)
|
|
134
135
|
}
|
|
@@ -156,41 +157,27 @@ export default function m(props: EventOrderProps): any {
|
|
|
156
157
|
return (
|
|
157
158
|
<View style={{ backgroundColor: LibStyle.colorBgGrey, flex: 1 }}>
|
|
158
159
|
<EventHeader title={esp.lang("event/order", "my_order")} />
|
|
159
|
-
{
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
<EventSection_menu size='line' />
|
|
181
|
-
</View>
|
|
182
|
-
:
|
|
183
|
-
<View style={{ margin: 15, marginBottom: 0, flexDirection: 'row', justifyContent: 'space-between' }}>
|
|
184
|
-
<View style={{ flex: 10 }}>
|
|
185
|
-
<Status status={status} onChangeStatus={setStatus} />
|
|
186
|
-
</View>
|
|
187
|
-
<TouchableOpacity onPress={() => {
|
|
188
|
-
dialogFilterDate.current!.show()
|
|
189
|
-
}} style={{ flex: 1, marginLeft: 15 }}>
|
|
190
|
-
<LibIcon name="calendar" />
|
|
191
|
-
</TouchableOpacity>
|
|
192
|
-
</View>
|
|
193
|
-
}
|
|
160
|
+
<View style={{ minHeight: 50 }} >
|
|
161
|
+
<LibScroll
|
|
162
|
+
initialNumToRender={20}
|
|
163
|
+
horizontal
|
|
164
|
+
>
|
|
165
|
+
<View style={{ width: 10 }} />
|
|
166
|
+
<Pressable
|
|
167
|
+
onPress={() => { statusRef.current?.show() }}
|
|
168
|
+
style={applyStyle({ height: 30, marginVertical: 10, marginRight: 10, borderRadius: 12, backgroundColor: 'white', borderColor: '#ccc', borderWidth: 1, paddingHorizontal: 10, justifyContent: 'center', flexDirection: 'row', alignItems: 'center' })} >
|
|
169
|
+
<LibTextstyle textStyle='footnote' text={allStatus[allStatus.findIndex((x) => String(x.code) == status)]?.text || esp.lang("event/order", "all_statis")} style={applyStyle({ fontSize: 11, color: "#4E4E4E", marginRight: 5 })} />
|
|
170
|
+
<LibIcon name='chevron-down' style={applyStyle({ color: "#4E4E4E" })} />
|
|
171
|
+
</Pressable>
|
|
172
|
+
<Pressable
|
|
173
|
+
onPress={() => { dialogFilterDate?.current?.show() }}
|
|
174
|
+
style={applyStyle({ height: 30, marginVertical: 10, marginRight: 10, borderRadius: 12, backgroundColor: 'white', borderColor: '#ccc', borderWidth: 1, paddingHorizontal: 10, justifyContent: 'center', flexDirection: 'row', alignItems: 'center' })} >
|
|
175
|
+
<LibTextstyle textStyle='footnote' text={selectedDate.id == 4 ? LibUtils.getDateRange(selectedDate?.date_start, selectedDate?.date_end) : selectedDate?.title} style={applyStyle({ fontSize: 11, color: "#4E4E4E", marginRight: 5 })} />
|
|
176
|
+
<LibIcon name='calendar' size={14} style={applyStyle({ color: "#4E4E4E" })} />
|
|
177
|
+
</Pressable>
|
|
178
|
+
</LibScroll>
|
|
179
|
+
<EventSection_menu size='line' />
|
|
180
|
+
</View>
|
|
194
181
|
|
|
195
182
|
<LibInfinite
|
|
196
183
|
url={buildUrl(url) + "&t=" + new Date().getTime()}
|
package/event/order_detail.tsx
CHANGED
|
@@ -20,9 +20,10 @@ 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 { EventButton_order_detail } from 'esoftplay/cache/event/button_order_detail/import';
|
|
24
|
+
import { EventConfigProperty } from 'esoftplay/cache/event/config/import';
|
|
23
25
|
import { EventHtmltext } from 'esoftplay/cache/event/htmltext/import';
|
|
24
26
|
import { EventIndexProperty } from 'esoftplay/cache/event/index/import';
|
|
25
|
-
import { EventOrder_detail_upgrade_button } from 'esoftplay/cache/event/order_detail_upgrade_button/import';
|
|
26
27
|
import { EventPopup } from 'esoftplay/cache/event/popup/import';
|
|
27
28
|
import { EventQr_bg } from 'esoftplay/cache/event/qr_bg/import';
|
|
28
29
|
import { EventRating } from 'esoftplay/cache/event/rating/import';
|
|
@@ -36,6 +37,7 @@ import useSafeState from 'esoftplay/state';
|
|
|
36
37
|
import useGlobalSubscriber, { useGlobalSubscriberReturn } from 'esoftplay/subscribe';
|
|
37
38
|
import React, { useEffect, useRef } from 'react';
|
|
38
39
|
import { Linking, Pressable, Text, TouchableOpacity, View } from 'react-native';
|
|
40
|
+
import { ScrollView } from 'react-native-gesture-handler';
|
|
39
41
|
import QRCode from 'react-native-qrcode-svg';
|
|
40
42
|
|
|
41
43
|
|
|
@@ -99,6 +101,7 @@ export default function m(props: EventOrder_detailProps): any {
|
|
|
99
101
|
const [user] = UserClass.state().useState()
|
|
100
102
|
|
|
101
103
|
let showQR = useRef<LibSlidingup>(null)
|
|
104
|
+
let dialogAddonList = useRef<LibSlidingup>(null)
|
|
102
105
|
const dialogSendBack = useRef<LibSlidingup>(null)
|
|
103
106
|
const url = LibNavigation.getArgs(props, 'url')
|
|
104
107
|
const [result, setResult] = useSafeState<any>(EventIndexProperty?.stateTicketCache()?.get()?.filter?.((x: any) => x.url?.replace?.('?id=', '/') == url?.replace?.('?id=', '/'))?.[0]?.detail)
|
|
@@ -109,6 +112,7 @@ export default function m(props: EventOrder_detailProps): any {
|
|
|
109
112
|
|
|
110
113
|
const [coupons, setCoupons] = useSafeState<any>()
|
|
111
114
|
const [qty, setQty] = useSafeState<number>(1)
|
|
115
|
+
const [, setGroupAddon, getGroupAddon] = useSafeState()
|
|
112
116
|
|
|
113
117
|
const dataOfflineReview = EventReview_addProperty.state().get()
|
|
114
118
|
let availableOfflineReview = dataOfflineReview?.filter((z: any) => z?.booking_id == result?.id)
|
|
@@ -133,8 +137,6 @@ export default function m(props: EventOrder_detailProps): any {
|
|
|
133
137
|
function loadData(): void {
|
|
134
138
|
new LibCurl(url + ((url.includes("?") ? "&" : "?") + 't=' + new Date().getTime()), null, (res: any) => {
|
|
135
139
|
setResult(res)
|
|
136
|
-
// esp.log(res);
|
|
137
|
-
|
|
138
140
|
new LibCurl(res?.url_coupon, null, (ress: any) => {
|
|
139
141
|
setCoupons(ress)
|
|
140
142
|
}, (error: any) => {
|
|
@@ -176,6 +178,7 @@ export default function m(props: EventOrder_detailProps): any {
|
|
|
176
178
|
}
|
|
177
179
|
|
|
178
180
|
useEffect(() => {
|
|
181
|
+
EventConfigProperty.curlConfig('v2/config_order_type')
|
|
179
182
|
loadData()
|
|
180
183
|
}, [])
|
|
181
184
|
|
|
@@ -204,21 +207,6 @@ export default function m(props: EventOrder_detailProps): any {
|
|
|
204
207
|
setDataReview(subs.getValue())
|
|
205
208
|
})
|
|
206
209
|
|
|
207
|
-
function doCancel(url: string): void {
|
|
208
|
-
LibDialog.warningConfirm(esp.lang("event/order_detail", "confirm"), esp.lang("event/order_detail", "cancel_this_order"), esp.lang("event/order_detail", "btn_yes"), () => {
|
|
209
|
-
LibProgress.show(esp.lang("event/order_detail", "please_wait"))
|
|
210
|
-
new LibCurl(url, null, (result: any, msg: any) => {
|
|
211
|
-
LibProgress.hide()
|
|
212
|
-
LibNavigation.back()
|
|
213
|
-
}, (error: any) => {
|
|
214
|
-
LibDialog.warning(esp.lang("event/order_detail", "cancel_err"), error?.message);
|
|
215
|
-
LibProgress.hide()
|
|
216
|
-
}, 1)
|
|
217
|
-
}, esp.lang("event/order_detail", "btn_cancel"), () => {
|
|
218
|
-
|
|
219
|
-
})
|
|
220
|
-
}
|
|
221
|
-
|
|
222
210
|
function addReturn(): void {
|
|
223
211
|
if (qty < Number(result.qty_returnable)) {
|
|
224
212
|
setQty(qty + 1)
|
|
@@ -229,10 +217,13 @@ export default function m(props: EventOrder_detailProps): any {
|
|
|
229
217
|
setQty(qty == 1 ? 1 : qty - 1)
|
|
230
218
|
}
|
|
231
219
|
|
|
232
|
-
function sendBack() {
|
|
220
|
+
function sendBack(p: any) {
|
|
233
221
|
LibDialog.confirm(esp.lang("event/order_detail", "warning"), esp.lang("event/order_detail", "return_this_ticket"), esp.lang("event/order_detail", "btn_yes"), () => {
|
|
234
222
|
LibProgress.show(esp.lang("event/order_detail", "please_wait"))
|
|
235
|
-
|
|
223
|
+
let post = {
|
|
224
|
+
pin: p
|
|
225
|
+
}
|
|
226
|
+
new LibCurl('event_booking_shared_return?booking_id=' + result?.id + '&qty_shared=' + qty, post, (res: any, msg: any) => {
|
|
236
227
|
// LibNotify(res)
|
|
237
228
|
LibProgress.hide()
|
|
238
229
|
LibDialog.info(esp.lang("event/order_detail", "information"), msg)
|
|
@@ -245,6 +236,55 @@ export default function m(props: EventOrder_detailProps): any {
|
|
|
245
236
|
}, esp.lang("event/order_detail", "btn_cancel"), () => { })
|
|
246
237
|
}
|
|
247
238
|
|
|
239
|
+
function loadDataAddons(id: any, url: string) {
|
|
240
|
+
LibProgress.show(esp.lang("event/order_detail", "wait"))
|
|
241
|
+
new LibCurl(url, null, (res: any, msg: any) => {
|
|
242
|
+
esp.log({ res });
|
|
243
|
+
LibProgress.hide()
|
|
244
|
+
let dataBookingEvent = {
|
|
245
|
+
event_id: res?.event_id,
|
|
246
|
+
event_title: res?.event_name,
|
|
247
|
+
selected_ticket: {
|
|
248
|
+
price_id: res?.price_id,
|
|
249
|
+
currency: res?.currency,
|
|
250
|
+
tax: res?.tax,
|
|
251
|
+
fee: res?.fee,
|
|
252
|
+
fee_percent: res?.fee_percent,
|
|
253
|
+
term: res?.term,
|
|
254
|
+
has_addition: res?.has_addition,
|
|
255
|
+
list: {
|
|
256
|
+
ondate: res?.ondate,
|
|
257
|
+
price: res?.price,
|
|
258
|
+
price_id: res?.price_id,
|
|
259
|
+
currency: res?.currency,
|
|
260
|
+
}
|
|
261
|
+
},
|
|
262
|
+
qty: result?.qty
|
|
263
|
+
}
|
|
264
|
+
let fee_platform = {
|
|
265
|
+
fee_platform_amount: res?.fee_platform?.fee_platform_amount,
|
|
266
|
+
fee_platform_type: res?.fee_platform?.fee_platform_type
|
|
267
|
+
}
|
|
268
|
+
let show_fee_percentage = res?.show_fee_percentage
|
|
269
|
+
let tax = res?.tax
|
|
270
|
+
let order_type = EventConfigProperty.state().get()?.order_type?.ticket
|
|
271
|
+
let addons_id = id
|
|
272
|
+
let booking_id_ref = result?.id
|
|
273
|
+
LibNavigation.navigate('payment/ticket', {
|
|
274
|
+
order_type: order_type,
|
|
275
|
+
tax: tax,
|
|
276
|
+
fee_platform: fee_platform,
|
|
277
|
+
dataBookingEvent: dataBookingEvent,
|
|
278
|
+
show_fee_percentage,
|
|
279
|
+
addons_id,
|
|
280
|
+
booking_id_ref
|
|
281
|
+
})
|
|
282
|
+
}, (err: any) => {
|
|
283
|
+
LibProgress.hide()
|
|
284
|
+
esp.log({ err });
|
|
285
|
+
}, 1)
|
|
286
|
+
}
|
|
287
|
+
|
|
248
288
|
if (result == undefined && !coupons) {
|
|
249
289
|
return (
|
|
250
290
|
<View style={{ flex: 1, backgroundColor: '#f6f6f6' }}>
|
|
@@ -345,6 +385,8 @@ export default function m(props: EventOrder_detailProps): any {
|
|
|
345
385
|
|
|
346
386
|
const termData = result?.term ? Object.values(result?.term) : []
|
|
347
387
|
|
|
388
|
+
// esp.log(getGroupAddon());
|
|
389
|
+
|
|
348
390
|
return (
|
|
349
391
|
<View style={{ flex: 1, backgroundColor: LibStyle.colorBgGrey }}>
|
|
350
392
|
<EventHeader title={esp.lang("event/order_detail", "order_detail")} />
|
|
@@ -365,6 +407,11 @@ export default function m(props: EventOrder_detailProps): any {
|
|
|
365
407
|
<View testID='price_name' style={{ marginTop: 10, borderWidth: 5, padding: 3, borderColor: result?.color, backgroundColor: EventOrder_itemProperty.textColor(result?.color) }}>
|
|
366
408
|
<View style={{ padding: 10, backgroundColor: result?.color, justifyContent: 'center', alignContent: 'center', alignItems: 'center' }}>
|
|
367
409
|
<EventHtmltext allowFontScaling={false} numberOfLines={3} ellipsizeMode="tail" style={{ color: EventOrder_itemProperty.textColor(result?.color), alignSelf: 'center', textAlign: 'center', fontSize: 20, fontWeight: 'bold' }}> {result?.price_name}</EventHtmltext>
|
|
410
|
+
{
|
|
411
|
+
result?.ondate != "0000-00-00" &&
|
|
412
|
+
<Text allowFontScaling={false} style={{ flex: 1, marginRight: 10, marginLeft: 6, fontFamily: "Arial", fontSize: 14, fontWeight: "bold", fontStyle: "normal", letterSpacing: 0, color: EventOrder_itemProperty.textColor(result?.color) }}>{moment(result?.ondate).localeFormat("DD MMMM YYYY")}</Text>
|
|
413
|
+
}
|
|
414
|
+
|
|
368
415
|
</View>
|
|
369
416
|
</View>
|
|
370
417
|
|
|
@@ -376,11 +423,26 @@ export default function m(props: EventOrder_detailProps): any {
|
|
|
376
423
|
|
|
377
424
|
<View style={{ flexDirection: 'row', margin: 16, justifyContent: 'space-between', marginTop: 0 }}>
|
|
378
425
|
<View style={{ flex: 1 }}>
|
|
426
|
+
{/* <View style={{ flexDirection: 'row' }}> */}
|
|
379
427
|
<View style={{ flexDirection: 'row', alignContent: 'center', alignItems: 'center' }}>
|
|
380
428
|
<LibIcon name="ticket-outline" size={20} />
|
|
381
429
|
<Text allowFontScaling={false} style={{ marginLeft: 6, fontFamily: "Arial", fontSize: 30, fontWeight: "bold", fontStyle: "normal", letterSpacing: 0, color: "#484848" }}>{result?.qty}</Text>
|
|
382
430
|
<Text allowFontScaling={false} style={{ marginLeft: 4, fontFamily: "Arial", fontSize: 16, fontWeight: "normal", fontStyle: "normal", letterSpacing: 0, color: "#484848" }}>{esp.lang("event/order_detail", "ticket")}</Text>
|
|
383
431
|
</View>
|
|
432
|
+
|
|
433
|
+
<View style={{ position: 'absolute', right: 0, justifyContent: 'flex-end', alignContent: 'center', alignItems: 'flex-end' }}>
|
|
434
|
+
{
|
|
435
|
+
result?.qr != "" && useIndividualQr == 0 &&
|
|
436
|
+
<TouchableOpacity onPress={() => {
|
|
437
|
+
showQR?.current?.show()
|
|
438
|
+
}}>
|
|
439
|
+
<EventQr_bg>
|
|
440
|
+
<QRCode ecl="H" size={80} value={result?.qr} />
|
|
441
|
+
</EventQr_bg>
|
|
442
|
+
</TouchableOpacity>
|
|
443
|
+
}
|
|
444
|
+
</View>
|
|
445
|
+
{/* </View> */}
|
|
384
446
|
<UseCondition if={result?.show_ticket_status == 1 && result?.status == 1 || result?.status == 3 || result?.status == 6}>
|
|
385
447
|
<Text allowFontScaling={false} style={{ fontSize: 12, fontWeight: "normal", fontStyle: "normal", letterSpacing: 0, marginBottom: 12, color: "#484848" }}>
|
|
386
448
|
{
|
|
@@ -402,44 +464,44 @@ export default function m(props: EventOrder_detailProps): any {
|
|
|
402
464
|
</View>
|
|
403
465
|
}
|
|
404
466
|
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
<
|
|
408
|
-
|
|
467
|
+
{
|
|
468
|
+
result?.ondate == "0000-00-00" &&
|
|
469
|
+
<View style={{ flexDirection: 'row', alignContent: 'center', alignItems: 'center' }}>
|
|
470
|
+
<LibIcon name="calendar-blank-outline" size={20} />
|
|
471
|
+
<Text allowFontScaling={false} style={{ flex: 1, marginRight: 10, marginLeft: 6, fontFamily: "Arial", fontSize: 12, fontWeight: "bold", fontStyle: "normal", letterSpacing: 0, color: "#484848" }}>{((isInvitationDate || isOnlineWithoutDate) ? esp.lang("event/order_item", "used_once") : dateRange)}</Text>
|
|
472
|
+
</View>
|
|
473
|
+
}
|
|
409
474
|
{
|
|
410
475
|
result?.use_seat == 1 &&
|
|
411
476
|
<View style={{ marginTop: 15, marginRight: 10 }}>
|
|
412
477
|
<Text allowFontScaling={false} style={{ fontFamily: "Arial", fontSize: 14, marginBottom: 5, fontWeight: "bold", fontStyle: "normal", letterSpacing: 0, color: "#4a4a4a" }}>{esp.lang("event/order_detail", "seat_number")}</Text>
|
|
413
478
|
<View style={{ flexDirection: 'row', flexWrap: 'wrap' }}>
|
|
414
|
-
{
|
|
415
|
-
|
|
479
|
+
{tickets?.map((item: any, i: number) => {
|
|
480
|
+
const [front, end] = item?.seat_name?.split("#") || ["", ""];
|
|
481
|
+
if (item?.seat_name?.includes("#")) {
|
|
482
|
+
return (
|
|
483
|
+
<View key={i} style={{ flexDirection: 'row', alignItems: 'center', paddingVertical: 5, marginBottom: 7, paddingHorizontal: 5, backgroundColor: '#fff', borderRadius: 5, marginRight: 7, ...LibStyle.elevation(5), }}>
|
|
484
|
+
<Text allowFontScaling={false} style={{ fontWeight: 'bold', fontSize: 16, color: "#000" }}> {front} </Text>
|
|
485
|
+
<Text allowFontScaling={false} style={{ marginLeft: 3, fontWeight: 'bold', fontSize: 16, color: '#000', }}> {end} </Text>
|
|
486
|
+
</View>
|
|
487
|
+
);
|
|
488
|
+
} else {
|
|
416
489
|
return (
|
|
417
|
-
<View key={i} style={{
|
|
418
|
-
<Text allowFontScaling={false} style={{ fontWeight: 'bold', fontSize: 20, color:
|
|
490
|
+
<View key={i} style={{ flexDirection: 'row', alignItems: 'center', paddingVertical: 5, marginBottom: 7, paddingHorizontal: 5, backgroundColor: '#fff', borderRadius: 5, marginRight: 7, ...LibStyle.elevation(5), }}>
|
|
491
|
+
<Text allowFontScaling={false} style={{ fontWeight: 'bold', fontSize: 20, color: "#000" }}>{item?.seat_name}</Text>
|
|
419
492
|
</View>
|
|
420
493
|
)
|
|
421
|
-
}
|
|
422
|
-
}
|
|
494
|
+
}
|
|
495
|
+
})}
|
|
423
496
|
</View>
|
|
424
497
|
</View>
|
|
425
498
|
}
|
|
426
499
|
|
|
427
|
-
|
|
428
|
-
<View style={{ marginTop: 14, justifyContent: 'center', alignContent: 'center', alignItems: 'center' }}>
|
|
429
|
-
{
|
|
430
|
-
result?.qr != "" && useIndividualQr == 0 &&
|
|
431
|
-
<TouchableOpacity onPress={() => {
|
|
432
|
-
showQR?.current?.show()
|
|
433
|
-
}}>
|
|
434
|
-
<EventQr_bg>
|
|
435
|
-
<QRCode ecl="H" size={80} value={result?.qr} />
|
|
436
|
-
</EventQr_bg>
|
|
437
|
-
</TouchableOpacity>
|
|
438
|
-
}
|
|
500
|
+
|
|
439
501
|
</View>
|
|
440
502
|
</View>
|
|
441
|
-
|
|
442
503
|
</View>
|
|
504
|
+
|
|
443
505
|
}
|
|
444
506
|
{
|
|
445
507
|
useIndividualQr > 0 && dataTickets.length > 0 ?
|
|
@@ -470,19 +532,23 @@ export default function m(props: EventOrder_detailProps): any {
|
|
|
470
532
|
|
|
471
533
|
<EventAlert
|
|
472
534
|
color="#FFC523"
|
|
473
|
-
msg={esp.lang("event/order_detail", "not_allowed_ss")}
|
|
535
|
+
msg={esp.lang("event/order_detail", "not_allowed_ss", esp.appjson().expo.name)}
|
|
474
536
|
useIcon
|
|
475
537
|
style={{ marginBottom: 0, margin: 15 }}
|
|
476
538
|
/>
|
|
477
539
|
|
|
478
540
|
<UseCondition if={result?.is_luckydraw && result?.is_luckydraw == 1}>
|
|
479
|
-
<
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
541
|
+
<EventButton_order_detail
|
|
542
|
+
color={"#FF6F61"}
|
|
543
|
+
onPress={() => {
|
|
544
|
+
LibNavigation.navigateForResult('event/order_lottery', { id: result?.id }).then(() => {
|
|
545
|
+
loadData()
|
|
546
|
+
})
|
|
547
|
+
}}
|
|
548
|
+
icon={'dice-multiple'}
|
|
549
|
+
title={result?.config_luckydraw != null ? result?.config_luckydraw?.title : esp.lang("event/order_detail", "join_lucky_draw")}
|
|
550
|
+
info={result?.config_luckydraw != null ? result?.config_luckydraw?.subtitle : esp.lang("event/order_detail", "subtitle_lucky_draw")}
|
|
551
|
+
/>
|
|
486
552
|
</UseCondition>
|
|
487
553
|
|
|
488
554
|
<UseCondition if={result?.is_luckydraw && result?.is_luckydraw == 2}>
|
|
@@ -492,14 +558,58 @@ export default function m(props: EventOrder_detailProps): any {
|
|
|
492
558
|
</UseCondition>
|
|
493
559
|
|
|
494
560
|
<UseCondition if={result?.is_upgradable == 1} >
|
|
495
|
-
<
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
561
|
+
<EventButton_order_detail
|
|
562
|
+
color={LibStyle.colorPrimary}
|
|
563
|
+
onPress={() => {
|
|
564
|
+
LibNavigation.navigate('event/order_detail_upgrade', {
|
|
565
|
+
url: result?.url_upgrade,
|
|
566
|
+
dataTicket: result,
|
|
567
|
+
})
|
|
568
|
+
}}
|
|
569
|
+
icon={'chevron-up-circle'}
|
|
570
|
+
title={esp.lang("event/order_detail_upgrade_button", "upgrade")}
|
|
571
|
+
info={esp.lang("event/order_detail_upgrade_button", "eays")}
|
|
572
|
+
/>
|
|
501
573
|
</UseCondition>
|
|
502
574
|
|
|
575
|
+
|
|
576
|
+
|
|
577
|
+
{/* tombol add on */}
|
|
578
|
+
{
|
|
579
|
+
result?.addons?.length > 0 && result?.addons?.map((item: any, i: number) => {
|
|
580
|
+
if (item?.hasOwnProperty("group_id")) {
|
|
581
|
+
return (
|
|
582
|
+
<EventButton_order_detail
|
|
583
|
+
color={result?.color}
|
|
584
|
+
onPress={() => {
|
|
585
|
+
setGroupAddon(item)
|
|
586
|
+
LibUtils.debounce(() => {
|
|
587
|
+
dialogAddonList?.current?.show()
|
|
588
|
+
}, 100)
|
|
589
|
+
// loadDataAddons(item?.addons_id, item?.url)
|
|
590
|
+
}}
|
|
591
|
+
icon={'chevron-down'}
|
|
592
|
+
title={item.group_title}
|
|
593
|
+
info={""}
|
|
594
|
+
/>
|
|
595
|
+
)
|
|
596
|
+
} else {
|
|
597
|
+
return (
|
|
598
|
+
<EventButton_order_detail
|
|
599
|
+
key={i}
|
|
600
|
+
color={result?.color}
|
|
601
|
+
onPress={() => {
|
|
602
|
+
loadDataAddons(item?.addons_id, item?.url)
|
|
603
|
+
}}
|
|
604
|
+
icon={'plus-circle-outline'}
|
|
605
|
+
title={item.title}
|
|
606
|
+
info={item.info}
|
|
607
|
+
/>
|
|
608
|
+
)
|
|
609
|
+
}
|
|
610
|
+
})
|
|
611
|
+
}
|
|
612
|
+
|
|
503
613
|
{
|
|
504
614
|
// jika mau edit view dibawah ini, tekan ctrl + f terus paste prefik dibawah ini
|
|
505
615
|
// view_reviewed
|
|
@@ -588,7 +698,7 @@ export default function m(props: EventOrder_detailProps): any {
|
|
|
588
698
|
result?.status != "2" && coupons &&
|
|
589
699
|
<View style={{ margin: 15, marginBottom: 0, borderRadius: 7, backgroundColor: '#fff', paddingBottom: 10, paddingTop: 10 }}>
|
|
590
700
|
<View style={{ marginHorizontal: 20 }}>
|
|
591
|
-
<Text style={{ fontWeight: 'bold', fontSize: 14, color:
|
|
701
|
+
<Text style={{ fontWeight: 'bold', fontSize: 14, color: "#495057" }}>{coupons.title || ''}</Text>
|
|
592
702
|
</View>
|
|
593
703
|
|
|
594
704
|
{
|
|
@@ -725,7 +835,7 @@ export default function m(props: EventOrder_detailProps): any {
|
|
|
725
835
|
<View style={{ padding: 5, }}>
|
|
726
836
|
<EventButton label={Number(result.is_shareable) ? /*share_ticket*/esp.lang("event/order_detail", "share_ticket") : esp.lang("event/order_detail", "shared")} onPress={() => {
|
|
727
837
|
if (Number(result.is_shareable)) {
|
|
728
|
-
LibDialog.confirm(esp.lang("event/order_detail", "share_title"), esp.lang("event/order_detail", "share_msg"), esp.lang("event/order_detail", "share_ok"), () => {
|
|
838
|
+
LibDialog.confirm(esp.lang("event/order_detail", "share_title"), esp.lang("event/order_detail", "share_msg", esp.appjson().expo.name), esp.lang("event/order_detail", "share_ok"), () => {
|
|
729
839
|
LibNavigation.navigate('event/order_share_to', { url: url })
|
|
730
840
|
}, esp.lang("event/order_detail", "share_no"), () => {
|
|
731
841
|
|
|
@@ -759,6 +869,36 @@ export default function m(props: EventOrder_detailProps): any {
|
|
|
759
869
|
</View>
|
|
760
870
|
</LibSlidingup>
|
|
761
871
|
|
|
872
|
+
{/* add on list */}
|
|
873
|
+
<LibSlidingup ref={dialogAddonList}>
|
|
874
|
+
<View style={{ backgroundColor: 'white', borderTopRightRadius: 20, maxHeight: LibStyle.height / 2, borderTopLeftRadius: 20, paddingBottom: 20 }}>
|
|
875
|
+
<View style={{ margin: 15, flexDirection: 'row', justifyContent: 'space-between', alignContent: 'center', alignItems: 'center' }}>
|
|
876
|
+
<Text allowFontScaling={false} style={{ flex: 1, fontSize: 16, fontWeight: 'bold' }}>{getGroupAddon()?.group_title}</Text>
|
|
877
|
+
<TouchableOpacity style={{ flex: 1, alignItems: 'flex-end' }} onPress={() => dialogAddonList?.current?.hide()}>
|
|
878
|
+
<LibIcon name='close' />
|
|
879
|
+
</TouchableOpacity>
|
|
880
|
+
</View>
|
|
881
|
+
<ScrollView>
|
|
882
|
+
{
|
|
883
|
+
getGroupAddon()?.addons?.length > 0 && getGroupAddon()?.addons?.map((item: any, i: number) => {
|
|
884
|
+
return (
|
|
885
|
+
<EventButton_order_detail
|
|
886
|
+
key={i}
|
|
887
|
+
color={result?.color}
|
|
888
|
+
onPress={() => {
|
|
889
|
+
loadDataAddons(item?.addons_id, item?.url)
|
|
890
|
+
}}
|
|
891
|
+
icon={'plus-circle-outline'}
|
|
892
|
+
title={item.title}
|
|
893
|
+
info={item.info}
|
|
894
|
+
/>
|
|
895
|
+
)
|
|
896
|
+
})
|
|
897
|
+
}
|
|
898
|
+
</ScrollView>
|
|
899
|
+
</View>
|
|
900
|
+
</LibSlidingup>
|
|
901
|
+
|
|
762
902
|
<LibSlidingup ref={dialogSendBack} >
|
|
763
903
|
<View style={{ backgroundColor: 'white', borderTopLeftRadius: 20, borderTopRightRadius: 20, padding: 20 }} >
|
|
764
904
|
<EventPopup email={result?.sharer_email?.trim?.()} redirect={() => {
|
|
@@ -772,7 +912,11 @@ export default function m(props: EventOrder_detailProps): any {
|
|
|
772
912
|
returnTicket: true,
|
|
773
913
|
})
|
|
774
914
|
} else {
|
|
775
|
-
|
|
915
|
+
LibNavigation.navigateForResult("bigbang/payment_pin", undefined, 1132).then((p) => {
|
|
916
|
+
if (p) {
|
|
917
|
+
sendBack(p)
|
|
918
|
+
}
|
|
919
|
+
})
|
|
776
920
|
}
|
|
777
921
|
dialogSendBack.current!.hide()
|
|
778
922
|
}} cancel={() => {
|
|
@@ -794,7 +938,6 @@ export default function m(props: EventOrder_detailProps): any {
|
|
|
794
938
|
</View>
|
|
795
939
|
}
|
|
796
940
|
/>
|
|
797
|
-
|
|
798
941
|
</View>
|
|
799
942
|
</LibSlidingup>
|
|
800
943
|
|