esoftplay-event 0.0.0-a → 0.0.0-b

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 (172) hide show
  1. package/event/additional.tsx +4 -4
  2. package/event/additional_input.tsx +11 -11
  3. package/event/alert.tsx +32 -0
  4. package/event/artist.tsx +166 -0
  5. package/event/artist_detail.tsx +520 -0
  6. package/event/artist_detail_multi.tsx +548 -0
  7. package/event/badge.tsx +22 -0
  8. package/event/button.tsx +40 -0
  9. package/event/config.ts +4 -0
  10. package/event/countdown.tsx +5 -5
  11. package/event/countdown_base.tsx +83 -0
  12. package/event/counter_cashier.tsx +11 -11
  13. package/event/counter_cashier_report.tsx +6 -6
  14. package/event/counter_cashier_sell.tsx +7 -7
  15. package/event/counter_eo.tsx +19 -19
  16. package/event/counter_history.tsx +4 -4
  17. package/event/counter_lm.tsx +16 -16
  18. package/event/counter_report.tsx +4 -4
  19. package/event/counter_report_breakdown.tsx +2 -2
  20. package/event/counter_report_detail.tsx +12 -12
  21. package/event/counter_report_detail_list.tsx +4 -4
  22. package/event/counter_request.tsx +4 -4
  23. package/event/counter_request_detail.tsx +6 -6
  24. package/event/counter_send.tsx +6 -6
  25. package/event/counter_user_list.tsx +13 -13
  26. package/event/coupon.tsx +4 -4
  27. package/event/coupon_claim.tsx +4 -4
  28. package/event/coupon_claim_detail.tsx +8 -7
  29. package/event/coupon_claim_history.tsx +9 -9
  30. package/event/coupon_claim_reimburse.tsx +7 -8
  31. package/event/coupon_claim_reimburse_history.tsx +4 -4
  32. package/event/coupon_claim_reimburse_history_detail.tsx +4 -4
  33. package/event/coupon_claim_staff.tsx +10 -10
  34. package/event/coupon_detail.tsx +3 -3
  35. package/event/coupon_event_list.tsx +4 -4
  36. package/event/coupon_generate.tsx +4 -4
  37. package/event/coupon_generate_event.tsx +4 -4
  38. package/event/coupon_generate_list.tsx +2 -2
  39. package/event/date_picker.tsx +5 -5
  40. package/event/detail.tsx +12 -15
  41. package/event/entrance.tsx +17 -17
  42. package/event/entrance_again.tsx +22 -23
  43. package/event/entrance_failed.tsx +15 -15
  44. package/event/entrance_idcard.tsx +23 -23
  45. package/event/entrance_list.tsx +24 -24
  46. package/event/entrance_list_item.tsx +6 -6
  47. package/event/entrance_log.tsx +24 -24
  48. package/event/entrance_success.tsx +8 -8
  49. package/event/entrance_warning.tsx +14 -14
  50. package/event/exchange_reward.tsx +2 -2
  51. package/event/exchange_reward_result.tsx +7 -8
  52. package/event/exchange_ticket.tsx +11 -12
  53. package/event/exchange_ticket_list.tsx +10 -12
  54. package/event/exchange_ticket_result.tsx +11 -12
  55. package/event/exit.tsx +9 -9
  56. package/event/exit_failed.tsx +12 -12
  57. package/event/exit_list.tsx +15 -15
  58. package/event/exit_log.tsx +22 -22
  59. package/event/exit_success.tsx +8 -8
  60. package/event/exit_temporary.tsx +21 -21
  61. package/event/expander.tsx +36 -0
  62. package/event/fab.tsx +24 -0
  63. package/event/firebase_socket.ts +365 -0
  64. package/event/hall_in.tsx +13 -13
  65. package/event/hall_in_failed.tsx +22 -22
  66. package/event/hall_in_list.tsx +17 -17
  67. package/event/hall_in_log.tsx +24 -24
  68. package/event/hall_in_success.tsx +8 -8
  69. package/event/hall_out.tsx +13 -13
  70. package/event/hall_out_failed.tsx +11 -11
  71. package/event/hall_out_list.tsx +17 -17
  72. package/event/hall_out_log.tsx +24 -24
  73. package/event/hall_out_success.tsx +8 -8
  74. package/event/header.tsx +119 -0
  75. package/event/label_input.tsx +23 -0
  76. package/event/list.tsx +20 -21
  77. package/event/list_filter.tsx +12 -13
  78. package/event/list_item.tsx +76 -0
  79. package/event/list_item2.tsx +78 -0
  80. package/event/loading_page.tsx +248 -0
  81. package/event/log.tsx +54 -54
  82. package/event/message.tsx +32 -0
  83. package/event/order.tsx +323 -0
  84. package/event/order_detail.tsx +813 -0
  85. package/event/order_detail_payment.tsx +153 -0
  86. package/event/order_detail_upgrade.tsx +164 -0
  87. package/event/order_detail_upgrade_button.tsx +60 -0
  88. package/event/order_detail_upgrade_payment.tsx +221 -0
  89. package/event/order_detail_visitor.tsx +196 -0
  90. package/event/order_detail_waiting.tsx +520 -0
  91. package/event/order_history.tsx +101 -0
  92. package/event/order_item.tsx +118 -0
  93. package/event/order_lottery.tsx +172 -0
  94. package/event/order_reschedule.tsx +439 -0
  95. package/event/order_reschedule_list.tsx +85 -0
  96. package/event/order_share_to.tsx +219 -0
  97. package/event/order_share_to_detail.tsx +181 -0
  98. package/event/order_status.tsx +66 -0
  99. package/event/order_waiting.tsx +143 -0
  100. package/event/pending_trx.tsx +50 -0
  101. package/event/qc_idcard.tsx +10 -10
  102. package/event/qc_idcard_failed.tsx +4 -4
  103. package/event/qc_idcard_success.tsx +4 -4
  104. package/event/qr_bg.tsx +22 -0
  105. package/event/queue_out.tsx +3 -3
  106. package/event/queue_pricing.tsx +2 -3
  107. package/event/rating.tsx +49 -0
  108. package/event/rating_mini.tsx +35 -0
  109. package/event/review.tsx +3 -3
  110. package/event/review_add.tsx +8 -8
  111. package/event/review_detail.tsx +4 -4
  112. package/event/review_item.tsx +4 -4
  113. package/event/scan_item.tsx +2 -2
  114. package/event/schedule.tsx +8 -9
  115. package/event/seat.tsx +16 -18
  116. package/event/seat_autopick.tsx +4 -4
  117. package/event/seat_map.tsx +4 -4
  118. package/event/seat_map_test.tsx +2 -2
  119. package/event/section_menu.tsx +40 -0
  120. package/event/sheet.tsx +73 -0
  121. package/event/slider.tsx +46 -0
  122. package/event/step.tsx +29 -0
  123. package/event/ticket_list.tsx +15 -16
  124. package/event/ticket_list2.tsx +16 -17
  125. package/event/tms.tsx +4 -4
  126. package/event/tms_add.tsx +7 -8
  127. package/event/tms_add_result.tsx +4 -4
  128. package/event/tms_check_code.tsx +160 -0
  129. package/event/tms_check_ticket.tsx +72 -0
  130. package/event/tms_check_ticket_result.tsx +384 -0
  131. package/event/tms_dashboard.tsx +7 -7
  132. package/event/tms_event_list.tsx +46 -43
  133. package/event/tms_gate.tsx +96 -0
  134. package/event/tms_home.tsx +639 -0
  135. package/event/tms_idcard.tsx +203 -0
  136. package/event/tms_in.tsx +215 -0
  137. package/event/tms_in_again.tsx +199 -0
  138. package/event/tms_in_failed.tsx +190 -0
  139. package/event/tms_in_hall.tsx +148 -0
  140. package/event/tms_in_hall_failed.tsx +270 -0
  141. package/event/tms_in_hall_list.tsx +222 -0
  142. package/event/tms_in_hall_log.tsx +134 -0
  143. package/event/tms_in_hall_success.tsx +132 -0
  144. package/event/tms_in_list.tsx +264 -0
  145. package/event/tms_in_log.tsx +130 -0
  146. package/event/tms_in_success.tsx +155 -0
  147. package/event/tms_in_warning.tsx +91 -0
  148. package/event/tms_list_item.tsx +88 -0
  149. package/event/tms_log.tsx +435 -0
  150. package/event/tms_out.tsx +91 -0
  151. package/event/tms_out_failed.tsx +135 -0
  152. package/event/tms_out_hall.tsx +143 -0
  153. package/event/tms_out_hall_failed.tsx +133 -0
  154. package/event/tms_out_hall_list.tsx +215 -0
  155. package/event/tms_out_hall_log.tsx +133 -0
  156. package/event/tms_out_hall_success.tsx +130 -0
  157. package/event/tms_out_list.tsx +118 -0
  158. package/event/tms_out_log.tsx +131 -0
  159. package/event/tms_out_success.tsx +143 -0
  160. package/event/tms_out_temporary.tsx +226 -0
  161. package/event/toggle.tsx +30 -0
  162. package/event/transaction.ts +34 -0
  163. package/event/turnstile_event_gate.tsx +2 -2
  164. package/event/turnstile_event_list.tsx +4 -4
  165. package/event/turnstile_event_ticket.tsx +4 -4
  166. package/event/turnstile_settings.tsx +11 -11
  167. package/event/turnstile_settings_otp.tsx +4 -4
  168. package/event/turnstile_settings_status.tsx +2 -2
  169. package/event/voucher.tsx +9 -10
  170. package/event/voucher_multi.tsx +4 -5
  171. package/id.json +644 -0
  172. package/package.json +1 -1
@@ -0,0 +1,548 @@
1
+ // withHooks
2
+
3
+ import { applyStyle } from 'esoftplay';
4
+ import { BboConfigProperty } from 'esoftplay/cache/bbo/config/import';
5
+ import { EventButton } from 'esoftplay/cache/event/button/import';
6
+ import { EventCountdownProperty } from 'esoftplay/cache/event/countdown/import';
7
+ import { EventHeader } from 'esoftplay/cache/event/header/import';
8
+ import { LibCarrousel } from 'esoftplay/cache/lib/carrousel/import';
9
+ import { LibCurl } from 'esoftplay/cache/lib/curl/import';
10
+ import { LibIcon } from 'esoftplay/cache/lib/icon/import';
11
+ import { LibLoading } from 'esoftplay/cache/lib/loading/import';
12
+ import { LibNavigation } from 'esoftplay/cache/lib/navigation/import';
13
+ import { LibObject } from 'esoftplay/cache/lib/object/import';
14
+ import { LibPicture } from 'esoftplay/cache/lib/picture/import';
15
+ import { LibShare } from 'esoftplay/cache/lib/share/import';
16
+ import { LibSlidingup } from 'esoftplay/cache/lib/slidingup/import';
17
+ import { LibStyle } from 'esoftplay/cache/lib/style/import';
18
+ import { LibToastProperty } from 'esoftplay/cache/lib/toast/import';
19
+ import { LibUtils } from 'esoftplay/cache/lib/utils/import';
20
+ import { LibVideoProperty } from 'esoftplay/cache/lib/video/import';
21
+ import { LibWebview } from 'esoftplay/cache/lib/webview/import';
22
+ import { UseTasks } from 'esoftplay/cache/use/tasks/import';
23
+ import { UserProfileProperty } from 'esoftplay/cache/user/profile/import';
24
+ import esp from 'esoftplay/esp';
25
+ import useLazyState from 'esoftplay/lazy';
26
+ import moment from 'esoftplay/moment';
27
+ import useSafeState from 'esoftplay/state';
28
+ import React, { useEffect } from 'react';
29
+ import { Pressable, ScrollView, Text, TouchableOpacity, View } from 'react-native';
30
+
31
+
32
+ export interface EventArtist_detail_multiProps {
33
+
34
+ }
35
+
36
+ export type PriceList = Array<{
37
+ "price_id": string,
38
+ "type": string,
39
+ "price_date": string,
40
+ "currency": string,
41
+ "use_seat": string,
42
+ "use_code": string,
43
+ "global_quota": string,
44
+ "info": string,
45
+ "term": [],
46
+ "image_map": string,
47
+ "price": string,
48
+ "qty_min": string,
49
+ "qty_max": string,
50
+ "tax": string,
51
+ "date_start": string,
52
+ "date_end": string,
53
+ "status": number,
54
+ "config": {
55
+ "seat_autopick": number,
56
+ "seat_autopick_start": string,
57
+ },
58
+ "list": Array<{
59
+ "event_artist_id": string,
60
+ "ondate": string,
61
+ "image": string,
62
+ "date_id": number,
63
+ "price": string,
64
+ "quota": string,
65
+ "quota_used": string,
66
+ "status": number,
67
+ }>,
68
+ "quota_used": string,
69
+ }>
70
+
71
+
72
+ const taskSeat = UseTasks()
73
+ const taskAdditional = UseTasks()
74
+
75
+ export default function m(props: EventArtist_detail_multiProps): any {
76
+ moment().locale('id')
77
+ let showSchedule = React.useRef<LibSlidingup>(null)
78
+ const { data, subscribed } = LibNavigation.getArgsAll(props)
79
+ const startBooking = moment(data?.start_booking).serverFormat('YYYY-MM-DD HH:mm:ss')
80
+ const date = moment().localeFormat('YYYY-MM-DD HH:mm:ss')
81
+
82
+ const [priceList, setPriceList, getPriceList] = useSafeState<PriceList>()
83
+ const [, setDataPostBooking, getDataPostBooking] = useLazyState<any>([])
84
+ const [dataAddition, setDataAddition] = useSafeState<any>([])
85
+ const [showAll, setShowAll] = useSafeState<any>({});
86
+
87
+
88
+ useEffect(() => {
89
+ BboConfigProperty.curlConfig('v2/config_order_type')
90
+ loadDataPrice()
91
+ return () => { EventCountdownProperty.releaseQueue.trigger() }
92
+ }, [])
93
+
94
+
95
+ let dataEvent: any = {
96
+ event_id: data?.event_id,
97
+ event_title: data?.event_title,
98
+ charge_payment: data?.charge_payment,
99
+ charge_payment_type: data?.charge_payment_type,
100
+ images: [{ image: data?.image }],
101
+ }
102
+
103
+ const [ticketSeat, resetTicketSeat] = taskSeat((item: any) => new Promise((next) => {
104
+ if (item.use_seat == 1) {
105
+ if (item.seat_autopick == 0) {
106
+ LibNavigation.navigateForResult('event/seat_map', {
107
+ url: 'event_seat',
108
+ dataTicket: {
109
+ ...dataEvent,
110
+ qty: item.qty,
111
+ selected_ticket: {
112
+ price_id: item.price_id,
113
+ type: item.type,
114
+ list: {
115
+ ondate: item.ondate
116
+ }
117
+ }
118
+ },
119
+ }, item.list_id)
120
+ .then((value: any) => {
121
+ const merged = { ...item, ...value }
122
+ let a = LibObject.replaceItem(getDataPostBooking(), (it) => it.list_id == item.list_id, merged)()
123
+ setDataPostBooking(a)
124
+ next()
125
+ })
126
+ } else {
127
+ let a = LibObject.replaceItem(getDataPostBooking(), (it) => it.list_id == item.list_id, item)()
128
+ setDataPostBooking(a)
129
+ next()
130
+ }
131
+ } else {
132
+ let a = LibObject.replaceItem(getDataPostBooking(), (it) => it.list_id == item.list_id, item)()
133
+ setDataPostBooking(a)
134
+ next()
135
+ }
136
+ }), () => {
137
+
138
+ const transformedData: any[] = [];
139
+ priceList?.filter((y: any) => y.selected == 1)?.map((item: any) => {
140
+ item?.list?.filter((x: any) => x.selected == 1)?.map((listItem: any) => {
141
+ transformedData.push({
142
+ ...item,
143
+ list_id: item.price_id + " " + listItem?.ondate,
144
+ qty: listItem.qty,
145
+ ondate: listItem.ondate,
146
+ list: [listItem],
147
+ });
148
+ });
149
+ })
150
+
151
+
152
+ resetTicketAdditional()
153
+ ticketAdditional(transformedData)
154
+ setDataAddition([])
155
+
156
+ })
157
+
158
+ const [ticketAdditional, resetTicketAdditional] = taskAdditional((item: any) => new Promise((next) => {
159
+ if (data?.has_addition == 1 || item.has_addition && item.has_addition == 1) {
160
+ LibNavigation.navigateForResult('event/additional', {
161
+ event_id: dataEvent?.event_id,
162
+ qty: item.qty,
163
+ ondate: item.ondate,
164
+ data: dataEvent,
165
+ price_id: item.price_id,
166
+ type_ticket: item.type
167
+ }, item.list_id).then((value) => {
168
+ if (value != "") {
169
+ setDataAddition(dataAddition.push(JSON.parse(value)))
170
+ }
171
+ next()
172
+ })
173
+ } else {
174
+ next()
175
+ }
176
+ }), () => {
177
+ if (dataAddition?.length > 0) {
178
+ dataEvent.addition = dataAddition
179
+ }
180
+ LibNavigation.navigate('payment/ticket_multi', {
181
+ order_type: BboConfigProperty?.state()?.get()?.order_type?.ticket,
182
+ fee_platform: {
183
+ fee_platform_amount: data?.fee_platform_amount,
184
+ fee_platform_type: data?.fee_platform_type,
185
+ },
186
+ subscribed: subscribed,
187
+ dataEvent: dataEvent,
188
+ dataTicket: getDataPostBooking(),
189
+ })
190
+ })
191
+
192
+ function loadDataPrice() {
193
+ new LibCurl(data?.price_list_url, null, (res, msg) => {
194
+
195
+ setPriceList(res)
196
+ }, (err) => {
197
+ LibToastProperty.show(err?.message)
198
+ LibNavigation.back()
199
+ }, 1)
200
+ }
201
+
202
+ function proceedToPayment() {
203
+ let newResult: any[] = [];
204
+ getPriceList().map((priceType: any) => {
205
+ let filteredList = priceType.list/* .filter((item: any) => item.selected == 1); */
206
+ filteredList = filteredList?.map((item: any) => ({
207
+ ...item,
208
+ type: priceType?.type,
209
+ tax: priceType?.tax,
210
+ term: priceType?.term,
211
+ list_id: priceType?.price_id + "-" + item.ondate,
212
+ price_id: priceType?.price_id
213
+ }))
214
+
215
+ newResult = newResult.concat(filteredList);
216
+ });
217
+
218
+ setDataPostBooking(newResult)
219
+ resetTicketSeat()
220
+ ticketSeat(newResult.filter((x: any) => x.selected == 1))
221
+
222
+ }
223
+
224
+ let share = [
225
+ {
226
+ icon: 'icons/ic_facebook.png',
227
+ title: 'Facebook',
228
+ onPress: () => { LibShare.facebook(data?.url) }
229
+ },
230
+ {
231
+ icon: 'icons/ic_whatsapp.png',
232
+ title: 'Whatsapp',
233
+ onPress: () => { LibShare.whatsapp(data?.url) }
234
+ },
235
+ {
236
+ icon: 'icons/ic_twitter.png',
237
+ title: 'Twitter',
238
+ onPress: () => { LibShare.twitter(data?.url) }
239
+ },
240
+ {
241
+ icon: 'icons/ic_copy.png',
242
+ title: esp.lang("event/artist_detail", "copy"),
243
+ onPress: () => {
244
+ LibUtils.copyToClipboard(data?.url).then((v) => {
245
+ LibToastProperty.show(esp.lang("event/artist_detail", "alert"))
246
+ })
247
+ }
248
+ },
249
+ ]
250
+
251
+ function renderShare(item: any, i: number) {
252
+ return (
253
+ <View key={i} style={applyStyle({ marginRight: 10 })}>
254
+ <TouchableOpacity onPress={item.onPress} >
255
+ <LibPicture style={applyStyle({ resizeMode: 'contain', height: 25, width: 25, borderRadius: 12.5, backgroundColor: 'white' })} source={esp.assets(item.icon)} />
256
+ </TouchableOpacity>
257
+ </View>
258
+ )
259
+ }
260
+
261
+ function renderItem(itemC: any, iC: number, item: any, i: number) {
262
+ let ticketWithDate = item.price_date == 1 && item.use_code == 0
263
+ let ticketSpecial = item.price_date == 0 && item.use_code == 0
264
+
265
+ let _selectedTicket = itemC?.selected == 1
266
+
267
+ let colorDefault = _selectedTicket ? "#FFE9AD" : '#fff'
268
+ let colorBackground = item?.status != 1 ? LibStyle.colorLightGrey : itemC?.status != 1 ? LibStyle.colorLightGrey : colorDefault
269
+ let textOpacity = itemC?.status == 1 ? 1 : 0.3
270
+
271
+ return (
272
+ <TouchableOpacity
273
+ onPress={() => {
274
+ let msg = itemC?.status == 0 ? esp.lang("event/artist_detail", "sold_out") : esp.lang("event/artist_detail", "coming_soon")
275
+
276
+ // kondisi untuk tipe tiket yang ada tanggalnya
277
+ if (item?.status == 1 && itemC?.status == 1) {
278
+ const data = new LibObject(priceList)
279
+ .update((itemList) => {
280
+ itemList.selected = itemList.selected == 1 ? 0 : 1
281
+ itemList.qty = itemList.selected == 1 ? item.qty_min : 0
282
+ itemList.seat_autopick = item.config?.seat_autopick
283
+ itemList.use_seat = item.use_seat
284
+ return itemList
285
+ })(i, 'list', iC)
286
+ .update((priceTypeItem) => {
287
+ return ({
288
+ ...priceTypeItem,
289
+ selected: priceTypeItem.list.some((item: any) => item.selected == 1) ? 1 : 0
290
+ })
291
+ })(i)
292
+ .value()
293
+
294
+ setPriceList(data)
295
+ } else if (itemC?.status == 0) {
296
+ LibToastProperty.show(msg)
297
+ } else if (itemC?.status == 2) {
298
+ LibToastProperty.show(msg)
299
+ }
300
+ }} activeOpacity={itemC?.status == 1 ? 0 : 1} key={iC} style={{ borderBottomWidth: item.list.length == 1 ? 0 : 5, borderBottomColor: "#fff", flex: 1, flexDirection: 'row', backgroundColor: colorBackground, justifyContent: 'space-between', padding: 10, alignItems: 'center' }}>
301
+ {
302
+ itemC.ondate == "0000-00-00" ?
303
+ <LibPicture source={esp.assets('icons/ic_special2.png')} style={{ height: 42, width: 42 }} />
304
+ :
305
+ <>
306
+ <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' })}>
307
+ <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(itemC.ondate).localeFormat('DD')}</Text>
308
+ </View>
309
+ <View style={applyStyle({ flexDirection: 'column', flex: 1 })}>
310
+ {
311
+ item?.status == 1 && itemC?.status != 1 &&
312
+ <View style={applyStyle({ flexDirection: 'row', marginBottom: 5 })}>
313
+ <View style={applyStyle({ alignContent: 'center', alignItems: 'center', justifyContent: 'center', marginTop: 5, borderWidth: 1, backgroundColor: itemC?.status == 0 ? LibStyle.colorRed : "#4cd964", borderColor: itemC?.status == 0 ? LibStyle.colorRed : "#4cd964", borderRadius: 5, padding: 3, opacity: 0.8 })}>
314
+ <Text allowFontScaling={false} style={applyStyle({ fontSize: 10, fontStyle: "normal", letterSpacing: 0, color:/* itemC?.status == 2 ? "#000" : */"#fff", fontWeight: 'bold' })}>{itemC?.status == 0 ? esp.lang("event/artist_detail", "sold_out") : esp.lang("event/artist_detail", "coming_soon")}</Text>
315
+ </View>
316
+ </View>
317
+ }
318
+ <Text allowFontScaling={false} style={applyStyle({ opacity: textOpacity, fontFamily: "Arial", fontSize: 14, fontWeight: "bold", fontStyle: "normal", letterSpacing: 0, color: _selectedTicket ? "#3ea4dc" : '#999' })}>{LibUtils.moment(itemC.ondate).localeFormat('dddd')}</Text>
319
+ <View style={applyStyle({ flexDirection: 'row' })}>
320
+ <Text allowFontScaling={false} style={applyStyle({ opacity: textOpacity, fontFamily: "Arial", fontSize: 12, fontWeight: "bold", fontStyle: "normal", letterSpacing: 0, color: _selectedTicket ? "#3ea4dc" : '#999' })}>{LibUtils.moment(itemC.ondate).localeFormat('MMMM')}</Text>
321
+ <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(itemC.ondate).localeFormat('YYYY')}</Text>
322
+ </View>
323
+ </View>
324
+ </>
325
+ }
326
+
327
+ <View style={applyStyle({ marginRight: 5, marginLeft: 5, flexDirection: 'column' })} >
328
+ {
329
+ (itemC?.status == 1 || itemC?.status == 0) &&
330
+ <Text allowFontScaling={false} style={applyStyle({ opacity: ticketWithDate ? textOpacity : 1, fontFamily: "Arial", fontSize: 12, fontWeight: "bold", fontStyle: "normal", letterSpacing: 0, textAlign: "right", color: _selectedTicket ? "#3ea4dc" : (itemC.price == 0 ? LibStyle.colorGreen : '#999') })} >{itemC.price == 0 ? esp.lang("event/ticket_list", "free") : LibUtils.money(itemC.price, item.currency)}</Text>
331
+ }
332
+ {
333
+ item?.status == 1 && (ticketWithDate || ticketSpecial) && itemC.selected == 1 &&
334
+ <View style={applyStyle({ marginTop: 4, flexDirection: 'row', marginLeft: 8, alignContent: 'center', alignItems: 'center' })}>
335
+ <TouchableOpacity onPress={() => {
336
+ // min()
337
+ let qty = 1
338
+ if (itemC.qty <= item.qty_min) {
339
+ qty = Number(item.qty_min)
340
+ } else {
341
+ qty = Number(itemC.qty) == 1 ? 1 : Number(itemC.qty) - 1
342
+ }
343
+
344
+ setPriceList(LibObject.set(getPriceList(), qty)(i, 'list', iC, 'qty'))
345
+
346
+ }}>
347
+ <View style={applyStyle({ width: 28, height: 28, borderRadius: 6, backgroundColor: "#ecf0f1", alignContent: 'center', alignItems: 'center' })}>
348
+ <LibIcon name="minus" color="#e74c3c" />
349
+ </View>
350
+ </TouchableOpacity>
351
+ <Text style={applyStyle({ fontFamily: "Arial", fontSize: 20, fontWeight: "bold", fontStyle: "normal", letterSpacing: 0, color: "#9b9b9b", marginLeft: 13, marginRight: 13 })}>{itemC?.qty}</Text>
352
+ <TouchableOpacity onPress={() => {
353
+ // add()
354
+ let qty = 1
355
+ if (itemC.qty != item.qty_max) {
356
+ if (qty != (Number(itemC.quota) - Number(itemC.quota_used))) {
357
+ qty = Number(itemC?.qty) + 1
358
+ }
359
+ } else {
360
+ qty = Number(item.qty_max)
361
+ }
362
+ setPriceList(LibObject.set(getPriceList(), qty)(i, 'list', iC, 'qty'))
363
+
364
+ }}>
365
+ <View style={applyStyle({ width: 28, height: 28, borderRadius: 6, backgroundColor: "#ecf0f1", alignContent: 'center', alignItems: 'center' })}>
366
+ <LibIcon name="plus" color="#16a085" />
367
+ </View>
368
+ </TouchableOpacity>
369
+ </View>
370
+ }
371
+ </View>
372
+ </TouchableOpacity>
373
+ )
374
+ }
375
+
376
+ if (!priceList) {
377
+ return <LibLoading />
378
+ }
379
+
380
+ const bgHeight = LibStyle.width * 9 / 16
381
+
382
+ function renderImages(item: any, i: number) {
383
+ const styleId_Z1ecB7O: any = { height: bgHeight, width: LibStyle.width, resizeMode: 'cover' }
384
+ return (
385
+ <TouchableOpacity key={i} onPress={() => LibNavigation.navigate('lib/gallery', { images: data?.images_artist, index: i })}>
386
+ <LibPicture source={{ uri: item.image }} style={styleId_Z1ecB7O} />
387
+ </TouchableOpacity>
388
+ )
389
+ }
390
+
391
+ const maxDisplay = 3;
392
+ const handleShowAll = (price_id: any) => {
393
+ setShowAll((prevShowAll: any) => ({
394
+ ...prevShowAll,
395
+ [price_id]: !prevShowAll[price_id],
396
+ }));
397
+ };
398
+
399
+ return (
400
+ <View style={{ flex: 1 }} >
401
+ <EventHeader title={esp.lang("event/artist_detail", "title")} subtitle={data?.title} />
402
+ <ScrollView>
403
+ {
404
+ data?.images_artist && data?.images_artist?.length > 0 ?
405
+ <LibCarrousel
406
+ delay={3000}
407
+ style={{ height: bgHeight, width: LibStyle.width }}
408
+ autoplay
409
+ bullets
410
+ bulletStyle={{ width: 7, height: 7, backgroundColor: "#fff", borderRadius: 3.5, borderWidth: 0, marginHorizontal: 2 }}
411
+ chosenBulletStyle={{ width: 7, height: 7, backgroundColor: "#f4e31b", borderRadius: 3.5, borderWidth: 0, marginHorizontal: 2 }}
412
+ bulletsContainerStyle={{ marginBottom: -10 }}>
413
+ {
414
+ data?.images_artist && data?.images_artist?.map(renderImages)
415
+ }
416
+ </LibCarrousel>
417
+ :
418
+ <Pressable onPress={() => LibNavigation.navigate('lib/gallery', { image: data?.image_artist })} >
419
+ <LibPicture
420
+ style={applyStyle({ height: LibStyle.width * 9 / 16, width: LibStyle.width, backgroundColor: '#f2f3f4' })}
421
+ source={{ uri: data?.image_artist }} />
422
+ </Pressable>
423
+ }
424
+
425
+ <View style={applyStyle({ marginTop: 10, marginLeft: 17, flexDirection: 'row' })}>
426
+ {
427
+ share.map(renderShare)
428
+ }
429
+ </View>
430
+ <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>
431
+ {/* {
432
+ data && priceList?.map?.(renderPrieList)
433
+ } */}
434
+ {
435
+ data?.description != "" &&
436
+ <ScrollView>
437
+ <LibWebview onFinishLoad={() => { }} source={{ html: data?.description }} />
438
+ </ScrollView>
439
+ }
440
+ {
441
+ data && data?.youtube != "" &&
442
+ <>
443
+ <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>
444
+ <TouchableOpacity onPress={() => LibNavigation.navigate('lib/video', { code: data?.youtube })} >
445
+ <LibPicture source={{ uri: LibVideoProperty.getUrlThumbnail(data?.youtube) }} style={applyStyle({ height: LibStyle.width * 9 / 16, width: LibStyle.width - 40, marginHorizontal: 20, resizeMode: 'cover' })} />
446
+ </TouchableOpacity>
447
+ </>
448
+ }
449
+ </ScrollView>
450
+ <View style={applyStyle({ flexDirection: 'row', padding: 10, backgroundColor: 'white' })} >
451
+
452
+ {
453
+ data?.book_available == 1 ?
454
+ <EventButton label={esp.lang("event/artist_detail", "buy_ticket")} onPress={() => {
455
+ UserProfileProperty.isLogin(() => {
456
+ showSchedule.current?.show()
457
+ })
458
+ }} style={applyStyle({ backgroundColor: LibStyle.colorGreen })} />
459
+ :
460
+ <View style={applyStyle({ flex: 1, height: 35, borderRadius: 17, backgroundColor: LibStyle.colorLightGrey, justifyContent: 'center', alignItems: 'center', paddingHorizontal: 9 })} >
461
+ <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>
462
+ </View>
463
+ }
464
+ </View>
465
+
466
+ <LibSlidingup ref={showSchedule}>
467
+ <View style={applyStyle({ backgroundColor: 'white', borderTopRightRadius: 30, borderTopLeftRadius: 30, paddingTop: 15, maxHeight: LibStyle.height - (LibStyle.height / 3) })}>
468
+ <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>
469
+ <ScrollView showsVerticalScrollIndicator={false} >
470
+ {
471
+ priceList?.length > 0 && priceList?.map((item: any, i: number) => {
472
+ let filterFullData = priceList?.filter((it: any) => it.status != 0)
473
+ const displayedData = showAll[item.price_id] ? item?.list : item?.list.slice(0, maxDisplay);
474
+
475
+ let textOpacity = item?.status == 1 ? 1 : 0.3
476
+ return (
477
+ <View key={i} style={{ overflow: 'hidden', margin: 15, marginBottom: 5, backgroundColor: '#fff', borderRadius: 10, ...LibStyle.elevation(2), borderWidth: 1, borderColor: /* selTic ? LibStyle.colorBlue : */ LibStyle.colorBgGrey }}>
478
+ <View style={{ padding: 10, backgroundColor: '#f1f2f3', borderTopLeftRadius: 10, borderTopRightRadius: 10 }}>
479
+ <View style={{ alignContent: 'center', alignItems: 'center', flexDirection: 'row', justifyContent: 'space-between', }}>
480
+ <Text allowFontScaling={false} style={{ opacity: textOpacity, fontWeight: 'bold' }}>{item.type}</Text>
481
+ {
482
+ item.qty_min > 1 &&
483
+ <Text style={{ color: LibStyle.colorRed, fontSize: 10, fontWeight: 'normal' }}> {"(" + esp.lang("event/ticket_list", "min_order") + LibUtils.number(item.qty_min) + ")"}</Text>
484
+ }
485
+ {
486
+ item?.status != 1 &&
487
+ <View style={applyStyle({ flexDirection: 'row' })}>
488
+ <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 })}>
489
+ <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>
490
+ </View>
491
+ </View>
492
+ }
493
+ </View>
494
+ {
495
+ item.info != "" &&
496
+ <View style={{ marginTop: 3, alignContent: 'center', alignItems: 'center', flexDirection: 'row', marginRight: 5 }}>
497
+ <Text allowFontScaling={false} style={{ fontSize: 12, color: LibStyle.colorBlue }}>{item.info}</Text>
498
+ </View>
499
+ }
500
+ </View>
501
+ {
502
+ displayedData?.map((itemC: any, iC: number) => renderItem(itemC, iC, item, i))
503
+ }
504
+
505
+ {
506
+ filterFullData[i].list?.length > 3 &&
507
+ <TouchableOpacity onPress={() => {
508
+ handleShowAll(item.price_id)
509
+ }} style={{ borderTopColor: LibStyle.colorGrey, borderTopWidth: 0.8, flex: 1, padding: 8, flexDirection: 'row', alignContent: 'center', alignItems: 'center', justifyContent: 'center' }}>
510
+ <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>
511
+ <LibIcon name={showAll[item.price_id] ? 'chevron-up-circle-outline' : 'chevron-down-circle-outline'} color={LibStyle.colorBlue} size={18} />
512
+ </TouchableOpacity>
513
+ }
514
+
515
+ </View>
516
+ )
517
+ })
518
+ }
519
+ </ScrollView>
520
+ <View style={applyStyle({ flexDirection: 'row', paddingVertical: 10 })} >
521
+ {
522
+ data?.book_available == 1 ?
523
+ <>
524
+ {
525
+ data?.book_available == 0 && data.end_booking <= date && data.end_booking != '0000-00-00 00:00:00' ?
526
+ <View style={applyStyle({ flex: 1, height: 35, borderRadius: 17, backgroundColor: LibStyle.colorLightGrey, justifyContent: 'center', alignItems: 'center', paddingHorizontal: 9 })} >
527
+ <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>
528
+ </View>
529
+ :
530
+ <EventButton label={esp.lang("event/artist_detail", "buy_ticket")} onPress={() => {
531
+ UserProfileProperty.isLogin(() => {
532
+ proceedToPayment()
533
+ })
534
+ }} style={{ backgroundColor: LibStyle.colorGreen, marginTop: 2, marginHorizontal: 15 }} />
535
+ }
536
+ </>
537
+ :
538
+ <View style={applyStyle({ flex: 1, height: 35, borderRadius: 17, backgroundColor: LibStyle.colorLightGrey, justifyContent: 'center', alignItems: 'center', paddingHorizontal: 9 })} >
539
+ <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>
540
+ </View>
541
+ }
542
+ </View>
543
+ </View>
544
+ </LibSlidingup>
545
+
546
+ </View>
547
+ )
548
+ }
@@ -0,0 +1,22 @@
1
+ // withHooks
2
+
3
+ import { LibStyle } from 'esoftplay/cache/lib/style/import';
4
+ import React from 'react';
5
+ import { Text, View } from 'react-native';
6
+
7
+
8
+ export interface EventBadgeArgs {
9
+
10
+ }
11
+ export interface EventBadgeProps {
12
+ counter: any
13
+ }
14
+ export default function m(props: EventBadgeProps): any {
15
+ if (props?.counter <= 0) return null
16
+ return (
17
+ <View style={{ position: 'absolute', top: 0, right: 0, height: 15, borderRadius: 10, padding: 5, paddingVertical: 2, backgroundColor: LibStyle.colorRed }} >
18
+ <Text allowFontScaling={false} style={{ fontFamily: "ArialBold", fontSize: 10, letterSpacing: 0, color: "#ffffff" }} >{props?.counter > 99 ? "99+" : String(props?.counter)}</Text>
19
+ </View>
20
+ )
21
+
22
+ }
@@ -0,0 +1,40 @@
1
+ // withHooks
2
+
3
+ import { LibPicture } from 'esoftplay/cache/lib/picture/import';
4
+ import esp from 'esoftplay/esp';
5
+ import React from 'react';
6
+ import { Pressable, Text, View } from 'react-native';
7
+
8
+
9
+ export interface EventButtonArgs {
10
+
11
+ }
12
+ export interface EventButtonProps {
13
+ icon?: string,
14
+ label: string,
15
+ style?: any,
16
+ fontColor?: string,
17
+ borderColor?: string,
18
+ backgroundColor?: string,
19
+ testID?: any
20
+ onPress: () => void
21
+ }
22
+ export default function m(props: EventButtonProps): any {
23
+ return (
24
+ <View>
25
+ <Pressable testID={props.testID} onPress={() => props.onPress()} style={{ minWidth: '100%', alignSelf: 'center' }} >
26
+ {
27
+ props.icon ?
28
+ <View style={[{ borderWidth: 1, borderColor: props.borderColor ? props.borderColor : 'rgba(0, 0, 0, 0)', height: 40, borderRadius: 16, backgroundColor: props.backgroundColor || "#6c432c", flexDirection: 'row', alignItems: 'center', paddingHorizontal: 9 }, props.style]} >
29
+ <LibPicture source={esp.assets(props.icon)} style={{ width: 18, height: 18, resizeMode: 'contain' }} />
30
+ <Text allowFontScaling={false} style={{ fontFamily: "ArialBold", fontSize: 14, textAlign: "center", textAlignVertical: 'center', color: 'white', flex: 1, marginRight: 30, marginLeft: 10 }} >{props.label}</Text>
31
+ </View>
32
+ :
33
+ <View style={[{ borderWidth: 1, borderColor: props.borderColor ? props.borderColor : 'rgba(0, 0, 0, 0)', height: 40, borderRadius: 17, backgroundColor: props.backgroundColor || "#6c432c", justifyContent: 'center', alignItems: 'center', paddingHorizontal: 9 }, props.style]} >
34
+ <Text allowFontScaling={false} style={{ fontFamily: "ArialBold", fontSize: 14, textAlign: "center", textAlignVertical: 'center', color: props.fontColor ? props.fontColor : 'white', marginRight: 10, marginLeft: 10 }} >{props.label}</Text>
35
+ </View>
36
+ }
37
+ </Pressable>
38
+ </View>
39
+ )
40
+ }
@@ -0,0 +1,4 @@
1
+ //noPage
2
+ import { BboConfig } from "esoftplay/cache/bbo/config/import";
3
+
4
+ export default BboConfig
@@ -1,10 +1,10 @@
1
1
  // withHooks
2
2
 
3
+ import { EventCountdown_base } from 'esoftplay/cache/event/countdown_base/import';
3
4
  import { EventQueue_pricingProperty } from 'esoftplay/cache/event/queue_pricing/import';
4
5
  import { LibNavigation } from 'esoftplay/cache/lib/navigation/import';
5
6
  import { LibStyle } from 'esoftplay/cache/lib/style/import';
6
7
  import { LibUtils } from 'esoftplay/cache/lib/utils/import';
7
- import { MarketCountdown } from 'esoftplay/cache/market/countdown/import';
8
8
  import { UserRoutes } from 'esoftplay/cache/user/routes/import';
9
9
  import useGlobalState from 'esoftplay/global';
10
10
  import useGlobalSubscriber from 'esoftplay/subscribe';
@@ -19,7 +19,7 @@ export interface EventCountdownArgs {
19
19
  export interface EventCountdownProps {
20
20
 
21
21
  }
22
- export const countdownTime = useGlobalState('0')
22
+ export const countdownTime = useGlobalState<any>('0')
23
23
 
24
24
  export const releaseQueue = useGlobalSubscriber()
25
25
 
@@ -54,11 +54,11 @@ export default function m(props: EventCountdownProps): any {
54
54
  else
55
55
  return (
56
56
  <Animated.View pointerEvents='none' style={[{ position: 'absolute', alignItems: 'center', justifyContent: 'center', top: LibStyle.STATUSBAR_HEIGHT + 61, padding: 1, backgroundColor: LibUtils.hexToRgba(LibStyle.colorGreen, 1), width: '100%' }, animated]} >
57
- <MarketCountdown
57
+ <EventCountdown_base
58
58
  onExpired={() => {
59
59
  const routeNames = UserRoutes.state()?.get()?.routes?.map?.((x: any) => x.name)
60
- if (routeNames.includes("artist/list"))
61
- LibNavigation.navigate("artist/list")
60
+ if (routeNames.includes("event/artist"))
61
+ LibNavigation.navigate("event/artist")
62
62
  else if (routeNames.includes("event/detail"))
63
63
  LibNavigation.navigate("event/detail")
64
64
  else