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

Add user settings to remember the last/favourite label template #4938

Merged

Conversation

martonmiklos
Copy link
Contributor

Fixes #4932

null,
function(item) {
if (options.key == 'part')
return item.pk == "{{ default_part_template_pk }}";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can access user settings directly, this might be more readable as:

return item.pk == user_settings.DEFAULT_LOCATION_LABEL_TEMPLATE;

@SchrodingersGat
Copy link
Member

JS linting is failing because you can't use settings_value in a translated file - the translated file will no longer have access to any templated values :)

@SchrodingersGat
Copy link
Member

LGTM, thanks for the contribution @martonmiklos

@SchrodingersGat SchrodingersGat merged commit 46a808c into inventree:master Jun 1, 2023
12 checks passed
@SchrodingersGat SchrodingersGat added this to the 0.12.0 milestone Jun 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FR]Add option to remember the last used label type
2 participants