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 CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "fonts": {
3
+ "mono": "mono.ttf",
3
4
  "Arial": "Arial.ttf",
4
5
  "ArialBold": "ArialBold.ttf",
5
6
  "SFProText": "SFProText.ttf",
6
- "mono": "mono.ttf",
7
7
  "MonoSpace": "MonoSpace.ttf",
8
8
  "DecoNumbers": "DecoNumbers.ttf",
9
9
  "digital": "digital.ttf"
package/event/artist.tsx CHANGED
@@ -66,7 +66,7 @@ export default function m(props: BigbangArtistProps): any {
66
66
  }
67
67
 
68
68
  useEffect(() => {
69
- if (esp.isDebug("") && UserClass.state().get().email == "bagus@fisip.net") {
69
+ if (esp.isDebug("") && UserClass?.state()?.get()?.email == "bagus@fisip.net") {
70
70
  LibNavigation.replace('event/artistv2')
71
71
  } else {
72
72
  loadData?.()
@@ -82,7 +82,7 @@ export default function m(props: EventArtist_detailv2Props): any {
82
82
  function loadDataPriceConfig(url: string) {
83
83
  let post = {
84
84
  price_ids: selectedTicket?.price_id,
85
- event_id: 411
85
+ event_id: 443
86
86
  }
87
87
  LibProgress.show("Mohon tunggu")
88
88
  new LibCurl(url, post, (res, msg) => {
@@ -1,6 +1,6 @@
1
1
  // withHooks
2
2
 
3
- import { EventFirebase_socket, EventFirebase_socketProperty } from 'esoftplay/cache/event/firebase_socket/import';
3
+ import { EventFirebase_socket } from 'esoftplay/cache/event/firebase_socket/import';
4
4
  import { EventHeader } from 'esoftplay/cache/event/header/import';
5
5
  import { EventIndexProperty } from 'esoftplay/cache/event/index/import';
6
6
  import { EventMessage } from 'esoftplay/cache/event/message/import';
@@ -39,17 +39,17 @@ export default function m(props: EventArtistv2Props): any {
39
39
  /* get detail event untuk dapat config antrian */
40
40
 
41
41
  // new LibCurl(url, null,
42
- new LibCurl('v2/event_artist&event_id=411', null,
42
+ new LibCurl('v2/event_artist&event_id=443', null,
43
43
  (res) => {
44
44
  esp.log({ res });
45
- EventFirebase_socketProperty.eventIdQueue.set(res?.[0]?.event_id)
46
- if (res.allotment) {
47
- esp.modProp("event/firebase_socket").userIdKeyReplacer.set({
48
- t: Number(res.allotment.t),
49
- s: Number(res.allotment.s),
50
- priority: 1
51
- })
52
- }
45
+ // EventFirebase_socketProperty.eventIdQueue.set(res?.[0]?.event_id)
46
+ // if (res.allotment) {
47
+ // esp.modProp("event/firebase_socket").userIdKeyReplacer.set({
48
+ // t: Number(res.allotment.t),
49
+ // s: Number(res.allotment.s),
50
+ // priority: 1
51
+ // })
52
+ // }
53
53
 
54
54
  setResult(res)
55
55
  }, (err) => {
@@ -80,12 +80,12 @@ export default function m(props: EventArtistv2Props): any {
80
80
  LibToastProperty.show(esp.lang("event/artist", "ticket_not_available"));
81
81
  } else {
82
82
  EventIndexProperty.isLogin(async () => {
83
- if (isInPricingQueueConfig(item.event_id)) {
84
- LibNavigation.navigateForResult('event/queue_pricing', {
85
- event_id: item?.event_id,
86
- autoPass: false,
87
- });
88
- }
83
+ // if (isInPricingQueueConfig(item.event_id)) {
84
+ // LibNavigation.navigateForResult('event/queue_pricing', {
85
+ // event_id: item?.event_id,
86
+ // autoPass: false,
87
+ // });
88
+ // }
89
89
  // EventCountdownProperty.countdownTime.set(moment().add(EventFirebase_socketProperty.eventQueueConfig.get(item?.event_id).time, 'seconds').localeFormat('YYYY-MM-DD HH:mm:ss'));
90
90
  LibNavigation.navigate(
91
91
  item?.config?.multiprice == 1
@@ -7,7 +7,7 @@ import { TextInput, View } from 'react-native';
7
7
 
8
8
 
9
9
  export interface EventCountdown_baseArgs {
10
-
10
+
11
11
  }
12
12
  export interface EventCountdown_baseProps {
13
13
  expired: string,
@@ -24,7 +24,7 @@ const fixSingleNumber = (number: number) => number < 10 ? '0' + number : number
24
24
  export default function m(props: EventCountdown_baseProps): any {
25
25
  const ref = useRef<TextInput>(null)
26
26
  let timmer = useRef<any>(undefined).current
27
-
27
+
28
28
  useEffect(() => {
29
29
  countDown()
30
30
  return () => {
@@ -77,7 +77,7 @@ export default function m(props: EventCountdown_baseProps): any {
77
77
 
78
78
  return (
79
79
  <View style={props.containerStyle} >
80
- <TextInput ref={ref} editable={false} style={props.style} />
80
+ <TextInput ref={ref} editable={false} allowFontScaling={false} style={props.style} />
81
81
  </View>
82
82
  )
83
83
  }
package/event/detail.tsx CHANGED
@@ -11,6 +11,7 @@ import { LibVideoProperty } from 'esoftplay/cache/lib/video/import';
11
11
  import { LibWebview } from 'esoftplay/cache/lib/webview/import';
12
12
 
13
13
  import { applyStyle } from 'esoftplay';
14
+ import { EventCountdown_base } from 'esoftplay/cache/event/countdown_base/import';
14
15
  import { EventFirebase_socket, EventFirebase_socketProperty } from 'esoftplay/cache/event/firebase_socket/import';
15
16
  import { EventHeader } from 'esoftplay/cache/event/header/import';
16
17
  import { EventIndexProperty } from 'esoftplay/cache/event/index/import';
@@ -60,7 +61,12 @@ export default function m(props: EventDetailProps): any {
60
61
  }
61
62
 
62
63
  useEffect(() => {
63
- loadData()
64
+ if (esp.isDebug("") && user?.email == "bagus@fisip.net") {
65
+ LibNavigation.replace('event/detail2', { url: url })
66
+ } else {
67
+ loadData()
68
+ }
69
+ // loadData()
64
70
  }, [])
65
71
 
66
72
  if (!result) {
@@ -105,7 +111,6 @@ export default function m(props: EventDetailProps): any {
105
111
  priceRange = LibUtils.money(result.price_min, curr)
106
112
  }
107
113
 
108
-
109
114
  function renderTag(x: any, i: number) {
110
115
  return (
111
116
  <Pressable key={i} onPress={() => { LibNavigation.navigate('event/list', { url: x?.url, keywords: x?.title }) }} style={styleId_qGD26}>
@@ -133,6 +138,17 @@ export default function m(props: EventDetailProps): any {
133
138
  <LibPicture source={esp.assets('icons/ic_calendar_grey.png')} style={{ width: 14, height: 14 }} />
134
139
  <Text allowFontScaling={false} style={{ marginLeft: 10, fontFamily: "Arial", fontSize: 12, fontWeight: "bold", fontStyle: "normal", letterSpacing: 0, color: "#f39c12" }} >{result.status == 4 ? esp.lang("event/detail", "evn_pending") : LibUtils.getDateRange(result.start_date, result.end_date, esp.lang("event/detail", "until"))}</Text>
135
140
  </View>
141
+ {
142
+ esp.isDebug("countdown") && result?.countdown_booking == 1 && result?.start_date != "0000-00-00" && result.end_date != '0000-00-00' &&
143
+ <View style={{ flexDirection: 'row', marginBottom: 10, alignItems: 'center', marginHorizontal: 20 }} >
144
+ <LibPicture source={esp.assets('icons/ic_calendar_grey.png')} style={{ width: 14, height: 14 }} />
145
+ <Text allowFontScaling={false} style={{ marginLeft: 10, fontFamily: "Arial", fontSize: 12, fontWeight: "bold", fontStyle: "normal", letterSpacing: 0, color: "#4a4a4a" }}>{"Berakhir dalam"} </Text>
146
+ <EventCountdown_base
147
+ expired={(result?.end_date + " " + result?.end_time)}
148
+ style={{ fontFamily: "Arial", fontSize: 12, fontWeight: "bold", fontStyle: "normal", letterSpacing: 0, color: "#4a4a4a" }}
149
+ />
150
+ </View>
151
+ }
136
152
  <View style={{ flexDirection: 'row', marginBottom: 10, alignItems: 'center', marginHorizontal: 20 }} >
137
153
  <LibPicture source={esp.assets('icons/ic_tickets_grey.png')} style={{ width: 14, height: 14 }} />
138
154
  <Text allowFontScaling={false} style={{ marginLeft: 10, fontFamily: "Arial", fontSize: 12, fontWeight: "normal", fontStyle: "normal", letterSpacing: 0, color: "#2980b9" }} >{result?.price_type == 0 ? esp.lang("event/detail", "tb_announce") : isFree ? esp.lang("event/detail", "text_free") : priceRange}</Text>
@@ -0,0 +1,354 @@
1
+ // withHooks
2
+ import { applyStyle } from 'esoftplay';
3
+ import { EventFirebase_socket } from 'esoftplay/cache/event/firebase_socket/import';
4
+ import { EventHeader } from 'esoftplay/cache/event/header/import';
5
+ import { EventIndexProperty } from 'esoftplay/cache/event/index/import';
6
+ import { EventSlider } from 'esoftplay/cache/event/slider/import';
7
+ import { LibCurl } from 'esoftplay/cache/lib/curl/import';
8
+ import { LibDialog } from 'esoftplay/cache/lib/dialog/import';
9
+ import { LibNavigation } from 'esoftplay/cache/lib/navigation/import';
10
+ import { LibPicture } from 'esoftplay/cache/lib/picture/import';
11
+ import { LibProgress } from 'esoftplay/cache/lib/progress/import';
12
+ import { LibScroll } from 'esoftplay/cache/lib/scroll/import';
13
+ import { LibSkeleton } from 'esoftplay/cache/lib/skeleton/import';
14
+ import { LibStyle } from 'esoftplay/cache/lib/style/import';
15
+ import { LibUtils } from 'esoftplay/cache/lib/utils/import';
16
+ import { LibVideoProperty } from 'esoftplay/cache/lib/video/import';
17
+ import { LibWebview } from 'esoftplay/cache/lib/webview/import';
18
+ import { UseCondition } from 'esoftplay/cache/use/condition/import';
19
+ import { UseDeeplinkProperty } from 'esoftplay/cache/use/deeplink/import';
20
+ import { UserClass } from 'esoftplay/cache/user/class/import';
21
+ import esp from 'esoftplay/esp';
22
+ import useSafeState from 'esoftplay/state';
23
+ import { useEffect } from 'react';
24
+
25
+ import React from 'react';
26
+ import { Linking, Pressable, Text, TouchableOpacity, View } from 'react-native';
27
+ import MapView, { Marker } from 'react-native-maps';
28
+
29
+
30
+ export interface EventDetail2Args {
31
+
32
+ }
33
+ export interface EventDetail2Props {
34
+
35
+ }
36
+ export default function m(props: EventDetail2Props): any {
37
+ const { url } = LibNavigation.getArgsAll(props)
38
+
39
+
40
+ const { isInPricingQueueConfig } = EventFirebase_socket()
41
+ const [deeplinkParams] = UseDeeplinkProperty.params.useState()
42
+ const [result, setResult] = useSafeState()
43
+ const [priority, setPriority] = useSafeState(false)
44
+ const user = UserClass.state().get()
45
+
46
+ useEffect(() => {
47
+ loadData()
48
+ }, [])
49
+
50
+ function loadData() {
51
+ new LibCurl("v2/event_detail?event_id=443", null, (res, msg) => {
52
+ res.images = res?.images.map((url: string) => ({ image: url }));
53
+ setResult(res)
54
+ esp.log(res);
55
+ }, (error) => {
56
+ LibDialog.warning(esp.lang("event/detail", "load_failed"), error?.message)
57
+ LibNavigation.back()
58
+ })
59
+ }
60
+
61
+ function loadDataConfig(url: string) {
62
+ LibProgress.show("Mohon tunggu")
63
+ new LibCurl(url, null, (res, msg) => {
64
+ esp.log(res);
65
+ LibProgress.hide()
66
+ // return
67
+ LibNavigation.navigate(
68
+ user?.config?.tester == 1 ?
69
+ 'event/ticket_list2'
70
+ :
71
+ (res?.multiprice == 1 ? 'event/ticket_list2' : 'event/ticket_list'),
72
+ {
73
+ url: res.url_price,
74
+ is_multiprice: res?.multiprice == 1 ? 1 : 0,
75
+ })
76
+
77
+ }, (error) => {
78
+ LibProgress.hide()
79
+ LibDialog.warning(esp.lang("event/detail", "load_failed"), error?.message)
80
+ })
81
+ }
82
+
83
+ if (!result) {
84
+ let itemWidth = LibStyle.width - 60
85
+ return (
86
+ <View style={{ flex: 1 }}>
87
+ <EventHeader title={esp.lang("event/detail", "header_empty")} />
88
+ <LibSkeleton>
89
+ <View style={{ margin: 15, height: 9 / 16 * itemWidth, width: itemWidth, borderRadius: 10, backgroundColor: '#fff', alignSelf: 'center' }} />
90
+ <View style={{ marginLeft: 15, backgroundColor: 'white', width: '70%', height: 20, borderRadius: 10 }} />
91
+
92
+ <View style={{ marginTop: 20, marginLeft: 15, flexDirection: 'row', borderRadius: 10, alignContent: 'center', alignItems: 'center' }}>
93
+ <View style={{ width: 28, height: 28, borderRadius: 5, backgroundColor: 'white' }} />
94
+ <View style={{ width: '40%', backgroundColor: 'white', height: 15, borderRadius: 10, marginLeft: 5 }} />
95
+ </View>
96
+
97
+ <View style={{ marginTop: 10, marginLeft: 15, flexDirection: 'row', borderRadius: 10, alignContent: 'center', alignItems: 'center' }}>
98
+ <View style={{ width: 28, height: 28, borderRadius: 5, backgroundColor: 'white' }} />
99
+ <View style={{ width: '30%', backgroundColor: 'white', height: 15, borderRadius: 10, marginLeft: 5 }} />
100
+ </View>
101
+
102
+ <View style={{ margin: 15, borderRadius: 10, height: '20%', width: '90%', backgroundColor: '#fff' }} />
103
+ <View style={{ marginTop: 0, margin: 15, borderRadius: 10, height: '30%', width: '80%', backgroundColor: '#fff' }} />
104
+ <View style={{ marginTop: 0, margin: 15, borderRadius: 10, height: '10%', width: '90%', backgroundColor: '#fff' }} />
105
+ </LibSkeleton>
106
+ </View>
107
+ )
108
+ }
109
+
110
+ const hasLatlong = result?.location_latlong != '' && result?.location_latlong?.includes(',')
111
+ let lat = 0
112
+ let lng = 0
113
+ if (hasLatlong) {
114
+ lat = parseFloat(result.location_latlong?.split(',')[0])
115
+ lng = parseFloat(result.location_latlong?.split(',')[1])
116
+ }
117
+
118
+ const curr = result?.hasOwnProperty('currency') ? result?.currency : ''
119
+ const isFree = (result.price_min == result.price_max) && result.price_min == 0
120
+ let priceRange = esp.lang("event/detail", "start_from", LibUtils.money(result.price_min, curr)) /* + " s/d " + LibUtils.money(result.price_max, curr) */
121
+ if (result.price_min == result.price_max) {
122
+ priceRange = LibUtils.money(result.price_min, curr)
123
+ }
124
+
125
+
126
+ function renderTag(x: any, i: number) {
127
+ const styleId_qGD26: any = { marginTop: 5, padding: 7, paddingHorizontal: 10, marginRight: 5, borderRadius: 3, backgroundColor: LibStyle.colorGrey }
128
+ const styleId_Z2qkux5: any = { fontFamily: 'Arial', fontSize: 10, letterSpacing: 2, color: '#2980b9' }
129
+ return (
130
+ <Pressable key={i} onPress={() => { LibNavigation.navigate('event/list', { url: x?.url, keywords: x?.title }) }} style={styleId_qGD26}>
131
+ <Text allowFontScaling={false} numberOfLines={1} style={styleId_Z2qkux5}>#{String(x?.title).toLowerCase()}</Text>
132
+ </Pressable>
133
+ )
134
+ }
135
+
136
+ const date = LibUtils.moment().localeFormat('YYYY-MM-DD HH:mm:ss')
137
+
138
+ return (
139
+ <View style={{ flex: 1, backgroundColor: '#fff' }} >
140
+ <EventHeader
141
+ title={result.title}
142
+ iconShare={result?.url_share && result?.url_share !== ""}
143
+ onPressShare={() => {
144
+ LibUtils.share(result?.url_share)
145
+ }}
146
+ />
147
+
148
+ <LibScroll onRefresh={loadData}>
149
+ <EventSlider images={result.images} onIndexChange={(i) => { }} />
150
+ <Text allowFontScaling={false} style={{ marginTop: -10, fontFamily: "Arial", fontSize: 18, fontWeight: "bold", fontStyle: "normal", lineHeight: 22, letterSpacing: 0, color: "#4a4a4a", margin: 20 }} >{result.title}</Text>
151
+ <View style={{ flexDirection: 'row', marginBottom: 10, alignItems: 'center', marginHorizontal: 20 }} >
152
+ <LibPicture source={esp.assets('icons/ic_calendar_grey.png')} style={{ width: 14, height: 14 }} />
153
+ <Text allowFontScaling={false} style={{ marginLeft: 10, fontFamily: "Arial", fontSize: 12, fontWeight: "bold", fontStyle: "normal", letterSpacing: 0, color: "#f39c12" }} >{result.status == 4 ? esp.lang("event/detail", "evn_pending") : LibUtils.getDateRange(result.start_date, result.end_date, esp.lang("event/detail", "until"))}</Text>
154
+ </View>
155
+ <View style={{ flexDirection: 'row', marginBottom: 10, alignItems: 'center', marginHorizontal: 20 }} >
156
+ <LibPicture source={esp.assets('icons/ic_tickets_grey.png')} style={{ width: 14, height: 14 }} />
157
+ <Text allowFontScaling={false} style={{ marginLeft: 10, fontFamily: "Arial", fontSize: 12, fontWeight: "normal", fontStyle: "normal", letterSpacing: 0, color: "#2980b9" }} >{result?.price_type == 0 ? esp.lang("event/detail", "tb_announce") : isFree ? esp.lang("event/detail", "text_free") : priceRange}</Text>
158
+ </View>
159
+
160
+ {
161
+ result?.event_tag?.length > 0 &&
162
+ <View style={{ flexDirection: 'row', alignItems: 'center', flexWrap: 'wrap', marginLeft: 17, marginTop: 5 }}>
163
+ {
164
+ result?.event_tag?.map?.(renderTag)
165
+ }
166
+ </View>
167
+ }
168
+
169
+ <View style={{ marginHorizontal: 20, flexDirection: 'row', justifyContent: 'space-between', alignItems: 'center', alignContent: 'center' }}>
170
+ <Text allowFontScaling={false} style={{ marginTop: 10, fontFamily: "Arial", fontSize: 13, fontWeight: "bold", fontStyle: "normal", lineHeight: 22, letterSpacing: 0, color: "#4a4a4a" }} >{esp.lang("event/detail", "text_about_event")}</Text>
171
+ {
172
+ result && result.files !== '' &&
173
+ <TouchableOpacity onPress={() => {
174
+ Linking.canOpenURL(result.files).then((t) => {
175
+ Linking.openURL(result.files)
176
+ })
177
+ }} >
178
+ <Text allowFontScaling={false} style={{ fontFamily: "Arial", fontSize: 10, fontWeight: "bold", fontStyle: "normal", lineHeight: 22, letterSpacing: 0, color: LibStyle.colorRed }} >{esp.lang("event/detail", "text_show_brochure")}</Text>
179
+ </TouchableOpacity>
180
+ }
181
+ </View>
182
+ <LibWebview source={{ html: result.description }} onFinishLoad={() => { }} />
183
+ {
184
+ result && result.youtube !== "" &&
185
+ <>
186
+ <Text allowFontScaling={false} style={{ marginHorizontal: 20, marginTop: 10, fontFamily: "Arial", fontSize: 13, fontWeight: "bold", fontStyle: "normal", lineHeight: 22, letterSpacing: 0, color: "#4a4a4a" }} >{esp.lang("event/detail", "text_video")}</Text>
187
+ <Pressable onPress={() => LibNavigation.navigate('lib/video', { code: result.youtube })} >
188
+ <LibPicture source={{ uri: LibVideoProperty.getUrlThumbnail(result.youtube) }} style={{ height: LibStyle.width * 9 / 16, width: LibStyle.width - 40, marginHorizontal: 20, resizeMode: 'cover' }} />
189
+ </Pressable>
190
+ </>
191
+ }
192
+ {
193
+ result.address != undefined && result.address != "" &&
194
+ <>
195
+ <Text allowFontScaling={false} style={{ marginHorizontal: 20, marginTop: 10, fontFamily: "Arial", fontSize: 13, fontWeight: "bold", fontStyle: "normal", lineHeight: 22, letterSpacing: 0, color: "#4a4a4a" }} >{esp.lang("event/detail", "text_location")}</Text>
196
+ <View style={{ flexDirection: 'row', marginBottom: 10, alignItems: 'center', marginHorizontal: 20 }} >
197
+ <LibPicture source={esp.assets('icons/ic_pin_grey.png')} style={{ width: 14, height: 14 }} />
198
+ <Text allowFontScaling={false} style={{ marginLeft: 10, fontFamily: "Arial", fontSize: 12, fontWeight: "normal", fontStyle: "normal", letterSpacing: 0, color: "#9b9b9b", flex: 1 }} >{result.address + ' ' + result.location_name}</Text>
199
+ </View>
200
+ </>
201
+ }
202
+ {
203
+ result.location_latlong !== '' && hasLatlong &&
204
+ <Pressable onPress={() => LibUtils.mapTo(result.location_name, result.location_latlong)} >
205
+ <View pointerEvents="none" style={{ marginHorizontal: 20, borderRadius: 10, backgroundColor: '#999', height: 180, marginBottom: 24, overflow: 'hidden' }} >
206
+ <MapView
207
+ style={{ flex: 1 }}
208
+ liteMode
209
+ initialRegion={{ latitude: lat, longitude: lng, latitudeDelta: 0.0122, longitudeDelta: 0.0121 }}>
210
+ <Marker
211
+ onPress={() => { LibUtils.mapTo(result.location_name, result.location_latlong) }}
212
+ coordinate={{ latitude: lat, longitude: lng }}
213
+ title={result.title}
214
+ description={result.address}
215
+ />
216
+ </MapView>
217
+ </View>
218
+ </Pressable>
219
+ }
220
+
221
+ {
222
+ result?.image_map !== "" &&
223
+ <>
224
+ <Text allowFontScaling={false} style={{ marginBottom: 10, marginHorizontal: 20, marginTop: 10, fontFamily: "Arial", fontSize: 13, fontWeight: "bold", fontStyle: "normal", lineHeight: 22, letterSpacing: 0, color: "#4a4a4a" }} >{esp.lang("event/detail", "text_layout")}</Text>
225
+ <Pressable onPress={() => {
226
+ LibNavigation.navigate('lib/gallery', { image: result?.image_map })
227
+ }}>
228
+ <LibPicture source={{ uri: result?.image_map }} style={{ height: 0.50 * LibStyle.width - 30, width: LibStyle.width - 30, alignSelf: 'center' }} resizeMode="contain" />
229
+ </Pressable>
230
+ </>
231
+ }
232
+ {
233
+ result?.event_cat?.length > 0 &&
234
+ <>
235
+ <Text allowFontScaling={false} style={{ marginHorizontal: 20, fontFamily: "Arial", fontSize: 13, fontWeight: "bold", fontStyle: "normal", lineHeight: 22, letterSpacing: 0, color: "#4a4a4a" }} >{esp.lang("event/detail", "text_event_cat")}</Text>
236
+ <View style={{ flexDirection: 'row', alignItems: 'center', flexWrap: 'wrap', marginLeft: 17, marginTop: 5 }}>
237
+ {
238
+ result?.event_cat?.map?.((x: any, i: number) => (
239
+ <Pressable key={i} onPress={() => { LibNavigation.navigate('event/list', { url: 'event', cat_id: x?.id }) }} style={{ marginTop: 5, padding: 7, paddingHorizontal: 10, marginRight: 5, borderRadius: 3, backgroundColor: LibStyle.colorGrey }}>
240
+ <Text allowFontScaling={false} numberOfLines={1} style={{ fontFamily: 'Arial', fontSize: 10, letterSpacing: 2, color: '#2980b9' }}>{x?.title}</Text>
241
+ </Pressable>
242
+ ))
243
+ }
244
+ </View>
245
+ </>
246
+ }
247
+
248
+ </LibScroll>
249
+
250
+ {/* 0=pending, 1=active, 2=done, 3=cancel (posisi tdnya pending lalu diaktifkan ketika wktunya udah lewat), 4=postpone(sudah lewat tapi jangan done) */}
251
+
252
+ {
253
+ result?.status == 1 ?
254
+ <View style={{ paddingVertical: 5, paddingHorizontal: 10 }} >
255
+ {
256
+ deeplinkParams?.type == 'event-voucher' &&
257
+ <Text allowFontScaling={false} style={{ color: "coral", fontSize: 12, fontWeight: 'bold', marginBottom: 5 }}>{esp.lang("event/detail", "voucher_embed") + deeplinkParams?.code}</Text>
258
+ }
259
+ {
260
+ result?.book_available == 0 ?
261
+ <>
262
+ {
263
+ result.end_booking <= date && result.end_booking != '0000-00-00 00:00:00' ?
264
+ <View style={{ height: 35, borderRadius: 17, backgroundColor: LibStyle.colorLightGrey, justifyContent: 'center', alignItems: 'center', paddingHorizontal: 9 }} >
265
+ <Text allowFontScaling={false} style={{ fontFamily: "ArialBold", fontSize: 12, textAlign: "center", textAlignVertical: 'center', color: 'black', marginHorizontal: 10 }} >{esp.lang("event/detail", "text_booking_end")}</Text>
266
+ </View>
267
+ :
268
+ <View style={{ height: 35, borderRadius: 17, backgroundColor: LibStyle.colorLightGrey, justifyContent: 'center', alignItems: 'center', paddingHorizontal: 9 }} >
269
+ <Text allowFontScaling={false} style={{ fontFamily: "ArialBold", fontSize: 12, textAlign: "center", textAlignVertical: 'center', color: 'black', marginHorizontal: 10 }} >
270
+ {
271
+ esp.lang("event/detail", "text_book_on", LibUtils.moment(result.start_booking).serverFormat('DD MMMM YYYY H:mm:ss', result?.timezone), result?.timezone_locale || "")
272
+ }
273
+ </Text>
274
+ </View>
275
+ }
276
+ </>
277
+ :
278
+ <View style={{ flexDirection: 'row', justifyContent: 'space-between' }}>
279
+ {
280
+ result?.url_artist != "" &&
281
+ <TouchableOpacity onPress={() => {
282
+ // LibNavigation.navigate('event/artist', { title: result?.title, url: result?.url_artist, has_addition: result?.has_addition })
283
+ LibNavigation.navigate('event/artist', {
284
+ title: result?.title,
285
+ url: result?.url_artist,
286
+ has_addition: result?.has_addition
287
+ })
288
+ }} style={applyStyle({ width: (LibStyle.width - 30) * 0.5, borderWidth: 2, borderColor: LibStyle.colorGreen, height: 40, borderRadius: 16, backgroundColor: 'white', flexDirection: 'row', alignItems: 'center', alignContent: 'center', justifyContent: 'center', paddingHorizontal: 9 })} >
289
+ <Text allowFontScaling={false} style={applyStyle({ fontFamily: "ArialBold", fontSize: 14, textAlign: "center", textAlignVertical: 'center', color: LibStyle.colorGreen })} >{esp.lang("event/detail", "line_up")}</Text>
290
+ </TouchableOpacity>
291
+ }
292
+ <TouchableOpacity onPress={() => {
293
+ EventIndexProperty.isLogin(async () => {
294
+ if (isInPricingQueueConfig(result.id)) {
295
+ await LibNavigation.navigateForResult('event/queue_pricing', { event_id: result?.id })
296
+ }
297
+ loadDataConfig(result?.url_config)
298
+ return
299
+ LibNavigation.navigate(
300
+ user?.config?.tester == 1 ?
301
+ 'event/ticket_list2'
302
+ :
303
+ (result?.config?.hasOwnProperty('multiprice') && result?.config?.multiprice == 1 ? 'event/ticket_list2' : 'event/ticket_list'),
304
+ {
305
+ url: result.url_price,
306
+ fee_platform: {
307
+ fee_platform_amount: result?.fee_platform_amount,
308
+ fee_platform_type: result?.fee_platform_type,
309
+ },
310
+ subscribed: {
311
+ is_subscribed: result?.config?.is_subscribed,
312
+ is_subscribed_default: result?.config?.is_subscribed_default,
313
+ is_subscribed_label: result?.config?.is_subscribed_label
314
+ },
315
+ show_fee_percentage: result?.config?.show_fee_percentage,
316
+ is_multiprice: result?.config?.multiprice == 1 ? 1 : 0,
317
+ })
318
+ })
319
+
320
+ }} style={applyStyle({ width: result?.url_artist != "" ? (LibStyle.width - 30) * 0.5 : LibStyle.width - 20, borderWidth: 2, borderColor: LibStyle.colorGreen, height: 40, borderRadius: 16, backgroundColor: LibStyle.colorGreen, flexDirection: 'row', alignItems: 'center', alignContent: 'center', justifyContent: 'center', paddingHorizontal: 9 })} >
321
+ <Text allowFontScaling={false} style={applyStyle({ fontFamily: "ArialBold", fontSize: 14, textAlign: "center", textAlignVertical: 'center', color: "#fff" })} >{esp.lang("event/detail", "text_buy_ticket")}</Text>
322
+ </TouchableOpacity>
323
+ <UseCondition if={priority} >
324
+ <View pointerEvents='none' style={{ height: 20, position: "absolute", right: 0, top: 0, bottom: 0, left: 0 }} >
325
+ <LibSkeleton
326
+ colors={['#fffdb8', '#fdf68c', '#f4cd2a', '#f4cd2a', '#d28d0d', '#fffdb8', '#fdf68c', '#f4cd2a', '#f4cd2a', '#d28d0d', '#fffdb8', '#fdf68c', '#f4cd2a', '#f4cd2a', '#d28d0d']}>
327
+ <Text style={{ color: "white", fontWeight: "bold", fontSize: 9, alignSelf: 'center', textAlign: 'center' }} >{esp.lang("event/detail", "priority_label")}</Text>
328
+ </LibSkeleton>
329
+ </View>
330
+ </UseCondition>
331
+ </View>
332
+ }
333
+ </View>
334
+ :
335
+ result.status == 2 ? /* done */
336
+ <View style={{ flexDirection: 'row', paddingVertical: 5, paddingHorizontal: 10 }} >
337
+ <View style={{ flex: 1, height: 35, borderRadius: 17, backgroundColor: LibStyle.colorLightGrey, justifyContent: 'center', alignItems: 'center', paddingHorizontal: 9 }} >
338
+ <Text allowFontScaling={false} style={{ fontFamily: "ArialBold", fontSize: 12, textAlign: "center", textAlignVertical: 'center', color: 'black', marginRight: 10, marginLeft: 10 }} >{esp.lang("event/detail", "event_done")}</Text>
339
+ </View>
340
+ </View>
341
+ :
342
+ result.status == 4 ? /* postpone(sudah lewat tapi jangan done) */
343
+ <View style={{ flexDirection: 'row', paddingVertical: 5, paddingHorizontal: 10 }} >
344
+ <View style={{ flex: 1, height: 35, borderRadius: 17, backgroundColor: LibStyle.colorLightGrey, justifyContent: 'center', alignItems: 'center', paddingHorizontal: 9 }} >
345
+ <Text allowFontScaling={false} style={{ fontFamily: "ArialBold", fontSize: 12, textAlign: "center", textAlignVertical: 'center', color: 'black', marginRight: 10, marginLeft: 10 }} >{esp.lang("event/detail", "event_postpone")}</Text>
346
+ </View>
347
+ </View>
348
+ :
349
+ null
350
+ }
351
+
352
+ </View >
353
+ )
354
+ }
@@ -214,10 +214,13 @@ export default function m(props: EventOrder_detailProps): any {
214
214
  setQty(qty == 1 ? 1 : qty - 1)
215
215
  }
216
216
 
217
- function sendBack() {
217
+ function sendBack(p: any) {
218
218
  LibDialog.confirm(esp.lang("event/order_detail", "warning"), esp.lang("event/order_detail", "return_this_ticket"), esp.lang("event/order_detail", "btn_yes"), () => {
219
219
  LibProgress.show(esp.lang("event/order_detail", "please_wait"))
220
- new LibCurl('event_booking_shared_return?booking_id=' + result?.id + '&qty_shared=' + qty, null, (res: any, msg: any) => {
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) => {
221
224
  // LibNotify(res)
222
225
  LibProgress.hide()
223
226
  LibDialog.info(esp.lang("event/order_detail", "information"), msg)
@@ -659,7 +662,7 @@ export default function m(props: EventOrder_detailProps): any {
659
662
  result?.status != "2" && coupons &&
660
663
  <View style={{ margin: 15, marginBottom: 0, borderRadius: 7, backgroundColor: '#fff', paddingBottom: 10, paddingTop: 10 }}>
661
664
  <View style={{ marginHorizontal: 20 }}>
662
- <Text style={{ fontWeight: 'bold', fontSize: 14, color: LibStyle.colorPrimary }}>{coupons.title || ''}</Text>
665
+ <Text style={{ fontWeight: 'bold', fontSize: 14, color: "#495057" }}>{coupons.title || ''}</Text>
663
666
  </View>
664
667
 
665
668
  {
@@ -843,7 +846,11 @@ export default function m(props: EventOrder_detailProps): any {
843
846
  returnTicket: true,
844
847
  })
845
848
  } else {
846
- sendBack()
849
+ LibNavigation.navigateForResult("bigbang/payment_pin", undefined, 1132).then((p) => {
850
+ if (p) {
851
+ sendBack(p)
852
+ }
853
+ })
847
854
  }
848
855
  dialogSendBack.current!.hide()
849
856
  }} cancel={() => {
@@ -53,9 +53,9 @@ export default function m(props: EventOrder_waitingProps): any {
53
53
  useEffect(() => {
54
54
  loadData()
55
55
  stateData.reset()
56
- // LibAutoreload.set(() => {
57
- // loadData()
58
- // }, 6000)
56
+ LibAutoreload.set(() => {
57
+ loadData()
58
+ }, 6000)
59
59
  return () => LibAutoreload.clear()
60
60
  }, [])
61
61
 
@@ -303,7 +303,7 @@ export default function m(props: EventOrder_waitingProps): any {
303
303
  <Text allowFontScaling={false} style={{ flex: 1, alignContent: 'center', alignItems: 'center', fontSize: 14, fontStyle: "normal", letterSpacing: 0, textAlign: "right", color: "#9b9b9b" }}>{LibUtils.money(result?.total, result?.currency)}</Text>
304
304
  </View>
305
305
  {
306
- result?.status == 0 && LibUtils.moment(result?.exp_payment).serverFormat('YYYY-MM-DD HH:mm:ss') >= dateNow &&
306
+ result?.status == 0 && LibUtils.moment(result?.exp_payment).serverFormat('YYYY-MM-DD HH:mm:ss', result?.timezone) >= dateNow &&
307
307
  <View style={{ alignContent: 'center', alignItems: 'center', justifyContent: 'space-between', flexDirection: 'row', marginTop: 5 }}>
308
308
  <Text allowFontScaling={false} style={{ flex: 1, fontWeight: 'bold', fontSize: 14, fontStyle: "normal", letterSpacing: 0, color: "#4a4a4a" }}>{esp.lang("event/order_detail_waiting", "booking_code")}</Text>
309
309
  <Text allowFontScaling={false} style={{ flex: 1, alignContent: 'center', alignItems: 'center', fontSize: 14, fontStyle: "normal", letterSpacing: 0, textAlign: "right", color: LibStyle.colorRed }}>{result?.booking_code}</Text>
@@ -313,7 +313,7 @@ export default function m(props: EventOrder_waitingProps): any {
313
313
  result?.status == 0 &&
314
314
  <View style={{ alignItems: 'center', justifyContent: 'space-between', flexDirection: 'row', marginTop: 5 }}>
315
315
  <Text allowFontScaling={false} style={{ fontWeight: 'bold', flex: 1, flexWrap: 'wrap', fontSize: 14, fontStyle: "normal", letterSpacing: 0, color: "#4a4a4a" }}>{esp.lang("event/order_detail_waiting", "expired_payment")}</Text>
316
- <EventCountdown_base expired={moment(result?.exp_payment).serverFormat("YYYY-MM-DD HH:mm:ss")} style={{ flex: 1, marginLeft: 15, fontSize: 14, color: LibStyle.colorRed, fontFamily: "ArialBold" }} />
316
+ <EventCountdown_base expired={moment(result?.exp_payment).serverFormat("YYYY-MM-DD HH:mm:ss", result?.timezone)} style={{ flex: 1, marginLeft: 15, fontSize: 14, color: LibStyle.colorRed, fontFamily: "ArialBold" }} />
317
317
  </View>
318
318
  }
319
319
 
@@ -381,7 +381,7 @@ export default function m(props: EventOrder_waitingProps): any {
381
381
  <QRCode ecl="H" size={250} value={result?.params?.qr} />
382
382
  </View>
383
383
 
384
- <Text allowFontScaling={false} style={{ fontSize: 14, textAlign: 'center', marginVertical: 10 }}>{esp.lang("event/order_detail_waiting", "expired_on") + moment(result?.exp_payment).serverFormat("DD MMM YYYY, HH:mm:ss")}</Text>
384
+ <Text allowFontScaling={false} style={{ fontSize: 14, textAlign: 'center', marginVertical: 10 }}>{esp.lang("event/order_detail_waiting", "expired_on") + moment(result?.exp_payment).serverFormat("DD MMM YYYY, HH:mm:ss", result?.timezone)}</Text>
385
385
 
386
386
  </View>
387
387
  <TouchableOpacity onPress={() => EventCapture.capture(qrView, result?.event_name + "-" + result?.price_name)} style={{ flexDirection: 'row', alignContent: 'center', alignItems: 'center', justifyContent: 'center', height: 30, marginTop: 10, borderTopColor: LibStyle.colorBlue, borderBottomColor: LibStyle.colorBlue, borderTopWidth: 0.5, borderBottomWidth: 0.5 }}>
@@ -484,7 +484,7 @@ export default function m(props: EventOrder_waitingProps): any {
484
484
  </View>
485
485
  </LibScroll>
486
486
  {
487
- result?.status == 0 && LibUtils.moment(result?.exp_payment).serverFormat('YYYY-MM-DD HH:mm:ss') >= dateNow &&
487
+ result?.status == 0 && LibUtils.moment(result?.exp_payment).serverFormat('YYYY-MM-DD HH:mm:ss', result?.timezone) >= dateNow &&
488
488
  <View style={{ padding: 15, paddingTop: 10, paddingBottom: 10 }}>
489
489
  {
490
490
  (result?.payment?.payment_type == 3 || result?.payment?.payment_type == 14) && //khusus cc & FPX
@@ -97,7 +97,7 @@ export default function m(props: EventOrder_itemProps): any {
97
97
  item?.status == 0 ?
98
98
  <View style={applyStyle({ flex: 1, flexDirection: 'row', alignItems: 'center', justifyContent: 'space-between', alignContent: 'center', paddingHorizontal: 15 })}>
99
99
  <View style={{ flex: 1 }}>
100
- <EventCountdown_base expired={LibUtils.moment(item?.exp_payment).serverFormat('YYYY-MM-DD HH:mm:ss')} style={applyStyle({ fontSize: 12, color: LibStyle.colorRed, fontFamily: "ArialBold", fontWeight: "normal", fontStyle: "normal" })} />
100
+ <EventCountdown_base expired={LibUtils.moment(item?.exp_payment).serverFormat('YYYY-MM-DD HH:mm:ss', item?.timezone)} style={applyStyle({ fontSize: 12, color: LibStyle.colorRed, fontFamily: "ArialBold", fontWeight: "normal", fontStyle: "normal" })} />
101
101
  </View>
102
102
  {
103
103
  !!item?.booking_code &&