esoftplay-event 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/event/additional.tsx +1 -1
- package/event/additional_input.tsx +15 -0
- package/event/additional_new.tsx +565 -0
- package/event/artist.tsx +14 -34
- package/event/artist_detail.tsx +336 -239
- package/event/artist_detail_multi.tsx +266 -157
- package/event/artist_detailv2.tsx +129 -69
- package/event/artistv2.tsx +5 -13
- package/event/button.tsx +2 -2
- package/event/button_order_detail.tsx +20 -8
- package/event/capture.tsx +2 -0
- package/event/checkout.ts +135 -0
- package/event/countdown.tsx +13 -9
- package/event/countdown_base.tsx +88 -48
- package/event/countdown_event.tsx +3 -0
- package/event/countdown_timestamp.tsx +106 -0
- package/event/coupon.tsx +1 -1
- package/event/coupon_generate.tsx +35 -22
- package/event/detail.tsx +9 -15
- package/event/detail2.tsx +63 -61
- package/event/dialog_custom.tsx +67 -0
- package/event/exchange_ticket_list.tsx +23 -14
- package/event/exchange_ticket_result.tsx +1 -1
- package/event/firebase_socket.ts +14 -12
- package/event/htmltext.tsx +40 -28
- package/event/index.tsx +8 -2
- package/event/label_input.tsx +2 -2
- package/event/layout.tsx +312 -0
- package/event/loading_page.tsx +62 -82
- package/event/message.tsx +2 -2
- package/event/order_detail.tsx +408 -477
- package/event/order_detail_addons.tsx +60 -0
- package/event/order_detail_addons_booked.tsx +61 -0
- package/event/order_detail_coupon.tsx +66 -0
- package/event/order_detail_instruction.tsx +96 -0
- package/event/order_detail_payment.tsx +1 -1
- package/event/order_detail_reschedule.tsx +109 -0
- package/event/order_detail_return.tsx +231 -0
- package/event/order_detail_review.tsx +174 -0
- package/event/order_detail_share.tsx +304 -0
- package/event/order_detail_tnc.tsx +76 -0
- package/event/order_detail_upgrade.tsx +140 -90
- package/event/order_detail_upgrade_payment.tsx +120 -38
- package/event/order_detail_visitor.tsx +21 -10
- package/event/order_detail_waiting.tsx +3 -3
- package/event/order_history.tsx +1 -1
- package/event/order_item.tsx +1 -1
- package/event/order_lottery.tsx +1 -1
- package/event/order_reschedule.tsx +29 -16
- package/event/order_share_to.tsx +14 -0
- package/event/order_waiting.tsx +1 -1
- 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/popup.tsx +4 -4
- package/event/queue.tsx +111 -0
- package/event/queue_pricing.tsx +17 -6
- package/event/review_add.tsx +2 -2
- package/event/scan_item.tsx +1 -1
- package/event/schedule.tsx +33 -30
- package/event/schedule2.tsx +86 -0
- package/event/seat.tsx +135 -374
- package/event/seat_map.tsx +8 -8
- package/event/seat_map_new.tsx +211 -38
- package/event/step.tsx +1 -1
- package/event/test.tsx +8 -8
- package/event/ticket.tsx +326 -0
- package/event/ticket_list.tsx +316 -258
- package/event/ticket_list2.tsx +349 -224
- package/event/ticket_list_item.tsx +61 -0
- package/event/ticket_list_new.tsx +710 -0
- package/event/tms_add_result.tsx +10 -5
- package/event/tms_check_ticket_result.tsx +16 -7
- package/event/tms_dashboard.tsx +87 -12
- package/event/tms_gate.tsx +32 -15
- package/event/tms_home.tsx +178 -92
- package/event/tms_idcard.tsx +43 -26
- package/event/tms_in.tsx +2 -3
- package/event/tms_in_failed.tsx +1 -1
- package/event/tms_in_hall.tsx +4 -1
- package/event/tms_in_hall_failed.tsx +36 -16
- package/event/tms_in_log.tsx +9 -11
- package/event/tms_in_success.tsx +13 -8
- package/event/tms_log.tsx +16 -17
- package/event/tms_out_hall_failed.tsx +1 -1
- package/event/tms_out_temporary.tsx +3 -4
- package/event/token_order.tsx +103 -0
- package/event/token_payment.tsx +79 -0
- package/event/visitor_index.tsx +60 -49
- package/event/visitor_input.tsx +336 -54
- package/event/visitor_inputv2.tsx +173 -88
- package/event/voucher.tsx +1 -1
- package/id.json +76 -4
- package/package.json +1 -1
- package/event/secure_page.debug.tsx +0 -34
- package/event/secure_page.live.tsx +0 -35
package/event/ticket.tsx
ADDED
|
@@ -0,0 +1,326 @@
|
|
|
1
|
+
// withHooks
|
|
2
|
+
// noPage
|
|
3
|
+
|
|
4
|
+
import { applyStyle } from 'esoftplay';
|
|
5
|
+
import { EventButton } from 'esoftplay/cache/event/button/import';
|
|
6
|
+
import { EventOrder_itemProperty } from 'esoftplay/cache/event/order_item/import';
|
|
7
|
+
import { LibIcon } from 'esoftplay/cache/lib/icon/import';
|
|
8
|
+
import { LibObject } from 'esoftplay/cache/lib/object/import';
|
|
9
|
+
import { LibPicture } from 'esoftplay/cache/lib/picture/import';
|
|
10
|
+
import { LibStyle } from 'esoftplay/cache/lib/style/import';
|
|
11
|
+
import { LibToastProperty } from 'esoftplay/cache/lib/toast/import';
|
|
12
|
+
import { LibUtils } from 'esoftplay/cache/lib/utils/import';
|
|
13
|
+
import esp from 'esoftplay/esp';
|
|
14
|
+
import useSafeState from 'esoftplay/state';
|
|
15
|
+
import React from 'react';
|
|
16
|
+
import { ScrollView, Text, TouchableOpacity, View } from 'react-native';
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
export interface EventTicketArgs {
|
|
20
|
+
|
|
21
|
+
}
|
|
22
|
+
export interface EventTicketProps {
|
|
23
|
+
title?: string,
|
|
24
|
+
priceList: any[],
|
|
25
|
+
multiprice?: boolean,
|
|
26
|
+
onSelectTickets: (data: any[]) => void
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export default function m(props: EventTicketProps): any {
|
|
30
|
+
const { title } = props
|
|
31
|
+
const is_multiprice = props?.multiprice || false
|
|
32
|
+
const [priceData, setPriceData, getPriceData] = useSafeState<any>(props?.priceList)
|
|
33
|
+
const [showAll, setShowAll] = useSafeState<any>({});
|
|
34
|
+
|
|
35
|
+
const maxDisplay = 3;
|
|
36
|
+
const handleShowAll = (price_id: any) => {
|
|
37
|
+
setShowAll((prevShowAll: any) => ({
|
|
38
|
+
...prevShowAll,
|
|
39
|
+
[price_id]: !prevShowAll[price_id],
|
|
40
|
+
}));
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
function handleSelect() {
|
|
44
|
+
let newResult: any[] = [];
|
|
45
|
+
getPriceData().map((priceType: any) => {
|
|
46
|
+
let filteredList = priceType.list.filter((item: any) => item.selected == 1);
|
|
47
|
+
filteredList = filteredList?.map((item: any) => ({
|
|
48
|
+
...item,
|
|
49
|
+
type: priceType?.type,
|
|
50
|
+
tax: priceType?.tax,
|
|
51
|
+
term: priceType?.term,
|
|
52
|
+
has_addition: priceType?.has_addition,
|
|
53
|
+
image_map: priceType?.image_map,
|
|
54
|
+
use_seat: priceType?.use_seat,
|
|
55
|
+
adjacent_seats: priceType?.config?.seat_autopick,
|
|
56
|
+
fee_amount: priceType?.fee_amount,
|
|
57
|
+
fee_type: priceType?.fee_type,
|
|
58
|
+
list_id: priceType?.price_id + "-" + item.ondate,
|
|
59
|
+
price_id: priceType?.price_id,
|
|
60
|
+
use_code: priceType?.use_code,
|
|
61
|
+
config: { ...priceType?.config },
|
|
62
|
+
list: {
|
|
63
|
+
...item
|
|
64
|
+
},
|
|
65
|
+
}))
|
|
66
|
+
newResult = newResult.concat(filteredList);
|
|
67
|
+
})
|
|
68
|
+
props.onSelectTickets(newResult)
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
function sortByStatus(data: any) {
|
|
72
|
+
// Fungsi sorting untuk memastikan status 1 di atas, lainnya di bawah
|
|
73
|
+
const statusSorter = (a: any, b: any) => {
|
|
74
|
+
if (a.status == 1 && b.status != 1) return -1; // a = 1, b bukan 1 -> a di atas
|
|
75
|
+
if (a.status != 1 && b.status == 1) return 1; // a bukan 1, b = 1 -> b di atas
|
|
76
|
+
return a.status - b.status; // Urutkan status selain 1 secara alami
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
return data
|
|
80
|
+
.map((item: any) => {
|
|
81
|
+
// Sorting array 'list' di dalam setiap item
|
|
82
|
+
const sortedList = item?.list?.sort(statusSorter);
|
|
83
|
+
return { ...item, list: sortedList };
|
|
84
|
+
})
|
|
85
|
+
.sort(statusSorter); // Sorting array utama
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
function renderItem(itemC: any, iC: number, item: any, i: number) {
|
|
90
|
+
let ticketWithDate = item.price_date == 1 && item.use_code == 0
|
|
91
|
+
let ticketSpecial = item.price_date == 0 && item.use_code == 0
|
|
92
|
+
|
|
93
|
+
let _selectedTicket = itemC?.selected == 1
|
|
94
|
+
|
|
95
|
+
let colorDefault = _selectedTicket ? "#FFE9AD" : '#fff'
|
|
96
|
+
let colorBackground = item?.status != 1 ? LibStyle.colorLightGrey : itemC?.status != 1 ? LibStyle.colorLightGrey : colorDefault
|
|
97
|
+
let textOpacity = itemC?.status == 1 ? 1 : 0.3
|
|
98
|
+
|
|
99
|
+
return (
|
|
100
|
+
<TouchableOpacity
|
|
101
|
+
onPress={() => {
|
|
102
|
+
let msg = itemC?.status == 0 ? esp.lang("event/artist_detail", "sold_out") : esp.lang("event/artist_detail", "coming_soon")
|
|
103
|
+
|
|
104
|
+
// kondisi untuk tipe tiket yang ada tanggalnya
|
|
105
|
+
if (item?.status == 1 && itemC?.status == 1) {
|
|
106
|
+
let data: any = []
|
|
107
|
+
if (is_multiprice) {
|
|
108
|
+
data = new LibObject(getPriceData())
|
|
109
|
+
.update((itemList) => {
|
|
110
|
+
itemList.selected = itemList.selected == 1 ? 0 : 1
|
|
111
|
+
itemList.qty = itemList.selected == 1 ? item.qty_min : 0
|
|
112
|
+
itemList.seat_autopick = item.config?.seat_autopick
|
|
113
|
+
itemList.use_seat = item.use_seat
|
|
114
|
+
return itemList
|
|
115
|
+
})(i, 'list', iC)
|
|
116
|
+
.update((priceTypeItem) => {
|
|
117
|
+
return ({
|
|
118
|
+
...priceTypeItem,
|
|
119
|
+
selected: priceTypeItem.list.some((item: any) => item.selected == 1) ? 1 : 0
|
|
120
|
+
})
|
|
121
|
+
})(i)
|
|
122
|
+
.value()
|
|
123
|
+
} else {
|
|
124
|
+
data = new LibObject(getPriceData())
|
|
125
|
+
.update((itemList) => itemList.map((x: any) => {
|
|
126
|
+
return {
|
|
127
|
+
...x,
|
|
128
|
+
selected: (x.list_id == itemC.list_id && x.price_id == item.price_id) ? 1 : 0,
|
|
129
|
+
qty: (x.list_id == itemC.list_id && x.price_id == item.price_id) ? (item.qty_min | 1) : 0,
|
|
130
|
+
seat_autopick: item.config?.seat_autopick,
|
|
131
|
+
use_seat: item.use_seat
|
|
132
|
+
}
|
|
133
|
+
}))(i, 'list')
|
|
134
|
+
.update((priceTypeItem) => priceTypeItem.map((x: any) => {
|
|
135
|
+
return {
|
|
136
|
+
...x,
|
|
137
|
+
list: x.price_id != item.price_id ? x.list.map((t: any) => ({ ...t, selected: 0 })) : x.list,
|
|
138
|
+
selected: x.price_id == item.price_id ? 1 : 0
|
|
139
|
+
}
|
|
140
|
+
})
|
|
141
|
+
)()
|
|
142
|
+
.value()
|
|
143
|
+
}
|
|
144
|
+
setPriceData(data)
|
|
145
|
+
} else if (itemC?.status == 0) {
|
|
146
|
+
LibToastProperty.show(msg)
|
|
147
|
+
} else if (itemC?.status == 2) {
|
|
148
|
+
LibToastProperty.show(msg)
|
|
149
|
+
}
|
|
150
|
+
}} 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' }}>
|
|
151
|
+
{
|
|
152
|
+
itemC.ondate == "0000-00-00" ?
|
|
153
|
+
<LibPicture source={esp.assets('icons/ic_special2.png')} style={{ height: 42, width: 42 }} />
|
|
154
|
+
:
|
|
155
|
+
<>
|
|
156
|
+
<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' })}>
|
|
157
|
+
<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>
|
|
158
|
+
</View>
|
|
159
|
+
<View style={applyStyle({ flexDirection: 'column', flex: 1 })}>
|
|
160
|
+
{
|
|
161
|
+
item?.status == 1 && itemC?.status != 1 &&
|
|
162
|
+
<View style={applyStyle({ flexDirection: 'row', marginBottom: 5 })}>
|
|
163
|
+
<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 })}>
|
|
164
|
+
<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>
|
|
165
|
+
</View>
|
|
166
|
+
</View>
|
|
167
|
+
}
|
|
168
|
+
<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>
|
|
169
|
+
<View style={applyStyle({ flexDirection: 'row' })}>
|
|
170
|
+
<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>
|
|
171
|
+
<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>
|
|
172
|
+
</View>
|
|
173
|
+
</View>
|
|
174
|
+
</>
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
<View style={applyStyle({ marginRight: 5, marginLeft: 5, flexDirection: 'column' })} >
|
|
178
|
+
{
|
|
179
|
+
(itemC?.status == 1 || itemC?.status == 0) &&
|
|
180
|
+
<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>
|
|
181
|
+
}
|
|
182
|
+
{
|
|
183
|
+
item?.status == 1 && (ticketWithDate || ticketSpecial) && itemC.selected == 1 &&
|
|
184
|
+
<View style={applyStyle({ marginTop: 4, flexDirection: 'row', marginLeft: 8, alignContent: 'center', alignItems: 'center' })}>
|
|
185
|
+
<TouchableOpacity onPress={() => {
|
|
186
|
+
let qty = 1
|
|
187
|
+
if (Number(itemC.qty) - 1 <= 0) {
|
|
188
|
+
// set 0 & unselect tiket
|
|
189
|
+
qty = 0
|
|
190
|
+
|
|
191
|
+
const data = new LibObject(priceData)
|
|
192
|
+
.update((itemList) => {
|
|
193
|
+
itemList.selected = 0
|
|
194
|
+
itemList.qty = 0
|
|
195
|
+
itemList.seat_autopick = item.config?.seat_autopick
|
|
196
|
+
itemList.use_seat = item.use_seat
|
|
197
|
+
return itemList
|
|
198
|
+
})(i, 'list', iC)
|
|
199
|
+
.update((priceTypeItem) => {
|
|
200
|
+
return ({
|
|
201
|
+
...priceTypeItem,
|
|
202
|
+
selected: priceTypeItem.list.some((item: any) => item.selected == 1) ? 1 : 0
|
|
203
|
+
})
|
|
204
|
+
})(i)
|
|
205
|
+
.value()
|
|
206
|
+
|
|
207
|
+
setPriceData(data)
|
|
208
|
+
|
|
209
|
+
} else {
|
|
210
|
+
// patuhi qty_min
|
|
211
|
+
if (itemC.qty <= item.qty_min) {
|
|
212
|
+
qty = Number(item.qty_min)
|
|
213
|
+
} else {
|
|
214
|
+
qty = Number(itemC.qty) - 1
|
|
215
|
+
}
|
|
216
|
+
// set qty baru
|
|
217
|
+
setPriceData(LibObject.set(getPriceData(), qty)(i, 'list', iC, 'qty'))
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
}}>
|
|
221
|
+
<View style={applyStyle({ width: 28, height: 28, borderRadius: 6, backgroundColor: "#ecf0f1", justifyContent: 'center', alignContent: 'center', alignItems: 'center' })}>
|
|
222
|
+
<LibIcon name="minus" color="#e74c3c" />
|
|
223
|
+
</View>
|
|
224
|
+
</TouchableOpacity>
|
|
225
|
+
<Text style={applyStyle({ fontFamily: "Arial", fontSize: 20, fontWeight: "bold", fontStyle: "normal", letterSpacing: 0, color: "#9b9b9b", marginLeft: 13, marginRight: 13 })}>{itemC?.qty}</Text>
|
|
226
|
+
<TouchableOpacity onPress={() => {
|
|
227
|
+
// add()
|
|
228
|
+
let qty = 1
|
|
229
|
+
if (itemC.qty != item.qty_max) {
|
|
230
|
+
if (qty != (Number(itemC.quota) - Number(itemC.quota_used))) {
|
|
231
|
+
qty = Number(itemC?.qty) + 1
|
|
232
|
+
}
|
|
233
|
+
} else {
|
|
234
|
+
qty = Number(item.qty_max)
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
setPriceData(LibObject.set(getPriceData(), qty)(i, 'list', iC, 'qty'))
|
|
238
|
+
}}>
|
|
239
|
+
<View style={applyStyle({ width: 28, height: 28, borderRadius: 6, backgroundColor: "#ecf0f1", justifyContent: 'center', alignContent: 'center', alignItems: 'center' })}>
|
|
240
|
+
<LibIcon name="plus" color="#16a085" />
|
|
241
|
+
</View>
|
|
242
|
+
</TouchableOpacity>
|
|
243
|
+
</View>
|
|
244
|
+
}
|
|
245
|
+
</View>
|
|
246
|
+
</TouchableOpacity>
|
|
247
|
+
)
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
return (
|
|
251
|
+
<>
|
|
252
|
+
{
|
|
253
|
+
title && title != "" &&
|
|
254
|
+
<Text allowFontScaling={false} style={applyStyle({ marginBottom: 15, fontFamily: "Arial", fontSize: 16, fontWeight: "bold", fontStyle: "normal", lineHeight: 22, letterSpacing: 0, textAlign: "center", color: "#34495e" })}>{title || esp.lang("event/artist_detail", "select_date")}</Text>
|
|
255
|
+
}
|
|
256
|
+
<ScrollView showsVerticalScrollIndicator={false} >
|
|
257
|
+
{
|
|
258
|
+
priceData?.length > 0 && sortByStatus(priceData)?.map((item: any, i: number) => {
|
|
259
|
+
let filterFullData = priceData?.filter((it: any) => it.status != 0)
|
|
260
|
+
const displayedData = showAll[item.price_id] ? item?.list : item?.list.slice(0, maxDisplay);
|
|
261
|
+
|
|
262
|
+
let textOpacity = item?.status == 1 ? 1 : 0.3
|
|
263
|
+
return (
|
|
264
|
+
<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 }}>
|
|
265
|
+
<View style={{ padding: 10, backgroundColor: '#f1f2f3', borderTopLeftRadius: 10, borderTopRightRadius: 10 }}>
|
|
266
|
+
{
|
|
267
|
+
item?.hasOwnProperty('label') && (item?.label != "" && item?.label != null) &&
|
|
268
|
+
<View style={applyStyle({ flexDirection: 'row' })}>
|
|
269
|
+
<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 })}>
|
|
270
|
+
<Text allowFontScaling={false} style={{ fontSize: 10, fontStyle: "normal", letterSpacing: 0.5, color: EventOrder_itemProperty.textColor(item?.label_color), fontWeight: 'bold' }}>{item?.label}</Text>
|
|
271
|
+
</View>
|
|
272
|
+
</View>
|
|
273
|
+
}
|
|
274
|
+
<View style={{ alignContent: 'center', alignItems: 'center', flexDirection: 'row', justifyContent: 'space-between', }}>
|
|
275
|
+
<Text allowFontScaling={false} style={{ opacity: textOpacity, fontWeight: 'bold' }}>{item.type}</Text>
|
|
276
|
+
{
|
|
277
|
+
item.qty_min > 1 &&
|
|
278
|
+
<Text style={{ color: LibStyle.colorRed, fontSize: 10, fontWeight: 'normal' }}> {"(" + esp.lang("event/ticket_list", "min_order") + LibUtils.number(item.qty_min) + ")"}</Text>
|
|
279
|
+
}
|
|
280
|
+
{
|
|
281
|
+
item?.status != 1 &&
|
|
282
|
+
<View style={applyStyle({ flexDirection: 'row' })}>
|
|
283
|
+
<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 })}>
|
|
284
|
+
<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>
|
|
285
|
+
</View>
|
|
286
|
+
</View>
|
|
287
|
+
}
|
|
288
|
+
</View>
|
|
289
|
+
{
|
|
290
|
+
item.info != "" &&
|
|
291
|
+
<View style={{ marginTop: 3, alignContent: 'center', alignItems: 'center', flexDirection: 'row', marginRight: 5 }}>
|
|
292
|
+
<Text allowFontScaling={false} style={{ fontSize: 12, color: LibStyle.colorBlue }}>{item.info}</Text>
|
|
293
|
+
</View>
|
|
294
|
+
}
|
|
295
|
+
</View>
|
|
296
|
+
{
|
|
297
|
+
displayedData?.map((itemC: any, iC: number) => renderItem(itemC, iC, item, i))
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
{
|
|
301
|
+
filterFullData?.[i]?.list?.length > 3 &&
|
|
302
|
+
<TouchableOpacity onPress={() => {
|
|
303
|
+
handleShowAll(item.price_id)
|
|
304
|
+
}} style={{ borderTopColor: LibStyle.colorGrey, borderTopWidth: 0.8, flex: 1, padding: 8, flexDirection: 'row', alignContent: 'center', alignItems: 'center', justifyContent: 'center' }}>
|
|
305
|
+
<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>
|
|
306
|
+
<LibIcon name={showAll[item.price_id] ? 'chevron-up-circle-outline' : 'chevron-down-circle-outline'} color={LibStyle.colorBlue} size={18} />
|
|
307
|
+
</TouchableOpacity>
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
</View>
|
|
311
|
+
)
|
|
312
|
+
})
|
|
313
|
+
}
|
|
314
|
+
</ScrollView>
|
|
315
|
+
<View style={applyStyle({ flexDirection: 'row', paddingVertical: 10 })} >
|
|
316
|
+
<EventButton label={is_multiprice ? "Pilih Tiket" : "Lanjutkan"} onPress={() => {
|
|
317
|
+
if (getPriceData().some((t: any) => t?.selected == 1)) {
|
|
318
|
+
handleSelect()
|
|
319
|
+
} else {
|
|
320
|
+
LibToastProperty.show(esp.lang("event/artist_detail", "select_tiket_first"))
|
|
321
|
+
}
|
|
322
|
+
}} style={{ backgroundColor: priceData?.some?.((t: any) => t?.selected == 1) ? LibStyle.colorGreen : "#eee", marginTop: 2, marginHorizontal: 15 }} />
|
|
323
|
+
</View>
|
|
324
|
+
</>
|
|
325
|
+
)
|
|
326
|
+
}
|