esoftplay-event 0.0.0-a → 0.0.0-c

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.
Files changed (179) hide show
  1. package/event/additional.tsx +4 -4
  2. package/event/additional_input.tsx +15 -15
  3. package/event/alert.tsx +32 -0
  4. package/event/artist.tsx +166 -0
  5. package/event/artist_detail.tsx +521 -0
  6. package/event/artist_detail_multi.tsx +548 -0
  7. package/event/badge.tsx +22 -0
  8. package/event/button.tsx +40 -0
  9. package/event/config.ts +4 -0
  10. package/event/countdown.tsx +5 -5
  11. package/event/countdown_base.tsx +83 -0
  12. package/event/counter_cashier.tsx +13 -13
  13. package/event/counter_cashier_report.tsx +6 -6
  14. package/event/counter_cashier_sell.tsx +7 -7
  15. package/event/counter_eo.tsx +21 -21
  16. package/event/counter_history.tsx +4 -4
  17. package/event/counter_lm.tsx +18 -18
  18. package/event/counter_report.tsx +4 -4
  19. package/event/counter_report_breakdown.tsx +2 -2
  20. package/event/counter_report_detail.tsx +15 -15
  21. package/event/counter_report_detail_list.tsx +4 -4
  22. package/event/counter_request.tsx +4 -4
  23. package/event/counter_request_detail.tsx +6 -6
  24. package/event/counter_send.tsx +9 -9
  25. package/event/counter_user_list.tsx +15 -15
  26. package/event/coupon.tsx +4 -4
  27. package/event/coupon_claim.tsx +4 -4
  28. package/event/coupon_claim_detail.tsx +8 -7
  29. package/event/coupon_claim_history.tsx +9 -9
  30. package/event/coupon_claim_reimburse.tsx +7 -8
  31. package/event/coupon_claim_reimburse_history.tsx +4 -4
  32. package/event/coupon_claim_reimburse_history_detail.tsx +4 -4
  33. package/event/coupon_claim_staff.tsx +10 -10
  34. package/event/coupon_detail.tsx +3 -3
  35. package/event/coupon_event_list.tsx +4 -4
  36. package/event/coupon_generate.tsx +4 -4
  37. package/event/coupon_generate_event.tsx +4 -4
  38. package/event/coupon_generate_list.tsx +2 -2
  39. package/event/date_picker.tsx +5 -5
  40. package/event/detail.tsx +12 -15
  41. package/event/entrance.tsx +17 -17
  42. package/event/entrance_again.tsx +22 -23
  43. package/event/entrance_failed.tsx +15 -15
  44. package/event/entrance_idcard.tsx +23 -23
  45. package/event/entrance_list.tsx +24 -24
  46. package/event/entrance_list_item.tsx +6 -6
  47. package/event/entrance_log.tsx +24 -24
  48. package/event/entrance_success.tsx +8 -8
  49. package/event/entrance_warning.tsx +14 -14
  50. package/event/exchange_reward.tsx +2 -2
  51. package/event/exchange_reward_result.tsx +7 -8
  52. package/event/exchange_ticket.tsx +11 -12
  53. package/event/exchange_ticket_list.tsx +10 -12
  54. package/event/exchange_ticket_result.tsx +11 -12
  55. package/event/exit.tsx +9 -9
  56. package/event/exit_failed.tsx +12 -12
  57. package/event/exit_list.tsx +15 -15
  58. package/event/exit_log.tsx +22 -22
  59. package/event/exit_success.tsx +8 -8
  60. package/event/exit_temporary.tsx +21 -21
  61. package/event/expander.tsx +36 -0
  62. package/event/fab.tsx +24 -0
  63. package/event/firebase_socket.ts +365 -0
  64. package/event/hall_in.tsx +13 -13
  65. package/event/hall_in_failed.tsx +22 -22
  66. package/event/hall_in_list.tsx +17 -17
  67. package/event/hall_in_log.tsx +24 -24
  68. package/event/hall_in_success.tsx +8 -8
  69. package/event/hall_out.tsx +13 -13
  70. package/event/hall_out_failed.tsx +11 -11
  71. package/event/hall_out_list.tsx +17 -17
  72. package/event/hall_out_log.tsx +24 -24
  73. package/event/hall_out_success.tsx +8 -8
  74. package/event/header.tsx +119 -0
  75. package/event/header_home.tsx +108 -0
  76. package/event/index.tsx +270 -0
  77. package/event/input_rectangle.tsx +208 -0
  78. package/event/item.tsx +40 -0
  79. package/event/label_input.tsx +23 -0
  80. package/event/list.tsx +20 -21
  81. package/event/list_filter.tsx +12 -13
  82. package/event/list_item.tsx +76 -0
  83. package/event/list_item2.tsx +78 -0
  84. package/event/loading_page.tsx +248 -0
  85. package/event/log.tsx +54 -54
  86. package/event/message.tsx +32 -0
  87. package/event/notice.tsx +41 -0
  88. package/event/order.tsx +323 -0
  89. package/event/order_detail.tsx +813 -0
  90. package/event/order_detail_payment.tsx +153 -0
  91. package/event/order_detail_upgrade.tsx +164 -0
  92. package/event/order_detail_upgrade_button.tsx +60 -0
  93. package/event/order_detail_upgrade_payment.tsx +221 -0
  94. package/event/order_detail_visitor.tsx +196 -0
  95. package/event/order_detail_waiting.tsx +520 -0
  96. package/event/order_history.tsx +101 -0
  97. package/event/order_item.tsx +118 -0
  98. package/event/order_lottery.tsx +172 -0
  99. package/event/order_reschedule.tsx +439 -0
  100. package/event/order_reschedule_list.tsx +85 -0
  101. package/event/order_share_to.tsx +219 -0
  102. package/event/order_share_to_detail.tsx +181 -0
  103. package/event/order_status.tsx +66 -0
  104. package/event/order_waiting.tsx +143 -0
  105. package/event/pending_trx.tsx +50 -0
  106. package/event/qc_idcard.tsx +12 -12
  107. package/event/qc_idcard_failed.tsx +4 -4
  108. package/event/qc_idcard_success.tsx +4 -4
  109. package/event/qr_bg.tsx +22 -0
  110. package/event/queue_out.tsx +3 -3
  111. package/event/queue_pricing.tsx +2 -3
  112. package/event/rating.tsx +49 -0
  113. package/event/rating_mini.tsx +35 -0
  114. package/event/refresh_button.tsx +40 -0
  115. package/event/review.tsx +3 -3
  116. package/event/review_add.tsx +8 -8
  117. package/event/review_detail.tsx +4 -4
  118. package/event/review_item.tsx +4 -4
  119. package/event/scan_item.tsx +2 -2
  120. package/event/schedule.tsx +8 -9
  121. package/event/seat.tsx +16 -18
  122. package/event/seat_autopick.tsx +4 -4
  123. package/event/seat_map.tsx +4 -4
  124. package/event/seat_map_test.tsx +2 -2
  125. package/event/section.tsx +35 -0
  126. package/event/section_menu.tsx +40 -0
  127. package/event/sheet.tsx +73 -0
  128. package/event/slider.tsx +46 -0
  129. package/event/step.tsx +29 -0
  130. package/event/ticket_list.tsx +15 -16
  131. package/event/ticket_list2.tsx +16 -17
  132. package/event/tms.tsx +4 -4
  133. package/event/tms_add.tsx +7 -8
  134. package/event/tms_add_result.tsx +4 -4
  135. package/event/tms_check_code.tsx +160 -0
  136. package/event/tms_check_ticket.tsx +72 -0
  137. package/event/tms_check_ticket_result.tsx +384 -0
  138. package/event/tms_dashboard.tsx +7 -7
  139. package/event/tms_event_list.tsx +46 -43
  140. package/event/tms_gate.tsx +96 -0
  141. package/event/tms_home.tsx +639 -0
  142. package/event/tms_idcard.tsx +203 -0
  143. package/event/tms_in.tsx +215 -0
  144. package/event/tms_in_again.tsx +199 -0
  145. package/event/tms_in_failed.tsx +190 -0
  146. package/event/tms_in_hall.tsx +148 -0
  147. package/event/tms_in_hall_failed.tsx +270 -0
  148. package/event/tms_in_hall_list.tsx +222 -0
  149. package/event/tms_in_hall_log.tsx +134 -0
  150. package/event/tms_in_hall_success.tsx +132 -0
  151. package/event/tms_in_list.tsx +264 -0
  152. package/event/tms_in_log.tsx +130 -0
  153. package/event/tms_in_success.tsx +155 -0
  154. package/event/tms_in_warning.tsx +91 -0
  155. package/event/tms_list_item.tsx +88 -0
  156. package/event/tms_log.tsx +435 -0
  157. package/event/tms_out.tsx +91 -0
  158. package/event/tms_out_failed.tsx +135 -0
  159. package/event/tms_out_hall.tsx +143 -0
  160. package/event/tms_out_hall_failed.tsx +133 -0
  161. package/event/tms_out_hall_list.tsx +215 -0
  162. package/event/tms_out_hall_log.tsx +133 -0
  163. package/event/tms_out_hall_success.tsx +130 -0
  164. package/event/tms_out_list.tsx +118 -0
  165. package/event/tms_out_log.tsx +131 -0
  166. package/event/tms_out_success.tsx +143 -0
  167. package/event/tms_out_temporary.tsx +226 -0
  168. package/event/toggle.tsx +30 -0
  169. package/event/transaction.ts +34 -0
  170. package/event/turnstile_event_gate.tsx +2 -2
  171. package/event/turnstile_event_list.tsx +4 -4
  172. package/event/turnstile_event_ticket.tsx +4 -4
  173. package/event/turnstile_settings.tsx +11 -11
  174. package/event/turnstile_settings_otp.tsx +4 -4
  175. package/event/turnstile_settings_status.tsx +2 -2
  176. package/event/voucher.tsx +9 -10
  177. package/event/voucher_multi.tsx +4 -5
  178. package/id.json +644 -0
  179. package/package.json +1 -1
@@ -0,0 +1,323 @@
1
+ // withHooks
2
+ import { applyStyle } from 'esoftplay';
3
+ import { EventHeader } from 'esoftplay/cache/event/header/import';
4
+ import { EventMessage } from 'esoftplay/cache/event/message/import';
5
+ import { EventOrder_item } from 'esoftplay/cache/event/order_item/import';
6
+ import { EventOrder_status } from 'esoftplay/cache/event/order_status/import';
7
+ import { LibCurl } from 'esoftplay/cache/lib/curl/import';
8
+ import { LibIcon } from 'esoftplay/cache/lib/icon/import';
9
+ import { LibInfinite } from 'esoftplay/cache/lib/infinite/import';
10
+ import { LibNavigation } from 'esoftplay/cache/lib/navigation/import';
11
+ import { LibScroll } from 'esoftplay/cache/lib/scroll/import';
12
+ import { LibSlidingup } from 'esoftplay/cache/lib/slidingup/import';
13
+ import { LibStyle } from 'esoftplay/cache/lib/style/import';
14
+ import { LibTextstyle } from 'esoftplay/cache/lib/textstyle/import';
15
+ import { LibUtils } from 'esoftplay/cache/lib/utils/import';
16
+ import esp from 'esoftplay/esp';
17
+
18
+ import { EventButton } from 'esoftplay/cache/event/button/import';
19
+ import { EventSection_menu } from 'esoftplay/cache/event/section_menu/import';
20
+ import moment from 'esoftplay/moment';
21
+ import useSafeState from 'esoftplay/state';
22
+ import useGlobalSubscriber, { useGlobalSubscriberReturn } from 'esoftplay/subscribe';
23
+ import { useTimeout } from 'esoftplay/timeout';
24
+ import React, { useEffect, useRef } from 'react';
25
+ import { Pressable, ScrollView, Text, TouchableOpacity, View } from 'react-native';
26
+
27
+
28
+ export interface EventOrderProps {
29
+
30
+ }
31
+
32
+ export interface EventOrderArgs {
33
+ status: any
34
+ }
35
+
36
+ function Status(props: any) {
37
+ const tabRef = useRef<LibScroll>(null)
38
+ const allStatus = EventOrder_status().filter((x) => x.module == 'event/order')
39
+ const timeout = useTimeout()
40
+
41
+ useEffect(() => {
42
+ if (props.status != 1)
43
+ timeout(() => {
44
+ tabRef?.current?.scrollToIndex?.(allStatus.map((s) => s.code).indexOf(props.status))
45
+ }, 500);
46
+ }, [])
47
+
48
+ return (
49
+ <View style={{ minHeight: 50 }} >
50
+ <LibScroll ref={tabRef} horizontal initialNumToRender={20} >
51
+ <View style={{ width: 10 }} />
52
+ {
53
+ allStatus.map((status: any, index: number) => (
54
+ <TouchableOpacity key={index} onPress={() => {
55
+ props.onChangeStatus(status.code)
56
+ }} style={{ marginRight: 10, height: 26, paddingLeft: 10, paddingRight: 10, borderRadius: 13, backgroundColor: props.status == status.code ? "#ecfef8" : "#fff", borderStyle: "solid", borderWidth: 0.5, borderColor: props.status == status.code ? "#51b596" : "#c5c5c5", justifyContent: 'center', alignContent: 'center', alignItems: 'center' }}>
57
+ <Text allowFontScaling={false} style={{ fontFamily: "SFProText", fontSize: 12, fontWeight: "normal", fontStyle: "normal", letterSpacing: 0, color: props.status == status.code ? "#51b596" : "#c5c5c5" }}>{status.text}</Text>
58
+ </TouchableOpacity>
59
+ ))
60
+ }
61
+ </LibScroll>
62
+ </View>
63
+ )
64
+ }
65
+
66
+ const subs = useGlobalSubscriber()
67
+ export function subscribe(): useGlobalSubscriberReturn {
68
+ return subs
69
+ }
70
+
71
+ export default function m(props: EventOrderProps): any {
72
+ const allStatus = EventOrder_status()
73
+ const statusCode = LibNavigation.getArgs(props, 'status', esp.isDebug("filter") ? '0,1,2,3,4,5' : '1')
74
+ const [status, setStatus] = useSafeState(statusCode)
75
+ const [code, setCode] = useSafeState(statusCode)
76
+ const [badge, setBadge] = useSafeState<number>(0)
77
+ const [selectedFilter, setSelectedFilter] = useSafeState({ id: 1, title: esp.lang("event/order", "all_date") })
78
+ const [selectedDate, setSelectedDate] = useSafeState({ date_start: '', date_end: '', id: 1, title: esp.lang("event/order", "all_date") })
79
+ const [selectedDateRange, setSelectedDateRange] = useSafeState({ date_start: moment().localeFormat("YYYY-MM-DD"), date_end: moment().localeFormat("YYYY-MM-DD") })
80
+
81
+ const statusRef = useRef<LibSlidingup>(null)
82
+ const dialogFilterDate = useRef<LibSlidingup>(null)
83
+ const [isExist, setIsExist] = useSafeState(0)
84
+
85
+ const url = 'event_order'
86
+
87
+ function loadButtonHistoryExist() {
88
+ new LibCurl('event_order_history_exists', null, (res, msg) => {
89
+ setIsExist(1)
90
+ }, (error) => {
91
+ setIsExist(0)
92
+ }, 1)
93
+ }
94
+
95
+
96
+ function loadBadgeWaitingOrder() {
97
+ new LibCurl('event_order_waiting_notification', null, (res, msg) => {
98
+ setBadge(res?.waiting)
99
+ }, (error) => {
100
+
101
+ }, 1)
102
+ }
103
+
104
+ useEffect(() => {
105
+ loadButtonHistoryExist()
106
+ loadBadgeWaitingOrder()
107
+ }, [])
108
+
109
+ let filterDate = [
110
+ {
111
+ id: 1,
112
+ title: esp.lang("event/order", "all_dates_transaction"),
113
+ },
114
+ {
115
+ id: 2,
116
+ title: esp.lang("event/order", "last_90_days"),
117
+ },
118
+ {
119
+ id: 3,
120
+ title: esp.lang("event/order", "last_30_days"),
121
+ },
122
+ {
123
+ id: 4,
124
+ title: esp.lang("event/order", "choose_date"),
125
+ },
126
+ ]
127
+
128
+ function renderItem(item: any) {
129
+ return (
130
+ <EventOrder_item item={item} onPress={() => {
131
+ LibNavigation.navigate('event/order_detail', { url: item.url })
132
+ }} />
133
+ )
134
+ }
135
+
136
+ function buildUrl(url: string): string {
137
+ if (status) {
138
+ url += url.includes('?') ? '&' : '?'
139
+ url += 'status=' + status
140
+ }
141
+ if (selectedDate?.date_start != "") {
142
+ url += url.includes('?') ? '&' : '?'
143
+ url += 'start_date=' + selectedDate?.date_start
144
+ }
145
+ if (selectedDate?.date_end != "") {
146
+ url += url.includes('?') ? '&' : '?'
147
+ url += 'end_date=' + selectedDate?.date_end
148
+ }
149
+ return url
150
+ }
151
+
152
+ subs.useSubscribe(() => {
153
+ loadBadgeWaitingOrder()
154
+ })
155
+
156
+ return (
157
+ <View style={{ backgroundColor: LibStyle.colorBgGrey, flex: 1 }}>
158
+ <EventHeader title={esp.lang("event/order", "my_order")} />
159
+ {
160
+ esp.isDebug('filter_order_status') ?
161
+ <View style={{ minHeight: 50 }} >
162
+ <LibScroll
163
+ initialNumToRender={20}
164
+ horizontal
165
+ >
166
+ <View style={{ width: 10 }} />
167
+ <Pressable
168
+ onPress={() => { statusRef.current?.show() }}
169
+ style={applyStyle({ height: 30, marginVertical: 10, marginRight: 10, borderRadius: 12, backgroundColor: 'white', borderColor: '#ccc', borderWidth: 1, paddingHorizontal: 10, justifyContent: 'center', flexDirection: 'row', alignItems: 'center' })} >
170
+ <LibTextstyle textStyle='footnote' text={allStatus[allStatus.findIndex((x) => String(x.code) == status)]?.text || esp.lang("event/order", "all_statis")} style={applyStyle({ fontSize: 11, color: "#4E4E4E", marginRight: 5 })} />
171
+ <LibIcon name='chevron-down' style={applyStyle({ color: "#4E4E4E" })} />
172
+ </Pressable>
173
+ <Pressable
174
+ onPress={() => { dialogFilterDate?.current?.show() }}
175
+ style={applyStyle({ height: 30, marginVertical: 10, marginRight: 10, borderRadius: 12, backgroundColor: 'white', borderColor: '#ccc', borderWidth: 1, paddingHorizontal: 10, justifyContent: 'center', flexDirection: 'row', alignItems: 'center' })} >
176
+ <LibTextstyle textStyle='footnote' text={selectedDate.id == 4 ? LibUtils.getDateRange(selectedDate?.date_start, selectedDate?.date_end) : selectedDate?.title} style={applyStyle({ fontSize: 11, color: "#4E4E4E", marginRight: 5 })} />
177
+ <LibIcon name='calendar' size={14} style={applyStyle({ color: "#4E4E4E" })} />
178
+ </Pressable>
179
+ </LibScroll>
180
+ <EventSection_menu size='line' />
181
+ </View>
182
+ :
183
+ <View style={{ margin: 15, marginBottom: 0, flexDirection: 'row', justifyContent: 'space-between' }}>
184
+ <View style={{ flex: 10 }}>
185
+ <Status status={status} onChangeStatus={setStatus} />
186
+ </View>
187
+ <TouchableOpacity onPress={() => {
188
+ dialogFilterDate.current!.show()
189
+ }} style={{ flex: 1, marginLeft: 15 }}>
190
+ <LibIcon name="calendar" />
191
+ </TouchableOpacity>
192
+ </View>
193
+ }
194
+
195
+ <LibInfinite
196
+ url={buildUrl(url) + "&t=" + new Date().getTime()}
197
+ key={buildUrl(url)}
198
+ ListHeaderComponent={
199
+ <Pressable onPress={() => {
200
+ LibNavigation.navigate('event/order_waiting')
201
+ }} style={{ padding: 7, margin: 15, backgroundColor: '#fff', marginBottom: 0, borderRadius: 5, borderWidth: 1, borderColor: LibStyle.colorPrimary, flexDirection: 'row', justifyContent: 'space-between', alignItems: 'center' }}>
202
+ <Text allowFontScaling={false} style={{ marginLeft: 8 }}>{esp.lang("event/order", "wawit")}</Text>
203
+ <View style={{ flexDirection: 'row', alignItems: 'center' }}>
204
+ {
205
+ badge != 0 &&
206
+ <View style={{ backgroundColor: LibStyle.colorRed, height: 17, padding: 5, paddingVertical: 2, borderRadius: 10, alignContent: 'center', alignItems: 'center' }}>
207
+ <Text allowFontScaling={false} style={{ fontFamily: "ArialBold", fontSize: 12, letterSpacing: 0, color: "#ffffff" }}>{badge > 99 ? "99+" : LibUtils.number(badge)}</Text>
208
+ </View>
209
+ }
210
+ <LibIcon name='chevron-right' />
211
+ </View>
212
+ </Pressable>
213
+ }
214
+ errorView={(err: any) => (
215
+ <EventMessage message={err} style={{ marginTop: 15 }} />
216
+ )}
217
+ renderItem={renderItem}
218
+ ListEndedComponent={
219
+ esp.isDebug('') && isExist == 1 &&
220
+ <TouchableOpacity onPress={() => { LibNavigation.navigate('event/order_history') }}>
221
+ <View style={applyStyle({ marginBottom: 20, marginTop: 15, justifyContent: 'center', alignSelf: 'center', width: 104, height: 23, borderRadius: 11.5, backgroundColor: "#fff", borderStyle: "solid", borderWidth: 1, borderColor: "#e1e1e1" })}>
222
+ <Text allowFontScaling={false} style={applyStyle({ alignSelf: 'center', textAlign: 'center', fontFamily: "Arial", fontSize: 11, fontWeight: "bold", fontStyle: "normal", letterSpacing: 0, color: "#9b9b9b" })}>{esp.lang("event/order", "show")}</Text>
223
+ </View>
224
+ </TouchableOpacity>
225
+ }
226
+ />
227
+ <LibSlidingup ref={statusRef} onChangeShow={(s) => { if (!s) setCode(status) }} >
228
+ <View style={applyStyle({ backgroundColor: 'white', paddingHorizontal: 17, borderTopLeftRadius: 10, borderTopRightRadius: 10, maxHeight: LibStyle.height * 0.9 })}>
229
+ <View style={applyStyle({ flexDirection: 'row', alignItems: 'center', marginTop: 15 })}>
230
+ <Pressable onPress={() => { statusRef.current?.hide() }} style={applyStyle({ marginRight: 10 })} >
231
+ <LibIcon name='close' />
232
+ </Pressable>
233
+ <LibTextstyle textStyle='footnote' text={esp.lang("event/order", "Transaction_Status")} style={applyStyle({ fontWeight: 'bold', fontSize: 14, color: "#4E4E4E" })} />
234
+ </View>
235
+ <ScrollView>
236
+ <Pressable onPress={() => { setCode('0,1,2,3,4,5') }} style={applyStyle({ flexDirection: 'row', alignItems: 'center', borderBottomWidth: 1, borderBottomColor: '#e6e6e6', paddingVertical: 12 })}>
237
+ <LibTextstyle textStyle='footnote' text={esp.lang("event/order", "All_Transaction_Status")} style={applyStyle({ flex: 1, fontWeight: 'bold', fontSize: 10, color: "#4E4E4E" })} />
238
+ <LibIcon.Ionicons name={code == '0,1,2,3,4,5' ? 'radio-button-on' : 'radio-button-off'} color={code == '0,1,2,3,4,5' ? LibStyle.colorPrimary : '#4E4E4E'} />
239
+ </Pressable>
240
+ {
241
+ allStatus?.filter((item: any) => item.publish == 1).map((it: any, i: number) => {
242
+ return (
243
+ <Pressable key={i} onPress={() => setCode(it.code)} style={applyStyle({ flexDirection: 'row', alignItems: 'center', borderBottomWidth: 1, borderBottomColor: '#e6e6e6', paddingVertical: 12 })}>
244
+ <LibTextstyle textStyle='footnote' text={it.text} style={applyStyle({ flex: 1, fontWeight: 'bold', fontSize: 10, color: "#4E4E4E" })} />
245
+ <LibIcon.Ionicons name={it.code == code ? 'radio-button-on' : 'radio-button-off'} color={it.code == code ? LibStyle.colorPrimary : '#4E4E4E'} />
246
+ </Pressable>
247
+ )
248
+ })
249
+ }
250
+ {/* {
251
+ allStatus.map((x: any, i: number) => (
252
+ <Pressable key={i} onPress={() => setCode(x.code)} style={applyStyle({ flexDirection: 'row', alignItems: 'center', borderBottomWidth: 1, borderBottomColor: '#e6e6e6', paddingVertical: 12 })}>
253
+ <LibTextstyle textStyle='footnote' text={x.text} style={applyStyle({ flex: 1, fontWeight: 'bold', fontSize: 10, color: "#4E4E4E" })} />
254
+ <LibIcon.Ionicons name={x.code == code ? 'radio-button-on' : 'radio-button-off'} color={x.code == code ? LibStyle.colorPrimary : '#4E4E4E'} />
255
+ </Pressable>
256
+ ))
257
+ } */}
258
+ </ScrollView>
259
+ <EventButton label={esp.lang("event/order", "apply")} style={applyStyle({ fontSize: 14, marginVertical: 15 })} backgroundColor={LibStyle.colorPrimary} onPress={() => { setStatus(code); statusRef.current?.hide() }} />
260
+ </View>
261
+ </LibSlidingup>
262
+ <LibSlidingup ref={dialogFilterDate} onChangeShow={(s) => { if (!s) setSelectedFilter(selectedDate) }} >
263
+ <View style={{ backgroundColor: '#f6f6f6', borderTopRightRadius: 10, borderTopLeftRadius: 10, paddingBottom: 15 }}>
264
+ <View style={applyStyle({ flexDirection: 'row', alignItems: 'center', marginTop: 15, paddingHorizontal: 15 })}>
265
+ <Pressable onPress={() => { statusRef.current?.hide() }} style={applyStyle({ marginRight: 10 })} >
266
+ <LibIcon name='close' />
267
+ </Pressable>
268
+ <LibTextstyle textStyle='footnote' text={esp.lang("event/order", "select_date")} style={applyStyle({ fontWeight: 'bold', fontSize: 14, color: "#4E4E4E" })} />
269
+ </View>
270
+
271
+ <EventSection_menu size="line" />
272
+ {
273
+ filterDate?.map((item: any, i: number) => {
274
+ return (
275
+ <Pressable onPress={() => {
276
+ setSelectedFilter(item)
277
+ }} key={i} style={applyStyle({ padding: 10, paddingHorizontal: 20, borderBottomWidth: 1, borderBottomColor: '#e9ecef', flexDirection: 'row', justifyContent: 'space-between', alignContent: 'center', alignItems: 'center' })}>
278
+ <LibTextstyle textStyle='footnote' text={item?.title} style={applyStyle({ flex: 1, fontWeight: 'bold', fontSize: 12, color: "#4E4E4E" })} />
279
+ <LibIcon.Ionicons name={selectedFilter?.id == item.id ? 'radio-button-on' : 'radio-button-off'} color={selectedFilter?.id == item.id ? LibStyle.colorPrimary : "#4E4E4E"} />
280
+ </Pressable>
281
+ )
282
+ })
283
+ }
284
+ {
285
+ selectedFilter?.id == 4 &&
286
+ <Pressable onPress={() => {
287
+ LibNavigation.navigateForResult('feed/talent_date', { minDate: moment().add(-5, 'years').localeFormat('YYYY-MM-DD'), maxDate: moment().add(1, 'years').localeFormat('YYYY-MM-DD') }).then((item) => {
288
+ setSelectedDateRange(item)
289
+ })
290
+ }} style={{ flexDirection: 'row', justifyContent: 'space-between' }}>
291
+ <View style={{ flex: 1, padding: 10, paddingHorizontal: 20, borderBottomWidth: 1, borderBottomColor: '#e9ecef', }}>
292
+ <Text allowFontScaling={false} style={{ fontFamily: "Arial", fontSize: 12, fontWeight: "normal", fontStyle: "normal", letterSpacing: 0, color: "#4a4a4a" }}>{esp.lang("event/order", "start_from")}</Text>
293
+ <Text allowFontScaling={false} style={{ marginTop: 4, fontFamily: "Arial", fontSize: 14, fontWeight: "bold", fontStyle: "normal", letterSpacing: 0, color: "#4a4a4a" }}>{LibUtils.moment(selectedDateRange?.date_start).localeFormat("DD MMM YYYY")}</Text>
294
+ </View>
295
+ <View style={{ flex: 1, padding: 10, paddingHorizontal: 20, borderBottomWidth: 1, borderBottomColor: '#e9ecef', }}>
296
+ <Text allowFontScaling={false} style={{ fontFamily: "Arial", fontSize: 12, fontWeight: "normal", fontStyle: "normal", letterSpacing: 0, color: "#4a4a4a" }}>{esp.lang("event/order", "until")}</Text>
297
+ <Text allowFontScaling={false} style={{ marginTop: 4, fontFamily: "Arial", fontSize: 14, fontWeight: "bold", fontStyle: "normal", letterSpacing: 0, color: "#4a4a4a" }}>{LibUtils.moment(selectedDateRange?.date_end).localeFormat("DD MMM YYYY")}</Text>
298
+ </View>
299
+ </Pressable>
300
+ }
301
+ <EventButton label={esp.lang("event/order", "apply")} backgroundColor={LibStyle.colorPrimary} style={applyStyle({ marginHorizontal: 15, marginTop: 15, fontSize: 14 })} onPress={() => {
302
+ if (selectedFilter.id == 1) {
303
+ setSelectedDate({ date_start: '', date_end: '', ...selectedFilter })
304
+ dialogFilterDate.current!.hide()
305
+ } else if (selectedFilter.id == 2) {
306
+ setSelectedDate({ ...selectedFilter, date_start: moment().add(-90, 'days').localeFormat('YYYY-MM-DD'), date_end: moment().localeFormat("YYYY-MM-DD") })
307
+ dialogFilterDate.current!.hide()
308
+ } else if (selectedFilter.id == 3) {
309
+ setSelectedDate({ date_start: moment().add(-30, 'days').localeFormat("YYYY-MM-DD"), date_end: moment().localeFormat("YYYY-MM-DD"), ...selectedFilter })
310
+ dialogFilterDate.current!.hide()
311
+ } else if (selectedFilter.id == 4) {
312
+ setSelectedDate({ ...selectedDateRange, ...selectedFilter })
313
+ dialogFilterDate.current!.hide()
314
+ } else {
315
+ setSelectedDate({ date_start: moment().localeFormat("YYYY-MM-DD"), date_end: moment().localeFormat("YYYY-MM-DD"), ...selectedFilter })
316
+ dialogFilterDate.current!.hide()
317
+ }
318
+ }} />
319
+ </View>
320
+ </LibSlidingup>
321
+ </View >
322
+ )
323
+ }