ordering-ui-react-native 0.17.46 → 0.17.48

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ordering-ui-react-native",
3
- "version": "0.17.46",
3
+ "version": "0.17.48",
4
4
  "description": "Reusable components made in react native",
5
5
  "main": "src/index.tsx",
6
6
  "author": "ordering.inc",
@@ -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='cover'
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
- height: 270px;
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
- defaultValue={timeSelected}
418
+ defaultValueByIndex={timeList.findIndex((item: any) => item.value === timeSelected)}
413
419
  data={timeList}
414
420
  onSelect={(selectedItem, index) => {
415
421
  setTimeSelected(selectedItem?.value)
@@ -34,10 +34,12 @@ export const OTabs = styled.View`
34
34
  flex-direction: row;
35
35
  width: 100%;
36
36
  flex-wrap: wrap;
37
+ padding-vertical: 5px;
37
38
  `;
38
39
 
39
40
  export const OTab = styled.View`
40
41
  padding-horizontal: 10px;
42
+ padding-vertical: 10px;
41
43
  `;
42
44
 
43
45
  export const LoyaltyContent = styled.View`