Skip to content

Commit

Permalink
#1473 | Show label for primary date for encounters
Browse files Browse the repository at this point in the history
  • Loading branch information
1t5j0y committed Nov 1, 2024
1 parent e43462d commit 87c1b2a
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -167,21 +167,22 @@ class PreviousEncounters extends AbstractComponent {
const filledBy = this.getService(UserInfoService).getUserName(encounter.filledByUUID, encounter.filledBy, this.I18n);
const visitName = `${_.isNil(encounter.name) ? this.I18n.t(encounter.encounterType.displayName) : this.I18n.t(encounter.name)}`;
const primaryDate = encounter.encounterDateTime || encounter.cancelDateTime || encounter.earliestVisitDateTime;
const filledByMessageLabel = this.I18n.t(encounter.encounterDateTime ? 'encounterDate' : encounter.cancelDateTime ? 'cancelDate' : 'scheduled');
const filledByMessage = _.isNil(filledBy) ? `${General.toDisplayDate(primaryDate)}` : `${this.I18n.t("byOn", {
user: filledBy,
date: General.toDisplayDate(primaryDate)
})}`;
const secondaryDate = !encounter.isScheduled() ? <Text style={{
fontSize: Fonts.Small,
color: Colors.SecondaryText
}}>{encounter.earliestVisitDateTime && `${this.I18n.t('scheduled')} : ${General.toDisplayDate(encounter.earliestVisitDateTime)}` || this.I18n.t('unplannedVisit')}</Text> :
}}>{encounter.earliestVisitDateTime && `${this.I18n.t('scheduled')}: ${General.toDisplayDate(encounter.earliestVisitDateTime)}` || this.I18n.t('unplannedVisit')}</Text> :
<View/>;
return <View>
<View
style={{flexDirection: 'row', justifyContent: 'space-between', alignItems: 'center', flexWrap: 'wrap'}}>
<View style={{flexDirection: 'column'}}>
<Text style={{fontSize: Fonts.Normal}}>{visitName}</Text>
<Text style={{fontSize: Fonts.Small, color: Colors.SecondaryText}}>{filledByMessage}</Text>
<Text style={{fontSize: Fonts.Small, color: Colors.SecondaryText}}>{filledByMessageLabel}: {filledByMessage}</Text>
{secondaryDate}
</View>
{this.renderStatus(encounter)}
Expand Down
4 changes: 2 additions & 2 deletions packages/openchs-android/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@
"Info": "Info",
"Debug": "Debug",
"individualDashboard": "Dashboard",
"scheduled": "Scheduled",
"scheduled": "Scheduled For",
"total": "Total",
"systemRecommendations": "System Recommendations",
"observations": "Observations",
Expand Down Expand Up @@ -269,7 +269,7 @@
"registrationInformation": "Registration Details",
"registeredOn": "Registered on",
"by": "by {{user}}",
"byOn": "By {{user}} on {{date}}",
"byOn": "{{date}} by {{user}} ",
"you": "You",
"addRelative": "Add Relative",
"noRelativeAdded": "No Relative Added",
Expand Down
4 changes: 2 additions & 2 deletions packages/openchs-android/translations/gu_IN.json
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@
"menu": "મેનુ",
"syncRequired": "સમન્વયન આવશ્યક",
"tryAgain": "ફરીથી પ્રયત્ન કરો",
"scheduled": "અનુસૂચિત",
"scheduled": "મુલાકાત નિયોજિત થયાની તારીખ",
"overdue": "મુદતવીતી",
"completedVisits": "પૂર્ણ",
"enterDate": "તારીખ દાખલ કરો",
Expand Down Expand Up @@ -297,7 +297,7 @@
"rolesNotConfiguredDescription": "સભ્ય ઉમેરવા માટે ભૂમિકાઓ ગોઠવો.",
"registeredOn": "નોંધણી તારીખ",
"by": "દ્વારા: {{user}}",
"byOn": "{{user}} દ્વારા {{date}} પર",
"byOn": "{{date}} દ્વારા: {{user}}",
"disableAutoRefresh": "ડેશબોર્ડ ઓટો રિફ્રેશને અક્ષમ કરો",
"autoRefresh": "ડેશબોર્ડ ઓટો રિફ્રેશ",
"trackLocation": "ટ્રૅક સ્થાન",
Expand Down
4 changes: 2 additions & 2 deletions packages/openchs-android/translations/hi_IN.json
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@
"Info": "जानकारी",
"Debug": "डिबग",
"individualDashboard": "डैशबोर्ड",
"scheduled": "अनुसूचित",
"scheduled": "अनुसूचित तारीख",
"total": "कुल",
"systemRecommendations": "सिस्टम सलाह",
"deleteSchemaConfirmationMessage": "आप उस जानकारी को खो देंगे जो सिंक नहीं किया गया है",
Expand Down Expand Up @@ -350,7 +350,7 @@
"dueChecklist": "ड्यू",
"registeredOn": "पंजीकरण की तारीख",
"by": "द्वारा: {{user}}",
"byOn": "{{user}} द्वारा {{date}} पर",
"byOn": "{{date}} द्वारा: {{user}}",
"disableAutoRefresh": "डैशबोर्ड ऑटो रिफ्रेश को अक्षम करें",
"autoRefresh": "डैशबोर्ड ऑटो रिफ्रेश",
"trackLocation": "ट्रैक स्थान",
Expand Down
4 changes: 2 additions & 2 deletions packages/openchs-android/translations/ka_IN.json
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@
"Info": "ಮಾಹಿತಿ",
"Debug": "ಡೀಬಗ್ ಮಾಡಿ",
"individualDashboard": "ಡ್ಯಾಶ್‌ಬೋರ್ಡ್",
"scheduled": "ನಿಗದಿತ",
"scheduled": "ನಿಗದಿತ ದಿನಾಂಕ",
"total": "ಒಟ್ಟು",
"systemRecommendations": "ಸಿಸ್ಟಮ್ ಶಿಫಾರಸುಗಳು",
"observations": "ಅವಲೋಕನಗಳು",
Expand Down Expand Up @@ -266,7 +266,7 @@
"registeredOn": "ನೋಂದಣಿ ದಿನಾಂಕ",
"you": "ಸ್ವಯಂ",
"by": "ಮೂಲಕ: {{user}}",
"byOn": "ಮೂಲಕ: {{user}} ಮೇಲೆ: {{date}}",
"byOn": "{date}} ಮೂಲಕ: {{user}}",
"addRelative": "ಸಂಬಂಧಿಕರು",
"noRelativeAdded": "ಯಾವುದೇ ಸಂಬಂಧಿತರನ್ನು ಸೇರಿಸಲಾಗಿಲ್ಲ",
"profile": "ವಿವರ",
Expand Down
4 changes: 2 additions & 2 deletions packages/openchs-android/translations/mr_IN.json
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@
"Info": "माहिती",
"Debug": "डीबग करा",
"individualDashboard": "डॅशबोर्ड",
"scheduled": "नियोजित",
"scheduled": "नियोजित तारीख",
"observations": "निरीक्षण",
"deleteSchemaConfirmationMessage": "तुम्हाला सर्व डाटा डीलीट करायचा आहे काय",
"deleteSchemaNoticeTitle": "डाटा डीलीट?",
Expand Down Expand Up @@ -249,7 +249,7 @@
"unplannedVisit": "अनियोजित भेट",
"registeredOn": "नोंदणीची तारीख",
"by": "द्वारे: {{user}}",
"byOn": "{{user}} द्वारे {{date}} वर",
"byOn": "{{date}} द्वारे: {{user}}",
"home": "होम",
"Program": "कार्यक्रम",
"Choose type": "पर्याय निवडा",
Expand Down
4 changes: 2 additions & 2 deletions packages/openchs-android/translations/ta_IN.json
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@
"Info": "தகவல்",
"Debug": "பிழைதிருத்து",
"individualDashboard": "முகப்புத்திரை ",
"scheduled": "திட்டமிடப்பட்டுள்ளது",
"scheduled": "திட்டமிடப்பட்டுள்ள தேதி",
"total": "மொத்தம்",
"systemRecommendations": "முறைமை பரிந்துரைகள்",
"observations": "அவதானிப்புகள்",
Expand Down Expand Up @@ -267,7 +267,7 @@
"registrationInformation": "பதிவு விவரங்கள்",
"registeredOn": "பதிவுத் தேதி",
"by": "மூலம்: {{user}}",
"byOn": "மூலம்: {{user}} அன்று: {{date}}",
"byOn": "{{date}} மூலம்: {{user}} ",
"addRelative": "உறவினர் சேர்க்கவும்",
"noRelativeAdded": "உறவினர் சேர்க்கப்படவில்லை",
"profile": "சுயவிவரம்",
Expand Down

0 comments on commit 87c1b2a

Please sign in to comment.