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.
Files changed (100) hide show
  1. package/event/additional.tsx +1 -1
  2. package/event/additional_input.tsx +15 -0
  3. package/event/additional_new.tsx +565 -0
  4. package/event/artist.tsx +14 -34
  5. package/event/artist_detail.tsx +336 -239
  6. package/event/artist_detail_multi.tsx +266 -157
  7. package/event/artist_detailv2.tsx +129 -69
  8. package/event/artistv2.tsx +5 -13
  9. package/event/button.tsx +2 -2
  10. package/event/button_order_detail.tsx +20 -8
  11. package/event/capture.tsx +2 -0
  12. package/event/checkout.ts +135 -0
  13. package/event/countdown.tsx +13 -9
  14. package/event/countdown_base.tsx +88 -48
  15. package/event/countdown_event.tsx +3 -0
  16. package/event/countdown_timestamp.tsx +106 -0
  17. package/event/coupon.tsx +1 -1
  18. package/event/coupon_generate.tsx +35 -22
  19. package/event/detail.tsx +9 -15
  20. package/event/detail2.tsx +63 -61
  21. package/event/dialog_custom.tsx +67 -0
  22. package/event/exchange_ticket_list.tsx +23 -14
  23. package/event/exchange_ticket_result.tsx +1 -1
  24. package/event/firebase_socket.ts +14 -12
  25. package/event/htmltext.tsx +40 -28
  26. package/event/index.tsx +8 -2
  27. package/event/label_input.tsx +2 -2
  28. package/event/layout.tsx +312 -0
  29. package/event/loading_page.tsx +62 -82
  30. package/event/message.tsx +2 -2
  31. package/event/order_detail.tsx +408 -477
  32. package/event/order_detail_addons.tsx +60 -0
  33. package/event/order_detail_addons_booked.tsx +61 -0
  34. package/event/order_detail_coupon.tsx +66 -0
  35. package/event/order_detail_instruction.tsx +96 -0
  36. package/event/order_detail_payment.tsx +1 -1
  37. package/event/order_detail_reschedule.tsx +109 -0
  38. package/event/order_detail_return.tsx +231 -0
  39. package/event/order_detail_review.tsx +174 -0
  40. package/event/order_detail_share.tsx +304 -0
  41. package/event/order_detail_tnc.tsx +76 -0
  42. package/event/order_detail_upgrade.tsx +140 -90
  43. package/event/order_detail_upgrade_payment.tsx +120 -38
  44. package/event/order_detail_visitor.tsx +21 -10
  45. package/event/order_detail_waiting.tsx +3 -3
  46. package/event/order_history.tsx +1 -1
  47. package/event/order_item.tsx +1 -1
  48. package/event/order_lottery.tsx +1 -1
  49. package/event/order_reschedule.tsx +29 -16
  50. package/event/order_share_to.tsx +14 -0
  51. package/event/order_waiting.tsx +1 -1
  52. package/event/payment_subscribe.tsx +18 -0
  53. package/event/point_events.tsx +35 -0
  54. package/event/point_redemption.tsx +101 -0
  55. package/event/point_redemption_exchange.tsx +60 -0
  56. package/event/point_redemption_input.tsx +56 -0
  57. package/event/point_redemption_success.tsx +50 -0
  58. package/event/point_summary.tsx +48 -0
  59. package/event/popup.tsx +4 -4
  60. package/event/queue.tsx +111 -0
  61. package/event/queue_pricing.tsx +17 -6
  62. package/event/review_add.tsx +2 -2
  63. package/event/scan_item.tsx +1 -1
  64. package/event/schedule.tsx +33 -30
  65. package/event/schedule2.tsx +86 -0
  66. package/event/seat.tsx +135 -374
  67. package/event/seat_map.tsx +8 -8
  68. package/event/seat_map_new.tsx +211 -38
  69. package/event/step.tsx +1 -1
  70. package/event/test.tsx +8 -8
  71. package/event/ticket.tsx +326 -0
  72. package/event/ticket_list.tsx +316 -258
  73. package/event/ticket_list2.tsx +349 -224
  74. package/event/ticket_list_item.tsx +61 -0
  75. package/event/ticket_list_new.tsx +710 -0
  76. package/event/tms_add_result.tsx +10 -5
  77. package/event/tms_check_ticket_result.tsx +16 -7
  78. package/event/tms_dashboard.tsx +87 -12
  79. package/event/tms_gate.tsx +32 -15
  80. package/event/tms_home.tsx +178 -92
  81. package/event/tms_idcard.tsx +43 -26
  82. package/event/tms_in.tsx +2 -3
  83. package/event/tms_in_failed.tsx +1 -1
  84. package/event/tms_in_hall.tsx +4 -1
  85. package/event/tms_in_hall_failed.tsx +36 -16
  86. package/event/tms_in_log.tsx +9 -11
  87. package/event/tms_in_success.tsx +13 -8
  88. package/event/tms_log.tsx +16 -17
  89. package/event/tms_out_hall_failed.tsx +1 -1
  90. package/event/tms_out_temporary.tsx +3 -4
  91. package/event/token_order.tsx +103 -0
  92. package/event/token_payment.tsx +79 -0
  93. package/event/visitor_index.tsx +60 -49
  94. package/event/visitor_input.tsx +336 -54
  95. package/event/visitor_inputv2.tsx +173 -88
  96. package/event/voucher.tsx +1 -1
  97. package/id.json +76 -4
  98. package/package.json +1 -1
  99. package/event/secure_page.debug.tsx +0 -34
  100. package/event/secure_page.live.tsx +0 -35
@@ -9,15 +9,14 @@ import { LibInfinite } from 'esoftplay/cache/lib/infinite/import';
9
9
  import { LibNavigation } from 'esoftplay/cache/lib/navigation/import';
10
10
  import { LibProgress } from 'esoftplay/cache/lib/progress/import';
11
11
  import { LibStyle } from 'esoftplay/cache/lib/style/import';
12
- import { LibToastProperty } from 'esoftplay/cache/lib/toast/import';
13
12
  import esp from 'esoftplay/esp';
14
13
  import useSafeState from 'esoftplay/state';
15
14
 
16
- import { EventInput_rectangle } from 'esoftplay/cache/event/input_rectangle/import';
17
- import { EventLabel_input } from 'esoftplay/cache/event/label_input/import';
15
+ import { LibPicture } from 'esoftplay/cache/lib/picture/import';
18
16
  import { LibUtils } from 'esoftplay/cache/lib/utils/import';
17
+ import useLazyState from 'esoftplay/lazy';
19
18
  import React, { useEffect, useRef } from 'react';
20
- import { Text, TouchableOpacity, View } from 'react-native';
19
+ import { Pressable, Text, TouchableOpacity, View } from 'react-native';
21
20
 
22
21
  export interface EventVisitor_indexArgs {
23
22
 
@@ -30,8 +29,9 @@ export default function m(props: EventVisitor_indexProps): any {
30
29
  const url = 'event_history'
31
30
  const [argsCode, setArgsCode] = useSafeState(code)
32
31
  const [isExist, setIsExist] = useSafeState(0)
32
+ const [types, setTypes] = useLazyState<any>(undefined)
33
+ const [activeType, setActiveType] = useLazyState<any>()
33
34
  const ref = useRef<LibInfinite>(null)
34
- let inputAccessCode = React.useRef<EventInput_rectangle>(null)
35
35
 
36
36
  function loadButtonHistoryExist() {
37
37
  new LibCurl('event_history_history_exists', null, (res, msg) => {
@@ -41,10 +41,22 @@ export default function m(props: EventVisitor_indexProps): any {
41
41
  })
42
42
  }
43
43
 
44
+ function loadCategories() {
45
+ new LibCurl('event_history_cat', null, (res, msg) => {
46
+ setTypes(res)
47
+ setActiveType(res?.[0])()
48
+ }, (error) => { })
49
+ }
50
+
51
+ function buildUrl(type: any): string {
52
+ return type?.url || url
53
+ }
54
+
44
55
  useEffect(() => {
56
+ loadCategories()
45
57
  loadButtonHistoryExist()
58
+
46
59
  if (argsCode) {
47
- inputAccessCode?.current?.setText(argsCode)
48
60
  LibUtils.debounce(() => {
49
61
  doSubmit()
50
62
  }, 200)
@@ -74,19 +86,15 @@ export default function m(props: EventVisitor_indexProps): any {
74
86
 
75
87
  function doSubmit(): void {
76
88
  if (!argsCode) {
77
- if (inputAccessCode?.current?.getText() == '') {
78
- LibToastProperty.show(esp.lang("event/visitor_index", "alert_error_not_empty_code"))
79
- return
80
- }
89
+ return
81
90
  }
82
91
  var post = {
83
- access_code: argsCode ? argsCode : inputAccessCode?.current?.getText().toUpperCase()
92
+ access_code: argsCode
84
93
  }
85
94
  LibProgress.show(esp.lang("event/visitor_index", "waiting_msg"))
86
95
  new LibCurl('event_exhibitor_code', post, (res, msg) => {
87
96
  setArgsCode(undefined) // reset code supaya pas textbox kosong tidak bisa submit
88
97
  ref.current?.loadData()
89
- inputAccessCode.current?.setText("")
90
98
  if (res.hasOwnProperty('qty')) {
91
99
  new LibCurl(res?.url, null, (result, msg) => {
92
100
  LibNavigation.navigate('event/visitor_input', { data: result, msg: msg, url: res.url })
@@ -114,51 +122,45 @@ export default function m(props: EventVisitor_indexProps): any {
114
122
 
115
123
  return (
116
124
  <View style={{ flex: 1, backgroundColor: LibStyle.colorBgGrey }}>
117
- <EventHeader title={esp.lang("event/visitor_index", "title_input_code")} subtitle={esp.lang("event/visitor_index", "subtitle_input_code")} />
125
+ <EventHeader title={esp.lang("event/visitor_index", "header_title")} />
126
+ <>
127
+ {
128
+ types && types?.length > 0 &&
129
+ <View style={[{ flexDirection: "row", alignItems: "center", marginHorizontal: 15, marginTop: 10 }]}>
130
+ {
131
+ types?.map?.((item: any, index: number) => {
132
+ const tabsLength = types?.length
133
+ const itemWidth = (LibStyle.width - 30) / tabsLength
134
+ return (
135
+ <Pressable key={index} onPress={() => {
136
+ setActiveType(item)()
137
+ }}>
138
+ <View key={index} style={applyStyle({ height: 43, width: itemWidth, alignItems: 'center', overflow: 'visible', justifyContent: 'center', backgroundColor: '#fff' })}>
139
+ <Text allowFontScaling={false} style={{
140
+ width: itemWidth, fontFamily: "Arial", fontSize: item?.type == activeType?.type ? 13 : 12,
141
+ fontWeight: item?.type == activeType?.type ? "bold" : "normal",
142
+ fontStyle: "normal", letterSpacing: 0, textAlign: "center",
143
+ color: item?.type == activeType?.type ? "#51b596" : "#c5c5c5"
144
+ }}>{item.title}</Text>
145
+ <View style={{ width: (itemWidth) - 20, height: 3, backgroundColor: item?.type == activeType?.type ? "#51b596" : "#fff", position: 'absolute', bottom: 0 }} />
146
+ </View>
147
+ </Pressable>
148
+ )
149
+ })
150
+ }
151
+ </View>
152
+ }
153
+ </>
118
154
  <LibInfinite
119
155
  ref={ref}
120
156
  // isDebug={1}
121
- ListHeaderComponent={
122
- <>
123
- <View style={{ flexDirection: 'row', borderRadius: 10, backgroundColor: '#FEFBEB', borderColor: "#FFCC29", borderWidth: 1, borderStyle: 'dashed', alignContent: 'center', alignItems: 'center', margin: 15, marginBottom: 0, padding: 10 }}>
124
- <Text allowFontScaling={false} style={{ flex: 1, fontFamily: "Arial", fontSize: 12, fontStyle: "normal", letterSpacing: 0 }} >{esp.lang("event/visitor_index", "please_input_your_exhibitor_code")}</Text>
125
- </View>
126
-
127
-
128
- <View style={[{ margin: 15, backgroundColor: 'white', padding: 15, paddingTop: 8 }, LibStyle.elevation(2)]}>
129
- <EventLabel_input label={esp.lang("event/visitor_index", "label_input_code")} mandatory />
130
- <EventInput_rectangle
131
- ref={inputAccessCode}
132
- placeholder={esp.lang("event/visitor_index", "input_code")}
133
- style={{ borderRadius: 3, height: 35 }}
134
- autoCapitalize='characters'
135
- returnKeyType='go'
136
- onSubmitEditing={() => {
137
- inputAccessCode.current!.blur()
138
- doSubmit()
139
- }}
140
- blurOnSubmit
141
- />
142
-
143
- <TouchableOpacity onPress={() => {
144
- inputAccessCode.current!.blur()
145
- doSubmit()
146
- }}>
147
- <View style={{ marginTop: 20, height: 35, borderRadius: 5, backgroundColor: "#6c432c", justifyContent: 'center', alignItems: 'center', paddingHorizontal: 9 }} >
148
- <Text allowFontScaling={false} style={{ fontFamily: "ArialBold", fontSize: 12, textAlign: "center", textAlignVertical: 'center', color: 'white', marginRight: 13, marginLeft: 10 }} >{esp.lang("event/visitor_index", "submit")}</Text>
149
- </View>
150
- </TouchableOpacity>
151
- </View>
152
-
153
- <Text allowFontScaling={false} style={{ fontFamily: "ArialBold", fontSize: 14, margin: 15, marginBottom: 0 }} >{esp.lang("event/visitor_index", "history")}</Text>
154
- </>
155
- }
157
+ key={buildUrl(activeType)}
156
158
  errorView={(err: any) => (
157
159
  <View style={{ margin: 15 }}>
158
160
  <EventMessage message={err} />
159
161
  </View>
160
162
  )}
161
- url={url}
163
+ url={buildUrl(activeType)}
162
164
  renderItem={renderItem}
163
165
  ListEndedComponent={
164
166
  esp.isDebug('') && isExist == 1 &&
@@ -170,6 +172,15 @@ export default function m(props: EventVisitor_indexProps): any {
170
172
  }
171
173
  />
172
174
 
175
+ <TouchableOpacity onPress={() => {
176
+ LibNavigation.replace('bigbang/input_code')
177
+ }} style={{ padding: 5, /* ...LibStyle.elevation(3), */ position: 'absolute', right: 0, bottom: 30, borderTopLeftRadius: 35, borderBottomLeftRadius: 35, backgroundColor: esp.isDebug("ini memang isDebug, tapi jangan di hapus") ? 'rgba(0, 191, 99, 0.1618)' : 'rgba(255, 197, 35, 0.1618)' }}>
178
+ <View style={{ padding: 5, backgroundColor: LibStyle.colorPrimary, ...LibStyle.elevation(3), borderRadius: 30, alignContent: 'center', alignItems: 'center', justifyContent: 'center' }}>
179
+ <LibPicture source={esp.assets('icons/ic_input.png')} style={{ marginTop: 1, height: 13, width: 26 }} />
180
+ <Text allowFontScaling={false} style={{ fontWeight: 'bold', color: '#000', marginTop: 2, fontSize: 9 }}>{"Code"}</Text>
181
+ </View>
182
+ </TouchableOpacity>
183
+
173
184
  </View >
174
185
  )
175
186
  }