Home Forums Support User Dashboard

This topic contains 16 replies, has 4 voices, and was last updated by  acetech 2 months, 1 week ago.

Viewing 17 posts - 1 through 17 (of 17 total)
  • Author
    Posts
  • #19078

    acetech
    Participant

    Hi Guys,

    Was wondering I know you can customise the client portal, I wanted to know if you can customise a user portal.
    To remove the dashboards or set it to 0 for the users.

    Is this possible?

    #19079

    Hillel Coren
    Keymaster

    If you’re self hosting it should be possible to adjust the code.

    #19080

    acetech
    Participant

    cool, yes I am I have white labeled version.
    Where should I change the code, and what needs to be updated?
    Still learning my way around the system, or what config file should I look at?

    #19081

    Hillel Coren
    Keymaster

    This would require code changes, not config changes.

    Not sure where exactly but here’s a starting point…

    resources/views/invited/dashboard.blade.php

    #19082

    acetech
    Participant

    Thanks Hilel,

    Will edit and test accordingly, last question with upgrades I suppose I would have to complete the changes every time the upgrade is done re-edit dashboard.blade.php? am I correct

    #19083

    Hillel Coren
    Keymaster

    That is correct

    #19091

    Titanfail
    Participant

    There’s a bit of a clunky way to not have to re-edit dashboard.blade.php every time. If you’re using the update script, and you’re not changing too many lines in dashboard.blade.php, you can add a couple find/replace commands before the end of the case block.

    grep -rlZF "<STRING_TO_MATCH>" "$ninja_home/resources/views/invited/dashboard.blade.php" | xargs -0r perl -pi -e "s/<STRING_TO_MATCH>/<REPLACEMENT_STRING>/g;"

    You’d need to add and customize one for each line you changed, but it should work. I do that in mine to make sure 'SESSION_EXPIRE_ON_CLOSE' is set to false in config/session.php after every update.

    #19116

    acetech
    Participant

    thank you, will definitely give it go and provide and feedback.

    #19131

    billyggla
    Participant

    In resources/views/dashboard.blade.php

    use the code that is already there, if user has permission admin
    @if (Auth::user()->hasPermission('admin'))

    Wrap it around the stuff you want to hide and as long as the user is not an admin they wont see it.

    #19138

    acetech
    Participant

    thank you billyggla,

    Will definitely give it a try was just wrapping up some testing with the QR code on the invoice which I got to work.
    Next up dashboard customization.

    Thanks guys for the suggestions, will keep you posted.

    #19327

    acetech
    Participant

    Hi Guys, so finally have a chance to look at the customisation,

    I had a look at resources/views/invited/dashboard.blade.php,
    When I use the developer tools in chrome i see it looking at this

    What I see in the dashboard.blade.php:

    @if (Auth::user()->hasPermission(‘admin’))
    @else
    {{ $account->name}}
    @endif

    Am I looking at the wrong dashboard.php page?
    As I would like to implement Billyggla solution, but need some help.
    Remove the dashboard for specific users?

    #19328

    billyggla
    Participant

    /invited/dashboard.blade.php is the client dashboard.

    Try /views/dashboard.blade.php

    #19332

    acetech
    Participant

    thank you billyggla, will have a look and post an update

    #19333

    acetech
    Participant

    Ok, so found where i Need to add the code

    as suggested by billyggla : /views/dashboard.blade.php

    @if (Auth::user()->hasPermission(‘admin’)) —> soon as I add this piece of code
    function loadData() {
    var includeExpenses = “{{ $showExpenses ? ‘true’ : ‘false’ }}”;

    I get the error when I reload the user portal
    Parse error: syntax error, unexpected end of file, expecting elseif (T_ELSEIF) or else (T_ELSE) or endif (T_ENDIF) (View: /home/acetechc/demobilling.ace-tech.co.za/resources/views/dashboard.blade.php)

    in 8376a1411489560cd188cab9e6fd00208d2f41b7.php (line 623)
    at CompilerEngine->handleViewException(object(FatalThrowableError), 0)
    in PhpEngine.php (line 46)
    at PhpEngine->evaluatePath(‘/home/acetechc/demobilling.ace-tech.co.za/storage/framework/views/8376a1411489560cd188cab9e6fd00208d2f41b7.php’, array(‘__env’ => object(Factory), ‘app’ => object(Application), ‘errors’ => object(ViewErrorBag), ‘account’ => object(Account), ‘user’ => object(User), ‘paidToDate’ => object(Collection), ‘balances’ => object(Collection), ‘averageInvoice’ => object(Collection), ‘invoicesSent’ => ‘4’, ‘activeClients’ => 2, ‘activities’ => object(Collection), ‘pastDue’ => object(Collection), ‘upcoming’ => object(Collection), ‘payments’ => object(Collection), ‘title’ => ‘Dashboard’, ‘hasQuotes’ => false, ‘showBreadcrumbs’ => false, ‘currencies’ => array(‘ZAR’), ‘expenses’ => object(Collection), ‘tasks’ => object(Collection), ‘showBlueVinePromo’ => false, ‘showWhiteLabelExpired’ => false, ‘showExpenses’ => false, ‘headerClass’ => ‘in-thin’, ‘footerClass’ => ‘in-thin’))
    in CompilerEngine.php (line 59)
    at CompilerEngine->get(‘/home/acetechc/demobilling.ace-tech.co.za/resources/views/dashboard.blade.php’, array(‘__env’ => object(Factory), ‘app’ => object(Application), ‘errors’ => object(ViewErrorBag), ‘account’ => object(Account), ‘user’ => object(User), ‘paidToDate’ => object(Collection), ‘balances’ => object(Collection), ‘averageInvoice’ => object(Collection), ‘invoicesSent’ => ‘4’, ‘activeClients’ => 2, ‘activities’ => object(Collection), ‘pastDue’ => object(Collection), ‘upcoming’ => object(Collection), ‘payments’ => object(Collection), ‘title’ => ‘Dashboard’, ‘hasQuotes’ => false, ‘showBreadcrumbs’ => false, ‘currencies’ => array(‘ZAR’), ‘expenses’ => object(Collection), ‘tasks’ => object(Collection), ‘showBlueVinePromo’ => false, ‘showWhiteLabelExpired’ => false, ‘showExpenses’ => false, ‘headerClass’ => ‘in-thin’, ‘footerClass’ => ‘in-thin’))

    #19334

    acetech
    Participant

    So when I bit further digging around found the following:

    @if (Auth::user()->hasPermission(‘admin’))
    <div class=”row”>
    <div class=”col-md-12″>

    Thank you guys, so I found the solution.

    @if (Auth::user()->hasPermission(‘admin’))
    <div class=”row”>
    <div class=”col-md-4″>
    <p> </p>
    @endif

    Then making sure I close it which means I can also remove the upcoming invoices.

    Thank you very much guys for the support, sorry for all the questions but think I am slowly figuring it out.
    Much appreciated, from the guy from the other side of the world.
    Cape Town_ZA

    #19335

    billyggla
    Participant

    Glad it worked out for you.

    #19336

    acetech
    Participant

    yes sir it did, just testing a few other modifications, thank you all for the help much appreciated
    once again. 🙂

Viewing 17 posts - 1 through 17 (of 17 total)

You must be logged in to reply to this topic.

Posted in: