esoftplay-event 0.0.2 → 0.0.3

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.
Files changed (100) hide show
  1. package/event/additional.tsx +1 -1
  2. package/event/additional_input.tsx +15 -0
  3. package/event/additional_new.tsx +565 -0
  4. package/event/artist.tsx +14 -34
  5. package/event/artist_detail.tsx +336 -239
  6. package/event/artist_detail_multi.tsx +266 -157
  7. package/event/artist_detailv2.tsx +129 -69
  8. package/event/artistv2.tsx +5 -13
  9. package/event/button.tsx +2 -2
  10. package/event/button_order_detail.tsx +20 -8
  11. package/event/capture.tsx +2 -0
  12. package/event/checkout.ts +135 -0
  13. package/event/countdown.tsx +13 -9
  14. package/event/countdown_base.tsx +88 -48
  15. package/event/countdown_event.tsx +3 -0
  16. package/event/countdown_timestamp.tsx +106 -0
  17. package/event/coupon.tsx +1 -1
  18. package/event/coupon_generate.tsx +35 -22
  19. package/event/detail.tsx +9 -15
  20. package/event/detail2.tsx +63 -61
  21. package/event/dialog_custom.tsx +67 -0
  22. package/event/exchange_ticket_list.tsx +23 -14
  23. package/event/exchange_ticket_result.tsx +1 -1
  24. package/event/firebase_socket.ts +14 -12
  25. package/event/htmltext.tsx +40 -28
  26. package/event/index.tsx +8 -2
  27. package/event/label_input.tsx +2 -2
  28. package/event/layout.tsx +312 -0
  29. package/event/loading_page.tsx +62 -82
  30. package/event/message.tsx +2 -2
  31. package/event/order_detail.tsx +408 -477
  32. package/event/order_detail_addons.tsx +60 -0
  33. package/event/order_detail_addons_booked.tsx +61 -0
  34. package/event/order_detail_coupon.tsx +66 -0
  35. package/event/order_detail_instruction.tsx +96 -0
  36. package/event/order_detail_payment.tsx +1 -1
  37. package/event/order_detail_reschedule.tsx +109 -0
  38. package/event/order_detail_return.tsx +231 -0
  39. package/event/order_detail_review.tsx +174 -0
  40. package/event/order_detail_share.tsx +304 -0
  41. package/event/order_detail_tnc.tsx +76 -0
  42. package/event/order_detail_upgrade.tsx +140 -90
  43. package/event/order_detail_upgrade_payment.tsx +120 -38
  44. package/event/order_detail_visitor.tsx +21 -10
  45. package/event/order_detail_waiting.tsx +3 -3
  46. package/event/order_history.tsx +1 -1
  47. package/event/order_item.tsx +1 -1
  48. package/event/order_lottery.tsx +1 -1
  49. package/event/order_reschedule.tsx +29 -16
  50. package/event/order_share_to.tsx +14 -0
  51. package/event/order_waiting.tsx +1 -1
  52. package/event/payment_subscribe.tsx +18 -0
  53. package/event/point_events.tsx +35 -0
  54. package/event/point_redemption.tsx +101 -0
  55. package/event/point_redemption_exchange.tsx +60 -0
  56. package/event/point_redemption_input.tsx +56 -0
  57. package/event/point_redemption_success.tsx +50 -0
  58. package/event/point_summary.tsx +48 -0
  59. package/event/popup.tsx +4 -4
  60. package/event/queue.tsx +111 -0
  61. package/event/queue_pricing.tsx +17 -6
  62. package/event/review_add.tsx +2 -2
  63. package/event/scan_item.tsx +1 -1
  64. package/event/schedule.tsx +33 -30
  65. package/event/schedule2.tsx +86 -0
  66. package/event/seat.tsx +135 -374
  67. package/event/seat_map.tsx +8 -8
  68. package/event/seat_map_new.tsx +211 -38
  69. package/event/step.tsx +1 -1
  70. package/event/test.tsx +8 -8
  71. package/event/ticket.tsx +326 -0
  72. package/event/ticket_list.tsx +316 -258
  73. package/event/ticket_list2.tsx +349 -224
  74. package/event/ticket_list_item.tsx +61 -0
  75. package/event/ticket_list_new.tsx +710 -0
  76. package/event/tms_add_result.tsx +10 -5
  77. package/event/tms_check_ticket_result.tsx +16 -7
  78. package/event/tms_dashboard.tsx +87 -12
  79. package/event/tms_gate.tsx +32 -15
  80. package/event/tms_home.tsx +178 -92
  81. package/event/tms_idcard.tsx +43 -26
  82. package/event/tms_in.tsx +2 -3
  83. package/event/tms_in_failed.tsx +1 -1
  84. package/event/tms_in_hall.tsx +4 -1
  85. package/event/tms_in_hall_failed.tsx +36 -16
  86. package/event/tms_in_log.tsx +9 -11
  87. package/event/tms_in_success.tsx +13 -8
  88. package/event/tms_log.tsx +16 -17
  89. package/event/tms_out_hall_failed.tsx +1 -1
  90. package/event/tms_out_temporary.tsx +3 -4
  91. package/event/token_order.tsx +103 -0
  92. package/event/token_payment.tsx +79 -0
  93. package/event/visitor_index.tsx +60 -49
  94. package/event/visitor_input.tsx +336 -54
  95. package/event/visitor_inputv2.tsx +173 -88
  96. package/event/voucher.tsx +1 -1
  97. package/id.json +76 -4
  98. package/package.json +1 -1
  99. package/event/secure_page.debug.tsx +0 -34
  100. package/event/secure_page.live.tsx +0 -35
@@ -7,6 +7,8 @@ import { EventCountdownProperty } from 'esoftplay/cache/event/countdown/import';
7
7
  import { EventHeader } from 'esoftplay/cache/event/header/import';
8
8
  import { EventHtmltext } from 'esoftplay/cache/event/htmltext/import';
9
9
  import { EventIndexProperty } from 'esoftplay/cache/event/index/import';
10
+ import { EventOrder_itemProperty } from 'esoftplay/cache/event/order_item/import';
11
+ import { EventQueue } from 'esoftplay/cache/event/queue/import';
10
12
  import { EventShare } from 'esoftplay/cache/event/share/import';
11
13
  import { LibCarrousel } from 'esoftplay/cache/lib/carrousel/import';
12
14
  import { LibCurl } from 'esoftplay/cache/lib/curl/import';
@@ -15,6 +17,7 @@ import { LibLoading } from 'esoftplay/cache/lib/loading/import';
15
17
  import { LibNavigation } from 'esoftplay/cache/lib/navigation/import';
16
18
  import { LibObject } from 'esoftplay/cache/lib/object/import';
17
19
  import { LibPicture } from 'esoftplay/cache/lib/picture/import';
20
+ import { LibScroll } from 'esoftplay/cache/lib/scroll/import';
18
21
  import { LibSlidingup } from 'esoftplay/cache/lib/slidingup/import';
19
22
  import { LibStyle } from 'esoftplay/cache/lib/style/import';
20
23
  import { LibToastProperty } from 'esoftplay/cache/lib/toast/import';
@@ -22,10 +25,11 @@ import { LibUtils } from 'esoftplay/cache/lib/utils/import';
22
25
  import { LibVideoProperty } from 'esoftplay/cache/lib/video/import';
23
26
  import { LibWebview } from 'esoftplay/cache/lib/webview/import';
24
27
  import esp from 'esoftplay/esp';
28
+ import useLazyState from 'esoftplay/lazy';
25
29
  import moment from 'esoftplay/moment';
26
30
  import useSafeState from 'esoftplay/state';
27
31
  import React, { useEffect } from 'react';
28
- import { Pressable, ScrollView, Text, TouchableOpacity, View } from 'react-native';
32
+ import { ActivityIndicator, Pressable, ScrollView, Text, TouchableOpacity, View } from 'react-native';
29
33
 
30
34
 
31
35
  export interface EventArtist_detailProps {
@@ -36,21 +40,40 @@ export default function m(props: EventArtist_detailProps): any {
36
40
  moment().locale('id')
37
41
  let showSchedule = React.useRef<LibSlidingup>(null)
38
42
  const [qty, setQty] = useSafeState<any>(1)
39
- const { data, subscribed } = LibNavigation.getArgsAll(props)
40
- const startBooking = moment(data?.start_booking).serverFormat('YYYY-MM-DD HH:mm:ss')
43
+ const { data, subscribed, url } = LibNavigation.getArgsAll(props)
41
44
  const date = moment().localeFormat('YYYY-MM-DD HH:mm:ss')
42
45
  const [eventConfig] = EventConfigProperty.state().useState()
43
46
 
44
47
  const [selectedTicket, setSelectedTicket, getSelectedTicket] = useSafeState<any>()
45
48
  const [priceList, setPriceList] = useSafeState<any>()
46
49
  const [showAll, setShowAll] = useSafeState<any>({});
50
+ const [loading, setLoading] = useSafeState<boolean>(false)
51
+
52
+ const [result, setResult, getResult] = useLazyState<any>(data)
53
+ const [startBooking, setStartBooking] = useLazyState<any>(moment(getResult()?.start_booking).serverFormat('YYYY-MM-DD HH:mm:ss'))
47
54
 
48
55
  useEffect(() => {
49
- loadDataPrice()
56
+ loadResult()
50
57
  EventConfigProperty.curlConfig('v2/config_order_type')
51
58
  return () => { EventCountdownProperty.releaseQueue.trigger() }
52
59
  }, [])
53
60
 
61
+ function loadResult() {
62
+ if (!url) {
63
+ loadDataPrice(getResult()?.price_list_url)
64
+ } else {
65
+ new LibCurl(url, null, (res, msg) => {
66
+ loadDataPrice(res?.price_list_url)
67
+ setStartBooking(moment(res?.start_booking).serverFormat('YYYY-MM-DD HH:mm:ss'))
68
+ setResult(res)()
69
+ }, (err) => {
70
+ console.log(err)
71
+ LibToastProperty.show(err?.message)
72
+ LibNavigation.back()
73
+ })
74
+ }
75
+ }
76
+
54
77
  function sortByStatus(data: any) {
55
78
  // Fungsi sorting untuk memastikan status 1 di atas, lainnya di bawah
56
79
  const statusSorter = (a: any, b: any) => {
@@ -69,8 +92,8 @@ export default function m(props: EventArtist_detailProps): any {
69
92
  }
70
93
 
71
94
 
72
- function loadDataPrice() {
73
- new LibCurl(data?.price_list_url, null, (res, msg) => {
95
+ function loadDataPrice(price_list_url: string) {
96
+ new LibCurl(price_list_url, null, (res, msg) => {
74
97
 
75
98
  let stop = false
76
99
  let arr = sortByStatus(res)
@@ -101,7 +124,7 @@ export default function m(props: EventArtist_detailProps): any {
101
124
  })
102
125
  }
103
126
 
104
- function proceedToPayment() {
127
+ async function proceedToPayment() {
105
128
  if (!selectedTicket) {
106
129
  if (priceList?.every((v: any) => v?.status == 0)) {
107
130
  LibToastProperty.show(esp.lang("event/artist_detail", "ticket_not_available"))
@@ -114,10 +137,10 @@ export default function m(props: EventArtist_detailProps): any {
114
137
  showSchedule.current?.hide()
115
138
 
116
139
  let dataPost: any = {
117
- event_id: data?.event_id,
118
- event_title: data?.event_title,
119
- charge_payment: data?.charge_payment,
120
- charge_payment_type: data?.charge_payment_type,
140
+ event_id: getResult()?.event_id,
141
+ event_title: getResult()?.event_title,
142
+ charge_payment: getResult()?.charge_payment,
143
+ charge_payment_type: getResult()?.charge_payment_type,
121
144
  selected_ticket: selectedTicket,
122
145
  qty: qty,
123
146
  }
@@ -126,83 +149,95 @@ export default function m(props: EventArtist_detailProps): any {
126
149
  dataPost.adjacent_seats = 1
127
150
  }
128
151
 
129
- if (selectedTicket?.use_seat == 1) {
130
- if (selectedTicket?.config && selectedTicket?.config?.seat_autopick == 1) {
131
- LibNavigation.navigate('payment/ticket', {
132
- order_type: eventConfig?.order_type?.ticket,
133
- tax: getSelectedTicket()?.tax || data?.tax,
134
- dataBookingEvent: { ...dataPost, qty: qty },
135
- subscribed: subscribed
136
- })
137
- } else {
138
- LibNavigation.navigateForResult('event/seat_map_new', {
152
+ let finalDataPost = { ...dataPost }
153
+
154
+ if (getSelectedTicket()?.use_seat == 1) {
155
+ if (getSelectedTicket()?.config?.seat_autopick != 1) {
156
+ const seat = await LibNavigation.navigateForResult('event/seat_map_new', {
139
157
  url: 'event_seat',
140
- dataTicket: dataPost,
141
- }).then((value) => {
142
- dataPost.seat_label = value.seat_label
143
-
144
- if (data?.has_addition && data?.has_addition == 1) {
145
- LibNavigation.navigateForResult('event/additional', { type_ticket: selectedTicket?.type, ondate: selectedTicket?.list?.ondate, event_id: data?.event_id, qty: qty, data: dataPost }, 221).then((additions) => {
146
- if (additions != "") {
147
- dataPost.addition = additions
148
- }
149
- LibNavigation.navigate('payment/ticket', {
150
- order_type: eventConfig?.order_type?.ticket,
151
- tax: getSelectedTicket()?.tax || data?.tax,
152
- dataBookingEvent: dataPost,
153
- fee_platform: {
154
- fee_platform_amount: data?.fee_platform_amount,
155
- fee_platform_type: data?.fee_platform_type,
156
- },
157
- subscribed: subscribed
158
- })
159
- })
160
- } else {
161
- LibNavigation.navigate('payment/ticket', {
162
- order_type: eventConfig?.order_type?.ticket,
163
- tax: getSelectedTicket()?.tax || data?.tax,
164
- dataBookingEvent: dataPost,
165
- fee_platform: {
166
- fee_platform_amount: data?.fee_platform_amount,
167
- fee_platform_type: data?.fee_platform_type,
168
- },
169
- subscribed: subscribed
170
- })
171
- }
158
+ dataTicket: finalDataPost,
172
159
  })
160
+
161
+ finalDataPost = {
162
+ ...finalDataPost,
163
+ seat_label: seat?.seat_label
164
+ }
173
165
  }
174
- } else {
175
- if (selectedTicket?.hasOwnProperty("has_addition") && selectedTicket?.has_addition == 1) {
176
- LibNavigation.navigateForResult('event/additional', { type_ticket: selectedTicket?.type, ondate: selectedTicket?.list?.ondate, event_id: data?.event_id, qty: qty, data: dataPost, price_id: selectedTicket?.price_id }, 221).then((additions) => {
177
- if (additions != "") {
178
- dataPost.addition = additions
179
- }
180
- LibNavigation.navigate('payment/ticket', {
181
- order_type: eventConfig?.order_type?.ticket,
182
- tax: getSelectedTicket()?.tax || data?.tax,
183
- dataBookingEvent: dataPost,
184
- fee_platform: {
185
- fee_platform_amount: data?.fee_platform_amount,
186
- fee_platform_type: data?.fee_platform_type,
187
- },
188
- subscribed: subscribed
189
- })
190
- })
191
- } else {
192
- LibNavigation.navigate('payment/ticket', {
193
- order_type: eventConfig?.order_type?.ticket,
194
- tax: getSelectedTicket()?.tax || data?.tax,
195
- dataBookingEvent: dataPost,
196
- fee_platform: {
197
- fee_platform_amount: data?.fee_platform_amount,
198
- fee_platform_type: data?.fee_platform_type,
199
- },
200
- subscribed: subscribed
201
- })
166
+ }
167
+
168
+ finalDataPost = await handleAdditionIfNeeded(finalDataPost, qty)
169
+ const args = await buildPaymentArgs(finalDataPost, qty)
170
+ LibNavigation.navigate('payment/ticket', args)
171
+ }
172
+
173
+ async function buildPaymentArgs(dataPost: any, qty: number) {
174
+ setLoading(true)
175
+ const conf = await curlPriceConfig(getSelectedTicket()?.price_id)
176
+ setLoading(false)
177
+
178
+ return {
179
+ order_type: eventConfig?.order_type?.ticket,
180
+ tax: conf?.tax ?? getSelectedTicket()?.tax ?? getResult()?.tax ?? 0,
181
+ dataBookingEvent: { ...dataPost, qty },
182
+ subscribed,
183
+ fee_platform: conf?.fee_platform_amount != null
184
+ ? {
185
+ fee_platform_amount: conf.fee_platform_amount || 0,
186
+ fee_platform_type: conf.fee_platform_type || "NONE",
187
+ }
188
+ : {
189
+ fee_platform_amount: getResult()?.fee_platform_amount || 0,
190
+ fee_platform_type: getResult()?.fee_platform_type || "NONE",
191
+ },
192
+ fee_custom: {
193
+ fee_custom_label: conf?.fee_custom_label || "Custom Fee",
194
+ fee_custom_amount: conf?.fee_custom_amount,
195
+ fee_custom_type: conf?.fee_custom_type,
202
196
  }
203
197
  }
204
198
  }
205
199
 
200
+ async function handleAdditionIfNeeded(dataPost: any, qty: number) {
201
+ if (getSelectedTicket()?.has_addition != 1) return dataPost
202
+
203
+ const additions = await LibNavigation.navigateForResult(
204
+ 'event/additional',
205
+ {
206
+ type_ticket: selectedTicket?.type,
207
+ ondate: selectedTicket?.list?.ondate,
208
+ event_id: getResult()?.event_id,
209
+ qty,
210
+ data: dataPost,
211
+ price_id: selectedTicket?.price_id
212
+ },
213
+ 221
214
+ )
215
+
216
+ return additions ? { ...dataPost, addition: additions } : dataPost
217
+ }
218
+
219
+
220
+ function curlPriceConfig(price_id: string): Promise<any> {
221
+ return new Promise((resolve) => {
222
+ if (!getResult()?.url_price_config) {
223
+ resolve({})
224
+ return
225
+ }
226
+
227
+ new LibCurl(
228
+ getResult().url_price_config,
229
+ null,
230
+ (res) => {
231
+ resolve(res?.[price_id] || {})
232
+ },
233
+ (err) => {
234
+ LibToastProperty.show(err?.message)
235
+ resolve({})
236
+ }
237
+ )
238
+ })
239
+ }
240
+
206
241
  function add(): void {
207
242
  let hasQuota = getSelectedTicket().quota > 0
208
243
  const min = hasQuota ? Number(getSelectedTicket()?.quota) - Number(getSelectedTicket()?.quota_used) : Number(getSelectedTicket()?.qty_max)
@@ -212,10 +247,27 @@ export default function m(props: EventArtist_detailProps): any {
212
247
  }
213
248
 
214
249
  function min(): void {
215
- if (qty <= getSelectedTicket()?.qty_min) {
216
- setQty(Number(getSelectedTicket()?.qty_min))
250
+ const currentQty = qty
251
+ const selectedTicket = getSelectedTicket()
252
+
253
+ // kalau qty - 1 <= 0 → set qty 0 dan unselect tiket
254
+ if (currentQty - 1 <= 0) {
255
+ setQty(0)
256
+ setSelectedTicket(null) // atau undefined sesuai project
257
+ return
258
+ }
259
+
260
+ // ambil qty_min dengan cara manual
261
+ let qtyMin = 1 // default
262
+ if (selectedTicket && selectedTicket.qty_min) {
263
+ qtyMin = Number(selectedTicket.qty_min)
264
+ }
265
+
266
+ // kurangi qty tapi tetap patuhi qty_min
267
+ if (currentQty <= qtyMin) {
268
+ setQty(qtyMin)
217
269
  } else {
218
- setQty(qty == 1 ? 1 : qty - 1)
270
+ setQty(currentQty - 1)
219
271
  }
220
272
  }
221
273
 
@@ -224,23 +276,23 @@ export default function m(props: EventArtist_detailProps): any {
224
276
  {
225
277
  icon: 'icons/ic_facebook.png',
226
278
  title: 'Facebook',
227
- onPress: () => { EventShare.facebook(data?.url) }
279
+ onPress: () => { EventShare.facebook(getResult()?.url) }
228
280
  },
229
281
  {
230
282
  icon: 'icons/ic_whatsapp.png',
231
283
  title: 'Whatsapp',
232
- onPress: () => { EventShare.whatsapp(data?.url) }
284
+ onPress: () => { EventShare.whatsapp(getResult()?.url) }
233
285
  },
234
286
  {
235
287
  icon: 'icons/ic_twitter.png',
236
288
  title: 'Twitter',
237
- onPress: () => { EventShare.twitter(data?.url) }
289
+ onPress: () => { EventShare.twitter(getResult()?.url) }
238
290
  },
239
291
  {
240
292
  icon: 'icons/ic_copy.png',
241
293
  title: esp.lang("event/artist_detail", "copy"),
242
294
  onPress: () => {
243
- LibUtils.copyToClipboard(data?.url).then((v) => {
295
+ LibUtils.copyToClipboard(getResult()?.url).then((v) => {
244
296
  LibToastProperty.show(esp.lang("event/artist_detail", "alert"))
245
297
  })
246
298
  }
@@ -287,29 +339,50 @@ export default function m(props: EventArtist_detailProps): any {
287
339
  }
288
340
  }} activeOpacity={itemT?.status == 1 ? 0 : 1} key={iT} style={{ flex: 1, flexDirection: 'row', backgroundColor: colorBackground, justifyContent: 'space-between', padding: 10, alignItems: 'center' }}>
289
341
  {
290
- itemT.ondate == "0000-00-00" ?
291
- <LibPicture source={esp.assets('icons/ic_special2.png')} style={{ height: 42, width: 42 }} />
292
- :
293
- <>
294
- <View style={applyStyle({ marginLeft: 10, marginHorizontal: 20, width: 42, height: 42, borderRadius: 5, backgroundColor: "#fff", borderStyle: "solid", borderWidth: 1, borderColor: _selectedTicket ? "#3ea4dc" : '#999', alignContent: 'center', alignItems: 'center', justifyContent: 'center' })}>
342
+ ticketWithDate ?
343
+ // view untuk yang ada tanggalnya
344
+ <View style={{ flex: 1, flexDirection: 'row', alignContent: 'center', alignItems: 'center', }}>
345
+ <View style={applyStyle({ marginLeft: 10, marginHorizontal: 20, width: 42, height: 42, borderRadius: 5, backgroundColor: colorBackground, borderStyle: "solid", borderWidth: textOpacity, borderColor: _selectedTicket ? "#3ea4dc" : '#999', alignContent: 'center', alignItems: 'center', justifyContent: 'center' })}>
295
346
  <Text allowFontScaling={false} style={applyStyle({ opacity: textOpacity, fontFamily: "Arial", fontSize: 20, fontWeight: "bold", fontStyle: "normal", letterSpacing: 0.23, textAlign: "center", color: _selectedTicket ? "#3ea4dc" : '#999' })}>{LibUtils.moment(itemT.ondate).localeFormat('DD')}</Text>
296
347
  </View>
297
348
  <View style={applyStyle({ flexDirection: 'column', flex: 1 })}>
298
349
  {
299
- item?.status == 1 && itemT?.status != 1 &&
350
+ item?.status == 1 && itemT.status != 1 &&
300
351
  <View style={applyStyle({ flexDirection: 'row', marginBottom: 5 })}>
301
- <View style={applyStyle({ alignContent: 'center', alignItems: 'center', justifyContent: 'center', marginTop: 5, borderWidth: 1, backgroundColor: itemT?.status == 0 ? LibStyle.colorRed : "#4cd964", borderColor: itemT?.status == 0 ? LibStyle.colorRed : "#4cd964", borderRadius: 5, padding: 3, opacity: 0.8 })}>
302
- <Text allowFontScaling={false} style={applyStyle({ fontSize: 10, fontStyle: "normal", letterSpacing: 0, color:/* itemT?.status == 2 ? "#000" : */"#fff", fontWeight: 'bold' })}>{itemT?.status == 0 ? esp.lang("event/artist_detail", "sold_out") : esp.lang("event/artist_detail", "coming_soon")}</Text>
352
+ <View style={applyStyle({ alignContent: 'center', alignItems: 'center', justifyContent: 'center', marginTop: 5, borderWidth: 1, backgroundColor: itemT.status == 0 ? LibStyle.colorRed : "#4cd964", borderColor: itemT.status == 0 ? LibStyle.colorRed : "#4cd964", borderRadius: 5, padding: 3, opacity: 0.8 })}>
353
+ <Text allowFontScaling={false} style={applyStyle({ fontSize: 10, fontStyle: "normal", letterSpacing: 0, color: /* itemT.status == 2 ? "#000" : */ "#fff", fontWeight: 'bold' })}>{itemT.status == 0 ? esp.lang("event/ticket_list", "sold_out") : esp.lang("event/ticket_list", "coming_soon")}</Text>
303
354
  </View>
304
355
  </View>
305
356
  }
306
- <Text allowFontScaling={false} style={applyStyle({ opacity: textOpacity, fontFamily: "Arial", fontSize: 14, fontWeight: "bold", fontStyle: "normal", letterSpacing: 0, color: _selectedTicket ? "#3ea4dc" : '#999' })}>{LibUtils.moment(itemT.ondate).localeFormat('dddd')}</Text>
307
- <View style={applyStyle({ flexDirection: 'row' })}>
308
- <Text allowFontScaling={false} style={applyStyle({ opacity: textOpacity, fontFamily: "Arial", fontSize: 12, fontWeight: "bold", fontStyle: "normal", letterSpacing: 0, color: _selectedTicket ? "#3ea4dc" : '#999' })}>{LibUtils.moment(itemT.ondate).localeFormat('MMMM')}</Text>
309
- <Text allowFontScaling={false} style={applyStyle({ opacity: textOpacity, marginLeft: 7, fontFamily: "Arial", fontSize: 12, fontWeight: "bold", fontStyle: "normal", letterSpacing: 0, color: _selectedTicket ? "#3ea4dc" : '#999' })}>{LibUtils.moment(itemT.ondate).localeFormat('YYYY')}</Text>
310
- </View>
357
+ <>
358
+ <Text allowFontScaling={false} style={applyStyle({ opacity: textOpacity, fontFamily: "Arial", fontSize: 14, fontWeight: "bold", fontStyle: "normal", letterSpacing: 0, color: _selectedTicket ? "#3ea4dc" : '#999' })}>{LibUtils.moment(itemT.ondate).localeFormat('dddd')}</Text>
359
+ <View style={applyStyle({ flexDirection: 'row', alignItems: "center" })}>
360
+ <Text allowFontScaling={false} style={applyStyle({ opacity: textOpacity, fontFamily: "Arial", fontSize: 12, fontWeight: "bold", fontStyle: "normal", letterSpacing: 0, color: _selectedTicket ? "#3ea4dc" : '#999' })}>{LibUtils.moment(itemT.ondate).localeFormat('MMMM')}</Text>
361
+ <Text allowFontScaling={false} style={applyStyle({ opacity: textOpacity, marginLeft: 5, fontFamily: "Arial", fontSize: 12, fontWeight: "bold", fontStyle: "normal", letterSpacing: 0, color: _selectedTicket ? "#3ea4dc" : '#999' })}>{LibUtils.moment(itemT.ondate).localeFormat('YYYY')}</Text>
362
+ </View>
363
+ </>
311
364
  </View>
312
- </>
365
+ </View>
366
+ :
367
+ // view untuk yang undangan dan khusus
368
+ <View style={{ flex: 1, flexDirection: 'row', alignContent: 'center', alignItems: 'center' }}>
369
+ <LibPicture source={esp.assets('icons/ic_special2.png')} style={{ height: 42, width: 42 }} />
370
+ <View style={{ marginLeft: 14, flex: 1 }} >
371
+ {
372
+ item?.status == 1 && itemT.status != 1 &&
373
+ <View style={applyStyle({ flexDirection: 'row', marginBottom: 5 })}>
374
+ <View style={applyStyle({ alignContent: 'center', alignItems: 'center', justifyContent: 'center', marginTop: 5, borderWidth: 1, backgroundColor: itemT.status == 0 ? LibStyle.colorRed : LibStyle.colorPrimary, borderColor: itemT.status == 0 ? LibStyle.colorRed : LibStyle.colorPrimary, borderRadius: 5, padding: 3, opacity: 0.8 })}>
375
+ <Text allowFontScaling={false} style={applyStyle({ fontSize: 10, fontStyle: "normal", letterSpacing: 0, color: "#fff", fontWeight: 'bold' })}>{itemT.status == 0 ? esp.lang("event/ticket_list", "sold_out") : esp.lang("event/ticket_list", "coming_soon")}</Text>
376
+ </View>
377
+ </View>
378
+ }
379
+ {/* <Text allowFontScaling={false} style={{ fontFamily: "Arial", fontSize: 14, fontWeight: "bold", fontStyle: "normal", letterSpacing: 0, color: _selectedTicket ? "#3ea4dc" : '#999' }}>{item.type}</Text> */}
380
+ {
381
+ item.info != "" &&
382
+ <EventHtmltext allowFontScaling={false} style={{ flexWrap: 'wrap', fontFamily: "Arial", fontSize: 11, fontStyle: "normal", letterSpacing: 0, color: _selectedTicket ? "#3ea4dc" : '#999' }}>{item.info}</EventHtmltext>
383
+ }
384
+ </View>
385
+ </View>
313
386
  }
314
387
 
315
388
  <View style={applyStyle({ marginRight: 5, marginLeft: 5, flexDirection: 'column' })} >
@@ -321,13 +394,13 @@ export default function m(props: EventArtist_detailProps): any {
321
394
  item?.status == 1 && (ticketWithDate || ticketSpecial) && _selectedTicket &&
322
395
  <View style={applyStyle({ marginTop: 4, flexDirection: 'row', marginLeft: 8, alignContent: 'center', alignItems: 'center' })}>
323
396
  <TouchableOpacity onPress={() => { min() }}>
324
- <View style={applyStyle({ width: 28, height: 28, borderRadius: 6, backgroundColor: "#ecf0f1", alignContent: 'center', alignItems: 'center' })}>
397
+ <View style={applyStyle({ width: 28, height: 28, borderRadius: 6, backgroundColor: "#ecf0f1", justifyContent: 'center', alignContent: 'center', alignItems: 'center' })}>
325
398
  <LibIcon name="minus" color="#e74c3c" />
326
399
  </View>
327
400
  </TouchableOpacity>
328
401
  <Text style={applyStyle({ fontFamily: "Arial", fontSize: 20, fontWeight: "bold", fontStyle: "normal", letterSpacing: 0, color: "#9b9b9b", marginLeft: 13, marginRight: 13 })}>{qty}</Text>
329
402
  <TouchableOpacity onPress={() => { add() }}>
330
- <View style={applyStyle({ width: 28, height: 28, borderRadius: 6, backgroundColor: "#ecf0f1", alignContent: 'center', alignItems: 'center' })}>
403
+ <View style={applyStyle({ width: 28, height: 28, borderRadius: 6, backgroundColor: "#ecf0f1", justifyContent: 'center', alignContent: 'center', alignItems: 'center' })}>
331
404
  <LibIcon name="plus" color="#16a085" />
332
405
  </View>
333
406
  </TouchableOpacity>
@@ -347,7 +420,7 @@ export default function m(props: EventArtist_detailProps): any {
347
420
  function renderImages(item: any, i: number) {
348
421
  const styleId_Z1ecB7O: any = { height: bgHeight, width: LibStyle.width, resizeMode: 'cover' }
349
422
  return (
350
- <TouchableOpacity key={i} onPress={() => LibNavigation.navigate('lib/gallery', { images: data?.images_artist, index: i })}>
423
+ <TouchableOpacity key={i} onPress={() => LibNavigation.navigate('lib/gallery', { images: getResult()?.images_artist, index: i })}>
351
424
  <LibPicture source={{ uri: item.image }} style={styleId_Z1ecB7O} />
352
425
  </TouchableOpacity>
353
426
  )
@@ -362,158 +435,182 @@ export default function m(props: EventArtist_detailProps): any {
362
435
  };
363
436
 
364
437
  return (
365
- <View style={{ flex: 1 }} >
366
- <EventHeader title={esp.lang("event/artist_detail", "title")} subtitle={data?.title} />
367
- <ScrollView>
368
- {
369
- data?.images_artist && data?.images_artist?.length > 0 ?
370
- <LibCarrousel
371
- delay={3000}
372
- style={{ height: bgHeight, width: LibStyle.width }}
373
- autoplay
374
- bullets
375
- bulletStyle={{ width: 7, height: 7, backgroundColor: "#fff", borderRadius: 3.5, borderWidth: 0, marginHorizontal: 2 }}
376
- chosenBulletStyle={{ width: 7, height: 7, backgroundColor: "#f4e31b", borderRadius: 3.5, borderWidth: 0, marginHorizontal: 2 }}
377
- bulletsContainerStyle={{ marginBottom: -10 }}>
378
- {
379
- data?.images_artist && data?.images_artist?.map(renderImages)
380
- }
381
- </LibCarrousel>
382
- :
383
- <Pressable onPress={() => LibNavigation.navigate('lib/gallery', { image: data?.image_artist })} >
384
- <LibPicture
385
- style={applyStyle({ height: LibStyle.width * 9 / 16, width: LibStyle.width, backgroundColor: '#f2f3f4' })}
386
- source={{ uri: data?.image_artist }} />
387
- </Pressable>
388
- }
389
- <View style={applyStyle({ marginTop: 10, marginLeft: 17, flexDirection: 'row' })}>
438
+ <EventQueue event_id={result?.event_id}>
439
+ <View style={{ flex: 1 }} >
440
+ <EventHeader title={esp.lang("event/artist_detail", "title")} subtitle={result?.title} />
441
+ <LibScroll onRefresh={loadResult}>
390
442
  {
391
- share.map(renderShare)
443
+ result && result?.images_artist && result?.images_artist?.length > 0 ?
444
+ <LibCarrousel
445
+ delay={3000}
446
+ style={{ height: bgHeight, width: LibStyle.width }}
447
+ autoplay
448
+ bullets
449
+ bulletStyle={{ width: 7, height: 7, backgroundColor: "#fff", borderRadius: 3.5, borderWidth: 0, marginHorizontal: 2 }}
450
+ chosenBulletStyle={{ width: 7, height: 7, backgroundColor: "#f4e31b", borderRadius: 3.5, borderWidth: 0, marginHorizontal: 2 }}
451
+ bulletsContainerStyle={{ marginBottom: -10 }}>
452
+ {
453
+ result?.images_artist && result?.images_artist?.map(renderImages)
454
+ }
455
+ </LibCarrousel>
456
+ :
457
+ <Pressable onPress={() => LibNavigation.navigate('lib/gallery', { image: result?.image_artist })} >
458
+ <LibPicture
459
+ style={applyStyle({ height: LibStyle.width * 9 / 16, width: LibStyle.width, backgroundColor: '#f2f3f4' })}
460
+ source={{ uri: result?.image_artist }} />
461
+ </Pressable>
392
462
  }
393
- </View>
394
- <Text allowFontScaling={false} style={applyStyle({ marginBottom: 12, marginLeft: 17, fontFamily: "Arial", marginTop: 20, fontSize: 26, fontWeight: "bold", fontStyle: "normal", lineHeight: 30, letterSpacing: 0, color: "#000" })}>{data?.title}</Text>
395
- {/* {
463
+ <View style={applyStyle({ marginTop: 10, marginLeft: 17, flexDirection: 'row' })}>
464
+ {
465
+ share.map(renderShare)
466
+ }
467
+ </View>
468
+ <Text allowFontScaling={false} style={applyStyle({ marginBottom: 12, marginLeft: 17, fontFamily: "Arial", marginTop: 20, fontSize: 26, fontWeight: "bold", fontStyle: "normal", lineHeight: 30, letterSpacing: 0, color: "#000" })}>{result?.title}</Text>
469
+ {/* {
396
470
  data && priceList?.map?.(renderPrieList)
397
471
  } */}
398
- {
399
- data?.description != "" &&
400
- <ScrollView>
401
- <LibWebview onFinishLoad={() => { }} source={{ html: data?.description }} />
402
- </ScrollView>
403
- }
404
- {
405
- data && data?.youtube != "" &&
406
- <>
407
- <Text allowFontScaling={false} style={applyStyle({ marginHorizontal: 20, marginTop: 10, fontFamily: "Arial", fontSize: 13, fontWeight: "bold", fontStyle: "normal", lineHeight: 22, letterSpacing: 0, color: "#4a4a4a" })} >{esp.lang("event/artist_detail", "video")}</Text>
408
- <TouchableOpacity onPress={() => LibNavigation.navigate('lib/video', { code: data?.youtube })} >
409
- <LibPicture source={{ uri: LibVideoProperty.getUrlThumbnail(data?.youtube) }} style={applyStyle({ height: LibStyle.width * 9 / 16, width: LibStyle.width - 40, marginHorizontal: 20, resizeMode: 'cover' })} />
410
- </TouchableOpacity>
411
- </>
412
- }
413
- </ScrollView>
414
- <View style={applyStyle({ flexDirection: 'row', padding: 10, backgroundColor: 'white' })} >
472
+ {
473
+ result?.description != "" &&
474
+ <ScrollView>
475
+ <LibWebview onFinishLoad={() => { }} source={{ html: getResult()?.description }} />
476
+ </ScrollView>
477
+ }
478
+ {
479
+ result && result?.youtube != "" &&
480
+ <>
481
+ <Text allowFontScaling={false} style={applyStyle({ marginHorizontal: 20, marginTop: 10, fontFamily: "Arial", fontSize: 13, fontWeight: "bold", fontStyle: "normal", lineHeight: 22, letterSpacing: 0, color: "#4a4a4a" })} >{esp.lang("event/artist_detail", "video")}</Text>
482
+ <TouchableOpacity onPress={() => LibNavigation.navigate('lib/video', { code: getResult()?.youtube })} >
483
+ <LibPicture source={{ uri: LibVideoProperty.getUrlThumbnail(getResult()?.youtube) }} style={applyStyle({ height: LibStyle.width * 9 / 16, width: LibStyle.width - 40, marginHorizontal: 20, resizeMode: 'cover' })} />
484
+ </TouchableOpacity>
485
+ </>
486
+ }
487
+ </LibScroll>
488
+ <View style={applyStyle({ flexDirection: 'row', padding: 10, backgroundColor: 'white' })} >
415
489
 
416
- {
417
- data?.book_available == 1 ?
418
- <EventButton label={esp.lang("event/artist_detail", "buy_ticket")} onPress={() => {
419
- EventIndexProperty.isLogin(() => {
420
- showSchedule.current?.show()
421
- })
422
- }} style={applyStyle({ backgroundColor: LibStyle.colorGreen })} />
423
- :
424
- <View style={applyStyle({ flex: 1, height: 35, borderRadius: 17, backgroundColor: LibStyle.colorLightGrey, justifyContent: 'center', alignItems: 'center', paddingHorizontal: 9 })} >
425
- <Text allowFontScaling={false} style={applyStyle({ fontFamily: "ArialBold", fontSize: 12, textAlign: "center", textAlignVertical: 'center', color: 'black', marginRight: 10, marginLeft: 10 })} >{esp.lang("event/artist_detail", "book_available", moment(startBooking).serverFormat("DD MMMM YYYY HH:mm:ss"))}</Text>
426
- </View>
427
- }
428
- </View>
490
+ {
491
+ result?.book_available == 1 ?
492
+ <EventButton label={esp.lang("event/artist_detail", "buy_ticket")} onPress={() => {
493
+ EventIndexProperty.isLogin(() => {
494
+ showSchedule.current?.show()
495
+ })
496
+ }} style={applyStyle({ backgroundColor: LibStyle.colorGreen })} />
497
+ :
498
+ <View style={applyStyle({ flex: 1, height: 35, borderRadius: 17, backgroundColor: LibStyle.colorLightGrey, justifyContent: 'center', alignItems: 'center', paddingHorizontal: 9 })} >
499
+ <Text allowFontScaling={false} style={applyStyle({ fontFamily: "ArialBold", fontSize: 12, textAlign: "center", textAlignVertical: 'center', color: 'black', marginRight: 10, marginLeft: 10 })} >{esp.lang("event/artist_detail", "book_available", moment(startBooking).serverFormat("DD MMMM YYYY HH:mm:ss"))}</Text>
500
+ </View>
501
+ }
502
+ </View>
429
503
 
430
- <LibSlidingup ref={showSchedule}>
431
- <View style={applyStyle({ backgroundColor: 'white', borderTopRightRadius: 30, borderTopLeftRadius: 30, paddingTop: 15, maxHeight: LibStyle.height - (LibStyle.height / 3) })}>
432
- <Text allowFontScaling={false} style={applyStyle({ marginBottom: 15, fontFamily: "Arial", fontSize: 16, fontWeight: "bold", fontStyle: "normal", lineHeight: 22, letterSpacing: 0, textAlign: "center", color: "#34495e" })}>{esp.lang("event/artist_detail", "select_date")}</Text>
433
- <ScrollView showsVerticalScrollIndicator={false} >
434
- {
435
- priceList?.length > 0 && sortByStatus(priceList)?.map((item: any, i: number) => {
436
- let filterFullData = priceList?.filter((it: any) => it.status != 0)
437
- const displayedData = showAll[item.price_id] ? item?.list : item?.list.slice(0, maxDisplay);
438
-
439
- let textOpacity = item?.status == 1 ? 1 : 0.3
440
- let selTic = item.price_id == selectedTicket?.price_id
441
- return (
442
- <Pressable onPress={() => {
443
-
444
- }} key={i} style={{ overflow: 'hidden', margin: 15, marginBottom: 5, backgroundColor: '#fff', borderRadius: 10, ...LibStyle.elevation(2), borderWidth: 1, borderColor: selTic ? LibStyle.colorBlue : LibStyle.colorBgGrey }}>
445
- <View style={{ padding: 10, backgroundColor: '#f1f2f3', borderTopLeftRadius: 10, borderTopRightRadius: 10 }}>
446
- <View style={{ alignContent: 'center', alignItems: 'center', flexDirection: 'row', justifyContent: 'space-between', }}>
447
- <EventHtmltext allowFontScaling={false} style={{ opacity: textOpacity, fontWeight: 'bold' }}>{item.type}</EventHtmltext>
448
- {
449
- item.qty_min > 1 &&
450
- <Text style={{ color: LibStyle.colorRed, fontSize: 10, fontWeight: 'normal' }}> {"(" + esp.lang("event/ticket_list", "min_order") + LibUtils.number(item.qty_min) + ")"}</Text>
451
- }
504
+ <LibSlidingup ref={showSchedule}>
505
+ <View style={applyStyle({ backgroundColor: 'white', borderTopRightRadius: 30, borderTopLeftRadius: 30, paddingTop: 15, maxHeight: LibStyle.height - (LibStyle.height / 3) })}>
506
+ <Text allowFontScaling={false} style={applyStyle({ marginBottom: 15, fontFamily: "Arial", fontSize: 16, fontWeight: "bold", fontStyle: "normal", lineHeight: 22, letterSpacing: 0, textAlign: "center", color: "#34495e" })}>{esp.lang("event/artist_detail", "select_date")}</Text>
507
+ <ScrollView showsVerticalScrollIndicator={false} >
508
+ {
509
+ priceList?.length > 0 && sortByStatus(priceList)?.map((item: any, i: number) => {
510
+ let filterFullData = priceList?.filter((it: any) => it.status != 0)
511
+ const displayedData = showAll[item.price_id] ? item?.list : item?.list.slice(0, maxDisplay);
512
+
513
+ let textOpacity = item?.status == 1 ? 1 : 0.3
514
+ let selTic = item.price_id == selectedTicket?.price_id
515
+ let ticketWithDate = item.price_date == 1 && item.use_code == 0
516
+ return (
517
+ <Pressable onPress={() => {
518
+
519
+ }} key={i} style={{ overflow: 'hidden', margin: 15, marginBottom: 5, backgroundColor: '#fff', borderRadius: 10, ...LibStyle.elevation(2), borderWidth: 1, borderColor: selTic ? LibStyle.colorBlue : LibStyle.colorBgGrey }}>
520
+ <View style={{ padding: 10, backgroundColor: '#f1f2f3', borderTopLeftRadius: 10, borderTopRightRadius: 10 }}>
452
521
  {
453
- item?.status != 1 &&
522
+ item?.hasOwnProperty('label') && (item?.label != "" && item?.label != null) &&
454
523
  <View style={applyStyle({ flexDirection: 'row' })}>
455
- <View style={applyStyle({ alignContent: 'center', alignItems: 'center', justifyContent: 'center', borderWidth: 1, backgroundColor: item?.status == 0 ? LibStyle.colorRed : "#4cd964", borderColor: item?.status == 0 ? LibStyle.colorRed : "#4cd964", borderRadius: 5, padding: 3, opacity: 0.8 })}>
456
- <Text allowFontScaling={false} style={applyStyle({ fontSize: 10, fontStyle: "normal", letterSpacing: 0, color: /* item?.status == 2 ? "#000" : */ "#fff", fontWeight: 'bold' })}>{item?.status == 0 ? esp.lang("event/artist_detail", "sold_out") : esp.lang("event/artist_detail", "coming_soon")}</Text>
524
+ <View style={applyStyle({ alignContent: 'center', alignItems: 'center', justifyContent: 'center', borderWidth: 1, backgroundColor: item?.label_color, borderColor: item?.label_color, borderRadius: 3, padding: 2, paddingHorizontal: 5, opacity: 1 })}>
525
+ <Text allowFontScaling={false} style={{ fontSize: 10, fontStyle: "normal", letterSpacing: 0.5, color: EventOrder_itemProperty.textColor(item?.label_color), fontWeight: 'bold' }}>{item?.label}</Text>
526
+ </View>
527
+ </View>
528
+ }
529
+ <View style={{ alignContent: 'center', alignItems: 'center', flexDirection: 'row', justifyContent: 'space-between', }}>
530
+ <View style={{ flex: 5 }}>
531
+ <EventHtmltext allowFontScaling={false} style={{ flexWrap: 'wrap', opacity: textOpacity, fontWeight: 'bold' }}>{item.type}</EventHtmltext>
532
+ </View>
533
+ {
534
+ item.qty_min > 1 &&
535
+ <Text style={{ flex: 1, color: LibStyle.colorRed, textAlign: 'right', fontSize: 10, fontWeight: 'normal' }}> {"(" + esp.lang("event/ticket_list", "min_order") + LibUtils.number(item.qty_min) + ")"}</Text>
536
+ }
537
+ {
538
+ item?.status != 1 &&
539
+ <View style={applyStyle({ marginLeft: 10, flexDirection: 'row' })}>
540
+ <View style={applyStyle({ alignContent: 'center', alignItems: 'center', justifyContent: 'center', borderWidth: 1, backgroundColor: item?.status == 0 ? LibStyle.colorRed : "#4cd964", borderColor: item?.status == 0 ? LibStyle.colorRed : "#4cd964", borderRadius: 5, padding: 3, opacity: 0.8 })}>
541
+ <Text allowFontScaling={false} style={applyStyle({ fontSize: 10, fontStyle: "normal", letterSpacing: 0, color: /* item?.status == 2 ? "#000" : */ "#fff", fontWeight: 'bold' })}>{item?.status == 0 ? esp.lang("event/artist_detail", "sold_out") : esp.lang("event/artist_detail", "coming_soon")}</Text>
542
+ </View>
457
543
  </View>
544
+ }
545
+ </View>
546
+ {
547
+ item.info != "" && ticketWithDate &&
548
+ <View style={{ marginTop: 3, alignContent: 'center', alignItems: 'center', flexDirection: 'row', marginRight: 5 }}>
549
+ <Text allowFontScaling={false} style={{ fontSize: 12, color: LibStyle.colorBlue }}>{item.info}</Text>
458
550
  </View>
459
551
  }
460
552
  </View>
461
553
  {
462
- item.info != "" &&
463
- <View style={{ marginTop: 3, alignContent: 'center', alignItems: 'center', flexDirection: 'row', marginRight: 5 }}>
464
- <Text allowFontScaling={false} style={{ fontSize: 12, color: LibStyle.colorBlue }}>{item.info}</Text>
465
- </View>
554
+ displayedData?.map((itemT: any, iT: number) => renderItem(item, itemT, iT))
466
555
  }
467
- </View>
468
- {
469
- displayedData?.map((itemT: any, iT: number) => renderItem(item, itemT, iT))
470
- }
471
556
 
557
+ {
558
+ filterFullData?.[i]?.list?.length > 3 &&
559
+ <TouchableOpacity onPress={() => {
560
+ handleShowAll(item.price_id)
561
+ }} style={{ borderTopColor: LibStyle.colorGrey, borderTopWidth: 0.8, flex: 1, padding: 8, flexDirection: 'row', alignContent: 'center', alignItems: 'center', justifyContent: 'center' }}>
562
+ <Text allowFontScaling={false} style={{ marginRight: 5, fontFamily: "Arial", fontSize: 12, fontWeight: "bold", fontStyle: "normal", letterSpacing: 0, color: LibStyle.colorBlue }}>{showAll[item.price_id] ? esp.lang("event/ticket_list", "see_less") : esp.lang("event/ticket_list", "see_more")}</Text>
563
+ <LibIcon name={showAll[item.price_id] ? 'chevron-up-circle-outline' : 'chevron-down-circle-outline'} color={LibStyle.colorBlue} size={18} />
564
+ </TouchableOpacity>
565
+ }
566
+
567
+ </Pressable>
568
+ )
569
+ })
570
+ }
571
+ </ScrollView>
572
+ <View style={applyStyle({ paddingVertical: 10 })} >
573
+ {
574
+ result?.price_type_info != "" &&
575
+ <Text allowFontScaling={false} style={applyStyle({ marginLeft: 15, marginBottom: 10, fontFamily: "Arial", fontSize: 13, fontWeight: "bold", fontStyle: "normal", letterSpacing: 0, color: LibStyle.colorBlue })} >{result?.hasOwnProperty("price_type_info") && result?.price_type_info}</Text>
576
+ }
577
+ {
578
+ result?.book_available == 1 ?
579
+ <>
472
580
  {
473
- filterFullData?.[i]?.list?.length > 3 &&
474
- <TouchableOpacity onPress={() => {
475
- handleShowAll(item.price_id)
476
- }} style={{ borderTopColor: LibStyle.colorGrey, borderTopWidth: 0.8, flex: 1, padding: 8, flexDirection: 'row', alignContent: 'center', alignItems: 'center', justifyContent: 'center' }}>
477
- <Text allowFontScaling={false} style={{ marginRight: 5, fontFamily: "Arial", fontSize: 12, fontWeight: "bold", fontStyle: "normal", letterSpacing: 0, color: LibStyle.colorBlue }}>{showAll[item.price_id] ? esp.lang("event/ticket_list", "see_less") : esp.lang("event/ticket_list", "see_more")}</Text>
478
- <LibIcon name={showAll[item.price_id] ? 'chevron-up-circle-outline' : 'chevron-down-circle-outline'} color={LibStyle.colorBlue} size={18} />
479
- </TouchableOpacity>
581
+ result?.book_available == 0 && result.end_booking <= date && result.end_booking != '0000-00-00 00:00:00' ?
582
+ <View style={applyStyle({ flex: 1, height: 35, borderRadius: 17, backgroundColor: LibStyle.colorLightGrey, justifyContent: 'center', alignItems: 'center', paddingHorizontal: 9 })} >
583
+ <Text allowFontScaling={false} style={applyStyle({ fontFamily: "ArialBold", fontSize: 12, textAlign: "center", textAlignVertical: 'center', color: 'black', marginHorizontal: 10 })} >{esp.lang("event/artist_detail", "booking_end")}</Text>
584
+ </View>
585
+ :
586
+ <>
587
+ {
588
+ loading ?
589
+ <View style={{ minWidth: '100%', alignSelf: 'center' }} >
590
+ <View style={{ borderWidth: 1, borderColor: 'rgba(0, 0, 0, 0)', height: 40, borderRadius: 16, backgroundColor: "#e6e6e6", alignItems: 'center', justifyContent: 'center', paddingHorizontal: 9 }} >
591
+ <ActivityIndicator size={"small"} color={LibStyle.colorPrimary} />
592
+ </View>
593
+ </View>
594
+ :
595
+ <EventButton label={esp.lang("event/artist_detail", "buy_ticket")} onPress={() => {
596
+ EventIndexProperty.isLogin(() => {
597
+ proceedToPayment()
598
+ })
599
+ }} style={{ backgroundColor: LibStyle.colorGreen, marginTop: 2, marginHorizontal: 15 }} />
600
+ }
601
+ </>
480
602
  }
481
-
482
- </Pressable>
483
- )
484
- })
485
- }
486
- </ScrollView>
487
- <View style={applyStyle({ paddingVertical: 10 })} >
488
- {
489
- data?.price_type_info != "" &&
490
- <Text allowFontScaling={false} style={applyStyle({ marginLeft: 15, marginBottom: 10, fontFamily: "Arial", fontSize: 13, fontWeight: "bold", fontStyle: "normal", letterSpacing: 0, color: LibStyle.colorBlue })} >{data?.hasOwnProperty("price_type_info") && data?.price_type_info}</Text>
491
- }
492
- {
493
- data?.book_available == 1 ?
494
- <>
495
- {
496
- data?.book_available == 0 && data.end_booking <= date && data.end_booking != '0000-00-00 00:00:00' ?
497
- <View style={applyStyle({ flex: 1, height: 35, borderRadius: 17, backgroundColor: LibStyle.colorLightGrey, justifyContent: 'center', alignItems: 'center', paddingHorizontal: 9 })} >
498
- <Text allowFontScaling={false} style={applyStyle({ fontFamily: "ArialBold", fontSize: 12, textAlign: "center", textAlignVertical: 'center', color: 'black', marginHorizontal: 10 })} >{esp.lang("event/artist_detail", "booking_end")}</Text>
499
- </View>
500
- :
501
- <EventButton label={esp.lang("event/artist_detail", "buy_ticket")} onPress={() => {
502
- EventIndexProperty.isLogin(() => {
503
- proceedToPayment()
504
- })
505
- }} style={{ backgroundColor: LibStyle.colorGreen, marginTop: 2, marginHorizontal: 15 }} />
506
- }
507
- </>
508
- :
509
- <View style={applyStyle({ flex: 1, height: 35, borderRadius: 17, backgroundColor: LibStyle.colorLightGrey, justifyContent: 'center', alignItems: 'center', paddingHorizontal: 9 })} >
510
- <Text allowFontScaling={false} style={applyStyle({ fontFamily: "ArialBold", fontSize: 12, textAlign: "center", textAlignVertical: 'center', color: 'black', marginHorizontal: 10 })} >{esp.lang("event/artist_detail", "booking_on", moment(data?.start_booking).serverFormat('DD MMMM YYYY HH:mm '))}</Text>
511
- </View>
512
- }
603
+ </>
604
+ :
605
+ <View style={applyStyle({ flex: 1, height: 35, borderRadius: 17, backgroundColor: LibStyle.colorLightGrey, justifyContent: 'center', alignItems: 'center', paddingHorizontal: 9 })} >
606
+ <Text allowFontScaling={false} style={applyStyle({ fontFamily: "ArialBold", fontSize: 12, textAlign: "center", textAlignVertical: 'center', color: 'black', marginHorizontal: 10 })} >{esp.lang("event/artist_detail", "booking_on", moment(result?.start_booking).serverFormat('DD MMMM YYYY HH:mm '))}</Text>
607
+ </View>
608
+ }
609
+ </View>
513
610
  </View>
514
- </View>
515
- </LibSlidingup>
611
+ </LibSlidingup>
516
612
 
517
- </View>
613
+ </View>
614
+ </EventQueue>
518
615
  )
519
616
  }