esoftplay-event 0.0.1-h → 0.0.1-i

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.
@@ -4,10 +4,8 @@ import { EventCountdownProperty } from 'esoftplay/cache/event/countdown/import';
4
4
  import { EventFirebase_socket, EventFirebase_socketProperty } from 'esoftplay/cache/event/firebase_socket/import';
5
5
  import { EventHeader } from 'esoftplay/cache/event/header/import';
6
6
  import { EventIndexProperty } from 'esoftplay/cache/event/index/import';
7
- import { EventMessage } from 'esoftplay/cache/event/message/import';
8
7
  import { LibCarrousel } from 'esoftplay/cache/lib/carrousel/import';
9
8
  import { LibCurl } from 'esoftplay/cache/lib/curl/import';
10
- import { LibList } from 'esoftplay/cache/lib/list/import';
11
9
  import { LibLoading } from 'esoftplay/cache/lib/loading/import';
12
10
  import { LibNavigation } from 'esoftplay/cache/lib/navigation/import';
13
11
  import { LibPicture } from 'esoftplay/cache/lib/picture/import';
@@ -19,6 +17,7 @@ import moment from 'esoftplay/moment';
19
17
  import useSafeState from 'esoftplay/state';
20
18
  import React, { useEffect } from 'react';
21
19
  import { Text, TouchableOpacity, View } from 'react-native';
20
+ import { ScrollView } from 'react-native-gesture-handler';
22
21
 
23
22
 
24
23
  moment().locale('id')
@@ -80,6 +79,89 @@ export default function m(props: EventArtistv2Props): any {
80
79
  const width = LibStyle?.width
81
80
  const sliderHeight = 0.50 * width
82
81
 
82
+ function renderIt(item: any, i: number) {
83
+ const styleId_Z2g4Hs7: any = { backgroundColor: '#FFC523', width: itemWidth, height: itemHeight, margin: 0.5, justifyContent: 'center', alignItems: 'center' }
84
+ return (
85
+ <LibCarrousel
86
+ delay={4000}
87
+ style={{ height: sliderHeight, width: width }}
88
+ autoplay
89
+ >
90
+ {
91
+ item?.images?.map((item1: any, ii: number) => {
92
+ return (
93
+ <TouchableOpacity onPress={() => {
94
+ esp.log("start");
95
+ // EventIndexProperty.isLogin(async () => {
96
+ // esp.log("1");
97
+ // if (item.status == 1) {
98
+ // esp.log("2");
99
+ // if (isInPricingQueueConfig(item.event_id)) {
100
+ // esp.log("3");
101
+ // LibNavigation.navigateForResult('event/queue_pricing', { event_id: item?.event_id, autoPass: false })
102
+ // }
103
+ // esp.log("4");
104
+ // EventCountdownProperty.countdownTime.set(moment().add(EventFirebase_socketProperty.eventQueueConfig.get(item?.event_id).time, 'seconds').localeFormat('YYYY-MM-DD HH:mm:ss'))
105
+ // esp.log("5");
106
+ // LibNavigation.navigate(item?.config?.hasOwnProperty('multiprice') && item?.config?.multiprice == 1 ?
107
+ // 'event/artist_detail_multi' :
108
+ // 'event/artist_detail', { url_price: item.url })
109
+ // } else {
110
+ // esp.log("6");
111
+ // LibToastProperty.show(esp.lang("event/artist", "ticket_not_available"))
112
+ // }
113
+ // })
114
+ }} style={{ height: sliderHeight, width: width }} >
115
+ <LibPicture source={{ uri: item1 }} style={{ height: sliderHeight, width: width, resizeMode: 'cover', backgroundColor: "#f1f2f3" }} />
116
+ </TouchableOpacity>
117
+ )
118
+ })
119
+ }
120
+ </LibCarrousel>
121
+ )
122
+ return (
123
+ <TouchableOpacity onPress={() => {
124
+ esp.log("start");
125
+ EventIndexProperty.isLogin(async () => {
126
+ esp.log("1");
127
+ if (item.status == 1) {
128
+ esp.log("2");
129
+ if (isInPricingQueueConfig(item.event_id)) {
130
+ esp.log("3");
131
+ LibNavigation.navigateForResult('event/queue_pricing', { event_id: item?.event_id, autoPass: false })
132
+ }
133
+ esp.log("4");
134
+ EventCountdownProperty.countdownTime.set(moment().add(EventFirebase_socketProperty.eventQueueConfig.get(item?.event_id).time, 'seconds').localeFormat('YYYY-MM-DD HH:mm:ss'))
135
+ esp.log("5");
136
+ LibNavigation.navigate(item?.config?.hasOwnProperty('multiprice') && item?.config?.multiprice == 1 ?
137
+ 'event/artist_detail_multi' :
138
+ 'event/artist_detail', { url_price: item.url })
139
+ } else {
140
+ esp.log("6");
141
+ LibToastProperty.show(esp.lang("event/artist", "ticket_not_available"))
142
+ }
143
+ })
144
+ }} >
145
+ <LibCarrousel
146
+ delay={4000}
147
+ style={{ height: sliderHeight, width: width }}
148
+ autoplay
149
+ >
150
+ {
151
+ item?.images?.map((item1: any, ii: number) => {
152
+ return (
153
+ <LibPicture key={ii} source={{ uri: item1 }} style={{ height: sliderHeight, width: width, resizeMode: 'cover', backgroundColor: "#f1f2f3" }} />
154
+ )
155
+ })
156
+ }
157
+ </LibCarrousel>
158
+ {/* <View style={styleId_Z2g4Hs7}>
159
+
160
+ </View> */}
161
+ </TouchableOpacity>
162
+ )
163
+
164
+ }
83
165
 
84
166
  function renderItem(item: any, index: number) {
85
167
  const styleId_Z2g4Hs7: any = { backgroundColor: '#FFC523', width: itemWidth, height: itemHeight, margin: 0.5, justifyContent: 'center', alignItems: 'center' }
@@ -180,9 +262,10 @@ export default function m(props: EventArtistv2Props): any {
180
262
  </TouchableOpacity>
181
263
  )
182
264
  }
183
-
184
265
  }
185
266
 
267
+
268
+
186
269
  return (
187
270
  <View style={{ flex: 1, backgroundColor: 'white' }} >
188
271
  <EventHeader title={title ? title : resultEvent?.event_title} iconShare={resultEvent?.url_share_artist && resultEvent?.url_share_artist !== ""}
@@ -191,16 +274,21 @@ export default function m(props: EventArtistv2Props): any {
191
274
  }} />
192
275
  {
193
276
  !result && !error ? <LibLoading /> :
194
- <LibList
195
- data={result}
196
- keyExtractor={(item) => item.id}
197
- onRefresh={loadData}
198
- staticHeight={itemHeight + 1}
199
- renderItem={renderItem}
200
- ListEmptyComponent={
201
- <EventMessage message={error} />
277
+ <ScrollView>
278
+ {
279
+ result?.map(renderIt)
202
280
  }
203
- />
281
+ </ScrollView>
282
+ // <LibList
283
+ // data={result}
284
+ // // keyExtractor={(item) => item.id}
285
+ // onRefresh={loadData}
286
+ // staticHeight={itemHeight + 1}
287
+ // renderItem={renderIt}
288
+ // ListEmptyComponent={
289
+ // <EventMessage message={error} />
290
+ // }
291
+ // />
204
292
  }
205
293
  </View>
206
294
  )
@@ -555,8 +555,8 @@ export default function m(props: EventOrder_detailProps): any {
555
555
  <View style={{ flex: 1, backgroundColor: '#fff', borderTopRightRadius: 7, borderBottomRightRadius: 7, borderTopLeftRadius: 50, borderBottomLeftRadius: 50, alignContent: 'center', justifyContent: 'center', paddingLeft: 30 }}>
556
556
  <Text allowFontScaling={false} style={{ fontSize: 16, fontWeight: 'bold' }}>{item.title}</Text>
557
557
  {
558
- item.hasOwnProperty('subtitle') && item?.subtitle != "" &&
559
- <Text allowFontScaling={false} numberOfLines={2} ellipsizeMode='tail' style={{ fontSize: 12, fontWeight: 'normal' }}>{item?.subtitle}</Text>
558
+ item.hasOwnProperty('info') && item?.info != "" &&
559
+ <Text allowFontScaling={false} numberOfLines={2} ellipsizeMode='tail' style={{ fontSize: 12, fontWeight: 'normal' }}>{item?.info}</Text>
560
560
  }
561
561
  </View>
562
562
  </LibGradient>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "esoftplay-event",
3
- "version": "0.0.1-h",
3
+ "version": "0.0.1-i",
4
4
  "description": "event module on esoftplay framework",
5
5
  "main": "index.js",
6
6
  "scripts": {