Istvan Dobrentei - 2018-09-05 12:39:44 - In reply to message 1 from Benjamin H.
It is a generated file (frontend-dist.js) and in generally it's kind of files don't push to version control. You should generate it using npm. If you modify the frontend code, install dependencies using npm package manager and after build with npm run build command. This is the frontend but at the backend you should also generate files using composer (composer puts the files in the vendor directory). The project dependencies are in composer.json and package.json.
Benjamin H. - 2018-09-06 07:18:56 - In reply to message 4 from Istvan Dobrentei
I am on Windows without docker. I have set the environment variables with this extension "vlucas/phpdotenv": "^2.2" inside an .env file.
And as I have already written i have set up a vhost which points to the /public directory. Port 8000 or 8080 etc. is already used.
I get to the login page but when it does the post to /api/login on the localhost with the correct port a 404 is thrown as the file doesn't exists.
So i have added a .htaccess (as i use a normal apache) which redirects every request to the index.php when the file doesn't exists.
Then i could login.
But then i only see "here comes the dashboard" and if I add a new project the entry is correctly added to the database but nothing is listed on the project table or the working hour project select field.
I had to also disable caching that the json request actually return something after adding new entries.
So here my .htaccess file:
Header unset ETag
Header unset Pragma
Header unset Cache-Control
Header unset Last-Modified
Header set Pragma "no-cache"
Header set Cache-Control "max-age=0, no-cache, no-store, must-revalidate"
Header set Expires "Thu, 1 Jan 1970 00:00:00 GMT"
Benjamin H. - 2018-09-06 08:28:10 - In reply to message 5 from Benjamin H.
Still some issues.
the report.xls template file is missing. I guess this time it is really missing and isn't created by some script.
The template directory is set to \lib\report\ by the php code.
But I have also looked into all other directories but couldn't find anything appropriate.
There isn't a check for crossing working times.
So i could add a work from 8:00 - 9:30 and also from 8:30 - 9:30 for a second work. Both also for the same project. I am not sure if this is correct.
I also had problems with the triggers as my local database had only the user root@localhost and not root@%.
There i also have seen that your InvoiceDB::save function doesn't use db transactions. So the invoice and invoice_items entries are created but then the approval of the working time hours fails (because of the error on the trigger) and the invoice is still created even when the working times aren't approved.
DB transaction would be useful and a check on the result of the approveWorkingTime function call.
to be able to get a quick summary it should be possible to list all entries by not filling out the date fields.
And it should also be possible to fill out only one field.
- from date is filled only show entries from this date
- to date is filled show entries from first entry until end of this date
A "today" button would also be helpful in the date selectors.
Benjamin H. - 2018-09-06 09:21:14 - In reply to message 9 from Istvan Dobrentei
>Do you think it is a real scenario to do two different kind of work within the same interval?
No and thatīs the point. In the current version it could happen that you enter more hours by day then your actual working time for the complete day. And this could also happen by mistake by selecting the wrong starting hour.
If there isn't a check you could end up with an summary working time of e.g. 8.5 when you should only have a max 7.5 of on a normal working day because your only selected one start / end hour wrong.
And because there is no edit button you could only delete and re-enter it.
There should be a select before adding the entry to the DB which checks if there is already an entry where the start and end hour of the date is in between.
>I created the report.xls with openoffice and the pdf report use it.
Is there a way to download if from somewhere? It would be cumbersome to check all possible input fields from the source to create a own.
btw1. for any json request which returns an error it would be helpfull if you get the error message in a popup or at least displayed ;)
btw2. when you delete a working time which is already invoiced and therefore approved the result on a delete action is "ok". It is correct that the entry isn't deleted. but there should be some error like "The entry is already approved ... can't delete etc." instead of leaving the user wondering why the entry isn't deleted.