From 13e73b9bc0b38dbc81d273c5a58264771af5876e Mon Sep 17 00:00:00 2001 From: Doljinsuren Enkhbayar Date: Tue, 25 Jun 2024 20:32:50 +0800 Subject: [PATCH] fixed priority things --- src/constant/Enum.js | 36 ++++++++++++------------- src/features/Core/screens/ChatScreen.js | 6 +++-- 2 files changed, 22 insertions(+), 20 deletions(-) diff --git a/src/constant/Enum.js b/src/constant/Enum.js index 04e65b5e..563fd050 100644 --- a/src/constant/Enum.js +++ b/src/constant/Enum.js @@ -18,26 +18,26 @@ const IssueCategory = { }; const IssuePriority = { - LOW: 'Low', - MEDIUM: 'Medium', - HIGH: 'High', - CRITICAL: 'Critical', - SCHEDULED_MAINTENANCE: 'Scheduled Maintenance', - OPERATIONAL_SUGGESTION: 'Operational Suggestion', + low: 'Low', + medium: 'Medium', + high: 'High', + critical: 'Critical', + 'scheduled-maintenance': 'Scheduled Maintenance', + 'operational-suggestion': 'Operational Suggestion', }; const Status = { - Pending: 'Pending', - InProgress: 'In Progress', - Backlogged: 'Backlogged', - RequiresUpdate: 'Requires Update', - InReview: 'In Review', - ReOpened: 'Re Opened', - Duplicate: 'Duplicate', - PendingReview: 'Pending Review', - Escalated: 'Escalated', - Completed: 'Completed', - Canceled: 'Canceled', - Pending: 'Pending', + pending: 'Pending', + 'in-progress': 'In Progress', + backlogged: 'Backlogged', + 'requires-update': 'Requires Update', + 'in-review': 'In Review', + 're-opened': 'Re Opened', + duplicate: 'Duplicate', + 'pending-review': 'Pending Review', + escalated: 'Escalated', + completed: 'Completed', + canceled: 'Canceled', }; + export { IssuePriority, IssueType, IssueCategory, Status }; diff --git a/src/features/Core/screens/ChatScreen.js b/src/features/Core/screens/ChatScreen.js index 85a45dcc..2fa77df9 100644 --- a/src/features/Core/screens/ChatScreen.js +++ b/src/features/Core/screens/ChatScreen.js @@ -312,8 +312,10 @@ const ChatScreen = ({ route }) => { ); }; - const checkIsImage = documentType => { - return documentType.content_type.startsWith('image/'); + const checkIsImage = url => { + const imageExtensions = ['jpg', 'jpeg', 'png', 'gif', 'bmp', 'webp']; + const urlExtension = url.split('.').pop().split('?')[0].toLowerCase(); + return imageExtensions.includes(urlExtension); }; const renderBubble = props => {