display country flag along with item name

This commit is contained in:
Flatlogic Bot 2025-06-02 18:25:06 +00:00
parent eb182a210f
commit 4ebec43bdd
5 changed files with 43 additions and 4 deletions

5
.gitignore vendored
View File

@ -1,3 +1,8 @@
node_modules/
*/node_modules/
*/build/
**/node_modules/
**/build/
.DS_Store
.env

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
{}

View File

@ -3,6 +3,8 @@ import Link from 'next/link';
import moment from 'moment';
import ListActionsPopover from '../ListActionsPopover';
import { DragSourceMonitor, useDrag } from 'react-dnd';
import countryFlags from './countryFlags';
type Props = {
item: any;
@ -42,6 +44,7 @@ const KanbanCard = ({
href={`/${entityName}/${entityName}-view/?id=${item.id}`}
className={'text-base font-semibold'}
>
{countryFlags[item.country] ? `${countryFlags[item.country]} ` : ''}
{item[showFieldName] ?? 'No data'}
</Link>
</div>

View File

@ -0,0 +1,31 @@
const countryFlags: { [key: string]: string } = {
Germany: '๐Ÿ‡ฉ๐Ÿ‡ช',
France: '๐Ÿ‡ซ๐Ÿ‡ท',
Spain: '๐Ÿ‡ช๐Ÿ‡ธ',
Italy: '๐Ÿ‡ฎ๐Ÿ‡น',
Netherlands: '๐Ÿ‡ณ๐Ÿ‡ฑ',
Belgium: '๐Ÿ‡ง๐Ÿ‡ช',
Sweden: '๐Ÿ‡ธ๐Ÿ‡ช',
Poland: '๐Ÿ‡ต๐Ÿ‡ฑ',
Romania: '๐Ÿ‡ท๐Ÿ‡ด',
Portugal: '๐Ÿ‡ต๐Ÿ‡น',
Ireland: '๐Ÿ‡ฎ๐Ÿ‡ช',
Greece: '๐Ÿ‡ฌ๐Ÿ‡ท',
'Czech Republic': '๐Ÿ‡จ๐Ÿ‡ฟ',
USA: '๐Ÿ‡บ๐Ÿ‡ธ',
UK: '๐Ÿ‡ฌ๐Ÿ‡ง',
'United Kingdom': '๐Ÿ‡ฌ๐Ÿ‡ง',
'United States': '๐Ÿ‡บ๐Ÿ‡ธ',
Canada: '๐Ÿ‡จ๐Ÿ‡ฆ',
Australia: '๐Ÿ‡ฆ๐Ÿ‡บ',
Brazil: '๐Ÿ‡ง๐Ÿ‡ท',
Argentina: '๐Ÿ‡ฆ๐Ÿ‡ท',
Mexico: '๐Ÿ‡ฒ๐Ÿ‡ฝ',
Chile: '๐Ÿ‡จ๐Ÿ‡ฑ',
India: '๐Ÿ‡ฎ๐Ÿ‡ณ',
Pakistan: '๐Ÿ‡ต๐Ÿ‡ฐ',
};
export default countryFlags;