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

Feature/timesheet dashboard #53

Merged
merged 3 commits into from
Jan 25, 2023

Conversation

mihaisolomon
Copy link
Collaborator

No description provided.

@mihaisolomon
Copy link
Collaborator Author

@heloufir Take a look over this. That error should be gone.

@mihaisolomon
Copy link
Collaborator Author

Added a table instead of a view for the time logged

image

@heloufir
Copy link
Contributor

heloufir commented Jan 25, 2023

Added a table instead of a view for the time logged

image

That looks better, but I think the Ticket column is not needed, because this table will be visible inside a Ticket view, so all the rows are linked to the shown ticket.

@heloufir heloufir merged commit e7ad282 into devaslanphp:master Jan 25, 2023
@heloufir
Copy link
Contributor

heloufir commented Jan 25, 2023

@mihaisolomon
yep the first error is resolved, but I got another like I have said in the issue #29

image

https://flareapp.io/share/Bm0BJyW7

I think the activity is null, and it need to be checked with a condition like below:

foreach ($collection as $item) {
    if ($item->activity) { // <- HERE
        $datasets['sets'][] = $item->value;
        $datasets['labels'][] = $item->activity->name;
    } // <- HERE
}

Or better, because I logged my time without linking it to any activity,

foreach ($collection as $item) {
    $datasets['sets'][] = $item->value;
    $datasets['labels'][] = $item->activity?->name ?? __('No activity');
}

Here is the dd of my collection:
image

@heloufir heloufir linked an issue Jan 25, 2023 that may be closed by this pull request
6 tasks
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.

Timesheet component missing features
2 participants