Recurring tasks

Open to all! Ask other shopowners for help.
User avatar
Kofod95
Senior Contributor
Posts: 748
Joined: Sat Feb 06, 2021 7:38 pm
Phoenix Version: 1.0.8.20
Has thanked: 99 times
Been thanked: 179 times

Re: Recurring tasks

Post by Kofod95 »

heatherbell wrote: Wed Nov 22, 2023 5:53 am My comment was only as food for thought and not feature request ;)
And I'm very thankful for it - my mind surely has a larger need of food than my body anyway ;)
I made something similar a while back to allow different users to have personal notes. Every note would display to all by default, but the when creating and editing you could choose between all admin users whether they should be able to see the note or not. One admin had the option to view all. This is just to say that some of the things you mention might not be too complicated, but I would have to figure out how to do it without custom tailoring too much to a specific set-up, while I also don't want to litter table.configuration with settings (or create alternatives for every add-on) - it's a balancing game, I think, and I must become smarter, so all food for thought is good :)
heatherbell wrote: Wed Nov 22, 2023 5:53 am Further down the rabbit hole, have you thought about extending this addon to a kanban style to show workflow? :shock: :o
Had to google kanban -> And I have to do some more reading to dive into that rabbit-hole :D
-Looks interesting, though, and quite useful. Whatever helped make the Corolla has to be good!
heatherbell wrote: Wed Nov 22, 2023 5:53 am Maybe change Description and Popover to enable HTML like Title?
I wanted to do that originally, but gave up too quickly.
Now enabled with data-html="true" in the popover anchor.

Thank you very much for the feedback and clarification of the rabbit-hole you pointed out! I sincerely appreciate it!

Pierre_P wrote: Wed Nov 22, 2023 7:02 am Assigning task to different users and recording which user done the task will be great addition.
For multiple admin users not all admins performs the same tasks.
Thank you for that, it seems that it's worth the time diving into the rabbit-hole at some point. I'll see what time allows :)
I really appreciate you taking the time to look into it and comment!

burt wrote: Wed Nov 22, 2023 10:11 am 1. Get rid of recurrence ratio, and simply have it as "how often to recur (days)". Allowing user to insert any number here. Maybe someone needs to do something every 2 days? Might be too much of a recode in the logic. Then again how granular to go ? Maybe something needs doing every hour!
I considered something like that, but the problem is that the ones I've built it for (my former boss and myself) need it to always make something appear at the beginning of a month (and week). I couldn't figure out how to that with generic inputs, so had to hard-code the ratios and try to include enough to make it useable for most. And yeah, every hour is not something I want to enable, though the currenct logic could do it without too much effort :lol:
burt wrote: Wed Nov 22, 2023 10:11 am 2. Entirely get rid of the "pressing the button beneath" and "Remove" button. Too easy to accidentally click. Keep the delete action though and when someone wants to nuke it, they could be pointed at the relevant URL (ie they type in the browser bar).
Probably wise!
I debated whether to include another action to confirm action=remove, just to safeguard a little bit, but decided against it, as it felt like too little gain. I'll probably remove the button and just leave the link in the readme.
burt wrote: Wed Nov 22, 2023 10:11 am 3. Not sure if this is my installation (localhost, not real webhost) but the checkbox in the dashboard module, seems to do nothing. Changing /includes/hooks/admin/index/tasks.php:15 to

Code: Select all

public function listen_injectBodyEnd() {
solves it.
Curios.
What other stuff do you have on the install? I have sometimes had troubles with loading multiple scripts in siteEnd, but I don't know enough to know why or how to solve it.
I don't see any reason not to switch to BodyEnd, but if the real problem is in my JS (as incompability with other JS) I would rather solve that
burt wrote: Wed Nov 22, 2023 10:11 am 4. Make newly installed dashboard module default to 6 width (I think it's 4 in the module)
Is it a better practice, or is it for aestethics?
I made it more narrow to simulate a post-it and to not take too much horisontal space on the screen, as the nature of the module will stretch vertically.
burt wrote: Wed Nov 22, 2023 10:11 am 5. I also swapped some code around (dashboard module) for a "to my eyes" easier to read display;
You are a lot better with layout than I am! Never even thought of using the FA-icon for the link.
I replicated your layout to try and learn; thank you for sharing it!

And thank you very much for all the feedback and advise!
Some things I already implemented, some I will have to think about, but I'm very grateful for all the input shared here!

Version 1.0.3 uploaded with error on admin/login.php fixed, Burt's layout on the dashboard-module, uninstall-button removed and new instructions added to the readme.

//Daniel
I'm not smart, but sometimes even a blind chicken can find a corn.
Here are a lot of corns: Phoenix user guide

Tags:


Join The Code Co-op to get access to your library in the Code Co-op Forum
Fiber
Contributor
Posts: 173
Joined: Mon Oct 26, 2020 12:16 pm
Phoenix Version: v1.1.0.6
Has thanked: 17 times
Been thanked: 27 times

Re: Recurring tasks

Post by Fiber »

Kofod95 wrote: Thu Nov 23, 2023 9:18 am I wanted to do that originally, but gave up too quickly.
Now enabled with data-html="true" in the popover anchor.
Testing with Title and description see screen task admin and dashboard
Image

Image

I have also when i tick the box nothing happens? refresh page and the task is done

@new local install from latest 10.0.8.21
Turn up the Max
User avatar
burt
Core Team
Posts: 4546
Joined: Tue Oct 29, 2019 9:37 am
Phoenix Version: v1.1.0.8
Has thanked: 252 times
Been thanked: 412 times

Re: Recurring tasks

Post by burt »

burt wrote: Wed Nov 22, 2023 10:11 am 3. Not sure if this is my installation (localhost, not real webhost) but the checkbox in the dashboard module, seems to do nothing. Changing /includes/hooks/admin/index/tasks.php:15 to

Code: Select all

public function listen_injectBodyEnd() {
solves it.
@Fiber - please try this change as it solved the tickbox for me.
User avatar
burt
Core Team
Posts: 4546
Joined: Tue Oct 29, 2019 9:37 am
Phoenix Version: v1.1.0.8
Has thanked: 252 times
Been thanked: 412 times

Re: Recurring tasks

Post by burt »

Kofod95 wrote: Thu Nov 23, 2023 9:18 am Curios.
What other stuff do you have on the install?
Clean installation of 1.0.8.21 (latest dev branch)..
Is it a better practice, or is it for aestethics?
Aesthetics. At "4" the other boxes are out of sync.
heatherbell
Senior Contributor
Posts: 2540
Joined: Mon Oct 07, 2019 4:39 am
Phoenix Version:
Has thanked: 35 times
Been thanked: 243 times

Re: Recurring tasks

Post by heatherbell »

burt wrote: Thu Nov 23, 2023 3:17 pmsolved the tickbox for me.
Works as expected with no need for fix for me.
Why the different behaviour? :puzzled:
ecartz
Core Team
Posts: 3084
Joined: Tue Nov 05, 2019 6:02 pm
Phoenix Version:
Has thanked: 4 times
Been thanked: 208 times

Re: Recurring tasks

Post by ecartz »

Different browsers maybe?
Fiber
Contributor
Posts: 173
Joined: Mon Oct 26, 2020 12:16 pm
Phoenix Version: v1.1.0.6
Has thanked: 17 times
Been thanked: 27 times

Re: Recurring tasks

Post by Fiber »

burt wrote: Thu Nov 23, 2023 3:17 pm @Fiber - please try this change as it solved the tickbox for me.
I had seen that, but thought that it had been implemented in recurringTasks_1_0_3 and did not check whether that was the case, just did that, but unfortunately that does not work for me...very strange.
to rule out that it could be a browser problem, tried three browsers Chrome, FF, Edge.
Turn up the Max
User avatar
Kofod95
Senior Contributor
Posts: 748
Joined: Sat Feb 06, 2021 7:38 pm
Phoenix Version: 1.0.8.20
Has thanked: 99 times
Been thanked: 179 times

Re: Recurring tasks

Post by Kofod95 »

Fiber wrote: Thu Nov 23, 2023 1:37 pm Testing with Title and description see screen task admin and dashboard
Hmm... I can't replicate that display-issue.
Anyone else having the same?
Could you, @Fiber, please send the source-code you get?

I have looked through carefully to see if I had missed closing something again, but I can't find it.

Fiber wrote: Thu Nov 23, 2023 5:45 pm [...], but unfortunately that does not work for me...very strange.
to rule out that it could be a browser problem, tried three browsers Chrome, FF, Edge.
And
burt wrote: Thu Nov 23, 2023 3:21 pm Clean installation of 1.0.8.21 (latest dev branch)..
Makes me wonder if I should just go with a regular form instead with onchange="this.form.submit()" and have the logic to complete the task in the module. I went with this AJAX-type approach to try and learn how to do it, but it seems like it's causing too many problems. However, I like the seamless completion of tasks, so if possible, I would like to avoid using a regular form.
Do you have the script in the source-code, @Fiber? And are there any errors in the browser log?

I'm using PhoenixCart 1.0.8.20 on Chrome Version 119.0.6045.160 without any trouble with any of the positions.
I haven't moved the hook to another listener yet, as I want to make sure it's the right thing to do, and the fact that Fiber is having trouble on BodyEnd is annoying (in lack of a better word)

//Daniel
I'm not smart, but sometimes even a blind chicken can find a corn.
Here are a lot of corns: Phoenix user guide
ecartz
Core Team
Posts: 3084
Joined: Tue Nov 05, 2019 6:02 pm
Phoenix Version:
Has thanked: 4 times
Been thanked: 208 times

Re: Recurring tasks

Post by ecartz »

Kofod95 wrote: Thu Nov 23, 2023 7:47 pm this AJAX-type approach
form.submit() is not asynchronous, so not AJAX.

AJAX: https://stackoverflow.com/a/31976165/6660678

It's possible that actual AJAX might get around some of the problems that you're having with your current approach.
User avatar
Kofod95
Senior Contributor
Posts: 748
Joined: Sat Feb 06, 2021 7:38 pm
Phoenix Version: 1.0.8.20
Has thanked: 99 times
Been thanked: 179 times

Re: Recurring tasks

Post by Kofod95 »

ecartz wrote: Thu Nov 23, 2023 10:13 pm form.submit() is not asynchronous, so not AJAX.
I may have been unclear; I don't use form.submit() now, but am considering switching to it.
Currently I use XMLHttpRequest in includes/hooks/admin/index/checkTask.php
However, the visuals are just styles added to the elements

//Daniel
I'm not smart, but sometimes even a blind chicken can find a corn.
Here are a lot of corns: Phoenix user guide


Join The Code Co-op to get access to your library in the Code Co-op Forum
Post Reply