esoftplay-event 0.0.0-e → 0.0.0-f

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/config.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "fonts": {
3
- "mono": "mono.ttf",
4
3
  "Arial": "Arial.ttf",
5
4
  "ArialBold": "ArialBold.ttf",
6
5
  "SFProText": "SFProText.ttf",
6
+ "mono": "mono.ttf",
7
7
  "MonoSpace": "MonoSpace.ttf",
8
8
  "DecoNumbers": "DecoNumbers.ttf",
9
9
  "digital": "digital.ttf"
@@ -12,7 +12,6 @@ import { LibObject } from 'esoftplay/cache/lib/object/import';
12
12
  import { LibPicture } from 'esoftplay/cache/lib/picture/import';
13
13
  import { LibStyle } from 'esoftplay/cache/lib/style/import';
14
14
  import { LibToastProperty } from 'esoftplay/cache/lib/toast/import';
15
- import { LibUtils } from 'esoftplay/cache/lib/utils/import';
16
15
  import { UserClass } from 'esoftplay/cache/user/class/import';
17
16
  import esp from 'esoftplay/esp';
18
17
  import useSafeState from 'esoftplay/state';
@@ -75,10 +74,7 @@ export default function m(props: EventTms_idcardProps): any {
75
74
  }, [])
76
75
 
77
76
  function entrance() {
78
- let url = url_ticket_update + LibUtils.objectToUrlParam({
79
- is_turnstile: 0,
80
- })
81
-
77
+ let url = url_ticket_update
82
78
  let post = {
83
79
  "target-url": `https://api.${esp.config().domain}/gate_checkin`,
84
80
  price_id: 0,
@@ -93,9 +93,7 @@ export default function m(props: EventTms_in_successProps): any {
93
93
  }
94
94
 
95
95
  function useTicket() {
96
- let url = url_ticket_update + LibUtils.objectToUrlParam({
97
- is_turnstile: 0,
98
- })
96
+ let url = url_ticket_update
99
97
 
100
98
  let post = {
101
99
  "target-url": `https://api.${esp.config().domain}/gate_checkin`,
@@ -234,7 +234,7 @@ export default function useFirebaseSocket() {
234
234
  return ori
235
235
  }
236
236
 
237
- // get weather function
237
+ // get weather function
238
238
 
239
239
  function getQueue(path: string, event_id: string, _limit: number, cb: (idx: number, key: string) => void) {
240
240
  const instance = initAppCustom()
@@ -301,9 +301,7 @@ export default function useFirebaseSocket() {
301
301
 
302
302
  function useQueueConfigListener() {
303
303
  function action() {
304
- fetch(esp.isDebug("") ?
305
- "https://storage.googleapis.com/bbo-images/images/modules/api/event_queue.json" + "?t=" + new Date().getTime() :
306
- "https://storage.googleapis.com/bbo-images/bbo.co.id/images/modules/api/event_queue.json" + "?t=" + new Date().getTime(), { "method": "GET" })
304
+ fetch(esp.config("events", "queue") + "?t=" + new Date().getTime(), { "method": "GET" })
307
305
  .then(res => res.json())
308
306
  .then((re) => {
309
307
  eventQueueConfig.set(re)
@@ -83,7 +83,7 @@ export default function m(props: EventTms_in_hall_failedProps): any {
83
83
  tms_id: UserClass.state().get()?.id,
84
84
  scanned: LibUtils.moment().format('YYYY-MM-DD HH:mm:ss'),
85
85
  }
86
- new LibCurl(url_ticket_update + "?is_turnstile=0", post,
86
+ new LibCurl(url_ticket_update, post,
87
87
  (res) => {
88
88
  doneEntrance += 1
89
89
  if (mustBeEntrance <= doneEntrance) {
package/event/index.tsx CHANGED
@@ -96,7 +96,7 @@ export default function m(props: EventIndexProps): any {
96
96
  }, [isFocus])
97
97
 
98
98
  function loadData() {
99
- new LibCurl(esp.isDebug("") ? "https://storage.googleapis.com/bbo-images/images/modules/api/home_event.json" : "https://storage.googleapis.com/bbo-images/bbo.co.id/images/modules/api/home_event.json", null, (res) => {
99
+ new LibCurl(esp.config("events", "home"), null, (res) => {
100
100
  setData(res)
101
101
  }, msg => setError(msg))
102
102
  }
@@ -364,7 +364,7 @@ export default function m(props: EventOrder_detailProps): any {
364
364
 
365
365
  <View testID='price_name' style={{ marginTop: 10, borderWidth: 5, padding: 3, borderColor: result?.color, backgroundColor: EventOrder_itemProperty.textColor(result?.color) }}>
366
366
  <View style={{ padding: 10, backgroundColor: result?.color, justifyContent: 'center', alignContent: 'center', alignItems: 'center' }}>
367
- <EventHtmltext allowFontScaling={false} numberOfLines={1} ellipsizeMode="tail" style={{ color: EventOrder_itemProperty.textColor(result?.color), alignSelf: 'center', textAlign: 'center', fontSize: 20, fontWeight: 'bold' }}> {result?.price_name}</EventHtmltext>
367
+ <EventHtmltext allowFontScaling={false} numberOfLines={3} ellipsizeMode="tail" style={{ color: EventOrder_itemProperty.textColor(result?.color), alignSelf: 'center', textAlign: 'center', fontSize: 20, fontWeight: 'bold' }}> {result?.price_name}</EventHtmltext>
368
368
  </View>
369
369
  </View>
370
370
 
@@ -6,6 +6,7 @@ import { useEffect } from 'react';
6
6
 
7
7
  import { applyStyle } from 'esoftplay';
8
8
  import { EventButton } from 'esoftplay/cache/event/button/import';
9
+ import { EventHtmltext } from 'esoftplay/cache/event/htmltext/import';
9
10
  import { EventMessage } from 'esoftplay/cache/event/message/import';
10
11
  import { LibCurl } from 'esoftplay/cache/lib/curl/import';
11
12
  import { LibDialog } from 'esoftplay/cache/lib/dialog/import';
@@ -30,20 +31,29 @@ export default function m(props: EventOrder_detail_upgradeProps): any {
30
31
  const [selectedTicket, setSelectedTicket] = useSafeState()
31
32
  const [result, setResult] = useSafeState()
32
33
  const [error, setError] = useSafeState()
34
+ // const [resultEvent, setResultEvent] = useSafeState()
33
35
 
34
36
  function loadDataUpgradeTicket() {
35
37
  new LibCurl(url, null, (res: any, msg: string) => {
36
38
  // setAvailableUpgrade(res?.list)
37
- // esp.log(res);
38
39
  setResult(res)
39
40
  }, (err: any) => {
40
41
  setError(err)
41
42
  })
42
43
  }
43
44
 
45
+ // function loadDataEvent() {
46
+ // new LibCurl("event_detail/" + dataTicket?.event_id, null, (res: any, msg: string) => {
47
+ // setResultEvent(res)
48
+ // }, (err: any) => {
49
+
50
+ // })
51
+ // }
52
+
44
53
 
45
54
  useEffect(() => {
46
55
  loadDataUpgradeTicket()
56
+ // loadDataEvent()
47
57
  }, [])
48
58
 
49
59
  if (!result && !error) {
@@ -75,8 +85,8 @@ export default function m(props: EventOrder_detail_upgradeProps): any {
75
85
  <LibTextstyle textStyle='m_overline' text={esp.lang("event/order_detail_upgrade", "current_ticket")} style={{ fontSize: 12, margin: 15, marginBottom: 0 }} />
76
86
 
77
87
  <View style={{ ...LibStyle.elevation(2), margin: 15, width: LibStyle.width - 30, borderRadius: 10, backgroundColor: LibStyle.colorBgGrey, padding: 10, height: 100, alignContent: 'center', alignItems: 'center', justifyContent: 'center' }}>
78
- <LibTextstyle style={{ marginHorizontal: 5, fontSize: 20, color: "#000", textAlign: 'center', fontWeight: 'bold' }} numberOfLines={2} ellipsizeMode={'tail'} textStyle='m_button' text={dataTicket?.price_name} />
79
- <Text allowFontScaling={false} style={{ color: "#000" }}>{LibUtils.money(dataTicket.total)}</Text>
88
+ <EventHtmltext allowFontScaling={false} style={{ marginHorizontal: 5, fontSize: 20, color: "#000", textAlign: 'center', fontWeight: 'bold' }} numberOfLines={2} ellipsizeMode={'tail'}>{dataTicket?.price_name}</EventHtmltext>
89
+ <Text allowFontScaling={false} style={{ color: "#000", marginTop: 10 }}>{LibUtils.money(dataTicket.total, dataTicket?.currency)}</Text>
80
90
 
81
91
  <View style={applyStyle({ flexDirection: 'row', alignItems: 'center', justifyContent: 'center', position: 'absolute', top: 0, left: 0, right: 0, bottom: 0 })}>
82
92
  <View style={applyStyle({ width: 25, height: 25, borderRadius: 12.5, backgroundColor: "#fff", marginLeft: -12.5 })} />
@@ -104,15 +114,16 @@ export default function m(props: EventOrder_detail_upgradeProps): any {
104
114
  ondate: item.ondate
105
115
  },
106
116
  },
107
- qty: dataTicket?.qty_upgrade
117
+ qty: dataTicket?.qty_upgrade,
118
+ tax_event: item.tax
108
119
  }
109
120
  setSelectedTicket(a)
110
121
  } else {
111
122
  LibDialog.warning(esp.lang("event/order_detail_upgrade", "oops"), item.message_error)
112
123
  }
113
124
  }} key={i} style={{ ...LibStyle.elevation(2), width: LibStyle.width - 35, marginLeft: 2.5, marginTop: 2.5, marginBottom: 10, borderRadius: 10, backgroundColor: item.status == 0 ? LibStyle.colorBgGrey : selectedTicket?.selected_ticket?.id == item.id ? LibStyle.colorGreen : "#fff", padding: 10, alignContent: 'center', alignItems: 'center', justifyContent: 'center' }}>
114
- <LibTextstyle style={{ marginHorizontal: 5, fontSize: 16, color: item.status == 0 ? "#c9c9c9" : selectedTicket?.selected_ticket?.id == item.id ? "#fff" : "#000", textAlign: 'center', fontWeight: 'bold' }} numberOfLines={2} ellipsizeMode={'tail'} textStyle='m_button' text={item?.price_name_to} />
115
- <Text allowFontScaling={false} style={{ fontSize: 14, fontWeight: 'bold', marginTop: 5, color: item.status == 0 ? "#c9c9c9" : selectedTicket?.selected_ticket?.id == item.id ? "#fff" : "#000" }}>{"+ " + LibUtils.money(Number(dataTicket?.qty_upgrade) * Number(item?.amount))}</Text>
125
+ <EventHtmltext allowFontScaling={false} style={{ marginHorizontal: 5, fontSize: 16, color: item.status == 0 ? "#c9c9c9" : selectedTicket?.selected_ticket?.id == item.id ? "#fff" : "#000", textAlign: 'center', fontWeight: 'bold' }} numberOfLines={2} ellipsizeMode={'tail'}>{item?.price_name_to}</EventHtmltext>
126
+ <Text allowFontScaling={false} style={{ fontSize: 14, fontWeight: 'bold', marginTop: 5, color: item.status == 0 ? "#c9c9c9" : selectedTicket?.selected_ticket?.id == item.id ? "#fff" : "#000" }}>{"+ " + LibUtils.money(Number(dataTicket?.qty_upgrade) * Number(item?.amount), item?.currency)}</Text>
116
127
 
117
128
  {
118
129
  item.info &&
@@ -134,19 +145,47 @@ export default function m(props: EventOrder_detail_upgradeProps): any {
134
145
  dataTicket: selectedTicket
135
146
  }).then((value) => {
136
147
  LibNavigation.navigate('event/order_detail_upgrade_payment', {
137
- dataTicket: dataTicket,
148
+ dataTicket: {
149
+ url_payment: result?.url_payment,
150
+ price_name: dataTicket?.price_name,
151
+ booking_id: dataTicket?.id,
152
+ qty_upgrade: dataTicket?.qty_upgrade,
153
+ tax_event: selectedTicket?.tax_event,
154
+ ondate: dataTicket?.ondate,
155
+ event_title: dataTicket?.event_name,
156
+ event_id: dataTicket?.event_id,
157
+ // ...dataTicket
158
+ },
138
159
  selectedTicket: {
139
160
  ...selectedTicket,
140
161
  row_id: value?.row_id,
141
162
  column_id: value?.column_id,
142
163
  seat_name: value?.seat_name,
164
+ },
165
+ fee_platform: {
166
+ fee_platform_amount: selectedTicket?.selected_ticket?.fee_platform_amount,
167
+ fee_platform_type: selectedTicket?.selected_ticket?.fee_platform_type,
143
168
  }
144
169
  })
145
170
  })
146
171
  } else {
147
172
  LibNavigation.navigate('event/order_detail_upgrade_payment', {
148
- dataTicket: dataTicket,
149
- selectedTicket: selectedTicket
173
+ dataTicket: {
174
+ url_payment: result?.url_payment,
175
+ price_name: dataTicket?.price_name,
176
+ booking_id: dataTicket?.id,
177
+ qty_upgrade: dataTicket?.qty_upgrade,
178
+ tax_event: selectedTicket?.tax_event,
179
+ ondate: dataTicket?.ondate,
180
+ event_title: dataTicket?.event_name,
181
+ event_id: dataTicket?.event_id,
182
+ // ...dataTicket
183
+ },
184
+ selectedTicket: selectedTicket,
185
+ fee_platform: {
186
+ fee_platform_amount: selectedTicket?.selected_ticket?.fee_platform_amount,
187
+ fee_platform_type: selectedTicket?.selected_ticket?.fee_platform_type,
188
+ }
150
189
  })
151
190
  }
152
191
  } else {
@@ -26,9 +26,9 @@ export interface EventOrder_detail_upgrade_paymentProps {
26
26
 
27
27
  }
28
28
  export default function m(props: EventOrder_detail_upgrade_paymentProps): any {
29
- const { dataTicket, selectedTicket }: any = LibNavigation.getArgsAll(props)
29
+ const { dataTicket, selectedTicket, fee_platform }: any = LibNavigation.getArgsAll(props)
30
30
  const [selectedPayment, setSelectedPayment] = useSafeState<any>()
31
- const [platformFee, setPlatformFee] = useSafeState<any>()
31
+ const [platformFee, setPlatformFee] = useSafeState<any>(fee_platform)
32
32
  const [charge, setCharge] = useSafeState<any>(0)
33
33
  const [chargePercent, setChargePercent] = useSafeState<any>()
34
34
 
@@ -46,7 +46,7 @@ export default function m(props: EventOrder_detail_upgrade_paymentProps): any {
46
46
 
47
47
  LibDialog.confirm(esp.lang("event/order_detail_upgrade_payment", "confirm_title"), esp.lang("event/order_detail_upgrade_payment", "confirm_msg", dataTicket?.price_name, selectedTicket?.selected_ticket?.price_name_to), esp.lang("event/order_detail_upgrade_payment", "confirm_ok"), () => {
48
48
  let post = {
49
- booking_id: dataTicket?.id,
49
+ booking_id: dataTicket?.booking_id,
50
50
  price_id_to: selectedTicket?.selected_ticket?.price_id_to,
51
51
  trx_id: trxId,
52
52
  payment_id: selectedPayment?.payment_id,
@@ -104,7 +104,7 @@ export default function m(props: EventOrder_detail_upgrade_paymentProps): any {
104
104
  return (percent * amount) / 100
105
105
  }
106
106
 
107
- let amount = Number(selectedTicket?.selected_ticket?.amount) * Number(dataTicket?.qty_upgrade)
107
+ let amount = Number(selectedTicket?.selected_ticket?.amount_difference) * Number(dataTicket?.qty_upgrade)
108
108
  let _tax = percentageCalculator(amount, dataTicket?.tax_event)
109
109
  let subtotalWithTax = amount + _tax
110
110
 
@@ -127,6 +127,7 @@ export default function m(props: EventOrder_detail_upgrade_paymentProps): any {
127
127
  )
128
128
  }
129
129
 
130
+
130
131
  return (
131
132
  <View style={{ flex: 1, backgroundColor: '#fff' }}>
132
133
  <EventHeader title={esp.lang("event/order_detail_upgrade_payment", "header_title")} />
@@ -168,6 +169,7 @@ export default function m(props: EventOrder_detail_upgrade_paymentProps): any {
168
169
 
169
170
  <BigbangPayment_list
170
171
  eventId={dataTicket?.event_id}
172
+ url_payment={dataTicket?.url_payment}
171
173
  onToggleCC={() => { scrollRef.current?.scrollToEnd({ animated: true }) }}
172
174
  order_type={14} // upgrade ticekt
173
175
  currency={selectedTicket?.selected_ticket?.currency}
@@ -34,7 +34,7 @@ export default function m(props: EventOrder_itemProps): any {
34
34
  return (
35
35
  <Pressable onPress={props.onPress} style={{ backgroundColor: '#fff', borderRadius: 5, overflow: 'hidden', width: LibStyle.width - 30, margin: 15, marginBottom: 0 }}>
36
36
  <View style={{ alignContent: 'center', borderBottomWidth: 1, borderBottomColor: textColor(item?.color), alignItems: 'center', justifyContent: 'center', backgroundColor: item?.color, padding: 10 }}>
37
- <EventHtmltext allowFontScaling={false} numberOfLines={1} ellipsizeMode="tail" style={{ color: textColor(item?.color), alignSelf: 'center', textAlign: 'center', fontSize: 16, fontWeight: 'bold' }}> {item?.price_name}</EventHtmltext>
37
+ <EventHtmltext allowFontScaling={false} numberOfLines={2} ellipsizeMode="tail" style={{ color: textColor(item?.color), alignSelf: 'center', textAlign: 'center', fontSize: 16, fontWeight: 'bold' }}> {item?.price_name}</EventHtmltext>
38
38
  </View>
39
39
  <View style={{ padding: 10, backgroundColor: '#fff', flex: 1 }}>
40
40
  <Text allowFontScaling={false} style={applyStyle({ marginHorizontal: 15, fontSize: 14, fontWeight: "bold", fontStyle: "normal", letterSpacing: 0, color: "#4a4a4a" })}>{item?.event_name}</Text>
@@ -142,7 +142,7 @@ export default function m(props: EventOrder_share_toProps): any {
142
142
  dialogUser.current!.show()
143
143
  }
144
144
  }}
145
- style={{ marginLeft: 25, marginRight: 25, marginTop: 18 }} />
145
+ style={{ marginLeft: 25, marginRight: 25, marginTop: 18, borderRadius: 5 }} />
146
146
  <TouchableOpacity onPress={() => {
147
147
  if (inputEmail.current!.getText() == '') {
148
148
  LibToastProperty.show(esp.lang("event/order_share_to", "msg_error_input_email"))
package/event/review.tsx CHANGED
@@ -93,7 +93,7 @@ export default function m(props: EventReviewProps): any {
93
93
  renderItem={(item: any) => {
94
94
  let type = calculateProb(item?.config?.review)
95
95
  let args = {
96
- url: "https://api.test.bbo.co.id/event_order_detail?id=" + item.id,
96
+ url: "event_order_detail?id=" + item.id,
97
97
  url_form: item.url_form + (item.url_detail.includes("?") ? "&" : "?") + 'type=' + type?.type,
98
98
  booking_id: item.id,
99
99
  type: type?.type,
package/event/seat.tsx CHANGED
@@ -116,7 +116,7 @@ export default function m(props: EventSeatProps): any {
116
116
  let post = {
117
117
  event_id: dataTicket?.event_id,
118
118
  booking_id: booking_id,
119
- price_id: dataTicket?.selected_ticket?.list?.price_id,
119
+ price_id: dataTicket?.selected_ticket?.list?.price_id || dataTicket?.selected_ticket?.price_id,
120
120
  ondate: dataTicket?.selected_ticket?.list?.ondate,
121
121
  }
122
122
  new LibCurl(url, post, (res, msg) => { // event_seat_shared
@@ -134,7 +134,7 @@ export default function m(props: EventSeatProps): any {
134
134
  function loadDataSize() {
135
135
  let post = {
136
136
  event_id: dataTicket?.event_id,
137
- price_id: dataTicket?.selected_ticket?.list?.price_id,
137
+ price_id: dataTicket?.selected_ticket?.list?.price_id || dataTicket?.selected_ticket?.price_id,
138
138
  ondate: dataTicket?.selected_ticket?.list?.ondate,
139
139
  }
140
140
  new LibCurl("event_seat_meta", post, (res, msg) => { // event_seat
@@ -166,7 +166,7 @@ export default function m(props: EventSeatProps): any {
166
166
  function loadSeat(_url?: string) {
167
167
  let post = {
168
168
  event_id: dataTicket?.event_id,
169
- price_id: dataTicket?.selected_ticket?.list?.price_id,
169
+ price_id: dataTicket?.selected_ticket?.list?.price_id || dataTicket?.selected_ticket?.price_id,
170
170
  ondate: dataTicket?.selected_ticket?.list?.ondate,
171
171
  }
172
172
  new LibCurl(_url ? _url : url, post, (res, msg) => { // event_seat
@@ -487,7 +487,7 @@ export default function m(props: EventSeatProps): any {
487
487
  y: resultDataSize.seat_row,
488
488
  url: url,
489
489
  event_id: dataTicket?.event_id,
490
- price_id: dataTicket?.selected_ticket?.list?.price_id,
490
+ price_id: dataTicket?.selected_ticket?.list?.price_id || dataTicket?.selected_ticket?.price_id,
491
491
  ondate: dataTicket?.selected_ticket?.list?.ondate,
492
492
  }, 345).then((item: any) => {
493
493
  setResult(undefined)
@@ -569,7 +569,7 @@ export default function m(props: EventSeatProps): any {
569
569
  }}
570
570
  onScroll={scrollHandlerY}>
571
571
  <View>
572
- {result?.list?.map(renderRow)}
572
+ {result?.list?.map?.(renderRow)}
573
573
  </View>
574
574
  </Animated.ScrollView>
575
575
  </Animated.ScrollView>
@@ -12,7 +12,6 @@ import { LibObject } from 'esoftplay/cache/lib/object/import';
12
12
  import { LibPicture } from 'esoftplay/cache/lib/picture/import';
13
13
  import { LibStyle } from 'esoftplay/cache/lib/style/import';
14
14
  import { LibToastProperty } from 'esoftplay/cache/lib/toast/import';
15
- import { LibUtils } from 'esoftplay/cache/lib/utils/import';
16
15
  import { UserClass } from 'esoftplay/cache/user/class/import';
17
16
  import esp from 'esoftplay/esp';
18
17
  import useSafeState from 'esoftplay/state';
@@ -75,9 +74,7 @@ export default function m(props: EventTms_idcardProps): any {
75
74
  }, [])
76
75
 
77
76
  function entrance() {
78
- let url = url_ticket_update + LibUtils.objectToUrlParam({
79
- is_turnstile: 0,
80
- })
77
+ let url = url_ticket_update
81
78
 
82
79
  let post = {
83
80
  "target-url": `https://api.${esp.config().domain}/gate_checkin`,
@@ -83,7 +83,7 @@ export default function m(props: EventTms_in_hall_failedProps): any {
83
83
  tms_id: UserClass.state().get()?.id,
84
84
  scanned: LibUtils.moment().format('YYYY-MM-DD HH:mm:ss'),
85
85
  }
86
- new LibCurl(url_ticket_update + "?is_turnstile=0", post,
86
+ new LibCurl(url_ticket_update, post,
87
87
  (res) => {
88
88
  doneEntrance += 1
89
89
  if (mustBeEntrance <= doneEntrance) {
@@ -93,9 +93,7 @@ export default function m(props: EventTms_in_successProps): any {
93
93
  }
94
94
 
95
95
  function useTicket() {
96
- let url = url_ticket_update + LibUtils.objectToUrlParam({
97
- is_turnstile: 0,
98
- })
96
+ let url = url_ticket_update
99
97
 
100
98
  let post = {
101
99
  "target-url": `https://api.${esp.config().domain}/gate_checkin`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "esoftplay-event",
3
- "version": "0.0.0-e",
3
+ "version": "0.0.0-f",
4
4
  "description": "event module on esoftplay framework",
5
5
  "main": "index.js",
6
6
  "scripts": {