diff --git a/src/features/Core/screens/ChatsScreen.js b/src/features/Core/screens/ChatsScreen.js
index bcbe25bd..67a1e032 100644
--- a/src/features/Core/screens/ChatsScreen.js
+++ b/src/features/Core/screens/ChatsScreen.js
@@ -94,25 +94,18 @@ const ChatsScreen = () => {
return (
- {isCreatingChat && (
-
-
-
- )}
- {!isCreatingChat && (
- <>
-
-
- navigation.navigate('ChannelScreen')}>
-
- {translate('Core.ChatsScreen.create-channel')}
-
-
-
+ <>
+
+
+ navigation.navigate('ChannelScreen')}>
+
+ {translate('Core.ChatsScreen.create-channel')}
+
+
-
- >
- )}
+
+
+ >
);
};
diff --git a/src/features/Core/screens/IssueScreen.js b/src/features/Core/screens/IssueScreen.js
index dd6140ca..53c4ebd6 100644
--- a/src/features/Core/screens/IssueScreen.js
+++ b/src/features/Core/screens/IssueScreen.js
@@ -1,6 +1,6 @@
import { faTimes } from '@fortawesome/free-solid-svg-icons';
import { FontAwesomeIcon } from '@fortawesome/react-native-fontawesome';
-import { IssuePriority, IssueType, Status } from 'constant/Enum';
+import { IssuePriority, IssueType, Status, IssueCategory } from 'constant/Enum';
import { useDriver, useFleetbase } from 'hooks';
import React, { useEffect, useState } from 'react';
import { ActivityIndicator, Alert, Keyboard, KeyboardAvoidingView, Pressable, Text, TextInput, TouchableOpacity, View } from 'react-native';
@@ -19,7 +19,7 @@ const IssueScreen = ({ navigation, route }) => {
const [driverId] = useState(driver.getAttribute('id'));
const [type, setType] = useState(issue.type);
- const [categories, setCategories] = useState([]);
+ const [categories, setCategories] = useState(getIssueCategories('VEHICLE'));
const [category, setCategory] = useState();
const [priority, setPriority] = useState();
const [status, setStatus] = useState();
@@ -130,7 +130,7 @@ const IssueScreen = ({ navigation, route }) => {
};
const validateInputs = () => {
- if (!type || !category || !priority || !status ||!report?.trim()) {
+ if (!type || !category || !priority || !status || !report?.trim()) {
setError('Please enter a required value.');
return false;
} else if (report.trim().length === 0) {
diff --git a/src/features/Core/screens/IssuesScreen.js b/src/features/Core/screens/IssuesScreen.js
index 6a8f8b9a..a446e736 100644
--- a/src/features/Core/screens/IssuesScreen.js
+++ b/src/features/Core/screens/IssuesScreen.js
@@ -62,7 +62,7 @@ const IssuesScreen = () => {
{translate('Core.IssueScreen.createdAt')}:
- {format(new Date(item.created_at), 'MM/dd/yyyy-- HH:mm')}
+ {format(new Date(item.created_at), 'MM/dd/yyyy HH:mm')}
@@ -92,36 +92,28 @@ const IssuesScreen = () => {
- {isCreatingIssue && (
-
-
-
- )}
-
- {!isCreatingIssue && (
- <>
- }
- data={issues}
- keyExtractor={item => item.id}
- renderItem={renderItem}
- />
-
-
- {
- setIsCreatingIssue(true);
- navigation.navigate('IssueScreen');
- }}>
-
- {translate('Core.IssueScreen.createIssue')}
-
-
-
+ <>
+ }
+ data={issues}
+ keyExtractor={item => item.id}
+ renderItem={renderItem}
+ />
+
+
+ {
+ setIsCreatingIssue(true);
+ navigation.navigate('IssueScreen');
+ }}>
+
+ {translate('Core.IssueScreen.createIssue')}
+
+
- >
- )}
+
+ >
);
};