ordering-ui-react-native 0.17.46 → 0.17.47
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/package.json
CHANGED
|
@@ -468,7 +468,7 @@ const BusinessesListingUI = (props: BusinessesListingParams) => {
|
|
|
468
468
|
<HeaderWrapper
|
|
469
469
|
source={bgHeader ? { uri: bgHeader } : theme.images.backgrounds.business_list_header}
|
|
470
470
|
style={{ paddingTop: top + 20 }}
|
|
471
|
-
resizeMode='
|
|
471
|
+
resizeMode='stretch'
|
|
472
472
|
>
|
|
473
473
|
{!auth && (
|
|
474
474
|
|
|
@@ -60,7 +60,9 @@ export const WrapMomentOption = styled.TouchableOpacity`
|
|
|
60
60
|
|
|
61
61
|
export const HeaderWrapper = styled.ImageBackground`
|
|
62
62
|
width: 100%;
|
|
63
|
-
|
|
63
|
+
height: 5%;
|
|
64
|
+
min-height: 270px;
|
|
65
|
+
max-height: 400px;
|
|
64
66
|
padding: 20px 40px;
|
|
65
67
|
background-color: transparent;
|
|
66
68
|
`;
|
|
@@ -60,7 +60,7 @@ const ServiceFormUI = (props: ServiceFormParams) => {
|
|
|
60
60
|
const [selectDate, setSelectedDate] = useState<any>(new Date())
|
|
61
61
|
const [timeList, setTimeList] = useState<any>([])
|
|
62
62
|
const [isEnabled, setIsEnabled] = useState(false)
|
|
63
|
-
const [timeSelected, setTimeSelected] = useState(null)
|
|
63
|
+
const [timeSelected, setTimeSelected] = useState<string | null>(null)
|
|
64
64
|
const [dateSelected, setDateSelected] = useState<any>(null)
|
|
65
65
|
const [isOpen, setIsOpen] = useState(false)
|
|
66
66
|
const [currentProfessional, setCurrentProfessional] = useState<any>(null)
|
|
@@ -248,6 +248,12 @@ const ServiceFormUI = (props: ServiceFormParams) => {
|
|
|
248
248
|
setCurrentProfessional(professional)
|
|
249
249
|
}
|
|
250
250
|
}, [isCartProduct, professionalListState?.professionals])
|
|
251
|
+
|
|
252
|
+
useEffect(() => {
|
|
253
|
+
if (!productCart?.calendar_event?.start) return
|
|
254
|
+
setSelectedDate(moment.utc(productCart?.calendar_event?.start).local())
|
|
255
|
+
setTimeSelected(moment.utc(productCart?.calendar_event?.start).local().format('HH:mm'))
|
|
256
|
+
}, [productCart])
|
|
251
257
|
|
|
252
258
|
return (
|
|
253
259
|
<>
|
|
@@ -409,7 +415,7 @@ const ServiceFormUI = (props: ServiceFormParams) => {
|
|
|
409
415
|
{(timeList?.length > 0 && isEnabled) ? (
|
|
410
416
|
<SelectDropdown
|
|
411
417
|
ref={dropdownRef}
|
|
412
|
-
|
|
418
|
+
defaultValueByIndex={timeList.findIndex((item: any) => item.value === timeSelected)}
|
|
413
419
|
data={timeList}
|
|
414
420
|
onSelect={(selectedItem, index) => {
|
|
415
421
|
setTimeSelected(selectedItem?.value)
|