esoftplay-event 0.0.1 → 0.0.2-a

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (86) hide show
  1. package/config.json +1 -1
  2. package/event/artist.tsx +11 -7
  3. package/event/artist_detail.tsx +3 -5
  4. package/event/artist_detailv2.tsx +386 -0
  5. package/event/artistv2.tsx +162 -0
  6. package/event/button_order_detail.tsx +43 -0
  7. package/event/countdown_base.tsx +16 -3
  8. package/event/countdown_event.tsx +48 -0
  9. package/event/detail.tsx +30 -37
  10. package/event/detail2.tsx +354 -0
  11. package/event/exchange_ticket.tsx +1 -1
  12. package/event/exchange_ticket_list.tsx +2 -3
  13. package/event/exchange_ticket_result.tsx +1 -1
  14. package/event/firebase_socket.ts +8 -0
  15. package/event/loading_page.tsx +4 -2
  16. package/event/order.tsx +23 -36
  17. package/event/order_detail.tsx +204 -61
  18. package/event/order_detail_upgrade.tsx +8 -5
  19. package/event/order_detail_upgrade_payment.tsx +17 -11
  20. package/event/order_detail_visitor.tsx +33 -33
  21. package/event/order_detail_waiting.tsx +45 -20
  22. package/event/order_item.tsx +1 -1
  23. package/event/order_lottery.tsx +49 -37
  24. package/event/order_reschedule.tsx +50 -52
  25. package/event/order_share_to.tsx +11 -24
  26. package/event/order_share_to_detail.tsx +8 -3
  27. package/event/order_waiting.tsx +1 -1
  28. package/event/queue_pricing.tsx +16 -3
  29. package/event/refresh_button.tsx +3 -5
  30. package/event/scan_item.tsx +2 -2
  31. package/event/seat.tsx +34 -13
  32. package/event/seat_map_new.tsx +316 -0
  33. package/event/secure_page.debug.tsx +34 -0
  34. package/event/secure_page.live.tsx +35 -0
  35. package/event/secure_page.tsx +6 -5
  36. package/event/test.tsx +240 -155
  37. package/event/ticket_list.tsx +48 -20
  38. package/event/ticket_list2.tsx +112 -39
  39. package/event/tms_check_code.tsx +6 -0
  40. package/event/tms_check_ticket_result.tsx +51 -13
  41. package/event/tms_dashboard.tsx +85 -3
  42. package/event/tms_gate.tsx +6 -0
  43. package/event/tms_home.tsx +1 -4
  44. package/event/tms_in_failed.tsx +1 -1
  45. package/event/tms_in_hall.tsx +4 -1
  46. package/event/tms_in_hall_failed.tsx +8 -10
  47. package/event/tms_in_log.tsx +2 -0
  48. package/event/tms_in_success.tsx +1 -1
  49. package/event/tms_log.tsx +10 -25
  50. package/event/tms_out.tsx +1 -1
  51. package/event/tms_out_failed.tsx +1 -1
  52. package/event/visitor_input.tsx +22 -5
  53. package/event/visitor_inputv2.tsx +453 -0
  54. package/event/voucher.tsx +2 -0
  55. package/event/voucher2.tsx +14 -6
  56. package/id.json +43 -9
  57. package/package.json +1 -1
  58. package/event/entrance.tsx +0 -215
  59. package/event/entrance_again.tsx +0 -199
  60. package/event/entrance_failed.tsx +0 -190
  61. package/event/entrance_idcard.tsx +0 -199
  62. package/event/entrance_list.tsx +0 -264
  63. package/event/entrance_list_item.tsx +0 -88
  64. package/event/entrance_log.tsx +0 -130
  65. package/event/entrance_success.tsx +0 -153
  66. package/event/entrance_warning.tsx +0 -91
  67. package/event/exit.tsx +0 -91
  68. package/event/exit_failed.tsx +0 -135
  69. package/event/exit_list.tsx +0 -118
  70. package/event/exit_log.tsx +0 -130
  71. package/event/exit_success.tsx +0 -143
  72. package/event/exit_temporary.tsx +0 -226
  73. package/event/firebase_socket.debug.ts +0 -260
  74. package/event/firebase_socket.live.ts +0 -335
  75. package/event/hall_in.tsx +0 -148
  76. package/event/hall_in_failed.tsx +0 -270
  77. package/event/hall_in_list.tsx +0 -222
  78. package/event/hall_in_log.tsx +0 -134
  79. package/event/hall_in_success.tsx +0 -132
  80. package/event/hall_out.tsx +0 -143
  81. package/event/hall_out_failed.tsx +0 -133
  82. package/event/hall_out_list.tsx +0 -215
  83. package/event/hall_out_log.tsx +0 -133
  84. package/event/hall_out_success.tsx +0 -130
  85. package/event/log.tsx +0 -433
  86. package/event/seat_map_test.tsx +0 -401
@@ -44,6 +44,7 @@ export default function m(props: EventTms_in_hallProps): any {
44
44
  var post = {
45
45
  event_id: event_id,
46
46
  user_qr: qr_code,
47
+ // user_qr: "BBO-IBT2376",
47
48
  hall_id: selectGate?.id
48
49
  }
49
50
 
@@ -71,7 +72,6 @@ export default function m(props: EventTms_in_hallProps): any {
71
72
  }
72
73
  });
73
74
 
74
- esp.log({ res });
75
75
 
76
76
  if (res?.hasOwnProperty("staff")) {
77
77
  res?.staff?.map((it: any) => {
@@ -87,6 +87,9 @@ export default function m(props: EventTms_in_hallProps): any {
87
87
  })
88
88
  }
89
89
 
90
+ esp.log({ res, ticketsData });
91
+
92
+
90
93
  if (ticketsData.length == 1) { // cek jika tiket cuma 1
91
94
  let tiket = ticketsData[0]
92
95
  if (tiket.price_id == "staff") { // jika itu adalah id card
@@ -180,7 +180,7 @@ export default function m(props: EventTms_in_hall_failedProps): any {
180
180
  {
181
181
  msgError?.result?.length > 0 && msgError?.result?.map((item: any, i: number) => {
182
182
  return (
183
- <View key={i} style={{ marginBottom: 5, backgroundColor: "#fff", borderRadius: 10, overflow: 'hidden' }}>
183
+ <View key={i} style={{ marginHorizontal: 10, marginBottom: 5, backgroundColor: "#fff", borderRadius: 10, overflow: 'hidden' }}>
184
184
  {
185
185
  item.hasOwnProperty("status_label") && item?.status_label != "" &&
186
186
  <View style={{ backgroundColor: '#37c2d0', padding: 10, }} >
@@ -235,16 +235,14 @@ export default function m(props: EventTms_in_hall_failedProps): any {
235
235
  </View>
236
236
  </UseCondition>
237
237
  <View style={{ flexDirection: 'row', width: LibStyle.width - 40, alignItems: 'center', marginVertical: 10, justifyContent: 'space-between' }}>
238
- <UseCondition if={msgError?.status_code != 'EV043'}>
239
- <Pressable onPress={() => {
240
- LibDialog.warningConfirm(esp.lang("event/tms_in_failed", "warn_title"), esp.lang("event/tms_in_failed", "warn_msg"), esp.lang("event/tms_in_failed", "warn_ok"), () => {
241
- sendTelegram()
242
- }, esp.lang("event/tms_in_failed", "warn_no"), () => { })
238
+ <Pressable onPress={() => {
239
+ LibDialog.warningConfirm(esp.lang("event/tms_in_failed", "warn_title"), esp.lang("event/tms_in_failed", "warn_msg"), esp.lang("event/tms_in_failed", "warn_ok"), () => {
240
+ sendTelegram()
241
+ }, esp.lang("event/tms_in_failed", "warn_no"), () => { })
243
242
 
244
- }} style={{ width: (LibStyle.width - 45) * 0.5, height: 40, borderRadius: 5, backgroundColor: LibStyle.colorRed, borderWidth: 3, borderColor: "#fff", justifyContent: 'center', alignContent: 'center', alignItems: 'center', ...LibStyle.elevation(10) }}>
245
- <Text allowFontScaling={false} style={{ textAlign: 'center', fontWeight: 'bold', color: "#fff" }}>{esp.lang("event/tms_in_hall_failed", "report_error")}</Text>
246
- </Pressable>
247
- </UseCondition>
243
+ }} style={{ width: (LibStyle.width - 45) * 0.5, height: 40, borderRadius: 5, backgroundColor: LibStyle.colorRed, borderWidth: 3, borderColor: "#fff", justifyContent: 'center', alignContent: 'center', alignItems: 'center', ...LibStyle.elevation(10) }}>
244
+ <Text allowFontScaling={false} style={{ textAlign: 'center', fontWeight: 'bold', color: "#fff" }}>{esp.lang("event/tms_in_hall_failed", "report_error")}</Text>
245
+ </Pressable>
248
246
  <Pressable onPress={getBack} style={{ width: (LibStyle.width - 45) * 0.5, backgroundColor: LibStyle.colorGreen, height: 40, borderRadius: 5, borderWidth: 5, borderColor: LibStyle.colorGreen, justifyContent: 'center', alignContent: 'center', alignItems: 'center', ...LibStyle.elevation(10) }}>
249
247
  <Text allowFontScaling={false} style={{ fontWeight: 'bold', color: "#fff" }}>{esp.lang("event/tms_in_hall_failed", "back")}</Text>
250
248
  </Pressable>
@@ -49,6 +49,8 @@ export default function m(props: EventTms_in_logProps): any {
49
49
  const [loading, setLoading] = useSafeState<boolean>(true)
50
50
  const timeout = useTimeout()
51
51
 
52
+ esp.log({ log });
53
+
52
54
  function syncData() {
53
55
  EventTms_homeProperty.subscribeSync().trigger(EventTms_in_successProperty.syncUsedTiket().get())
54
56
  timeout(() => {
@@ -105,7 +105,7 @@ export default function m(props: EventTms_in_successProps): any {
105
105
  is_tms: 1,
106
106
  qty: _qty,
107
107
  tms_id: UserClass.state().get()?.id,
108
- scanned: LibUtils.moment().format('YYYY-MM-DD HH:mm:ss'),
108
+ scanned: LibUtils.moment().localeFormat('YYYY-MM-DD HH:mm:ss'),
109
109
  }
110
110
  EventTms_homeProperty.addCounterEntranceOpenGate(1, selectedTicket?.price_id)
111
111
  syncUsedTiketState.set(LibObject.push(syncUsedTiketState.get(), [url, post])())
package/event/tms_log.tsx CHANGED
@@ -3,6 +3,7 @@ import { useEffect, useRef } from 'react';
3
3
 
4
4
  import { EventButton } from 'esoftplay/cache/event/button/import';
5
5
  import { EventHeader } from 'esoftplay/cache/event/header/import';
6
+ import { EventTms_dashboardProperty } from 'esoftplay/cache/event/tms_dashboard/import';
6
7
  import { EventTms_homeProperty } from 'esoftplay/cache/event/tms_home/import';
7
8
  import { EventTms_in_hall_log } from 'esoftplay/cache/event/tms_in_hall_log/import';
8
9
  import { EventTms_in_hall_successProperty } from 'esoftplay/cache/event/tms_in_hall_success/import';
@@ -48,17 +49,6 @@ export interface LogItem {
48
49
  valuecolor?: string
49
50
  }
50
51
 
51
- function Item(props: LogItem) {
52
- return (
53
- <Pressable
54
- onPress={() => {
55
- props.onPress()
56
- }} style={{ flexDirection: 'row', justifyContent: 'space-between', alignContent: 'center', alignItems: 'center', marginHorizontal: 15, paddingVertical: 6, borderBottomWidth: 1, borderBottomColor: LibStyle.colorLightGrey }}>
57
- <LibTextstyle text={props.text} textStyle="subhead" />
58
- <LibTextstyle text={LibUtils.number(props.value)} style={{ color: props.valuecolor ? props.valuecolor : "#000" }} textStyle="title2" />
59
- </Pressable>
60
- )
61
- }
62
52
 
63
53
  // Fungsi untuk menjumlahkan nilai per kategori
64
54
  export function sumValuesPerCategory(data: any) {
@@ -105,12 +95,15 @@ const useDetectStateChange = (state: any, duration: number) => {
105
95
 
106
96
  export default function m(props: EventTms_logProps): any {
107
97
  const selectedRef = useRef<LibSlidingup>(null)
108
- const { event_id, gate, fromPage }: any = LibNavigation.getArgsAll(props)
98
+ // const { event_id, gate }: any = LibNavigation.getArgsAll(props)
109
99
  const [, setSelectedData, getSelectedData] = useSafeState<any[]>([])
110
100
  const [titleSliding, setTitleSliding] = useSafeState()
111
101
  let counter = useRef(0).current
112
102
  let counterDone = useRef(0).current
113
103
 
104
+ const event_id = EventTms_dashboardProperty?.closingDataState()?.get().event_id
105
+ const gate_id = EventTms_dashboardProperty?.closingDataState()?.get().gate_id
106
+
114
107
  const backupEntrance = EventTms_in_successProperty.syncUsedTiket().useSelector(s => s)
115
108
  const isStuckEntrance = useDetectStateChange(backupEntrance, 10000)
116
109
 
@@ -147,7 +140,7 @@ export default function m(props: EventTms_logProps): any {
147
140
 
148
141
  function closing() {
149
142
  const counter = EventTms_homeProperty.getDataByDate()
150
- let url = 'event_tms_closing' + LibUtils.objectToUrlParam({ event_id: event_id, gate_id: gate?.id })
143
+ let url = 'event_tms_closing' + LibUtils.objectToUrlParam({ event_id: event_id, gate_id: gate_id })
151
144
  let post = {
152
145
  closing: JSON.stringify(counter)
153
146
  }
@@ -285,9 +278,7 @@ export default function m(props: EventTms_logProps): any {
285
278
  sendFileTelegram('event/tms_in_log_copy_scanned', () => {
286
279
  counterDone = counterDone + 1
287
280
  if (counter == counterDone) {
288
- if (!fromPage) {
289
- closing()
290
- }
281
+ closing()
291
282
  }
292
283
  })
293
284
  })
@@ -299,9 +290,7 @@ export default function m(props: EventTms_logProps): any {
299
290
  sendFileTelegram('event/tms_out_log_copy_scanned', () => {
300
291
  counterDone = counterDone + 1
301
292
  if (counter == counterDone) {
302
- if (!fromPage) {
303
- closing()
304
- }
293
+ closing()
305
294
  }
306
295
  })
307
296
  })
@@ -313,9 +302,7 @@ export default function m(props: EventTms_logProps): any {
313
302
  sendFileTelegram('event/hall_log_copy_scanned', () => {
314
303
  counterDone = counterDone + 1
315
304
  if (counter == counterDone) {
316
- if (!fromPage) {
317
- closing()
318
- }
305
+ closing()
319
306
  }
320
307
  })
321
308
  })
@@ -327,9 +314,7 @@ export default function m(props: EventTms_logProps): any {
327
314
  sendFileTelegram('event/hallout_log_copy_scanned', () => {
328
315
  counterDone = counterDone + 1
329
316
  if (counter == counterDone) {
330
- if (!fromPage) {
331
- closing()
332
- }
317
+ closing()
333
318
  }
334
319
  })
335
320
  })
package/event/tms_out.tsx CHANGED
@@ -71,7 +71,7 @@ export default function m(props: EventTms_outProps): any {
71
71
  gate_id: selectGate?.id,
72
72
  trx_id: new Date().getTime() + "" + UserClass.state().get()?.id,
73
73
  price_id: modifyList?.filter((item: any) => item.checked == 1).map((it: any) => it.price_id),
74
- scanned_out: LibUtils.moment().format('YYYY-MM-DD HH:mm:ss'),
74
+ scanned_out: LibUtils.moment().localeFormat('YYYY-MM-DD HH:mm:ss'),
75
75
  }
76
76
  let urlOut = "event_tms_out_confirm"
77
77
  LibNavigation.replace('event/tms_out_success', { data: finalData, ...args, url: urlOut, post: postOut })
@@ -104,7 +104,7 @@ export default function m(props: EventTms_out_failedProps): any {
104
104
  <View style={{ flex: 1, justifyContent: 'center', paddingVertical: 5 }}>
105
105
  {
106
106
  item.scanned != "0000-00-00 00:00:00" &&
107
- <Text allowFontScaling={false} style={{ textAlign: 'center', fontSize: 12 }}>{LibUtils.moment(item.hall_scanned).localeFormat("DD MMM H:mm:ss ")}</Text>
107
+ <Text allowFontScaling={false} style={{ textAlign: 'center', fontSize: 12 }}>{LibUtils.moment(item.hall_scanned).localeFormat("DD MMM H:mm:ss ") + (item.timezone_locale != "" ? item.timezone_locale : "")}</Text>
108
108
  }
109
109
  </View>
110
110
  </View>
@@ -53,10 +53,12 @@ export default function m(props: EventVisitor_inputProps): any {
53
53
  return (name) => inputsState.set(LibObject.set(inputsState.get(), name)(list_id))
54
54
  }
55
55
 
56
- // esp.log(url_invitation);
57
-
58
56
  useEffect(() => {
59
- loadData()
57
+ if (esp.isDebug("")) {
58
+ LibNavigation.replace('event/visitor_inputv2', { data: _data, url: url })
59
+ } else {
60
+ loadData()
61
+ }
60
62
  }, [])
61
63
 
62
64
  function loadData(): void {
@@ -115,8 +117,11 @@ export default function m(props: EventVisitor_inputProps): any {
115
117
  setCounter(counter + 1)
116
118
  }}>
117
119
  <View style={applyStyle({ height: 35, width: LibStyle.width / 4, alignItems: 'center', overflow: 'visible', justifyContent: 'center', backgroundColor: '#fff' })}>
118
- <Text allowFontScaling={false} style={applyStyle({ width: LibStyle.width / 4, fontFamily: "Arial", fontSize: 11, fontWeight: activeTab?.id == item?.id ? "bold" : "normal", fontStyle: "normal", letterSpacing: 0, textAlign: "center", color: activeTab?.id == item?.id ? "#51b596" : "#c5c5c5" })}>{item.name} ({LibUtils.number(item?.qty)})</Text>
119
- <View style={applyStyle({ width: (LibStyle.width / 4) - 20, height: 3, backgroundColor: activeTab?.id == item?.id ? "#51b596" : "#fff", position: 'absolute', bottom: 0 })} />
120
+ <View style={{ width: LibStyle.width / 4, }}>
121
+ <Text allowFontScaling={false} numberOfLines={2} ellipsizeMode='tail' style={applyStyle({ fontFamily: "Arial", fontSize: 11, fontWeight: activeTab?.id == item?.id ? "bold" : "normal", fontStyle: "normal", letterSpacing: 0, textAlign: "center", color: activeTab?.id == item?.id ? "#51b596" : "#c5c5c5" })}>{item.name}</Text>
122
+ <Text allowFontScaling={false} style={applyStyle({ fontFamily: "Arial", fontSize: 11, fontWeight: activeTab?.id == item?.id ? "bold" : "normal", fontStyle: "normal", letterSpacing: 0, textAlign: "center", color: activeTab?.id == item?.id ? "#51b596" : "#c5c5c5" })}>({LibUtils.number(item?.qty)})</Text>
123
+ </View>
124
+ <View style={applyStyle({ width: (LibStyle.width / 4) - 20, height: 3, backgroundColor: activeTab?.id == item?.id ? "#51b596" : "#fff", position: 'absolute', bottom: -1 })} />
120
125
  </View>
121
126
  </TouchableOpacity>
122
127
  )
@@ -225,6 +230,8 @@ export default function m(props: EventVisitor_inputProps): any {
225
230
  )
226
231
  }
227
232
 
233
+ // esp.log(_tabs);
234
+
228
235
  return (
229
236
  <View style={{ flex: 1 }}>
230
237
  <EventHeader title={esp.lang("event/visitor_input", "title_input_exhibitor")} subtitle={esp.lang("event/visitor_input", "total_staff", LibUtils.number(data.qty))} />
@@ -244,6 +251,16 @@ export default function m(props: EventVisitor_inputProps): any {
244
251
  // isDebug={1}
245
252
  key={activeTab + counter}
246
253
  // style={{ flex: 1 }}
254
+ ListHeaderComponent={
255
+ <>
256
+ {
257
+ activeTab?.ondate != "0000-00-00" &&
258
+ <View style={{ margin: 15, marginBottom: 0 }}>
259
+ <Text allowFontScaling={false} style={{ fontWeight: 'bold', color: LibStyle.colorGreen }}>{"Tanggal berlaku " + LibUtils.moment(activeTab?.ondate).format("DD MMMM YYYY")}</Text>
260
+ </View>
261
+ }
262
+ </>
263
+ }
247
264
  removeClippedSubviews={Platform.OS == 'android'}
248
265
  renderItem={renderItem}
249
266
  />