-
Notifications
You must be signed in to change notification settings - Fork 0
Generalization #7
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
base: main
Are you sure you want to change the base?
Conversation
…on input layer and mappings
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@alifarooq93 We definitely need to make this generic as well. Maybe via handlebar and tiptap editor (like in our internal project) or via simple datastructure
type PopupConfig = {
titleProp: string;
details?: {
label: string;
prop: string;
}[];
}
For the current dataset it would the be as
const popupConfig: PopupConfig = {
titlePorp: 'BADEGEWAESSERNAME',
details: [
{ label: t('quality'), prop: 'EINSTUFUNG_ODER_VORABBEWERTUNG' },
{ label: t('category'), prop: 'GEWAESSERKATEGORIE' },
{ label: t('depth'), prop: 'SICHTTIEFE' },
{ label: t('seasonal'), prop: 'SAISONBEGINN' }, // need o figure out how we can add SAISONENDE and GESCHLOSSEN
{ label: t('infrastructure'), prop: 'INFRASTRUKTUR' },
]
}
defineProps([ | ||
'dateGroup', | ||
'dateOptions', | ||
'selectedIndex', | ||
'selectedDate', | ||
'isSmallScreen', | ||
]); | ||
|
||
defineEmits(['update:selectedIndex']); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@alifarooq93 We should use the typescript safe definitions. See https://vuejs.org/guide/typescript/composition-api#typing-component-props and https://vuejs.org/guide/typescript/composition-api#typing-component-emits
@@ -0,0 +1,33 @@ | |||
const yearColors = ['#3B82F6', '#10B981', '#8B5CF6', '#F59E0B', '#EF4444']; | |||
|
|||
export function getDatesGroups(fetchedData: any) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@alifarooq93 Do we have a simple chance to avoid the any
and use proper type definitions.
This is a global question.
"chartX": "Datum", | ||
"chartY": "Tiefe (m)", | ||
"chartTitle": "Tiefe für", | ||
"chartLegend": "Tiefe im Zeitverlauf", | ||
"chartEmpty": "Es sind keine Tiefenangaben verfügbar für" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@alifarooq93 The translation does not fit to the keys. So please adjust the keys so that it is clear that they are lake specific
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@alifarooq93 What we actually wanted to achieve is that we one generic fetching logic for all configured input layers. So that we don't need to implement something for new use cases
More structured and generalized code with