Giter Club home page Giter Club logo

Comments (6)

Anrolosia avatar Anrolosia commented on June 19, 2024

Hello!

Could you provide an example in Grocy on your custom field? And you'd like that field to be able in card configuration to specify sort, correct?

Thanks

from shopping-list-with-grocy.

yordanov-alexandar avatar yordanov-alexandar commented on June 19, 2024

In Grocy -> Manage master data -> Userfields I have added a userfield with Entity: products, Name: customsort, Caption: Custom sort, Type: Number(decimal) and Show as column in tables: checked
After that I have a new field in the edit product dialog in which I enter some integer depending on how frequently I use this product
Yes I would like that field to be able to be specified as a sort in card configuration so I can have my most frequently used products on top.
The name of the field is of course not important and if you want to standardize a name and map only that name in the sensor (to avoid performance problems with many products and many custom fields) that would also work.
Thank you

from shopping-list-with-grocy.

Anrolosia avatar Anrolosia commented on June 19, 2024

Got it, thanks, I'll work on that :)

from shopping-list-with-grocy.

Anrolosia avatar Anrolosia commented on June 19, 2024

I created version 0.10.0 to integrate that, let me know if it works as intended on your side :)
https://github.com/Anrolosia/Shopping-List-with-Grocy#custom-products-userfields

from shopping-list-with-grocy.

yordanov-alexandar avatar yordanov-alexandar commented on June 19, 2024

It's working great :)
Thank you
You might want to change the example to

sort:
  method: attribute
  attribute: userfields:customsort
  numeric: true 

to make sure the field is treated as a number and sorted correctly - in the example the field in Grocy is type Number(decimal) so for consistency the sort field should be treated as a number too.

from shopping-list-with-grocy.

Anrolosia avatar Anrolosia commented on June 19, 2024

You're definitely right! I updated the documentaton.
Happy to know it's working, I will close the ticket :) Happy grocery!

from shopping-list-with-grocy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.