esoftplay-event 0.0.1 → 0.0.2
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 +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 +47 -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 +8 -0
- package/event/loading_page.tsx +4 -2
- package/event/order.tsx +23 -36
- package/event/order_detail.tsx +119 -41
- 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 +48 -36
- 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 +19 -11
- package/event/seat_map_new.tsx +313 -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 +49 -21
- package/event/ticket_list2.tsx +83 -34
- package/event/tms_check_code.tsx +6 -0
- package/event/tms_check_ticket_result.tsx +36 -7
- 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_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 +23 -5
- package/event/visitor_inputv2.tsx +397 -0
- package/event/voucher.tsx +2 -0
- package/event/voucher2.tsx +14 -6
- package/id.json +25 -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
|
@@ -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,6 +113,10 @@ export default function useFirebaseSocket() {
|
|
|
109
113
|
const instance: any = esp.mod("firestore/index")().instance()
|
|
110
114
|
const db = getFirestore(instance)
|
|
111
115
|
|
|
116
|
+
if (!isValidEventId(event_id)) {
|
|
117
|
+
return
|
|
118
|
+
}
|
|
119
|
+
|
|
112
120
|
if (userIdKeyReplacer.get()?.priority == 1) {
|
|
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));
|
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';
|
|
@@ -133,8 +134,6 @@ export default function m(props: EventOrder_detailProps): any {
|
|
|
133
134
|
function loadData(): void {
|
|
134
135
|
new LibCurl(url + ((url.includes("?") ? "&" : "?") + 't=' + new Date().getTime()), null, (res: any) => {
|
|
135
136
|
setResult(res)
|
|
136
|
-
// esp.log(res);
|
|
137
|
-
|
|
138
137
|
new LibCurl(res?.url_coupon, null, (ress: any) => {
|
|
139
138
|
setCoupons(ress)
|
|
140
139
|
}, (error: any) => {
|
|
@@ -176,6 +175,7 @@ export default function m(props: EventOrder_detailProps): any {
|
|
|
176
175
|
}
|
|
177
176
|
|
|
178
177
|
useEffect(() => {
|
|
178
|
+
EventConfigProperty.curlConfig('v2/config_order_type')
|
|
179
179
|
loadData()
|
|
180
180
|
}, [])
|
|
181
181
|
|
|
@@ -204,21 +204,6 @@ export default function m(props: EventOrder_detailProps): any {
|
|
|
204
204
|
setDataReview(subs.getValue())
|
|
205
205
|
})
|
|
206
206
|
|
|
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
207
|
function addReturn(): void {
|
|
223
208
|
if (qty < Number(result.qty_returnable)) {
|
|
224
209
|
setQty(qty + 1)
|
|
@@ -229,10 +214,13 @@ export default function m(props: EventOrder_detailProps): any {
|
|
|
229
214
|
setQty(qty == 1 ? 1 : qty - 1)
|
|
230
215
|
}
|
|
231
216
|
|
|
232
|
-
function sendBack() {
|
|
217
|
+
function sendBack(p: any) {
|
|
233
218
|
LibDialog.confirm(esp.lang("event/order_detail", "warning"), esp.lang("event/order_detail", "return_this_ticket"), esp.lang("event/order_detail", "btn_yes"), () => {
|
|
234
219
|
LibProgress.show(esp.lang("event/order_detail", "please_wait"))
|
|
235
|
-
|
|
220
|
+
let post = {
|
|
221
|
+
pin: p
|
|
222
|
+
}
|
|
223
|
+
new LibCurl('event_booking_shared_return?booking_id=' + result?.id + '&qty_shared=' + qty, post, (res: any, msg: any) => {
|
|
236
224
|
// LibNotify(res)
|
|
237
225
|
LibProgress.hide()
|
|
238
226
|
LibDialog.info(esp.lang("event/order_detail", "information"), msg)
|
|
@@ -245,6 +233,55 @@ export default function m(props: EventOrder_detailProps): any {
|
|
|
245
233
|
}, esp.lang("event/order_detail", "btn_cancel"), () => { })
|
|
246
234
|
}
|
|
247
235
|
|
|
236
|
+
function loadDataAddons(id: any, url: string) {
|
|
237
|
+
LibProgress.show(esp.lang("event/order_detail", "wait"))
|
|
238
|
+
new LibCurl(url, null, (res: any, msg: any) => {
|
|
239
|
+
esp.log({ res });
|
|
240
|
+
LibProgress.hide()
|
|
241
|
+
let dataBookingEvent = {
|
|
242
|
+
event_id: res?.event_id,
|
|
243
|
+
event_title: res?.event_name,
|
|
244
|
+
selected_ticket: {
|
|
245
|
+
price_id: res?.price_id,
|
|
246
|
+
currency: res?.currency,
|
|
247
|
+
tax: res?.tax,
|
|
248
|
+
fee: res?.fee,
|
|
249
|
+
fee_percent: res?.fee_percent,
|
|
250
|
+
term: res?.term,
|
|
251
|
+
has_addition: res?.has_addition,
|
|
252
|
+
list: {
|
|
253
|
+
ondate: res?.ondate,
|
|
254
|
+
price: res?.price,
|
|
255
|
+
price_id: res?.price_id,
|
|
256
|
+
currency: res?.currency,
|
|
257
|
+
}
|
|
258
|
+
},
|
|
259
|
+
qty: result?.qty
|
|
260
|
+
}
|
|
261
|
+
let fee_platform = {
|
|
262
|
+
fee_platform_amount: res?.fee_platform?.fee_platform_amount,
|
|
263
|
+
fee_platform_type: res?.fee_platform?.fee_platform_type
|
|
264
|
+
}
|
|
265
|
+
let show_fee_percentage = res?.show_fee_percentage
|
|
266
|
+
let tax = res?.tax
|
|
267
|
+
let order_type = EventConfigProperty.state().get()?.order_type?.ticket
|
|
268
|
+
let addons_id = id
|
|
269
|
+
let booking_id_ref = result?.id
|
|
270
|
+
LibNavigation.navigate('payment/ticket', {
|
|
271
|
+
order_type: order_type,
|
|
272
|
+
tax: tax,
|
|
273
|
+
fee_platform: fee_platform,
|
|
274
|
+
dataBookingEvent: dataBookingEvent,
|
|
275
|
+
show_fee_percentage,
|
|
276
|
+
addons_id,
|
|
277
|
+
booking_id_ref
|
|
278
|
+
})
|
|
279
|
+
}, (err: any) => {
|
|
280
|
+
LibProgress.hide()
|
|
281
|
+
esp.log({ err });
|
|
282
|
+
}, 1)
|
|
283
|
+
}
|
|
284
|
+
|
|
248
285
|
if (result == undefined && !coupons) {
|
|
249
286
|
return (
|
|
250
287
|
<View style={{ flex: 1, backgroundColor: '#f6f6f6' }}>
|
|
@@ -365,6 +402,11 @@ export default function m(props: EventOrder_detailProps): any {
|
|
|
365
402
|
<View testID='price_name' style={{ marginTop: 10, borderWidth: 5, padding: 3, borderColor: result?.color, backgroundColor: EventOrder_itemProperty.textColor(result?.color) }}>
|
|
366
403
|
<View style={{ padding: 10, backgroundColor: result?.color, justifyContent: 'center', alignContent: 'center', alignItems: 'center' }}>
|
|
367
404
|
<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>
|
|
405
|
+
{
|
|
406
|
+
result?.ondate != "0000-00-00" &&
|
|
407
|
+
<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>
|
|
408
|
+
}
|
|
409
|
+
|
|
368
410
|
</View>
|
|
369
411
|
</View>
|
|
370
412
|
|
|
@@ -402,10 +444,13 @@ export default function m(props: EventOrder_detailProps): any {
|
|
|
402
444
|
</View>
|
|
403
445
|
}
|
|
404
446
|
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
<
|
|
408
|
-
|
|
447
|
+
{
|
|
448
|
+
result?.ondate == "0000-00-00" &&
|
|
449
|
+
<View style={{ flexDirection: 'row', alignContent: 'center', alignItems: 'center' }}>
|
|
450
|
+
<LibIcon name="calendar-blank-outline" size={20} />
|
|
451
|
+
<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>
|
|
452
|
+
</View>
|
|
453
|
+
}
|
|
409
454
|
{
|
|
410
455
|
result?.use_seat == 1 &&
|
|
411
456
|
<View style={{ marginTop: 15, marginRight: 10 }}>
|
|
@@ -470,19 +515,23 @@ export default function m(props: EventOrder_detailProps): any {
|
|
|
470
515
|
|
|
471
516
|
<EventAlert
|
|
472
517
|
color="#FFC523"
|
|
473
|
-
msg={esp.lang("event/order_detail", "not_allowed_ss")}
|
|
518
|
+
msg={esp.lang("event/order_detail", "not_allowed_ss", esp.appjson().expo.name)}
|
|
474
519
|
useIcon
|
|
475
520
|
style={{ marginBottom: 0, margin: 15 }}
|
|
476
521
|
/>
|
|
477
522
|
|
|
478
523
|
<UseCondition if={result?.is_luckydraw && result?.is_luckydraw == 1}>
|
|
479
|
-
<
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
524
|
+
<EventButton_order_detail
|
|
525
|
+
color={"#FF6F61"}
|
|
526
|
+
onPress={() => {
|
|
527
|
+
LibNavigation.navigateForResult('event/order_lottery', { id: result?.id }).then(() => {
|
|
528
|
+
loadData()
|
|
529
|
+
})
|
|
530
|
+
}}
|
|
531
|
+
icon={'dice-multiple'}
|
|
532
|
+
title={result?.config_luckydraw != null ? result?.config_luckydraw?.title : esp.lang("event/order_detail", "join_lucky_draw")}
|
|
533
|
+
info={result?.config_luckydraw != null ? result?.config_luckydraw?.subtitle : esp.lang("event/order_detail", "subtitle_lucky_draw")}
|
|
534
|
+
/>
|
|
486
535
|
</UseCondition>
|
|
487
536
|
|
|
488
537
|
<UseCondition if={result?.is_luckydraw && result?.is_luckydraw == 2}>
|
|
@@ -492,14 +541,39 @@ export default function m(props: EventOrder_detailProps): any {
|
|
|
492
541
|
</UseCondition>
|
|
493
542
|
|
|
494
543
|
<UseCondition if={result?.is_upgradable == 1} >
|
|
495
|
-
<
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
544
|
+
<EventButton_order_detail
|
|
545
|
+
color={LibStyle.colorPrimary}
|
|
546
|
+
onPress={() => {
|
|
547
|
+
LibNavigation.navigate('event/order_detail_upgrade', {
|
|
548
|
+
url: result?.url_upgrade,
|
|
549
|
+
dataTicket: result,
|
|
550
|
+
})
|
|
551
|
+
}}
|
|
552
|
+
icon={'chevron-up-circle'}
|
|
553
|
+
title={esp.lang("event/order_detail_upgrade_button", "upgrade")}
|
|
554
|
+
info={esp.lang("event/order_detail_upgrade_button", "eays")}
|
|
555
|
+
/>
|
|
501
556
|
</UseCondition>
|
|
502
557
|
|
|
558
|
+
|
|
559
|
+
|
|
560
|
+
{/* tombol add on */}
|
|
561
|
+
{
|
|
562
|
+
result?.addons?.length > 0 && result?.addons?.map((item: any, i: number) => {
|
|
563
|
+
return (
|
|
564
|
+
<EventButton_order_detail
|
|
565
|
+
color={result?.color}
|
|
566
|
+
onPress={() => {
|
|
567
|
+
loadDataAddons(item?.addons_id, item?.url)
|
|
568
|
+
}}
|
|
569
|
+
icon={'plus-circle'}
|
|
570
|
+
title={item.title}
|
|
571
|
+
info={item.info}
|
|
572
|
+
/>
|
|
573
|
+
)
|
|
574
|
+
})
|
|
575
|
+
}
|
|
576
|
+
|
|
503
577
|
{
|
|
504
578
|
// jika mau edit view dibawah ini, tekan ctrl + f terus paste prefik dibawah ini
|
|
505
579
|
// view_reviewed
|
|
@@ -588,7 +662,7 @@ export default function m(props: EventOrder_detailProps): any {
|
|
|
588
662
|
result?.status != "2" && coupons &&
|
|
589
663
|
<View style={{ margin: 15, marginBottom: 0, borderRadius: 7, backgroundColor: '#fff', paddingBottom: 10, paddingTop: 10 }}>
|
|
590
664
|
<View style={{ marginHorizontal: 20 }}>
|
|
591
|
-
<Text style={{ fontWeight: 'bold', fontSize: 14, color:
|
|
665
|
+
<Text style={{ fontWeight: 'bold', fontSize: 14, color: "#495057" }}>{coupons.title || ''}</Text>
|
|
592
666
|
</View>
|
|
593
667
|
|
|
594
668
|
{
|
|
@@ -725,7 +799,7 @@ export default function m(props: EventOrder_detailProps): any {
|
|
|
725
799
|
<View style={{ padding: 5, }}>
|
|
726
800
|
<EventButton label={Number(result.is_shareable) ? /*share_ticket*/esp.lang("event/order_detail", "share_ticket") : esp.lang("event/order_detail", "shared")} onPress={() => {
|
|
727
801
|
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"), () => {
|
|
802
|
+
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
803
|
LibNavigation.navigate('event/order_share_to', { url: url })
|
|
730
804
|
}, esp.lang("event/order_detail", "share_no"), () => {
|
|
731
805
|
|
|
@@ -772,7 +846,11 @@ export default function m(props: EventOrder_detailProps): any {
|
|
|
772
846
|
returnTicket: true,
|
|
773
847
|
})
|
|
774
848
|
} else {
|
|
775
|
-
|
|
849
|
+
LibNavigation.navigateForResult("bigbang/payment_pin", undefined, 1132).then((p) => {
|
|
850
|
+
if (p) {
|
|
851
|
+
sendBack(p)
|
|
852
|
+
}
|
|
853
|
+
})
|
|
776
854
|
}
|
|
777
855
|
dialogSendBack.current!.hide()
|
|
778
856
|
}} cancel={() => {
|
|
@@ -120,7 +120,10 @@ export default function m(props: EventOrder_detail_upgradeProps): any {
|
|
|
120
120
|
} else {
|
|
121
121
|
LibDialog.warning(esp.lang("event/order_detail_upgrade", "oops"), item.message_error)
|
|
122
122
|
}
|
|
123
|
-
}} key={i} style={{
|
|
123
|
+
}} key={i} style={{
|
|
124
|
+
...LibStyle.elevation(2), marginHorizontal: 15, marginTop: 2.5, marginBottom: 10, borderRadius: 10,
|
|
125
|
+
backgroundColor: item.status == 0 ? LibStyle.colorBgGrey : selectedTicket?.selected_ticket?.id == item.id ? LibStyle.colorGreen : "#fff", padding: 10, alignContent: 'center', alignItems: 'center', justifyContent: 'center'
|
|
126
|
+
}}>
|
|
124
127
|
<EventHtmltext allowFontScaling={false} style={{ marginHorizontal: 5, fontSize: 16, color: item.status == 0 ? "#c9c9c9" : selectedTicket?.selected_ticket?.id == item.id ? "#fff" : "#000", textAlign: 'center', fontWeight: 'bold' }} numberOfLines={2} ellipsizeMode={'tail'}>{item?.price_name_to}</EventHtmltext>
|
|
125
128
|
<Text allowFontScaling={false} style={{ fontSize: 14, fontWeight: 'bold', marginTop: 5, color: item.status == 0 ? "#c9c9c9" : selectedTicket?.selected_ticket?.id == item.id ? "#fff" : "#000" }}>{"+ " + LibUtils.money(Number(dataTicket?.qty_upgrade) * Number(item?.amount), item?.currency)}</Text>
|
|
126
129
|
|
|
@@ -139,10 +142,12 @@ export default function m(props: EventOrder_detail_upgradeProps): any {
|
|
|
139
142
|
<EventButton label={esp.lang("event/order_detail_upgrade", "btn_next")} onPress={() => {
|
|
140
143
|
if (selectedTicket) {
|
|
141
144
|
if (selectedTicket?.selected_ticket?.use_seat == 1 && selectedTicket?.selected_ticket?.seat_autopick == 0) {
|
|
142
|
-
LibNavigation.navigateForResult('event/
|
|
145
|
+
LibNavigation.navigateForResult('event/seat_map_new', {
|
|
143
146
|
url: 'event_seat',
|
|
144
147
|
dataTicket: selectedTicket
|
|
145
148
|
}).then((value) => {
|
|
149
|
+
let seatData: any = {}
|
|
150
|
+
seatData.seat_label = value?.seat_label
|
|
146
151
|
LibNavigation.navigate('event/order_detail_upgrade_payment', {
|
|
147
152
|
dataTicket: {
|
|
148
153
|
url_payment: result?.url_payment,
|
|
@@ -157,9 +162,7 @@ export default function m(props: EventOrder_detail_upgradeProps): any {
|
|
|
157
162
|
},
|
|
158
163
|
selectedTicket: {
|
|
159
164
|
...selectedTicket,
|
|
160
|
-
|
|
161
|
-
column_id: value?.column_id,
|
|
162
|
-
seat_name: value?.seat_name,
|
|
165
|
+
...seatData
|
|
163
166
|
},
|
|
164
167
|
fee_platform: {
|
|
165
168
|
fee_platform_amount: selectedTicket?.selected_ticket?.fee_platform_amount,
|
|
@@ -15,7 +15,7 @@ import { LibStyle } from "esoftplay/cache/lib/style/import";
|
|
|
15
15
|
import { LibTextstyle } from 'esoftplay/cache/lib/textstyle/import';
|
|
16
16
|
import esp from "esoftplay/esp";
|
|
17
17
|
import useSafeState from "esoftplay/state";
|
|
18
|
-
import { ScrollView, Text, View } from "react-native";
|
|
18
|
+
import { Linking, ScrollView, Text, View } from "react-native";
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|
|
@@ -37,6 +37,8 @@ export default function m(props: EventOrder_detail_upgrade_paymentProps): any {
|
|
|
37
37
|
const scrollYRef = useRef(0)
|
|
38
38
|
const dialogSeat = useRef<LibSlidingup>(null)
|
|
39
39
|
|
|
40
|
+
esp.log({ dataTicket, selectedTicket });
|
|
41
|
+
|
|
40
42
|
function doUpgrade(pin?: any) {
|
|
41
43
|
const LibToastProperty = esp.modProp("lib/toast")
|
|
42
44
|
if (!selectedPayment) {
|
|
@@ -54,9 +56,7 @@ export default function m(props: EventOrder_detail_upgrade_paymentProps): any {
|
|
|
54
56
|
}
|
|
55
57
|
|
|
56
58
|
if (selectedTicket?.selected_ticket?.use_seat == 1) {
|
|
57
|
-
post.
|
|
58
|
-
post.column_id = selectedTicket?.column_id
|
|
59
|
-
post.seat_name = selectedTicket?.seat_name
|
|
59
|
+
post.seat_label = selectedTicket?.seat_label.join('|')
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
if (selectedTicket?.selected_ticket?.seat_autopick == 1) {
|
|
@@ -68,17 +68,17 @@ export default function m(props: EventOrder_detail_upgrade_paymentProps): any {
|
|
|
68
68
|
}
|
|
69
69
|
LibProgress.show(esp.lang("event/order_detail_upgrade_payment", "confirm_wait"))
|
|
70
70
|
new LibCurl('event_order_detail_upgrade_checkout', post, (res, msg) => {
|
|
71
|
-
esp.log({ post });
|
|
72
71
|
LibProgress.hide()
|
|
73
72
|
LibNavigation.reset()
|
|
74
|
-
if (
|
|
75
|
-
|
|
76
|
-
LibNavigation.
|
|
77
|
-
} else if (
|
|
73
|
+
if (res?.hasOwnProperty('url_mobile') && res?.url_mobile != null) {
|
|
74
|
+
Linking.openURL(res?.url_mobile)
|
|
75
|
+
LibNavigation.push('event/order_detail_waiting', { url: res?.url })
|
|
76
|
+
} else if (res?.hasOwnProperty('url_web') && res?.url_web != null) {
|
|
78
77
|
LibNavigation.navigateForResult('payment/cc_web', {
|
|
79
78
|
...res,
|
|
80
79
|
statusSuccess: [1]
|
|
81
80
|
}).then((res) => {
|
|
81
|
+
LibNavigation.backToRoot()
|
|
82
82
|
LibNavigation.push('user/profile')
|
|
83
83
|
if (res?.hasOwnProperty('params_error') || res?.hasOwnProperty('failed')) {
|
|
84
84
|
LibNavigation.push('event/order_waiting')
|
|
@@ -88,8 +88,14 @@ export default function m(props: EventOrder_detail_upgrade_paymentProps): any {
|
|
|
88
88
|
}
|
|
89
89
|
})
|
|
90
90
|
} else {
|
|
91
|
-
|
|
91
|
+
if (res?.url?.includes("waiting")) {
|
|
92
|
+
LibNavigation.push('event/order_waiting')
|
|
93
|
+
}
|
|
94
|
+
LibNavigation.push(res?.url?.includes("waiting") ? 'event/order_detail_waiting' : 'event/order_detail', {
|
|
95
|
+
url: res.url,
|
|
96
|
+
})
|
|
92
97
|
}
|
|
98
|
+
|
|
93
99
|
}, (err) => {
|
|
94
100
|
LibProgress.hide()
|
|
95
101
|
LibDialog.warning(esp.lang("event/order_detail_upgrade_payment", "oops"), err?.message)
|
|
@@ -142,8 +148,8 @@ export default function m(props: EventOrder_detail_upgrade_paymentProps): any {
|
|
|
142
148
|
}
|
|
143
149
|
}
|
|
144
150
|
}}>
|
|
145
|
-
{/* detail */}
|
|
146
151
|
|
|
152
|
+
{/* detail */}
|
|
147
153
|
<View style={{ backgroundColor: 'white' }}>
|
|
148
154
|
<BigbangPayment_detail
|
|
149
155
|
ondate={dataTicket?.ondate}
|
|
@@ -32,8 +32,8 @@ 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)
|
|
36
|
+
esp.log(res);
|
|
37
37
|
}, (err) => {
|
|
38
38
|
setError(err)
|
|
39
39
|
})
|
|
@@ -106,11 +106,6 @@ export default function m(props: EventOrder_detail_visitorProps): any {
|
|
|
106
106
|
return finalResult
|
|
107
107
|
}
|
|
108
108
|
|
|
109
|
-
let filterBuyerVisitor = result?.tickets?.reduce((r: any, a: any) => {
|
|
110
|
-
r[a.email] = [...r[a.email] || [], a];
|
|
111
|
-
return r;
|
|
112
|
-
}, {});
|
|
113
|
-
|
|
114
109
|
return (
|
|
115
110
|
<View style={{ flex: 1, backgroundColor: LibStyle.colorBgGrey }}>
|
|
116
111
|
<EventHeader title={esp.lang("event/order_detail_visitor", "header")} />
|
|
@@ -123,44 +118,49 @@ export default function m(props: EventOrder_detail_visitorProps): any {
|
|
|
123
118
|
<ScrollView>
|
|
124
119
|
<View style={{ margin: 15, borderRadius: 10, backgroundColor: '#fff', padding: 10 }}>
|
|
125
120
|
{
|
|
126
|
-
|
|
121
|
+
result?.tickets?.map((item: any, i: number) => {
|
|
127
122
|
return (
|
|
128
123
|
<View key={i} style={{ marginLeft: 14, marginBottom: 15, flexDirection: 'row', alignContent: 'center', alignItems: 'center', justifyContent: 'space-between' }}>
|
|
129
124
|
<View style={{ flex: 1, flexDirection: 'row', alignContent: 'center', alignItems: 'center' }}>
|
|
130
125
|
<Text allowFontScaling={false} style={{ marginRight: 6, fontFamily: "Arial", fontSize: 30, fontWeight: "bold", fontStyle: "normal", letterSpacing: 0, color: "#484848" }}>{i + 1}.</Text>
|
|
131
|
-
<View
|
|
132
|
-
<
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
126
|
+
<View >
|
|
127
|
+
<View style={{ flex: 1 }}>
|
|
128
|
+
<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>
|
|
129
|
+
<Text allowFontScaling={false} style={{ fontFamily: "Arial", fontSize: 14, fontWeight: "normal", fontStyle: "normal", letterSpacing: 0, color: "#4a4a4a", marginTop: 4 }} ellipsizeMode='tail'>{item?.name}</Text>
|
|
130
|
+
<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>
|
|
131
|
+
<Text allowFontScaling={false} style={{ fontFamily: "Arial", fontSize: 14, fontWeight: "normal", fontStyle: "normal", letterSpacing: 0, color: "#4a4a4a", marginTop: 4 }}>{item?.phone == "" ? "-" : item?.phone.trim()}</Text>
|
|
132
|
+
</View>
|
|
133
|
+
{
|
|
134
|
+
item?.redemption?.length > 0 &&
|
|
135
|
+
<View style={{ marginTop: 3 }}>
|
|
136
|
+
<Text allowFontScaling={false} style={{ fontFamily: "Arial", fontSize: 10, fontWeight: "bold", fontStyle: "normal", letterSpacing: 0, color: "#c3c3c3", marginTop: 7 }}>{"Item Redemption"}</Text>
|
|
137
|
+
<View style={{ flexDirection: 'row', flex: 1, flexWrap: 'wrap', justifyContent: 'space-around' }}>
|
|
138
|
+
{
|
|
139
|
+
item?.redemption?.map((x: any, ii: number) => {
|
|
140
|
+
return (
|
|
141
|
+
<View key={ii} style={{ borderRadius: 3, marginRight: 6, backgroundColor: LibStyle.colorPrimary, padding: 5 }}>
|
|
142
|
+
<Text allowFontScaling={false} style={{ fontFamily: "Arial", fontSize: 12, fontWeight: "bold", fontStyle: "normal", letterSpacing: 0, color: "#fff" }}>{x}</Text>
|
|
143
|
+
</View>
|
|
144
|
+
)
|
|
145
|
+
})
|
|
146
|
+
}
|
|
147
|
+
</View>
|
|
148
|
+
</View>
|
|
149
|
+
}
|
|
136
150
|
</View>
|
|
137
151
|
</View>
|
|
138
|
-
<View style={{
|
|
139
|
-
|
|
140
|
-
|
|
152
|
+
<View style={{ alignContent: 'center', alignItems: 'center' }}>
|
|
153
|
+
{
|
|
154
|
+
item.hasOwnProperty('seat_name') && item?.seat_name != "" &&
|
|
155
|
+
<View 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
|
+
}
|
|
141
159
|
</View>
|
|
142
160
|
</View>
|
|
143
161
|
)
|
|
144
162
|
})
|
|
145
163
|
}
|
|
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
164
|
</View>
|
|
165
165
|
|
|
166
166
|
{
|