esoftplay-event 0.0.2-v → 0.0.2-x
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/additional.tsx +1 -1
- package/event/additional_new.tsx +565 -0
- package/event/artist.tsx +7 -6
- package/event/artist_detail.tsx +5 -3
- package/event/artist_detailv2.tsx +129 -69
- package/event/artistv2.tsx +2 -11
- package/event/capture.tsx +2 -0
- package/event/countdown.tsx +10 -6
- package/event/detail.tsx +10 -13
- package/event/detail2.tsx +63 -61
- package/event/loading_page.tsx +62 -82
- package/event/order_detail.tsx +13 -6
- package/event/order_detail_upgrade_payment.tsx +3 -2
- package/event/order_reschedule.tsx +28 -15
- package/event/payment_subscribe.tsx +18 -0
- package/event/point_events.tsx +35 -0
- package/event/point_redemption.tsx +101 -0
- package/event/point_redemption_exchange.tsx +60 -0
- package/event/point_redemption_input.tsx +56 -0
- package/event/point_redemption_success.tsx +50 -0
- package/event/point_summary.tsx +48 -0
- package/event/schedule.tsx +1 -1
- package/event/schedule2.tsx +86 -0
- package/event/seat_map_new.tsx +4 -4
- package/event/ticket_list2.tsx +13 -3
- package/event/ticket_list_item.tsx +61 -0
- package/event/ticket_list_new.tsx +710 -0
- package/event/tms_dashboard.tsx +62 -25
- package/event/tms_gate.tsx +7 -13
- package/event/tms_home.tsx +4 -4
- package/id.json +6 -1
- package/package.json +1 -1
|
@@ -11,7 +11,6 @@ import { LibCarrousel } from 'esoftplay/cache/lib/carrousel/import';
|
|
|
11
11
|
import { LibCurl } from 'esoftplay/cache/lib/curl/import';
|
|
12
12
|
import { LibIcon } from 'esoftplay/cache/lib/icon/import';
|
|
13
13
|
import { LibNavigation } from 'esoftplay/cache/lib/navigation/import';
|
|
14
|
-
import { LibObject } from 'esoftplay/cache/lib/object/import';
|
|
15
14
|
import { LibPicture } from 'esoftplay/cache/lib/picture/import';
|
|
16
15
|
import { LibProgress } from 'esoftplay/cache/lib/progress/import';
|
|
17
16
|
import { LibSlidingup } from 'esoftplay/cache/lib/slidingup/import';
|
|
@@ -38,7 +37,7 @@ export default function m(props: EventArtist_detailv2Props): any {
|
|
|
38
37
|
const [detailArtist, setDetailArtist] = useSafeState<any>()
|
|
39
38
|
|
|
40
39
|
let showSchedule = React.useRef<LibSlidingup>(null)
|
|
41
|
-
const [
|
|
40
|
+
const [, setSelectedTicket, getSelectedTicket] = useSafeState<any[]>([])
|
|
42
41
|
const [showAll, setShowAll] = useSafeState<any>({});
|
|
43
42
|
const [qty, setQty] = useSafeState<any>(1)
|
|
44
43
|
const [refreshing, setRefreshing] = useSafeState<boolean>(false);
|
|
@@ -47,10 +46,11 @@ export default function m(props: EventArtist_detailv2Props): any {
|
|
|
47
46
|
loadDataArtist()
|
|
48
47
|
}, [])
|
|
49
48
|
|
|
50
|
-
esp.log({ priceList, detailArtist });
|
|
49
|
+
// esp.log({ priceList, detailArtist });
|
|
51
50
|
|
|
52
51
|
function loadDataArtist(): void {
|
|
53
52
|
new LibCurl(url, null, (res) => {
|
|
53
|
+
esp.log({ res, url });
|
|
54
54
|
setRefreshing(false)
|
|
55
55
|
setDetailArtist(res)
|
|
56
56
|
loadDataPrice(res?.url_price)
|
|
@@ -81,7 +81,7 @@ export default function m(props: EventArtist_detailv2Props): any {
|
|
|
81
81
|
|
|
82
82
|
function loadDataPriceConfig(url: string) {
|
|
83
83
|
let post = {
|
|
84
|
-
price_ids:
|
|
84
|
+
price_ids: "1",
|
|
85
85
|
event_id: 443
|
|
86
86
|
}
|
|
87
87
|
LibProgress.show("Mohon tunggu")
|
|
@@ -104,77 +104,136 @@ export default function m(props: EventArtist_detailv2Props): any {
|
|
|
104
104
|
};
|
|
105
105
|
|
|
106
106
|
|
|
107
|
-
function add(): void {
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
}
|
|
107
|
+
// function add(): void {
|
|
108
|
+
// let hasQuota = getSelectedTicket().quota > 0
|
|
109
|
+
// const min = hasQuota ? Number(getSelectedTicket()?.quota) - Number(getSelectedTicket()?.quota_used) : Number(getSelectedTicket()?.qty_max)
|
|
110
|
+
// if (qty < Math.min(min, Number(getSelectedTicket()?.qty_max))) {
|
|
111
|
+
// setQty(Number(qty) + 1)
|
|
112
|
+
// }
|
|
113
|
+
// }
|
|
114
114
|
|
|
115
|
-
function min(): void {
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
}
|
|
115
|
+
// function min(): void {
|
|
116
|
+
// if (qty <= getSelectedTicket()?.qty_min) {
|
|
117
|
+
// setQty(Number(getSelectedTicket()?.qty_min))
|
|
118
|
+
// } else {
|
|
119
|
+
// setQty(qty == 1 ? 1 : qty - 1)
|
|
120
|
+
// }
|
|
121
|
+
// }
|
|
122
122
|
|
|
123
123
|
function onRefresh() {
|
|
124
124
|
setRefreshing(true)
|
|
125
125
|
loadDataArtist()
|
|
126
126
|
}
|
|
127
127
|
|
|
128
|
-
function
|
|
128
|
+
function selectTicket(priceTypeItem: any, ticket: any, isMultiple: number) {
|
|
129
|
+
const selectedData = {
|
|
130
|
+
...ticket,
|
|
131
|
+
qty: Number(priceTypeItem.qty_min),
|
|
132
|
+
qty_min: Number(priceTypeItem?.qty_min),
|
|
133
|
+
qty_max: Number(priceTypeItem?.qty_max),
|
|
134
|
+
list_id: ticket.list_id,
|
|
135
|
+
subtotal: Number(ticket.price) * Number(priceTypeItem.qty_min),
|
|
136
|
+
type: priceTypeItem?.type,
|
|
137
|
+
tax: priceTypeItem?.tax,
|
|
138
|
+
term: priceTypeItem?.term,
|
|
139
|
+
has_addition: priceTypeItem?.has_addition,
|
|
140
|
+
image_map: priceTypeItem?.image_map,
|
|
141
|
+
use_seat: priceTypeItem?.use_seat,
|
|
142
|
+
adjacent_seats: priceTypeItem?.config?.seat_autopick,
|
|
143
|
+
fee_amount: priceTypeItem?.fee_amount,
|
|
144
|
+
fee_type: priceTypeItem?.fee_type,
|
|
145
|
+
// event_id: availableResult?.id
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
setSelectedTicket((prev: any) => {
|
|
149
|
+
const alreadySelected = prev.some((x: any) => x.list_id == ticket.list_id)
|
|
150
|
+
|
|
151
|
+
// SINGLE
|
|
152
|
+
if (isMultiple != 1) {
|
|
153
|
+
|
|
154
|
+
// klik lagi = unselect
|
|
155
|
+
if (alreadySelected) {
|
|
156
|
+
return []
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
// replace semua
|
|
160
|
+
return [selectedData]
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
// MULTIPLE
|
|
164
|
+
// remove
|
|
165
|
+
if (alreadySelected) {
|
|
166
|
+
return prev.filter((x: any) => x.list_id != ticket.list_id)
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
// add
|
|
170
|
+
return [...prev, selectedData]
|
|
171
|
+
})
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
function getTicketStatusMessage(priceTypeItem: any, ticket: any) {
|
|
175
|
+
const status = priceTypeItem.status != 1 ? priceTypeItem.status : ticket.status
|
|
176
|
+
|
|
177
|
+
switch (status) {
|
|
178
|
+
case 2:
|
|
179
|
+
return "Segera Hadir"
|
|
180
|
+
|
|
181
|
+
case 0:
|
|
182
|
+
return "Habis terjual"
|
|
183
|
+
|
|
184
|
+
default:
|
|
185
|
+
return ""
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
function renderItem(itemC: any, iC: any, item: any) {
|
|
129
190
|
let ticketWithDate = item.price_date == 1 && item.use_code == 0
|
|
130
191
|
let ticketSpecial = item.price_date == 0 && item.use_code == 0
|
|
131
192
|
|
|
132
|
-
let _selectedTicket = item.price_id == selectedTicket?.price_id &&
|
|
193
|
+
// let _selectedTicket = item.price_id == selectedTicket?.price_id && itemC?.index_id == selectedTicket?.list?.index_id
|
|
194
|
+
let _selectedTicket = getSelectedTicket()?.find((x: any) => x.list_id == itemC.list_id)
|
|
195
|
+
// const qty = _selectedTicket?.qty || 0
|
|
196
|
+
let isMultiple = 1
|
|
197
|
+
|
|
133
198
|
|
|
134
199
|
let colorDefault = _selectedTicket ? "#FFE9AD" : '#fff'
|
|
135
|
-
let colorBackground = item?.status != 1 ? LibStyle.colorLightGrey :
|
|
136
|
-
let textOpacity = /* item?.status == 1 ? 1 : */
|
|
200
|
+
let colorBackground = item?.status != 1 ? LibStyle.colorLightGrey : itemC?.status != 1 ? LibStyle.colorLightGrey : colorDefault
|
|
201
|
+
let textOpacity = /* item?.status == 1 ? 1 : */ itemC?.status == 1 ? 1 : 0.3
|
|
137
202
|
|
|
138
203
|
return (
|
|
139
204
|
<TouchableOpacity
|
|
140
205
|
onPress={() => {
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
// kondisi untuk tipe tiket yang ada tanggalnya
|
|
148
|
-
if (item?.status == 1 && itemT?.status == 1) {
|
|
149
|
-
setSelectedTicket(replaceList)
|
|
150
|
-
setQty(item.qty_min)
|
|
151
|
-
} else if (item?.status == 0) {
|
|
152
|
-
LibToastProperty.show(msg)
|
|
153
|
-
} else if (item?.status == 2) {
|
|
154
|
-
LibToastProperty.show(msg)
|
|
206
|
+
const isAvailable = item.status == 1 && itemC.status == 1
|
|
207
|
+
|
|
208
|
+
if (!isAvailable) {
|
|
209
|
+
LibToastProperty.show(getTicketStatusMessage(item, itemC))
|
|
210
|
+
return
|
|
155
211
|
}
|
|
156
|
-
|
|
212
|
+
selectTicket(item, itemC, isMultiple)
|
|
213
|
+
|
|
214
|
+
|
|
215
|
+
}} activeOpacity={itemC?.status == 1 ? 0 : 1} key={iC} style={{ flex: 1, flexDirection: 'row', backgroundColor: colorBackground, justifyContent: 'space-between', padding: 10, alignItems: 'center' }}>
|
|
157
216
|
{
|
|
158
|
-
|
|
217
|
+
itemC?.ondate == "0000-00-00" ?
|
|
159
218
|
<LibPicture source={esp.assets('icons/ic_special2.png')} style={{ height: 42, width: 42 }} />
|
|
160
219
|
:
|
|
161
220
|
<>
|
|
162
221
|
<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' })}>
|
|
163
|
-
<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(
|
|
222
|
+
<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>
|
|
164
223
|
</View>
|
|
165
224
|
<View style={applyStyle({ flexDirection: 'column', flex: 1 })}>
|
|
166
225
|
{
|
|
167
|
-
item?.status == 1 &&
|
|
226
|
+
item?.status == 1 && itemC?.status != 1 &&
|
|
168
227
|
<View style={applyStyle({ flexDirection: 'row', marginBottom: 5 })}>
|
|
169
|
-
<View style={applyStyle({ alignContent: 'center', alignItems: 'center', justifyContent: 'center', marginTop: 5, borderWidth: 1, backgroundColor:
|
|
170
|
-
<Text allowFontScaling={false} style={applyStyle({ fontSize: 10, fontStyle: "normal", letterSpacing: 0, color:/*
|
|
228
|
+
<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 })}>
|
|
229
|
+
<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>
|
|
171
230
|
</View>
|
|
172
231
|
</View>
|
|
173
232
|
}
|
|
174
|
-
<Text allowFontScaling={false} style={applyStyle({ opacity: textOpacity, fontFamily: "Arial", fontSize: 14, fontWeight: "bold", fontStyle: "normal", letterSpacing: 0, color: _selectedTicket ? "#3ea4dc" : '#999' })}>{LibUtils.moment(
|
|
233
|
+
<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>
|
|
175
234
|
<View style={applyStyle({ flexDirection: 'row' })}>
|
|
176
|
-
<Text allowFontScaling={false} style={applyStyle({ opacity: textOpacity, fontFamily: "Arial", fontSize: 12, fontWeight: "bold", fontStyle: "normal", letterSpacing: 0, color: _selectedTicket ? "#3ea4dc" : '#999' })}>{LibUtils.moment(
|
|
177
|
-
<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(
|
|
235
|
+
<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>
|
|
236
|
+
<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>
|
|
178
237
|
</View>
|
|
179
238
|
</View>
|
|
180
239
|
</>
|
|
@@ -182,19 +241,19 @@ export default function m(props: EventArtist_detailv2Props): any {
|
|
|
182
241
|
|
|
183
242
|
<View style={applyStyle({ marginRight: 5, marginLeft: 5, flexDirection: 'column' })} >
|
|
184
243
|
{
|
|
185
|
-
(
|
|
186
|
-
<Text allowFontScaling={false} style={applyStyle({ opacity: ticketWithDate ? textOpacity : 1, fontFamily: "Arial", fontSize: 12, fontWeight: "bold", fontStyle: "normal", letterSpacing: 0, textAlign: "right", color: _selectedTicket ? "#3ea4dc" : (
|
|
244
|
+
(itemC?.status == 1 || itemC?.status == 0) &&
|
|
245
|
+
<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>
|
|
187
246
|
}
|
|
188
247
|
{
|
|
189
248
|
item?.status == 1 && (ticketWithDate || ticketSpecial) && _selectedTicket &&
|
|
190
249
|
<View style={applyStyle({ marginTop: 4, flexDirection: 'row', marginLeft: 8, alignContent: 'center', alignItems: 'center' })}>
|
|
191
|
-
<TouchableOpacity onPress={() => { min() }}>
|
|
250
|
+
<TouchableOpacity onPress={() => { /* min() */ }}>
|
|
192
251
|
<View style={applyStyle({ width: 28, height: 28, borderRadius: 6, backgroundColor: "#ecf0f1", alignContent: 'center', alignItems: 'center' })}>
|
|
193
252
|
<LibIcon name="minus" color="#e74c3c" />
|
|
194
253
|
</View>
|
|
195
254
|
</TouchableOpacity>
|
|
196
255
|
<Text style={applyStyle({ fontFamily: "Arial", fontSize: 20, fontWeight: "bold", fontStyle: "normal", letterSpacing: 0, color: "#9b9b9b", marginLeft: 13, marginRight: 13 })}>{qty}</Text>
|
|
197
|
-
<TouchableOpacity onPress={() => { add() }}>
|
|
256
|
+
<TouchableOpacity onPress={() => { /* add() */ }}>
|
|
198
257
|
<View style={applyStyle({ width: 28, height: 28, borderRadius: 6, backgroundColor: "#ecf0f1", alignContent: 'center', alignItems: 'center' })}>
|
|
199
258
|
<LibIcon name="plus" color="#16a085" />
|
|
200
259
|
</View>
|
|
@@ -319,47 +378,48 @@ export default function m(props: EventArtist_detailv2Props): any {
|
|
|
319
378
|
<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>
|
|
320
379
|
<ScrollView showsVerticalScrollIndicator={false} >
|
|
321
380
|
{
|
|
322
|
-
priceList?.map((
|
|
381
|
+
priceList?.map((priceType: any, i: number) => {
|
|
323
382
|
let filterFullData = priceList?.filter((it: any) => it.status != 0)
|
|
324
|
-
const displayedData = showAll[
|
|
325
|
-
let textOpacity =
|
|
326
|
-
let
|
|
383
|
+
const displayedData = showAll[priceType.price_id] ? priceType?.list : priceType?.list.slice(0, maxDisplay);
|
|
384
|
+
let textOpacity = priceType?.status == 1 ? 1 : 0.3
|
|
385
|
+
let _selectedTicket = getSelectedTicket()?.some((x: any) => x.price_id == priceType.price_id)
|
|
386
|
+
|
|
327
387
|
return (
|
|
328
|
-
<View key={i} style={{ overflow: 'hidden', margin: 15, marginBottom: 5, backgroundColor: '#fff', borderRadius: 10, ...LibStyle.elevation(2), borderWidth: 1, borderColor:
|
|
388
|
+
<View key={i} style={{ overflow: 'hidden', margin: 15, marginBottom: 5, backgroundColor: '#fff', borderRadius: 10, ...LibStyle.elevation(2), borderWidth: 1, borderColor: _selectedTicket ? LibStyle.colorBlue : LibStyle.colorBgGrey }}>
|
|
329
389
|
<View style={{ padding: 10, backgroundColor: '#f1f2f3', borderTopLeftRadius: 10, borderTopRightRadius: 10 }}>
|
|
330
390
|
<View style={{ alignContent: 'center', alignItems: 'center', flexDirection: 'row', justifyContent: 'space-between', }}>
|
|
331
|
-
<EventHtmltext allowFontScaling={false} style={{ opacity: textOpacity, fontWeight: 'bold' }}>{
|
|
391
|
+
<EventHtmltext allowFontScaling={false} style={{ opacity: textOpacity, fontWeight: 'bold' }}>{priceType.name}</EventHtmltext>
|
|
332
392
|
{
|
|
333
|
-
|
|
334
|
-
<Text style={{ color: LibStyle.colorRed, fontSize: 10, fontWeight: 'normal' }}> {"(" + esp.lang("event/ticket_list", "min_order") + LibUtils.number(
|
|
393
|
+
priceType.qty_min > 1 &&
|
|
394
|
+
<Text style={{ color: LibStyle.colorRed, fontSize: 10, fontWeight: 'normal' }}> {"(" + esp.lang("event/ticket_list", "min_order") + LibUtils.number(priceType.qty_min) + ")"}</Text>
|
|
335
395
|
}
|
|
336
396
|
{
|
|
337
|
-
|
|
397
|
+
priceType?.status != 1 &&
|
|
338
398
|
<View style={applyStyle({ flexDirection: 'row' })}>
|
|
339
|
-
<View style={applyStyle({ alignContent: 'center', alignItems: 'center', justifyContent: 'center', borderWidth: 1, backgroundColor:
|
|
340
|
-
<Text allowFontScaling={false} style={applyStyle({ fontSize: 10, fontStyle: "normal", letterSpacing: 0, color: /*
|
|
399
|
+
<View style={applyStyle({ alignContent: 'center', alignItems: 'center', justifyContent: 'center', borderWidth: 1, backgroundColor: priceType?.status == 0 ? LibStyle.colorRed : "#4cd964", borderColor: priceType?.status == 0 ? LibStyle.colorRed : "#4cd964", borderRadius: 5, padding: 3, opacity: 0.8 })}>
|
|
400
|
+
<Text allowFontScaling={false} style={applyStyle({ fontSize: 10, fontStyle: "normal", letterSpacing: 0, color: /* priceType?.status == 2 ? "#000" : */ "#fff", fontWeight: 'bold' })}>{priceType?.status == 0 ? esp.lang("event/artist_detail", "sold_out") : esp.lang("event/artist_detail", "coming_soon")}</Text>
|
|
341
401
|
</View>
|
|
342
402
|
</View>
|
|
343
403
|
}
|
|
344
404
|
</View>
|
|
345
405
|
{
|
|
346
|
-
|
|
406
|
+
priceType.hasOwnProperty("price_type_info") && priceType.price_type_info != "" &&
|
|
347
407
|
<View style={{ marginTop: 3, alignContent: 'center', alignItems: 'center', flexDirection: 'row', marginRight: 5 }}>
|
|
348
|
-
<Text allowFontScaling={false} style={{ fontSize: 12, color: LibStyle.colorBlue }}>{
|
|
408
|
+
<Text allowFontScaling={false} style={{ fontSize: 12, color: LibStyle.colorBlue }}>{priceType.price_type_info}</Text>
|
|
349
409
|
</View>
|
|
350
410
|
}
|
|
351
411
|
</View>
|
|
352
412
|
|
|
353
413
|
{
|
|
354
|
-
displayedData?.map((
|
|
414
|
+
displayedData?.map((itemC: any, iC: number) => renderItem(itemC, iC, priceType))
|
|
355
415
|
}
|
|
356
416
|
{
|
|
357
417
|
filterFullData?.[i]?.list?.length > 3 &&
|
|
358
418
|
<TouchableOpacity onPress={() => {
|
|
359
|
-
handleShowAll(
|
|
419
|
+
handleShowAll(priceType.price_id)
|
|
360
420
|
}} style={{ borderTopColor: LibStyle.colorGrey, borderTopWidth: 0.8, flex: 1, padding: 8, flexDirection: 'row', alignContent: 'center', alignItems: 'center', justifyContent: 'center' }}>
|
|
361
|
-
<Text allowFontScaling={false} style={{ marginRight: 5, fontFamily: "Arial", fontSize: 12, fontWeight: "bold", fontStyle: "normal", letterSpacing: 0, color: LibStyle.colorBlue }}>{showAll[
|
|
362
|
-
<LibIcon name={showAll[
|
|
421
|
+
<Text allowFontScaling={false} style={{ marginRight: 5, fontFamily: "Arial", fontSize: 12, fontWeight: "bold", fontStyle: "normal", letterSpacing: 0, color: LibStyle.colorBlue }}>{showAll[priceType.price_id] ? esp.lang("event/ticket_list", "see_less") : esp.lang("event/ticket_list", "see_more")}</Text>
|
|
422
|
+
<LibIcon name={showAll[priceType.price_id] ? 'chevron-up-circle-outline' : 'chevron-down-circle-outline'} color={LibStyle.colorBlue} size={18} />
|
|
363
423
|
</TouchableOpacity>
|
|
364
424
|
}
|
|
365
425
|
|
|
@@ -371,9 +431,9 @@ export default function m(props: EventArtist_detailv2Props): any {
|
|
|
371
431
|
<View style={applyStyle({ paddingVertical: 10 })} >
|
|
372
432
|
<EventButton label={esp.lang("event/artist_detail", "buy_ticket")} onPress={() => {
|
|
373
433
|
EventIndexProperty.isLogin(() => {
|
|
374
|
-
if (selectedTicket) {
|
|
375
|
-
|
|
376
|
-
}
|
|
434
|
+
// if (selectedTicket) {
|
|
435
|
+
// loadDataPriceConfig(selectedTicket?.url_config)
|
|
436
|
+
// }
|
|
377
437
|
// proceedToPayment()
|
|
378
438
|
})
|
|
379
439
|
}} style={{ backgroundColor: LibStyle.colorGreen, marginTop: 2, marginHorizontal: 15 }} />
|
package/event/artistv2.tsx
CHANGED
|
@@ -39,19 +39,10 @@ export default function m(props: EventArtistv2Props): any {
|
|
|
39
39
|
/* get detail event untuk dapat config antrian */
|
|
40
40
|
|
|
41
41
|
// new LibCurl(url, null,
|
|
42
|
-
new LibCurl('v2/event_artist&event_id=
|
|
42
|
+
new LibCurl('v2/event_artist&event_id=523', null,
|
|
43
43
|
(res) => {
|
|
44
|
-
esp.log({ res });
|
|
45
|
-
// EventFirebase_socketProperty.eventIdQueue.set(res?.[0]?.event_id)
|
|
46
|
-
// if (res.allotment) {
|
|
47
|
-
// esp.modProp("event/firebase_socket").userIdKeyReplacer.set({
|
|
48
|
-
// t: Number(res.allotment.t),
|
|
49
|
-
// s: Number(res.allotment.s),
|
|
50
|
-
// priority: 1
|
|
51
|
-
// })
|
|
52
|
-
// }
|
|
53
|
-
|
|
54
44
|
setResult(res)
|
|
45
|
+
esp.log(res);
|
|
55
46
|
}, (err) => {
|
|
56
47
|
setError(err?.message)
|
|
57
48
|
}, 1)
|
package/event/capture.tsx
CHANGED
|
@@ -19,6 +19,8 @@ export default class m {
|
|
|
19
19
|
const uriArray = images.split("/");
|
|
20
20
|
const nameToChange = uriArray[uriArray.length - 1];
|
|
21
21
|
const renamedURI = images.replace(nameToChange, name.replace(/\s/g, '_') + ".jpg");
|
|
22
|
+
|
|
23
|
+
|
|
22
24
|
if (Platform.OS == 'ios') {
|
|
23
25
|
MediaLibrary.saveToLibraryAsync(images)
|
|
24
26
|
LibToastProperty.show(esp.lang("lib/capture", "saved_to_gallery"))
|
package/event/countdown.tsx
CHANGED
|
@@ -23,6 +23,8 @@ export const countdownTime = useGlobalState<any>('0')
|
|
|
23
23
|
|
|
24
24
|
export const releaseQueue = useGlobalSubscriber()
|
|
25
25
|
|
|
26
|
+
export const eventURI = useGlobalState<string>('')
|
|
27
|
+
|
|
26
28
|
export default function m(props: EventCountdownProps): any {
|
|
27
29
|
const [timer] = countdownTime.useState()
|
|
28
30
|
const routes = UserRoutes.state().useSelector((x) => x?.routes)
|
|
@@ -36,6 +38,7 @@ export default function m(props: EventCountdownProps): any {
|
|
|
36
38
|
doneQueue(pathQueue, event_id, key, () => { })
|
|
37
39
|
EventQueue_pricingProperty.state().reset()
|
|
38
40
|
countdownTime.reset()
|
|
41
|
+
eventURI.reset()
|
|
39
42
|
}
|
|
40
43
|
})
|
|
41
44
|
|
|
@@ -57,13 +60,14 @@ export default function m(props: EventCountdownProps): any {
|
|
|
57
60
|
<EventCountdown_timestamp
|
|
58
61
|
onExpired={() => {
|
|
59
62
|
const routeNames = UserRoutes.state()?.get()?.routes?.map?.((x: any) => x.name)
|
|
60
|
-
if (routeNames.includes("event/artist"))
|
|
61
|
-
LibNavigation.navigate("event/artist")
|
|
62
|
-
else if (routeNames.includes("event/detail"))
|
|
63
|
-
LibNavigation.navigate("event/detail")
|
|
64
|
-
|
|
65
|
-
|
|
63
|
+
if (routeNames.includes("event/artist")) {
|
|
64
|
+
LibNavigation.navigate("event/artist", { url: eventURI.get() })
|
|
65
|
+
} else if (routeNames.includes("event/detail")) {
|
|
66
|
+
LibNavigation.navigate("event/detail", { url: eventURI.get() })
|
|
67
|
+
}
|
|
68
|
+
LibNavigation.backToRoot()
|
|
66
69
|
countdownTime.reset()
|
|
70
|
+
eventURI.reset()
|
|
67
71
|
}}
|
|
68
72
|
expiredTimestamp={timer}
|
|
69
73
|
style={{ color: "#fff" }} />
|
package/event/detail.tsx
CHANGED
|
@@ -14,7 +14,6 @@ import { applyStyle } from 'esoftplay';
|
|
|
14
14
|
import { EventCountdown_event } from 'esoftplay/cache/event/countdown_event/import';
|
|
15
15
|
import { EventFirebase_socketProperty } from 'esoftplay/cache/event/firebase_socket/import';
|
|
16
16
|
import { EventHeader } from 'esoftplay/cache/event/header/import';
|
|
17
|
-
import { EventIndexProperty } from 'esoftplay/cache/event/index/import';
|
|
18
17
|
import { EventSlider } from 'esoftplay/cache/event/slider/import';
|
|
19
18
|
import { UseCondition } from 'esoftplay/cache/use/condition/import';
|
|
20
19
|
import { UseDeeplinkProperty } from 'esoftplay/cache/use/deeplink/import';
|
|
@@ -35,12 +34,12 @@ export default function m(props: EventDetailProps): any {
|
|
|
35
34
|
const url = LibNavigation.getArgs(props, 'url')
|
|
36
35
|
const [deeplinkParams] = UseDeeplinkProperty.params.useState()
|
|
37
36
|
const [priority, setPriority] = useSafeState(false)
|
|
38
|
-
const user = UserClass.state().get()
|
|
39
37
|
|
|
40
38
|
moment().locale('id')
|
|
41
39
|
function loadData(): void {
|
|
42
40
|
// CacheHit.doHit(url)
|
|
43
41
|
new LibCurl(url, null, (res, msg) => {
|
|
42
|
+
esp.modProp("event/countdown").eventURI.set(url)
|
|
44
43
|
EventFirebase_socketProperty.eventIdQueue.set(res.id)
|
|
45
44
|
setResult(res)
|
|
46
45
|
if (res.allotment) {
|
|
@@ -60,12 +59,12 @@ export default function m(props: EventDetailProps): any {
|
|
|
60
59
|
}
|
|
61
60
|
|
|
62
61
|
useEffect(() => {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
loadData()
|
|
62
|
+
if (esp.isDebug("") && UserClass?.state()?.get()?.email == "bagus@fisip.net") {
|
|
63
|
+
LibNavigation.replace('event/detail2', { url: url })
|
|
64
|
+
} else {
|
|
65
|
+
loadData()
|
|
66
|
+
}
|
|
67
|
+
// loadData()
|
|
69
68
|
}, [])
|
|
70
69
|
|
|
71
70
|
if (!result) {
|
|
@@ -274,7 +273,6 @@ export default function m(props: EventDetailProps): any {
|
|
|
274
273
|
{
|
|
275
274
|
result?.url_artist != "" &&
|
|
276
275
|
<TouchableOpacity onPress={() => {
|
|
277
|
-
// LibNavigation.navigate('event/artist', { title: result?.title, url: result?.url_artist, has_addition: result?.has_addition })
|
|
278
276
|
LibNavigation.navigate('event/artist', {
|
|
279
277
|
title: result?.title,
|
|
280
278
|
url: result?.url_artist,
|
|
@@ -285,14 +283,13 @@ export default function m(props: EventDetailProps): any {
|
|
|
285
283
|
</TouchableOpacity>
|
|
286
284
|
}
|
|
287
285
|
<TouchableOpacity onPress={() => {
|
|
288
|
-
|
|
286
|
+
esp.modProp("event/index").isLogin(async () => {
|
|
289
287
|
LibNavigation.navigate(
|
|
290
|
-
|
|
291
|
-
'event/ticket_list2'
|
|
288
|
+
(esp.isDebug("") && UserClass?.state()?.get()?.email == "bagus@fisip.net") ? 'event/ticket_list_new'
|
|
292
289
|
:
|
|
293
290
|
(result?.config?.hasOwnProperty('multiprice') && result?.config?.multiprice == 1 ? 'event/ticket_list2' : 'event/ticket_list'),
|
|
294
291
|
{
|
|
295
|
-
url: result.url_price,
|
|
292
|
+
url: esp.isDebug("") && UserClass?.state()?.get()?.email == "bagus@fisip.net" ? result?.url_price_v2 : result.url_price,
|
|
296
293
|
fee_platform: {
|
|
297
294
|
fee_platform_amount: result?.fee_platform_amount,
|
|
298
295
|
fee_platform_type: result?.fee_platform_type,
|