From 1a76c47bb6073cf96cb18b62e4b349e927c85a9c Mon Sep 17 00:00:00 2001 From: kilian Date: Fri, 14 Aug 2020 10:53:01 +0200 Subject: [PATCH] v20200814 --- .../potlu2_db.newcompanyschema.pg.schema.sql | 8 +++-- dev/sourcefiles.local.txt | 33 +++++++++---------- .../data/schemata/defaultcompany.schema.sql | 8 +++-- website/app/db.cgi | 6 ++-- website/app/index.cgi | 2 +- website/app/lib/dksdb.pm | 6 ++-- website/app/report.cgi | 2 +- website/app/tmp/mail.log | 2 -- 8 files changed, 34 insertions(+), 33 deletions(-) delete mode 100644 website/app/tmp/mail.log diff --git a/dev/db/potlu2_db.newcompanyschema.pg.schema.sql b/dev/db/potlu2_db.newcompanyschema.pg.schema.sql index af9c315c..e2e04ae0 100644 --- a/dev/db/potlu2_db.newcompanyschema.pg.schema.sql +++ b/dev/db/potlu2_db.newcompanyschema.pg.schema.sql @@ -995,7 +995,7 @@ CREATE VIEW %%NEWSCHEMA%%.vw_staffcontractlist AS sc.startdate, sc.enddate, sc.weekdays, - sc.weekhours, + to_char(sc.weekhours, 'HH24:MI'::text) AS weekhours, sc.id_contractworkplan, ( SELECT string_agg(ww.wday, ','::text) AS string_agg FROM ( SELECT public.day_name(json_array_elements_text(sc.defaultfreedays)) AS wday) ww) AS defaultfreedays, @@ -1232,7 +1232,8 @@ CREATE TABLE %%NEWSCHEMA%%.worktimes ( isdefault boolean, id text DEFAULT public.getuuid() NOT NULL, modified timestamp without time zone DEFAULT now(), - created timestamp without time zone DEFAULT now() + created timestamp without time zone DEFAULT now(), + mindailyrecuperation time without time zone ); CREATE VIEW %%NEWSCHEMA%%.vw_worktimeslist AS @@ -1244,7 +1245,8 @@ CREATE VIEW %%NEWSCHEMA%%.vw_worktimeslist AS to_char(worktimes.maxdayhours, 'HH24:MI'::text) AS maxdayhours, to_char(worktimes.defaultweekhours, 'HH24:MI'::text) AS defaultweekhours, to_char(worktimes.maxweekhours, 'HH24:MI'::text) AS maxweekhours, - to_char(worktimes.maxinterruptionhours, 'HH24:MI'::text) AS maxinterruptionhours + to_char(worktimes.maxinterruptionhours, 'HH24:MI'::text) AS maxinterruptionhours, + to_char((worktimes.mindailyrecuperation)::interval, 'HH24:MI'::text) AS mindailyrecuperation FROM %%NEWSCHEMA%%.worktimes ORDER BY worktimes.startdate NULLS FIRST, worktimes.enddate NULLS FIRST; diff --git a/dev/sourcefiles.local.txt b/dev/sourcefiles.local.txt index bdc231f9..2e2c0fd4 100644 --- a/dev/sourcefiles.local.txt +++ b/dev/sourcefiles.local.txt @@ -12,13 +12,13 @@ ./app/data/reports/pot/pot_staffmember_period/pot.ttf|1372 ./app/data/reports/pot/pot_staffmember_period/pot.ttf.b64.txt|1869 ./app/data/reports/pot/pot_staffmember_period.tt|10495 -./app/data/schemata/defaultcompany.schema.sql|58646 +./app/data/schemata/defaultcompany.schema.sql|60557 ./app/data/schemata/.htaccess|167 -./app/db.cgi|9597 +./app/db.cgi|9600 ./app/.htaccess|300 -./app/index.cgi|3672 +./app/index.cgi|3673 ./app/lib/dksconfig.pm|853 -./app/lib/dksdb.pm|10354 +./app/lib/dksdb.pm|10357 ./app/lib/.htaccess|169 ./app/lib/pdfreport.pm|4515 ./app/lib/perl5/Business/Tax/VAT/Validation.pm|14797 @@ -662,9 +662,9 @@ ./app/lib/perl5/x86_64-linux-gnu-thread-multi/Test/LeakTrace.pm|7262 ./app/lib/perl5/x86_64-linux-gnu-thread-multi/Test/LeakTrace/Script.pm|986 ./app/lib/perl5/x86_64-linux-gnu-thread-multi/Text/Soundex.pm|8345 -./app/lib/sendemail.pm|2537 +./app/lib/sendemail.pm|2484 ./app/lib/session.pm|10226 -./app/report.cgi|4764 +./app/report.cgi|4765 ./app/static/css/fonts/pot.svg|67407 ./app/static/css/fonts/pot.ttf|18180 ./app/static/css/fonts/pot.woff|18256 @@ -706,7 +706,7 @@ ./app/static/img/potlogowhite.svg|11940 ./app/static/img/pottop.png|2689 ./app/static/img/toplogo.png|31456 -./app/static/js/app.js|3202 +./app/static/js/app.js|3206 ./app/static/js/dataform.js|7930 ./app/static/js/report.js|475 ./app/static/js/request.js|3738 @@ -933,16 +933,16 @@ ./app/tmpl/login.tt|2759 ./app/tmpl/module/admin/companies.js|5862 ./app/tmpl/module/admin/dlg_dataset.tt|2004 -./app/tmpl/module/admin/dlg_staffgroups.tt|1252 +./app/tmpl/module/admin/dlg_staffgroups.tt|1273 ./app/tmpl/module/admin/dlg_users.tt|3739 -./app/tmpl/module/admin/dlg_worktimes.tt|3868 +./app/tmpl/module/admin/dlg_worktimes.tt|3790 ./app/tmpl/module/admin/pnl_basedata.tt|7421 ./app/tmpl/module/admin/schemadataset.js|1761 ./app/tmpl/module/admin/staffgroups.js|3221 -./app/tmpl/module/admin.tt|3663 +./app/tmpl/module/admin.tt|3772 ./app/tmpl/module/admin/users.js|7317 -./app/tmpl/module/admin/worktimes.js|3816 -./app/tmpl/module/company/company.js|1788 +./app/tmpl/module/admin/worktimes.js|3997 +./app/tmpl/module/company/company.js|1792 ./app/tmpl/module/company/dlg_staffgroups.tt|1311 ./app/tmpl/module/company/dlg_users.tt|2499 ./app/tmpl/module/company/pnl_basedata.tt|6916 @@ -954,8 +954,8 @@ ./app/tmpl/module/login/forgotpassword.tt|820 ./app/tmpl/module/login/login.tt|920 ./app/tmpl/module/login/message.tt|267 -./app/tmpl/module/periods/reportperiod.js|6262 -./app/tmpl/module/periods/staffperiodweeks.js|14413 +./app/tmpl/module/periods/reportperiod.js|6264 +./app/tmpl/module/periods/staffperiodweeks.js|15262 ./app/tmpl/module/periods/tlb_staffperiodweeks.tt|878 ./app/tmpl/module/periods.tt|2778 ./app/tmpl/module/profile/dlgpassword.tt|2871 @@ -965,7 +965,7 @@ ./app/tmpl/module/staff/dlg_staffcontract.tt|2332 ./app/tmpl/module/staff/pnl_basedata.tt|6512 ./app/tmpl/module/staff/staffcontract.js|5708 -./app/tmpl/module/staff/staff.js|4987 +./app/tmpl/module/staff/staff.js|4989 ./app/tmpl/module/staff/staffperiods.js|3036 ./app/tmpl/module/staff.tt|3093 ./app/tmpl/module/timetrackers/index.js|401 @@ -973,8 +973,7 @@ ./app/tmpl/module/workplans/dlg_workplanday.tt|11613 ./app/tmpl/module/workplans/dlg_workplan.tt|1656 ./app/tmpl/module/workplans.tt|2224 -./app/tmpl/module/workplans/workplans.js|10850 -./app/tmp/mail.log|0 +./app/tmpl/module/workplans/workplans.js|10852 ./css/site.css|24964 ./.htaccess|0 ./img/favicon/android-icon-144x144.png|12179 diff --git a/website/app/data/schemata/defaultcompany.schema.sql b/website/app/data/schemata/defaultcompany.schema.sql index af9c315c..e2e04ae0 100644 --- a/website/app/data/schemata/defaultcompany.schema.sql +++ b/website/app/data/schemata/defaultcompany.schema.sql @@ -995,7 +995,7 @@ CREATE VIEW %%NEWSCHEMA%%.vw_staffcontractlist AS sc.startdate, sc.enddate, sc.weekdays, - sc.weekhours, + to_char(sc.weekhours, 'HH24:MI'::text) AS weekhours, sc.id_contractworkplan, ( SELECT string_agg(ww.wday, ','::text) AS string_agg FROM ( SELECT public.day_name(json_array_elements_text(sc.defaultfreedays)) AS wday) ww) AS defaultfreedays, @@ -1232,7 +1232,8 @@ CREATE TABLE %%NEWSCHEMA%%.worktimes ( isdefault boolean, id text DEFAULT public.getuuid() NOT NULL, modified timestamp without time zone DEFAULT now(), - created timestamp without time zone DEFAULT now() + created timestamp without time zone DEFAULT now(), + mindailyrecuperation time without time zone ); CREATE VIEW %%NEWSCHEMA%%.vw_worktimeslist AS @@ -1244,7 +1245,8 @@ CREATE VIEW %%NEWSCHEMA%%.vw_worktimeslist AS to_char(worktimes.maxdayhours, 'HH24:MI'::text) AS maxdayhours, to_char(worktimes.defaultweekhours, 'HH24:MI'::text) AS defaultweekhours, to_char(worktimes.maxweekhours, 'HH24:MI'::text) AS maxweekhours, - to_char(worktimes.maxinterruptionhours, 'HH24:MI'::text) AS maxinterruptionhours + to_char(worktimes.maxinterruptionhours, 'HH24:MI'::text) AS maxinterruptionhours, + to_char((worktimes.mindailyrecuperation)::interval, 'HH24:MI'::text) AS mindailyrecuperation FROM %%NEWSCHEMA%%.worktimes ORDER BY worktimes.startdate NULLS FIRST, worktimes.enddate NULLS FIRST; diff --git a/website/app/db.cgi b/website/app/db.cgi index 71563802..5e43e055 100644 --- a/website/app/db.cgi +++ b/website/app/db.cgi @@ -47,7 +47,7 @@ if (($cgi->request_method() eq "GET") || ($cgi->request_method() eq "POST")){ $p->{$pp} = $cgi->param($pp); } if (exists($p->{"POSTDATA"})){ - print STDERR $p->{"POSTDATA"}; + #print STDERR $p->{"POSTDATA"}; my $pdj = (); if ($p->{"POSTDATA"} =~ /^\{.*\}$/ ){ $pdj = JSON::PP::decode_json($p->{"POSTDATA"}); @@ -265,8 +265,8 @@ if (($cgi->request_method() eq "GET") || ($cgi->request_method() eq "POST")){ $fnsql = "SELECT * FROM ".$schema.".".$p->{fn}."();"; } else { $html->{pp} = $p->{params}; - print STDERR "REF:".ref($p->{params})."\n"; - print STDERR Dumper($p->{params}); + #print STDERR "REF:".ref($p->{params})."\n"; + #print STDERR Dumper($p->{params}); my $pfn = {}; if (ref($p->{params}) != "HASH"){ $pfn = JSON::PP::decode_json($p->{params}); diff --git a/website/app/index.cgi b/website/app/index.cgi index 378357b4..16f79ff9 100644 --- a/website/app/index.cgi +++ b/website/app/index.cgi @@ -7,7 +7,7 @@ use File::Basename qw/dirname basename/; use Template; # use Template::Constants qw( :debug ); use CGI; -use CGI::Carp qw(fatalsToBrowser); +#use CGI::Carp qw(fatalsToBrowser); use CGI::Cookie; use Data::Dumper; use JSON::PP; diff --git a/website/app/lib/dksdb.pm b/website/app/lib/dksdb.pm index 6518a056..6b1433cf 100644 --- a/website/app/lib/dksdb.pm +++ b/website/app/lib/dksdb.pm @@ -110,10 +110,10 @@ sub querysorted(){ #$retdata->{$count} = $data; foreach my $k (keys %{$data}){ if ($data->{$k} =~ /^{.*}$/){ - print STDERR Dumper($data->{$k}); + #print STDERR Dumper($data->{$k}); $retdata->{$count}->{$k} = JSON::PP::decode_json($data->{$k}); } else { - print STDERR Dumper($data->{$k}); + #print STDERR Dumper($data->{$k}); $retdata->{$count}->{$k} = decode("utf-8",$data->{$k}); } @@ -121,7 +121,7 @@ sub querysorted(){ $count++; } - print STDERR Dumper($retdata); + #print STDERR Dumper($retdata); $sth->finish(); $dbh->disconnect(); diff --git a/website/app/report.cgi b/website/app/report.cgi index b48a94fa..b763dc93 100644 --- a/website/app/report.cgi +++ b/website/app/report.cgi @@ -8,7 +8,7 @@ use lib ($RealBin.'/lib'); use CGI; use CGI::Cookie; use Encode; -use CGI::Carp qw/fatalsToBrowser/; +#use CGI::Carp qw/fatalsToBrowser/; use File::Basename; use JSON::PP; use MIME::Type::FileName; diff --git a/website/app/tmp/mail.log b/website/app/tmp/mail.log deleted file mode 100644 index 2688c5c2..00000000 --- a/website/app/tmp/mail.log +++ /dev/null @@ -1,2 +0,0 @@ -perl "/usr/home/dksalu/public_html/pot_lu/app/tools/bin/sendEmail" -f support@dks.lu -s "mail.your-server.de:587" -xu "ksaffran@dks.lu" -xp "FB1ia1ka" -q -o tls=auto -t "ksaffran@dks.lu" -u "accès pour le site pot.lu" -o message-content-type=html -o message-charset=ISO-8859-1 -o message-file=/usr/home/dksalu/public_html/pot_lu/app/data/tmp/mail/user_forgotpasswd1444.mail --- -- 2.39.5