esoftplay-event 0.0.2-b → 0.0.2-d

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"
@@ -1,7 +1,6 @@
1
1
  // withHooks
2
-
2
+ // noPage
3
3
  import esp from 'esoftplay/esp';
4
- import moment from 'esoftplay/moment';
5
4
  import React, { useEffect, useRef } from 'react';
6
5
  import { TextInput, View } from 'react-native';
7
6
 
@@ -11,6 +10,7 @@ export interface EventCountdown_baseArgs {
11
10
  }
12
11
  export interface EventCountdown_baseProps {
13
12
  expired: string,
13
+ timezone?: string,
14
14
  expiredText?: string,
15
15
  style?: any,
16
16
  containerStyle?: any,
@@ -22,68 +22,108 @@ export interface EventCountdown_baseProps {
22
22
 
23
23
  const fixSingleNumber = (number: number) => number < 10 ? '0' + number : number
24
24
 
25
+ function parseTimezone(tz: string): string {
26
+ if (!tz) return '+00:00';
27
+ const lower = tz.toLowerCase().trim();
28
+
29
+ const match = lower.match(/gmt([+-]\d{1,2})(?::?(\d{1,2}))?(\.\d+)?/);
30
+ if (!match) return '+00:00';
31
+
32
+ const sign = match[1].startsWith('-') ? '-' : '+';
33
+ let hours = Math.abs(parseInt(match[1], 10));
34
+ let minutes = 0;
35
+
36
+ if (match[2]) {
37
+ minutes = parseInt(match[2], 10);
38
+ } else if (match[3]) {
39
+ minutes = Math.round(parseFloat(match[3]) * 60);
40
+ }
41
+
42
+ const hh = hours.toString().padStart(2, '0');
43
+ const mm = minutes.toString().padStart(2, '0');
44
+ return `${sign}${hh}:${mm}`;
45
+ }
46
+
25
47
  export default function m(props: EventCountdown_baseProps): any {
26
48
  const ref = useRef<TextInput>(null)
27
- let timmer = useRef<any>(undefined).current
49
+ let timmerRef = useRef<any>(undefined)
28
50
 
29
51
  useEffect(() => {
30
52
  countDown()
31
53
  return () => {
32
- clearTimeout(timmer)
33
- timmer = undefined
54
+ clearTimeout(timmerRef.current)
55
+ timmerRef.current = undefined
34
56
  }
35
57
  }, [])
36
58
 
37
59
  function countDown(): any {
38
60
  let expired = false
39
61
  function loop() {
40
- const t = [esp.lang("market/countdown", "day"), esp.lang("market/countdown", "hour"), esp.lang("market/countdown", "minutes"), esp.lang("market/countdown", "second")]
41
- const diffr = moment(props.expired).duration(moment().toDate());
42
- const text = [
43
- parseInt(diffr.asDays().toString()),
44
- fixSingleNumber(parseInt(diffr.hours().toString())),
45
- fixSingleNumber(parseInt(diffr.minutes().toString())),
46
- fixSingleNumber(parseInt(diffr.seconds().toString()))
47
- ]
48
-
49
- if (text.every((x) => (Number(x) < 1 || isNaN(Number(x))))) {
50
- expired = true
51
- props.onExpired && props.onExpired()
52
- ref?.current?.setNativeProps({ text: props.expiredText || esp.lang("market/countdown", "expired") })
53
- } else if (text.length == 4 && text[0] != 0 && props.onlyDay) {
54
- ref?.current?.setNativeProps({ text: text[0] + esp.lang("market/countdown", "days") })
55
- } else if (text[0] == 0) {
56
- text.splice(0, 1)
57
- t.splice(0, 1)
58
- if (text[0].toString() == '00') {
59
- text.splice(0, 1)
60
- t.splice(0, 1)
61
- if (text[0].toString() == '00') {
62
- text.splice(0, 1)
63
- t.splice(0, 1)
64
- }
62
+ const labels = [esp.lang("market/countdown", "day"), esp.lang("market/countdown", "hour"), esp.lang("market/countdown", "minutes"), esp.lang("market/countdown", "second")]
63
+
64
+ // @ts-ignore
65
+ const configGMT = esp.config("forcedGMT+") ? `GMT+${esp.config("forcedGMT+")}` : "GMT+7" // set default to GMT+7 Jakarta
66
+ const tzOffset = parseTimezone(props?.timezone || configGMT);
67
+ const serverDate = new Date(props.expired.replace(' ', 'T') + tzOffset);
68
+ const now = new Date();
69
+
70
+ const diffMs = serverDate.getTime() - now.getTime();
71
+
72
+ if (diffMs <= 0) {
73
+ expired = true;
74
+ props.onExpired?.();
75
+ ref.current?.setNativeProps({
76
+ text: props.expiredText || esp.lang('market/countdown', 'expired'),
77
+ });
78
+ return;
79
+ }
80
+
81
+ const totalSeconds = Math.floor(diffMs / 1000);
82
+ const days = Math.floor(totalSeconds / 86400);
83
+ const hours = Math.floor((totalSeconds % 86400) / 3600);
84
+ const minutes = Math.floor((totalSeconds % 3600) / 60);
85
+ const seconds = totalSeconds % 60;
86
+
87
+ const parts = [
88
+ days,
89
+ fixSingleNumber(hours),
90
+ fixSingleNumber(minutes),
91
+ fixSingleNumber(seconds),
92
+ ];
93
+
94
+ if (parts[0] != 0 && props.onlyDay) {
95
+ ref.current?.setNativeProps({
96
+ text: parts[0] + esp.lang('market/countdown', 'days'),
97
+ });
98
+ } else if (parts[0] == 0) {
99
+ const filteredParts = [...parts];
100
+ while (filteredParts.length > 1 && (filteredParts[0] === 0 || filteredParts[0] === "00")) {
101
+ filteredParts.splice(0, 1);
65
102
  }
66
- ref?.current?.setNativeProps({ text: text.filter((x, i) => !isNaN(Number(x))).map((d, id) => d + (props?.hideTimeUnit ? '' : ' ' + t[id])).join(" : ") })
103
+
104
+ const filtered = filteredParts.map((d, i) =>
105
+ `${d}${props?.hideTimeUnit ? '' : ' ' + labels[parts.length - filteredParts.length + i]}`
106
+ );
107
+
108
+ ref.current?.setNativeProps({ text: filtered.join(' : ') });
67
109
  } else if (props?.showDayUnit && props?.hideTimeUnit) {
68
- const data = text
69
- .filter((x, i) => !isNaN(Number(x)))
70
- .map((d, id) => {
71
- return (d + (id == 0 ? " " + t[0] + " " : ""))
72
- })
73
- const firstData = data[0]
74
- data.splice(0, 1)
75
-
76
- ref?.current?.setNativeProps({
77
- text: firstData + " " + data.join(" : ")
78
- })
110
+ const data = parts.map(
111
+ (d, i) => d + (i === 0 ? ' ' + labels[0] + ' ' : '')
112
+ );
113
+
114
+ const first = data[0];
115
+ ref.current?.setNativeProps({
116
+ text: first + ' ' + data.slice(1).join(' : '),
117
+ });
79
118
  } else {
80
- ref?.current?.setNativeProps({ text: text.filter((x, i) => !isNaN(Number(x))).map((d, id) => d + (props?.hideTimeUnit ? '' : ' ' + t[id])).join(" : ") })
81
- }
82
- if (!expired) {
83
- timmer = setTimeout(() => {
84
- loop()
85
- }, 1000);
119
+ const filtered = parts.map(
120
+ (d, i) => `${d}${props?.hideTimeUnit ? '' : ' ' + labels[i]}`
121
+ );
122
+ ref.current?.setNativeProps({ text: filtered.join(' : ') });
86
123
  }
124
+
125
+ if (!expired) timmerRef.current = setTimeout(loop, 1000);
126
+
87
127
  };
88
128
  loop()
89
129
  }
@@ -14,6 +14,7 @@ export interface EventCountdown_eventArgs {
14
14
  }
15
15
  export interface EventCountdown_eventProps {
16
16
  date: string,
17
+ timezone?: string,
17
18
  containerStyle?: StyleProp<ViewStyle>
18
19
  bulletStyle?: StyleProp<ViewStyle>,
19
20
  style?: StyleProp<TextStyle>
@@ -41,6 +42,7 @@ export default function m(props: EventCountdown_eventProps): any {
41
42
  expired={props.date}
42
43
  showDayUnit
43
44
  hideTimeUnit
45
+ timezone={props?.timezone}
44
46
  style={[{ fontFamily: "Arial", fontSize: 11, fontWeight: "bold", fontStyle: "normal", letterSpacing: 0, color: "#4a4a4a" }, props?.style]}
45
47
  />
46
48
  </View>
package/event/detail.tsx CHANGED
@@ -61,12 +61,12 @@ export default function m(props: EventDetailProps): any {
61
61
  }
62
62
 
63
63
  useEffect(() => {
64
- if (esp.isDebug("") && user?.email == "bagus@fisip.net") {
65
- LibNavigation.replace('event/detail2', { url: url })
66
- } else {
67
- loadData()
68
- }
69
- // loadData()
64
+ // if (esp.isDebug("") && user?.email == "bagus@fisip.net") {
65
+ // LibNavigation.replace('event/detail2', { url: url })
66
+ // } else {
67
+ // loadData()
68
+ // }
69
+ loadData()
70
70
  }, [])
71
71
 
72
72
  if (!result) {
@@ -142,6 +142,7 @@ export default function m(props: EventDetailProps): any {
142
142
  esp.isDebug("show_countdown") && result?.countdown_booking == 1 && result?.start_date != "0000-00-00" && result.end_date != '0000-00-00' &&
143
143
  <EventCountdown_event
144
144
  date={(result?.end_date + " " + result?.end_time)}
145
+ timezone={result?.timezone}
145
146
  style={{ fontSize: 12 }}
146
147
  bulletStyle={{ width: 14, height: 14, borderRadius: 7, marginRight: 10 }}
147
148
  containerStyle={{ marginHorizontal: 20, marginBottom: 10 }}
@@ -5,7 +5,7 @@ import { Text, View } from 'react-native';
5
5
 
6
6
 
7
7
  export interface EventLabel_inputArgs {
8
-
8
+
9
9
  }
10
10
  export interface EventLabel_inputProps {
11
11
  mandatory?: boolean,
@@ -16,7 +16,7 @@ export interface EventLabel_inputProps {
16
16
  export default function m(props: EventLabel_inputProps): any {
17
17
  return (
18
18
  <View style={{ flexDirection: 'row', marginTop: 16 }}>
19
- <Text allowFontScaling={false} style={{ fontSize: 12, fontWeight: "normal", fontStyle: "normal", letterSpacing: 0, color: props.labelColor ? props.labelColor : "#9b9b9b", }}>{props.label}</Text>
19
+ <Text allowFontScaling={false} numberOfLines={1} style={{ fontSize: 12, fontWeight: "normal", fontStyle: "normal", letterSpacing: 0, color: props.labelColor ? props.labelColor : "#9b9b9b", }}>{props.label}</Text>
20
20
  {props.mandatory && <Text allowFontScaling={false} style={{ fontFamily: "Arial", fontSize: 12, fontWeight: "normal", fontStyle: "normal", letterSpacing: 0, color: props.mandatoryColor ? props.mandatoryColor : "#d0021b" }}> *</Text>}
21
21
  </View>
22
22
  )
@@ -385,7 +385,7 @@ export default function m(props: EventOrder_detailProps): any {
385
385
 
386
386
  const termData = result?.term ? Object.values(result?.term) : []
387
387
 
388
- // esp.log(getGroupAddon());
388
+ // esp.log(result);
389
389
 
390
390
  return (
391
391
  <View style={{ flex: 1, backgroundColor: LibStyle.colorBgGrey }}>
@@ -466,7 +466,7 @@ export default function m(props: EventOrder_detailProps): any {
466
466
 
467
467
  {
468
468
  result?.ondate == "0000-00-00" &&
469
- <View style={{ flexDirection: 'row', alignContent: 'center', alignItems: 'center' }}>
469
+ <View style={{ marginRight: 85, flexDirection: 'row', alignContent: 'center', alignItems: 'center' }}>
470
470
  <LibIcon name="calendar-blank-outline" size={20} />
471
471
  <Text allowFontScaling={false} style={{ flex: 1, marginRight: 10, marginLeft: 6, fontFamily: "Arial", fontSize: 12, fontWeight: "bold", fontStyle: "normal", letterSpacing: 0, color: "#484848" }}>{((isInvitationDate || isOnlineWithoutDate) ? esp.lang("event/order_item", "used_once") : dateRange)}</Text>
472
472
  </View>
@@ -580,6 +580,7 @@ export default function m(props: EventOrder_detailProps): any {
580
580
  if (item?.hasOwnProperty("group_id")) {
581
581
  return (
582
582
  <EventButton_order_detail
583
+ key={i}
583
584
  color={result?.color}
584
585
  onPress={() => {
585
586
  setGroupAddon(item)
@@ -593,6 +594,23 @@ export default function m(props: EventOrder_detailProps): any {
593
594
  info={""}
594
595
  />
595
596
  )
597
+ } else if (item?.hasOwnProperty('list')) {
598
+ return (
599
+ <EventButton_order_detail
600
+ key={i}
601
+ color={result?.color}
602
+ onPress={() => {
603
+ setGroupAddon(item)
604
+ LibUtils.debounce(() => {
605
+ dialogAddonList?.current?.show()
606
+ }, 100)
607
+ // loadDataAddons(item?.addons_id, item?.url)
608
+ }}
609
+ icon={'chevron-down'}
610
+ title={item.title}
611
+ info={""}
612
+ />
613
+ )
596
614
  } else {
597
615
  return (
598
616
  <EventButton_order_detail
@@ -873,12 +891,32 @@ export default function m(props: EventOrder_detailProps): any {
873
891
  <LibSlidingup ref={dialogAddonList}>
874
892
  <View style={{ backgroundColor: 'white', borderTopRightRadius: 20, maxHeight: LibStyle.height / 2, borderTopLeftRadius: 20, paddingBottom: 20 }}>
875
893
  <View style={{ margin: 15, flexDirection: 'row', justifyContent: 'space-between', alignContent: 'center', alignItems: 'center' }}>
876
- <Text allowFontScaling={false} style={{ flex: 1, fontSize: 16, fontWeight: 'bold' }}>{getGroupAddon()?.group_title}</Text>
894
+ <Text allowFontScaling={false} style={{ flex: 1, fontSize: 16, fontWeight: 'bold' }}>{getGroupAddon()?.hasOwnProperty("list") ? getGroupAddon()?.title : getGroupAddon()?.group_title}</Text>
877
895
  <TouchableOpacity style={{ flex: 1, alignItems: 'flex-end' }} onPress={() => dialogAddonList?.current?.hide()}>
878
896
  <LibIcon name='close' />
879
897
  </TouchableOpacity>
880
898
  </View>
881
899
  <ScrollView>
900
+ {/* sementara dobel2 begini nanti yang dipakai itu yang list */}
901
+
902
+ {/* ini list untuk yang ondate */}
903
+ {
904
+ getGroupAddon()?.list?.length > 0 && getGroupAddon()?.list?.map((item: any, i: number) => {
905
+ return (
906
+ <EventButton_order_detail
907
+ key={i}
908
+ color={result?.color}
909
+ onPress={() => {
910
+ loadDataAddons(getGroupAddon()?.addons_id, item?.url)
911
+ }}
912
+ icon={'plus-circle-outline'}
913
+ title={getGroupAddon()?.title + " " + LibUtils.moment(item.ondate).format("DD MMM YYYY")}
914
+ info={item.hasOwnProperty("info") && item?.info}
915
+ />
916
+ )
917
+ })
918
+ }
919
+ {/* ini untuk yang grouping */}
882
920
  {
883
921
  getGroupAddon()?.addons?.length > 0 && getGroupAddon()?.addons?.map((item: any, i: number) => {
884
922
  return (
@@ -313,7 +313,7 @@ export default function m(props: EventOrder_waitingProps): any {
313
313
  result?.status == 0 &&
314
314
  <View style={{ alignItems: 'center', justifyContent: 'space-between', flexDirection: 'row', marginTop: 5 }}>
315
315
  <Text allowFontScaling={false} style={{ fontWeight: 'bold', flex: 1, flexWrap: 'wrap', fontSize: 14, fontStyle: "normal", letterSpacing: 0, color: "#4a4a4a" }}>{esp.lang("event/order_detail_waiting", "expired_payment")}</Text>
316
- <EventCountdown_base expired={moment(result?.exp_payment).serverFormat("YYYY-MM-DD HH:mm:ss", result?.timezone)} style={{ flex: 1, marginLeft: 15, fontSize: 14, color: LibStyle.colorRed, fontFamily: "ArialBold" }} />
316
+ <EventCountdown_base expired={moment(result?.exp_payment).serverFormat("YYYY-MM-DD HH:mm:ss", result?.timezone)} timezone={result?.timezone} style={{ flex: 1, marginLeft: 15, fontSize: 14, color: LibStyle.colorRed, fontFamily: "ArialBold" }} />
317
317
  </View>
318
318
  }
319
319
 
@@ -68,7 +68,7 @@ export default function m(props: EventOrder_historyProps): any {
68
68
  {
69
69
  item.status == 0 ?
70
70
  <View style={applyStyle({ flexDirection: 'row', alignItems: 'center', justifyContent: 'space-between', alignContent: 'center', paddingHorizontal: 15 })}>
71
- <EventCountdown_base expired={moment(item.exp_payment).serverFormat('YYYY-MM-DD HH:mm:ss')} style={applyStyle({ flex: 1, fontSize: 12, color: LibStyle.colorRed, fontFamily: "ArialBold", fontWeight: "normal", fontStyle: "normal" })} />
71
+ <EventCountdown_base expired={moment(item.exp_payment).serverFormat('YYYY-MM-DD HH:mm:ss')} timezone={item?.timezone} style={applyStyle({ flex: 1, fontSize: 12, color: LibStyle.colorRed, fontFamily: "ArialBold", fontWeight: "normal", fontStyle: "normal" })} />
72
72
  <Text allowFontScaling={false} style={applyStyle({ flex: 1, flexWrap: 'wrap', padding: 10, paddingHorizontal: 0, textAlign: 'right', fontFamily: "ArialBold", fontSize: 12, fontWeight: "normal", fontStyle: "normal", letterSpacing: 0, color: LibStyle.colorRed })}>{item.booking_code}</Text>
73
73
  </View>
74
74
  :
@@ -97,7 +97,7 @@ export default function m(props: EventOrder_itemProps): any {
97
97
  item?.status == 0 ?
98
98
  <View style={applyStyle({ flex: 1, flexDirection: 'row', alignItems: 'center', justifyContent: 'space-between', alignContent: 'center', paddingHorizontal: 15 })}>
99
99
  <View style={{ flex: 1 }}>
100
- <EventCountdown_base expired={LibUtils.moment(item?.exp_payment).serverFormat('YYYY-MM-DD HH:mm:ss', item?.timezone)} style={applyStyle({ fontSize: 12, color: LibStyle.colorRed, fontFamily: "ArialBold", fontWeight: "normal", fontStyle: "normal" })} />
100
+ <EventCountdown_base expired={LibUtils.moment(item?.exp_payment).serverFormat('YYYY-MM-DD HH:mm:ss', item?.timezone)} timezone={item?.timezone} style={applyStyle({ fontSize: 12, color: LibStyle.colorRed, fontFamily: "ArialBold", fontWeight: "normal", fontStyle: "normal" })} />
101
101
  </View>
102
102
  {
103
103
  !!item?.booking_code &&
@@ -86,7 +86,7 @@ export default function m(props: EventOrder_waitingProps): any {
86
86
  item?.status == 0 ?
87
87
  <View style={applyStyle({ marginHorizontal: 25, marginBottom: 10, flex: 1, borderTopColor: "#000", borderTopWidth: 1, flexDirection: 'row', alignItems: 'center', justifyContent: 'space-between', alignContent: 'center' })}>
88
88
  <View style={{ flex: 1 }}>
89
- <EventCountdown_base expired={LibUtils.moment(item?.exp_payment).serverFormat('YYYY-MM-DD HH:mm:ss', item?.timezone)} style={applyStyle({ fontSize: 12, color: LibStyle.colorRed, fontFamily: "ArialBold", fontWeight: "normal", fontStyle: "normal" })} />
89
+ <EventCountdown_base expired={LibUtils.moment(item?.exp_payment).serverFormat('YYYY-MM-DD HH:mm:ss', item?.timezone)} timezone={item?.timezone} style={applyStyle({ fontSize: 12, color: LibStyle.colorRed, fontFamily: "ArialBold", fontWeight: "normal", fontStyle: "normal" })} />
90
90
  </View>
91
91
  {
92
92
  !!item?.booking_code &&
@@ -21,8 +21,8 @@ export interface EventScheduleProps {
21
21
 
22
22
  }
23
23
  export default function m(props: EventScheduleProps): any {
24
- const { schedule, dataBookingEvent, order_type, tax } = LibNavigation.getArgsAll(props)
25
- const [qty, setQty] = useSafeState<number>(dataBookingEvent?.qty)
24
+ const { schedule, dataBookingEvent, order_type, tax, is_multiprice } = LibNavigation.getArgsAll(props)
25
+ const [qty, setQty] = useSafeState<number>(dataBookingEvent?.qty || 1)
26
26
 
27
27
  function add(quota?: any, quota_used?: any): void {
28
28
  if (qty != parseInt(dataBookingEvent?.selected_ticket?.qty_max)) {
@@ -71,22 +71,22 @@ export default function m(props: EventScheduleProps): any {
71
71
  return (
72
72
  <View key={i} style={styleId_26m88j}>
73
73
  {
74
- _item.image != "" &&
75
- <LibPicture source={{ uri: _item.image }} style={styleId_15Un4S} />
74
+ Boolean(_item?.image) && _item?.image != "" &&
75
+ <LibPicture source={{ uri: _item?.image }} style={styleId_15Un4S} />
76
76
  }
77
- <Text allowFontScaling={false} style={styleId_XKKqU}>{_item.name}</Text>
77
+ <Text allowFontScaling={false} style={styleId_XKKqU}>{_item?.name || ""}</Text>
78
78
  <ScrollView>
79
79
  {
80
- _item.description != "" &&
81
- <LibWebview source={{ html: _item.description }} onFinishLoad={() => { }} style={styleId_ZoKh7U} />
80
+ Boolean(_item?.description) && _item?.description != "" &&
81
+ <LibWebview source={{ html: _item?.description }} onFinishLoad={() => { }} style={styleId_ZoKh7U} />
82
82
  }
83
83
  </ScrollView>
84
84
  {
85
- _item?.video != "" &&
85
+ Boolean(_item?.video) && _item?.video != "" &&
86
86
  <>
87
87
  <Text allowFontScaling={false} style={styleId_Z1RMsb6} >{esp.lang("event/schedule", "text_vide")}</Text>
88
- <TouchableOpacity onPress={() => LibNavigation.navigate('lib/video', { code: _item.video })} >
89
- <LibPicture source={{ uri: LibVideoProperty.getUrlThumbnail(_item.video) }} style={styleId_1g6pcd} />
88
+ <TouchableOpacity onPress={() => LibNavigation.navigate('lib/video', { code: _item?.video })} >
89
+ <LibPicture source={{ uri: LibVideoProperty.getUrlThumbnail(_item?.video) }} style={styleId_1g6pcd} />
90
90
  </TouchableOpacity>
91
91
  </>
92
92
  }
@@ -98,32 +98,35 @@ export default function m(props: EventScheduleProps): any {
98
98
 
99
99
  return (
100
100
  <View style={{ flex: 1, backgroundColor: '#fff' }}>
101
- <EventHeader title={esp.lang("event/schedule", "header_title")} />
101
+ <EventHeader title={dataBookingEvent?.event_title} />
102
102
  <ScrollView>
103
103
  {
104
- schedule?.artist.length > 0 && schedule.artist.map(renderArtist)
104
+ schedule?.artist?.length > 0 && schedule?.artist?.map?.(renderArtist)
105
105
  }
106
106
 
107
-
108
107
  </ScrollView>
109
- <View style={{ padding: 10 }} >
110
- <View style={{ flexDirection: 'row', marginVertical: 10, alignContent: 'center', alignItems: 'center', alignSelf: 'center' }}>
111
- <TouchableOpacity onPress={() => { min() }}>
112
- <View style={{ width: 28, height: 28, borderRadius: 6, backgroundColor: "#ecf0f1", alignContent: 'center', alignItems: 'center' }}>
113
- <LibIcon name="minus" color="#e74c3c" />
114
- </View>
115
- </TouchableOpacity>
116
- <Text style={{ fontFamily: "Arial", fontSize: 20, fontWeight: "bold", fontStyle: "normal", letterSpacing: 0, color: "#9b9b9b", marginLeft: 15, marginRight: 15 }}>{qty}</Text>
117
- <TouchableOpacity onPress={() => { add(item?.quota, item?.quota_used) }}>
118
- <View style={{ width: 28, height: 28, borderRadius: 6, backgroundColor: "#ecf0f1", alignContent: 'center', alignItems: 'center' }}>
119
- <LibIcon name="plus" color="#16a085" />
120
- </View>
121
- </TouchableOpacity>
108
+
109
+ {
110
+ is_multiprice == 0 &&
111
+ <View style={{ padding: 10 }} >
112
+ <View style={{ flexDirection: 'row', marginVertical: 10, alignContent: 'center', alignItems: 'center', alignSelf: 'center' }}>
113
+ <TouchableOpacity onPress={() => { min() }}>
114
+ <View style={{ width: 28, height: 28, borderRadius: 6, backgroundColor: "#ecf0f1", alignContent: 'center', alignItems: 'center' }}>
115
+ <LibIcon name="minus" color="#e74c3c" />
116
+ </View>
117
+ </TouchableOpacity>
118
+ <Text style={{ fontFamily: "Arial", fontSize: 20, fontWeight: "bold", fontStyle: "normal", letterSpacing: 0, color: "#9b9b9b", marginLeft: 15, marginRight: 15 }}>{qty}</Text>
119
+ <TouchableOpacity onPress={() => { add(item?.quota, item?.quota_used) }}>
120
+ <View style={{ width: 28, height: 28, borderRadius: 6, backgroundColor: "#ecf0f1", alignContent: 'center', alignItems: 'center' }}>
121
+ <LibIcon name="plus" color="#16a085" />
122
+ </View>
123
+ </TouchableOpacity>
124
+ </View>
125
+ <EventButton label={esp.lang("event/schedule", "next")} onPress={() => {
126
+ doBooking()
127
+ }} style={{ backgroundColor: LibStyle.colorGreen }} />
122
128
  </View>
123
- <EventButton label={esp.lang("event/schedule", "next")} onPress={() => {
124
- doBooking()
125
- }} style={{ backgroundColor: LibStyle.colorGreen }} />
126
- </View>
129
+ }
127
130
  </View>
128
131
  )
129
132
  }
@@ -500,7 +500,8 @@ export default function m(props: EventTicket_listProps): any {
500
500
  schedule: itemT.schedule,
501
501
  order_type: eventConfig?.order_type?.ticket,
502
502
  tax: selectedTicket?.tax == null ? 0 : selectedTicket?.tax,
503
- dataBookingEvent: dataPost
503
+ dataBookingEvent: dataPost,
504
+ is_multiprice: 0
504
505
  })
505
506
  }
506
507
 
@@ -556,6 +556,45 @@ export default function m(props: EventTicket_list2Props): any {
556
556
  }
557
557
  </View>
558
558
 
559
+ {
560
+ ticketWithDate && itemC.schedule?.artist?.length > 0 &&
561
+ <TouchableOpacity onPress={() => {
562
+ if (item.status == 1 && itemC.status == 1) {
563
+ let itemTicket = {
564
+ ...item
565
+ }
566
+ let replaceList = LibObject.set(itemTicket, itemC)('list')
567
+ // ini jika dia gajadi beli dari halaman schedule.
568
+ // setSelectedTicket(replaceList)
569
+ // setQtyGlobal(itemT)
570
+ // releaseQueue()
571
+ // ini untuk dikirim ke halaman schedule
572
+ let dataPost: any = {
573
+ event_id: availableResult?.id,
574
+ event_title: availableResult?.title,
575
+ charge_payment: availableResult?.charge_payment,
576
+ charge_payment_type: availableResult?.charge_payment_type,
577
+ images: availableResult?.images,
578
+ selected_ticket: replaceList,
579
+ qty: itemC.hasOwnProperty("qty") ? itemC?.qty : 1,
580
+ }
581
+
582
+ LibNavigation.navigate('event/schedule', {
583
+ schedule: itemC.schedule,
584
+ order_type: EventConfigProperty?.state()?.get()?.order_type?.ticket,
585
+ tax: item?.tax,
586
+ dataBookingEvent: dataPost,
587
+ is_multiprice: 1
588
+ })
589
+ }
590
+
591
+
592
+ }} activeOpacity={itemC.status == 1 ? 0 : 1} style={applyStyle({ padding: 5, opacity: 1 })} hitSlop={{ top: 15, left: 15, right: 15, bottom: 15 }} >
593
+ <LibIcon name="information-outline" size={18} color={"#434343"} style={{ opacity: textOpacity }} />
594
+ </TouchableOpacity>
595
+ }
596
+
597
+
559
598
  </View>
560
599
  </TouchableOpacity>
561
600
  )
@@ -106,6 +106,7 @@ export default function m(props: EventTms_dashboardProps): any {
106
106
  title: esp.lang("event/tms_dashboard", "log_exchange"),
107
107
  onPress: () => {
108
108
  dialogClosing.current?.show()
109
+ LibNavigation.navigate('event/exchange_ticket_list')
109
110
  }
110
111
  },
111
112
  ]
@@ -448,7 +448,7 @@ export default function m(props: EventTms_homeProps): any {
448
448
  function renderViewTms(item: any, i: number) {
449
449
  let percentages = item?.quota_visitor == 0 && item?.visitor == 0 ? 0 : item?.visitor > 0 && item?.quota_visitor == 0 ? 5 : (item?.visitor / item?.quota_visitor) * 100
450
450
  return (
451
- <View key={i} style={applyStyle({ marginLeft: 7, marginRight: 7, marginBottom: 10, borderRadius: 10, borderWidth: 2, padding: 10, borderColor: "#f1f1f1" })}>
451
+ <View key={i} style={applyStyle({ marginRight: 7, marginBottom: 10, borderRadius: 10, borderWidth: 2, padding: 10, borderColor: "#f1f1f1" })}>
452
452
  {progressBar(percentages, 'small')}
453
453
  <View style={{ flexDirection: 'row', alignItems: 'center', marginTop: 8 }} >
454
454
  <Text allowFontScaling={false} style={applyStyle({ textAlign: 'left', fontSize: 14, color: '#000', fontWeight: 'bold', marginRight: 10, flex: 1 })}>{item.type}</Text>
@@ -461,7 +461,7 @@ export default function m(props: EventTms_homeProps): any {
461
461
  function renderViewHall(item: any, i: number) {
462
462
  let percentages = item?.quota_visitor == 0 && item?.visitor == 0 ? 0 : item?.visitor > 0 && item?.quota_visitor == 0 ? 5 : (item?.visitor / item?.quota_visitor) * 100
463
463
  return (
464
- <View key={i} style={applyStyle({ marginLeft: 7, marginRight: 7, marginBottom: 10, borderRadius: 10, borderWidth: 2, padding: 10, borderColor: "#f1f1f1" })}>
464
+ <View key={i} style={applyStyle({ marginRight: 7, marginBottom: 10, borderRadius: 10, borderWidth: 2, padding: 10, borderColor: "#f1f1f1" })}>
465
465
  {/* <ComponentCircural_progress size={60} strokeWidth={7} percentage={percentages} color={setColorProg(percentages)} /> */}
466
466
  {progressBar(percentages, 'small')}
467
467
  <View style={{ flexDirection: 'row', alignItems: 'center', marginTop: 8 }} >