esoftplay-event 0.0.1-s → 0.0.1-u
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 +1 -1
- package/event/artist_detailv2.tsx +1 -1
- package/event/artistv2.tsx +16 -16
- package/event/countdown_base.tsx +3 -3
- package/event/detail.tsx +18 -2
- package/event/detail2.tsx +354 -0
- package/event/order_detail.tsx +11 -4
- package/event/order_detail_waiting.tsx +7 -7
- package/event/order_item.tsx +1 -1
- package/event/order_reschedule.tsx +50 -52
- package/event/order_share_to.tsx +8 -21
- package/event/order_share_to_detail.tsx +8 -3
- package/event/order_waiting.tsx +1 -1
- package/event/queue_pricing.tsx +15 -2
- package/event/refresh_button.tsx +3 -5
- package/event/seat.tsx +19 -10
- package/event/ticket_list.tsx +13 -0
- package/event/ticket_list2.tsx +1 -1
- package/event/tms_check_code.tsx +6 -0
- package/event/tms_check_ticket_result.tsx +34 -5
- package/event/visitor_input.tsx +8 -1
- package/event/visitor_inputv2.tsx +397 -0
- package/event/voucher.tsx +2 -0
- package/event/voucher2.tsx +2 -0
- package/id.json +2 -0
- package/package.json +1 -1
|
@@ -72,34 +72,51 @@ export default function m(props: EventTms_check_ticket_resultProps): any {
|
|
|
72
72
|
}
|
|
73
73
|
|
|
74
74
|
function renderTmsIn(item: any, i: number) {
|
|
75
|
+
let timeScannedIn = LibUtils.moment(item.scanned_in).serverFormat("DD MMM HH:mm:ss ", item.timezone)
|
|
76
|
+
let timezone = item.hasOwnProperty("timezone_locale") ? item?.timezone_locale : ""
|
|
75
77
|
return (
|
|
76
78
|
<View key={i} style={{ borderRadius: 5, margin: 2, padding: 5, backgroundColor: i % 2 ? '#fff' : LibStyle.colorGrey, borderBottomWidth: 1, borderBottomColor: LibStyle.colorBgGrey }}>
|
|
77
79
|
{
|
|
78
80
|
item.tms_name != "" &&
|
|
79
81
|
<Text allowFontScaling={false} style={{ paddingHorizontal: 5, fontSize: 14 }}>{item.tms_name}</Text>
|
|
80
82
|
}
|
|
81
|
-
<Text allowFontScaling={false} style={{ paddingHorizontal: 5, fontSize: 14 }}>{item?.scanned_in != "0000-00-00 00:00:00" ?
|
|
83
|
+
<Text allowFontScaling={false} style={{ paddingHorizontal: 5, fontSize: 14 }}>{item?.scanned_in != "0000-00-00 00:00:00" ?
|
|
84
|
+
timeScannedIn + timezone
|
|
85
|
+
:
|
|
86
|
+
esp.lang("event/tms_check_ticket_result", "not_scan_in")}</Text>
|
|
82
87
|
|
|
83
88
|
</View>
|
|
84
89
|
)
|
|
85
90
|
}
|
|
86
91
|
|
|
87
92
|
function renderTmsOut(item: any, i: number) {
|
|
93
|
+
let timeScannedOut = LibUtils.moment(item.scanned_out).serverFormat("DD MMM HH:mm:ss ", item.timezone)
|
|
94
|
+
let timezone = item.hasOwnProperty("timezone_locale") ? item?.timezone_locale : ""
|
|
95
|
+
|
|
88
96
|
return (
|
|
89
97
|
<View key={i} style={{ borderRadius: 5, margin: 2, padding: 5, backgroundColor: i % 2 ? '#fff' : LibStyle.colorGrey, borderBottomWidth: 1, borderBottomColor: LibStyle.colorBgGrey }}>
|
|
90
98
|
{
|
|
91
99
|
item.tms_name_out != null && item.tms_name_out != "" &&
|
|
92
100
|
<Text allowFontScaling={false} style={{ paddingHorizontal: 5, fontSize: 14 }}>{item.tms_name_out}</Text>
|
|
93
101
|
}
|
|
94
|
-
<Text allowFontScaling={false} style={{ paddingHorizontal: 5, fontSize: 14 }}>{item?.scanned_out != "0000-00-00 00:00:00" ?
|
|
102
|
+
<Text allowFontScaling={false} style={{ paddingHorizontal: 5, fontSize: 14 }}>{item?.scanned_out != "0000-00-00 00:00:00" ?
|
|
103
|
+
timeScannedOut + timezone
|
|
104
|
+
:
|
|
105
|
+
esp.lang("event/tms_check_ticket_result", "not_scan_out")}</Text>
|
|
95
106
|
</View>
|
|
96
107
|
)
|
|
97
108
|
}
|
|
98
109
|
|
|
99
110
|
function renderTempOut(item: any, i: number) {
|
|
111
|
+
let timeScannedTempOut = LibUtils.moment(item.scanned_out_temporary).serverFormat("DD MMM HH:mm:ss ", item.timezone)
|
|
112
|
+
let timezone = item.hasOwnProperty("timezone_locale") ? item?.timezone_locale : ""
|
|
113
|
+
|
|
100
114
|
return (
|
|
101
115
|
<View key={i} style={{ borderRadius: 5, margin: 2, padding: 5, backgroundColor: i % 2 ? '#fff' : LibStyle.colorGrey, borderBottomWidth: 1, borderBottomColor: LibStyle.colorBgGrey }}>
|
|
102
|
-
<Text allowFontScaling={false} style={{ paddingHorizontal: 5, fontSize: 14 }}>{item.hasOwnProperty("scanned_out_temporary") && item?.scanned_out_temporary != "0000-00-00 00:00:00" ?
|
|
116
|
+
<Text allowFontScaling={false} style={{ paddingHorizontal: 5, fontSize: 14 }}>{item.hasOwnProperty("scanned_out_temporary") && item?.scanned_out_temporary != "0000-00-00 00:00:00" ?
|
|
117
|
+
timeScannedTempOut + timezone
|
|
118
|
+
:
|
|
119
|
+
esp.lang("event/tms_check_ticket_result", "notyet_scan_temp_out")}</Text>
|
|
103
120
|
</View>
|
|
104
121
|
)
|
|
105
122
|
}
|
|
@@ -113,26 +130,38 @@ export default function m(props: EventTms_check_ticket_resultProps): any {
|
|
|
113
130
|
}
|
|
114
131
|
|
|
115
132
|
function renderHallIn(item: any, i: number) {
|
|
133
|
+
let timeScannedIn = LibUtils.moment(item.scanned_in).serverFormat("DD MMM HH:mm:ss ", item.timezone)
|
|
134
|
+
let timezone = item.hasOwnProperty("timezone_locale") ? item?.timezone_locale : ""
|
|
135
|
+
|
|
116
136
|
return (
|
|
117
137
|
<View key={i} style={{ borderRadius: 5, margin: 2, padding: 5, backgroundColor: i % 2 ? '#fff' : LibStyle.colorGrey, borderBottomWidth: 1, borderBottomColor: LibStyle.colorBgGrey }}>
|
|
118
138
|
{
|
|
119
139
|
item.tms_name != "" &&
|
|
120
140
|
<Text allowFontScaling={false} style={{ paddingHorizontal: 5, fontSize: 14 }}>{item.tms_name}</Text>
|
|
121
141
|
}
|
|
122
|
-
<Text allowFontScaling={false} style={{ paddingHorizontal: 5, fontSize: 14 }}>{item?.scanned_in != "0000-00-00 00:00:00" ?
|
|
142
|
+
<Text allowFontScaling={false} style={{ paddingHorizontal: 5, fontSize: 14 }}>{item?.scanned_in != "0000-00-00 00:00:00" ?
|
|
143
|
+
timeScannedIn + timezone
|
|
144
|
+
:
|
|
145
|
+
esp.lang("event/tms_check_ticket_result", "not_scan_in")}</Text>
|
|
123
146
|
|
|
124
147
|
</View>
|
|
125
148
|
)
|
|
126
149
|
}
|
|
127
150
|
|
|
128
151
|
function renderHallOut(item: any, i: number) {
|
|
152
|
+
let timeScannedOut = LibUtils.moment(item.scanned_out).serverFormat("DD MMM HH:mm:ss ", item.timezone)
|
|
153
|
+
let timezone = item.hasOwnProperty("timezone_locale") ? item?.timezone_locale : ""
|
|
154
|
+
|
|
129
155
|
return (
|
|
130
156
|
<View key={i} style={{ borderRadius: 5, margin: 2, padding: 5, backgroundColor: i % 2 ? '#fff' : LibStyle.colorGrey, borderBottomWidth: 1, borderBottomColor: LibStyle.colorBgGrey }}>
|
|
131
157
|
{
|
|
132
158
|
item.tms_name_out != "" &&
|
|
133
159
|
<Text allowFontScaling={false} style={{ paddingHorizontal: 5, fontSize: 14 }}>{item.tms_name_out}</Text>
|
|
134
160
|
}
|
|
135
|
-
<Text allowFontScaling={false} style={{ paddingHorizontal: 5, fontSize: 14 }}>{item?.scanned_out != "0000-00-00 00:00:00" ?
|
|
161
|
+
<Text allowFontScaling={false} style={{ paddingHorizontal: 5, fontSize: 14 }}>{item?.scanned_out != "0000-00-00 00:00:00" ?
|
|
162
|
+
timeScannedOut + timezone
|
|
163
|
+
:
|
|
164
|
+
esp.lang("event/tms_check_ticket_result", "not_scan_out")}</Text>
|
|
136
165
|
|
|
137
166
|
</View>
|
|
138
167
|
)
|
package/event/visitor_input.tsx
CHANGED
|
@@ -23,6 +23,7 @@ import { useRef } from 'react';
|
|
|
23
23
|
import { applyStyle } from 'esoftplay';
|
|
24
24
|
import { EventInput_rectangle } from 'esoftplay/cache/event/input_rectangle/import';
|
|
25
25
|
import { EventLabel_input } from 'esoftplay/cache/event/label_input/import';
|
|
26
|
+
import { UserClass } from 'esoftplay/cache/user/class/import';
|
|
26
27
|
import useLazyState from 'esoftplay/lazy';
|
|
27
28
|
import React, { useEffect } from 'react';
|
|
28
29
|
import { ActivityIndicator, Platform, ScrollView, Text, TouchableOpacity, View } from 'react-native';
|
|
@@ -54,7 +55,11 @@ export default function m(props: EventVisitor_inputProps): any {
|
|
|
54
55
|
}
|
|
55
56
|
|
|
56
57
|
useEffect(() => {
|
|
57
|
-
|
|
58
|
+
if (UserClass.state().get().email == 'bagus@fisip.net') {
|
|
59
|
+
LibNavigation.replace('event/visitor_inputv2', { data: _data, url: url })
|
|
60
|
+
} else {
|
|
61
|
+
loadData()
|
|
62
|
+
}
|
|
58
63
|
}, [])
|
|
59
64
|
|
|
60
65
|
function loadData(): void {
|
|
@@ -226,6 +231,8 @@ export default function m(props: EventVisitor_inputProps): any {
|
|
|
226
231
|
)
|
|
227
232
|
}
|
|
228
233
|
|
|
234
|
+
// esp.log(_tabs);
|
|
235
|
+
|
|
229
236
|
return (
|
|
230
237
|
<View style={{ flex: 1 }}>
|
|
231
238
|
<EventHeader title={esp.lang("event/visitor_input", "title_input_exhibitor")} subtitle={esp.lang("event/visitor_input", "total_staff", LibUtils.number(data.qty))} />
|
|
@@ -0,0 +1,397 @@
|
|
|
1
|
+
// withHooks
|
|
2
|
+
import { EventButton } from 'esoftplay/cache/event/button/import';
|
|
3
|
+
import { EventHeader } from 'esoftplay/cache/event/header/import';
|
|
4
|
+
import { LibCurl } from 'esoftplay/cache/lib/curl/import';
|
|
5
|
+
import { LibDialog } from 'esoftplay/cache/lib/dialog/import';
|
|
6
|
+
import { LibIcon } from 'esoftplay/cache/lib/icon/import';
|
|
7
|
+
import { LibInfinite } from 'esoftplay/cache/lib/infinite/import';
|
|
8
|
+
import { LibKeyboard_avoid } from 'esoftplay/cache/lib/keyboard_avoid/import';
|
|
9
|
+
import { LibNavigation } from 'esoftplay/cache/lib/navigation/import';
|
|
10
|
+
import { LibObject } from 'esoftplay/cache/lib/object/import';
|
|
11
|
+
import { LibPicture } from 'esoftplay/cache/lib/picture/import';
|
|
12
|
+
import { LibProgress } from 'esoftplay/cache/lib/progress/import';
|
|
13
|
+
import { LibSlidingup } from 'esoftplay/cache/lib/slidingup/import';
|
|
14
|
+
import { LibStyle } from 'esoftplay/cache/lib/style/import';
|
|
15
|
+
import { LibTextstyle } from 'esoftplay/cache/lib/textstyle/import';
|
|
16
|
+
import { LibToastProperty } from 'esoftplay/cache/lib/toast/import';
|
|
17
|
+
import { LibUtils } from 'esoftplay/cache/lib/utils/import';
|
|
18
|
+
import esp from 'esoftplay/esp';
|
|
19
|
+
import useGlobalState from 'esoftplay/global';
|
|
20
|
+
import useSafeState from 'esoftplay/state';
|
|
21
|
+
import { useRef } from 'react';
|
|
22
|
+
|
|
23
|
+
import { applyStyle } from 'esoftplay';
|
|
24
|
+
import { EventInput_rectangle } from 'esoftplay/cache/event/input_rectangle/import';
|
|
25
|
+
import { EventLabel_input } from 'esoftplay/cache/event/label_input/import';
|
|
26
|
+
import useLazyState from 'esoftplay/lazy';
|
|
27
|
+
import React, { useEffect } from 'react';
|
|
28
|
+
import { ActivityIndicator, Platform, ScrollView, Text, TouchableOpacity, View } from 'react-native';
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
export interface EventVisitor_inputv2Props {
|
|
33
|
+
navigation: any
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
const inputsState = useGlobalState<any>({})
|
|
37
|
+
|
|
38
|
+
export default function m(props: EventVisitor_inputv2Props): any {
|
|
39
|
+
let _data: any = LibNavigation.getArgs(props, 'data')
|
|
40
|
+
const { msg, url } = LibNavigation.getArgsAll(props)
|
|
41
|
+
|
|
42
|
+
const [data, setData, getData] = useLazyState(_data)
|
|
43
|
+
const [_msg, set_msg] = useSafeState(msg)
|
|
44
|
+
const [messageGenerate, setMessageGenerate] = useSafeState<any>()
|
|
45
|
+
const [activeTab, setActiveTab] = useSafeState(data?.list[0])
|
|
46
|
+
const [counter, setCounter] = useSafeState(1)
|
|
47
|
+
const [listClaim, setListClaim] = useSafeState()
|
|
48
|
+
const [selectedCode, setSelectedCode] = useSafeState()
|
|
49
|
+
|
|
50
|
+
const dialogListClaim = useRef<LibSlidingup>(null)
|
|
51
|
+
const dialogClaim = useRef<LibSlidingup>(null)
|
|
52
|
+
|
|
53
|
+
let _tabs: any = getData()?.list
|
|
54
|
+
function setText(list_id: string): (name: string) => void {
|
|
55
|
+
return (name) => inputsState.set(LibObject.set(inputsState.get(), name)(list_id))
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
useEffect(() => {
|
|
59
|
+
loadData()
|
|
60
|
+
}, [])
|
|
61
|
+
|
|
62
|
+
function loadData(): void {
|
|
63
|
+
new LibCurl(url, null, (result, msg) => {
|
|
64
|
+
set_msg(msg)
|
|
65
|
+
if (result?.hasOwnProperty('url_generate')) {
|
|
66
|
+
generateCode(result?.url_generate, true)
|
|
67
|
+
} else {
|
|
68
|
+
setData(result)()
|
|
69
|
+
}
|
|
70
|
+
}, (error) => {
|
|
71
|
+
})
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
function generateCode(url: string, loop: boolean) {
|
|
75
|
+
if (loop) {
|
|
76
|
+
new LibCurl(url, null, (res, msg) => {
|
|
77
|
+
generateCode(url, res?.done == 1 ? false : true)
|
|
78
|
+
setMessageGenerate(msg)
|
|
79
|
+
}, (error) => {
|
|
80
|
+
LibDialog.warningConfirm(esp.lang("event/visitor_input", "title"), error?.message, esp.lang("event/visitor_input", "resend"), () => {
|
|
81
|
+
loadData()
|
|
82
|
+
}, esp.lang("event/visitor_input", "back"), () => LibNavigation.back())
|
|
83
|
+
})
|
|
84
|
+
} else {
|
|
85
|
+
loadData()
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
function send(): void {
|
|
90
|
+
var post: any = undefined
|
|
91
|
+
const inputs = inputsState.get()
|
|
92
|
+
post = {
|
|
93
|
+
name: Object.values(inputs).join("|"),
|
|
94
|
+
list_id: Object.keys(inputs).join("|")
|
|
95
|
+
}
|
|
96
|
+
LibDialog.confirm(esp.lang("event/visitor_input", "confirm_title"), esp.lang("event/visitor_input", "confirm_msg"), esp.lang("event/visitor_input", "confirm_ok"), () => {
|
|
97
|
+
LibProgress.show(esp.lang("event/visitor_input", "confirm_wait"))
|
|
98
|
+
new LibCurl('event_exhibitor_staff?contact_id=' + data.contact_id, post, (res, msg) => {
|
|
99
|
+
LibProgress.hide()
|
|
100
|
+
LibDialog.info(esp.lang("event/visitor_input", "confirm_success"), msg);
|
|
101
|
+
LibNavigation.reset()
|
|
102
|
+
// BigbangIndexProperty.setTab(0)
|
|
103
|
+
// LibNavigation.navigate('bigbang/notif_index', { tabIndex: 0 }) // ini notifnya di perbarui
|
|
104
|
+
}, (error) => {
|
|
105
|
+
LibProgress.hide()
|
|
106
|
+
LibDialog.warning(esp.lang("event/visitor_input", "confirm_failed"), error?.message)
|
|
107
|
+
})
|
|
108
|
+
}, esp.lang("event/visitor_input", "confirm_cancel"), () => { })
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
function renderTabs(item: any, i: number) {
|
|
112
|
+
return (
|
|
113
|
+
<TouchableOpacity key={i} onPress={() => {
|
|
114
|
+
setActiveTab(item)
|
|
115
|
+
setCounter(counter + 1)
|
|
116
|
+
}}>
|
|
117
|
+
<View style={applyStyle({ height: 35, width: LibStyle.width / 4, alignItems: 'center', overflow: 'visible', justifyContent: 'center', backgroundColor: '#fff' })}>
|
|
118
|
+
<View style={{ width: LibStyle.width / 4, }}>
|
|
119
|
+
<Text allowFontScaling={false} numberOfLines={2} ellipsizeMode='tail' style={applyStyle({ fontFamily: "Arial", fontSize: 11, fontWeight: activeTab?.id == item?.id ? "bold" : "normal", fontStyle: "normal", letterSpacing: 0, textAlign: "center", color: activeTab?.id == item?.id ? "#51b596" : "#c5c5c5" })}>{item.name}</Text>
|
|
120
|
+
<Text allowFontScaling={false} style={applyStyle({ fontFamily: "Arial", fontSize: 11, fontWeight: activeTab?.id == item?.id ? "bold" : "normal", fontStyle: "normal", letterSpacing: 0, textAlign: "center", color: activeTab?.id == item?.id ? "#51b596" : "#c5c5c5" })}>({LibUtils.number(item?.qty)})</Text>
|
|
121
|
+
</View>
|
|
122
|
+
<View style={applyStyle({ width: (LibStyle.width / 4) - 20, height: 3, backgroundColor: activeTab?.id == item?.id ? "#51b596" : "#fff", position: 'absolute', bottom: -1 })} />
|
|
123
|
+
</View>
|
|
124
|
+
</TouchableOpacity>
|
|
125
|
+
)
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
function renderItem(item: any, i: any) {
|
|
129
|
+
if (activeTab?.type == "INVITE") {
|
|
130
|
+
let bgColor = Number(item.qty_used) != Number(item.qty) ? "#fff" : LibStyle.colorBgGrey
|
|
131
|
+
let borderColor = Number(item.qty_used) != Number(item.qty) ? LibStyle.colorBgGrey : "#fff"
|
|
132
|
+
return (
|
|
133
|
+
<View style={{ margin: 15, marginBottom: 0, padding: 10, borderWidth: 1.5, backgroundColor: bgColor, borderColor: borderColor, borderRadius: 5 }}>
|
|
134
|
+
<View style={{ flexDirection: 'row', flex: 1, justifyContent: 'space-between', alignContent: 'center', alignItems: 'center' }}>
|
|
135
|
+
<Text allowFontScaling={false} style={{ fontFamily: "SFProText", fontSize: 12, fontWeight: "bold", fontStyle: "normal", letterSpacing: 0, color: "#4b4b4b", }}>
|
|
136
|
+
{esp.lang("event/visitor_input", "code_inv") + (i + 1)}
|
|
137
|
+
</Text>
|
|
138
|
+
{
|
|
139
|
+
item.hasOwnProperty("url") && item.qty_used != 0 &&
|
|
140
|
+
|
|
141
|
+
<Text allowFontScaling={false} style={{ fontFamily: "Arial", fontSize: 13, fontWeight: "bold", fontStyle: "normal", lineHeight: 22, letterSpacing: 0, color: "#51b596" }}>{LibUtils.number(item.qty_used) + "/" + LibUtils.number(item.qty)}</Text>
|
|
142
|
+
// <View style={{ padding: 5, borderWidth: 1, borderColor: LibStyle.colorPrimary, borderRadius: 5 }}>
|
|
143
|
+
// </View>
|
|
144
|
+
}
|
|
145
|
+
<TouchableOpacity activeOpacity={item.name == "" ? 0 : 1} onPress={() => {
|
|
146
|
+
if (Number(item.qty_used) != Number(item.qty)) {
|
|
147
|
+
LibUtils.copyToClipboard(item.access_code)
|
|
148
|
+
LibToastProperty.show(esp.lang("event/visitor_input", "success_copy", item.access_code))
|
|
149
|
+
}
|
|
150
|
+
}}>
|
|
151
|
+
<View style={{ flexDirection: 'row', alignContent: 'center', alignItems: 'center' }}>
|
|
152
|
+
<Text allowFontScaling={false} style={applyStyle({ fontFamily: "Arial", fontSize: 13, fontWeight: "bold", fontStyle: "normal", lineHeight: 22, letterSpacing: 0, color: Number(item.qty_used) == Number(item.qty) ? "#c4c4c4" : "#2980b9" })}>{item.access_code}</Text>
|
|
153
|
+
<LibIcon.Ionicons name='copy' size={16} style={applyStyle({ color: Number(item.qty_used) == Number(item.qty) ? "#c4c4c4" : "#2980b9", marginLeft: 7 })} />
|
|
154
|
+
</View>
|
|
155
|
+
</TouchableOpacity>
|
|
156
|
+
</View>
|
|
157
|
+
{
|
|
158
|
+
item.hasOwnProperty("name") &&
|
|
159
|
+
<Text allowFontScaling={false} style={{ marginTop: 5, fontFamily: "SFProText", color: '#4b4b4b' }}>{item?.name == "" ? esp.lang("event/visitor_input", "not_claimed") : item.name}</Text>
|
|
160
|
+
}
|
|
161
|
+
{
|
|
162
|
+
item.hasOwnProperty("url") &&
|
|
163
|
+
<View style={{ marginTop: 5, flexDirection: 'row', flex: 1 }}>
|
|
164
|
+
{
|
|
165
|
+
item.qty_used == 0 ?
|
|
166
|
+
<Text allowFontScaling={false} style={{ fontFamily: "SFProText", color: '#4b4b4b' }}>{esp.lang("event/visitor_input", "not_claimed")}</Text>
|
|
167
|
+
:
|
|
168
|
+
<View>
|
|
169
|
+
{/* <Text allowFontScaling={false} style={{ fontFamily: "SFProText", color: '#4b4b4b', marginBottom: 5 }}>{LibUtils.number(item.qty_used) + " sudah diklaim"}</Text> */}
|
|
170
|
+
<TouchableOpacity onPress={() => {
|
|
171
|
+
setListClaim(item)
|
|
172
|
+
LibUtils.debounce(() => {
|
|
173
|
+
dialogListClaim?.current?.show()
|
|
174
|
+
}, 200)
|
|
175
|
+
}} style={{ paddingHorizontal: 7, paddingVertical: 5, borderRadius: 5, borderWidth: 1, borderColor: LibStyle.colorBlue }}>
|
|
176
|
+
<Text allowFontScaling={false} style={{ color: LibStyle.colorBlue, fontWeight: 'bold', fontSize: 12 }}>{esp.lang("event/visitor_input", "see_list_claimed")}</Text>
|
|
177
|
+
</TouchableOpacity>
|
|
178
|
+
</View>
|
|
179
|
+
}
|
|
180
|
+
</View>
|
|
181
|
+
}
|
|
182
|
+
</View>
|
|
183
|
+
)
|
|
184
|
+
} else {
|
|
185
|
+
return (
|
|
186
|
+
<View style={{ margin: 10, marginBottom: 0, padding: 10, borderRadius: 5, borderWidth: 1, borderColor: LibStyle.colorBgGrey }}>
|
|
187
|
+
<View style={{ flexDirection: 'row', justifyContent: 'space-between', alignContent: 'center', alignItems: 'center', }}>
|
|
188
|
+
<TouchableOpacity onPress={() => {
|
|
189
|
+
LibUtils.copyToClipboard(item.access_code)
|
|
190
|
+
LibToastProperty.show(esp.lang("event/visitor_input", "success_copy", item.access_code))
|
|
191
|
+
}} style={{ flex: 1, flexDirection: 'row', alignContent: 'center', alignItems: 'center' }}>
|
|
192
|
+
<Text allowFontScaling={false} style={applyStyle({ fontFamily: "Arial", fontSize: 13, fontWeight: "bold", fontStyle: "normal", lineHeight: 22, letterSpacing: 0, color: item.is_used == 1 ? "#c4c4c4" : "#2980b9" })}>{item.access_code}</Text>
|
|
193
|
+
<LibIcon.Ionicons name='copy' size={16} style={applyStyle({ color: item.is_used == 1 ? "#c4c4c4" : "#2980b9", marginLeft: 7 })} />
|
|
194
|
+
</TouchableOpacity>
|
|
195
|
+
<View style={{ flex: 1, justifyContent: 'flex-end', flexDirection: 'row', alignContent: 'center', alignItems: 'center' }}>
|
|
196
|
+
<Text allowFontScaling={false} style={{ fontFamily: "Arial", fontSize: 13, fontWeight: "normal", fontStyle: "normal", lineHeight: 22, letterSpacing: 0, color: "#9b9b9b", }}>{"Belum digunakan"}</Text>
|
|
197
|
+
<TouchableOpacity onPress={() => {
|
|
198
|
+
dialogClaim?.current?.show()
|
|
199
|
+
setSelectedCode(item)
|
|
200
|
+
}}>
|
|
201
|
+
<LibIcon name='pencil-circle' size={20} color={LibStyle.colorRed} style={{ marginLeft: 5 }} />
|
|
202
|
+
</TouchableOpacity>
|
|
203
|
+
</View>
|
|
204
|
+
</View>
|
|
205
|
+
<View style={{ padding: 10, borderWidth: 1, borderColor: LibStyle.colorBgGrey, borderRadius: 5, marginTop: 5 }}>
|
|
206
|
+
|
|
207
|
+
</View>
|
|
208
|
+
</View>
|
|
209
|
+
)
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
if (Number(getData()?.qty_generated) != Number(getData()?.qty)) {
|
|
214
|
+
return (
|
|
215
|
+
<View style={{ flex: 1, backgroundColor: '#fff' }}>
|
|
216
|
+
<EventHeader title={esp.lang("event/visitor_input", "title_input_exhibitors")} />
|
|
217
|
+
<View style={{ backgroundColor: '#fff', alignItems: 'center', justifyContent: 'center' }}>
|
|
218
|
+
<View style={{ justifyContent: 'center', alignItems: 'center', padding: 10 }}>
|
|
219
|
+
<LibPicture source={esp.assets('img_failed_msg.png')} resizeMode="contain" style={{ width: LibStyle.width * 0.8, height: 200, resizeMode: 'contain' }} />
|
|
220
|
+
<ActivityIndicator size={'large'} color={LibStyle.colorPrimary} style={{ alignItems: 'center', justifyContent: 'center' }} />
|
|
221
|
+
<View style={{ width: LibStyle.width - 40, justifyContent: 'center', alignItems: 'center', backgroundColor: 'white', padding: 15, borderRadius: 10, marginTop: 20 }}>
|
|
222
|
+
<Text allowFontScaling={false} style={{ fontFamily: 'Arial', fontSize: 16, fontWeight: "bold", marginBottom: 5, color: "#4a4a4a", textAlign: "center" }}>{_msg}</Text>
|
|
223
|
+
</View>
|
|
224
|
+
<Text allowFontScaling={false} style={{ textAlign: 'center', fontFamily: "Arial", fontSize: 14, margin: 15, marginBottom: 0 }} >{messageGenerate}</Text>
|
|
225
|
+
</View>
|
|
226
|
+
</View>
|
|
227
|
+
</View>
|
|
228
|
+
)
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
let menuHeader = [
|
|
232
|
+
{
|
|
233
|
+
id: 1,
|
|
234
|
+
title: activeTab?.name,
|
|
235
|
+
color: '#d3f1ec',
|
|
236
|
+
textColor: '#4fbaa8',
|
|
237
|
+
total: LibUtils.number(activeTab?.qty)
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
id: 2,
|
|
241
|
+
title: "Total Token",
|
|
242
|
+
color: '#d7edf8',
|
|
243
|
+
textColor: '#64b0e0',
|
|
244
|
+
total: 4275
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
id: 3,
|
|
248
|
+
title: "Token dialokasikan",
|
|
249
|
+
color: '#fbe3dd',
|
|
250
|
+
textColor: '#ec7463',
|
|
251
|
+
total: 4170
|
|
252
|
+
},
|
|
253
|
+
{
|
|
254
|
+
id: 4,
|
|
255
|
+
title: "Token tersisa",
|
|
256
|
+
color: '#fef2de',
|
|
257
|
+
textColor: '#f6c67f',
|
|
258
|
+
total: 105
|
|
259
|
+
},
|
|
260
|
+
]
|
|
261
|
+
|
|
262
|
+
return (
|
|
263
|
+
<View style={{ flex: 1 }}>
|
|
264
|
+
<EventHeader title={esp.lang("event/visitor_input", "title_input_exhibitor")} subtitle={esp.lang("event/visitor_input", "total_staff", LibUtils.number(data.qty))} />
|
|
265
|
+
<LibKeyboard_avoid style={{ flex: 1 }}>
|
|
266
|
+
<>
|
|
267
|
+
{/* <ComponentTabheader titles={tabTitles} activeIndex={tabIndex} onPress={(index) => setTabIndex(index)} /> */}
|
|
268
|
+
|
|
269
|
+
<View style={{ height: 35, marginBottom: 2, flexDirection: 'row', backgroundColor: '#fff', ...LibStyle.elevation(2) }} >
|
|
270
|
+
<ScrollView horizontal showsHorizontalScrollIndicator={false} >
|
|
271
|
+
{
|
|
272
|
+
_tabs.map(renderTabs)
|
|
273
|
+
}
|
|
274
|
+
</ScrollView>
|
|
275
|
+
</View>
|
|
276
|
+
<LibInfinite
|
|
277
|
+
url={activeTab?.url}
|
|
278
|
+
// isDebug={1}
|
|
279
|
+
key={activeTab + counter}
|
|
280
|
+
// style={{ flex: 1 }}
|
|
281
|
+
ListHeaderComponent={
|
|
282
|
+
<>
|
|
283
|
+
{
|
|
284
|
+
activeTab?.ondate != "0000-00-00" &&
|
|
285
|
+
<View style={{ margin: 10, marginBottom: 0 }}>
|
|
286
|
+
<Text allowFontScaling={false} style={{ fontWeight: 'bold', color: LibStyle.colorGreen }}>{"Tanggal berlaku " + LibUtils.moment(activeTab?.ondate).format("DD MMMM YYYY")}</Text>
|
|
287
|
+
</View>
|
|
288
|
+
}
|
|
289
|
+
{
|
|
290
|
+
activeTab?.type == "STAFF" &&
|
|
291
|
+
<View style={{ padding: 10, paddingBottom: 0, flexDirection: 'row', justifyContent: 'space-between', flexWrap: 'wrap' }}>
|
|
292
|
+
{
|
|
293
|
+
menuHeader?.map((item, i) => {
|
|
294
|
+
return (
|
|
295
|
+
<View key={i} style={{ width: (LibStyle.width - 30) / 2, alignContent: 'center', alignItems: 'center', marginBottom: 10, overflow: 'hidden', backgroundColor: item.color, borderRadius: 5, padding: 5, flexDirection: 'row', justifyContent: 'space-between' }}>
|
|
296
|
+
<View style={{ flex: 2, }}>
|
|
297
|
+
<Text allowFontScaling={false} style={{ fontFamily: "Arial", fontSize: 13, fontWeight: "bold", fontStyle: "normal", letterSpacing: 0, color: "#4b4b4b" }}>{item.title}</Text>
|
|
298
|
+
</View>
|
|
299
|
+
<View style={{ marginLeft: 5, flex: 1 }}>
|
|
300
|
+
<View style={{ alignContent: 'center', alignItems: 'center', backgroundColor: item.textColor, paddingHorizontal: 7, paddingVertical: 3, borderRadius: 5 }}>
|
|
301
|
+
<Text allowFontScaling={false} style={{ fontFamily: "Arial", fontSize: 13, fontWeight: "bold", fontStyle: "normal", letterSpacing: 0, color: "#fff" }}>{item.total}</Text>
|
|
302
|
+
</View>
|
|
303
|
+
</View>
|
|
304
|
+
</View>
|
|
305
|
+
)
|
|
306
|
+
})
|
|
307
|
+
}
|
|
308
|
+
</View>
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
</>
|
|
312
|
+
}
|
|
313
|
+
removeClippedSubviews={Platform.OS == 'android'}
|
|
314
|
+
renderItem={renderItem}
|
|
315
|
+
/>
|
|
316
|
+
{
|
|
317
|
+
activeTab?.type == "STAFF" &&
|
|
318
|
+
<EventButton style={{ backgroundColor: '#00b894', margin: 5 }} label={esp.lang("event/visitor_input", "save_btn")} onPress={() => { send() }} />
|
|
319
|
+
}
|
|
320
|
+
</>
|
|
321
|
+
</LibKeyboard_avoid>
|
|
322
|
+
<LibSlidingup ref={dialogListClaim}>
|
|
323
|
+
<View style={{ backgroundColor: 'white', padding: 15, height: LibStyle.height * 0.7, borderTopLeftRadius: 5, borderTopRightRadius: 5 }} >
|
|
324
|
+
<View style={{ flexDirection: 'row', justifyContent: 'space-between', alignContent: 'center', alignItems: 'center' }}>
|
|
325
|
+
<LibTextstyle text={esp.lang("event/visitor_input", "list_claimed")} textStyle="headline" />
|
|
326
|
+
<Text allowFontScaling={false} style={{ fontFamily: "Arial", fontSize: 16, fontWeight: "bold", fontStyle: "normal", lineHeight: 22, letterSpacing: 0, color: "#51b596" }}>{LibUtils.number(listClaim?.qty_used) + "/" + LibUtils.number(listClaim?.qty)}</Text>
|
|
327
|
+
</View>
|
|
328
|
+
<LibInfinite
|
|
329
|
+
url={listClaim?.url}
|
|
330
|
+
// isDebug={1}
|
|
331
|
+
// key={}
|
|
332
|
+
removeClippedSubviews={Platform.OS == 'android'}
|
|
333
|
+
renderItem={(item: any, i: number) => {
|
|
334
|
+
return (
|
|
335
|
+
<View key={i} style={{ padding: 10, borderBottomWidth: 1.5, borderBottomColor: LibStyle.colorBgGrey, flexDirection: 'row' }}>
|
|
336
|
+
<Text allowFontScaling={false} style={{ fontSize: 16 }}>{(i + 1) + ". "}</Text>
|
|
337
|
+
<View>
|
|
338
|
+
<Text allowFontScaling={false} numberOfLines={2} ellipsizeMode='tail' style={{ fontSize: 16 }}>{item.name}</Text>
|
|
339
|
+
<Text allowFontScaling={false} numberOfLines={2} ellipsizeMode='tail'>{item.email}</Text>
|
|
340
|
+
</View>
|
|
341
|
+
</View>
|
|
342
|
+
)
|
|
343
|
+
}}
|
|
344
|
+
/>
|
|
345
|
+
</View>
|
|
346
|
+
</LibSlidingup>
|
|
347
|
+
|
|
348
|
+
<LibSlidingup ref={dialogClaim}>
|
|
349
|
+
<View style={{ backgroundColor: 'white', padding: 15, maxHeight: LibStyle.height * 0.7, borderTopLeftRadius: 5, borderTopRightRadius: 5 }} >
|
|
350
|
+
<View style={{ flexDirection: 'row', justifyContent: 'space-between', alignContent: 'center', alignItems: 'center' }}>
|
|
351
|
+
<LibTextstyle text={"Kode"} textStyle="headline" />
|
|
352
|
+
<Text allowFontScaling={false} style={{ fontFamily: "Arial", fontSize: 16, fontWeight: "bold", fontStyle: "normal", lineHeight: 22, letterSpacing: 0, color: "#00b894" }}>{selectedCode?.access_code}</Text>
|
|
353
|
+
</View>
|
|
354
|
+
|
|
355
|
+
<EventLabel_input label={"Masukkan nama"} />
|
|
356
|
+
<EventInput_rectangle
|
|
357
|
+
returnKeyType="next"
|
|
358
|
+
style={applyStyle({ borderRadius: 4, borderColor: '#c4c4c4', height: 35, marginTop: 8, backgroundColor: '#fff' })}
|
|
359
|
+
onChangeText={(t) => {
|
|
360
|
+
|
|
361
|
+
}}
|
|
362
|
+
placeholder={"Masukkan nama"}
|
|
363
|
+
/>
|
|
364
|
+
|
|
365
|
+
<View style={{ flexDirection: 'row', justifyContent: 'flex-end', alignContent: 'center', alignItems: 'center' }}>
|
|
366
|
+
<View style={{ flex: 2 }}>
|
|
367
|
+
<EventLabel_input label={"Masukkan token"} />
|
|
368
|
+
<EventInput_rectangle
|
|
369
|
+
returnKeyType="next"
|
|
370
|
+
style={applyStyle({ borderRadius: 4, borderColor: '#c4c4c4', height: 35, marginTop: 8, backgroundColor: '#fff' })}
|
|
371
|
+
onChangeText={(t) => {
|
|
372
|
+
|
|
373
|
+
}}
|
|
374
|
+
placeholder={"Masukkan token"}
|
|
375
|
+
/>
|
|
376
|
+
</View>
|
|
377
|
+
<View style={{ flex: 1, justifyContent: 'flex-end', marginLeft: 10, marginTop: 5 }}>
|
|
378
|
+
<Text allowFontScaling={false} style={{ fontFamily: "Arial", fontSize: 12, fontWeight: "bold", fontStyle: "normal", letterSpacing: 0, color: "#4b4b4b" }}>{"Token terpakai"}</Text>
|
|
379
|
+
<View style={{ marginTop: 12, alignContent: 'center', alignItems: 'center', backgroundColor: "#ec7463", paddingHorizontal: 7, paddingVertical: 3, borderRadius: 5 }}>
|
|
380
|
+
<Text allowFontScaling={false} style={{ fontFamily: "Arial", fontSize: 12, fontWeight: "bold", fontStyle: "normal", letterSpacing: 0, color: "#fff" }}>{10}</Text>
|
|
381
|
+
</View>
|
|
382
|
+
</View>
|
|
383
|
+
<View style={{ flex: 1, justifyContent: 'flex-end', marginLeft: 10, marginTop: 5 }}>
|
|
384
|
+
<Text allowFontScaling={false} style={{ fontFamily: "Arial", fontSize: 12, fontWeight: "bold", fontStyle: "normal", letterSpacing: 0, color: "#4b4b4b" }}>{"Token tersisa"}</Text>
|
|
385
|
+
<View style={{ marginTop: 12, alignContent: 'center', alignItems: 'center', backgroundColor: "#f6c67f", paddingHorizontal: 7, paddingVertical: 3, borderRadius: 5 }}>
|
|
386
|
+
<Text allowFontScaling={false} style={{ fontFamily: "Arial", fontSize: 12, fontWeight: "bold", fontStyle: "normal", letterSpacing: 0, color: "#fff" }}>{120}</Text>
|
|
387
|
+
</View>
|
|
388
|
+
</View>
|
|
389
|
+
</View>
|
|
390
|
+
|
|
391
|
+
<EventButton style={{ backgroundColor: '#00b894', marginTop: 15 }} label={esp.lang("event/visitor_input", "save_btn")} onPress={() => { }} />
|
|
392
|
+
|
|
393
|
+
</View>
|
|
394
|
+
</LibSlidingup>
|
|
395
|
+
</View>
|
|
396
|
+
)
|
|
397
|
+
}
|
package/event/voucher.tsx
CHANGED
|
@@ -6,6 +6,7 @@ import { LibNavigation } from 'esoftplay/cache/lib/navigation/import';
|
|
|
6
6
|
import { LibProgress } from 'esoftplay/cache/lib/progress/import';
|
|
7
7
|
import { LibStyle } from 'esoftplay/cache/lib/style/import';
|
|
8
8
|
|
|
9
|
+
import { EventConfigProperty } from 'esoftplay/cache/event/config/import';
|
|
9
10
|
import { EventLabel_input } from 'esoftplay/cache/event/label_input/import';
|
|
10
11
|
import { LibDialog } from 'esoftplay/cache/lib/dialog/import';
|
|
11
12
|
import esp from 'esoftplay/esp';
|
|
@@ -33,6 +34,7 @@ export default function m(props: EventVoucherProps): any {
|
|
|
33
34
|
let voucherCode = React.useRef<LibInput>(null)
|
|
34
35
|
|
|
35
36
|
useEffect(() => {
|
|
37
|
+
esp.isDebug("payment_voucher") && EventConfigProperty.curlConfig('payment_config')
|
|
36
38
|
return () => LibNavigation.cancelBackResult(LibNavigation.getResultKey(props))
|
|
37
39
|
}, [])
|
|
38
40
|
|
package/event/voucher2.tsx
CHANGED
|
@@ -77,6 +77,8 @@ export default function m(props: EventVoucher2Props): any {
|
|
|
77
77
|
let x = new LibObject(getData()).update((it: any) => {
|
|
78
78
|
it.discount_id = res?.id
|
|
79
79
|
it.discount_generated_id = res?.generated_id
|
|
80
|
+
it.discount_amount = res?.amount
|
|
81
|
+
it.discount_type = res?.amount_type
|
|
80
82
|
return it
|
|
81
83
|
})(item.index).update((it2: any) => {
|
|
82
84
|
return ({
|
package/id.json
CHANGED
|
@@ -1401,9 +1401,11 @@
|
|
|
1401
1401
|
"wait": "Mohon tunggu"
|
|
1402
1402
|
},
|
|
1403
1403
|
"event/tms_check_code": {
|
|
1404
|
+
"already_use": "Sudah digunakan",
|
|
1404
1405
|
"code": "Check Code",
|
|
1405
1406
|
"error": "Kesalahan",
|
|
1406
1407
|
"input_code": "Kode %s",
|
|
1408
|
+
"not_used": "Belum digunakan",
|
|
1407
1409
|
"ticket": "Check Ticket",
|
|
1408
1410
|
"title": "Check Ticket"
|
|
1409
1411
|
},
|