Code Monkey home page Code Monkey logo

modules-timecard's People

Contributors

caseysoftware avatar sasquatch58 avatar

Stargazers

 avatar

Watchers

 avatar  avatar

modules-timecard's Issues

Weekly time card view issues

The buttons to add, edit or delete time logs on the weekly time card view don't seem to be functional in w2p 3.10pre.

Summary by user doesn't work

Some time ago we upgraded to web2project 3.3 and the summary by user view didn't work like before, as there was not output, just the tabboxes. As it wasn't used, this was not so bad and I just deactivated the tab. But today a colleague wanted to use this view and therefore, I tried to find out why it didn't work and how to fix the problem.

First of all, the problematic line of code is line 7 in vw_weekly_by_user.php.
$company_id = $AppUI->processIntState('TimecardVwTab', TimecardWeeklyReportCompanyId, 'company_id', 1);

This doesn't work, because $AppUI is null at the time. So the method isn't called and nothing more will happen. Fixing this is easy by moving the global declaration from line 9 in front of line 7 and adding $AppUI as a global variable.

Another problem is, that TimecardWeeklyReportCompanyId is never set, so using the select field doesn't work so well. The default value 1 is used every time and that might not be the desired behaviour. So adding a little more code and changing the assignment of $company_id can do the trick. My final version at the moment looks like this:

global $AppUI,$tab,$TIMECARD_CONFIG;
        
if (isset( $_GET['company_id'] )) {
    $AppUI->setState( 'TimecardWeeklyReportCompanyId', $_GET['company_id'] );
}

$company_id = $AppUI->getState( 'TimecardWeeklyReportCompanyId' ) ? $AppUI->getState( 'TimecardWeeklyReportCompanyId' ) : 1;

Might be worth to mention: Our web2project is of version 3.3.66 with some little adjustments and the PHP 7 compatiblity changes are also included.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.