esoftplay-event 0.0.2-v → 0.0.2-w

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/artist.tsx CHANGED
@@ -39,6 +39,7 @@ export default function m(props: BigbangArtistProps): any {
39
39
 
40
40
  new LibCurl(url, null,
41
41
  (res) => {
42
+ esp.modProp("event/countdown").eventURI.set(url)
42
43
  esp.log({ res });
43
44
  new LibCurl(res?.[0]?.url_event || `event_detail/${res?.[0]?.event_id}`, null, (res) => {
44
45
  setResultEvent(res)
@@ -23,6 +23,8 @@ export const countdownTime = useGlobalState<any>('0')
23
23
 
24
24
  export const releaseQueue = useGlobalSubscriber()
25
25
 
26
+ export const eventURI = useGlobalState<string>('')
27
+
26
28
  export default function m(props: EventCountdownProps): any {
27
29
  const [timer] = countdownTime.useState()
28
30
  const routes = UserRoutes.state().useSelector((x) => x?.routes)
@@ -36,6 +38,7 @@ export default function m(props: EventCountdownProps): any {
36
38
  doneQueue(pathQueue, event_id, key, () => { })
37
39
  EventQueue_pricingProperty.state().reset()
38
40
  countdownTime.reset()
41
+ eventURI.reset()
39
42
  }
40
43
  })
41
44
 
@@ -57,13 +60,14 @@ export default function m(props: EventCountdownProps): any {
57
60
  <EventCountdown_timestamp
58
61
  onExpired={() => {
59
62
  const routeNames = UserRoutes.state()?.get()?.routes?.map?.((x: any) => x.name)
60
- if (routeNames.includes("event/artist"))
61
- LibNavigation.navigate("event/artist")
62
- else if (routeNames.includes("event/detail"))
63
- LibNavigation.navigate("event/detail")
64
- else
65
- LibNavigation.backToRoot()
63
+ if (routeNames.includes("event/artist")) {
64
+ LibNavigation.navigate("event/artist", { url: eventURI.get() })
65
+ } else if (routeNames.includes("event/detail")) {
66
+ LibNavigation.navigate("event/detail", { url: eventURI.get() })
67
+ }
68
+ LibNavigation.backToRoot()
66
69
  countdownTime.reset()
70
+ eventURI.reset()
67
71
  }}
68
72
  expiredTimestamp={timer}
69
73
  style={{ color: "#fff" }} />
package/event/detail.tsx CHANGED
@@ -41,6 +41,7 @@ export default function m(props: EventDetailProps): any {
41
41
  function loadData(): void {
42
42
  // CacheHit.doHit(url)
43
43
  new LibCurl(url, null, (res, msg) => {
44
+ esp.modProp("event/countdown").eventURI.set(url)
44
45
  EventFirebase_socketProperty.eventIdQueue.set(res.id)
45
46
  setResult(res)
46
47
  if (res.allotment) {
@@ -154,6 +154,7 @@ export default function m(props: EventOrder_detailProps): any {
154
154
  }, 1)
155
155
  }
156
156
 
157
+
157
158
  function loadDataAddonsBooked(url: string) {
158
159
  new LibCurl(url, null, (ress: any) => {
159
160
  setAddOnsBooked(ress)
@@ -683,7 +684,11 @@ export default function m(props: EventOrder_detailProps): any {
683
684
  <LibSlidingup ref={dialogQtyAddons}>
684
685
  <View style={{ backgroundColor: 'white', maxHeight: LibStyle.height - (LibStyle.height / 3), borderTopRightRadius: 20, borderTopLeftRadius: 20, padding: 20 }}>
685
686
  <Text style={{ fontFamily: "Arial", fontSize: 12, fontWeight: "bold", color: "#b7b7b7" }} >{esp.lang("event/order_detail", "addons")}</Text>
686
- <Text style={{ fontFamily: "Arial", marginBottom: 10, fontSize: 16, fontWeight: "bold", color: "#4a4a4a" }} >{getSelectedAddon()?.title}</Text>
687
+ <Text style={{ fontFamily: "Arial", fontSize: 16, fontWeight: "bold", color: "#4a4a4a" }} >{getSelectedAddon()?.title}</Text>
688
+ {
689
+ getSelectedAddon()?.info != "" &&
690
+ <EventHtmltext style={{ fontFamily: "Arial", marginBottom: 10, fontSize: 12, marginLeft: 10, color: "#b7b7b7" }} >{getSelectedAddon()?.info}</EventHtmltext>
691
+ }
687
692
 
688
693
  <ScrollView>
689
694
  <Text allowFontScaling={false} style={{ marginVertical: 10, fontFamily: "Arial", fontSize: 16, fontWeight: "bold", fontStyle: "normal", letterSpacing: 1.5, color: "#000" }}>{esp.lang("event/order_detail_share", "chose_ticket")}</Text>
@@ -794,7 +799,7 @@ export default function m(props: EventOrder_detailProps): any {
794
799
  icon={'plus-circle-outline'}
795
800
  title={item?.title}
796
801
  subtitle={item?.ondate != "0000-00-00" ? LibUtils.moment(item.ondate).format("DD MMM YYYY") : ''}
797
- info={item.hasOwnProperty("info") && item?.info}
802
+ info={item?.info}
798
803
  />
799
804
  )
800
805
  })
@@ -2,7 +2,7 @@
2
2
  import { useMemo, useRef } from 'react';
3
3
 
4
4
  import { BigbangPayment_detail_ticket, BigbangPayment_detail_ticketProperty } from 'esoftplay/cache/bigbang/payment_detail_ticket/import';
5
- import { BigbangPayment_list } from "esoftplay/cache/bigbang/payment_list/import";
5
+ import { BigbangPayment_list, BigbangPayment_listProperty } from "esoftplay/cache/bigbang/payment_list/import";
6
6
  import { EventButton } from "esoftplay/cache/event/button/import";
7
7
  import { EventHeader } from "esoftplay/cache/event/header/import";
8
8
  import { EventTransaction } from 'esoftplay/cache/event/transaction/import';
@@ -28,9 +28,10 @@ export interface EventOrder_detail_upgrade_paymentArgs {
28
28
  export interface EventOrder_detail_upgrade_paymentProps {
29
29
 
30
30
  }
31
+
31
32
  export default function m(props: EventOrder_detail_upgrade_paymentProps): any {
32
33
  const { dataTicket, selectedTicket, fee_platform, fee_custom }: any = LibNavigation.getArgsAll(props)
33
- const [selectedPayment, setSelectedPayment] = useSafeState<any>()
34
+ const [selectedPayment, setSelectedPayment] = BigbangPayment_listProperty.paymentState.useState()
34
35
  const [charge, setCharge] = useSafeState<any>(0)
35
36
  const [chargePercent, setChargePercent] = useSafeState<any>()
36
37
 
@@ -14,6 +14,7 @@ import { LibPicture } from 'esoftplay/cache/lib/picture/import';
14
14
  import { LibProgress } from 'esoftplay/cache/lib/progress/import';
15
15
  import { LibStyle } from 'esoftplay/cache/lib/style/import';
16
16
  import { LibTextstyle } from 'esoftplay/cache/lib/textstyle/import';
17
+ import { LibTheme } from 'esoftplay/cache/lib/theme/import';
17
18
  import { LibToastProperty } from 'esoftplay/cache/lib/toast/import';
18
19
  import { LibUtils } from 'esoftplay/cache/lib/utils/import';
19
20
  import esp from 'esoftplay/esp';
@@ -22,7 +23,7 @@ import moment from 'esoftplay/moment';
22
23
  import useSafeState from 'esoftplay/state';
23
24
 
24
25
  import React, { useEffect } from 'react';
25
- import { Pressable, RefreshControl, ScrollView, Text, TouchableOpacity, View } from 'react-native';
26
+ import { RefreshControl, ScrollView, Text, TouchableOpacity, View } from 'react-native';
26
27
 
27
28
 
28
29
  export interface EventOrder_rescheduleArgs {
@@ -108,7 +109,7 @@ export default function m(props: EventOrder_rescheduleProps): any {
108
109
  LibProgress.hide()
109
110
  LibNavigation.backToRoot()
110
111
  LibNavigation.navigate('event/order')
111
- LibNavigation.navigate('event/order_detail', { url: res.url })
112
+ // LibNavigation.navigate('event/order_detail', { url: res.url })
112
113
  }, (error) => {
113
114
  LibProgress.hide()
114
115
  LibDialog.warning(esp.lang("event/order_reschedule", "process_er"), error?.message)
@@ -313,7 +314,6 @@ export default function m(props: EventOrder_rescheduleProps): any {
313
314
  )
314
315
  }
315
316
 
316
- // esp.log(result);
317
317
  function renderRefundList(item: any, i: number) {
318
318
  let _selectTicket = item.hasOwnProperty('check') && item.check == 1
319
319
  const styleID_12nkjf: any = { marginLeft: 10, textDecorationLine: 'line-through', textDecorationStyle: 'solid', opacity: item.is_refundable == 1 ? 1 : 0.5, marginTop: 4, fontFamily: "Arial", fontSize: 12, fontWeight: "normal", fontStyle: "normal", letterSpacing: 0, color: _selectTicket ? "#3ea4dc" : '#999' }
@@ -333,9 +333,15 @@ export default function m(props: EventOrder_rescheduleProps): any {
333
333
  <LibTextstyle textStyle='caption1' text={esp.lang("event/order_reschedule", "chared", item.qty_shared)} style={{ color: 'orange' }} />
334
334
  }
335
335
  <Text allowFontScaling={false} style={{ opacity: item.is_refundable == 1 ? 1 : 0.5, fontFamily: "Arial", fontSize: 10, marginBottom: 4, fontWeight: "normal", fontStyle: "normal", letterSpacing: 0.23, color: LibStyle.colorRed }}>{item.refund == "0.00" ? esp.lang("event/order_reschedule", "cant_refund") : esp.lang("event/order_reschedule", "refundable", LibUtils.numberAbsolute(item.refund).toString())}</Text>
336
- <Text allowFontScaling={false} style={applyStyle({ fontFamily: "Arial", fontSize: 14, fontWeight: "bold", fontStyle: "normal", letterSpacing: 0, color: _selectTicket ? "#3ea4dc" : '#999' })}>{esp.lang("ticket/refund", "ticket")} {item.price_name + " (" + item.qty + " " + esp.lang("ticket/refund", "ticket") + ") "}</Text>
336
+ <Text allowFontScaling={false} style={applyStyle({ fontFamily: "Arial", fontSize: 14, fontWeight: "bold", fontStyle: "normal", letterSpacing: 0, color: _selectTicket ? "#3ea4dc" : LibTheme._colorTextSecondary() })}>{esp.lang("ticket/refund", "ticket")} {item.price_name + " (" + item.qty + " " + esp.lang("ticket/refund", "ticket") + ") "}</Text>
337
337
  <View style={{ flexDirection: 'row', alignContent: 'center', alignItems: 'center' }}>
338
- <Text allowFontScaling={false} style={applyStyle({ marginTop: 4, fontFamily: "Arial", fontSize: 12, fontWeight: "normal", fontStyle: "normal", letterSpacing: 0, color: _selectTicket ? "#3ea4dc" : '#999' })}>{LibUtils.money(item.total, item.currency)}</Text>
338
+ <View style={{ flexDirection: 'row', marginTop: 4, alignContent: 'center', alignItems: 'center' }}>
339
+ <Text allowFontScaling={false} style={applyStyle({ fontFamily: "Arial", fontSize: 16, fontWeight: "normal", fontStyle: "normal", letterSpacing: 0, color: _selectTicket ? "#3ea4dc" : LibTheme._colorTextSecondary() })}>{LibUtils.money(item.total, item.currency)}</Text>
340
+ {
341
+ item?.tax != "0" &&
342
+ <Text allowFontScaling={false} style={{ marginLeft: 10, fontFamily: "Arial", fontSize: 12, fontWeight: "normal", fontStyle: "normal", letterSpacing: 0, color: LibTheme._colorTextTertiary() }}>{esp.lang("event/order_reschedule", "price+tax")}</Text>
343
+ }
344
+ </View>
339
345
  {
340
346
  item.refund != "0.00" && item.refund != "100.00" &&
341
347
  <Text allowFontScaling={false} style={styleID_12nkjf}>{LibUtils.money(item.price)}</Text>
@@ -362,16 +368,20 @@ export default function m(props: EventOrder_rescheduleProps): any {
362
368
  <EventHeader title={result?.global_refundable == 1 ? esp.lang("event/order_reschedule", "refund_rescedule") : esp.lang("event/order_reschedule", "rescedule")} />
363
369
  {
364
370
  result?.global_refundable == 1 &&
365
- <View style={{ margin: 15, marginBottom: 0, flexDirection: 'row' }}>
371
+ <View style={{ margin: 15, padding: 3, borderRadius: 5, backgroundColor: '#fff', flexDirection: 'row' }}>
366
372
  {
367
373
  defaultTabs.map((item: any, i: number) => {
374
+ let active = item.id == activeTab
368
375
  return (
369
- <Pressable onPress={() => {
370
- loadData()
371
- setActiveTab(item.id)()
372
- }} key={i} style={{ flex: 1, padding: 10, borderTopLeftRadius: 10, borderTopRightRadius: 10, backgroundColor: item.id == activeTab ? "#fff" : LibStyle.colorBgGrey }}>
373
- <Text allowFontScaling={false} style={{ opacity: item.id == activeTab ? 1 : 0.7, alignSelf: 'center', textAlign: 'center', fontFamily: "Arial", fontWeight: item.id == activeTab ? "bold" : "normal", fontStyle: "normal", letterSpacing: 0, color: item.id == activeTab ? "#000" : "#aab0b7" }} >{item.title}</Text>
374
- </Pressable>
376
+ <TouchableOpacity
377
+ key={i}
378
+ onPress={() => {
379
+ loadData()
380
+ setActiveTab(item.id)()
381
+ }}
382
+ style={{ borderRadius: 5, padding: 5, alignContent: 'center', alignItems: 'center', justifyContent: 'center', flex: 1, backgroundColor: active ? LibStyle.colorPrimary : '#fff', marginRight: 1, marginLeft: 1 }}>
383
+ <Text allowFontScaling={false} style={{ fontSize: active ? 16 : 12, color: active ? "#fff" : "#000", fontWeight: active ? 'bold' : 'normal' }}>{item?.title}</Text>
384
+ </TouchableOpacity>
375
385
  )
376
386
  })
377
387
  }
@@ -381,8 +391,11 @@ export default function m(props: EventOrder_rescheduleProps): any {
381
391
  <ScrollView refreshControl={
382
392
  <RefreshControl refreshing={refreshing} onRefresh={onRefresh} />
383
393
  }>
384
- <View style={{ marginTop: result?.global_refundable == 1 ? 0 : 10, margin: 15, borderTopLeftRadius: 0, borderTopRightRadius: 0, borderRadius: 10, backgroundColor: '#fff', paddingBottom: activeTab == 2 ? 10 : 0 }}>
385
- <LibPicture source={{ uri: result?.image }} style={applyStyle({ borderTopLeftRadius: 0, borderTopRightRadius: 0, height: imgHeight, width: imgWidth, resizeMode: 'cover' })} />
394
+ <View style={{ marginTop: result?.global_refundable == 1 ? 0 : 10, margin: 15, borderRadius: 10, backgroundColor: '#fff', paddingBottom: activeTab == 2 ? 10 : 0 }}>
395
+ {
396
+ result?.image != "" &&
397
+ <LibPicture source={{ uri: result?.image }} style={applyStyle({ height: imgHeight, width: imgWidth, resizeMode: 'cover' })} />
398
+ }
386
399
 
387
400
  <View style={{ flexDirection: 'row', margin: 14, marginTop: 4, justifyContent: 'space-between' }}>
388
401
  <Text allowFontScaling={false} style={{ marginTop: 14, fontFamily: "Arial", fontSize: 20, fontWeight: "bold", fontStyle: "normal", letterSpacing: 0, color: "#484848" }}>{result?.title}</Text>
@@ -401,7 +414,7 @@ export default function m(props: EventOrder_rescheduleProps): any {
401
414
 
402
415
  {
403
416
  activeTab == 2 &&
404
- <View style={{ padding: 14, backgroundColor: '#f1f2f3' }}>
417
+ <View style={{ padding: 14, marginTop: 10, backgroundColor: '#f1f2f3' }}>
405
418
  <Text style={{ fontFamily: "Arial", fontSize: 12, fontWeight: "bold", fontStyle: "normal", letterSpacing: 0 }} >{esp.lang("event/order_reschedule", "ready_ticket")}</Text>
406
419
  </View>
407
420
  }
package/id.json CHANGED
@@ -1126,6 +1126,7 @@
1126
1126
  "no": "Tidak",
1127
1127
  "no_ticket_need_reschedule_or_refund": "Tidak ada Tiket yang perlu di Reschedule / Refund",
1128
1128
  "ok": "Ok",
1129
+ "price+tax": "(harga + pajak)",
1129
1130
  "process_er": "Oops",
1130
1131
  "qty_left": "Tersisa %s Tiket",
1131
1132
  "ready_ticket": "Tiket yang Tersedia",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "esoftplay-event",
3
- "version": "0.0.2-v",
3
+ "version": "0.0.2-w",
4
4
  "description": "event module on esoftplay framework",
5
5
  "main": "index.js",
6
6
  "scripts": {