esoftplay-event 0.0.2-b → 0.0.2-d
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/countdown_base.tsx +88 -48
- package/event/countdown_event.tsx +2 -0
- package/event/detail.tsx +7 -6
- package/event/label_input.tsx +2 -2
- package/event/order_detail.tsx +41 -3
- package/event/order_detail_waiting.tsx +1 -1
- package/event/order_history.tsx +1 -1
- package/event/order_item.tsx +1 -1
- package/event/order_waiting.tsx +1 -1
- package/event/schedule.tsx +33 -30
- package/event/ticket_list.tsx +2 -1
- package/event/ticket_list2.tsx +39 -0
- package/event/tms_dashboard.tsx +1 -0
- package/event/tms_home.tsx +2 -2
- package/event/tms_idcard.tsx +25 -15
- package/event/tms_in.tsx +2 -1
- package/event/tms_in_failed.tsx +1 -1
- package/event/tms_in_hall_failed.tsx +1 -1
- package/event/tms_out_hall_failed.tsx +1 -1
- package/event/tms_out_temporary.tsx +3 -4
- package/event/token_order.tsx +39 -0
- package/event/token_payment.tsx +79 -0
- package/event/visitor_input.tsx +336 -53
- package/event/visitor_inputv2.tsx +103 -74
- package/id.json +26 -2
- package/package.json +1 -1
|
@@ -7,7 +7,6 @@ import { LibIcon } from 'esoftplay/cache/lib/icon/import';
|
|
|
7
7
|
import { LibInfinite } from 'esoftplay/cache/lib/infinite/import';
|
|
8
8
|
import { LibKeyboard_avoid } from 'esoftplay/cache/lib/keyboard_avoid/import';
|
|
9
9
|
import { LibNavigation } from 'esoftplay/cache/lib/navigation/import';
|
|
10
|
-
import { LibObject } from 'esoftplay/cache/lib/object/import';
|
|
11
10
|
import { LibPicture } from 'esoftplay/cache/lib/picture/import';
|
|
12
11
|
import { LibProgress } from 'esoftplay/cache/lib/progress/import';
|
|
13
12
|
import { LibSlidingup } from 'esoftplay/cache/lib/slidingup/import';
|
|
@@ -16,7 +15,6 @@ import { LibTextstyle } from 'esoftplay/cache/lib/textstyle/import';
|
|
|
16
15
|
import { LibToastProperty } from 'esoftplay/cache/lib/toast/import';
|
|
17
16
|
import { LibUtils } from 'esoftplay/cache/lib/utils/import';
|
|
18
17
|
import esp from 'esoftplay/esp';
|
|
19
|
-
import useGlobalState from 'esoftplay/global';
|
|
20
18
|
import useSafeState from 'esoftplay/state';
|
|
21
19
|
import { useRef } from 'react';
|
|
22
20
|
|
|
@@ -33,8 +31,6 @@ export interface EventVisitor_inputv2Props {
|
|
|
33
31
|
navigation: any
|
|
34
32
|
}
|
|
35
33
|
|
|
36
|
-
const inputsState = useGlobalState<any>({})
|
|
37
|
-
|
|
38
34
|
export default function m(props: EventVisitor_inputv2Props): any {
|
|
39
35
|
let _data: any = LibNavigation.getArgs(props, 'data')
|
|
40
36
|
const { msg, url } = LibNavigation.getArgsAll(props)
|
|
@@ -55,9 +51,6 @@ export default function m(props: EventVisitor_inputv2Props): any {
|
|
|
55
51
|
|
|
56
52
|
|
|
57
53
|
let _tabs: any = getData()?.list
|
|
58
|
-
function setText(list_id: string): (name: string) => void {
|
|
59
|
-
return (name) => inputsState.set(LibObject.set(inputsState.get(), name)(list_id))
|
|
60
|
-
}
|
|
61
54
|
|
|
62
55
|
useEffect(() => {
|
|
63
56
|
loadData()
|
|
@@ -90,41 +83,21 @@ export default function m(props: EventVisitor_inputv2Props): any {
|
|
|
90
83
|
}
|
|
91
84
|
}
|
|
92
85
|
|
|
93
|
-
function send(): void {
|
|
94
|
-
var post: any = undefined
|
|
95
|
-
const inputs = inputsState.get()
|
|
96
|
-
post = {
|
|
97
|
-
name: Object.values(inputs).join("|"),
|
|
98
|
-
list_id: Object.keys(inputs).join("|")
|
|
99
|
-
}
|
|
100
|
-
LibDialog.confirm(esp.lang("event/visitor_input", "confirm_title"), esp.lang("event/visitor_input", "confirm_msg"), esp.lang("event/visitor_input", "confirm_ok"), () => {
|
|
101
|
-
LibProgress.show(esp.lang("event/visitor_input", "confirm_wait"))
|
|
102
|
-
new LibCurl('event_exhibitor_staff?contact_id=' + data.contact_id, post, (res, msg) => {
|
|
103
|
-
LibProgress.hide()
|
|
104
|
-
LibDialog.info(esp.lang("event/visitor_input", "confirm_success"), msg);
|
|
105
|
-
LibNavigation.reset()
|
|
106
|
-
// BigbangIndexProperty.setTab(0)
|
|
107
|
-
// LibNavigation.navigate('bigbang/notif_index', { tabIndex: 0 }) // ini notifnya di perbarui
|
|
108
|
-
}, (error) => {
|
|
109
|
-
LibProgress.hide()
|
|
110
|
-
LibDialog.warning(esp.lang("event/visitor_input", "confirm_failed"), error?.message)
|
|
111
|
-
})
|
|
112
|
-
}, esp.lang("event/visitor_input", "confirm_cancel"), () => { })
|
|
113
|
-
}
|
|
114
|
-
|
|
115
86
|
function assignToken() {
|
|
116
|
-
|
|
117
|
-
if (token && token != 0 && token > getData()?.token_remaining) {
|
|
87
|
+
if (selectedCode?.use_token == 1 && token != 0 && token > getData()?.token_remaining) {
|
|
118
88
|
LibToastProperty?.show(esp.lang("event/visitor_inputv2", "max_token_is") + getData()?.token_remaining)
|
|
119
89
|
return
|
|
120
90
|
}
|
|
121
91
|
|
|
122
|
-
let post = {
|
|
92
|
+
let post: any = {
|
|
123
93
|
name: inputName?.current?.getText(),
|
|
124
|
-
token: inputToken?.current?.getText() == "" ? 0 : inputToken?.current?.getText(),
|
|
125
94
|
code: selectedCode?.access_code
|
|
126
95
|
}
|
|
127
96
|
|
|
97
|
+
if (selectedCode?.use_token == 1) {
|
|
98
|
+
post.token = inputToken?.current?.getText()
|
|
99
|
+
}
|
|
100
|
+
|
|
128
101
|
LibDialog.confirm(esp.lang("event/visitor_input", "confirm_title"), esp.lang("event/visitor_inputv2", "confirm_input_token"), esp.lang("event/visitor_inputv2", "yes"), () => {
|
|
129
102
|
LibProgress.show(esp.lang("event/visitor_inputv2", "please_wait"))
|
|
130
103
|
new LibCurl('event_exhibitor_staff_token', post, (res, msg) => {
|
|
@@ -142,7 +115,31 @@ export default function m(props: EventVisitor_inputv2Props): any {
|
|
|
142
115
|
}, esp.lang("event/visitor_inputv2", "no"), () => { })
|
|
143
116
|
}
|
|
144
117
|
|
|
145
|
-
|
|
118
|
+
function withdrawToken() {
|
|
119
|
+
LibDialog.warningConfirm(esp.lang("event/visitor_inputv2", "warning"), esp.lang("event/visitor_inputv2", "confirm_withdraw_token"), esp.lang("event/visitor_inputv2", "yes"), () => {
|
|
120
|
+
let post = {
|
|
121
|
+
token: inputToken?.current?.getText(),
|
|
122
|
+
code: selectedCode?.access_code
|
|
123
|
+
}
|
|
124
|
+
LibProgress.show(esp.lang("event/visitor_inputv2", "please_wait"))
|
|
125
|
+
esp.log({ post });
|
|
126
|
+
new LibCurl('event_exhibitor_staff_token_withdraw', post, (res, msg) => {
|
|
127
|
+
LibProgress.hide()
|
|
128
|
+
LibDialog.info(esp.lang("event/visitor_input", "confirm_success"), msg);
|
|
129
|
+
loadData()
|
|
130
|
+
setCounter(counter + 1)
|
|
131
|
+
dialogClaim?.current?.hide()
|
|
132
|
+
}, (error) => {
|
|
133
|
+
dialogClaim?.current?.hide()
|
|
134
|
+
LibProgress.hide()
|
|
135
|
+
LibDialog.warning(esp.lang("event/visitor_input", "confirm_failed"), error?.message)
|
|
136
|
+
})
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
}, esp.lang("event/visitor_inputv2", "no"), () => {
|
|
140
|
+
|
|
141
|
+
})
|
|
142
|
+
}
|
|
146
143
|
|
|
147
144
|
function renderTabs(item: any, i: number) {
|
|
148
145
|
return (
|
|
@@ -242,20 +239,23 @@ export default function m(props: EventVisitor_inputv2Props): any {
|
|
|
242
239
|
<View style={{ padding: 5, borderWidth: 1, borderColor: LibStyle.colorBgGrey, borderRadius: 5, marginTop: 5 }}>
|
|
243
240
|
<Text allowFontScaling={false} style={{ fontSize: 10, color: '#9b9b9b' }}>{esp.lang("event/visitor_inputv2", "name")}</Text>
|
|
244
241
|
<Text allowFontScaling={false} style={{ fontSize: 14 }}>{item.name == null ? "-" : item.name}</Text>
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
<
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
<
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
<
|
|
242
|
+
{
|
|
243
|
+
item?.use_token == 1 &&
|
|
244
|
+
<View style={{ marginTop: 5, flexDirection: 'row', justifyContent: 'space-between' }}>
|
|
245
|
+
<View style={{ flex: 1 }}>
|
|
246
|
+
<Text allowFontScaling={false} style={{ fontSize: 10, color: '#9b9b9b' }}>{esp.lang("event/visitor_inputv2", "total_token")}</Text>
|
|
247
|
+
<Text allowFontScaling={false} style={{ fontSize: 14 }}>{Number(item?.token)}</Text>
|
|
248
|
+
</View>
|
|
249
|
+
<View style={{ flex: 1 }}>
|
|
250
|
+
<Text allowFontScaling={false} style={{ fontSize: 10, color: '#9b9b9b' }}>{esp.lang("event/visitor_inputv2", "token_used")}</Text>
|
|
251
|
+
<Text allowFontScaling={false} style={{ fontSize: 14 }}>{Number(item?.token_used)}</Text>
|
|
252
|
+
</View>
|
|
253
|
+
<View style={{ flex: 1 }}>
|
|
254
|
+
<Text allowFontScaling={false} style={{ fontSize: 10, color: '#9b9b9b' }}>{esp.lang("event/visitor_inputv2", "token_left")}</Text>
|
|
255
|
+
<Text allowFontScaling={false} style={{ fontSize: 14 }}>{Number(item?.token_remaining)}</Text>
|
|
256
|
+
</View>
|
|
257
257
|
</View>
|
|
258
|
-
|
|
258
|
+
}
|
|
259
259
|
</View>
|
|
260
260
|
</View>
|
|
261
261
|
)
|
|
@@ -311,13 +311,15 @@ export default function m(props: EventVisitor_inputv2Props): any {
|
|
|
311
311
|
},
|
|
312
312
|
]
|
|
313
313
|
|
|
314
|
+
esp.log({ selectedCode });
|
|
315
|
+
|
|
314
316
|
return (
|
|
315
317
|
<View style={{ flex: 1 }}>
|
|
316
318
|
<EventHeader title={esp.lang("event/visitor_input", "title_input_exhibitor")} subtitle={esp.lang("event/visitor_input", "total_staff", LibUtils.number(data.qty))} />
|
|
317
319
|
<LibKeyboard_avoid style={{ flex: 1 }}>
|
|
318
320
|
<>
|
|
319
321
|
{
|
|
320
|
-
activeTab?.type == "STAFF" &&
|
|
322
|
+
activeTab?.type == "STAFF" && data?.use_token == 1 &&
|
|
321
323
|
<View style={{ padding: 10, paddingBottom: 0, flexDirection: 'row', justifyContent: 'space-between', flexWrap: 'wrap' }}>
|
|
322
324
|
{
|
|
323
325
|
menuHeader?.map((item, i) => {
|
|
@@ -408,46 +410,73 @@ export default function m(props: EventVisitor_inputv2Props): any {
|
|
|
408
410
|
editable={selectedCode?.is_used == "1" ? false : true}
|
|
409
411
|
/>
|
|
410
412
|
|
|
413
|
+
|
|
411
414
|
<View style={{ flexDirection: 'row', justifyContent: 'flex-end', alignContent: 'center', alignItems: 'center' }}>
|
|
412
|
-
<View style={{ flex: 2 }}>
|
|
413
|
-
<EventLabel_input label={esp.lang("event/visitor_inputv2", "input_token")} mandatory />
|
|
414
|
-
<EventInput_rectangle
|
|
415
|
-
ref={inputToken}
|
|
416
|
-
keyboardType='phone-pad'
|
|
417
|
-
returnKeyType="done"
|
|
418
|
-
style={applyStyle({ borderRadius: 4, borderColor: '#c4c4c4', marginTop: 8, backgroundColor: '#fff' })}
|
|
419
|
-
placeholder={esp.lang("event/visitor_inputv2", "input_token")}
|
|
420
|
-
onChangeText={(t) => setToken(t)}
|
|
421
|
-
onSubmitEditing={assignToken}
|
|
422
|
-
defaultValue={selectedCode?.token != "0" ? selectedCode?.token : ''}
|
|
423
|
-
/>
|
|
424
|
-
</View>
|
|
425
415
|
{
|
|
426
|
-
selectedCode?.
|
|
427
|
-
<View style={{ flex:
|
|
428
|
-
<
|
|
429
|
-
<
|
|
430
|
-
|
|
416
|
+
selectedCode?.use_token == 1 &&
|
|
417
|
+
<View style={{ flex: 2 }}>
|
|
418
|
+
<EventLabel_input label={esp.lang("event/visitor_inputv2", "input_token")} mandatory />
|
|
419
|
+
<EventInput_rectangle
|
|
420
|
+
ref={inputToken}
|
|
421
|
+
keyboardType='phone-pad'
|
|
422
|
+
returnKeyType="done"
|
|
423
|
+
style={applyStyle({ borderRadius: 4, borderColor: '#c4c4c4', marginTop: 8, backgroundColor: '#fff' })}
|
|
424
|
+
placeholder={esp.lang("event/visitor_inputv2", "input_token")}
|
|
425
|
+
onChangeText={(t) => setToken(t)}
|
|
426
|
+
onSubmitEditing={assignToken}
|
|
427
|
+
defaultValue={selectedCode?.token != "0" ? selectedCode?.token : ''}
|
|
428
|
+
/>
|
|
429
|
+
</View>
|
|
430
|
+
}
|
|
431
|
+
{
|
|
432
|
+
selectedCode?.use_token == 1 &&
|
|
433
|
+
<View style={{ flex: 1, justifyContent: 'flex-end', marginLeft: 10, }}>
|
|
434
|
+
<EventLabel_input label={esp.lang("event/visitor_inputv2", "token_used")} />
|
|
435
|
+
<View style={{ height: 35, marginTop: 8, alignContent: 'center', justifyContent: 'center' }}>
|
|
436
|
+
<Text allowFontScaling={false} style={{ fontSize: 14 }}>{LibUtils.number(selectedCode?.token_used)}</Text>
|
|
431
437
|
</View>
|
|
432
438
|
</View>
|
|
433
439
|
}
|
|
434
440
|
{
|
|
435
|
-
selectedCode?.
|
|
436
|
-
<View style={{ flex: 1, justifyContent: 'flex-end', marginLeft: 10
|
|
437
|
-
<
|
|
438
|
-
<View style={{ marginTop:
|
|
439
|
-
<Text allowFontScaling={false} style={{
|
|
441
|
+
selectedCode?.use_token == 1 &&
|
|
442
|
+
<View style={{ flex: 1, justifyContent: 'flex-end', marginLeft: 10 }}>
|
|
443
|
+
<EventLabel_input label={esp.lang("event/visitor_inputv2", "token_left")} />
|
|
444
|
+
<View style={{ height: 35, marginTop: 8, alignContent: 'center', justifyContent: 'center' }}>
|
|
445
|
+
<Text allowFontScaling={false} style={{ fontSize: 14 }}>{LibUtils.number(selectedCode?.token_remaining)}</Text>
|
|
440
446
|
</View>
|
|
441
447
|
</View>
|
|
442
448
|
}
|
|
443
449
|
</View>
|
|
444
450
|
|
|
445
|
-
<
|
|
446
|
-
|
|
447
|
-
|
|
451
|
+
<View style={{ marginTop: 15, flexDirection: 'row', alignContent: 'center', alignItems: 'center', justifyContent: 'center' }}>
|
|
452
|
+
{
|
|
453
|
+
selectedCode?.use_token == 1 && selectedCode?.token_remaining != 0 &&
|
|
454
|
+
<View style={{ marginRight: 5, flex: 1 }}>
|
|
455
|
+
<EventButton
|
|
456
|
+
label={esp.lang("event/visitor_inputv2", "withdraw_token")}
|
|
457
|
+
onPress={() => {
|
|
458
|
+
withdrawToken()
|
|
459
|
+
}}
|
|
460
|
+
backgroundColor='#fff'
|
|
461
|
+
borderColor={LibStyle.colorRed}
|
|
462
|
+
fontColor={LibStyle.colorRed}
|
|
463
|
+
style={{ borderRadius: 5 }}
|
|
464
|
+
/>
|
|
465
|
+
</View>
|
|
466
|
+
}
|
|
448
467
|
|
|
468
|
+
<View style={{ marginLeft: (selectedCode?.token != "0" && selectedCode?.token_remaining != 0) ? 5 : 0, flex: 1 }}>
|
|
469
|
+
<EventButton
|
|
470
|
+
style={{ backgroundColor: '#00b894', borderRadius: 5 }}
|
|
471
|
+
label={esp.lang("event/visitor_input", "save_btn")}
|
|
472
|
+
onPress={() => {
|
|
473
|
+
assignToken()
|
|
474
|
+
}} />
|
|
475
|
+
</View>
|
|
476
|
+
</View>
|
|
449
477
|
</View>
|
|
450
478
|
</LibSlidingup>
|
|
479
|
+
|
|
451
480
|
</View>
|
|
452
481
|
)
|
|
453
482
|
}
|
package/id.json
CHANGED
|
@@ -1508,10 +1508,14 @@
|
|
|
1508
1508
|
"warning_load": "Oops"
|
|
1509
1509
|
},
|
|
1510
1510
|
"event/tms_idcard": {
|
|
1511
|
+
"backk": "KEMBALI",
|
|
1511
1512
|
"btn_back": "Kembali",
|
|
1512
1513
|
"company": "Perusahaan",
|
|
1513
1514
|
"header": "ID CARD",
|
|
1515
|
+
"hold_idcard": "Tahan ID CARD",
|
|
1514
1516
|
"name": "Nama",
|
|
1517
|
+
"success": "Berhasil!",
|
|
1518
|
+
"token": "TOKEN",
|
|
1515
1519
|
"visitor": "Pengunjung"
|
|
1516
1520
|
},
|
|
1517
1521
|
"event/tms_in": {
|
|
@@ -1846,20 +1850,30 @@
|
|
|
1846
1850
|
},
|
|
1847
1851
|
"event/visitor_input": {
|
|
1848
1852
|
"back": "Kembali",
|
|
1853
|
+
"code": "Kode",
|
|
1849
1854
|
"code_inv": "Kode Undangan #",
|
|
1850
1855
|
"confirm_cancel": "Batal",
|
|
1851
1856
|
"confirm_failed": "Kesalahan",
|
|
1857
|
+
"confirm_input_token": "Apakah data yang anda masukkan sudah benar?",
|
|
1852
1858
|
"confirm_msg": "Apakah Data Sudah Benar ?",
|
|
1853
1859
|
"confirm_ok": "Ya",
|
|
1854
1860
|
"confirm_success": "Selamat..!",
|
|
1855
1861
|
"confirm_title": "Konfirmasi",
|
|
1856
1862
|
"confirm_wait": "Mohon tunggu",
|
|
1863
|
+
"confirm_withdraw_token": "Apakah anda ingin menarik token dari ID Card ini ?",
|
|
1864
|
+
"input_name": "Masukkan nama",
|
|
1857
1865
|
"input_names": "Nama #%s",
|
|
1866
|
+
"input_token": "Masukkan token",
|
|
1858
1867
|
"list_claimed": "Daftar klaim kode",
|
|
1868
|
+
"max_token_is": "Maksimal token yang anda punya adalah ",
|
|
1869
|
+
"name": "Nama",
|
|
1870
|
+
"no": "Tidak",
|
|
1859
1871
|
"not_claimed": "Belum diklaim",
|
|
1872
|
+
"notyet_used": "Belum digunakan",
|
|
1860
1873
|
"placeholder_input_name": "Masukkan Nama #%s",
|
|
1874
|
+
"please_wait": "Mohon tunggu",
|
|
1861
1875
|
"resend": "Ulangi",
|
|
1862
|
-
"save_btn": "
|
|
1876
|
+
"save_btn": "Tambah",
|
|
1863
1877
|
"see_list_claimed": "Lihat daftar klaim",
|
|
1864
1878
|
"subtitle_exhibitor": "%s staf",
|
|
1865
1879
|
"subtitle_total_exhibitor": "Total %s",
|
|
@@ -1867,11 +1881,19 @@
|
|
|
1867
1881
|
"title": "Oops",
|
|
1868
1882
|
"title_input_exhibitor": "Masukkan Exhibitors",
|
|
1869
1883
|
"title_input_exhibitors": "Masukkan Exhibitors",
|
|
1870
|
-
"
|
|
1884
|
+
"token_left": "Token tersisa",
|
|
1885
|
+
"token_shared": "Token dialokasikan",
|
|
1886
|
+
"token_used": "Total terpakai",
|
|
1887
|
+
"total_staff": "Total %s ",
|
|
1888
|
+
"total_token": "Total token",
|
|
1889
|
+
"warning": "Peringatan",
|
|
1890
|
+
"withdraw_token": "Tarik Token",
|
|
1891
|
+
"yes": "Ya"
|
|
1871
1892
|
},
|
|
1872
1893
|
"event/visitor_inputv2": {
|
|
1873
1894
|
"code": "Kode",
|
|
1874
1895
|
"confirm_input_token": "Apakah data yang anda masukkan sudah benar?",
|
|
1896
|
+
"confirm_withdraw_token": "Apakah anda ingin menarik token dari ID Card ini ?",
|
|
1875
1897
|
"esp.lang(\"event/visitor_input\", \"confirm_title\")": "Info",
|
|
1876
1898
|
"input_name": "Masukkan nama",
|
|
1877
1899
|
"input_token": "Masukkan token",
|
|
@@ -1884,6 +1906,8 @@
|
|
|
1884
1906
|
"token_shared": "Token dialokasikan",
|
|
1885
1907
|
"token_used": "Total terpakai",
|
|
1886
1908
|
"total_token": "Total token",
|
|
1909
|
+
"warning": "Peringatan",
|
|
1910
|
+
"withdraw_token": "Tarik Token",
|
|
1887
1911
|
"yes": "Ya"
|
|
1888
1912
|
},
|
|
1889
1913
|
"event/voucher": {
|