Set owner/multi-user #42
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
_Originally posted by jonaskp86 (assuming @jonaskp) in https://old.reddit.com/r/selfhosted/comments/1hmx314/bricktracker_a_selfhosted_web_app_for_tracking/m3zd1kt/
I kinda like this idea. Currently I'm running three instances (myself, my wife and my son) but it would greatly improve our workflow with just one database.
/add
and/add/bulk
) to select owner of the set./sets/*/details
to show and edit the data.Assumption correct :-)
Just thinking, Probably need to include handling of “joint ownership” sets, most easily by allowing “owner” to be blank I assume.
This is not something I have experienced yet, as my wife is very protective of her Creator Icons buildings, and doesn’t Care for any of my Old Technic stuff :-D
But I am sure lots of people would buy sets together, and then it would be Nice to have some sort of option for it.
I see what you mean. I haven't had the issue myself either, but having the option to leave it blank might be good.
On a side note: This would probably require a proper migration of the database as there are many things wrong that make the code more complex than it should be (tell me about it 🙃).
The tables are missing primary keys, indexes, and the column name are less than explicit and there is a lot of duplicated data in the database. (Same remark for #41)
Alright, I’ll definitely have to read through the sql changes and see about migration to new schema.
I’m by no means an sql expert and figured I had covered most in the initial setup 😁
I made no change to your database structure (https://gitea.baerentsen.space/FrederikBaerentsen/BrickTracker/src/branch/master/bricktracker/sql/migrations/init.sql). I merely worked around it to the best I could. As you can see there is only this file in the
migrations
folder.I moved the queries into SQL files but then again, still based on your initial structure. I wanted it to be a drop-in replacement for your original version.
A framework like
django
has all the database migration baked-in, but since this is usingflask
it is a bit more bare-bones (which is not necessarily a bad thing). Withflask
andsqlite
you can bake in a forward-only lightweight migration system but that will take a bit of code, and some advanced knowledge of SQL.Remember, that at the beginning:
#8 (comment)
I haven't even done that 🙃
I'm testing how to do the SQL migration thingy
Rather than owner being blank, could it support multiple owner tags? That would seem to make more sense if you're trying to filter or search by owners etc
dumb question: currently there is already a custom field option for Checkboxes. could this may be enhanced to support other field types? free text, list choice (with single or multiple choice), ...
because what I see: there is currently a lot of new interst in BrickTracker (myself included), and many have some kind of special request, what they would like to track: owner, set condition, purchase location, purchased price, storage location, ...
with some more custom field types, many of those could be fulfilled at once. :)
@bitkraken The checkbox field is more of a "yes/no" and not a custom label. If you want an "owner" on the set, you would probably have:
Using the current checkbox method, you could add those but it would quickly take up a lot of space.
You could hide them on the main page, but I think what people would enjoy is something like this:
Where the "owner" is a badge.
I think a lot of into could go into the checkboxes though. I'm for example storing into about 'new/used' and 'build/unbuild' in checkboxes, but then hiding them on the main page.
See Checkbox docs for more info.
hey @FrederikBaerentsen thanks for the quick reply. yes, I know about the current usage of the checkbox. my suggestion was to make new custom fields, that have other properties like "customField: freetext" or "customField: selection[A,B,C]".
But looks like the development for the owner badge is already coming together pretty good and I'm probably too late to the party 😆
This was just a mock-up and not actually implemented. But it was how I envisioned it could be implemented.
I think you want too much out of how complex this application is willing to be (hint: not very complex as far as I'm concerned) 😂.
It's built on top of Flask and SQLite which is quite a nightmare it terms of evolving the database model.
I can't dive into the rabbit hole that are custom fields with special presentation as you suggest, that looks very complicated to produce. Also keep in mind that the application is veeeeeeeery static. Having so much data per object would require something more dynamically tied to the backend to make sense 🙂.
🙂
That looks great!
Reworked the grid controls to accomodate a new filter
The owner name is available for the search
Owners when adding
Lightweight "requesters" for wishes (it's quite crude I didn't bother too much, it uses the Set owners)
Implemented in
1.2.0
.Should we open a separate issue to tracker @bitkraken request for custom fields?