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/seat_map_new.tsx
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
// withHooks
|
|
2
|
+
import { doc, getFirestore, runTransaction } from '@react-native-firebase/firestore';
|
|
2
3
|
import { Canvas, Group, RoundedRect, Text, useFont } from '@shopify/react-native-skia';
|
|
3
4
|
import { EventButton } from 'esoftplay/cache/event/button/import';
|
|
4
5
|
import { EventHeader } from 'esoftplay/cache/event/header/import';
|
|
5
6
|
import { EventMessage } from 'esoftplay/cache/event/message/import';
|
|
7
|
+
import { LibBackground_task } from 'esoftplay/cache/lib/background_task/import';
|
|
6
8
|
import { LibCurl } from 'esoftplay/cache/lib/curl/import';
|
|
7
9
|
import { LibIcon } from 'esoftplay/cache/lib/icon/import';
|
|
8
10
|
import { LibNavigation } from 'esoftplay/cache/lib/navigation/import';
|
|
@@ -11,8 +13,9 @@ import { LibTextstyle } from 'esoftplay/cache/lib/textstyle/import';
|
|
|
11
13
|
import { LibToastProperty } from 'esoftplay/cache/lib/toast/import';
|
|
12
14
|
import { UseMap } from 'esoftplay/cache/use/map/import';
|
|
13
15
|
import esp from 'esoftplay/esp';
|
|
16
|
+
import useLazyState from 'esoftplay/lazy';
|
|
14
17
|
import useSafeState from 'esoftplay/state';
|
|
15
|
-
import React, { useCallback, useEffect, useState } from 'react';
|
|
18
|
+
import React, { useCallback, useEffect, useMemo, useState } from 'react';
|
|
16
19
|
import { Dimensions, Pressable, ScrollView, View } from 'react-native';
|
|
17
20
|
import { TapGestureHandler, TapGestureHandlerStateChangeEvent } from 'react-native-gesture-handler';
|
|
18
21
|
|
|
@@ -23,10 +26,38 @@ export interface EventSeat_map_newArgs {
|
|
|
23
26
|
export interface EventSeat_map_newProps {
|
|
24
27
|
|
|
25
28
|
}
|
|
29
|
+
|
|
30
|
+
function getEventPath() {
|
|
31
|
+
return "event" + (esp.isDebug("") ? "BBT" : "BBO")
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
const mainPath = [getEventPath(), "event_seat", "seat_index"]
|
|
35
|
+
export function clearHoldedSeats() {
|
|
36
|
+
const app: any = esp.mod("firestore/index")().instance()
|
|
37
|
+
const firestoreUser = esp.mod("firestore/index")().getUserData(app.name)
|
|
38
|
+
esp.mod("firestore/index")().getCollectionIds(app, mainPath, [["uid", "==", firestoreUser?.uid], ["status", "==", "holding"]], [], (ids) => {
|
|
39
|
+
if (ids?.length > 0)
|
|
40
|
+
esp.mod("firestore/index")().deleteBatchDocument(app, mainPath, ids, () => {
|
|
41
|
+
}, console.log)
|
|
42
|
+
}, console.log)
|
|
43
|
+
}
|
|
44
|
+
|
|
26
45
|
export default function m(props: any): any {
|
|
27
|
-
const { dataTicket
|
|
46
|
+
const { dataTicket } = LibNavigation.getArgsAll<any>(props)
|
|
28
47
|
const qty = dataTicket?.qty
|
|
29
48
|
|
|
49
|
+
const eventData = {
|
|
50
|
+
event_id: dataTicket?.event_id,
|
|
51
|
+
price_id: dataTicket?.selected_ticket?.price_id,
|
|
52
|
+
ondate: dataTicket?.ondate || dataTicket?.selected_ticket?.list?.ondate
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
const app: any = esp.mod("firestore/index")().instance()
|
|
56
|
+
const firestoreUser = esp.mod("firestore/index")().getUserData(app.name)
|
|
57
|
+
|
|
58
|
+
const [, setHoldedSeats, getHoldedSeats] = useLazyState<string[]>([])
|
|
59
|
+
const [, setLoadingSeats, getLoadingSeats] = useSafeState<string[]>([])
|
|
60
|
+
|
|
30
61
|
const deviceWidth = Dimensions.get('window').width;
|
|
31
62
|
const [scale, setScale] = useState(1);
|
|
32
63
|
const [boundingBox, setBoundingBox] = useSafeState({ "x1": 1, "x2": 2, "y1": 1, "y2": 2 })
|
|
@@ -80,38 +111,161 @@ export default function m(props: any): any {
|
|
|
80
111
|
|
|
81
112
|
const handleTap = useCallback((event: TapGestureHandlerStateChangeEvent) => {
|
|
82
113
|
if (event.nativeEvent.state !== 5) return;
|
|
83
|
-
|
|
114
|
+
|
|
84
115
|
const x = event.nativeEvent.x / scale;
|
|
85
116
|
const y = event.nativeEvent.y / scale;
|
|
117
|
+
|
|
86
118
|
for (let i = 0; i < getData()?.length; i++) {
|
|
87
119
|
const [sx, sy, seatName, status] = getData()?.[i];
|
|
120
|
+
|
|
88
121
|
const xSize = (boxSize / 2) + (sx * boxSize);
|
|
89
122
|
const ySize = (boxSize / 2) + (sy * boxSize);
|
|
90
123
|
|
|
91
124
|
if (x >= xSize && x <= xSize + boxSize && y >= ySize && y <= ySize + boxSize) {
|
|
92
|
-
if (status
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
125
|
+
if (status != 0) return;
|
|
126
|
+
if (getLoadingSeats().includes(seatName)) return;
|
|
127
|
+
|
|
128
|
+
const isSelected = getSelectedSeat().includes(seatName);
|
|
129
|
+
|
|
130
|
+
const seat: any = getHoldedSeats().find((x: any) => x.id === seatName);
|
|
131
|
+
const isHolded = !!seat;
|
|
132
|
+
const isMine = seat?.uid === firestoreUser?.uid;
|
|
133
|
+
|
|
134
|
+
if (isHolded && !isMine) {
|
|
135
|
+
LibToastProperty.show(esp.lang("event/seat_map_new", "other_user"));
|
|
136
|
+
return;
|
|
103
137
|
}
|
|
138
|
+
|
|
139
|
+
if (!isSelected && getSelectedSeat().length >= qty) {
|
|
140
|
+
LibToastProperty.show(esp.lang("event/seat_map", "max_seat", qty));
|
|
141
|
+
return;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
const action = isSelected ? "release" : "hold";
|
|
145
|
+
setSelectedSeat((prev: any) => {
|
|
146
|
+
if (isSelected) {
|
|
147
|
+
return prev.filter((s: string) => s !== seatName);
|
|
148
|
+
} else {
|
|
149
|
+
return [...prev, seatName];
|
|
150
|
+
}
|
|
151
|
+
});
|
|
152
|
+
|
|
153
|
+
setLoadingSeats(prev => [...prev, seatName]);
|
|
154
|
+
handleSelectedSeat(seatName, action)
|
|
155
|
+
.then(() => { })
|
|
156
|
+
.catch((err: any) => {
|
|
157
|
+
// setSelectedSeat((prev: any) => {
|
|
158
|
+
// if (action === "hold") {
|
|
159
|
+
// return prev.filter((s: string) => s !== seatName);
|
|
160
|
+
// } else {
|
|
161
|
+
// return [...prev, seatName];
|
|
162
|
+
// }
|
|
163
|
+
// });
|
|
164
|
+
// LibToastProperty.show(err?.message || esp.lang("event/seat_map_new", "failed_sync"));
|
|
165
|
+
})
|
|
166
|
+
.finally(() => {
|
|
167
|
+
setLoadingSeats(prev => prev.filter(s => s !== seatName));
|
|
168
|
+
});
|
|
169
|
+
|
|
104
170
|
return;
|
|
105
171
|
}
|
|
172
|
+
}
|
|
173
|
+
}, [data, boxSize, scale, firestoreUser]);
|
|
174
|
+
|
|
175
|
+
async function handleSelectedSeat(seatName: string, action?: "hold" | "release") {
|
|
176
|
+
const pathKey = `${eventData?.event_id}_${eventData?.price_id}_${eventData?.ondate}_${seatName}`
|
|
177
|
+
const path = [...mainPath, pathKey]
|
|
178
|
+
const fixedPath = esp.mod("firestore/index")().castPathToString(path)
|
|
106
179
|
|
|
180
|
+
try {
|
|
181
|
+
await holdSeat(fixedPath, pathKey, action)
|
|
182
|
+
} catch (error) {
|
|
183
|
+
console.warn("Failed to hold seat:", error, firestoreUser.uid);
|
|
184
|
+
throw error
|
|
107
185
|
}
|
|
108
|
-
}
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
const cat_id = `${eventData?.price_id}_${eventData?.ondate}`
|
|
189
|
+
async function holdSeat(path: string, pathKey: string, action?: "hold" | "release") {
|
|
190
|
+
const uid = firestoreUser?.uid
|
|
191
|
+
|
|
192
|
+
const db = getFirestore(app)
|
|
193
|
+
const seatRef = doc(db, path);
|
|
194
|
+
|
|
195
|
+
await runTransaction(db, async (tx) => {
|
|
196
|
+
const snap = await tx.get(seatRef);
|
|
197
|
+
const value = {
|
|
198
|
+
status: "holding",
|
|
199
|
+
id: pathKey,
|
|
200
|
+
cat_id,
|
|
201
|
+
uid,
|
|
202
|
+
updated: Date.now(),
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
if (!snap.exists()) {
|
|
206
|
+
tx.set(seatRef, value);
|
|
207
|
+
return;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
const data: any = snap.data();
|
|
211
|
+
if (data.status === "holding" && data.uid === uid) {
|
|
212
|
+
if (action === "release") {
|
|
213
|
+
tx.update(seatRef, {
|
|
214
|
+
status: "available"
|
|
215
|
+
});
|
|
216
|
+
return;
|
|
217
|
+
} else {
|
|
218
|
+
return;
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
if (data.status === "available") {
|
|
222
|
+
tx.update(seatRef, value);
|
|
223
|
+
return;
|
|
224
|
+
}
|
|
225
|
+
throw new Error(esp.lang("event/seat_map_new", "seat_not_avail"));
|
|
226
|
+
});
|
|
227
|
+
}
|
|
109
228
|
|
|
110
229
|
useEffect(() => {
|
|
111
230
|
loadDataSeatmapBooked()
|
|
112
231
|
return () => LibNavigation.cancelBackResult(LibNavigation.getResultKey(props))
|
|
113
232
|
}, [])
|
|
114
233
|
|
|
234
|
+
useEffect(() => {
|
|
235
|
+
getAllHeldSeats()
|
|
236
|
+
updateTimestamp()
|
|
237
|
+
LibBackground_task.set("1", getAllHeldSeats, 2000)
|
|
238
|
+
LibBackground_task.set("2", updateTimestamp, 3000)
|
|
239
|
+
return () => {
|
|
240
|
+
LibBackground_task.clear("1")
|
|
241
|
+
LibBackground_task.clear("2")
|
|
242
|
+
}
|
|
243
|
+
}, [])
|
|
244
|
+
|
|
245
|
+
function getAllHeldSeats() {
|
|
246
|
+
esp.mod("firestore/index")().getCollectionWhere(app, mainPath, [
|
|
247
|
+
["cat_id", "==", cat_id],
|
|
248
|
+
["uid", "!=", firestoreUser?.uid],
|
|
249
|
+
["status", "==", "holding"],
|
|
250
|
+
], (docs) => {
|
|
251
|
+
const seats = docs.map((d: any) => ({ ...d.data, id: d.id.split("_").pop() }));
|
|
252
|
+
setHoldedSeats(seats)()
|
|
253
|
+
}, console.warn)
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
function updateTimestamp() {
|
|
257
|
+
esp.mod("firestore/index")().getCollectionIds(app, mainPath, [
|
|
258
|
+
["cat_id", "==", cat_id],
|
|
259
|
+
["uid", "==", firestoreUser?.uid],
|
|
260
|
+
["status", "==", "holding"],
|
|
261
|
+
], [], (ids) => {
|
|
262
|
+
esp.mod("firestore/index")().updateBatchDocument(app, mainPath, ids,
|
|
263
|
+
[{ key: "updated", value: Date.now() }],
|
|
264
|
+
() => { },
|
|
265
|
+
console.warn)
|
|
266
|
+
}, console.warn)
|
|
267
|
+
}
|
|
268
|
+
|
|
115
269
|
function updateIndexByRes(data: any, res: any) {
|
|
116
270
|
const resArr = res.split(",").map((item: any) => item.trim()); // biar aman dari spasi
|
|
117
271
|
return data.map((row: any) => {
|
|
@@ -128,7 +282,7 @@ export default function m(props: any): any {
|
|
|
128
282
|
price_id: dataTicket?.selected_ticket?.price_id,
|
|
129
283
|
ondate: dataTicket?.ondate || dataTicket?.selected_ticket?.list?.ondate
|
|
130
284
|
}, (res, msg) => {
|
|
131
|
-
|
|
285
|
+
|
|
132
286
|
setBoundingBox(res.metadata.bounding_box)
|
|
133
287
|
let x = res.layout.split(';').map((item: any) => item.split(',')).map(([x, y, seatName, status]: any) => [Number(x), Number(y), seatName, Number(status)])
|
|
134
288
|
let updated = updateIndexByRes(x, seatBooked)
|
|
@@ -136,6 +290,14 @@ export default function m(props: any): any {
|
|
|
136
290
|
})
|
|
137
291
|
}
|
|
138
292
|
|
|
293
|
+
const holdedSeatsMap = useMemo(() => {
|
|
294
|
+
const map: any = {};
|
|
295
|
+
getHoldedSeats().forEach((x: any) => {
|
|
296
|
+
map[x.id] = x.uid;
|
|
297
|
+
});
|
|
298
|
+
return map;
|
|
299
|
+
}, [getHoldedSeats()]);
|
|
300
|
+
|
|
139
301
|
function loadDataSeatmapBooked() {
|
|
140
302
|
new LibCurl("v3/event_seat_booked", {
|
|
141
303
|
event_id: dataTicket?.event_id,
|
|
@@ -144,6 +306,7 @@ export default function m(props: any): any {
|
|
|
144
306
|
}, (res, msg) => {
|
|
145
307
|
loadDataSeatmap(res)
|
|
146
308
|
setErrBookedSeat(undefined)
|
|
309
|
+
|
|
147
310
|
}, (err) => {
|
|
148
311
|
setErrBookedSeat(err?.message)
|
|
149
312
|
})
|
|
@@ -173,7 +336,7 @@ export default function m(props: any): any {
|
|
|
173
336
|
|
|
174
337
|
return (
|
|
175
338
|
<View key={scale} style={{ flex: 1, backgroundColor: LibStyle.colorBgGrey }} >
|
|
176
|
-
<EventHeader title={esp.lang("event/seat_map", "header_title")} />
|
|
339
|
+
<EventHeader title={esp.lang("event/seat_map", "header_title")} subtitle={dataTicket?.selected_ticket?.type} />
|
|
177
340
|
<View style={{ flex: 1 }}>
|
|
178
341
|
<View style={{ marginBottom: 5, }}>
|
|
179
342
|
<ScrollView style={{ padding: 10, paddingLeft: 0, }} horizontal>
|
|
@@ -196,36 +359,42 @@ export default function m(props: any): any {
|
|
|
196
359
|
style={{
|
|
197
360
|
width: width * scale,
|
|
198
361
|
height: height * scale,
|
|
199
|
-
padding: 10,
|
|
200
362
|
backgroundColor: LibStyle.colorBgGrey,
|
|
201
363
|
|
|
202
364
|
}}>
|
|
203
365
|
{
|
|
204
366
|
getData()?.map(([x, y, name, status], i) => {
|
|
367
|
+
let newName = name?.replace(/^.*#/, "")
|
|
205
368
|
const isSelected = getSelectedSeat()?.includes(name)
|
|
206
|
-
const
|
|
369
|
+
const uid = holdedSeatsMap[name];
|
|
370
|
+
const isHolded = !!uid;
|
|
371
|
+
const isMine = uid === firestoreUser?.uid;
|
|
372
|
+
const color = isSelected ? "#8EF67B" : (isHolded && !isMine) ? getColorByStatus(9) : getColorByStatus(status)
|
|
207
373
|
const xSize = (boxSize / 2) + (x * boxSize)
|
|
208
374
|
const ySize = (boxSize / 2) + (y * boxSize)
|
|
209
375
|
|
|
210
|
-
const
|
|
211
|
-
const
|
|
376
|
+
const xBSize = xSize - (boxSize * 0.05 / 2)
|
|
377
|
+
const yBSize = ySize - (boxSize * 0.05 / 2)
|
|
212
378
|
|
|
213
|
-
const
|
|
379
|
+
const fontSize = getFontSizeByLength(newName?.length);
|
|
380
|
+
const font = getFontByLength(newName?.length);
|
|
381
|
+
|
|
382
|
+
const textWidthApprox = fontSize * newName?.length * 0.6;
|
|
214
383
|
const textX = xSize + (boxSize - textWidthApprox) / 2;
|
|
215
384
|
|
|
216
385
|
return (
|
|
217
386
|
<Group key={i}>
|
|
218
387
|
<RoundedRect
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
y={
|
|
222
|
-
width={boxSize + 2}
|
|
388
|
+
r={(boxSize) * 0.155}
|
|
389
|
+
x={xBSize}
|
|
390
|
+
y={yBSize}
|
|
223
391
|
transform={[{ scale }]}
|
|
224
|
-
|
|
392
|
+
width={boxSize * 1.05}
|
|
393
|
+
height={boxSize * 1.05}
|
|
225
394
|
color={"#999"} />
|
|
226
395
|
<RoundedRect
|
|
227
396
|
x={xSize}
|
|
228
|
-
r={boxSize * 0.
|
|
397
|
+
r={boxSize * 0.13}
|
|
229
398
|
y={ySize}
|
|
230
399
|
width={boxSize}
|
|
231
400
|
transform={[{ scale }]}
|
|
@@ -236,7 +405,7 @@ export default function m(props: any): any {
|
|
|
236
405
|
x={textX}
|
|
237
406
|
y={(ySize) + boxSize * 0.60}
|
|
238
407
|
color={"#020202"}
|
|
239
|
-
text={
|
|
408
|
+
text={newName}
|
|
240
409
|
transform={[{ scale }]}
|
|
241
410
|
font={font} />
|
|
242
411
|
)}
|
|
@@ -269,6 +438,8 @@ export default function m(props: any): any {
|
|
|
269
438
|
let value = {
|
|
270
439
|
seat_label: getSelectedSeat()
|
|
271
440
|
}
|
|
441
|
+
esp.log({ value });
|
|
442
|
+
// return
|
|
272
443
|
if (getSelectedSeat()?.length < qty) {
|
|
273
444
|
LibToastProperty.show(esp.lang("event/seat_map", "seat_more", (qty - (getSelectedSeat()?.length)).toString()))
|
|
274
445
|
} else {
|
|
@@ -284,22 +455,22 @@ export default function m(props: any): any {
|
|
|
284
455
|
function getLegends() {
|
|
285
456
|
const colors: any = [
|
|
286
457
|
["#fff", esp.lang("event/seat_map", "available"), 0],
|
|
287
|
-
["#8EF67B", esp.lang("event/seat_map", "chosen"), "-1"],
|
|
458
|
+
// ["#8EF67B", esp.lang("event/seat_map", "chosen"), "-1"],
|
|
288
459
|
["#2EBBE8", esp.lang("event/seat_map", "reserved"), 3],
|
|
289
|
-
["#6C432C", esp.lang("event/seat_map", "chosen_by"), 7],
|
|
290
|
-
["#f1f2f3", esp.lang("event/seat_map", "way"), 5],
|
|
291
|
-
["#9FA1A4", esp.lang("event/seat_map", "not_sold"), 1],
|
|
460
|
+
// ["#6C432C", esp.lang("event/seat_map", "chosen_by"), 7],
|
|
461
|
+
// ["#f1f2f3", esp.lang("event/seat_map", "way"), 5],
|
|
462
|
+
// ["#9FA1A4", esp.lang("event/seat_map", "not_sold"), 1],
|
|
292
463
|
["#6B71E6", esp.lang("event/seat_map", "seat_hold"), 2],
|
|
293
|
-
["#FF4866", esp.lang("event/seat_map", "wall"), 6],
|
|
294
|
-
["#FFA601", esp.lang("event/seat_map", "other_type"), 4],
|
|
295
|
-
["purple", esp.lang("event/seat_map", "stage"), 8]
|
|
464
|
+
// ["#FF4866", esp.lang("event/seat_map", "wall"), 6],
|
|
465
|
+
// ["#FFA601", esp.lang("event/seat_map", "other_type"), 4],
|
|
466
|
+
// ["purple", esp.lang("event/seat_map", "stage"), 8]
|
|
467
|
+
["#7e2a0c", esp.lang("event/seat_map_new", "picked_byother"), 9]
|
|
296
468
|
]
|
|
297
469
|
return colors
|
|
298
470
|
}
|
|
299
471
|
|
|
300
472
|
function getColorByStatus(statuses: number) {
|
|
301
473
|
const colors: any = {
|
|
302
|
-
8: 'purple',
|
|
303
474
|
0: '#fff',
|
|
304
475
|
1: "#9FA1A4",
|
|
305
476
|
2: "#6B71E6",
|
|
@@ -307,7 +478,9 @@ function getColorByStatus(statuses: number) {
|
|
|
307
478
|
4: "#FFA601",
|
|
308
479
|
5: "#fff",
|
|
309
480
|
6: "#FF4866",
|
|
310
|
-
7: "#6C432C"
|
|
481
|
+
7: "#6C432C",
|
|
482
|
+
8: 'purple',
|
|
483
|
+
9: "#7e2a0c"
|
|
311
484
|
}
|
|
312
485
|
return colors[statuses]
|
|
313
486
|
}
|
package/event/step.tsx
CHANGED
|
@@ -19,7 +19,7 @@ export default function m(props: EventStepProps): any {
|
|
|
19
19
|
return (
|
|
20
20
|
<VIEW
|
|
21
21
|
onPress={() => { if (urls && urls.length > 0) Linking.openURL(urls[0]) }}
|
|
22
|
-
style={{ flexDirection: 'row', marginLeft:
|
|
22
|
+
style={{ flexDirection: 'row', marginLeft: 15, paddingRight: 25, paddingBottom: 10 }}>
|
|
23
23
|
<View style={{ marginRight: 15, marginTop: 3, borderRadius: 15, width: 14, height: 14, backgroundColor: "#f5e71e", borderStyle: "solid", borderWidth: 2, borderColor: "#70472b" }} />
|
|
24
24
|
<View style={{ flex: 1 }} >
|
|
25
25
|
<RenderHtml contentWidth={LibStyle.width} source={{ html: props?.text?.trim?.() }} />
|
package/event/test.tsx
CHANGED
|
@@ -142,7 +142,7 @@ export default function m(props: any): any {
|
|
|
142
142
|
height: height * scale,
|
|
143
143
|
padding: 10,
|
|
144
144
|
backgroundColor: LibStyle.colorBgGrey,
|
|
145
|
-
|
|
145
|
+
|
|
146
146
|
}}>
|
|
147
147
|
{
|
|
148
148
|
data.map(([x, y, name, status], i) => {
|
|
@@ -211,15 +211,15 @@ export default function m(props: any): any {
|
|
|
211
211
|
function getLegends() {
|
|
212
212
|
const colors: any = [
|
|
213
213
|
["#fff", esp.lang("event/seat_map", "available"), 0],
|
|
214
|
-
["#8EF67B", esp.lang("event/seat_map", "chosen"), "-1"],
|
|
214
|
+
// ["#8EF67B", esp.lang("event/seat_map", "chosen"), "-1"],
|
|
215
215
|
["#2EBBE8", esp.lang("event/seat_map", "reserved"), 3],
|
|
216
|
-
["#6C432C", esp.lang("event/seat_map", "chosen_by"), 7],
|
|
217
|
-
["#f1f2f3", esp.lang("event/seat_map", "way"), 5],
|
|
218
|
-
["#9FA1A4", esp.lang("event/seat_map", "not_sold"), 1],
|
|
216
|
+
// ["#6C432C", esp.lang("event/seat_map", "chosen_by"), 7],
|
|
217
|
+
// ["#f1f2f3", esp.lang("event/seat_map", "way"), 5],
|
|
218
|
+
// ["#9FA1A4", esp.lang("event/seat_map", "not_sold"), 1],
|
|
219
219
|
["#6B71E6", esp.lang("event/seat_map", "seat_hold"), 2],
|
|
220
|
-
["#FF4866", esp.lang("event/seat_map", "wall"), 6],
|
|
221
|
-
["#FFA601", esp.lang("event/seat_map", "other_type"), 4],
|
|
222
|
-
["purple", esp.lang("event/seat_map", "stage"), 8]
|
|
220
|
+
// ["#FF4866", esp.lang("event/seat_map", "wall"), 6],
|
|
221
|
+
// ["#FFA601", esp.lang("event/seat_map", "other_type"), 4],
|
|
222
|
+
// ["purple", esp.lang("event/seat_map", "stage"), 8]
|
|
223
223
|
]
|
|
224
224
|
return colors
|
|
225
225
|
}
|