esoftplay-event 0.0.2-r → 0.0.2-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.
- package/event/order_detail.tsx +13 -22
- package/event/order_detail_share.tsx +9 -6
- package/package.json +1 -1
package/event/order_detail.tsx
CHANGED
|
@@ -195,7 +195,6 @@ export default function m(props: EventOrder_detailProps): any {
|
|
|
195
195
|
checked: 0,
|
|
196
196
|
})
|
|
197
197
|
})
|
|
198
|
-
esp.log({ data });
|
|
199
198
|
setDataTicket(data)
|
|
200
199
|
LibUtils.debounce(() => { dialogQtyAddons?.current?.show() }, 100)
|
|
201
200
|
}, (error: any) => {
|
|
@@ -454,6 +453,7 @@ export default function m(props: EventOrder_detailProps): any {
|
|
|
454
453
|
|
|
455
454
|
let startEvent = result?.start_date + " " + result?.start_time
|
|
456
455
|
let dateNow = LibUtils.moment().localeFormat("YYYY-MM-DD HH:mm")
|
|
456
|
+
let valid = dataTicket?.some((item: any) => item.status == 1 && item.checked == 1);
|
|
457
457
|
|
|
458
458
|
return (
|
|
459
459
|
<View style={{ flex: 1, backgroundColor: LibStyle.colorBgGrey }}>
|
|
@@ -722,10 +722,8 @@ export default function m(props: EventOrder_detailProps): any {
|
|
|
722
722
|
onPress={() => {
|
|
723
723
|
setGroupAddon(item)
|
|
724
724
|
LibUtils.debounce(() => {
|
|
725
|
-
// setQty(1)
|
|
726
725
|
dialogAddonList?.current?.show()
|
|
727
726
|
}, 100)
|
|
728
|
-
// loadDataAddons(item?.addons_id, item?.url)
|
|
729
727
|
}}
|
|
730
728
|
icon={'chevron-down'}
|
|
731
729
|
title={item.title}
|
|
@@ -741,11 +739,9 @@ export default function m(props: EventOrder_detailProps): any {
|
|
|
741
739
|
color={result?.color}
|
|
742
740
|
onPress={() => {
|
|
743
741
|
if (item?.hasOwnProperty('status') && item?.status == 1) {
|
|
744
|
-
|
|
745
|
-
setSelectedAddon(item)
|
|
746
|
-
loadDataTicket(result?.id, item?.[0]?.price_id, item?.[0]?.ondate)
|
|
747
|
-
|
|
748
|
-
// loadDataAddons(item?.addons_id, item?.url)
|
|
742
|
+
setGroupAddon(item)
|
|
743
|
+
setSelectedAddon(item?.list?.[0])
|
|
744
|
+
loadDataTicket(result?.id, item?.list?.[0]?.price_id, item?.list?.[0]?.ondate)
|
|
749
745
|
}
|
|
750
746
|
}}
|
|
751
747
|
icon={'plus-circle-outline'}
|
|
@@ -1113,12 +1109,7 @@ export default function m(props: EventOrder_detailProps): any {
|
|
|
1113
1109
|
<EventButton label={Number(result.is_shareable) ? /*share_ticket*/esp.lang("event/order_detail", "share_ticket") : esp.lang("event/order_detail", "shared")} onPress={() => {
|
|
1114
1110
|
if (Number(result.is_shareable)) {
|
|
1115
1111
|
LibDialog.confirm(esp.lang("event/order_detail", "share_title"), esp.lang("event/order_detail", "share_msg", esp.appjson().expo.name), esp.lang("event/order_detail", "share_ok"), () => {
|
|
1116
|
-
|
|
1117
|
-
if (esp.isDebug("")) {
|
|
1118
|
-
LibNavigation.navigate('event/order_detail_share', { url: url })
|
|
1119
|
-
} else {
|
|
1120
|
-
LibNavigation.navigate('event/order_share_to', { url: url })
|
|
1121
|
-
}
|
|
1112
|
+
LibNavigation.navigate('event/order_detail_share', { url: url })
|
|
1122
1113
|
}, esp.lang("event/order_detail", "share_no"), () => {
|
|
1123
1114
|
|
|
1124
1115
|
})
|
|
@@ -1132,11 +1123,7 @@ export default function m(props: EventOrder_detailProps): any {
|
|
|
1132
1123
|
result?.par_id != 0 && result?.status == 1 && result?.qty_returnable > 0 &&
|
|
1133
1124
|
<View style={{ padding: 5 }}>
|
|
1134
1125
|
<EventButton label={esp.lang("event/order_detail", "return_ticket")} onPress={() => {
|
|
1135
|
-
|
|
1136
|
-
LibNavigation.navigate('event/order_detail_return', { url: url })
|
|
1137
|
-
} else {
|
|
1138
|
-
dialogSendBack?.current?.show()
|
|
1139
|
-
}
|
|
1126
|
+
LibNavigation.navigate('event/order_detail_return', { url: url })
|
|
1140
1127
|
}} backgroundColor={LibStyle.colorGreen} />
|
|
1141
1128
|
</View>
|
|
1142
1129
|
}
|
|
@@ -1229,9 +1216,13 @@ export default function m(props: EventOrder_detailProps): any {
|
|
|
1229
1216
|
</ScrollView>
|
|
1230
1217
|
|
|
1231
1218
|
<EventButton label={esp.lang("event/order_detail", "next")} onPress={() => {
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1219
|
+
if (valid) {
|
|
1220
|
+
dialogQtyAddons?.current?.hide()
|
|
1221
|
+
loadDataAddons(getSelectedAddon()?.addons_id, getSelectedAddon()?.url)
|
|
1222
|
+
}
|
|
1223
|
+
}}
|
|
1224
|
+
backgroundColor={!valid ? LibStyle.colorGrey : LibStyle.colorGreen}
|
|
1225
|
+
/>
|
|
1235
1226
|
</View>
|
|
1236
1227
|
</LibSlidingup>
|
|
1237
1228
|
|
|
@@ -136,6 +136,7 @@ export default function m(props: EventOrder_detail_shareProps): any {
|
|
|
136
136
|
}
|
|
137
137
|
|
|
138
138
|
let checkNotUsed = dataTicket?.length > 0 && dataTicket?.filter((x: any) => x?.checked == 0)
|
|
139
|
+
let valid = dataTicket?.some((item: any) => item.checked == 1);
|
|
139
140
|
|
|
140
141
|
return (
|
|
141
142
|
<LibKeyboard_avoid style={{ flex: 1, backgroundColor: '#fff' }}>
|
|
@@ -284,13 +285,15 @@ export default function m(props: EventOrder_detail_shareProps): any {
|
|
|
284
285
|
<EventButton
|
|
285
286
|
label={esp.lang("event/order_detail_share", "share_ticket")}
|
|
286
287
|
onPress={() => {
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
288
|
+
if (valid) {
|
|
289
|
+
LibNavigation.navigateForResult("bigbang/payment_pin", undefined, 1132).then((p) => {
|
|
290
|
+
if (p) {
|
|
291
|
+
shareTicket(p)
|
|
292
|
+
}
|
|
293
|
+
})
|
|
294
|
+
}
|
|
292
295
|
}}
|
|
293
|
-
backgroundColor={LibStyle.colorPrimary}
|
|
296
|
+
backgroundColor={valid ? LibStyle.colorPrimary : LibStyle.colorBgGrey}
|
|
294
297
|
style={{ borderRadius: 5, marginTop: 10 }}
|
|
295
298
|
/>
|
|
296
299
|
</View>
|