esoftplay-event 0.0.1-g → 0.0.1-i

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"
@@ -1,13 +1,11 @@
1
1
  // withHooks
2
2
 
3
- import { applyStyle } from 'esoftplay';
4
3
  import { EventCountdownProperty } from 'esoftplay/cache/event/countdown/import';
5
4
  import { EventFirebase_socket, EventFirebase_socketProperty } from 'esoftplay/cache/event/firebase_socket/import';
6
5
  import { EventHeader } from 'esoftplay/cache/event/header/import';
7
6
  import { EventIndexProperty } from 'esoftplay/cache/event/index/import';
8
- import { EventMessage } from 'esoftplay/cache/event/message/import';
7
+ import { LibCarrousel } from 'esoftplay/cache/lib/carrousel/import';
9
8
  import { LibCurl } from 'esoftplay/cache/lib/curl/import';
10
- import { LibList } from 'esoftplay/cache/lib/list/import';
11
9
  import { LibLoading } from 'esoftplay/cache/lib/loading/import';
12
10
  import { LibNavigation } from 'esoftplay/cache/lib/navigation/import';
13
11
  import { LibPicture } from 'esoftplay/cache/lib/picture/import';
@@ -19,6 +17,7 @@ import moment from 'esoftplay/moment';
19
17
  import useSafeState from 'esoftplay/state';
20
18
  import React, { useEffect } from 'react';
21
19
  import { Text, TouchableOpacity, View } from 'react-native';
20
+ import { ScrollView } from 'react-native-gesture-handler';
22
21
 
23
22
 
24
23
  moment().locale('id')
@@ -41,7 +40,7 @@ export default function m(props: EventArtistv2Props): any {
41
40
  /* get detail event untuk dapat config antrian */
42
41
 
43
42
  // new LibCurl(url, null,
44
- new LibCurl('v2/event_artist&event_id=411', null,
43
+ new LibCurl('v2/event_artist&event_id=411', null,
45
44
  (res) => {
46
45
  esp.log({ res });
47
46
  new LibCurl(res?.[0]?.url_event || `event_detail/${res?.[0]?.event_id}`, null, (res) => {
@@ -77,69 +76,196 @@ export default function m(props: EventArtistv2Props): any {
77
76
  is_subscribed_default: resultEvent?.config?.is_subscribed_default,
78
77
  is_subscribed_label: resultEvent?.config?.is_subscribed_label
79
78
  }
79
+ const width = LibStyle?.width
80
+ const sliderHeight = 0.50 * width
80
81
 
81
- function renderItem(item: any, index: number) {
82
+ function renderIt(item: any, i: number) {
82
83
  const styleId_Z2g4Hs7: any = { backgroundColor: '#FFC523', width: itemWidth, height: itemHeight, margin: 0.5, justifyContent: 'center', alignItems: 'center' }
83
- let isNotAvailable = item?.price_list?.every((v: any) => v.status == 0)
84
+ return (
85
+ <LibCarrousel
86
+ delay={4000}
87
+ style={{ height: sliderHeight, width: width }}
88
+ autoplay
89
+ >
90
+ {
91
+ item?.images?.map((item1: any, ii: number) => {
92
+ return (
93
+ <TouchableOpacity onPress={() => {
94
+ esp.log("start");
95
+ // EventIndexProperty.isLogin(async () => {
96
+ // esp.log("1");
97
+ // if (item.status == 1) {
98
+ // esp.log("2");
99
+ // if (isInPricingQueueConfig(item.event_id)) {
100
+ // esp.log("3");
101
+ // LibNavigation.navigateForResult('event/queue_pricing', { event_id: item?.event_id, autoPass: false })
102
+ // }
103
+ // esp.log("4");
104
+ // EventCountdownProperty.countdownTime.set(moment().add(EventFirebase_socketProperty.eventQueueConfig.get(item?.event_id).time, 'seconds').localeFormat('YYYY-MM-DD HH:mm:ss'))
105
+ // esp.log("5");
106
+ // LibNavigation.navigate(item?.config?.hasOwnProperty('multiprice') && item?.config?.multiprice == 1 ?
107
+ // 'event/artist_detail_multi' :
108
+ // 'event/artist_detail', { url_price: item.url })
109
+ // } else {
110
+ // esp.log("6");
111
+ // LibToastProperty.show(esp.lang("event/artist", "ticket_not_available"))
112
+ // }
113
+ // })
114
+ }} style={{ height: sliderHeight, width: width }} >
115
+ <LibPicture source={{ uri: item1 }} style={{ height: sliderHeight, width: width, resizeMode: 'cover', backgroundColor: "#f1f2f3" }} />
116
+ </TouchableOpacity>
117
+ )
118
+ })
119
+ }
120
+ </LibCarrousel>
121
+ )
122
+ return (
123
+ <TouchableOpacity onPress={() => {
124
+ esp.log("start");
125
+ EventIndexProperty.isLogin(async () => {
126
+ esp.log("1");
127
+ if (item.status == 1) {
128
+ esp.log("2");
129
+ if (isInPricingQueueConfig(item.event_id)) {
130
+ esp.log("3");
131
+ LibNavigation.navigateForResult('event/queue_pricing', { event_id: item?.event_id, autoPass: false })
132
+ }
133
+ esp.log("4");
134
+ EventCountdownProperty.countdownTime.set(moment().add(EventFirebase_socketProperty.eventQueueConfig.get(item?.event_id).time, 'seconds').localeFormat('YYYY-MM-DD HH:mm:ss'))
135
+ esp.log("5");
136
+ LibNavigation.navigate(item?.config?.hasOwnProperty('multiprice') && item?.config?.multiprice == 1 ?
137
+ 'event/artist_detail_multi' :
138
+ 'event/artist_detail', { url_price: item.url })
139
+ } else {
140
+ esp.log("6");
141
+ LibToastProperty.show(esp.lang("event/artist", "ticket_not_available"))
142
+ }
143
+ })
144
+ }} >
145
+ <LibCarrousel
146
+ delay={4000}
147
+ style={{ height: sliderHeight, width: width }}
148
+ autoplay
149
+ >
150
+ {
151
+ item?.images?.map((item1: any, ii: number) => {
152
+ return (
153
+ <LibPicture key={ii} source={{ uri: item1 }} style={{ height: sliderHeight, width: width, resizeMode: 'cover', backgroundColor: "#f1f2f3" }} />
154
+ )
155
+ })
156
+ }
157
+ </LibCarrousel>
158
+ {/* <View style={styleId_Z2g4Hs7}>
84
159
 
160
+ </View> */}
161
+ </TouchableOpacity>
162
+ )
85
163
 
86
- return (
87
- <TouchableOpacity key={index} onPress={() => {
88
- if (isNotAvailable) {
89
- LibToastProperty.show(esp.lang("event/artist", "ticket_not_available"))
90
- } else {
91
- EventIndexProperty.isLogin(() => {
92
- let newItem = {
93
- has_addition: has_addition,
94
- ...item,
164
+ }
165
+
166
+ function renderItem(item: any, index: number) {
167
+ const styleId_Z2g4Hs7: any = { backgroundColor: '#FFC523', width: itemWidth, height: itemHeight, margin: 0.5, justifyContent: 'center', alignItems: 'center' }
168
+
169
+ if (item?.images?.length > 0) {
170
+ return (
171
+ <LibCarrousel
172
+ key={"p_slider"}
173
+ delay={4000}
174
+ style={{ height: sliderHeight, width: width }}
175
+ autoplay
176
+ >
177
+ {
178
+ item?.images?.map((item1: any, ii: number) => {
179
+ return (
180
+ <TouchableOpacity key={ii} onPress={() => {
181
+ esp.log("start");
182
+ EventIndexProperty.isLogin(async () => {
183
+ esp.log("1");
184
+ if (item.status == 1) {
185
+ esp.log("2");
186
+ if (isInPricingQueueConfig(item.event_id)) {
187
+ esp.log("3");
188
+ LibNavigation.navigateForResult('event/queue_pricing', { event_id: item?.event_id, autoPass: false })
189
+ }
190
+ esp.log("4");
191
+ EventCountdownProperty.countdownTime.set(moment().add(EventFirebase_socketProperty.eventQueueConfig.get(item?.event_id).time, 'seconds').localeFormat('YYYY-MM-DD HH:mm:ss'))
192
+ esp.log("5");
193
+ LibNavigation.navigate(item?.config?.hasOwnProperty('multiprice') && item?.config?.multiprice == 1 ?
194
+ 'event/artist_detail_multi' :
195
+ 'event/artist_detail', { url_price: item.url })
196
+ } else {
197
+ esp.log("6");
198
+ LibToastProperty.show(esp.lang("event/artist", "ticket_not_available"))
199
+ }
200
+ })
201
+ }} >
202
+ <LibPicture key={ii} source={{ uri: item1 }} style={{ height: sliderHeight, width: width, resizeMode: 'cover', backgroundColor: "#f1f2f3" }} />
203
+ </TouchableOpacity>
204
+ )
205
+ })
206
+ }
207
+ </LibCarrousel>
208
+ )
209
+ } else if (item?.images?.length == 1) {
210
+ return (
211
+ <TouchableOpacity key={index} onPress={() => {
212
+ esp.log("start");
213
+ EventIndexProperty.isLogin(async () => {
214
+ esp.log("1");
215
+ if (item.status == 1) {
216
+ esp.log("2");
217
+ if (isInPricingQueueConfig(item.event_id)) {
218
+ esp.log("3");
219
+ LibNavigation.navigateForResult('event/queue_pricing', { event_id: item?.event_id, autoPass: false })
220
+ }
221
+ esp.log("4");
222
+ EventCountdownProperty.countdownTime.set(moment().add(EventFirebase_socketProperty.eventQueueConfig.get(item?.event_id).time, 'seconds').localeFormat('YYYY-MM-DD HH:mm:ss'))
223
+ esp.log("5");
224
+ LibNavigation.navigate(item?.config?.hasOwnProperty('multiprice') && item?.config?.multiprice == 1 ?
225
+ 'event/artist_detail_multi' :
226
+ 'event/artist_detail', { url_price: item.url })
227
+ } else {
228
+ esp.log("6");
229
+ LibToastProperty.show(esp.lang("event/artist", "ticket_not_available"))
95
230
  }
96
- if (item.book_available == 1) {
231
+ })
232
+ }} >
233
+ <LibPicture style={{ height: sliderHeight, width: width, resizeMode: 'cover', backgroundColor: "#f1f2f3" }} source={{ uri: item.images[0] }} />
234
+ </TouchableOpacity>
235
+ )
236
+ } else {
237
+ return (
238
+ <TouchableOpacity key={index} onPress={() => {
239
+ esp.log("start");
240
+ EventIndexProperty.isLogin(async () => {
241
+ esp.log("1");
242
+ if (item.status == 1) {
243
+ esp.log("2");
97
244
  if (isInPricingQueueConfig(item.event_id)) {
98
- LibNavigation.navigateForResult('event/queue_pricing', { event_id: item?.event_id, autoPass: false }).then((v) => {
99
- EventCountdownProperty.countdownTime.set(moment().add(EventFirebase_socketProperty.eventQueueConfig.get(item?.event_id).time, 'seconds').localeFormat('YYYY-MM-DD HH:mm:ss'))
100
- if (item?.config?.hasOwnProperty('multiprice') && item?.config?.multiprice == 1) {
101
- LibNavigation.navigate('event/artist_detail_multi', {
102
- data: newItem,
103
- subscribed: subs
104
- })
105
- } else {
106
- LibNavigation.navigate('event/artist_detail', {
107
- data: newItem,
108
- subscribed: subs
109
- })
110
- }
111
- })
112
- } else {
113
- if (item?.config?.hasOwnProperty('multiprice') && item?.config?.multiprice == 1) {
114
- LibNavigation.navigate('event/artist_detail_multi', {
115
- data: newItem,
116
- subscribed: subs
117
- })
118
- } else {
119
- LibNavigation.navigate('event/artist_detail', {
120
- data: newItem,
121
- subscribed: subs
122
- })
123
- }
245
+ esp.log("3");
246
+ LibNavigation.navigateForResult('event/queue_pricing', { event_id: item?.event_id, autoPass: false })
124
247
  }
248
+ esp.log("4");
249
+ EventCountdownProperty.countdownTime.set(moment().add(EventFirebase_socketProperty.eventQueueConfig.get(item?.event_id).time, 'seconds').localeFormat('YYYY-MM-DD HH:mm:ss'))
250
+ esp.log("5");
251
+ LibNavigation.navigate(item?.config?.hasOwnProperty('multiprice') && item?.config?.multiprice == 1 ?
252
+ 'event/artist_detail_multi' :
253
+ 'event/artist_detail', { url_price: item.url })
125
254
  } else {
126
- LibToastProperty.show(esp.lang("event/artist_detail", "book_available", moment(item?.start_booking).serverFormat("DD MMMM YYYY HH:mm:ss")))
255
+ esp.log("6");
256
+ LibToastProperty.show(esp.lang("event/artist", "ticket_not_available"))
127
257
  }
128
258
  })
129
- }
130
- }} >
131
- {
132
- item && item.image != "" ?
133
- <LibPicture style={applyStyle({ opacity: isNotAvailable ? 0.3 : 1, backgroundColor: '#f2f3f4', width: itemWidth, height: itemHeight, margin: 0.5 })} source={{ uri: item.image }} />
134
- :
135
- <View style={styleId_Z2g4Hs7}>
136
- <Text numberOfLines={2} style={styleId_2cYE4h}>{item.title}</Text>
137
- </View>
138
- }
139
- </TouchableOpacity >
140
- )
259
+ }} style={styleId_Z2g4Hs7}>
260
+ <Text numberOfLines={2} style={styleId_2cYE4h}>{item.title}</Text>
261
+
262
+ </TouchableOpacity>
263
+ )
264
+ }
141
265
  }
142
266
 
267
+
268
+
143
269
  return (
144
270
  <View style={{ flex: 1, backgroundColor: 'white' }} >
145
271
  <EventHeader title={title ? title : resultEvent?.event_title} iconShare={resultEvent?.url_share_artist && resultEvent?.url_share_artist !== ""}
@@ -148,16 +274,21 @@ export default function m(props: EventArtistv2Props): any {
148
274
  }} />
149
275
  {
150
276
  !result && !error ? <LibLoading /> :
151
- <LibList
152
- data={result}
153
- keyExtractor={(item) => item.id}
154
- onRefresh={loadData}
155
- staticHeight={itemHeight + 1}
156
- renderItem={renderItem}
157
- ListEmptyComponent={
158
- <EventMessage message={error} />
277
+ <ScrollView>
278
+ {
279
+ result?.map(renderIt)
159
280
  }
160
- />
281
+ </ScrollView>
282
+ // <LibList
283
+ // data={result}
284
+ // // keyExtractor={(item) => item.id}
285
+ // onRefresh={loadData}
286
+ // staticHeight={itemHeight + 1}
287
+ // renderItem={renderIt}
288
+ // ListEmptyComponent={
289
+ // <EventMessage message={error} />
290
+ // }
291
+ // />
161
292
  }
162
293
  </View>
163
294
  )
@@ -20,6 +20,7 @@ import { UserClass } from 'esoftplay/cache/user/class/import';
20
20
 
21
21
  import { applyStyle } from 'esoftplay';
22
22
  import { EventAlert } from 'esoftplay/cache/event/alert/import';
23
+ import { EventConfigProperty } from 'esoftplay/cache/event/config/import';
23
24
  import { EventHtmltext } from 'esoftplay/cache/event/htmltext/import';
24
25
  import { EventIndexProperty } from 'esoftplay/cache/event/index/import';
25
26
  import { EventOrder_detail_upgrade_button } from 'esoftplay/cache/event/order_detail_upgrade_button/import';
@@ -28,6 +29,7 @@ import { EventQr_bg } from 'esoftplay/cache/event/qr_bg/import';
28
29
  import { EventRating } from 'esoftplay/cache/event/rating/import';
29
30
  import { EventSecure_page } from 'esoftplay/cache/event/secure_page/import';
30
31
  import { EventStep } from 'esoftplay/cache/event/step/import';
32
+ import { LibGradient } from 'esoftplay/cache/lib/gradient/import';
31
33
  import { LibSlidingup } from 'esoftplay/cache/lib/slidingup/import';
32
34
  import { UseCondition } from 'esoftplay/cache/use/condition/import';
33
35
  import esp from 'esoftplay/esp';
@@ -174,6 +176,7 @@ export default function m(props: EventOrder_detailProps): any {
174
176
  }
175
177
 
176
178
  useEffect(() => {
179
+ EventConfigProperty.curlConfig('v2/config_order_type')
177
180
  loadData()
178
181
  }, [])
179
182
 
@@ -202,21 +205,6 @@ export default function m(props: EventOrder_detailProps): any {
202
205
  setDataReview(subs.getValue())
203
206
  })
204
207
 
205
- function doCancel(url: string): void {
206
- LibDialog.warningConfirm(esp.lang("event/order_detail", "confirm"), esp.lang("event/order_detail", "cancel_this_order"), esp.lang("event/order_detail", "btn_yes"), () => {
207
- LibProgress.show(esp.lang("event/order_detail", "please_wait"))
208
- new LibCurl(url, null, (result: any, msg: any) => {
209
- LibProgress.hide()
210
- LibNavigation.back()
211
- }, (error: any) => {
212
- LibDialog.warning(esp.lang("event/order_detail", "cancel_err"), error?.message);
213
- LibProgress.hide()
214
- }, 1)
215
- }, esp.lang("event/order_detail", "btn_cancel"), () => {
216
-
217
- })
218
- }
219
-
220
208
  function addReturn(): void {
221
209
  if (qty < Number(result.qty_returnable)) {
222
210
  setQty(qty + 1)
@@ -243,6 +231,55 @@ export default function m(props: EventOrder_detailProps): any {
243
231
  }, esp.lang("event/order_detail", "btn_cancel"), () => { })
244
232
  }
245
233
 
234
+ function loadDataAddons(id: any, url: string) {
235
+ LibProgress.show(esp.lang("event/order_detail", "wait"))
236
+ new LibCurl(url, null, (res: any, msg: any) => {
237
+ esp.log({ res });
238
+ LibProgress.hide()
239
+ let dataBookingEvent = {
240
+ event_id: res?.event_id,
241
+ event_title: res?.event_name,
242
+ selected_ticket: {
243
+ price_id: res?.price_id,
244
+ currency: res?.currency,
245
+ tax: res?.tax,
246
+ fee: res?.fee,
247
+ fee_percent: res?.fee_percent,
248
+ term: res?.term,
249
+ has_addition: res?.has_addition,
250
+ list: {
251
+ ondate: res?.ondate,
252
+ price: res?.price,
253
+ price_id: res?.price_id,
254
+ currency: res?.currency,
255
+ }
256
+ },
257
+ qty: result?.qty
258
+ }
259
+ let fee_platform = {
260
+ fee_platform_amount: res?.fee_platform?.fee_platform_amount,
261
+ fee_platform_type: res?.fee_platform?.fee_platform_type
262
+ }
263
+ let show_fee_percentage = res?.show_fee_percentage
264
+ let tax = res?.tax
265
+ let order_type = EventConfigProperty.state().get()?.order_type?.ticket
266
+ let addons_id = id
267
+ let booking_id_ref = result?.id
268
+ LibNavigation.navigate('payment/ticket', {
269
+ order_type: order_type,
270
+ tax: tax,
271
+ fee_platform: fee_platform,
272
+ dataBookingEvent: dataBookingEvent,
273
+ show_fee_percentage,
274
+ addons_id,
275
+ booking_id_ref
276
+ })
277
+ }, (err: any) => {
278
+ LibProgress.hide()
279
+ esp.log({ err });
280
+ }, 1)
281
+ }
282
+
246
283
  if (result == undefined && !coupons) {
247
284
  return (
248
285
  <View style={{ flex: 1, backgroundColor: '#f6f6f6' }}>
@@ -498,6 +535,36 @@ export default function m(props: EventOrder_detailProps): any {
498
535
  }} />
499
536
  </UseCondition>
500
537
 
538
+
539
+ {/* tombol add on */}
540
+
541
+ {
542
+ result?.addons?.length > 0 && result?.addons?.map((item: any, i: number) => {
543
+ return (
544
+ <TouchableOpacity key={i} onPress={() => {
545
+ loadDataAddons(item?.addons_id, item?.url)
546
+ }}>
547
+ <LibGradient
548
+ colors={["#F2789F", "#F9C5D5", "#F9C5D5", "#F2789F",]}
549
+ direction='top-to-bottom'
550
+ style={{ margin: 15, flexDirection: 'row', backgroundColor: '#F2789F', marginBottom: 0, borderWidth: 1, borderColor: 'red', borderRadius: 7, overflow: 'hidden' }}
551
+ >
552
+ <View style={{ padding: 10, paddingHorizontal: 15, borderTopLeftRadius: 7, borderBottomLeftRadius: 7 }}>
553
+ <LibIcon name='plus-circle' size={40} color='#fff' style={{ opacity: 1 }} />
554
+ </View>
555
+ <View style={{ flex: 1, backgroundColor: '#fff', borderTopRightRadius: 7, borderBottomRightRadius: 7, borderTopLeftRadius: 50, borderBottomLeftRadius: 50, alignContent: 'center', justifyContent: 'center', paddingLeft: 30 }}>
556
+ <Text allowFontScaling={false} style={{ fontSize: 16, fontWeight: 'bold' }}>{item.title}</Text>
557
+ {
558
+ item.hasOwnProperty('info') && item?.info != "" &&
559
+ <Text allowFontScaling={false} numberOfLines={2} ellipsizeMode='tail' style={{ fontSize: 12, fontWeight: 'normal' }}>{item?.info}</Text>
560
+ }
561
+ </View>
562
+ </LibGradient>
563
+ </TouchableOpacity>
564
+ )
565
+ })
566
+ }
567
+
501
568
  {
502
569
  // jika mau edit view dibawah ini, tekan ctrl + f terus paste prefik dibawah ini
503
570
  // view_reviewed
@@ -32,7 +32,6 @@ export default function m(props: EventOrder_detail_visitorProps): any {
32
32
 
33
33
  function loadData() {
34
34
  new LibCurl(url, null, (res, msg) => {
35
- esp.log({ res });
36
35
  setResult(res)
37
36
  }, (err) => {
38
37
  setError(err)
@@ -106,11 +105,6 @@ export default function m(props: EventOrder_detail_visitorProps): any {
106
105
  return finalResult
107
106
  }
108
107
 
109
- let filterBuyerVisitor = result?.tickets?.reduce((r: any, a: any) => {
110
- r[a.email] = [...r[a.email] || [], a];
111
- return r;
112
- }, {});
113
-
114
108
  return (
115
109
  <View style={{ flex: 1, backgroundColor: LibStyle.colorBgGrey }}>
116
110
  <EventHeader title={esp.lang("event/order_detail_visitor", "header")} />
@@ -123,44 +117,30 @@ export default function m(props: EventOrder_detail_visitorProps): any {
123
117
  <ScrollView>
124
118
  <View style={{ margin: 15, borderRadius: 10, backgroundColor: '#fff', padding: 10 }}>
125
119
  {
126
- Object.values(filterBuyerVisitor)?.map((item: any, i: number) => {
120
+ result?.tickets?.map((item: any, i: number) => {
127
121
  return (
128
122
  <View key={i} style={{ marginLeft: 14, marginBottom: 15, flexDirection: 'row', alignContent: 'center', alignItems: 'center', justifyContent: 'space-between' }}>
129
123
  <View style={{ flex: 1, flexDirection: 'row', alignContent: 'center', alignItems: 'center' }}>
130
124
  <Text allowFontScaling={false} style={{ marginRight: 6, fontFamily: "Arial", fontSize: 30, fontWeight: "bold", fontStyle: "normal", letterSpacing: 0, color: "#484848" }}>{i + 1}.</Text>
131
125
  <View style={{ flex: 1 }} >
132
126
  <Text allowFontScaling={false} style={{ fontFamily: "Arial", marginTop: 10, fontSize: 10, fontWeight: "bold", fontStyle: "normal", letterSpacing: 0, color: "#c3c3c3" }}>{esp.lang("event/order_detail", "buyer_name")}</Text>
133
- <Text allowFontScaling={false} style={{ fontFamily: "Arial", fontSize: 14, fontWeight: "normal", fontStyle: "normal", letterSpacing: 0, color: "#4a4a4a", marginTop: 4 }} ellipsizeMode='tail'>{item[0].name}</Text>
127
+ <Text allowFontScaling={false} style={{ fontFamily: "Arial", fontSize: 14, fontWeight: "normal", fontStyle: "normal", letterSpacing: 0, color: "#4a4a4a", marginTop: 4 }} ellipsizeMode='tail'>{item?.name}</Text>
134
128
  <Text allowFontScaling={false} style={{ fontFamily: "Arial", fontSize: 10, fontWeight: "bold", fontStyle: "normal", letterSpacing: 0, color: "#c3c3c3", marginTop: 10 }}>{esp.lang("event/order_detail", "phone_number")}</Text>
135
- <Text allowFontScaling={false} style={{ fontFamily: "Arial", fontSize: 14, fontWeight: "normal", fontStyle: "normal", letterSpacing: 0, color: "#4a4a4a", marginTop: 4 }}>{item[0].phone.trim()}</Text>
129
+ <Text allowFontScaling={false} style={{ fontFamily: "Arial", fontSize: 14, fontWeight: "normal", fontStyle: "normal", letterSpacing: 0, color: "#4a4a4a", marginTop: 4 }}>{item?.phone == "" ? "-" : item?.phone.trim()}</Text>
136
130
  </View>
137
131
  </View>
138
- <View style={{ flexDirection: 'row', alignContent: 'center', alignItems: 'center' }}>
139
- <Text allowFontScaling={false} style={{ marginLeft: 6, fontFamily: "Arial", fontSize: 20, fontWeight: "bold", fontStyle: "normal", letterSpacing: 0, color: "#484848" }}>{item.length}</Text>
140
- <Text allowFontScaling={false} style={{ marginLeft: 4, fontFamily: "Arial", fontSize: 16, fontWeight: "normal", fontStyle: "normal", letterSpacing: 0, color: "#484848" }}>{esp.lang("event/order_detail", "ticket")}</Text>
132
+ <View style={{ alignContent: 'center', alignItems: 'center' }}>
133
+ {
134
+ item.hasOwnProperty('seat_name') && item?.seat_name != "" &&
135
+ <View style={{ paddingVertical: 5, paddingHorizontal: 7, borderWidth: 1, borderColor: '#000', backgroundColor: '#fff', borderRadius: 5, marginRight: 7 }}>
136
+ <Text allowFontScaling={false} style={{ fontWeight: 'bold', fontSize: 20, color: '#000' }}>{item.seat_name}</Text>
137
+ </View>
138
+ }
141
139
  </View>
142
140
  </View>
143
141
  )
144
142
  })
145
143
  }
146
-
147
- {
148
- result?.flag?.use_seat == 1 &&
149
- <>
150
- <Text allowFontScaling={false} style={{ fontFamily: "Arial", fontSize: 14, fontWeight: "bold", fontStyle: "normal", letterSpacing: 0, color: "#4a4a4a" }}>{esp.lang("event/order_detail", "seat_number")}</Text>
151
- <View style={{ flexDirection: 'row', flexWrap: 'wrap', marginLeft: -10, padding: 10 }}>
152
- {
153
- result?.tickets?.map((item: any, i: number) => {
154
- return (
155
- <View key={i} style={{ paddingVertical: 5, paddingHorizontal: 7, borderWidth: 1, borderColor: '#000', backgroundColor: '#fff', borderRadius: 5, marginRight: 7 }}>
156
- <Text allowFontScaling={false} style={{ fontWeight: 'bold', fontSize: 20, color: '#000' }}>{item.seat_name}</Text>
157
- </View>
158
- )
159
- })
160
- }
161
- </View>
162
- </>
163
- }
164
144
  </View>
165
145
 
166
146
  {
@@ -178,7 +178,7 @@ export default function m(props: EventOrder_share_toProps): any {
178
178
  selected_ticket: {
179
179
  list: {
180
180
  price_id: result?.price_id,
181
- on_date: result?.ondate,
181
+ ondate: result?.ondate,
182
182
  }
183
183
  }
184
184
  }
package/event/seat.tsx CHANGED
@@ -130,7 +130,6 @@ export default function m(props: EventSeatProps): any {
130
130
  })
131
131
  }
132
132
 
133
-
134
133
  function loadDataSize() {
135
134
  let post = {
136
135
  event_id: dataTicket?.event_id,
@@ -0,0 +1,34 @@
1
+ // // useLibs
2
+
3
+ // import { UserClass } from 'esoftplay/cache/user/class/import';
4
+ // import { useEffect } from 'react';
5
+ // import { CaptureProtection } from 'react-native-capture-protection';
6
+
7
+
8
+ // export interface EventSecure_pageProps {
9
+
10
+ // }
11
+ // export default function m(): any {
12
+ // const can_screencapture = UserClass.state().get('config', 'can_screencapture')
13
+ // // const focus = useIsFocused()
14
+
15
+ // useEffect(() => {
16
+ // let subs: any
17
+ // if (!__DEV__)
18
+ // if (can_screencapture != 1) {
19
+ // CaptureProtection.prevent();
20
+ // // subs = RNPrevent?.addListener?.(() => { })
21
+ // }
22
+ // return () => {
23
+ // if (!__DEV__)
24
+ // if (can_screencapture != 1) {
25
+ // setTimeout(() => {
26
+ // CaptureProtection.allow();
27
+ // }, 500);
28
+ // // subs?.remove?.()
29
+ // }
30
+ // }
31
+ // }, [])
32
+
33
+ // return null
34
+ // }
@@ -0,0 +1,35 @@
1
+ // // useLibs
2
+
3
+ // import { UserClass } from 'esoftplay/cache/user/class/import';
4
+ // import { useEffect } from 'react';
5
+ // import RNPrevent from "react-native-screenshot-prevent";
6
+
7
+ // export interface EventSecure_pageProps {
8
+
9
+ // }
10
+ // export default function m(): any {
11
+ // const can_screencapture = UserClass.state().get('config', 'can_screencapture')
12
+ // // const focus = useIsFocused()
13
+
14
+ // useEffect(() => {
15
+ // let subs: any
16
+ // if (!__DEV__)
17
+ // if (can_screencapture != 1) {
18
+ // RNPrevent?.enabled?.(true)
19
+ // RNPrevent?.enableSecureView?.()
20
+ // // subs = RNPrevent?.addListener?.(() => { })
21
+ // }
22
+ // return () => {
23
+ // if (!__DEV__)
24
+ // if (can_screencapture != 1) {
25
+ // setTimeout(() => {
26
+ // RNPrevent?.disableSecureView?.()
27
+ // RNPrevent?.enabled?.(false)
28
+ // }, 500)
29
+ // // subs?.remove?.()
30
+ // }
31
+ // }
32
+ // }, [])
33
+
34
+ // return null
35
+ // }
@@ -2,7 +2,8 @@
2
2
 
3
3
  import { UserClass } from 'esoftplay/cache/user/class/import';
4
4
  import { useEffect } from 'react';
5
- import RNPrevent from "react-native-screenshot-prevent";
5
+ import { CaptureProtection } from 'react-native-capture-protection';
6
+
6
7
 
7
8
  export interface EventSecure_pageProps {
8
9
 
@@ -15,17 +16,15 @@ export default function m(): any {
15
16
  let subs: any
16
17
  if (!__DEV__)
17
18
  if (can_screencapture != 1) {
18
- RNPrevent?.enabled?.(true)
19
- RNPrevent?.enableSecureView?.()
19
+ CaptureProtection.prevent();
20
20
  // subs = RNPrevent?.addListener?.(() => { })
21
21
  }
22
22
  return () => {
23
23
  if (!__DEV__)
24
24
  if (can_screencapture != 1) {
25
25
  setTimeout(() => {
26
- RNPrevent?.disableSecureView?.()
27
- RNPrevent?.enabled?.(false)
28
- }, 500)
26
+ CaptureProtection.allow();
27
+ }, 500);
29
28
  // subs?.remove?.()
30
29
  }
31
30
  }