Problem/Motivation

Currently, only users with the admin role can access /admin/config/labor-time/log-report.
It is not possible to grant access to this page to other custom roles (e.g. “Content editor”, “Analyst”, etc.).

It would be very helpful to have proper permissions (via permissions UI on /admin/people/permissions), so that specific roles could be allowed to view and/or approve time records – without needing full admin rights.
For example, so an “Analyst” role could access the report/approval page, but not other admin config.

+ Note :
The log report can currently be filtered only by year.
Would it be possible to add filtering by user, or other criteria ?
Also, paging would be very helpful (e.g. display 50 records per page and “next page” navigation), or making the report available as a View (see my previous feature request - Views integration).

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

    Comments

    coaston created an issue. See original summary.

    tiagoz’s picture

    Version: 1.0.0-alpha5 » 1.0.0-alpha7
    Status: Active » Needs review

    Hi, I have made 2 custom permissions. One to accept time request changes and manage the settings and the other to see the overall time logs from all the users.

    tiagoz’s picture

    Assigned: Unassigned » tiagoz
    coaston’s picture

    Status: Needs review » Needs work

    I am not sure if this change caused that issue, but I believe it worked before but now when I try to reach this page /labor-info/time-log-request ,if it is not related - we can move it to a new issue.

    The website encountered an unexpected error. Try again later.
    
    Error: Object of class Drupal\Core\Entity\Sql\SqlContentEntityStorage could not be converted to string in Drupal\labor_time_tracker\Controller\TimeLogRequestController->dashboard() (line 42 of modules/contrib/labor_time_tracker/src/Controller/TimeLogRequestController.php).
    
    call_user_func_array() (Line: 123)
    Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 634)
    Drupal\Core\Render\Renderer::Drupal\Core\Render\{closure}()
    Fiber->resume() (Line: 649)
    Drupal\Core\Render\Renderer->executeInRenderContext() (Line: 121)
    Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext() (Line: 97)
    Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 183)
    Symfony\Component\HttpKernel\HttpKernel->handleRaw() (Line: 76)
    Symfony\Component\HttpKernel\HttpKernel->handle() (Line: 53)
    Drupal\Core\StackMiddleware\Session->handle() (Line: 48)
    Drupal\Core\StackMiddleware\KernelPreHandle->handle() (Line: 28)
    Drupal\Core\StackMiddleware\ContentLength->handle() (Line: 32)
    Drupal\big_pipe\StackMiddleware\ContentLength->handle() (Line: 118)
    Drupal\page_cache\StackMiddleware\PageCache->pass() (Line: 92)
    Drupal\page_cache\StackMiddleware\PageCache->handle() (Line: 48)
    Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle() (Line: 51)
    Drupal\Core\StackMiddleware\NegotiationMiddleware->handle() (Line: 53)
    Drupal\Core\StackMiddleware\AjaxPageState->handle() (Line: 54)
    Drupal\Core\StackMiddleware\StackedHttpKernel->handle() (Line: 745)
    Drupal\Core\DrupalKernel->handle() (Line: 19)
    
    
    tiagoz’s picture

    Have fixed the issue and added a new user filter as you requested in alpha8

    tiagoz’s picture

    Status: Needs work » Needs review
    coaston’s picture

    Thank you, the issue has disappeared.

    However, during testing of the request log changes, I noticed that the page for approving/rejecting requests
    /admin/config/labor-time/request-list does not have any filters.

    Imagine if 50+ people request changes — it would be a real challenge to determine which ones have already been approved and which have not. Maybe to create an additional tab and move the "already approved" requests there?

    Also, just thinking out loud—a helpful feature would be to add an optional Boolean field and an email address to specify who should be notified about request changes. Sometimes, requests are waiting and admins might not notice them. This notification feature shouldn't be mandatory, but it could be useful.

    However, at the very least, a filter or an additional tab is really needed, if you don't mind.
    Much appreaciated.

    tiagoz’s picture

    Version: 1.0.0-alpha7 » 1.0.0-alpha9
    Status: Needs review » Closed (outdated)

    Now that this issue is closed, review the contribution record.

    As a contributor, attribute any organization that helped you, or if you volunteered your own time.

    Maintainers, credit people who helped resolve this issue.