Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove facility cover image upload tooltip #8586

Merged
merged 2 commits into from
Oct 1, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions src/Components/Facility/CoverImageEditModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -167,10 +167,6 @@
closeModal();
};

const hasImage = !!(preview || facility.read_cover_image_url);
const imgSrc =
preview || `${facility.read_cover_image_url}?requested_on=${Date.now()}`;

const dragProps = useDragAndDrop();
const onDrop = (e: React.DragEvent<HTMLDivElement>) => {
e.preventDefault();
Expand Down Expand Up @@ -200,11 +196,11 @@
<div className="flex h-full w-full items-center justify-center overflow-y-auto">
{!isCameraOpen ? (
<form className="flex max-h-screen min-h-96 w-full flex-col overflow-auto">
{hasImage ? (
{preview || facility.read_cover_image_url ? (
<>
<div className="flex flex-1 items-center justify-center rounded-lg">
<img
src={imgSrc}
src={preview || facility.read_cover_image_url}
Dismissed Show dismissed Hide dismissed
alt={facility.name}
className="h-full w-full object-cover"
/>
Expand Down
25 changes: 6 additions & 19 deletions src/Components/Facility/FacilityHome.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ export const FacilityHome = ({ facilityId }: Props) => {
const { t } = useTranslation();
const [openDeleteDialog, setOpenDeleteDialog] = useState(false);
const [editCoverImage, setEditCoverImage] = useState(false);
const [coverImageEdited, setCoverImageEdited] = useState(false);
const authUser = useAuthUser();

const {
Expand Down Expand Up @@ -131,20 +130,11 @@ export const FacilityHome = ({ facilityId }: Props) => {
);

const CoverImage = () => (
<>
<img
src={`${facilityData?.read_cover_image_url}`}
alt={facilityData?.name}
className="h-full w-full rounded-lg object-cover"
/>
{coverImageEdited && (
<div className="absolute inset-x-0 bottom-0 w-full rounded-b-md bg-black/70 px-2 pb-0.5 backdrop-blur-sm">
<span className="text-center text-xs font-medium text-secondary-100">
{t("cover_image_updated_note")}
</span>
</div>
)}
</>
<img
src={`${facilityData?.read_cover_image_url}`}
alt={facilityData?.name}
className="h-full w-full rounded-lg object-cover"
/>
);

return (
Expand All @@ -169,10 +159,7 @@ export const FacilityHome = ({ facilityId }: Props) => {
/>
<CoverImageEditModal
open={editCoverImage}
onSave={() => {
facilityFetch();
setCoverImageEdited(true);
}}
onSave={() => facilityFetch()}
onClose={() => setEditCoverImage(false)}
onDelete={() => facilityFetch()}
facility={facilityData ?? ({} as FacilityModel)}
Expand Down
1 change: 0 additions & 1 deletion src/Locale/en/Facility.json
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@
"duplicate_patient_record_rejection": "I confirm that the suspect / patient I want to create is not on the list.",
"duplicate_patient_record_birth_unknown": "Please contact your district care coordinator, the shifting facility or the patient themselves if you are not sure about the patient's year of birth.",
"patient_transfer_birth_match_note": "Note: Year of birth must match the patient to process the transfer request.",
"cover_image_updated_note": "It could take a while to see the updated cover image",
"bed_type__100": "ICU Bed",
"bed_type__200": "Ordinary Bed",
"bed_type__300": "Oxygen Supported Bed",
Expand Down
1 change: 0 additions & 1 deletion src/Locale/hi/Facility.json
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@
"duplicate_patient_record_rejection": "मैं पुष्टि करता हूं कि जिस संदिग्ध/रोगी की सूची मैं बनाना चाहता हूं वह सूची में नहीं है।",
"duplicate_patient_record_birth_unknown": "यदि आप रोगी के जन्म वर्ष के बारे में निश्चित नहीं हैं तो कृपया अपने जिला देखभाल समन्वयक, स्थानांतरण सुविधा या रोगी से संपर्क करें।",
"patient_transfer_birth_match_note": "ध्यान दें: स्थानांतरण अनुरोध पर कार्रवाई करने के लिए जन्म का वर्ष मरीज से मेल खाना चाहिए।",
"cover_image_updated_note": "अपडेट की गई कवर छवि देखने में कुछ समय लग सकता है",
"available_features": "उपलब्ध सुविधाएँ",
"update_facility": "अद्यतन सुविधा",
"configure_facility": "सुविधा कॉन्फ़िगर करें",
Expand Down
1 change: 0 additions & 1 deletion src/Locale/kn/Facility.json
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@
"duplicate_patient_record_rejection": "ನಾನು ರಚಿಸಲು ಬಯಸುವ ಶಂಕಿತ / ರೋಗಿಯು ಪಟ್ಟಿಯಲ್ಲಿಲ್ಲ ಎಂದು ನಾನು ದೃಢೀಕರಿಸುತ್ತೇನೆ.",
"duplicate_patient_record_birth_unknown": "ರೋಗಿಯ ಜನ್ಮ ವರ್ಷದ ಬಗ್ಗೆ ನಿಮಗೆ ಖಚಿತವಿಲ್ಲದಿದ್ದರೆ ದಯವಿಟ್ಟು ನಿಮ್ಮ ಜಿಲ್ಲಾ ಆರೈಕೆ ಸಂಯೋಜಕರು, ಸ್ಥಳಾಂತರ ಸೌಲಭ್ಯ ಅಥವಾ ರೋಗಿಯನ್ನು ಸಂಪರ್ಕಿಸಿ.",
"patient_transfer_birth_match_note": "ಗಮನಿಸಿ: ವರ್ಗಾವಣೆ ವಿನಂತಿಯನ್ನು ಪ್ರಕ್ರಿಯೆಗೊಳಿಸಲು ಹುಟ್ಟಿದ ವರ್ಷವು ರೋಗಿಗೆ ಹೊಂದಿಕೆಯಾಗಬೇಕು.",
"cover_image_updated_note": "ನವೀಕರಿಸಿದ ಕವರ್ ಚಿತ್ರವನ್ನು ನೋಡಲು ಸ್ವಲ್ಪ ಸಮಯ ತೆಗೆದುಕೊಳ್ಳಬಹುದು",
"available_features": "ಲಭ್ಯವಿರುವ ವೈಶಿಷ್ಟ್ಯಗಳು",
"update_facility": "ನವೀಕರಣ ಸೌಲಭ್ಯ",
"configure_facility": "ಸೌಲಭ್ಯವನ್ನು ಕಾನ್ಫಿಗರ್ ಮಾಡಿ",
Expand Down
1 change: 0 additions & 1 deletion src/Locale/ml/Facility.json
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@
"duplicate_patient_record_rejection": "ഞാൻ സൃഷ്ടിക്കാൻ ആഗ്രഹിക്കുന്ന സംശയാസ്പദമായ / രോഗി ലിസ്റ്റിൽ ഇല്ലെന്ന് ഞാൻ സ്ഥിരീകരിക്കുന്നു.",
"duplicate_patient_record_birth_unknown": "രോഗിയുടെ ജനന വർഷത്തെക്കുറിച്ച് നിങ്ങൾക്ക് ഉറപ്പില്ലെങ്കിൽ നിങ്ങളുടെ ജില്ലാ പരിചരണ കോർഡിനേറ്റർ, ഷിഫ്റ്റിംഗ് സൗകര്യം അല്ലെങ്കിൽ രോഗിയെ ബന്ധപ്പെടുക.",
"patient_transfer_birth_match_note": "ശ്രദ്ധിക്കുക: ട്രാൻസ്ഫർ അഭ്യർത്ഥന പ്രോസസ്സ് ചെയ്യുന്നതിന് ജനന വർഷം രോഗിയുമായി പൊരുത്തപ്പെടണം.",
"cover_image_updated_note": "പുതുക്കിയ മുഖചിത്രം കാണാൻ കുറച്ച് സമയമെടുത്തേക്കാം",
"available_features": "ലഭ്യമായ സവിശേഷതകൾ",
"update_facility": "അപ്ഡേറ്റ് സൗകര്യം",
"configure_facility": "സൗകര്യം ക്രമീകരിക്കുക",
Expand Down
1 change: 0 additions & 1 deletion src/Locale/ta/Facility.json
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@
"duplicate_patient_record_rejection": "நான் உருவாக்க விரும்பும் சந்தேக நபர் / நோயாளி பட்டியலில் இல்லை என்பதை உறுதிப்படுத்துகிறேன்.",
"duplicate_patient_record_birth_unknown": "நோயாளியின் பிறந்த ஆண்டு குறித்து உங்களுக்குத் தெரியாவிட்டால், உங்கள் மாவட்ட பராமரிப்பு ஒருங்கிணைப்பாளர், இடமாற்றம் செய்யும் வசதி அல்லது நோயாளியைத் தொடர்பு கொள்ளவும்.",
"patient_transfer_birth_match_note": "குறிப்பு: பரிமாற்றக் கோரிக்கையைச் செயல்படுத்த, பிறந்த ஆண்டு நோயாளியுடன் பொருந்த வேண்டும்.",
"cover_image_updated_note": "புதுப்பிக்கப்பட்ட அட்டைப் படத்தைப் பார்க்க சிறிது நேரம் ஆகலாம்",
"available_features": "கிடைக்கும் அம்சங்கள்",
"update_facility": "மேம்படுத்தல் வசதி",
"configure_facility": "வசதியை உள்ளமைக்கவும்",
Expand Down
Loading