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

Modification of Logic #319

Merged
merged 6 commits into from
Apr 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,8 @@ function DownloadResourcePopUp({ selectResource, isOpenDonwloadPopUp, setIsOpenD
// initial load
switch (selectResource) {
case 'bible':
url = `${baseUrl}&subject=Bible&lang=en`;
url = `${baseUrl}&lang=en&subject=${subjectTypeArray.bible[0].name}`;
// setSelectedTypeFilter([subjectTypeArray.bible[0]]);
break;
case 'obs':
url = `${baseUrl}&subject=${subjectTypeArray.obs[0].name}&lang=en`;
Expand Down Expand Up @@ -284,6 +285,7 @@ function DownloadResourcePopUp({ selectResource, isOpenDonwloadPopUp, setIsOpenD

useEffect(() => {
logger.debug('DownloadResourcePopUp.js', 'in useEffect initial load of resource');
setSelectedTypeFilter([]);
fetchResource(false);
// setLoading(true)
// eslint-disable-next-line react-hooks/exhaustive-deps
Expand Down Expand Up @@ -322,7 +324,7 @@ function DownloadResourcePopUp({ selectResource, isOpenDonwloadPopUp, setIsOpenD
/>
</button>
<div className="flex flex-wrap gap-2 mt-2 mb-2">
{selectedLangFilter.map((language, idx) => (
{selectedLangFilter?.map((language, idx) => (
<div
key={idx}
className="flex items-center justify-center gap-2 px-3 py-1 bg-gray-200 rounded-full"
Expand All @@ -341,13 +343,13 @@ function DownloadResourcePopUp({ selectResource, isOpenDonwloadPopUp, setIsOpenD
<CustomMultiComboBox
selectedList={selectedTypeFilter}
setSelectedList={setSelectedTypeFilter}
customData={selectResource === 'bible' ? subjectTypeArray.bible : subjectTypeArray.obs}
customData={selectResource === 'bible' ? subjectTypeArray.bible : [subjectTypeArray.obs]}
placeholder="Select Types"
dropArrow
multiSelect
/>
<div className="flex flex-wrap gap-2 mt-2 mb-2">
{ selectResource === 'bible' && selectedTypeFilter?.map((type, idx) => (
{ selectResource === 'bible' && Array.isArray(selectedTypeFilter) && selectedTypeFilter?.map((type, idx) => (
<div
key={idx}
className="flex items-center justify-center gap-2 px-3 py-1 bg-gray-200 rounded-full"
Expand Down Expand Up @@ -385,7 +387,7 @@ function DownloadResourcePopUp({ selectResource, isOpenDonwloadPopUp, setIsOpenD
className="bg-success leading-loose rounded shadow text-xs px-2 font-base text-white tracking-wide uppercase"
onClick={handleSaveFilter}
>
{t('label-save-filter')}
{t('label-filter')}
</button>
</div>
</div>
Expand Down
1 change: 1 addition & 0 deletions renderer/src/translations/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -280,4 +280,5 @@ export const En = {
'msg-helps-filepath': 'Helps Resource filepath with valid manifest.yaml',
'tooltip-supported-resources': 'supported resources are TN, TW, TQ, TA',
'label-upload-help-resources': 'Upload Help Resources',
'label-filter': 'Filter',
};
1 change: 1 addition & 0 deletions renderer/src/translations/fa.js
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,7 @@ export const Fa = {
'label-check-updates': 'بررسی بروز رسانی ها',
'label-documentation': 'Documentation',
'label-tech-support': 'Tech Support',
'label-filter': 'Filter',
'msg-helps-filepath': 'Helps Resource filepath with valid manifest.yaml',
'tooltip-supported-resources': 'supported resources are TN, TW, TQ, TA',
'label-upload-help-resources': 'Upload Help Resources',
Expand Down
1 change: 1 addition & 0 deletions renderer/src/translations/fr.js
Original file line number Diff line number Diff line change
Expand Up @@ -280,4 +280,5 @@ export const Fr = {
'msg-helps-filepath': 'Vous pouvez mettre en place une ressource rapide pour le serveur manifest.yaml.',
'tooltip-supported-resources': 'les ressources prises en charge sont TN, TW, TQ, TA',
'label-upload-help-resources': 'Télécharger des ressources d\'aide',
'label-filter': 'Filtre',
};
1 change: 1 addition & 0 deletions renderer/src/translations/hi.js
Original file line number Diff line number Diff line change
Expand Up @@ -280,4 +280,5 @@ export const Hi = {
'msg-helps-filepath': 'आप manifest.yaml सर्वर के लिए एक त्वरित संसाधन सेट कर सकते हैं।',
'tooltip-supported-resources': 'समर्थित संसाधन TN, TW, TQ, TA हैं।',
'label-upload-help-resources': 'सहायता संसाधन अपलोड करें',
'label-filter': 'फ़िल्टर',
};
1 change: 1 addition & 0 deletions renderer/src/translations/ne.js
Original file line number Diff line number Diff line change
Expand Up @@ -280,4 +280,5 @@ export const Ne = {
'msg-helps-filepath': 'वैध manifest.yaml सँग संसाधन फाइलपाथलाई मद्दत गर्दछ',
'tooltip-supported-resources': 'समर्थित स्रोतहरू TN, TW, TQ, TA हुन्',
'label-upload-help-resources': 'मद्दत स्रोतहरू अपलोड गर्नुहोस्',
'label-filter': 'फिल्टर',
};
1 change: 1 addition & 0 deletions renderer/src/translations/ru.js
Original file line number Diff line number Diff line change
Expand Up @@ -280,4 +280,5 @@ export const Ru = {
'msg-helps-filepath': 'Помогает найти путь к ресурсу файла с реальным файлом manifest.yaml.',
'tooltip-supported-resources': 'поддерживаемые ресурсы: TN, TW, TQ, TA',
'label-upload-help-resources': 'Загрузить справочные ресурсы',
'label-filter': 'фильтр',
};
Loading