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
package/id.json
CHANGED
|
@@ -65,6 +65,9 @@
|
|
|
65
65
|
"visitor_email": "Email Pengunjung",
|
|
66
66
|
"visitor_email_pl": "Email Pengujung"
|
|
67
67
|
},
|
|
68
|
+
"event/countdown_event": {
|
|
69
|
+
"ends": "Berakhir dalam"
|
|
70
|
+
},
|
|
68
71
|
"event/counter_cashier": {
|
|
69
72
|
"add_cancel": "Tidak",
|
|
70
73
|
"add_confirm": "Ya",
|
|
@@ -533,7 +536,7 @@
|
|
|
533
536
|
"start_from": "mulai dari %s",
|
|
534
537
|
"tb_announce": "To Be Announced",
|
|
535
538
|
"text_about_event": "Tentang Acara",
|
|
536
|
-
"text_book_on": "Booking On %s",
|
|
539
|
+
"text_book_on": "Booking On %s %s",
|
|
537
540
|
"text_booking_end": "Booking Tiket Telah Berakhir",
|
|
538
541
|
"text_buy_ticket": "Beli Tiket",
|
|
539
542
|
"text_event_cat": "Kategori Event",
|
|
@@ -927,7 +930,8 @@
|
|
|
927
930
|
"event/order_detail": {
|
|
928
931
|
"Checked_within_10_minutes_after_payment_is_made": "Dicek dalam 10 menit setelah pembayaran dilakukan",
|
|
929
932
|
"This_Event_Has_Changed_the_Event_Date_Please_Reschedule_or_Refund": "Event ini Mengalami Perubahan Tanggal Event, Silahkan Reschedule atau Melakukan Refund",
|
|
930
|
-
"
|
|
933
|
+
"already_follow": "Sudah memilih ",
|
|
934
|
+
"already_join_lucky_draw": "Pilihan sudah dibuat",
|
|
931
935
|
"back_err": "Oops",
|
|
932
936
|
"back_to_homepage": "Kembali ke Halaman Utama",
|
|
933
937
|
"birtdate": "Tanggal Lahir",
|
|
@@ -957,7 +961,7 @@
|
|
|
957
961
|
"leave_review": "Leave a Review",
|
|
958
962
|
"load_err": "Oops",
|
|
959
963
|
"location_empty": "Lokasi belum dipilih",
|
|
960
|
-
"not_allowed_ss": "Harap hindari membuat screenshot atau foto tiket. Tunjukkan tiket asli di aplikasi
|
|
964
|
+
"not_allowed_ss": "Harap hindari membuat screenshot atau foto tiket. Tunjukkan tiket asli di aplikasi %s saat masuk ke area event. Terima kasih!",
|
|
961
965
|
"not_now": "Nanti Saja",
|
|
962
966
|
"order_detail": "Order Detail",
|
|
963
967
|
"payment_instruction": "Petunjuk Pembayaran",
|
|
@@ -976,12 +980,14 @@
|
|
|
976
980
|
"select_domicile": "Pilih Domisili",
|
|
977
981
|
"select_gender": "Pilih Jenis Kelamin",
|
|
978
982
|
"send_to_email": "Kirim tiket ke email",
|
|
979
|
-
"share_msg": "Pastikan temanmu sudah mendownload dan mendaftar di
|
|
983
|
+
"share_msg": "Pastikan temanmu sudah mendownload dan mendaftar di %s",
|
|
980
984
|
"share_no": "Batal",
|
|
981
985
|
"share_ok": "Lanjutkan",
|
|
982
986
|
"share_ticket": "Bagikan Tiket ke Temanmu",
|
|
983
987
|
"share_title": "Informasi",
|
|
984
988
|
"shared": "Sudah dibagikan",
|
|
989
|
+
"subtitle_addons": "Biar pengalamanmu makin lengkap",
|
|
990
|
+
"subtitle_lucky_draw": "Hadiah seru menantimu, buruan ikutan!",
|
|
985
991
|
"success_copied": "Berhasil Disalin ",
|
|
986
992
|
"thanks": "Thank you for your suggestion!!",
|
|
987
993
|
"ticket": "TIKET ",
|
|
@@ -992,6 +998,7 @@
|
|
|
992
998
|
"used": "digunakan",
|
|
993
999
|
"used_today": "digunakan hari ini, akan direset kembali besok pukul 05:00 WIB",
|
|
994
1000
|
"virtual_account_number": "No.Virtual Account",
|
|
1001
|
+
"wait": "Mohon tunggu",
|
|
995
1002
|
"warning": "Peringatan"
|
|
996
1003
|
},
|
|
997
1004
|
"event/order_detail_payment": {
|
|
@@ -1071,17 +1078,19 @@
|
|
|
1071
1078
|
"used_once": "Bisa digunakan sekali selama acara berlangsung"
|
|
1072
1079
|
},
|
|
1073
1080
|
"event/order_lottery": {
|
|
1081
|
+
"chance_for_exchange": " pilihan untuk dibuat",
|
|
1074
1082
|
"confirm": "Konfirmasi",
|
|
1075
|
-
"confirm_point": "Apakah
|
|
1083
|
+
"confirm_point": "Apakah pilihan yang anda masukkan sudah benar?",
|
|
1076
1084
|
"follow_lucky_draw": "Ikuti Lucky Draw",
|
|
1077
1085
|
"information": "Informasi",
|
|
1078
1086
|
"no": "Tidak",
|
|
1079
1087
|
"oops": "Oops",
|
|
1080
1088
|
"please_enter_all_point": "Silahkan masukkan semua kupon lucky draw anda",
|
|
1081
|
-
"submit": "
|
|
1089
|
+
"submit": "Lanjutkan untuk konfirmasi",
|
|
1082
1090
|
"token_for_luckydraw": " kupon untuk mengikuti undian Lucky Draw",
|
|
1083
1091
|
"u_have": "Anda mempunyai ",
|
|
1084
1092
|
"yes": "Ya",
|
|
1093
|
+
"you_have": "Kamu punya ",
|
|
1085
1094
|
"your_maks_token_is": "Maksimal kupon anda adalah "
|
|
1086
1095
|
},
|
|
1087
1096
|
"event/order_reschedule": {
|
|
@@ -1135,7 +1144,7 @@
|
|
|
1135
1144
|
"btn_yes_alert_cant_share_ticket_to_myself": "Ok",
|
|
1136
1145
|
"btn_yes_alert_share_ticket": "Ya",
|
|
1137
1146
|
"click_here": "Klik disini",
|
|
1138
|
-
"in_member_bbo_page": "Yang terdapat pada halaman member
|
|
1147
|
+
"in_member_bbo_page": "Yang terdapat pada halaman member %s",
|
|
1139
1148
|
"load_error": "Oops!",
|
|
1140
1149
|
"msg_alert_cant_share_ticket_to_myself": "Anda tidak bisa membagikan tiket ke akun Anda sendiri",
|
|
1141
1150
|
"msg_alert_share_ticket": "Bagikan Tiket ini ?",
|
|
@@ -1149,7 +1158,7 @@
|
|
|
1149
1158
|
"title_alert_fault": "Kesalahan",
|
|
1150
1159
|
"title_alert_share_ticket": "Konfirmasi",
|
|
1151
1160
|
"title_curl_success": "Informasi",
|
|
1152
|
-
"title_share_ticket_to": "Bagikan Tiket ke sesama member
|
|
1161
|
+
"title_share_ticket_to": "Bagikan Tiket ke sesama member %s"
|
|
1153
1162
|
},
|
|
1154
1163
|
"event/order_share_to_detail": {
|
|
1155
1164
|
"back": "Kembali",
|
|
@@ -1170,7 +1179,7 @@
|
|
|
1170
1179
|
"already_paid": "Sudah Dibayar",
|
|
1171
1180
|
"cancel": "Dibatalkan Member",
|
|
1172
1181
|
"done": "Sudah Dipakai",
|
|
1173
|
-
"expired": "
|
|
1182
|
+
"expired": "Kedaluwarsa",
|
|
1174
1183
|
"refund": "Refund",
|
|
1175
1184
|
"review": "Review",
|
|
1176
1185
|
"system_cancel": "Dibatalkan Sistem",
|
|
@@ -1398,9 +1407,11 @@
|
|
|
1398
1407
|
"wait": "Mohon tunggu"
|
|
1399
1408
|
},
|
|
1400
1409
|
"event/tms_check_code": {
|
|
1410
|
+
"already_use": "Sudah digunakan",
|
|
1401
1411
|
"code": "Check Code",
|
|
1402
1412
|
"error": "Kesalahan",
|
|
1403
1413
|
"input_code": "Kode %s",
|
|
1414
|
+
"not_used": "Belum digunakan",
|
|
1404
1415
|
"ticket": "Check Ticket",
|
|
1405
1416
|
"title": "Check Ticket"
|
|
1406
1417
|
},
|
|
@@ -1428,6 +1439,7 @@
|
|
|
1428
1439
|
"message": "Apakan anda yakin ingin mereset tiket ini ?",
|
|
1429
1440
|
"not_scan_in": "Belum di scan masuk",
|
|
1430
1441
|
"not_scan_out": "Belum di scan keluar",
|
|
1442
|
+
"notyet_scan_temp_out": "Belum pernah scan keluar sementara",
|
|
1431
1443
|
"qr_info": "Informasi",
|
|
1432
1444
|
"qr_msg": "Kode QR belum pernah dipindai",
|
|
1433
1445
|
"reset": "RESET",
|
|
@@ -1451,7 +1463,11 @@
|
|
|
1451
1463
|
"block_idcard_no": "BATAL",
|
|
1452
1464
|
"block_idcard_ok": "TAHAN",
|
|
1453
1465
|
"block_idcard_title": "Tahan ID CARD?",
|
|
1466
|
+
"cancel": "Batal",
|
|
1467
|
+
"closing_tms": "Closing TMS",
|
|
1454
1468
|
"gate_scanner": "Gate Scanner",
|
|
1469
|
+
"log_exchange": "Log Penukaran Tiket",
|
|
1470
|
+
"log_tms": "Log TMS (Gate + Hall)",
|
|
1455
1471
|
"qc_idcard": "QC ID Card (Print)"
|
|
1456
1472
|
},
|
|
1457
1473
|
"event/tms_event_list": {
|
package/package.json
CHANGED
package/event/entrance.tsx
DELETED
|
@@ -1,215 +0,0 @@
|
|
|
1
|
-
// withHooks
|
|
2
|
-
import { LibLoading } from 'esoftplay/cache/lib/loading/import';
|
|
3
|
-
import { LibNavigation } from 'esoftplay/cache/lib/navigation/import';
|
|
4
|
-
import { LibStyle } from 'esoftplay/cache/lib/style/import';
|
|
5
|
-
|
|
6
|
-
import { EventFirebase_socket } from 'esoftplay/cache/event/firebase_socket/import';
|
|
7
|
-
import { EventTms_homeProperty } from 'esoftplay/cache/event/tms_home/import';
|
|
8
|
-
import { LibDialog } from 'esoftplay/cache/lib/dialog/import';
|
|
9
|
-
import esp from 'esoftplay/esp';
|
|
10
|
-
import React, { useEffect } from 'react';
|
|
11
|
-
import { View } from 'react-native';
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
export interface EventTms_inArgs {
|
|
15
|
-
|
|
16
|
-
}
|
|
17
|
-
export interface EventTms_inProps {
|
|
18
|
-
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
export default function m(props: EventTms_inProps): any {
|
|
23
|
-
|
|
24
|
-
const { price_type,
|
|
25
|
-
gate_type,
|
|
26
|
-
qr_code,
|
|
27
|
-
event_id,
|
|
28
|
-
selectGate,
|
|
29
|
-
typeScanner,
|
|
30
|
-
event_title,
|
|
31
|
-
url_ticket_detail,
|
|
32
|
-
url_ticket_update,
|
|
33
|
-
configPriority,
|
|
34
|
-
scan_type
|
|
35
|
-
} = LibNavigation.getArgsAll<any>(props)
|
|
36
|
-
|
|
37
|
-
const { get } = EventFirebase_socket()
|
|
38
|
-
|
|
39
|
-
let whatTypeGate = gate_type == "1" ? 'in' : 'out'
|
|
40
|
-
|
|
41
|
-
/* price_id */
|
|
42
|
-
/* qty */
|
|
43
|
-
/* name */
|
|
44
|
-
/* qty_used */
|
|
45
|
-
/* image */
|
|
46
|
-
// sample: [
|
|
47
|
-
// "1121": [
|
|
48
|
-
// 2,
|
|
49
|
-
// "Muhammad Bagus Yulianto",
|
|
50
|
-
// 2,
|
|
51
|
-
// "https://api.test.bbo.co.id/images/modules/user/avatar/122674696.jpg"
|
|
52
|
-
// ],
|
|
53
|
-
// "staff": [
|
|
54
|
-
// [
|
|
55
|
-
// 1,
|
|
56
|
-
// "Muhammad Bagus Yulianto",
|
|
57
|
-
// 0,
|
|
58
|
-
// "https://api.test.bbo.co.id/images/modules/bigbang/exhibitor/1/staff/1211616174.jpg",
|
|
59
|
-
// "VIP-Expo Indonesia Jaya"
|
|
60
|
-
// ]
|
|
61
|
-
// ]
|
|
62
|
-
// ]
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
function mainPath(qr: string) {
|
|
66
|
-
let a = ['event', event_id, whatTypeGate, qr]
|
|
67
|
-
return a.join('/')
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
let args = {
|
|
71
|
-
price_type: price_type,
|
|
72
|
-
gate_type: gate_type,
|
|
73
|
-
qr_code: qr_code,
|
|
74
|
-
event_id: event_id,
|
|
75
|
-
event_title: event_title,
|
|
76
|
-
selectGate: selectGate,
|
|
77
|
-
typeScanner: typeScanner,
|
|
78
|
-
url_ticket_detail: url_ticket_detail,
|
|
79
|
-
url_ticket_update: url_ticket_update,
|
|
80
|
-
configPriority: configPriority,
|
|
81
|
-
scan_type: scan_type
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
useEffect(() => {
|
|
85
|
-
if (qr_code) {
|
|
86
|
-
loadData()
|
|
87
|
-
} else {
|
|
88
|
-
LibDialog.warningConfirm("Oops", "QR Code tidak ditemukan", "Kembali", () => {
|
|
89
|
-
LibNavigation.back()
|
|
90
|
-
}, "", () => { })
|
|
91
|
-
}
|
|
92
|
-
}, [])
|
|
93
|
-
|
|
94
|
-
function direction(tikets: any, tiket: any) {
|
|
95
|
-
if (tiket.qty > 1) {
|
|
96
|
-
LibNavigation.replace('event/tms_in_list', {
|
|
97
|
-
tickets: tikets,
|
|
98
|
-
...args
|
|
99
|
-
})
|
|
100
|
-
} else {
|
|
101
|
-
LibNavigation.replace('event/tms_in_success', {
|
|
102
|
-
selectedTicket: tiket,
|
|
103
|
-
...args
|
|
104
|
-
})
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
function loadData() {
|
|
109
|
-
let tikets: any[] = []
|
|
110
|
-
EventTms_homeProperty.addCounterEntranceScan(1, "0")
|
|
111
|
-
get(mainPath(encodeURIComponent(encodeURIComponent(qr_code))), selectGate?.id, (res) => {
|
|
112
|
-
esp.log({ res });
|
|
113
|
-
if (!res) {
|
|
114
|
-
LibNavigation.replace('event/tms_in_failed', {
|
|
115
|
-
text: esp.lang("event/tms_in", "ticket_empty_today"),
|
|
116
|
-
...args
|
|
117
|
-
})
|
|
118
|
-
return
|
|
119
|
-
} else {
|
|
120
|
-
Object.keys(res).forEach((key) => {
|
|
121
|
-
if (key == 'staff') {
|
|
122
|
-
Object.values(res[key]).map((item: any) => {
|
|
123
|
-
let x = {
|
|
124
|
-
price_id: key,
|
|
125
|
-
title: decodeURIComponent(item[4])?.split("+").join(' '),
|
|
126
|
-
color: LibStyle.colorPrimary,
|
|
127
|
-
key: item[5],
|
|
128
|
-
user_name: item[1],
|
|
129
|
-
user_image: item[3],
|
|
130
|
-
exhibitor_name: decodeURIComponent(item[4])?.split("+").join(' '),
|
|
131
|
-
qty: item[0],
|
|
132
|
-
qty_used: item[2],
|
|
133
|
-
qty_left: Number(item[0]) - (Number(item[2]) || 0),
|
|
134
|
-
text: item[6] || "",
|
|
135
|
-
}
|
|
136
|
-
tikets.push(x)
|
|
137
|
-
})
|
|
138
|
-
} else {
|
|
139
|
-
let a = {
|
|
140
|
-
price_id: key,
|
|
141
|
-
title: price_type?.filter?.((item: any) => item.id == key)[0]?.name,
|
|
142
|
-
color: price_type?.filter?.((item: any) => item.id == key)[0]?.color,
|
|
143
|
-
key: qr_code,
|
|
144
|
-
user_name: Object.values(res[key])?.[1],
|
|
145
|
-
user_image: Object.values(res[key])?.[3],
|
|
146
|
-
qty: Object.values(res[key])?.[0],
|
|
147
|
-
qty_used: Object.values(res[key])?.[2],
|
|
148
|
-
qty_left: Number(Object.values(res[key])?.[0]) - (Number(Object.values(res[key])?.[2]) || 0),
|
|
149
|
-
text: (Object.values(res[key])?.[4] == 'k' ? Object.values(res[key]) : Object.values(res[key])?.[4]) || ""
|
|
150
|
-
}
|
|
151
|
-
tikets.push(a)
|
|
152
|
-
}
|
|
153
|
-
})
|
|
154
|
-
|
|
155
|
-
if (tikets.length > 0) {
|
|
156
|
-
if (tikets.length == 1) {
|
|
157
|
-
const tiket = tikets[0];
|
|
158
|
-
|
|
159
|
-
if (tiket?.text == "") { // jika index ke 5 di result get nya TIDAK ADA text nya
|
|
160
|
-
if (tiket.qty_left <= 0) { // jika qty left nya 0 maka tiketnya habis
|
|
161
|
-
LibNavigation.replace('event/tms_in_failed', {
|
|
162
|
-
text: esp.lang("event/tms_in", "ticket_empty"),
|
|
163
|
-
ticketItem: tiket,
|
|
164
|
-
...args
|
|
165
|
-
})
|
|
166
|
-
} else { // jika masih punya tiket
|
|
167
|
-
if (tiket.hasOwnProperty("exhibitor_name")) { // jika dia punya id card
|
|
168
|
-
LibNavigation.replace('event/tms_idcard', {
|
|
169
|
-
selectedTicket: tiket,
|
|
170
|
-
...args
|
|
171
|
-
})
|
|
172
|
-
} else { // ini data tiket user yang available
|
|
173
|
-
if (configPriority) { // ini untuk memunculkan priority
|
|
174
|
-
if (configPriority?.filter?.((item: any) => item.id == tiket.price_id).length > 0) {
|
|
175
|
-
direction(tikets, tiket)
|
|
176
|
-
} else { // ini jika di tms tidak memiliki hak scan tipe tiket tertentu
|
|
177
|
-
LibNavigation.replace('event/tms_in_warning', {
|
|
178
|
-
selectedTicket: tiket,
|
|
179
|
-
...args
|
|
180
|
-
})
|
|
181
|
-
}
|
|
182
|
-
} else {
|
|
183
|
-
direction(tikets, tiket)
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
} else {// jika index ke 5 di result get nya ADA text nya
|
|
188
|
-
LibNavigation.replace('event/tms_in_failed', {
|
|
189
|
-
text: tiket?.text,
|
|
190
|
-
ticketItem: tiket,
|
|
191
|
-
...args
|
|
192
|
-
})
|
|
193
|
-
}
|
|
194
|
-
} else { // ini jika tiketnya ada banyak
|
|
195
|
-
LibNavigation.replace('event/tms_in_list', {
|
|
196
|
-
tickets: tikets,
|
|
197
|
-
...args
|
|
198
|
-
})
|
|
199
|
-
}
|
|
200
|
-
} else { // ini jika tiketnya tidak ada
|
|
201
|
-
LibNavigation.replace('event/tms_in_failed', {
|
|
202
|
-
text: esp.lang("event/tms_in", "ticket_not_found"),
|
|
203
|
-
...args
|
|
204
|
-
})
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
})
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
return (
|
|
211
|
-
<View style={{ flex: 1, backgroundColor: '#fff' }}>
|
|
212
|
-
<LibLoading />
|
|
213
|
-
</View>
|
|
214
|
-
)
|
|
215
|
-
}
|
package/event/entrance_again.tsx
DELETED
|
@@ -1,199 +0,0 @@
|
|
|
1
|
-
// withHooks
|
|
2
|
-
|
|
3
|
-
import { LibCurl } from 'esoftplay/cache/lib/curl/import';
|
|
4
|
-
import { LibDialog } from 'esoftplay/cache/lib/dialog/import';
|
|
5
|
-
import { LibLoading } from 'esoftplay/cache/lib/loading/import';
|
|
6
|
-
import { LibNavigation } from 'esoftplay/cache/lib/navigation/import';
|
|
7
|
-
import { LibProgress } from 'esoftplay/cache/lib/progress/import';
|
|
8
|
-
import { LibStyle } from 'esoftplay/cache/lib/style/import';
|
|
9
|
-
import { LibToastProperty } from 'esoftplay/cache/lib/toast/import';
|
|
10
|
-
|
|
11
|
-
import { applyStyle } from 'esoftplay';
|
|
12
|
-
import { EventButton } from 'esoftplay/cache/event/button/import';
|
|
13
|
-
import { EventHeader } from 'esoftplay/cache/event/header/import';
|
|
14
|
-
import { EventScan_item } from 'esoftplay/cache/event/scan_item/import';
|
|
15
|
-
import { LibObject } from 'esoftplay/cache/lib/object/import';
|
|
16
|
-
import { LibPicture } from 'esoftplay/cache/lib/picture/import';
|
|
17
|
-
import esp from 'esoftplay/esp';
|
|
18
|
-
import moment from 'esoftplay/moment';
|
|
19
|
-
import useSafeState from 'esoftplay/state';
|
|
20
|
-
import React, { useEffect } from 'react';
|
|
21
|
-
import { ScrollView, Text, TouchableOpacity, View } from 'react-native';
|
|
22
|
-
moment().locale('id')
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
export interface EventTms_in_againArgs {
|
|
26
|
-
|
|
27
|
-
}
|
|
28
|
-
export interface EventTms_in_againProps {
|
|
29
|
-
|
|
30
|
-
}
|
|
31
|
-
export default function m(props: EventTms_in_againProps): any {
|
|
32
|
-
const [result, setResult] = useSafeState<any>(undefined)
|
|
33
|
-
|
|
34
|
-
const user_qr = LibNavigation.getArgs(props, 'qr_code')
|
|
35
|
-
const { scan_type, event_id, event_title, selectGate, typeScanner }: any = LibNavigation.getArgsAll(props)
|
|
36
|
-
|
|
37
|
-
useEffect(() => {
|
|
38
|
-
loadData()
|
|
39
|
-
}, [])
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
function loadData(): void {
|
|
43
|
-
var post = {
|
|
44
|
-
// event_id: "264",
|
|
45
|
-
// user_qr: encodeURIComponent("BBO-H6851"),
|
|
46
|
-
// gate_id: "182"
|
|
47
|
-
event_id: event_id,
|
|
48
|
-
user_qr: encodeURIComponent(user_qr),
|
|
49
|
-
gate_id: selectGate?.id
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
new LibCurl('event_tms_out_temporary_in', post, (res) => {
|
|
53
|
-
let a = res?.list?.length > 0 && res.list.map((item: any, i: number) => {
|
|
54
|
-
return ({
|
|
55
|
-
...item,
|
|
56
|
-
checked: 0
|
|
57
|
-
})
|
|
58
|
-
})
|
|
59
|
-
let b = res?.staff?.length > 0 && res.staff.map((item: any, i: number) => {
|
|
60
|
-
return ({
|
|
61
|
-
...item,
|
|
62
|
-
checked: 0
|
|
63
|
-
})
|
|
64
|
-
})
|
|
65
|
-
|
|
66
|
-
let c = {
|
|
67
|
-
...res,
|
|
68
|
-
list: res?.list?.length == 0 ? [] : a,
|
|
69
|
-
staff: res?.staff?.length == 0 ? [] : b
|
|
70
|
-
}
|
|
71
|
-
esp.log({ res, c });
|
|
72
|
-
setResult(c)
|
|
73
|
-
}, (error) => {
|
|
74
|
-
LibDialog.warningConfirm(esp.lang("event/tms_in_again", "fault"), error?.message, esp.lang("event/tms_in_again", "back"), () => LibNavigation.back(), "", () => { })
|
|
75
|
-
}, 1)
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
function entrance(): void {
|
|
79
|
-
let newData = [...result?.staff, ...result?.list]
|
|
80
|
-
let _ids = newData?.filter((item: any) => item.checked == 1).map((it: any) => it.id)
|
|
81
|
-
if (_ids.length == 0) {
|
|
82
|
-
LibToastProperty.show(esp.lang("event/tms_in_again", "warning_ticket"))
|
|
83
|
-
return
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
if (_ids.length == 0) {
|
|
87
|
-
LibToastProperty.show(esp.lang("event/tms_in_again", "warning_ticket"))
|
|
88
|
-
return
|
|
89
|
-
}
|
|
90
|
-
var post = {
|
|
91
|
-
event_id: event_id,
|
|
92
|
-
ids: JSON.stringify(_ids),
|
|
93
|
-
gate_id: selectGate.id
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
LibProgress.show(esp.lang("event/tms_in_again", "wait"))
|
|
97
|
-
new LibCurl('event_tms_out_temporary_in_confirm', post, (result, msg) => {
|
|
98
|
-
esp.log({ result, msg, post });
|
|
99
|
-
LibProgress.hide()
|
|
100
|
-
LibDialog.confirm(esp.lang("event/tms_in_again", "info"), result, esp.lang("event/tms_in_again", "ok"), () => {
|
|
101
|
-
LibNavigation.replace('component/scanner', {
|
|
102
|
-
selectGate: selectGate,
|
|
103
|
-
fromPage: 'event/tms_home',
|
|
104
|
-
event_id: event_id,
|
|
105
|
-
event_title: event_title,
|
|
106
|
-
typeScanner: typeScanner,
|
|
107
|
-
scan_type: scan_type
|
|
108
|
-
})
|
|
109
|
-
}, "", () => { })
|
|
110
|
-
}, (error) => {
|
|
111
|
-
esp.log({ error });
|
|
112
|
-
LibDialog.warning(esp.lang("event/tms_in_again", "oops"), error?.message)
|
|
113
|
-
LibProgress.hide()
|
|
114
|
-
})
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
function renderTicket(item: any, i: number) {
|
|
118
|
-
return (
|
|
119
|
-
<EventScan_item
|
|
120
|
-
key={i}
|
|
121
|
-
item={item}
|
|
122
|
-
colorFont={"#fff"}
|
|
123
|
-
event_image={result?.event_image}
|
|
124
|
-
style={{ backgroundColor: "#fff" }}
|
|
125
|
-
event_name={result?.event_name}
|
|
126
|
-
event_ondate={result?.event_ondate}
|
|
127
|
-
label={item.status == 0 ? esp.lang("event/tms_in_again", "used") : item.checked == 0 ? esp.lang("event/tms_in_again", "use") : esp.lang("event/tms_in_again", "cancel")}
|
|
128
|
-
onPress={() => {
|
|
129
|
-
if (item?.status == 1) {
|
|
130
|
-
let a = LibObject.set(result, item.checked == 1 ? 0 : 1)('list', i, 'checked')
|
|
131
|
-
setResult(a)
|
|
132
|
-
}
|
|
133
|
-
}}
|
|
134
|
-
colorBackground={item.status == 0 ? LibStyle.colorLightGrey : item.checked == 0 ? LibStyle.colorGreen : LibStyle.colorRed}
|
|
135
|
-
/>
|
|
136
|
-
|
|
137
|
-
)
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
function renderStaff(item: any, i: number) {
|
|
141
|
-
return (
|
|
142
|
-
<View key={i}>
|
|
143
|
-
|
|
144
|
-
<View style={{ padding: 10, overflow: 'hidden', flex: 1, flexDirection: 'row', backgroundColor: '#fff', borderBottomColor: LibStyle.colorGrey, borderBottomWidth: 1.5 }}>
|
|
145
|
-
<LibPicture style={applyStyle({ borderRadius: 5, width: LibStyle.width / 4.5, height: LibStyle.width / 4.5, backgroundColor: LibStyle.colorBgGrey })} source={{ uri: item?.image }} />
|
|
146
|
-
<View style={{ marginLeft: 10, flex: 1 }}>
|
|
147
|
-
<Text allowFontScaling={false} ellipsizeMode={'tail'} numberOfLines={2} style={applyStyle({ color: "#000", marginBottom: 4, fontSize: 18, fontWeight: 'bold' })}>{item.name}</Text>
|
|
148
|
-
<Text allowFontScaling={false} ellipsizeMode={'tail'} numberOfLines={2} style={applyStyle({ color: "#000", marginBottom: 4, fontSize: 14 })}>{item.department_name}</Text>
|
|
149
|
-
<Text allowFontScaling={false} ellipsizeMode={'tail'} numberOfLines={2} style={applyStyle({ color: "#000", marginBottom: 4, fontSize: 16 })}>{item.exhibitor_name}</Text>
|
|
150
|
-
{
|
|
151
|
-
item.status == 1 &&
|
|
152
|
-
<EventButton style={applyStyle({ marginTop: 10, alignSelf: 'flex-end', width: LibStyle.width / 3, backgroundColor: (item.status == 0 || item.is_limit == 1) ? LibStyle.colorLightGrey : (item.checked == 0) ? LibStyle.colorGreen : LibStyle.colorRed })} label={
|
|
153
|
-
item.status == 0 ?
|
|
154
|
-
esp.lang("event/tms_out_temporary", "used") :
|
|
155
|
-
item.hasOwnProperty("checked") && item.checked == 0 ?
|
|
156
|
-
esp.lang("event/tms_out_temporary", "use") :
|
|
157
|
-
esp.lang("event/tms_out_temporary", "cancel")
|
|
158
|
-
} fontColor={"#fff"} onPress={() => {
|
|
159
|
-
let a = LibObject.set(result, item.checked == 1 ? 0 : 1)('staff', i, 'checked')
|
|
160
|
-
setResult(a)
|
|
161
|
-
}} />
|
|
162
|
-
}
|
|
163
|
-
</View>
|
|
164
|
-
<View pointerEvents='none' style={{ position: 'absolute', justifyContent: 'center', transform: [{ rotate: '45deg' }], margin: 1, ...LibStyle.elevation(2), height: 20, width: 170, backgroundColor: LibStyle.colorPrimary, right: -50, top: 25 }} >
|
|
165
|
-
<Text style={{ color: 'white', alignSelf: 'center', fontWeight: 'bold' }} >ID CARD</Text>
|
|
166
|
-
</View>
|
|
167
|
-
</View>
|
|
168
|
-
</View>
|
|
169
|
-
)
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
if (!result) return <LibLoading />
|
|
173
|
-
|
|
174
|
-
return (
|
|
175
|
-
<View style={{ flex: 1, backgroundColor: LibStyle.colorBgGrey }}>
|
|
176
|
-
<EventHeader title={esp.lang("event/tms_in_again", "entrance_again")} subtitle={selectGate?.name} cart />
|
|
177
|
-
<ScrollView>
|
|
178
|
-
<View style={{ margin: 15, marginBottom: 0, borderRadius: 7, overflow: 'hidden' }}>
|
|
179
|
-
{
|
|
180
|
-
result?.staff?.length > 0 && result?.staff?.map(renderStaff)
|
|
181
|
-
}
|
|
182
|
-
</View>
|
|
183
|
-
<View style={{ margin: 15, marginBottom: 0, borderRadius: 7, overflow: 'hidden' }}>
|
|
184
|
-
{
|
|
185
|
-
result?.list?.length > 0 && result?.list?.map(renderTicket)
|
|
186
|
-
}
|
|
187
|
-
</View>
|
|
188
|
-
</ScrollView>
|
|
189
|
-
<TouchableOpacity onPress={() => {
|
|
190
|
-
entrance()
|
|
191
|
-
}}>
|
|
192
|
-
<View style={applyStyle({ margin: 10, height: 35, borderRadius: 17, backgroundColor: LibStyle.colorGreen, justifyContent: 'center', alignItems: 'center', paddingHorizontal: 9 })} >
|
|
193
|
-
<Text allowFontScaling={false} style={applyStyle({ fontFamily: "ArialBold", fontSize: 12, textAlign: "center", textAlignVertical: 'center', color: 'white', marginRight: 13, marginLeft: 10 })} >{esp.lang("event/tms_in_again", "entrance")}</Text>
|
|
194
|
-
</View>
|
|
195
|
-
</TouchableOpacity>
|
|
196
|
-
|
|
197
|
-
</View >
|
|
198
|
-
)
|
|
199
|
-
}
|