esoftplay-event 0.0.0-s → 0.0.0-t

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.
@@ -40,8 +40,16 @@ export default function m(props: EventAdditionalProps): any {
40
40
  }, [])
41
41
 
42
42
  function loadData() {
43
- let url = 'event_booking_addition_form?event_id=' + event_id + "&price_id=" + price_id
43
+ let url = price_id
44
+ ? 'event_booking_addition_form?event_id=' + event_id + "&price_id=" + price_id
45
+ : 'event_booking_addition_form?event_id=' + event_id
46
+
44
47
  new LibCurl(url, null, (res, msg) => {
48
+ // langsung skip kalau confignya per event ada additionalnya dan di price_id tidak ada additionalnya
49
+ if (res?.additions?.length == 0) {
50
+ LibNavigation.sendBackResult("", LibNavigation.getResultKey(props))
51
+ }
52
+
45
53
  const a = res?.additions?.length > 0 && res?.additions?.map?.((item: any, i: number) => {
46
54
  return ({
47
55
  ...item,
@@ -58,9 +66,10 @@ export default function m(props: EventAdditionalProps): any {
58
66
  setDataAddPost(new Array(is_each).fill({}))
59
67
 
60
68
  }, (err) => {
69
+ esp.log({ err });
61
70
  LibToastProperty.show(err.message)
62
71
  LibNavigation.back()
63
- })
72
+ }, 1)
64
73
  }
65
74
 
66
75
  function renderItem(item: any, i: number) {
@@ -121,7 +130,12 @@ export default function m(props: EventAdditionalProps): any {
121
130
 
122
131
  return (
123
132
  <View style={{ flex: 1, backgroundColor: LibStyle.colorBgGrey }}>
124
- <EventHeader title={esp.lang("event/additional", "header_title")} subtitle={ondate && ondate != "0000-00-00" ? type_ticket + " " + LibUtils.moment(ondate).format("DD MMM YYYY") : type_ticket} />
133
+ <EventHeader title={esp.lang("event/additional", "header_title")} subtitle={
134
+ type_ticket ?
135
+ (ondate && ondate != "0000-00-00" ? type_ticket + " " + LibUtils.moment(ondate).format("DD MMM YYYY") : type_ticket)
136
+ :
137
+ ""
138
+ } />
125
139
  <ScrollView>
126
140
  <View style={{ margin: 15, marginBottom: 5, marginTop: 10, padding: 10, borderWidth: 1, borderColor: '#fff', borderRadius: 5, backgroundColor: '#fff', ...LibStyle.elevation(2) }}>
127
141
  <LibTextstyle textStyle='m_overline' text={esp.lang("event/additional", "buyer_info")} style={{ color: "#aaa", fontSize: 12, marginBottom: 5 }} />
package/event/detail.tsx CHANGED
@@ -121,6 +121,8 @@ export default function m(props: EventDetailProps): any {
121
121
  const diffTime = startDate - currentDate;
122
122
  const diffDays = diffTime / (1000 * 60 * 60 * 24);
123
123
 
124
+ esp.log(result);
125
+
124
126
  return (
125
127
  <View style={{ flex: 1, backgroundColor: '#fff' }} >
126
128
  <EventHeader
@@ -286,6 +288,7 @@ export default function m(props: EventDetailProps): any {
286
288
  LibNavigation.navigate(result?.config?.hasOwnProperty('multiprice') && result?.config?.multiprice == 1 ? 'event/ticket_list2' : 'event/ticket_list', {
287
289
  url: result.url_price,
288
290
  has_addition: result?.has_addition,
291
+ has_addition_global: result?.has_addition_global,
289
292
  fee_platform: {
290
293
  fee_platform_amount: result?.fee_platform_amount,
291
294
  fee_platform_type: result?.fee_platform_type,
@@ -301,6 +304,7 @@ export default function m(props: EventDetailProps): any {
301
304
  LibNavigation.navigate(result?.config?.hasOwnProperty('multiprice') && result?.config?.multiprice == 1 ? 'event/ticket_list2' : 'event/ticket_list', {
302
305
  url: result.url_price,
303
306
  has_addition: result?.has_addition,
307
+ has_addition_global: result?.has_addition_global,
304
308
  fee_platform: {
305
309
  fee_platform_amount: result?.fee_platform_amount,
306
310
  fee_platform_type: result?.fee_platform_type,
@@ -130,9 +130,10 @@ export default function m(props: EventLoading_pageProps): any {
130
130
  // />
131
131
  // )
132
132
  } else {
133
- LibDialog.warningConfirm(esp.lang("event/loading_page", "oops"), error?.message, esp.lang("event/loading_page", "back"), () => {
133
+ if (error?.status_code != "GE043")
134
+ LibDialog.warningConfirm(esp.lang("event/loading_page", "oops"), error?.message, esp.lang("event/loading_page", "back"), () => {
134
135
 
135
- }, "", () => { })
136
+ }, "", () => { })
136
137
  }
137
138
  }, 1)
138
139
  } else {
@@ -182,9 +183,10 @@ export default function m(props: EventLoading_pageProps): any {
182
183
  // />
183
184
  // )
184
185
  } else {
185
- LibDialog.warningConfirm(esp.lang("event/loading_page", "oops"), error?.message, esp.lang("event/loading_page", "back"), () => {
186
+ if (error?.status_code != "GE043")
187
+ LibDialog.warningConfirm(esp.lang("event/loading_page", "oops"), error?.message, esp.lang("event/loading_page", "back"), () => {
186
188
 
187
- }, "", () => { })
189
+ }, "", () => { })
188
190
  }
189
191
  }, 1)
190
192
  }
@@ -136,6 +136,7 @@ export default function m(props: EventOrder_waitingProps): any {
136
136
  title: esp.lang("bigbang/payment", "title_buy_ticket", result?.event_name),
137
137
  isSecure: 1,
138
138
  amount: LibUtils.numberAbsolute(result?.total),
139
+ currency: result?.currency,
139
140
  receive_name: "BBO",
140
141
  receive_image: 'https://bbo.co.id/images/uploads/logo-bbo-tagline_1.png',
141
142
  send_name: result?.name,
@@ -317,7 +318,7 @@ export default function m(props: EventOrder_waitingProps): any {
317
318
  </View>
318
319
 
319
320
  <EventButton
320
- label='Unduh'
321
+ label={esp.lang("event/order_detail_waiting", "download")}
321
322
  style={{ margin: 10, marginHorizontal: 20 }}
322
323
  backgroundColor={LibStyle.colorGreen}
323
324
  onPress={() => {
@@ -125,39 +125,39 @@ export default function m(props: EventOrder_share_toProps): any {
125
125
  setEmail(t)
126
126
  }}
127
127
  onSubmitEditing={() => {
128
- if (inputEmail.current!.getText() == '') {
128
+ if (inputEmail.current?.getText() == '') {
129
129
  LibToastProperty.show(esp.lang("event/order_share_to", "msg_error_input_email"))
130
- inputEmail.current!.blur()
130
+ inputEmail.current?.blur()
131
131
  return
132
132
  } else if (email === user.email) {
133
133
  LibDialog.warningConfirm(esp.lang("event/order_share_to", "title_alert_fault"), esp.lang("event/order_share_to", "msg_alert_cant_share_ticket_to_myself"), esp.lang("event/order_share_to", "btn_yes_alert_cant_share_ticket_to_myself"), () => {
134
134
  setEmail("")
135
135
  inputEmail.current?.setText("")
136
- inputEmail.current!.focus()
136
+ inputEmail.current?.focus()
137
137
  }, "", () => {
138
138
 
139
139
  })
140
140
  return
141
141
  } else {
142
- dialogUser.current!.show()
142
+ dialogUser.current?.show()
143
143
  }
144
144
  }}
145
145
  style={{ marginLeft: 25, marginRight: 25, marginTop: 18, borderRadius: 5 }} />
146
146
  <TouchableOpacity onPress={() => {
147
- if (inputEmail.current!.getText() == '') {
147
+ if (inputEmail.current?.getText() == '') {
148
148
  LibToastProperty.show(esp.lang("event/order_share_to", "msg_error_input_email"))
149
- inputEmail.current!.blur()
149
+ inputEmail.current?.blur()
150
150
  return
151
151
  } else if (email === user.email) {
152
152
  LibDialog.warningConfirm(esp.lang("event/order_share_to", "title_alert_fault"), esp.lang("event/order_share_to", "msg_alert_cant_share_ticket_to_myself"), esp.lang("event/order_share_to", "btn_yes_alert_cant_share_ticket_to_myself"), () => {
153
153
  setEmail("")
154
154
  inputEmail.current?.setText("")
155
- inputEmail.current!.focus()
155
+ inputEmail.current?.focus()
156
156
  }, "", () => {
157
157
 
158
158
  })
159
159
  } else {
160
- dialogUser.current!.show()
160
+ dialogUser.current?.show()
161
161
  }
162
162
  }} >
163
163
  <View style={{ marginBottom: 10, marginTop: 18, marginLeft: 25, marginRight: 25, height: 35, borderRadius: 17.5, backgroundColor: "#34a2ec", borderStyle: "solid", borderWidth: 0.5, borderColor: "#2980b9", alignItems: 'center', justifyContent: 'center' }} >
@@ -192,9 +192,9 @@ export default function m(props: EventOrder_share_toProps): any {
192
192
  } else {
193
193
  shareTicket()
194
194
  }
195
- dialogUser.current!.hide()
195
+ dialogUser.current?.hide()
196
196
  }} cancel={() => {
197
- dialogUser.current!.hide()
197
+ dialogUser.current?.hide()
198
198
  }}
199
199
  view={
200
200
  <View style={{ flexDirection: 'row', marginTop: 20, marginBottom: 8, justifyContent: 'center', alignContent: 'center', alignItems: 'center' }}>
@@ -240,7 +240,7 @@ export default function m(props: any) {
240
240
  </ScrollView>
241
241
  </View>
242
242
  <View style={{ height: 40, marginLeft: 20, marginRight: 20, backgroundColor: LibStyle.colorPrimary, marginBottom: 20, borderRadius: 2, justifyContent: 'center', alignItems: 'center' }} >
243
- <Text style={{ color: 'white', fontWeight: 'bold' }} >{stage || 'Depan'}</Text>
243
+ <Text style={{ color: 'white', fontWeight: 'bold' }} >{stage || esp.lang("event/seat_map", "front")}</Text>
244
244
  </View>
245
245
  <ScrollView horizontal showsHorizontalScrollIndicator >
246
246
  <EventTap onCoordinateGet={toggleSeat}>
@@ -134,7 +134,7 @@ export default function m(props: EventTicket_listProps): any {
134
134
 
135
135
  const [pendingData] = EventLoading_pageProperty.state().useState()
136
136
 
137
- const { url, fee_platform, has_addition, subscribed }: any = useRef(LibNavigation.getArgsAll(props)).current
137
+ const { url, fee_platform, has_addition, has_addition_global, subscribed }: any = useRef(LibNavigation.getArgsAll(props)).current
138
138
 
139
139
  const [deeplinkParams] = UseDeeplinkProperty.params.useState()
140
140
  const [timer] = EventCountdownProperty.countdownTime.useState()
@@ -135,7 +135,7 @@ export default function m(props: EventTicket_list2Props): any {
135
135
 
136
136
  const [pendingData] = EventLoading_pageProperty.state().useState()
137
137
 
138
- const { has_addition, url, fee_platform, subscribed }: any = useRef(LibNavigation.getArgsAll(props)).current
138
+ const { has_addition, has_addition_global, url, fee_platform, subscribed }: any = useRef(LibNavigation.getArgsAll(props)).current
139
139
 
140
140
  const [deeplinkParams] = UseDeeplinkProperty.params.useState()
141
141
  const [timer] = EventCountdownProperty.countdownTime.useState()
@@ -147,6 +147,8 @@ export default function m(props: EventTicket_list2Props): any {
147
147
  const [showAll, setShowAll] = useSafeState<any>({});
148
148
  const [urlPayment, setUrlPayment] = useLazyState<any>()
149
149
 
150
+ // esp.log(availableResult);
151
+
150
152
  let dataEvent: any = {
151
153
  event_id: availableResult?.id,
152
154
  event_title: availableResult?.title,
@@ -205,9 +207,25 @@ export default function m(props: EventTicket_list2Props): any {
205
207
  });
206
208
  })
207
209
 
208
- resetTicketAdditional()
209
- ticketAdditional(transformedData)
210
- setDataAddition([])
210
+
211
+ if (has_addition_global == 1) {
212
+ LibNavigation.navigateForResult('event/additional', {
213
+ event_id: dataEvent?.event_id,
214
+ qty: 1,
215
+ }, 696).then((value) => {
216
+ if (value != "") {
217
+ setDataAddition(dataAddition.push(JSON.parse(value)))
218
+ }
219
+ resetTicketAdditional()
220
+ ticketAdditional(transformedData)
221
+ })
222
+
223
+ } else {
224
+ resetTicketAdditional()
225
+ ticketAdditional(transformedData)
226
+ setDataAddition([])
227
+ }
228
+
211
229
  })
212
230
 
213
231
 
@@ -233,6 +251,9 @@ export default function m(props: EventTicket_list2Props): any {
233
251
  if (dataAddition?.length > 0) {
234
252
  dataEvent.addition = dataAddition
235
253
  }
254
+
255
+ esp.log(dataAddition);
256
+
236
257
  LibNavigation.navigate('payment/ticket_multi', {
237
258
  order_type: EventConfigProperty?.state()?.get()?.order_type?.ticket,
238
259
  fee_platform: fee_platform,
package/id.json CHANGED
@@ -1043,6 +1043,7 @@
1043
1043
  "buy_now": "Bayar Sekarang",
1044
1044
  "canceled": "Order Cancelled",
1045
1045
  "choose_card": "Silahkan pilih kartu anda dahulu",
1046
+ "download": "Unduh",
1046
1047
  "err": "Oops",
1047
1048
  "err_confirm": "Oops",
1048
1049
  "expired_on": "Berlaku hingga : ",
@@ -1320,6 +1321,7 @@
1320
1321
  "chosen": "Dipilih",
1321
1322
  "chosen_by": "Sedang dipilih orang lain",
1322
1323
  "empty": "Kosong",
1324
+ "front": "Depan",
1323
1325
  "full": "Penuh",
1324
1326
  "header_title": "Pilih Kursi",
1325
1327
  "load_failed": "Oops!!",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "esoftplay-event",
3
- "version": "0.0.0-s",
3
+ "version": "0.0.0-t",
4
4
  "description": "event module on esoftplay framework",
5
5
  "main": "index.js",
6
6
  "scripts": {