Open kulturbande opened 2 years ago
You can check this code as example (color chooser): https://github.com/kevinpapst/kimai2/blob/master/assets/js/plugins/KimaiFormSelect.js#L124
I guess the code cannot be re-used, because the data project collection uses the color
field.
And this activates the color renderer: https://github.com/kevinpapst/kimai2/blob/master/src/Form/Type/ColorChoiceType.php#L77
Should be supported in all fields: https://github.com/kevinpapst/kimai2/blob/master/src/Form/Type/ActivityType.php https://github.com/kevinpapst/kimai2/blob/master/src/Form/Type/ProjectType.php https://github.com/kevinpapst/kimai2/blob/master/src/Form/Type/CustomerType.php
Thx for the hint. Currently I have some trouble to get Symfony deliver the newly created assets, but I will figure that out. I will provide a PR for that feature.
Hey, sorry, I don't get it. I have my system up and running and looked into the code, but I have not idea how the different form types are rendered. I tried to add a color data - attribute, but it doesn't worked out. Do you have more hints for me?
Share what you have tried and we can talk about it.
I tried multiple things:
form_row(form.customer)
will be resolved: https://github.com/kevinpapst/kimai2/blob/master/templates/timesheet/layout-edit.html.twig#L46Thats it. I want to find out how to decorate the select option / or the Select2 related options with some kind of data-color attribute, that could then be shown.
Is your feature request related to a problem? Please describe. I have several Projects that have the same name but different hourly rates. For that reason I use a color code to make easier, which is working fine in the timesheet view. But it is confusing if I'm creating the timesheet entry, because the projects have the same name in the current select2 component.
Describe the solution you'd like I would like to add a colored dot before the name on all entities that supports a color (Customer, Project, etc.).
Describe alternatives you've considered A custom CSS or an own plugin to patch the behavior.
Screenshot![Aufnahme 2022-01-30 at 22 18 39@2x](https://user-images.githubusercontent.com/68833/151718368-ea089034-9da1-4324-9eb0-c62eaca3a1a6.png)
I already forked the project and was trying to add these function. I currently try to figure out how to use the webpack version in my Kimai Docker Setup.