esoftplay-event 0.0.2-m → 0.0.2-o
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/event/order_detail.tsx +2 -1
- package/event/ticket_list.tsx +1 -1
- package/package.json +1 -1
- package/event/artist_detail_copy.tsx +0 -479
package/event/order_detail.tsx
CHANGED
|
@@ -286,7 +286,7 @@ export default function m(props: EventOrder_detailProps): any {
|
|
|
286
286
|
}
|
|
287
287
|
curlPriceConfig(res?.url_price_config, res?.price_id, (conf) => {
|
|
288
288
|
args['tax'] = conf?.tax
|
|
289
|
-
args['fee_platform'] =
|
|
289
|
+
args['fee_platform'] = conf.hasOwnProperty('fee_platform_amount') ? {
|
|
290
290
|
fee_platform_amount: conf?.fee_platform_amount || 0,
|
|
291
291
|
fee_platform_type: conf?.fee_platform_type || "NONE"
|
|
292
292
|
} : fee_platform
|
|
@@ -296,6 +296,7 @@ export default function m(props: EventOrder_detailProps): any {
|
|
|
296
296
|
fee_custom_type: conf?.fee_custom_type || "NONE"
|
|
297
297
|
}
|
|
298
298
|
|
|
299
|
+
esp.log(conf, res?.price_id, args);
|
|
299
300
|
LibNavigation.navigate('payment/ticket', args)
|
|
300
301
|
})
|
|
301
302
|
}
|
package/event/ticket_list.tsx
CHANGED
|
@@ -271,7 +271,7 @@ export default function m(props: EventTicket_listProps): any {
|
|
|
271
271
|
LibNavigation.navigate('payment/ticket', {
|
|
272
272
|
order_type: eventConfig?.order_type?.ticket,
|
|
273
273
|
tax: config?.tax || selectedTicket?.tax || 0,
|
|
274
|
-
fee_platform:
|
|
274
|
+
fee_platform: config.hasOwnProperty('fee_platform_amount') ? {
|
|
275
275
|
fee_platform_amount: config?.fee_platform_amount || 0,
|
|
276
276
|
fee_platform_type: config?.fee_platform_type || "NONE"
|
|
277
277
|
} : fee_platform,
|
package/package.json
CHANGED
|
@@ -1,479 +0,0 @@
|
|
|
1
|
-
// // withHooks
|
|
2
|
-
|
|
3
|
-
// import { applyStyle } from 'esoftplay';
|
|
4
|
-
// import { EventArtist_checkout, EventArtist_checkoutProperty } from 'esoftplay/cache/event/artist_checkout/import';
|
|
5
|
-
// import { EventButton } from 'esoftplay/cache/event/button/import';
|
|
6
|
-
// import { EventConfigProperty } from 'esoftplay/cache/event/config/import';
|
|
7
|
-
// import { EventCountdownProperty } from 'esoftplay/cache/event/countdown/import';
|
|
8
|
-
// import { EventHeader } from 'esoftplay/cache/event/header/import';
|
|
9
|
-
// import { EventHtmltext } from 'esoftplay/cache/event/htmltext/import';
|
|
10
|
-
// import { EventIndexProperty } from 'esoftplay/cache/event/index/import';
|
|
11
|
-
// import { EventOrder_itemProperty } from 'esoftplay/cache/event/order_item/import';
|
|
12
|
-
// import { EventShare } from 'esoftplay/cache/event/share/import';
|
|
13
|
-
// import { LibCarrousel } from 'esoftplay/cache/lib/carrousel/import';
|
|
14
|
-
// import { LibCurl } from 'esoftplay/cache/lib/curl/import';
|
|
15
|
-
// import { LibIcon } from 'esoftplay/cache/lib/icon/import';
|
|
16
|
-
// import { LibLoading } from 'esoftplay/cache/lib/loading/import';
|
|
17
|
-
// import { LibNavigation } from 'esoftplay/cache/lib/navigation/import';
|
|
18
|
-
// import { LibObject } from 'esoftplay/cache/lib/object/import';
|
|
19
|
-
// import { LibPicture } from 'esoftplay/cache/lib/picture/import';
|
|
20
|
-
// import { LibSlidingup } from 'esoftplay/cache/lib/slidingup/import';
|
|
21
|
-
// import { LibStyle } from 'esoftplay/cache/lib/style/import';
|
|
22
|
-
// import { LibToastProperty } from 'esoftplay/cache/lib/toast/import';
|
|
23
|
-
// import { LibUtils } from 'esoftplay/cache/lib/utils/import';
|
|
24
|
-
// import { LibVideoProperty } from 'esoftplay/cache/lib/video/import';
|
|
25
|
-
// import { LibWebview } from 'esoftplay/cache/lib/webview/import';
|
|
26
|
-
// import esp from 'esoftplay/esp';
|
|
27
|
-
// import moment from 'esoftplay/moment';
|
|
28
|
-
// import useSafeState from 'esoftplay/state';
|
|
29
|
-
// import React, { useEffect } from 'react';
|
|
30
|
-
// import { ActivityIndicator, Pressable, ScrollView, Text, TouchableOpacity, View } from 'react-native';
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
// export interface EventArtist_detailProps {
|
|
34
|
-
|
|
35
|
-
// }
|
|
36
|
-
|
|
37
|
-
// export default function m(props: EventArtist_detailProps): any {
|
|
38
|
-
// moment().locale('id')
|
|
39
|
-
// let showSchedule = React.useRef<LibSlidingup>(null)
|
|
40
|
-
// const [qty, setQty, getQty] = useSafeState<any>(1)
|
|
41
|
-
// const { data, subscribed } = LibNavigation.getArgsAll(props)
|
|
42
|
-
// const startBooking = moment(data?.start_booking).serverFormat('YYYY-MM-DD HH:mm:ss')
|
|
43
|
-
// const date = moment().localeFormat('YYYY-MM-DD HH:mm:ss')
|
|
44
|
-
// const [eventConfig] = EventConfigProperty.state().useState()
|
|
45
|
-
|
|
46
|
-
// const [selectedTicket, setSelectedTicket, getSelectedTicket] = useSafeState<any>()
|
|
47
|
-
// const [priceList, setPriceList, getPriceList] = useSafeState<any>()
|
|
48
|
-
// const [showAll, setShowAll] = useSafeState<any>({});
|
|
49
|
-
// // const [loading, setLoading] = useSafeState<boolean>(false)
|
|
50
|
-
// const [loading] = EventArtist_checkoutProperty.loading.useState()
|
|
51
|
-
|
|
52
|
-
// useEffect(() => {
|
|
53
|
-
// loadDataPrice()
|
|
54
|
-
// EventConfigProperty.curlConfig('v2/config_order_type')
|
|
55
|
-
// return () => { EventCountdownProperty.releaseQueue.trigger() }
|
|
56
|
-
// }, [])
|
|
57
|
-
|
|
58
|
-
// function sortByStatus(data: any) {
|
|
59
|
-
// // Fungsi sorting untuk memastikan status 1 di atas, lainnya di bawah
|
|
60
|
-
// const statusSorter = (a: any, b: any) => {
|
|
61
|
-
// if (a.status == 1 && b.status != 1) return -1; // a = 1, b bukan 1 -> a di atas
|
|
62
|
-
// if (a.status != 1 && b.status == 1) return 1; // a bukan 1, b = 1 -> b di atas
|
|
63
|
-
// return a.status - b.status; // Urutkan status selain 1 secara alami
|
|
64
|
-
// };
|
|
65
|
-
|
|
66
|
-
// return data
|
|
67
|
-
// .map((item: any) => {
|
|
68
|
-
// // Sorting array 'list' di dalam setiap item
|
|
69
|
-
// const sortedList = item?.list?.sort(statusSorter);
|
|
70
|
-
// return { ...item, list: sortedList };
|
|
71
|
-
// })
|
|
72
|
-
// .sort(statusSorter); // Sorting array utama
|
|
73
|
-
// }
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
// function loadDataPrice() {
|
|
77
|
-
// new LibCurl(data?.price_list_url, null, (res, msg) => {
|
|
78
|
-
|
|
79
|
-
// let stop = false
|
|
80
|
-
// let arr = sortByStatus(res)
|
|
81
|
-
|
|
82
|
-
// for (let i = 0; i < arr.length; i++) {
|
|
83
|
-
// const item = arr[i];
|
|
84
|
-
// if (item?.status == 1) {
|
|
85
|
-
// for (let it = 0; it < item?.list.length; it++) {
|
|
86
|
-
// const element = item?.list[it];
|
|
87
|
-
// if (element?.status == 1) {
|
|
88
|
-
// let replaceList = LibObject.set(item, element)('list')
|
|
89
|
-
// setQty(item?.qty_min)
|
|
90
|
-
// setSelectedTicket(replaceList)
|
|
91
|
-
// stop = true
|
|
92
|
-
// break;
|
|
93
|
-
// }
|
|
94
|
-
// }
|
|
95
|
-
// if (stop) {
|
|
96
|
-
// break;
|
|
97
|
-
// }
|
|
98
|
-
// }
|
|
99
|
-
// }
|
|
100
|
-
|
|
101
|
-
// setPriceList(res)
|
|
102
|
-
// }, (err) => {
|
|
103
|
-
// LibToastProperty.show(err?.message)
|
|
104
|
-
// LibNavigation.back()
|
|
105
|
-
// })
|
|
106
|
-
// }
|
|
107
|
-
|
|
108
|
-
// function add(): void {
|
|
109
|
-
// let hasQuota = getSelectedTicket().quota > 0
|
|
110
|
-
// const min = hasQuota ? Number(getSelectedTicket()?.quota) - Number(getSelectedTicket()?.quota_used) : Number(getSelectedTicket()?.qty_max)
|
|
111
|
-
// if (qty < Math.min(min, Number(getSelectedTicket()?.qty_max))) {
|
|
112
|
-
// setQty(Number(qty) + 1)
|
|
113
|
-
// }
|
|
114
|
-
// }
|
|
115
|
-
|
|
116
|
-
// function min(): void {
|
|
117
|
-
// const currentQty = qty
|
|
118
|
-
// const selectedTicket = getSelectedTicket()
|
|
119
|
-
|
|
120
|
-
// // kalau qty - 1 <= 0 → set qty 0 dan unselect tiket
|
|
121
|
-
// if (currentQty - 1 <= 0) {
|
|
122
|
-
// setQty(0)
|
|
123
|
-
// setSelectedTicket(null) // atau undefined sesuai project
|
|
124
|
-
// return
|
|
125
|
-
// }
|
|
126
|
-
|
|
127
|
-
// // ambil qty_min dengan cara manual
|
|
128
|
-
// let qtyMin = 1 // default
|
|
129
|
-
// if (selectedTicket && selectedTicket.qty_min) {
|
|
130
|
-
// qtyMin = Number(selectedTicket.qty_min)
|
|
131
|
-
// }
|
|
132
|
-
|
|
133
|
-
// // kurangi qty tapi tetap patuhi qty_min
|
|
134
|
-
// if (currentQty <= qtyMin) {
|
|
135
|
-
// setQty(qtyMin)
|
|
136
|
-
// } else {
|
|
137
|
-
// setQty(currentQty - 1)
|
|
138
|
-
// }
|
|
139
|
-
// }
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
// let share = [
|
|
143
|
-
// {
|
|
144
|
-
// icon: 'icons/ic_facebook.png',
|
|
145
|
-
// title: 'Facebook',
|
|
146
|
-
// onPress: () => { EventShare.facebook(data?.url) }
|
|
147
|
-
// },
|
|
148
|
-
// {
|
|
149
|
-
// icon: 'icons/ic_whatsapp.png',
|
|
150
|
-
// title: 'Whatsapp',
|
|
151
|
-
// onPress: () => { EventShare.whatsapp(data?.url) }
|
|
152
|
-
// },
|
|
153
|
-
// {
|
|
154
|
-
// icon: 'icons/ic_twitter.png',
|
|
155
|
-
// title: 'Twitter',
|
|
156
|
-
// onPress: () => { EventShare.twitter(data?.url) }
|
|
157
|
-
// },
|
|
158
|
-
// {
|
|
159
|
-
// icon: 'icons/ic_copy.png',
|
|
160
|
-
// title: esp.lang("event/artist_detail", "copy"),
|
|
161
|
-
// onPress: () => {
|
|
162
|
-
// LibUtils.copyToClipboard(data?.url).then((v) => {
|
|
163
|
-
// LibToastProperty.show(esp.lang("event/artist_detail", "alert"))
|
|
164
|
-
// })
|
|
165
|
-
// }
|
|
166
|
-
// },
|
|
167
|
-
// ]
|
|
168
|
-
|
|
169
|
-
// function renderShare(item: any, i: number) {
|
|
170
|
-
// return (
|
|
171
|
-
// <View key={i} style={applyStyle({ marginRight: 10 })}>
|
|
172
|
-
// <TouchableOpacity onPress={item.onPress} >
|
|
173
|
-
// <LibPicture style={applyStyle({ resizeMode: 'contain', height: 25, width: 25, borderRadius: 12.5, backgroundColor: 'white' })} source={esp.assets(item.icon)} />
|
|
174
|
-
// </TouchableOpacity>
|
|
175
|
-
// </View>
|
|
176
|
-
// )
|
|
177
|
-
// }
|
|
178
|
-
|
|
179
|
-
// function renderItem(item: any, itemT: any, iT: number) {
|
|
180
|
-
// let ticketWithDate = item.price_date == 1 && item.use_code == 0
|
|
181
|
-
// let ticketSpecial = item.price_date == 0 && item.use_code == 0
|
|
182
|
-
|
|
183
|
-
// let _selectedTicket = item.price_id == selectedTicket?.price_id && itemT.date_id == selectedTicket?.list?.date_id
|
|
184
|
-
|
|
185
|
-
// let colorDefault = _selectedTicket ? "#FFE9AD" : '#fff'
|
|
186
|
-
// let colorBackground = item?.status != 1 ? LibStyle.colorLightGrey : itemT?.status != 1 ? LibStyle.colorLightGrey : colorDefault
|
|
187
|
-
// let textOpacity = /* item?.status == 1 ? 1 : */ itemT?.status == 1 ? 1 : 0.3
|
|
188
|
-
|
|
189
|
-
// return (
|
|
190
|
-
// <TouchableOpacity
|
|
191
|
-
// onPress={() => {
|
|
192
|
-
// let itemTicket = {
|
|
193
|
-
// ...item
|
|
194
|
-
// }
|
|
195
|
-
// let replaceList = LibObject.set(itemTicket, itemT)('list')
|
|
196
|
-
// let msg = itemT?.status == 0 ? esp.lang("event/artist_detail", "sold_out") : esp.lang("event/artist_detail", "coming_soon")
|
|
197
|
-
|
|
198
|
-
// // kondisi untuk tipe tiket yang ada tanggalnya
|
|
199
|
-
// if (item?.status == 1 && itemT?.status == 1) {
|
|
200
|
-
// setSelectedTicket(replaceList)
|
|
201
|
-
// setQty(item.qty_min)
|
|
202
|
-
// } else if (item?.status == 0) {
|
|
203
|
-
// LibToastProperty.show(msg)
|
|
204
|
-
// } else if (item?.status == 2) {
|
|
205
|
-
// LibToastProperty.show(msg)
|
|
206
|
-
// }
|
|
207
|
-
// }} activeOpacity={itemT?.status == 1 ? 0 : 1} key={iT} style={{ flex: 1, flexDirection: 'row', backgroundColor: colorBackground, justifyContent: 'space-between', padding: 10, alignItems: 'center' }}>
|
|
208
|
-
// {
|
|
209
|
-
// ticketWithDate ?
|
|
210
|
-
// // view untuk yang ada tanggalnya
|
|
211
|
-
// <View style={{ flex: 1, flexDirection: 'row', alignContent: 'center', alignItems: 'center', }}>
|
|
212
|
-
// <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' })}>
|
|
213
|
-
// <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>
|
|
214
|
-
// </View>
|
|
215
|
-
// <View style={applyStyle({ flexDirection: 'column', flex: 1 })}>
|
|
216
|
-
// {
|
|
217
|
-
// item?.status == 1 && itemT.status != 1 &&
|
|
218
|
-
// <View style={applyStyle({ flexDirection: 'row', marginBottom: 5 })}>
|
|
219
|
-
// <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 })}>
|
|
220
|
-
// <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>
|
|
221
|
-
// </View>
|
|
222
|
-
// </View>
|
|
223
|
-
// }
|
|
224
|
-
// <>
|
|
225
|
-
// <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>
|
|
226
|
-
// <View style={applyStyle({ flexDirection: 'row', alignItems: "center" })}>
|
|
227
|
-
// <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>
|
|
228
|
-
// <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>
|
|
229
|
-
// </View>
|
|
230
|
-
// </>
|
|
231
|
-
// </View>
|
|
232
|
-
// </View>
|
|
233
|
-
// :
|
|
234
|
-
// // view untuk yang undangan dan khusus
|
|
235
|
-
// <View style={{ flex: 1, flexDirection: 'row', alignContent: 'center', alignItems: 'center' }}>
|
|
236
|
-
// <LibPicture source={esp.assets('icons/ic_special2.png')} style={{ height: 42, width: 42 }} />
|
|
237
|
-
// <View style={{ marginLeft: 14, flex: 1 }} >
|
|
238
|
-
// {
|
|
239
|
-
// item?.status == 1 && itemT.status != 1 &&
|
|
240
|
-
// <View style={applyStyle({ flexDirection: 'row', marginBottom: 5 })}>
|
|
241
|
-
// <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 })}>
|
|
242
|
-
// <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>
|
|
243
|
-
// </View>
|
|
244
|
-
// </View>
|
|
245
|
-
// }
|
|
246
|
-
// {/* <Text allowFontScaling={false} style={{ fontFamily: "Arial", fontSize: 14, fontWeight: "bold", fontStyle: "normal", letterSpacing: 0, color: _selectedTicket ? "#3ea4dc" : '#999' }}>{item.type}</Text> */}
|
|
247
|
-
// {
|
|
248
|
-
// item.info != "" &&
|
|
249
|
-
// <EventHtmltext allowFontScaling={false} style={{ flexWrap: 'wrap', fontFamily: "Arial", fontSize: 11, fontStyle: "normal", letterSpacing: 0, color: _selectedTicket ? "#3ea4dc" : '#999' }}>{item.info}</EventHtmltext>
|
|
250
|
-
// }
|
|
251
|
-
// </View>
|
|
252
|
-
// </View>
|
|
253
|
-
// }
|
|
254
|
-
|
|
255
|
-
// <View style={applyStyle({ marginRight: 5, marginLeft: 5, flexDirection: 'column' })} >
|
|
256
|
-
// {
|
|
257
|
-
// (itemT?.status == 1 || itemT?.status == 0) &&
|
|
258
|
-
// <Text allowFontScaling={false} style={applyStyle({ opacity: ticketWithDate ? textOpacity : 1, fontFamily: "Arial", fontSize: 12, fontWeight: "bold", fontStyle: "normal", letterSpacing: 0, textAlign: "right", color: _selectedTicket ? "#3ea4dc" : (itemT.price == 0 ? LibStyle.colorGreen : '#999') })} >{itemT.price == 0 ? esp.lang("event/ticket_list", "free") : LibUtils.money(itemT.price, item.currency)}</Text>
|
|
259
|
-
// }
|
|
260
|
-
// {
|
|
261
|
-
// item?.status == 1 && (ticketWithDate || ticketSpecial) && _selectedTicket &&
|
|
262
|
-
// <View style={applyStyle({ marginTop: 4, flexDirection: 'row', marginLeft: 8, alignContent: 'center', alignItems: 'center' })}>
|
|
263
|
-
// <TouchableOpacity onPress={() => { min() }}>
|
|
264
|
-
// <View style={applyStyle({ width: 28, height: 28, borderRadius: 6, backgroundColor: "#ecf0f1", justifyContent: 'center', alignContent: 'center', alignItems: 'center' })}>
|
|
265
|
-
// <LibIcon name="minus" color="#e74c3c" />
|
|
266
|
-
// </View>
|
|
267
|
-
// </TouchableOpacity>
|
|
268
|
-
// <Text style={applyStyle({ fontFamily: "Arial", fontSize: 20, fontWeight: "bold", fontStyle: "normal", letterSpacing: 0, color: "#9b9b9b", marginLeft: 13, marginRight: 13 })}>{qty}</Text>
|
|
269
|
-
// <TouchableOpacity onPress={() => { add() }}>
|
|
270
|
-
// <View style={applyStyle({ width: 28, height: 28, borderRadius: 6, backgroundColor: "#ecf0f1", justifyContent: 'center', alignContent: 'center', alignItems: 'center' })}>
|
|
271
|
-
// <LibIcon name="plus" color="#16a085" />
|
|
272
|
-
// </View>
|
|
273
|
-
// </TouchableOpacity>
|
|
274
|
-
// </View>
|
|
275
|
-
// }
|
|
276
|
-
// </View>
|
|
277
|
-
// </TouchableOpacity>
|
|
278
|
-
// )
|
|
279
|
-
// }
|
|
280
|
-
|
|
281
|
-
// if (!priceList) {
|
|
282
|
-
// return <LibLoading />
|
|
283
|
-
// }
|
|
284
|
-
|
|
285
|
-
// const bgHeight = LibStyle.width * 9 / 16
|
|
286
|
-
|
|
287
|
-
// function renderImages(item: any, i: number) {
|
|
288
|
-
// const styleId_Z1ecB7O: any = { height: bgHeight, width: LibStyle.width, resizeMode: 'cover' }
|
|
289
|
-
// return (
|
|
290
|
-
// <TouchableOpacity key={i} onPress={() => LibNavigation.navigate('lib/gallery', { images: data?.images_artist, index: i })}>
|
|
291
|
-
// <LibPicture source={{ uri: item.image }} style={styleId_Z1ecB7O} />
|
|
292
|
-
// </TouchableOpacity>
|
|
293
|
-
// )
|
|
294
|
-
// }
|
|
295
|
-
|
|
296
|
-
// const maxDisplay = 3;
|
|
297
|
-
// const handleShowAll = (price_id: any) => {
|
|
298
|
-
// setShowAll((prevShowAll: any) => ({
|
|
299
|
-
// ...prevShowAll,
|
|
300
|
-
// [price_id]: !prevShowAll[price_id],
|
|
301
|
-
// }));
|
|
302
|
-
// };
|
|
303
|
-
|
|
304
|
-
// return (
|
|
305
|
-
// <View style={{ flex: 1 }} >
|
|
306
|
-
// <EventHeader title={esp.lang("event/artist_detail", "title")} subtitle={data?.title} />
|
|
307
|
-
// <ScrollView>
|
|
308
|
-
// {
|
|
309
|
-
// data?.images_artist && data?.images_artist?.length > 0 ?
|
|
310
|
-
// <LibCarrousel
|
|
311
|
-
// delay={3000}
|
|
312
|
-
// style={{ height: bgHeight, width: LibStyle.width }}
|
|
313
|
-
// autoplay
|
|
314
|
-
// bullets
|
|
315
|
-
// bulletStyle={{ width: 7, height: 7, backgroundColor: "#fff", borderRadius: 3.5, borderWidth: 0, marginHorizontal: 2 }}
|
|
316
|
-
// chosenBulletStyle={{ width: 7, height: 7, backgroundColor: "#f4e31b", borderRadius: 3.5, borderWidth: 0, marginHorizontal: 2 }}
|
|
317
|
-
// bulletsContainerStyle={{ marginBottom: -10 }}>
|
|
318
|
-
// {
|
|
319
|
-
// data?.images_artist && data?.images_artist?.map(renderImages)
|
|
320
|
-
// }
|
|
321
|
-
// </LibCarrousel>
|
|
322
|
-
// :
|
|
323
|
-
// <Pressable onPress={() => LibNavigation.navigate('lib/gallery', { image: data?.image_artist })} >
|
|
324
|
-
// <LibPicture
|
|
325
|
-
// style={applyStyle({ height: LibStyle.width * 9 / 16, width: LibStyle.width, backgroundColor: '#f2f3f4' })}
|
|
326
|
-
// source={{ uri: data?.image_artist }} />
|
|
327
|
-
// </Pressable>
|
|
328
|
-
// }
|
|
329
|
-
// <View style={applyStyle({ marginTop: 10, marginLeft: 17, flexDirection: 'row' })}>
|
|
330
|
-
// {
|
|
331
|
-
// share.map(renderShare)
|
|
332
|
-
// }
|
|
333
|
-
// </View>
|
|
334
|
-
// <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>
|
|
335
|
-
// {/* {
|
|
336
|
-
// data && priceList?.map?.(renderPrieList)
|
|
337
|
-
// } */}
|
|
338
|
-
// {
|
|
339
|
-
// data?.description != "" &&
|
|
340
|
-
// <ScrollView>
|
|
341
|
-
// <LibWebview onFinishLoad={() => { }} source={{ html: data?.description }} />
|
|
342
|
-
// </ScrollView>
|
|
343
|
-
// }
|
|
344
|
-
// {
|
|
345
|
-
// data && data?.youtube != "" &&
|
|
346
|
-
// <>
|
|
347
|
-
// <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>
|
|
348
|
-
// <TouchableOpacity onPress={() => LibNavigation.navigate('lib/video', { code: data?.youtube })} >
|
|
349
|
-
// <LibPicture source={{ uri: LibVideoProperty.getUrlThumbnail(data?.youtube) }} style={applyStyle({ height: LibStyle.width * 9 / 16, width: LibStyle.width - 40, marginHorizontal: 20, resizeMode: 'cover' })} />
|
|
350
|
-
// </TouchableOpacity>
|
|
351
|
-
// </>
|
|
352
|
-
// }
|
|
353
|
-
// </ScrollView>
|
|
354
|
-
// <View style={applyStyle({ flexDirection: 'row', padding: 10, backgroundColor: 'white' })} >
|
|
355
|
-
|
|
356
|
-
// {
|
|
357
|
-
// data?.book_available == 1 ?
|
|
358
|
-
// <EventButton label={esp.lang("event/artist_detail", "buy_ticket")} onPress={() => {
|
|
359
|
-
// EventIndexProperty.isLogin(() => {
|
|
360
|
-
// showSchedule.current?.show()
|
|
361
|
-
// })
|
|
362
|
-
// }} style={applyStyle({ backgroundColor: LibStyle.colorGreen })} />
|
|
363
|
-
// :
|
|
364
|
-
// <View style={applyStyle({ flex: 1, height: 35, borderRadius: 17, backgroundColor: LibStyle.colorLightGrey, justifyContent: 'center', alignItems: 'center', paddingHorizontal: 9 })} >
|
|
365
|
-
// <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>
|
|
366
|
-
// </View>
|
|
367
|
-
// }
|
|
368
|
-
// </View>
|
|
369
|
-
|
|
370
|
-
// <LibSlidingup ref={showSchedule}>
|
|
371
|
-
// <View style={applyStyle({ backgroundColor: 'white', borderTopRightRadius: 30, borderTopLeftRadius: 30, paddingTop: 15, maxHeight: LibStyle.height - (LibStyle.height / 3) })}>
|
|
372
|
-
// <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>
|
|
373
|
-
// <ScrollView showsVerticalScrollIndicator={false} >
|
|
374
|
-
// {
|
|
375
|
-
// priceList?.length > 0 && sortByStatus(priceList)?.map((item: any, i: number) => {
|
|
376
|
-
// let filterFullData = priceList?.filter((it: any) => it.status != 0)
|
|
377
|
-
// const displayedData = showAll[item.price_id] ? item?.list : item?.list.slice(0, maxDisplay);
|
|
378
|
-
|
|
379
|
-
// let textOpacity = item?.status == 1 ? 1 : 0.3
|
|
380
|
-
// let selTic = item.price_id == selectedTicket?.price_id
|
|
381
|
-
// let ticketWithDate = item.price_date == 1 && item.use_code == 0
|
|
382
|
-
// return (
|
|
383
|
-
// <Pressable onPress={() => {
|
|
384
|
-
|
|
385
|
-
// }} key={i} style={{ overflow: 'hidden', margin: 15, marginBottom: 5, backgroundColor: '#fff', borderRadius: 10, ...LibStyle.elevation(2), borderWidth: 1, borderColor: selTic ? LibStyle.colorBlue : LibStyle.colorBgGrey }}>
|
|
386
|
-
// <View style={{ padding: 10, backgroundColor: '#f1f2f3', borderTopLeftRadius: 10, borderTopRightRadius: 10 }}>
|
|
387
|
-
// {
|
|
388
|
-
// item?.hasOwnProperty('label') && (item?.label != "" && item?.label != null) &&
|
|
389
|
-
// <View style={applyStyle({ flexDirection: 'row' })}>
|
|
390
|
-
// <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 })}>
|
|
391
|
-
// <Text allowFontScaling={false} style={{ fontSize: 10, fontStyle: "normal", letterSpacing: 0.5, color: EventOrder_itemProperty.textColor(item?.label_color), fontWeight: 'bold' }}>{item?.label}</Text>
|
|
392
|
-
// </View>
|
|
393
|
-
// </View>
|
|
394
|
-
// }
|
|
395
|
-
// <View style={{ alignContent: 'center', alignItems: 'center', flexDirection: 'row', justifyContent: 'space-between', }}>
|
|
396
|
-
// <EventHtmltext allowFontScaling={false} style={{ opacity: textOpacity, fontWeight: 'bold' }}>{item.type}</EventHtmltext>
|
|
397
|
-
// {
|
|
398
|
-
// item.qty_min > 1 &&
|
|
399
|
-
// <Text style={{ color: LibStyle.colorRed, fontSize: 10, fontWeight: 'normal' }}> {"(" + esp.lang("event/ticket_list", "min_order") + LibUtils.number(item.qty_min) + ")"}</Text>
|
|
400
|
-
// }
|
|
401
|
-
// {
|
|
402
|
-
// item?.status != 1 &&
|
|
403
|
-
// <View style={applyStyle({ flexDirection: 'row' })}>
|
|
404
|
-
// <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 })}>
|
|
405
|
-
// <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>
|
|
406
|
-
// </View>
|
|
407
|
-
// </View>
|
|
408
|
-
// }
|
|
409
|
-
// </View>
|
|
410
|
-
// {
|
|
411
|
-
// item.info != "" && ticketWithDate &&
|
|
412
|
-
// <View style={{ marginTop: 3, alignContent: 'center', alignItems: 'center', flexDirection: 'row', marginRight: 5 }}>
|
|
413
|
-
// <Text allowFontScaling={false} style={{ fontSize: 12, color: LibStyle.colorBlue }}>{item.info}</Text>
|
|
414
|
-
// </View>
|
|
415
|
-
// }
|
|
416
|
-
// </View>
|
|
417
|
-
// {
|
|
418
|
-
// displayedData?.map((itemT: any, iT: number) => renderItem(item, itemT, iT))
|
|
419
|
-
// }
|
|
420
|
-
|
|
421
|
-
// {
|
|
422
|
-
// filterFullData?.[i]?.list?.length > 3 &&
|
|
423
|
-
// <TouchableOpacity onPress={() => {
|
|
424
|
-
// handleShowAll(item.price_id)
|
|
425
|
-
// }} style={{ borderTopColor: LibStyle.colorGrey, borderTopWidth: 0.8, flex: 1, padding: 8, flexDirection: 'row', alignContent: 'center', alignItems: 'center', justifyContent: 'center' }}>
|
|
426
|
-
// <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>
|
|
427
|
-
// <LibIcon name={showAll[item.price_id] ? 'chevron-up-circle-outline' : 'chevron-down-circle-outline'} color={LibStyle.colorBlue} size={18} />
|
|
428
|
-
// </TouchableOpacity>
|
|
429
|
-
// }
|
|
430
|
-
|
|
431
|
-
// </Pressable>
|
|
432
|
-
// )
|
|
433
|
-
// })
|
|
434
|
-
// }
|
|
435
|
-
// </ScrollView>
|
|
436
|
-
// <View style={applyStyle({ paddingVertical: 10 })} >
|
|
437
|
-
// {
|
|
438
|
-
// data?.price_type_info != "" &&
|
|
439
|
-
// <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>
|
|
440
|
-
// }
|
|
441
|
-
// {
|
|
442
|
-
// data?.book_available == 1 ?
|
|
443
|
-
// <>
|
|
444
|
-
// {
|
|
445
|
-
// data?.book_available == 0 && data.end_booking <= date && data.end_booking != '0000-00-00 00:00:00' ?
|
|
446
|
-
// <View style={applyStyle({ flex: 1, height: 35, borderRadius: 17, backgroundColor: LibStyle.colorLightGrey, justifyContent: 'center', alignItems: 'center', paddingHorizontal: 9 })} >
|
|
447
|
-
// <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>
|
|
448
|
-
// </View>
|
|
449
|
-
// :
|
|
450
|
-
// <>
|
|
451
|
-
// {
|
|
452
|
-
// loading ?
|
|
453
|
-
// <View style={{ minWidth: '100%', alignSelf: 'center' }} >
|
|
454
|
-
// <View style={{ borderWidth: 1, borderColor: 'rgba(0, 0, 0, 0)', height: 40, borderRadius: 16, backgroundColor: "#e6e6e6", alignItems: 'center', justifyContent: 'center', paddingHorizontal: 9 }} >
|
|
455
|
-
// <ActivityIndicator size={"small"} color={LibStyle.colorPrimary} />
|
|
456
|
-
// </View>
|
|
457
|
-
// </View>
|
|
458
|
-
// :
|
|
459
|
-
// <EventButton label={esp.lang("event/artist_detail", "buy_ticket")} onPress={() => {
|
|
460
|
-
// EventIndexProperty.isLogin(() => {
|
|
461
|
-
// EventArtist_checkout().doPayment(data, getPriceList(), getSelectedTicket(), getQty(), subscribed)
|
|
462
|
-
// })
|
|
463
|
-
// }} style={{ backgroundColor: LibStyle.colorGreen, marginTop: 2, marginHorizontal: 15 }} />
|
|
464
|
-
// }
|
|
465
|
-
// </>
|
|
466
|
-
// }
|
|
467
|
-
// </>
|
|
468
|
-
// :
|
|
469
|
-
// <View style={applyStyle({ flex: 1, height: 35, borderRadius: 17, backgroundColor: LibStyle.colorLightGrey, justifyContent: 'center', alignItems: 'center', paddingHorizontal: 9 })} >
|
|
470
|
-
// <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>
|
|
471
|
-
// </View>
|
|
472
|
-
// }
|
|
473
|
-
// </View>
|
|
474
|
-
// </View>
|
|
475
|
-
// </LibSlidingup>
|
|
476
|
-
|
|
477
|
-
// </View>
|
|
478
|
-
// )
|
|
479
|
-
// }
|