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

[IDEA] Goal Tracking #10

Closed
TreyWW opened this issue Aug 9, 2023 · 21 comments
Closed

[IDEA] Goal Tracking #10

TreyWW opened this issue Aug 9, 2023 · 21 comments

Comments

@TreyWW
Copy link
Owner

TreyWW commented Aug 9, 2023

Set and monitor financial goals (e.g., saving a certain amount, paying off debt).
Visualize progress towards goals.

@Swish78
Copy link

Swish78 commented Oct 9, 2023

I'm keen to work on the idea. As a newcomer to OpenCourse, I'd greatly appreciate your guidance. Please assign this initiative to me.

@TreyWW
Copy link
Owner Author

TreyWW commented Oct 9, 2023

Hi there @Swish78,

It would be great to get some ideas and progress on "Goal Tracking". So first of all we need the dashboard page for goal tracking, so a basic view for this. And maybe we can collect some reference images / designs we could use for the page.

I'd be happy to tag along with you if you do require any help or want some references too.

I'm interested, what's "OpenCourse"?

Thanks

@Swish78
Copy link

Swish78 commented Oct 9, 2023

I'll begin by creating a basic dashboard view for this and start collecting some reference images and designs.
I apologize for the typo. It was meant to be 'open source' instead of 'OpenCourse.'

@TreyWW
Copy link
Owner Author

TreyWW commented Oct 9, 2023

Ah i see. Great thanks, feel free to post any references here, so if you do require assistance or anyone else would like to help you then they can get a feel for your ideas too. We use tailwind for the design, using a component library RippleUI.

Feel free to reply with what you want to work on, if you don't want to work on it all, and im sure someone (if not myself) will help fill out the rest.

Really appreciate your interest in the project. I'm going to start providing more details in more issues too

@Swish78
Copy link

Swish78 commented Oct 10, 2023

I've created a dashboard template (attached a screenshot). What do you think? Also, I came across 'Shadcn UI,' which looks great for dashboards. Should we consider using it?

Screenshot 2023-10-11 at 01 39 14

@TreyWW
Copy link
Owner Author

TreyWW commented Oct 10, 2023

We currently use RippleUI (tailwind css component library) for our frontend, we dont use react or any frontend system other than tailwind classes unfortunately. I don't think we should change design for certain features, and im not sure whether it'd be worth moving library fully now.

Our current layout in general looks like below:
image

I like the layout + idea for the goals feature though, so that's great! Just wondering if your idea was to change libraries or you just didn't realise we had one already?

All good either way, look forward to hearing back from you

@Swish78
Copy link

Swish78 commented Oct 10, 2023

I'm aware of the use of Tailwind and Ripple, and I've actually used both for the dashboard. I briefly considered 'Shadcn UI' because it seemed well-suited for dashboards, but I understand your point. I'll drop the 'Shadcn' idea. Now that the layout is in place, I'd like to hear your suggestions for the next steps. What would you recommend we work on next for the goal tracking feature?

@TreyWW
Copy link
Owner Author

TreyWW commented Oct 11, 2023

Hiya, okay great. So for the next steps we'd probably want to start with the backend so we can have an idea what more needs to be added to the front end.

So I'd suggest maybe brainstorming some ideas for the database model, things like

Goal name, goal description, goal completed etc.

Then we'd want a main dashboard maybe that displays a brief list of your goals then when you click on one it brings up more details.

Up to you how you decide to make it look or what features, feel free to get creative. If you do need any help for anything or need some ideas do let me know though.

You can also post pictures of your progress here, if you would like, your choice.

Thanks again

@Swish78
Copy link

Swish78 commented Oct 11, 2023

I propose the following backend model structure:

  1. Goal_Title = models.CharField(max_length=50, blank=False)
  2. Goal_Description = models.TextField(editable=True,blank=false)
  3. created_at = models.DateTimeField(default=django.utils.timezone.now)
  4. priority = models.IntegerField(default=0) (This allows users to prioritize tasks)
  5. deadline = models.DateTimeField()
  6. cat_choices = [
    ('h', 'Health'),
    ('p', 'Personal'),
    ('e', 'Entertainment')
    ]
  7. category = models.CharField(max_length=1, choices=cat_choices) // Consider whether to include this feature; it could help users categorize goals.

views.py

def goal_dashboard(request):
    goals = Goal.objects.all().order_by('pk')
    return render(request, 'goals/goal_dashboard.html', {'goals': goals})
   

def goal(request, pk):
    goal = Goal.objects.get(id=pk) 
    return render(request, 'goals/goal.html', {'goal': goal})  

@TreyWW
Copy link
Owner Author

TreyWW commented Oct 11, 2023

I love the idea of categories, maybe could let the user create their own categories in a dropdown (like how in github you can create + assign labels to issues). created_at should probably be
created_at = models.DateTimeField(auto_now=True)
rather than
created_at = models.DateTimeField(default=django.utils.timezone.now)

But apart from that, we could probably get going. That seems like a decent start to the models, i think that'll be a good starting point;

  • add them to the models (maybe update created_at and maybe add category_choices as its own model?)
  • create a frontend templated page of what it would look like
  • start adding a basic backend to load the views with data
  • move all data requests to HTMX (if theres a goal "list")

And that seems like a good start. If you're happy with that, i'm happy too :)

let me know if you need anything

@TreyWW
Copy link
Owner Author

TreyWW commented Oct 24, 2023

Hi @Swish78, any progress, need any help? Just a quick check in

Thanks

@Swish78
Copy link

Swish78 commented Oct 26, 2023

I apologize for the delay in my contributions. I've been quite busy recently, but I'm planning to work on the dashboard utility soon. I appreciate your offer of help, and I'll reach out if I need any assistance during the development process.

Thanks for your understanding and support.

@TreyWW
Copy link
Owner Author

TreyWW commented Oct 26, 2023

Thanks @Swish78 for the message back. That's fine! Take your time, let me know how it goes

@Swish78
Copy link

Swish78 commented Oct 27, 2023

I have rendered the following model structure based on our previous discussion :

class Category(models.Model):
    name = models.CharField(max_length=50, unique=True)

    def __str__(self):
        return this.name

class Goal(models.Model):
    title = models.CharField(max_length=50, blank=False)
    description = models.TextField(editable=True, blank=False)
    created_at = models.DateTimeField(auto_now=True)
    priority = models.IntegerField(default=0)
    deadline = models.DateTimeField()
    category = models.ForeignKey(Category, on_delete=models.SET_NULL, null=True)

    def __str__(self):
        return this.title

I'm encountering a "ModuleNotFoundError: No module named 'environ'" issue. I've already tried installing it manually, but the error persists.

@TreyWW
Copy link
Owner Author

TreyWW commented Oct 27, 2023

You'll get that error from having pip install environ,
What you we need is pip install django-environ. You may be able to
pip remove or pip uninstall it.
I'd suggest pip install -r requirements.txt

@Swish78
Copy link

Swish78 commented Oct 27, 2023

Thanks for the advice. I did try 'pip install -r requirements.txt' initially, but the error persisted. I then attempted 'pip install django-environ,' but the issue still remains.

@TreyWW
Copy link
Owner Author

TreyWW commented Oct 27, 2023

Oh yikes, are you running this from pycharm or a virtual environment? I believe for Django to work on its own you need some sort of virtual environment. Let me know if you don't I'll help you get started

@Swish78
Copy link

Swish78 commented Oct 27, 2023

I'm running this from PyCharm. Okay, I will try again by creating a virtual environment.

@TreyWW
Copy link
Owner Author

TreyWW commented Oct 27, 2023

I'd suggest following our SETUP GUIDE, it covers pycharm quite well i'd say!

@Swish78
Copy link

Swish78 commented Nov 1, 2023

Hi, I was wondering which charts I should include on a goal-specific dashboard.

I’ve tried following the setup guide but still encountered the same issue. For now, I’m focusing on completing the work of adding the dashboard’s backend and frontend.
I apologize for not providing you with regular updates.

@TreyWW
Copy link
Owner Author

TreyWW commented Nov 1, 2023

Hey, that's odd that you're still getting the error about environ. You may be able to fix it by following this:

image
image

You need to make sure "environ" is not installed. After that make sure django is installed under the virtual environment and then you can "install" django-environ

As for the goal dashboard that's okay, it'll be much easier once you can see your progress on the site so it's okay if not much progress is made. Charts can be held off until we get data inputs if you wish

We could use something like chart.js web/django_package. I don't really mind. But about the actual graph types, again not too sure, will be easier to decide that once the page starts to get some normal inputs/info if that's okay

Sorry about the long wait, i forgot to send the message this morning

@TreyWW TreyWW closed this as not planned Won't fix, can't repro, duplicate, stale Jul 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Archived in project
Development

No branches or pull requests

2 participants