ordering-ui-react-native 0.23.42 → 0.23.43

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.23.42",
3
+ "version": "0.23.43",
4
4
  "description": "Reusable components made in react native",
5
5
  "main": "src/index.tsx",
6
6
  "author": "ordering.inc",
@@ -546,7 +546,7 @@ const ChatUI = (props: MessagesParams) => {
546
546
  });
547
547
  let _arrayMessages = [...newMessages.reverse()]
548
548
 
549
- if (configs?.order_logbook_enabled?.value === '0') {
549
+ if (configs?.order_logbook_enabled?.value === '0' && user?.level === 4) {
550
550
  _arrayMessages = _arrayMessages.filter(msg => msg.type !== 1 && msg.type !== 0)
551
551
  }
552
552
  setFormattedMessages(_arrayMessages);
@@ -190,15 +190,13 @@ const MessagesUI = (props: MessagesParams) => {
190
190
  }
191
191
 
192
192
  if (message.type === 0) {
193
- newMessages.push(firstMessage);
194
- }
193
+ newMessages.push(firstMessage);
194
+ }
195
195
  })
196
196
  let _arrayMessages = [...newMessages.reverse()]
197
197
 
198
- if (configs?.order_logbook_enabled?.value === '0') {
199
- _arrayMessages = _arrayMessages.filter(msg => msg.type !== 1 && msg.type !== 0)
200
- }
201
- setFormattedMessages(_arrayMessages);
198
+ _arrayMessages = _arrayMessages.filter(msg => msg.type !== 1 && msg.type !== 0)
199
+ setFormattedMessages(_arrayMessages);
202
200
  }, [messages.messages.length, business, driver])
203
201
 
204
202
  useEffect(() => {
@@ -143,7 +143,7 @@ const ServiceFormUI = (props: ServiceFormParams) => {
143
143
  const valid = busyTimes.some(item => {
144
144
  return (moment.utc(item?.start).local().valueOf() <= moment(selectedMoment).valueOf() &&
145
145
  moment(selectedMoment).valueOf() < moment.utc(item?.end).local().valueOf()) ||
146
- (moment.utc(item?.start).local().valueOf() < moment(selectedMoment).add(duration, 'minutes').valueOf() &&
146
+ (moment.utc(item?.start).local().valueOf() < moment(selectedMoment).valueOf() &&
147
147
  moment(selectedMoment).add(duration, 'minutes').valueOf() < moment.utc(item?.end).local().valueOf())
148
148
  })
149
149
  return valid