From: Kilian Saffran Date: Sat, 24 Apr 2021 05:46:52 +0000 (+0200) Subject: v20210424 X-Git-Url: http://cloud.dks.lu/git/?a=commitdiff_plain;h=6a8d372a1d5159ea232f5ad5614ff954107f4dfb;p=pot_lu.git v20210424 --- diff --git a/app/api.php b/app/api.php index f44eafac..07c8a476 100644 --- a/app/api.php +++ b/app/api.php @@ -55,7 +55,7 @@ if (count($fnp) < $prcnt){ $html["error"] = "Function has ".$prcnt." required parameters!"; } else { - echo "call fn"; + //echo "call fn"; $html["result"]["data"] = call_user_func_array(array($cl, $p["fn"]), $fnp); //error_log(print_r($html,true)); } diff --git a/app/css/fonts/appicons.svg b/app/css/fonts/appicons.svg index 9206f202..9dd0cfa8 100644 --- a/app/css/fonts/appicons.svg +++ b/app/css/fonts/appicons.svg @@ -71,6 +71,9 @@ + + + @@ -85,6 +88,8 @@ + + diff --git a/app/css/fonts/appicons.ttf b/app/css/fonts/appicons.ttf index e5731c8f..a7f7299e 100644 Binary files a/app/css/fonts/appicons.ttf and b/app/css/fonts/appicons.ttf differ diff --git a/app/css/fonts/appicons.woff b/app/css/fonts/appicons.woff index c9ae0ce0..a4262128 100644 Binary files a/app/css/fonts/appicons.woff and b/app/css/fonts/appicons.woff differ diff --git a/app/css/icons.css b/app/css/icons.css index 6c40406d..a229b535 100644 --- a/app/css/icons.css +++ b/app/css/icons.css @@ -1,10 +1,9 @@ @font-face { font-family: 'appicons'; - src: url('fonts/appicons.eot?rmyyuw'); - src: url('fonts/appicons.eot?rmyyuw#iefix') format('embedded-opentype'), - url('fonts/appicons.ttf?rmyyuw') format('truetype'), - url('fonts/appicons.woff?rmyyuw') format('woff'), - url('fonts/appicons.svg?rmyyuw#appicons') format('svg'); + src: + url('fonts/appicons.ttf?86ahp7') format('truetype'), + url('fonts/appicons.woff?86ahp7') format('woff'), + url('fonts/appicons.svg?86ahp7#appicons') format('svg'); font-weight: normal; font-style: normal; font-display: block; @@ -25,6 +24,21 @@ -moz-osx-font-smoothing: grayscale; } +.icon-sum:before { + content: "\e940"; +} +.icon-timeentry:before { + content: "\e941"; +} +.icon-timeexit:before { + content: "\e942"; +} +.icon-normalview:before { + content: "\e951"; +} +.icon-detailview:before { + content: "\e952"; +} .icon-shrink:before { content: "\e900"; } diff --git a/app/data/cache/22/22a9ee1c514b64294460dae51f0aa694375443c48b6d94639ee8c62432ea9b2d.php b/app/data/cache/22/22a9ee1c514b64294460dae51f0aa694375443c48b6d94639ee8c62432ea9b2d.php deleted file mode 100644 index 7d91b5e0..00000000 --- a/app/data/cache/22/22a9ee1c514b64294460dae51f0aa694375443c48b6d94639ee8c62432ea9b2d.php +++ /dev/null @@ -1,101 +0,0 @@ -source = $this->getSourceContext(); - - $this->parent = false; - - $this->blocks = [ - ]; - } - - protected function doDisplay(array $context, array $blocks = []) - { - $macros = $this->macros; - // line 1 - echo "
-

"; - // line 2 - echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, ($context["lbl"] ?? null), "clientaccess", [], "any", false, false, false, 2), "html", null, true); - echo "

-
-
-
- - -
-
- - -
-
- -
- - -
- -
-
"; - } - - public function getTemplateName() - { - return "module/login/login.html"; - } - - public function isTraitable() - { - return false; - } - - public function getDebugInfo() - { - return array ( 76 => 21, 67 => 17, 61 => 14, 54 => 10, 47 => 6, 40 => 2, 37 => 1,); - } - - public function getSourceContext() - { - return new Source("", "module/login/login.html", "/mnt/c/Users/ksaff/Workspace/pot_lu/app/tmplm/module/login/login.html"); - } -} diff --git a/app/data/cache/a2/a2a4e010b5506140baa756090a5e9b97c5214f97e9f61a2a71687eec3cab6740.php b/app/data/cache/a2/a2a4e010b5506140baa756090a5e9b97c5214f97e9f61a2a71687eec3cab6740.php deleted file mode 100644 index 6875b2ce..00000000 --- a/app/data/cache/a2/a2a4e010b5506140baa756090a5e9b97c5214f97e9f61a2a71687eec3cab6740.php +++ /dev/null @@ -1,281 +0,0 @@ -source = $this->getSourceContext(); - - $this->parent = false; - - $this->blocks = [ - ]; - } - - protected function doDisplay(array $context, array $blocks = []) - { - $macros = $this->macros; - // line 1 - echo " -env, ($context["lang"] ?? null), "html", null, true); - echo "\"> - - env, ($context["lang"] ?? null), "html", null, true); - echo "\"> - - - - - - POT - Plan d'Organtisation du Travail "; - // line 10 - echo twig_escape_filter($this->env, ($context["mode"] ?? null), "html", null, true); - echo " - -env, ($context["abspath"] ?? null), "html", null, true); - echo "static/img/favicon/apple-icon-57x57.png?v="; - echo twig_escape_filter($this->env, ($context["appversion"] ?? null), "html", null, true); - echo "\"> -env, ($context["abspath"] ?? null), "html", null, true); - echo "static/img/favicon/apple-icon-60x60.png?v="; - echo twig_escape_filter($this->env, ($context["appversion"] ?? null), "html", null, true); - echo "\"> -env, ($context["abspath"] ?? null), "html", null, true); - echo "static/img/favicon/apple-icon-72x72.png?v="; - echo twig_escape_filter($this->env, ($context["appversion"] ?? null), "html", null, true); - echo "\"> -env, ($context["abspath"] ?? null), "html", null, true); - echo "static/img/favicon/apple-icon-76x76.png?v="; - echo twig_escape_filter($this->env, ($context["appversion"] ?? null), "html", null, true); - echo "\"> -env, ($context["abspath"] ?? null), "html", null, true); - echo "static/img/favicon/apple-icon-114x114.png?v="; - echo twig_escape_filter($this->env, ($context["appversion"] ?? null), "html", null, true); - echo "\"> -env, ($context["abspath"] ?? null), "html", null, true); - echo "static/img/favicon/apple-icon-120x120.png?v="; - echo twig_escape_filter($this->env, ($context["appversion"] ?? null), "html", null, true); - echo "\"> -env, ($context["abspath"] ?? null), "html", null, true); - echo "static/img/favicon/apple-icon-144x144.png?v="; - echo twig_escape_filter($this->env, ($context["appversion"] ?? null), "html", null, true); - echo "\"> -env, ($context["abspath"] ?? null), "html", null, true); - echo "static/img/favicon/apple-icon-152x152.png?v="; - echo twig_escape_filter($this->env, ($context["appversion"] ?? null), "html", null, true); - echo "\"> -env, ($context["abspath"] ?? null), "html", null, true); - echo "static/img/favicon/apple-icon-180x180.png?v="; - echo twig_escape_filter($this->env, ($context["appversion"] ?? null), "html", null, true); - echo "\"> -env, ($context["abspath"] ?? null), "html", null, true); - echo "static/img/favicon/android-icon-192x192.png?v="; - echo twig_escape_filter($this->env, ($context["appversion"] ?? null), "html", null, true); - echo "\"> -env, ($context["abspath"] ?? null), "html", null, true); - echo "static/img/favicon/favicon-32x32.png?v="; - echo twig_escape_filter($this->env, ($context["appversion"] ?? null), "html", null, true); - echo "\"> -env, ($context["abspath"] ?? null), "html", null, true); - echo "static/img/favicon/favicon-96x96.png?v="; - echo twig_escape_filter($this->env, ($context["appversion"] ?? null), "html", null, true); - echo "\"> -env, ($context["abspath"] ?? null), "html", null, true); - echo "static/img/favicon/favicon-16x16.png?v="; - echo twig_escape_filter($this->env, ($context["appversion"] ?? null), "html", null, true); - echo "\"> -env, ($context["abspath"] ?? null), "html", null, true); - echo "static/img/splashscreens/iphone5_splash.png\" media=\"(device-width: 320px) and (device-height: 568px) and (-webkit-device-pixel-ratio: 2)\" rel=\"apple-touch-startup-image\" /> -env, ($context["abspath"] ?? null), "html", null, true); - echo "static/img/splashscreens/iphone6_splash.png\" media=\"(device-width: 375px) and (device-height: 667px) and (-webkit-device-pixel-ratio: 2)\" rel=\"apple-touch-startup-image\" /> -env, ($context["abspath"] ?? null), "html", null, true); - echo "static/img/splashscreens/iphoneplus_splash.png\" media=\"(device-width: 621px) and (device-height: 1104px) and (-webkit-device-pixel-ratio: 3)\" rel=\"apple-touch-startup-image\" /> -env, ($context["abspath"] ?? null), "html", null, true); - echo "static/img/splashscreens/iphonex_splash.png\" media=\"(device-width: 375px) and (device-height: 812px) and (-webkit-device-pixel-ratio: 3)\" rel=\"apple-touch-startup-image\" /> -env, ($context["abspath"] ?? null), "html", null, true); - echo "static/img/splashscreens/iphonexr_splash.png\" media=\"(device-width: 414px) and (device-height: 896px) and (-webkit-device-pixel-ratio: 2)\" rel=\"apple-touch-startup-image\" /> -env, ($context["abspath"] ?? null), "html", null, true); - echo "static/img/splashscreens/iphonexsmax_splash.png\" media=\"(device-width: 414px) and (device-height: 896px) and (-webkit-device-pixel-ratio: 3)\" rel=\"apple-touch-startup-image\" /> -env, ($context["abspath"] ?? null), "html", null, true); - echo "static/img/splashscreens/ipad_splash.png\" media=\"(device-width: 768px) and (device-height: 1024px) and (-webkit-device-pixel-ratio: 2)\" rel=\"apple-touch-startup-image\" /> -env, ($context["abspath"] ?? null), "html", null, true); - echo "static/img/splashscreens/ipadpro1_splash.png\" media=\"(device-width: 834px) and (device-height: 1112px) and (-webkit-device-pixel-ratio: 2)\" rel=\"apple-touch-startup-image\" /> -env, ($context["abspath"] ?? null), "html", null, true); - echo "static/img/splashscreens/ipadpro3_splash.png\" media=\"(device-width: 834px) and (device-height: 1194px) and (-webkit-device-pixel-ratio: 2)\" rel=\"apple-touch-startup-image\" /> -env, ($context["abspath"] ?? null), "html", null, true); - echo "static/img/splashscreens/ipadpro2_splash.png\" media=\"(device-width: 1024px) and (device-height: 1366px) and (-webkit-device-pixel-ratio: 2)\" rel=\"apple-touch-startup-image\" /> - -env, ($context["abspath"] ?? null), "html", null, true); - echo "static/css/theme"; - echo twig_escape_filter($this->env, ($context["minify"] ?? null), "html", null, true); - echo ".css?v="; - echo twig_escape_filter($this->env, ($context["appversion"] ?? null), "html", null, true); - echo "\"> - - - - -
- -
-
  -
-
-
- env, ($context["abspath"] ?? null), "html", null, true); - echo "static/img/toplogo.png?v="; - echo twig_escape_filter($this->env, ($context["appversion"] ?? null), "html", null, true); - echo "\" style=\"height: 60px;\" alt=\"logo\"> -
-
- "; - // line 59 - if ((0 === twig_compare(($context["pagename"] ?? null), "forgotpassword"))) { - // line 60 - echo " "; - echo twig_include($this->env, $context, "module/login/forgotpassword.html"); - echo " - "; - } elseif ((0 === twig_compare( // line 61 -($context["pagename"] ?? null), "message"))) { - // line 62 - echo " "; - echo twig_include($this->env, $context, "module/login/message.html"); - echo " - "; - } else { - // line 64 - echo " "; - echo twig_include($this->env, $context, "module/login/login.html"); - echo " - "; - } - // line 66 - echo "
-
-
  -
-
- -
- - - -"; - } - - public function getTemplateName() - { - return "login.html"; - } - - public function isTraitable() - { - return false; - } - - public function getDebugInfo() - { - return array ( 239 => 66, 233 => 64, 227 => 62, 225 => 61, 220 => 60, 218 => 59, 210 => 56, 189 => 40, 178 => 36, 173 => 34, 169 => 33, 165 => 32, 161 => 31, 157 => 30, 153 => 29, 149 => 28, 145 => 27, 141 => 26, 137 => 25, 131 => 24, 125 => 23, 119 => 22, 113 => 21, 107 => 20, 101 => 19, 95 => 18, 89 => 17, 83 => 16, 77 => 15, 71 => 14, 65 => 13, 59 => 12, 54 => 10, 45 => 4, 40 => 2, 37 => 1,); - } - - public function getSourceContext() - { - return new Source("", "login.html", "/mnt/c/Users/ksaff/Workspace/pot_lu/app/tmplm/login.html"); - } -} diff --git a/app/data/cache/d2/d29b34ebd65f216b59f3df0861f970c63d28da6de4b6816a66e943e85460e654.php b/app/data/cache/d2/d29b34ebd65f216b59f3df0861f970c63d28da6de4b6816a66e943e85460e654.php deleted file mode 100644 index b95e7b31..00000000 --- a/app/data/cache/d2/d29b34ebd65f216b59f3df0861f970c63d28da6de4b6816a66e943e85460e654.php +++ /dev/null @@ -1,196 +0,0 @@ -source = $this->getSourceContext(); - - $this->parent = false; - - $this->blocks = [ - ]; - } - - protected function doDisplay(array $context, array $blocks = []) - { - $macros = $this->macros; - // line 1 - echo " - -env, ($context["lang"] ?? null), "html", null, true); - echo "\"> - - - - - POT - "; - // line 8 - echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, ($context["lbl"] ?? null), "pot_long", [], "any", false, false, false, 8), "html", null, true); - echo " "; - echo twig_escape_filter($this->env, ($context["mode"] ?? null), "html", null, true); - echo " - - - env, ($context["appversion"] ?? null), "html", null, true); - echo "\"> -env, ($context["appversion"] ?? null), "html", null, true); - echo "\"> -env, ($context["appversion"] ?? null), "html", null, true); - echo "\"> -env, ($context["appversion"] ?? null), "html", null, true); - echo "\"> -env, ($context["appversion"] ?? null), "html", null, true); - echo "\"> -env, ($context["appversion"] ?? null), "html", null, true); - echo "\"> -env, ($context["appversion"] ?? null), "html", null, true); - echo "\"> -env, ($context["appversion"] ?? null), "html", null, true); - echo "\"> -env, ($context["appversion"] ?? null), "html", null, true); - echo "\"> -env, ($context["appversion"] ?? null), "html", null, true); - echo "\"> -env, ($context["appversion"] ?? null), "html", null, true); - echo "\"> -env, ($context["appversion"] ?? null), "html", null, true); - echo "\"> -env, ($context["appversion"] ?? null), "html", null, true); - echo "\"> -env, ($context["abspath"] ?? null), "html", null, true); - echo "static/css/theme.css?v="; - echo twig_escape_filter($this->env, ($context["appversion"] ?? null), "html", null, true); - echo "\"> - - - - -
- -
-
  -
-
-
- env, ($context["abspath"] ?? null), "html", null, true); - echo "static/mg/toplogo.png?v="; - echo twig_escape_filter($this->env, ($context["appversion"] ?? null), "html", null, true); - echo "\" style=\"height: 60px;\" alt=\"logo\"> -
-
-
-

Ihr Browser wird nicht unterstützt!

-

Votre Navigateur n'est pas supporté!

-
- -
-
-
  -
-
- -
- - -"; - } - - public function getTemplateName() - { - return "browser.html"; - } - - public function isTraitable() - { - return false; - } - - public function getDebugInfo() - { - return array ( 139 => 44, 118 => 28, 109 => 24, 105 => 23, 101 => 22, 97 => 21, 93 => 20, 89 => 19, 85 => 18, 81 => 17, 77 => 16, 73 => 15, 69 => 14, 65 => 13, 61 => 12, 57 => 11, 49 => 8, 41 => 3, 37 => 1,); - } - - public function getSourceContext() - { - return new Source("", "browser.html", "/mnt/c/Users/ksaff/Workspace/pot_lu/app/tmplm/browser.html"); - } -} diff --git a/app/data/cache/fd/fdd79b7ad2e5960dabd5facff6311f82cf739967157bcc5261561ac8840bc757.php b/app/data/cache/fd/fdd79b7ad2e5960dabd5facff6311f82cf739967157bcc5261561ac8840bc757.php deleted file mode 100644 index 75f21a53..00000000 --- a/app/data/cache/fd/fdd79b7ad2e5960dabd5facff6311f82cf739967157bcc5261561ac8840bc757.php +++ /dev/null @@ -1,353 +0,0 @@ -source = $this->getSourceContext(); - - $this->parent = false; - - $this->blocks = [ - ]; - } - - protected function doDisplay(array $context, array $blocks = []) - { - $macros = $this->macros; - // line 1 - echo " -env, ($context["lang"] ?? null), "html", null, true); - echo "\"> - - - - - - - POT - Plan d'Organtisation du Travail - - - -env, ($context["abspath"] ?? null), "html", null, true); - echo "static/img/favicon/apple-icon-57x57.png?v="; - echo twig_escape_filter($this->env, ($context["appversion"] ?? null), "html", null, true); - echo "\"> -env, ($context["abspath"] ?? null), "html", null, true); - echo "static/img/favicon/apple-icon-60x60.png?v="; - echo twig_escape_filter($this->env, ($context["appversion"] ?? null), "html", null, true); - echo "\"> -env, ($context["abspath"] ?? null), "html", null, true); - echo "static/img/favicon/apple-icon-72x72.png?v="; - echo twig_escape_filter($this->env, ($context["appversion"] ?? null), "html", null, true); - echo "\"> -env, ($context["abspath"] ?? null), "html", null, true); - echo "static/img/favicon/apple-icon-76x76.png?v="; - echo twig_escape_filter($this->env, ($context["appversion"] ?? null), "html", null, true); - echo "\"> -env, ($context["abspath"] ?? null), "html", null, true); - echo "static/img/favicon/apple-icon-114x114.png?v="; - echo twig_escape_filter($this->env, ($context["appversion"] ?? null), "html", null, true); - echo "\"> -env, ($context["abspath"] ?? null), "html", null, true); - echo "static/img/favicon/apple-icon-120x120.png?v="; - echo twig_escape_filter($this->env, ($context["appversion"] ?? null), "html", null, true); - echo "\"> -env, ($context["abspath"] ?? null), "html", null, true); - echo "static/img/favicon/apple-icon-144x144.png?v="; - echo twig_escape_filter($this->env, ($context["appversion"] ?? null), "html", null, true); - echo "\"> -env, ($context["abspath"] ?? null), "html", null, true); - echo "static/img/favicon/apple-icon-152x152.png?v="; - echo twig_escape_filter($this->env, ($context["appversion"] ?? null), "html", null, true); - echo "\"> -env, ($context["abspath"] ?? null), "html", null, true); - echo "static/img/favicon/apple-icon-180x180.png?v="; - echo twig_escape_filter($this->env, ($context["appversion"] ?? null), "html", null, true); - echo "\"> -env, ($context["abspath"] ?? null), "html", null, true); - echo "static/img/favicon/android-icon-192x192.png?v="; - echo twig_escape_filter($this->env, ($context["appversion"] ?? null), "html", null, true); - echo "\"> -env, ($context["abspath"] ?? null), "html", null, true); - echo "static/img/favicon/favicon-32x32.png?v="; - echo twig_escape_filter($this->env, ($context["appversion"] ?? null), "html", null, true); - echo "\"> -env, ($context["abspath"] ?? null), "html", null, true); - echo "static/img/favicon/favicon-96x96.png?v="; - echo twig_escape_filter($this->env, ($context["appversion"] ?? null), "html", null, true); - echo "\"> -env, ($context["abspath"] ?? null), "html", null, true); - echo "static/img/favicon/favicon-16x16.png?v="; - echo twig_escape_filter($this->env, ($context["appversion"] ?? null), "html", null, true); - echo "\"> -env, ($context["abspath"] ?? null), "html", null, true); - echo "static/img/splashscreens/iphone5_splash.png\" media=\"(device-width: 320px) and (device-height: 568px) and (-webkit-device-pixel-ratio: 2)\" rel=\"apple-touch-startup-image\" /> -env, ($context["abspath"] ?? null), "html", null, true); - echo "static/img/splashscreens/iphone6_splash.png\" media=\"(device-width: 375px) and (device-height: 667px) and (-webkit-device-pixel-ratio: 2)\" rel=\"apple-touch-startup-image\" /> -env, ($context["abspath"] ?? null), "html", null, true); - echo "static/img/splashscreens/iphoneplus_splash.png\" media=\"(device-width: 621px) and (device-height: 1104px) and (-webkit-device-pixel-ratio: 3)\" rel=\"apple-touch-startup-image\" /> -env, ($context["abspath"] ?? null), "html", null, true); - echo "static/img/splashscreens/iphonex_splash.png\" media=\"(device-width: 375px) and (device-height: 812px) and (-webkit-device-pixel-ratio: 3)\" rel=\"apple-touch-startup-image\" /> -env, ($context["abspath"] ?? null), "html", null, true); - echo "static/img/splashscreens/iphonexr_splash.png\" media=\"(device-width: 414px) and (device-height: 896px) and (-webkit-device-pixel-ratio: 2)\" rel=\"apple-touch-startup-image\" /> -env, ($context["abspath"] ?? null), "html", null, true); - echo "static/img/splashscreens/iphonexsmax_splash.png\" media=\"(device-width: 414px) and (device-height: 896px) and (-webkit-device-pixel-ratio: 3)\" rel=\"apple-touch-startup-image\" /> -env, ($context["abspath"] ?? null), "html", null, true); - echo "static/img/splashscreens/ipad_splash.png\" media=\"(device-width: 768px) and (device-height: 1024px) and (-webkit-device-pixel-ratio: 2)\" rel=\"apple-touch-startup-image\" /> -env, ($context["abspath"] ?? null), "html", null, true); - echo "static/img/splashscreens/ipadpro1_splash.png\" media=\"(device-width: 834px) and (device-height: 1112px) and (-webkit-device-pixel-ratio: 2)\" rel=\"apple-touch-startup-image\" /> -env, ($context["abspath"] ?? null), "html", null, true); - echo "static/img/splashscreens/ipadpro3_splash.png\" media=\"(device-width: 834px) and (device-height: 1194px) and (-webkit-device-pixel-ratio: 2)\" rel=\"apple-touch-startup-image\" /> -env, ($context["abspath"] ?? null), "html", null, true); - echo "static/img/splashscreens/ipadpro2_splash.png\" media=\"(device-width: 1024px) and (device-height: 1366px) and (-webkit-device-pixel-ratio: 2)\" rel=\"apple-touch-startup-image\" /> - -env, ($context["abspath"] ?? null), "html", null, true); - echo "static/css/icons.css?v="; - echo twig_escape_filter($this->env, ($context["appversion"] ?? null), "html", null, true); - echo "\"> -env, ($context["abspath"] ?? null), "html", null, true); - echo "static/css/theme.css?v="; - echo twig_escape_filter($this->env, ($context["appversion"] ?? null), "html", null, true); - echo "\"> - -env, ($context["abspath"] ?? null), "html", null, true); - echo "static/vendors/tabulator/css/tabulator_site.css?v="; - echo twig_escape_filter($this->env, ($context["appversion"] ?? null), "html", null, true); - echo "\"> -env, ($context["abspath"] ?? null), "html", null, true); - echo "static/vendors/slimselect/slimselect.css?v="; - echo twig_escape_filter($this->env, ($context["appversion"] ?? null), "html", null, true); - echo "\"> -env, ($context["abspath"] ?? null), "html", null, true); - echo "static/vendors/flatpickr/flatpickr.css?v="; - echo twig_escape_filter($this->env, ($context["appversion"] ?? null), "html", null, true); - echo "\"> -env, ($context["abspath"] ?? null), "html", null, true); - echo "static/vendors/flatpickr/themes/airbnb.css?v="; - echo twig_escape_filter($this->env, ($context["appversion"] ?? null), "html", null, true); - echo "\"> -env, ($context["abspath"] ?? null), "html", null, true); - echo "static/vendors/suneditor/css/suneditor.min.css?v="; - echo twig_escape_filter($this->env, ($context["appversion"] ?? null), "html", null, true); - echo "\"> - - -
- "; - // line 48 - echo twig_include($this->env, $context, ($context["page"] ?? null)); - echo " -
- "; - // line 50 - echo twig_include($this->env, $context, "block/snackbar.html"); - echo " -"; - // line 51 - echo twig_include($this->env, $context, "block/dlgmessage.html"); - echo " -"; - // line 52 - echo twig_include($this->env, $context, "block/dlgdataload.html"); - echo " -"; - // line 53 - echo twig_include($this->env, $context, "block/dlginfo.html"); - echo " - - - - - - - - - - - - - - - - - -"; - } - - public function getTemplateName() - { - return "index.html"; - } - - public function isTraitable() - { - return false; - } - - public function getDebugInfo() - { - return array ( 324 => 72, 318 => 71, 312 => 70, 306 => 69, 300 => 68, 294 => 67, 288 => 66, 280 => 65, 274 => 64, 268 => 63, 263 => 61, 256 => 59, 250 => 58, 245 => 56, 241 => 55, 236 => 53, 232 => 52, 228 => 51, 224 => 50, 219 => 48, 210 => 44, 204 => 43, 198 => 42, 192 => 41, 186 => 40, 179 => 38, 173 => 37, 168 => 35, 164 => 34, 160 => 33, 156 => 32, 152 => 31, 148 => 30, 144 => 29, 140 => 28, 136 => 27, 132 => 26, 126 => 25, 120 => 24, 114 => 23, 108 => 22, 102 => 21, 96 => 20, 90 => 19, 84 => 18, 78 => 17, 72 => 16, 66 => 15, 60 => 14, 54 => 13, 40 => 2, 37 => 1,); - } - - public function getSourceContext() - { - return new Source("", "index.html", "/mnt/c/Users/ksaff/Workspace/pot_lu/app/tmplm/index.html"); - } -} diff --git a/app/data/mail/body/user_forgotpasswd.tt b/app/data/mail/body/user_forgotpasswd.tt deleted file mode 100644 index 0c9ced97..00000000 --- a/app/data/mail/body/user_forgotpasswd.tt +++ /dev/null @@ -1,12 +0,0 @@ -[% quser = dksdb.query("select prename,surname from public.users where id='$userid';") %] -[% user = quser.get_all() %] -Bonjour [% user.0.prename %] [% user.0.surname %],
-
-vous avez demandé un nouveau mot de passe via plandutravail.lu!
-cliquer ci-dessous pour confirmer votre demande. -Changer mot de passe -
-
-Meilleurs salutations,
-
-POT Support Team \ No newline at end of file diff --git a/app/data/mail/body/user_registration.tt b/app/data/mail/body/user_registration.tt deleted file mode 100644 index 70f729ac..00000000 --- a/app/data/mail/body/user_registration.tt +++ /dev/null @@ -1,15 +0,0 @@ -[% quser = dksdb.query("select prename,surname from public.users where id='$userid';") %] -[% user = quser.get_all() %] -Bonjour [% user.0.prename %] [% user.0.surname %],
-
-[% quser = dksdb.query("select username,vcode from public.users where id='$userid';") %] -[% user = quser.get_all() %] -Merci pour votre création de compte sur pot.lu, -

-votre code de validation: [% user.0.vcode %]
-Finissez votre régistration en entrant le votre code de validation ici: [% siteurl %]validation.html -
-
-Meilleurs salutations,
-
-POT Support Team diff --git a/app/data/mail/mail.tt b/app/data/mail/mail.tt deleted file mode 100644 index c42d41c4..00000000 --- a/app/data/mail/mail.tt +++ /dev/null @@ -1,23 +0,0 @@ -[% USE DBI %] -[% USE dksdb = DBI(dsn, dbuser, dbpassword) %] - - - - - - -
- POT - Plan d'organisation de travail -
-
- [% INCLUDE "body/$bodytemplate" %] -
-
-
- - \ No newline at end of file diff --git a/app/db.php b/app/db.php index f6fc02f5..f4f41f59 100644 --- a/app/db.php +++ b/app/db.php @@ -276,7 +276,9 @@ if ($p["value"] != ""){ $val = "'".$db->securetext($p["value"])."'"; } + $usql = "UPDATE ".$schema.".".$db->securetext($p["table"])." SET ".$db->securetext($p["column"])."=".$val." WHERE id='".$db->securetext($p["id"])."';"; + //file_put_contents("sql.log",$usql."\n",FILE_APPEND); $html["result"] = $db->exec($usql); } } diff --git a/app/index.php b/app/index.php index 35703f59..5d39327f 100644 --- a/app/index.php +++ b/app/index.php @@ -162,8 +162,8 @@ if ($vars["ctype"] == "text/html"){ //error_log($dd); echo $dd; } -if ($vars["ctype"] == 'text/html'){ - print '
'.print_r($vars,true)."
";
-} 
+// if ($vars["ctype"] == 'text/html'){
+//        print '
'.print_r($vars,true)."
";
+// } 
 
 ?>
\ No newline at end of file
diff --git a/app/lib/POT/Period.php b/app/lib/POT/Period.php
index c4d80ebb..8fd9934d 100644
--- a/app/lib/POT/Period.php
+++ b/app/lib/POT/Period.php
@@ -158,9 +158,9 @@ function getPeriodWeekSums($schema,$id_staff, $date_start,$date_end,$id_period){
   $date_end=$pdate["enddate"];
   $pstart =$pdate["periodstart"];
   $pend =$pdate["periodend"];
+
   $sql = "select ws.weekstart,ws.weekend,ws.calweek,ws.calyear, ws.id_staff
   ,to_char(ws.workhours::interval,'HH24:MI') as workhours
-  --,to_char(ws.vacancyhours+ws.vacillhours+ws.vacextrahours,'HH24:MI') as vacancyhours
   ,to_char(ws.vacancyhours,'HH24:MI') as vacancynormal
   ,to_char(ws.vacillhours,'HH24:MI') as vacancyill
   ,to_char(ws.vacextrahours,'HH24:MI') as vacancyextra
@@ -171,10 +171,11 @@ function getPeriodWeekSums($schema,$id_staff, $date_start,$date_end,$id_period){
   ,cd.contractworkdays
   ,cd.cmpcontractdays
   ,cd.cmpweekhours
-  ,to_char(ttr.weektrackedhours,'HH24:MI') as weektrackedhours
-	,interval_to_char(sum(ttr.weektrackedhours) over (order by ws.weekstart) - sum(ws.periodworkhours::interval) over (order by ws.weekstart)) as periodtrackdiff
+  ,to_char(coalesce(ttr.weektrackedhours,'00:00:00'::interval),'HH24:MI') as weektrackedhours
+  ,ws.periodworkhours
+	,interval_to_char(sum(coalesce(ttr.weektrackedhours,'00:00:00'::interval)) over (order by ws.weekstart) - sum(ws.periodworkhours::interval) over (order by ws.weekstart)) as periodtrackdiff
 	,sum(ws.workhours::interval) over (order by ws.weekstart) as runningworkhours
-	,interval_to_char(ttr.weektrackedhours - ws.periodworkhours::interval) as trackeddiff
+	,interval_to_char(coalesce(ttr.weektrackedhours,'00:00:00'::interval) - ws.periodworkhours::interval) as trackeddiff
   ,case when cd.contractworkdays < cd.cmpcontractdays then to_char(cd.contractworkdays*'08:00:00'::interval,'HH24:MI') else to_char(cd.contracthours,'HH24:MI') end as contracthours
   ,to_char(AVG(ws.totalhours) over (order by ws.weekstart),'HH24:MI') as avgtotalhours
   ,case when cd.contractworkdays < cd.cmpcontractdays then '00:00' else interval_to_char(ws.totalhours-cd.contracthours) end as diffhours
@@ -189,7 +190,8 @@ function getPeriodWeekSums($schema,$id_staff, $date_start,$date_end,$id_period){
   from (
   SELECT weekstart,weekend,calweek,calyear, id_staff,
                     sum(CASE WHEN srpd.workhours IS NULL THEN '00:00:00'::interval ELSE srpd.workhours::interval END) AS workhours,
-                    sum(case when srpd.daydate between date('".$pstart."') and date('".$pend."') then coalesce(srpd.workhours::interval, '00:00:00'::interval) + case when srpd.workhours::interval > '06:00:00'::interval and srpd.timepause is null then '00:30:00'::interval else coalesce(srpd.timepause::interval,'00:00:00'::interval) end else '00:00:00'::interval end) as periodworkhours,
+                    sum(case when srpd.daydate between date('".$pstart."') and date('".$pend."') then coalesce(srpd.workhours::interval, '00:00:00'::interval)  else '00:00:00'::interval end) as periodworkhours,
+                    --sum(case when srpd.daydate between date('".$pstart."') and date('".$pend."') then coalesce(srpd.workhours::interval, '00:00:00'::interval) else '00:00:00'::interval end) as periodworkhoursnopause,
                     sum(CASE WHEN srpd.vacancyhours IS NULL THEN '00:00:00'::interval ELSE srpd.vacancyhours::interval END) AS vacancyhours,
                     sum(CASE WHEN srpd.vacillhours IS NULL THEN '00:00:00'::interval ELSE srpd.vacillhours::interval END) AS vacillhours,
                     sum(CASE WHEN srpd.vacextrahours IS NULL THEN '00:00:00'::interval ELSE srpd.vacextrahours::interval END) AS vacextrahours,
@@ -229,11 +231,95 @@ function getPeriodWeekSums($schema,$id_staff, $date_start,$date_end,$id_period){
   where id_staff='".$id_staff."' and lpd.daydate between date('".$date_start."') and date('".$date_end."')
   order by lpd.daydate ) mh group by id_staff,weekstart
   ) maxdata on ws.id_staff = maxdata.id_staff and ws.weekstart=maxdata.weekstart
-  left join (select weekstart,id_staff,sum(trackedhours) as weektrackedhours from (
-    select date(date_trunc('week',daydate)) as weekstart,id_staff,(stamp_out-stamp_in)::interval as trackedhours from ".$schema.".timetracker 
-    where daydate between date('".$pstart."') and date('".$pend."') and id_staff ='".$id_staff."') ttx group by weekstart,id_staff
-    ) ttr on ws.weekstart=ttr.weekstart and ws.id_staff=ttr.id_staff";
-  //file_put_contents("sql.log","WS: ".$sql,FILE_APPEND);
+  left join (
+  select weekstart,id_staff,coalesce(sum(daytracked),'00:00:00'::interval) as weektrackedhours from (
+    select daydate,id_staff,weekstart,case when sum(trackedhours) > '06:00:00'::interval then sum(trackedhours)- '00:30:00'::interval else coalesce(sum(trackedhours),'00:00:00'::interval) end as daytracked from (
+select daydate,date(date_trunc('week',daydate)) as weekstart,id_staff,(stamp_out-stamp_in)::interval as trackedhours from ".$schema.".timetracker 
+where daydate between date('".$pstart."') and date('".$pend."') and id_staff ='".$id_staff."') tto group by daydate,id_staff,weekstart,trackedhours) ttx group by weekstart,id_staff
+    ) ttr on ws.weekstart=ttr.weekstart and ws.id_staff=ttr.id_staff;";
+
+
+  // $sql = "select ws.weekstart,ws.weekend,ws.calweek,ws.calyear, ws.id_staff
+  // ,to_char(ws.workhours::interval,'HH24:MI') as workhours
+  // --,to_char(ws.vacancyhours+ws.vacillhours+ws.vacextrahours,'HH24:MI') as vacancyhours
+  // ,to_char(ws.vacancyhours,'HH24:MI') as vacancynormal
+  // ,to_char(ws.vacillhours,'HH24:MI') as vacancyill
+  // ,to_char(ws.vacextrahours,'HH24:MI') as vacancyextra
+  // ,to_char(ws.otherpaidhours,'HH24:MI') as otherpaidhours
+  // ,to_char(ws.partunemplhours,'HH24:MI') as partunemplhours
+  // ,to_char(ws.recuperationhours,'HH24:MI') as recuperationhours
+  // ,to_char(ws.totalhours,'HH24:MI') as totalhours
+  // ,cd.contractworkdays
+  // ,cd.cmpcontractdays
+  // ,cd.cmpweekhours
+  // ,to_char(coalesce(ttr.weektrackedhours,'00:00:00'::interval),'HH24:MI') as weektrackedhours
+  // ,ws.periodworkhours
+	// ,interval_to_char(sum(coalesce(ttr.weektrackedhours,'00:00:00'::interval)) over (order by ws.weekstart) - sum(ws.periodworkhours::interval) over (order by ws.weekstart)) as periodtrackdiff
+	// ,sum(ws.workhours::interval) over (order by ws.weekstart) as runningworkhours
+	// ,interval_to_char(coalesce(ttr.weektrackedhours,'00:00:00'::interval) - ws.periodworkhours::interval) as trackeddiff
+  // ,case when cd.contractworkdays < cd.cmpcontractdays then to_char(cd.contractworkdays*'08:00:00'::interval,'HH24:MI') else to_char(cd.contracthours,'HH24:MI') end as contracthours
+  // ,to_char(AVG(ws.totalhours) over (order by ws.weekstart),'HH24:MI') as avgtotalhours
+  // ,case when cd.contractworkdays < cd.cmpcontractdays then '00:00' else interval_to_char(ws.totalhours-cd.contracthours) end as diffhours
+  // ,case when cd.contractworkdays < cd.cmpcontractdays then 
+  // 	to_char(case when cd.cmpweekhours < '40:00:00'::interval then cd.contracthours * 1.15 *  cd.contractworkdays else (cd.contractworkdays*'08:00:00'::interval) + (cd.contractworkdays* case when maxdata.maxweekhours > '48:00:00' then '01:16:50'::interval else '00:50:00'::interval end)  end,'HH24:MI') 
+  // 	else
+  // to_char(case when cd.contracthours < '40:00:00'::interval then cd.contracthours * 1.15  else maxdata.maxweekhours end,'HH24:MI')
+  // end  as maxweekhours
+  // ,case when cd.contractworkdays < cd.cmpcontractdays then to_char(cd.contractworkdays*'08:00:00'::interval,'HH24:MI') else 
+  // 	to_char(case when cd.contracthours < '40:00:00'::interval then cd.contracthours else maxdata.defaultweekhours end,'HH24:MI') 
+  //  end as defaultweekhours
+  // from (
+  // SELECT weekstart,weekend,calweek,calyear, id_staff,
+  //                   sum(CASE WHEN srpd.workhours IS NULL THEN '00:00:00'::interval ELSE srpd.workhours::interval END) AS workhours,
+  //                   sum(case when srpd.daydate between date('".$pstart."') and date('".$pend."') then coalesce(srpd.workhours::interval, '00:00:00'::interval) + case when srpd.workhours::interval > '06:00:00'::interval and srpd.timepause is null then '00:30:00'::interval else coalesce(srpd.timepause::interval,'00:00:00'::interval) end else '00:00:00'::interval end) as periodworkhours,
+  //                   sum(case when srpd.daydate between date('".$pstart."') and date('".$pend."') then coalesce(srpd.workhours::interval, '00:00:00'::interval) else '00:00:00'::interval end) as periodworkhoursnopause,
+  //                   sum(CASE WHEN srpd.vacancyhours IS NULL THEN '00:00:00'::interval ELSE srpd.vacancyhours::interval END) AS vacancyhours,
+  //                   sum(CASE WHEN srpd.vacillhours IS NULL THEN '00:00:00'::interval ELSE srpd.vacillhours::interval END) AS vacillhours,
+  //                   sum(CASE WHEN srpd.vacextrahours IS NULL THEN '00:00:00'::interval ELSE srpd.vacextrahours::interval END) AS vacextrahours,
+  //                   sum(CASE WHEN srpd.recuperationhours IS NULL THEN '00:00:00'::interval ELSE srpd.recuperationhours::interval END) AS recuperationhours,
+  //                   sum(CASE WHEN srpd.otherpaidhours IS NULL THEN '00:00:00'::interval ELSE srpd.otherpaidhours::interval END) AS otherpaidhours,
+  //                   sum(CASE WHEN srpd.partunemplhours IS NULL THEN '00:00:00'::interval ELSE srpd.partunemplhours::interval END) AS partunemplhours,
+  //                   sum(CASE WHEN srpd.dayhours IS NULL THEN '00:00:00'::interval ELSE srpd.dayhours::interval END) AS totalhours,
+  //                   sum(CASE WHEN srpd.workhours > '00:00:00'::time without time zone OR srpd.recuperationhours > '00:00:00'::time without time zone OR srpd.vacancyhours > '00:00:00'::time without time zone OR srpd.vacillhours > '00:00:00'::time without time zone OR srpd.vacextrahours > '00:00:00'::time without time zone OR srpd.otherpaidhours > '00:00:00'::time without time zone or srpd.partunemplhours > '00:00:00'::time without time zone THEN 1 ELSE 0 END) AS workdays,
+  //                   sum( CASE WHEN srpd.contracthours IS NULL THEN '00:00:00'::interval ELSE srpd.contracthours::interval END) AS contracthours
+  //                  FROM (select *,date(date_trunc('week', daydate)) AS weekstart,
+  //                   date(date_trunc('week', daydate) + interval '6 days') AS weekend,
+  //                   date_part('week', daydate) AS calweek,
+  //                   date_part('isoyear', daydate) AS calyear from ".$schema.".staffreportperioddays
+  //                   where id_staff= '".$id_staff."' and daydate between date('".$date_start."') and date('".$date_end."')
+  //                   ) srpd GROUP BY srpd.weekstart,srpd.weekend,srpd.calweek,srpd.calyear,srpd.id_staff
+  //                 ORDER BY weekstart) ws left join (
+  //                   select date(date_trunc('week',pd.daydate)) as weekstart,pd.id_staff,max(sc.weekdays) as cmpcontractdays,max(sc.weekhours) as cmpweekhours,
+  // case when count(pd.daydate) < avg(sc.weekdays) then count(pd.daydate) else avg(sc.weekdays) end as contractworkdays, 
+  // case when count(pd.daydate) < avg(sc.weekdays) then avg(sc.weekhours/ sc.weekdays) *  count(pd.daydate) else avg(sc.weekhours/ sc.weekdays) * avg(sc.weekdays) end as contracthours ,sum(case when coalesce(pd.workhours,'00:00:00'::time) > '00:00:00'::time then 1 else 0 end) as realworkdays
+  // from ( select id_staff,weekdays ,weekhours,
+  //   case when startdate> date('".$date_start."') then startdate else date('".$date_start."') end  as staffperiodstart, 
+  //   case when enddate is null or enddate > date('".$date_end."') then date('".$date_end."')
+  //   else enddate end as staffperiodend from ".$schema.".staffcontract where id_staff='".$id_staff."' 
+  //   and startdate < date('".$date_end."')
+  // ) sc 
+  // join ".$schema.".staffreportperioddays pd on (pd.id_staff=sc.id_staff and pd.daydate between sc.staffperiodstart and sc.staffperiodend)
+  // group by date(date_trunc('week',pd.daydate)),pd.id_staff
+  //                 ) cd on ws.id_staff = cd.id_staff and ws.weekstart=cd.weekstart
+  // left join (
+  //   select id_staff,weekstart,max(defaultweekhours) as defaultweekhours,avg(maxweekhours) as maxweekhours from (
+  // select lpd.id_staff,date(date_trunc('week',lpd.daydate)) as weekstart,lpd.daydate,
+  // case when wk.defaultweekhours is null then wkdef.defaultweekhours else wk.defaultweekhours end as defaultweekhours ,
+  // case when wk.maxweekhours is null then wkdef.maxweekhours else wk.maxweekhours end as maxweekhours 
+  // from ".$schema.".staffreportperioddays lpd
+  // left join ".$schema.".worktimes wk on (lpd.daydate between wk.startdate and wk.enddate)
+  // cross join (select * from ".$schema.".worktimes where isdefault=true) wkdef
+  // where id_staff='".$id_staff."' and lpd.daydate between date('".$date_start."') and date('".$date_end."')
+  // order by lpd.daydate ) mh group by id_staff,weekstart
+  // ) maxdata on ws.id_staff = maxdata.id_staff and ws.weekstart=maxdata.weekstart
+  // left join (select weekstart,id_staff,sum(trackedhours) as weektrackedhours from (
+  //   select weekstart,id_staff,coalesce(sum(daytracked),'00:00:00'::interval) as weektrackedhours from (
+  //     select daydate,id_staff,weekstart,case when sum(trackedhours) > '06:00:00'::interval then sum(trackedhours)- '00:30:00'::interval else coalesce(sum(trackedhours),'00:00:00'::interval) end as daytracked from (
+  // select daydate,date(date_trunc('week',daydate)) as weekstart,id_staff,(stamp_out-stamp_in)::interval as trackedhours from ".$schema.".timetracker 
+  // where daydate between date('".$pstart."') and date('".$pend."') and id_staff ='".$id_staff."') tto group by daydate,id_staff,weekstart,trackedhours) ttx group by weekstart,id_staff
+  //   ) ttr on ws.weekstart=ttr.weekstart and ws.id_staff=ttr.id_staff";
+  
+  file_put_contents("sql.log","WS: ".$sql);
   
   $ret = $this->dbh->querybykey('weekstart',$sql);
 
@@ -275,7 +361,7 @@ function getPeriodDays($schema,$id_staff,$date_start,$date_end){
             to_char(coalesce(max(wk.mindailyrecuperation),max(wkstd.mindailyrecuperation)),'HH24:MI') as mindailyrecuperation,
             to_char(coalesce(max(wk.maxinterruptionhours),max(wkstd.maxinterruptionhours)),'HH24:MI') as maxinterruptionhours,
             max(vd.vacancyname) as vacancyname,
-            to_char(case when pd.workhours >= '06:00:00'::interval and pd.payedpause is null and max(tt.trackedtime) > '00:30:00'::interval then max(tt.trackedtime) - case when pd.timepause::interval > '00:30:00'::interval then pd.timepause::interval else '00:30:00'::interval end else max(tt.trackedtime) end,'HH24:MI') as trackedtime,
+            to_char(case when (max(tt.trackedtime) >= '06:00:00'::interval) then max(tt.trackedtime) - case when pd.timepause::interval > '00:30:00'::interval then pd.timepause::interval else '00:30:00'::interval end else max(tt.trackedtime) end,'HH24:MI') as trackedtime,
             max(tt.incompletetrack) as incompletetrack
             FROM ".$schema.".staffreportperioddays pd
              JOIN ".$schema.".staff st ON pd.id_staff = st.id and st.id='".$id_staff."' and st.isdeleted is null
diff --git a/app/lib/POT/TimeTracker.php b/app/lib/POT/TimeTracker.php
index e86c7953..fca6c875 100644
--- a/app/lib/POT/TimeTracker.php
+++ b/app/lib/POT/TimeTracker.php
@@ -173,24 +173,48 @@ public function setTracker($schema,$tracker,$data){
 
  public function getWeekStamps($schema,$date){
   
-   $xsql = "select yy.id_staff,yy.staffname,xx.cw,xx.montime,xx.tuetime,xx.wedtime,xx.thutime,xx.fritime,xx.sattime,xx.suntime,xx.weeksum from (
-    select st.id as id_staff,st.surname || ' ' || st.prename as staffname  from ".$schema.".staffcontract sc  join ".$schema.".staff st on (st.id=sc.id_staff) 
+   $xsql = "select yy.id_staff,yy.staffname,yy.groupname,xx.cw,
+   xx.montime,xx.monentry,xx.monexit,
+   xx.tuetime,xx.tueentry,xx.tueexit,
+   xx.wedtime,xx.wedentry,xx.wedexit,
+   xx.thutime,xx.thuentry,xx.thuexit,
+   xx.fritime,xx.frientry,xx.friexit,
+   xx.sattime,xx.satentry,xx.satexit,
+   xx.suntime,xx.sunentry,xx.sunexit,
+    xx.weeksum from (
+    select st.id as id_staff,st.surname || ' ' || st.prename as staffname,gg.groupname  from ".$schema.".staffcontract sc  join ".$schema.".staff st on (st.id=sc.id_staff) left join ".$schema.".staffgroups gg on (gg.id=st.id_staffgroup)
     where (sc.enddate >= date_trunc('week',date('".$date."') + interval '6 days') or enddate is null) and sc.startdate <= date_trunc('week',date('".$date."') + interval '6 days')
     and st.isdeleted is null
-    group by st.id,st.surname,st.prename) yy left join (
+    group by st.id,st.surname,st.prename,gg.groupname) yy left join (
     select id_staff,cw,
-       to_char(sum(case when dow = 1 then daystamptime else null end),'HH24:MI') as montime,
-       to_char(sum(case when dow = 2 then daystamptime else null end),'HH24:MI') as tuetime,
-       to_char(sum(case when dow = 3 then daystamptime else null end),'HH24:MI') as wedtime,
-       to_char(sum(case when dow = 4 then daystamptime else null end),'HH24:MI') as thutime,
-       to_char(sum(case when dow = 5 then daystamptime else null end),'HH24:MI') as fritime,
-       to_char(sum(case when dow = 6 then daystamptime else null end),'HH24:MI') as sattime,
-       to_char(sum(case when dow = 7 then daystamptime else null end),'HH24:MI') as suntime,
+    to_char(sum(case when dow = 1 then daystamptime else null end),'HH24:MI') as montime,
+    min(case when dow = 1 then timeentry else null end) as monentry,
+    max(case when dow = 1 then timeexit else null end) as monexit,
+    to_char(sum(case when dow = 2 then daystamptime else null end),'HH24:MI') as tuetime,
+    min(case when dow = 2 then timeentry else null end) as tueentry,
+    max(case when dow = 2 then timeexit else null end) as tueexit,
+    to_char(sum(case when dow = 3 then daystamptime else null end),'HH24:MI') as wedtime,
+    min(case when dow = 3 then timeentry else null end) as wedentry,
+    max(case when dow = 3 then timeexit else null end) as wedexit,
+    to_char(sum(case when dow = 4 then daystamptime else null end),'HH24:MI') as thutime,
+    min(case when dow = 4 then timeentry else null end) as thuentry,
+    max(case when dow = 4 then timeexit else null end) as thuexit,
+    to_char(sum(case when dow = 5 then daystamptime else null end),'HH24:MI') as fritime,
+    min(case when dow = 5 then timeentry else null end) as frientry,
+    max(case when dow = 5 then timeexit else null end) as friexit,
+    to_char(sum(case when dow = 6 then daystamptime else null end),'HH24:MI') as sattime,
+    min(case when dow = 6 then timeentry else null end) as satentry,
+    max(case when dow = 6 then timeexit else null end) as satexit,
+    to_char(sum(case when dow = 7 then daystamptime else null end),'HH24:MI') as suntime,
+    min(case when dow = 7 then timeentry else null end) as sunentry,
+    max(case when dow = 7 then timeexit else null end) as sunexit,
        to_char(sum(daystamptime),'HH24:MI') as weeksum
         from (
        select id_staff, 
        date_part('week',daydate) as cw,
-       sum(coalesce((stamp_out-stamp_in)::interval,'00:00:00')) as daystamptime, 
+       to_char(min(stamp_in),'HH24:MI') as timeentry,
+       to_char(max(stamp_out),'HH24:MI') as timeexit,
+       case when sum(coalesce((stamp_out-stamp_in)::interval,'00:00:00')) >= '06:00:00'::interval then sum(coalesce((stamp_out-stamp_in)::interval,'00:00:00')) - '00:30:00'::interval else sum(coalesce((stamp_out-stamp_in)::interval,'00:00:00')) end as daystamptime,
        date_part('isodow',daydate) as dow,daydate
        from ".$schema.".timetracker tt where tt.daydate between date_trunc('week',date('".$date."')) and date(date_trunc('week',date('".$date."')) + interval '6 days') group by tt.id_staff,daydate
        ) ttd group by id_staff,cw) xx on yy.id_staff=xx.id_staff;";
diff --git a/app/lib/config.php b/app/lib/config.php
index 5090ecd4..156d4a09 100644
--- a/app/lib/config.php
+++ b/app/lib/config.php
@@ -1,13 +1,12 @@
  '1.4.0',
     "basepath" => substr(dirname($_SERVER["SCRIPT_FILENAME"]),strlen($_SERVER["DOCUMENT_ROOT"])).'/',
     "templatepath" => "tmpl/",
     "webdocroot" => $_SERVER["DOCUMENT_ROOT"].'/'.substr(dirname($_SERVER["SCRIPT_FILENAME"]),strlen($_SERVER["DOCUMENT_ROOT"])).'/',
     "cache" => "data/cache/",
     "datapath" => "data/output/",
     "liveurl" => "https://dks-pc1/potapp/",
-    "cookie" => "potlu140",
+    //"cookie" => "potlu140",
     "db"=> array(
       "type" => "pgsql",
       "host" => "dks-pc1",
@@ -18,9 +17,9 @@
     "htxuser" => "htx",
     "htxpwd" => "Aib5aevo",
     "htxurl" => "https://htx.plandutravail.lu/htx/api.php",
-    "curlua" => "POT Local Test Server",
-    //"liveurl" => "https://app.plandutravail.lu",
-    // "cookie" => "potlu140",
+    "curlua" => "POT Server",
+    // "liveurl" => "https://app.plandutravail.lu",
+    "cookie" => "potlu140",
     // "db"=> array(
     //   "type" => "pgsql",
     //   "host" => "sql12.your-server.de",
@@ -28,7 +27,7 @@
     //   "user" => 'potlu2_user',
     //   "password" => 'dMY8xGB6cBLzrDGE',
     // ),
-    // "liveurl" => "https://beta.plandutravail.lu",
+    // // "liveurl" => "https://beta.plandutravail.lu",
     // "cookie" => "potlubeta",
     // "db"=> array(
     //   "type" => "pgsql",
@@ -44,5 +43,5 @@
     "version" => date("YmdHis"),
     "minify" => "",
   );
-
+  require_once("lib/version.php");
 ?>
\ No newline at end of file
diff --git a/app/lib/version.php b/app/lib/version.php
new file mode 100644
index 00000000..7df12f16
--- /dev/null
+++ b/app/lib/version.php
@@ -0,0 +1,3 @@
+
\ No newline at end of file
diff --git a/app/manifest.webmanifest b/app/manifest.webmanifest
index 02f2f55c..9787eaf3 100644
--- a/app/manifest.webmanifest
+++ b/app/manifest.webmanifest
@@ -3,43 +3,43 @@
  "short_name": "POT",
  "icons": [
   {
-   "src": "/static/img/favicon/android-icon-36x36.png",
+   "src": "/img/favicon/android-icon-36x36.png",
    "sizes": "36x36",
    "type": "image/png",
    "density": "0.75"
   },
   {
-   "src": "/static/img/favicon/android-icon-48x48.png",
+   "src": "/img/favicon/android-icon-48x48.png",
    "sizes": "48x48",
    "type": "image/png",
    "density": "1.0"
   },
   {
-   "src": "/static/img/favicon/android-icon-72x72.png",
+   "src": "/img/favicon/android-icon-72x72.png",
    "sizes": "72x72",
    "type": "image/png",
    "density": "1.5"
   },
   {
-   "src": "/static/img/favicon/android-icon-96x96.png",
+   "src": "/img/favicon/android-icon-96x96.png",
    "sizes": "96x96",
    "type": "image/png",
    "density": "2.0"
   },
   {
-   "src": "/static/img/favicon/android-icon-144x144.png",
+   "src": "/img/favicon/android-icon-144x144.png",
    "sizes": "144x144",
    "type": "image/png",
    "density": "3.0"
   },
   {
-   "src": "/static/img/favicon/android-icon-192x192.png",
+   "src": "/img/favicon/android-icon-192x192.png",
    "sizes": "192x192",
    "type": "image/png",
    "density": "4.0"
   },
   {
-    "src": "/static/img/favicon/android-icon-512x512.png",
+    "src": "/img/favicon/android-icon-512x512.png",
     "sizes": "512x512",
     "type": "image/png",
     "density": "4.0"
diff --git a/app/test.php b/app/test.php
deleted file mode 100644
index 2984c648..00000000
--- a/app/test.php
+++ /dev/null
@@ -1,4 +0,0 @@
-
\ No newline at end of file
diff --git a/app/tmpl/block/dlgstaffperioddays.html b/app/tmpl/block/dlgstaffperioddays.html
index 67d8005e..49da3ed8 100644
--- a/app/tmpl/block/dlgstaffperioddays.html
+++ b/app/tmpl/block/dlgstaffperioddays.html
@@ -187,7 +187,8 @@
                       
                   
                 
-                
+                
+                
                   {{ lbl.partunempl }}
                   
                     
@@ -197,6 +198,7 @@
                       
                   
                 
+                
                 
                   {{ lbl.otherpaidhours }}
                   
diff --git a/app/tmpl/module/admin/users.js b/app/tmpl/module/admin/users.js
index 9c0ebb38..1e7735fe 100644
--- a/app/tmpl/module/admin/users.js
+++ b/app/tmpl/module/admin/users.js
@@ -232,9 +232,9 @@ let users ={
       delete flds["ident_users_id_users"];
     }
     
-    console.log("userdata",flds);
+    //console.log("userdata",flds);
     postData("db.php",flds).then(data2 => {
-      console.log("data returned",data2);
+      //console.log("data returned",data2);
       users.gettbldata();
       document.getElementById('dlg_users').style.display='none';
       dataform.formsaved(null); 
diff --git a/app/tmpl/module/index.html b/app/tmpl/module/index.html
index d9bb72e9..53b42999 100644
--- a/app/tmpl/module/index.html
+++ b/app/tmpl/module/index.html
@@ -28,7 +28,9 @@
       
{{ lbl.refperiods }} {{ lbl.staff }} - {{ lbl.timetracker }} + {% if cmpcfg.timetrackertype == 'pot' %} + {{ lbl.timetracker }} + {% endif %}
diff --git a/app/tmpl/module/index/index.js b/app/tmpl/module/index/index.js index f37858d1..1ab51741 100644 --- a/app/tmpl/module/index/index.js +++ b/app/tmpl/module/index/index.js @@ -25,7 +25,7 @@ let index = { }, gettermsstatus: function(){ postData("db.php",{"get":"termsstatus"}).then(data => { - console.log("termsstatus",data); + //console.log("termsstatus",data); if (data.result.data.terms != "1"){ document.getElementById("dlg_terms").style.display = 'block'; } diff --git a/app/tmpl/module/js/app.js b/app/tmpl/module/js/app.js index a3e98746..4741e7dd 100644 --- a/app/tmpl/module/js/app.js +++ b/app/tmpl/module/js/app.js @@ -93,7 +93,7 @@ document.addEventListener("DOMContentLoaded", function() { if ("serviceWorker" in navigator) { window.addEventListener("load", function() { navigator.serviceWorker - .register("/static/js/sw.js") + .register("/js/sw.js") .then(res => console.log("service worker registered")) .catch(err => console.log("service worker not registered", err)) }) diff --git a/app/tmpl/module/js/dataform.js b/app/tmpl/module/js/dataform.js index 722b9ff4..e2202273 100644 --- a/app/tmpl/module/js/dataform.js +++ b/app/tmpl/module/js/dataform.js @@ -147,9 +147,13 @@ cleanform2: function(frmname,choices){ } if (frm[f].tagName == 'SELECT'){ if (frm[f].multiple == true){ - if (frm[f].classList.contains("choices__input")){ - choices[frm[f].id].removeActiveItems(); + //console.log("clean multiple",choices[frm[f].id]); + if (choices[frm[f].id]){ + choices[frm[f].id].set([]); } + // if (frm[f].classList.contains("choices__input")){ + // choices[frm[f].id].removeActiveItems(); + // } } else { frm[f].value = ""; } @@ -204,6 +208,14 @@ fillformbydataclass2: function(dataclass,choices,data,onblur){ frm[f].value=data[frm[f].id]; } } + if (frm[f].tagName == 'TEXTAREA'){ + if (frm[f].classList.contains("richeditarea")){ + choices[frm[f].id].setContents(data[frm[f].id]); + //tinymce.get(frm[f].id).setContent(""); + } else { + frm[f].innerHTML = data[frm[f].id]; + } + } } } } @@ -245,9 +257,9 @@ savefielddata: function(obj,objdata,callback){ fdata["save"] = "field"; fdata["schemata"] = schemata; fdata["value"] = objdata; - console.log("savefielddata",fdata); - if (callback){} - //postData("db.php",fdata).then(data => { if (callback){callback(data);}}); + //console.log("savefielddata",fdata); + //if (callback){} + postData("db.php",fdata).then(data => { if (callback){callback(data);}}); }, saveschemafield: function(obj,schema){ fdata = obj.dataset; diff --git a/app/tmpl/module/js/request.js b/app/tmpl/module/js/request.js index 9e7cf5d4..efbf691c 100644 --- a/app/tmpl/module/js/request.js +++ b/app/tmpl/module/js/request.js @@ -1,6 +1,7 @@ -var api = location.origin + '/'; +var api = location.origin + '/potapp/'; + // var api2 = location.origin + '/'; -// console.log("API 2",api2); +//console.log("API 2",api); var Base64={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode:function(e){var t="";var n,r,i,s,o,u,a;var f=0;e=Base64._utf8_encode(e);while(f>2;o=(n&3)<<4|r>>4;u=(r&15)<<2|i>>6;a=i&63;if(isNaN(r)){u=a=64}else if(isNaN(i)){a=64}t=t+this._keyStr.charAt(s)+this._keyStr.charAt(o)+this._keyStr.charAt(u)+this._keyStr.charAt(a)}return t},decode:function(e){var t="";var n,r,i;var s,o,u,a;var f=0;e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");while(f>4;r=(o&15)<<4|u>>2;i=(u&3)<<6|a;t=t+String.fromCharCode(n);if(u!=64){t=t+String.fromCharCode(r)}if(a!=64){t=t+String.fromCharCode(i)}}t=Base64._utf8_decode(t);return t},_utf8_encode:function(e){e=e.replace(/\r\n/g,"\n");var t="";for(var n=0;n127&&r<2048){t+=String.fromCharCode(r>>6|192);t+=String.fromCharCode(r&63|128)}else{t+=String.fromCharCode(r>>12|224);t+=String.fromCharCode(r>>6&63|128);t+=String.fromCharCode(r&63|128)}}return t},_utf8_decode:function(e){var t="";var n=0;var r=c1=c2=0;while(n191&&r<224){c2=e.charCodeAt(n+1);t+=String.fromCharCode((r&31)<<6|c2&63);n+=2}else{c2=e.charCodeAt(n+1);c3=e.charCodeAt(n+2);t+=String.fromCharCode((r&15)<<12|(c2&63)<<6|c3&63);n+=3}}return t}} async function postData(url = '', data = {}) { diff --git a/app/tmpl/module/periods/periodvalidation.js b/app/tmpl/module/periods/periodvalidation.js index 03b0271c..e3c48df4 100644 --- a/app/tmpl/module/periods/periodvalidation.js +++ b/app/tmpl/module/periods/periodvalidation.js @@ -11,7 +11,7 @@ let periodvalidation = { } if (prd[0]){ - console.log("perioddata",prd[0]); + //console.log("perioddata",prd[0]); if (prd[0].isvalidated != null){ // console.log("invalidate show"); document.getElementById("btn_invalidateperiod").style.display = 'inline'; diff --git a/app/tmpl/module/periods/reportperiod.js b/app/tmpl/module/periods/reportperiod.js index 67dcde10..52fc225d 100644 --- a/app/tmpl/module/periods/reportperiod.js +++ b/app/tmpl/module/periods/reportperiod.js @@ -91,7 +91,7 @@ let reportperiod ={ /*{% endif %} */ {title: '{{ lbl.avgweek_short }}',width: 60, field:"avgtotalweekhours",hozAlign:"right",headerSort: false,formatter:periodAVGFormatter}, {title: '{{ lbl.validated }}',width: 40, field:"isvalidated",hozAlign:"center",headerSort: false,formatter:"tickCross", formatterParams:{allowEmpty:true,allowTruthy: false},headerVertical:true}, - /*{% if session.usergorup == "admin" %}*/ + /*{% if session.usergroup == "admin" %}*/ {title: '{{ lbl.maxdays }}',width: 60, field:"maxdays",hozAlign:"center",headerSort: false} /*{% endif %}*/ ] diff --git a/app/tmpl/module/periods/staffperiodweeks.js b/app/tmpl/module/periods/staffperiodweeks.js index 7b745511..9cf98e14 100644 --- a/app/tmpl/module/periods/staffperiodweeks.js +++ b/app/tmpl/module/periods/staffperiodweeks.js @@ -19,8 +19,7 @@ let staffperiodweeks = { initform: function(){ staffperiodweeks.choices["id_workplan"] = new SlimSelect({ select: "#id_workplan", - showSearch: false, - + showSearch: false }); // staffperiodweeks.getvacancy(); // staffperiodweeks.getrecuperation(); @@ -83,11 +82,12 @@ let staffperiodweeks = { {title: '{{ lbl.partunempl }}',width:90, field:"partunemplhours",hozAlign:"right",headerSort: false}, { title: "{{ lbl.recuperation_short }}",field: "recuperationhours",hozAlign:"center",headerSort: false,formatter:recupformatter,bottomCalc:staffperiodweeks.setweekrecuperationhours}, { title: "{{ lbl.total|raw }}",field: "dayhours",hozAlign:"center",headerSort: false,formatter:totalFormatter,bottomCalc:staffperiodweeks.setweektotalhours,bottomCalcFormatter:"html"}, - { title: "{{ lbl.diffcontract|raw }}",field:"diffhours",hozAlign:"center",formatter:nullFormatter,headerSort:false,bottomCalc:staffperiodweeks.setweekdiffhours}, - { title: "{{ lbl.avgweek_short }}",field: "avgweekhours",hozAlign:"center",headerSort: false,formatter:nullFormatter,bottomCalc:staffperiodweeks.setavgweekhours}, - { title: "{{ lbl.resttime }}",field: "freehoursafter",hozAlign:"center",formatter:freetimeFormatter,headerSort: false}, - { title: "{{ lbl.timetracks }}",field:"trackedtime",hozAlign:"center",formatter:timetrackFormatter,headerSort: false,bottomCalc:staffperiodweeks.settotaltrackhours}, - { title: "{{ lbl.trackdiff }}",field:"periodtrackdiff",formatter:nullFormatter,headerSort:false,bottomCalc:staffperiodweeks.settrackeddiffhours} + // { title: '{{ lbl.diffcontract|raw }}',field:"diffhours",hozAlign:"center",formatter:nullFormatter,headerSort:false,bottomCalc:staffperiodweeks.setweekdiffhours}, + { title: '{{ lbl.avgweek_short }}',field: "avgweekhours",hozAlign:"center",headerSort: false,formatter:nullFormatter,bottomCalc:staffperiodweeks.setavgweekhours}, + { title: '{{ lbl.resttime }}',field: "freehoursafter",hozAlign:"center",formatter:freetimeFormatter,headerSort: false}, + { title: '{{ lbl.timetracks }}',field:"trackedtime",hozAlign:"center",formatter:timetrackFormatter,headerSort: false,bottomCalc:staffperiodweeks.settotaltrackhours,tooltip:true}, + { title: '{{ lbl.trackdiff }}',field:"periodtrackdiff",formatter:nullFormatter,headerSort:false,bottomCalc:staffperiodweeks.settrackeddiffhours}, + { title: 'Diff Woche',field:"trackeddiff",formatter:nullFormatter,headerSort:false,bottomCalc:staffperiodweeks.setweektrackdiff} ] }); staffperiodweeks.tblfooter = new Tabulator("#tbl_staffperiodfooter", { @@ -108,8 +108,10 @@ let staffperiodweeks = { {title: '{{ lbl.statementtransfered3 }}',width: 80, field:"transferedhours",hozAlign:"right",headerSort: false}, {title: '{{ lbl.supphourspayed2 }}',width: 80, field:"payedhours",hozAlign:"right",headerSort: false} , {title: '{{ lbl.finalstatementpot2 }}',width: 90, field:"hoursdiff",hozAlign:"right",headerSort: false}, + /*{% if cmpcfg.sector == "HORESCA" %} */ {title: '{{ lbl.supp44h3 }}',width: 70, field:"suppvacancy44hours",hozAlign:"right",headerSort: false}, {title: '{{ lbl.suppsunwork2 }}',width: 70, field:"suppvacancysunwork",hozAlign:"right",headerSort: false}, + /*{% endif %} */ {title: '{{ lbl.avgweek_short2 }}',width: 100, field:"avgtotalweekhours",hozAlign:"right",headerSort: false,formatter:periodAVGFormatter}, {title: '{{ lbl.validated2 }}',width: 60, field:"isvalidated",hozAlign:"center",headerSort: false,formatter:"tickCross", formatterParams:{allowEmpty:true,allowTruthy: false}} @@ -269,6 +271,10 @@ let staffperiodweeks = { if (staffperiodweeks.weekdata && staffperiodweeks.weekdata[data[0].weekstart]) {return staffperiodweeks.weekdata[data[0].weekstart].periodtrackdiff;} return ""; }, + setweektrackdiff: function(values, data, calcParams){ + if (staffperiodweeks.weekdata && staffperiodweeks.weekdata[data[0].weekstart]) {return staffperiodweeks.weekdata[data[0].weekstart].trackeddiff;} + return ""; + }, setavgweekhours: function(values, data, calcParams){ if (staffperiodweeks.weekdata && staffperiodweeks.weekdata[data[0].weekstart]) {return staffperiodweeks.weekdata[data[0].weekstart].avgtotalhours;} return ""; @@ -296,7 +302,7 @@ let staffperiodweeks = { // document.getElementById("vacextracomment").value=''; // document.getElementById("recupcomment").value=''; // document.getElementById("partunempcomment").value=''; - console.log("CDAY",staffperiodweeks.currentday); + //("CDAY",staffperiodweeks.currentday); dataform.fillformbydataclass2("staffreportperioddays",staffperiodweeks.choices,staffperiodweeks.currentday); document.getElementById("display_date").innerHTML=moment(staffperiodweeks.currentday.daydate).format("dddd , DD.MM.YYYY"); //document.getElementById("display_staffname").innerHTML=selrp[0].staffname; @@ -329,7 +335,7 @@ let staffperiodweeks = { delete wpdata.staffreportperioddays_dayhours; wpdata["fn"] ="saveform";wpdata["table"]="staffreportperioddays"; wpdata["schemata"] = schemata; - console.log(wpdata); + //console.log(wpdata); showdataloaddlg('','
{{ lbl.waitmsg }}
'); postData("db.php",wpdata).then(data => { let sel = staffperiodweeks.tbl.getSelectedData(); @@ -353,7 +359,7 @@ let staffperiodweeks = { } } flds["timetrackdata"]=trdata; - console.log(trdata); + //console.log(trdata); postData("db.php",flds).then(data => { //staffperiodweeks.gettbldata(); //document.getElementById('dlg_stafftimetracker').style.display='none'; @@ -371,7 +377,7 @@ let staffperiodweeks = { updateWeekHours: function(){ let selrp = staffperiodweeks.parenttbl.getSelectedData(); postData("db.php",{"fn":"update_staff_in_period","schemata":schemata,"id_period":selrp[0].id_reportperiod,"id_staff":selrp[0].id_staff}).then( data => { - console.log(data); + //console.log(data); //staffperiodweeks.gettbldata(); staffperiodweeks.tblfooter.setData([data.result["0"]]); dataform.formsaved({}); @@ -514,9 +520,9 @@ let staffperiodweeks = { checkdaytime: function(obj){ if (obj){ timecalc.validateTime(obj); - console.log("checkdaytime",obj); + //console.log("checkdaytime",obj); } else { - console.log("noobj"); + //console.log("noobj"); } let wktime = 0; @@ -655,7 +661,7 @@ let staffperiodweeks = { edittimetracker: function(){ staffperiodweeks.inittimetracktable(); let sel = staffperiodweeks.tbl.getSelectedData(); - if (sel.length > 0 && sel[0].daydate < staffperiodweeks.today){ + if (sel.length >= 0 && sel[0].daydate <= staffperiodweeks.today){ document.getElementById("btn_ttadd").style.display ="block"; document.getElementById("btn_ttremove").style.display ="block"; staffperiodweeks.selectedid = sel[0].id; @@ -686,7 +692,7 @@ let staffperiodweeks = { values.forEach(function(value){ calc += timecalc.TimeToMinutes(value); }); - if ((dhrs > 360) && (calc > 30) && (pps == false)){ + if ((calc >= 360) && (pps == false)){ let tpsval = '00:30'; let calcwp = calc-30; if (tps > 0){ @@ -797,3 +803,10 @@ let timetrackFormatter = function(cell,formatterParams){ } return cell.getValue(); } + +// let tooltipworkhours = function(cell){ +// //cell - cell component + +// //function should return a string for the tooltip of false to hide the tooltip +// return cell._cell.row.data.dspworkdata + "
Pause:
" + cell._cell.row.data.dsppausedata; //return cells "field - value"; +// } diff --git a/app/tmpl/module/periods/tlb_staffperiodweeks.html b/app/tmpl/module/periods/tlb_staffperiodweeks.html index b3e6d04c..ac1665f5 100644 --- a/app/tmpl/module/periods/tlb_staffperiodweeks.html +++ b/app/tmpl/module/periods/tlb_staffperiodweeks.html @@ -5,6 +5,6 @@ - - + + diff --git a/app/tmpl/module/profile/profile.js b/app/tmpl/module/profile/profile.js index 42d7b3cc..c92f4b44 100644 --- a/app/tmpl/module/profile/profile.js +++ b/app/tmpl/module/profile/profile.js @@ -63,10 +63,10 @@ savepwd: function(){ let sel = []; if (profile.reftbl){ sel =profile.reftbl.getSelectedData(); - console.log("has reftbl!"); + //console.log("has reftbl!"); } else { sel.push({id:"{{ session.id }}"}); - console.log("set own profile pwd!"); + //console.log("set own profile pwd!"); } if (sel[0] && valp==true){ postData("db.php",{"fn":"savenewpwd","pwd":document.getElementById("newpwd1").value,"iduser":sel[0].id}).then(data => { diff --git a/app/tmpl/module/staff/pnl_basedata.html b/app/tmpl/module/staff/pnl_basedata.html index 0e5b16fe..9f27c478 100644 --- a/app/tmpl/module/staff/pnl_basedata.html +++ b/app/tmpl/module/staff/pnl_basedata.html @@ -147,7 +147,124 @@
+
+
+
+
+ +
{{lbl.monday}}
+
+
+ + + +
+
+ + + +
+
+
+
+
{{lbl.tuesday}}
+
+
+ + + +
+
+ + + +
+
+
+
+ +
{{lbl.wednesday}}
+
+
+ + + +
+
+ + + +
+
+
+
+ +
{{lbl.thursday}}
+
+
+ + + +
+
+ + + +
+
+
+
+ +
{{lbl.friday}}
+
+
+ + + +
+
+ + + +
+
+
+
+
+
+ +
{{lbl.saturday}}
+
+
+ + + +
+
+ + + +
+
+
+
+ +
{{lbl.sunday}}
+
+
+ + + +
+
+ + + +
+
+
+
diff --git a/app/tmpl/module/staff/staff.js b/app/tmpl/module/staff/staff.js index ffff0596..d1ebd718 100644 --- a/app/tmpl/module/staff/staff.js +++ b/app/tmpl/module/staff/staff.js @@ -74,7 +74,10 @@ let staff ={ select: "#timetrackers", showSearch: false, afterClose: function(){ - dataform.savefielddata(document.getElementById('timetrackers'),staff.choices["timetrackers"].selected(),null); + var ttd = staff.choices["timetrackers"].selected() + //var attd = ttd.split(","); + //console.log(ttd); + dataform.savefielddata(document.getElementById('timetrackers'),JSON.stringify(ttd),null); } }); staff.choices["timetrackerlang"] = new SlimSelect({ @@ -173,7 +176,7 @@ let staff ={ }, edit: function(){ let udata = staff.tbl.getSelectedData(); - console.log("Staff Details",udata[0]); + //console.log("Staff Details",udata[0]); if (udata[0]) { //console.log("selstaff",udata[0]); @@ -190,9 +193,9 @@ let staff ={ staff.current_id = udata[0].id; dataform.cleanform2("staff",staff.choices); postData("db.php",{ "get":"staff","schemata":schemata,"id":udata[0].id}).then(data => { - console.log("staffdata",data.result.data); + //console.log("staffdata",data.result.data); if (data.result.data["istimetrackenabled"] == true){ - data.result.data["istimetrackenabled"] = "1" + data.result.data["istimetrackenabled"] = "1"; } dataform.fillformbydataclass2("staff",staff.choices,data.result.data,'dataform.savefield(this,null);'); staffcontract.gettbldata(); @@ -273,21 +276,21 @@ let staff ={ cleanfingerprints: function(){ showdataloaddlg('','
{{ lbl.waitmsg }}
'); postData('db.php',{"cl":"TimeTracker","fn":"send_cleanfp","schema":schemata,"id_staff":staff.current_id}).then(data => { - console.log("Clean returns",data); + //console.log("Clean returns",data); closedataloaddlg(); }).catch(err => { closedataloaddlg(); - console.log("Clean err returns",data); + //console.log("Clean err returns",data); }); }, sendtotracker: function(){ showdataloaddlg('','
{{ lbl.waitmsg }}
'); postData('db.php',{"cl":"TimeTracker","fn":"send_setstaff","schema":schemata,"id_staff":staff.current_id}).then(data => { - console.log("SetStaff returns",data); + //console.log("SetStaff returns",data); closedataloaddlg(); }).catch(err => { closedataloaddlg(); - console.log("SetStaff err returns",data); + //console.log("SetStaff err returns",data); }); //alert("Noch nicht aktiviert!\nPas activé pour l'instant!") } diff --git a/app/tmpl/module/staff/staffperiods.js b/app/tmpl/module/staff/staffperiods.js index b270d5cb..771118c6 100644 --- a/app/tmpl/module/staff/staffperiods.js +++ b/app/tmpl/module/staff/staffperiods.js @@ -33,10 +33,15 @@ let staffperiods = { {title: '{{ lbl.statementtransfered2 }}', field:"transferedhours",hozAlign:"right",headerSort: false}, {title: '{{ lbl.supphourspayed2 }}', field:"payedhours",hozAlign:"right",headerSort: false,headerVertical:true} , {title: '{{ lbl.finalstatementpot }}', field:"hoursdiff",headerSort: false,hozAlign:"right"}, + /*{% if cmpcfg.sector == "HORESCA" %} */ {title: '{{ lbl.supp44h2 }}', field:"suppvacancy44hours",hozAlign:"right",headerSort: false,headerVertical:true}, {title: '{{ lbl.suppsunwork }}', field:"suppvacancysunwork",hozAlign:"right",headerSort: false,headerVertical:true}, + /*{% endif %}*/ {title: '{{ lbl.avgweek_short }}', field:"avgtotalweekhours",hozAlign:"right",headerSort: false,formatter:periodAVGFormatter}, - {title: '{{ lbl.validated }}', field:"isvalidated",hozAlign:"center",headerSort: false,formatter:"tickCross", formatterParams:{allowEmpty:true,allowTruthy: false}} + {title: '{{ lbl.validated }}', field:"isvalidated",hozAlign:"center",headerSort: false,formatter:"tickCross", formatterParams:{allowEmpty:true,allowTruthy: false}}, + /*{% if session.usergroup == "admin" %}*/ + {title: '{{ lbl.maxdays }}',width: 60, field:"maxdays",hozAlign:"center",headerSort: false} + /*{% endif %}*/ ] }); }, diff --git a/app/tmpl/module/staff/staffvacancy.js b/app/tmpl/module/staff/staffvacancy.js index 9e8e9852..a7218562 100644 --- a/app/tmpl/module/staff/staffvacancy.js +++ b/app/tmpl/module/staff/staffvacancy.js @@ -75,7 +75,7 @@ let staffvacancy = { flds["fn"] ="saveform";flds["table"]="staffvacancyyear"; flds["schemata"]=schemata; - console.log("staffvacancyyear",flds); + //console.log("staffvacancyyear",flds); postData("db.php",flds).then(data => { staffvacancy.gettblyeardata(); document.getElementById('dlg_staffvacancyyear').style.display='none'; diff --git a/app/tmpl/module/timeclock/timeclock.js b/app/tmpl/module/timeclock/timeclock.js index 7c7f28c0..2b96acc3 100644 --- a/app/tmpl/module/timeclock/timeclock.js +++ b/app/tmpl/module/timeclock/timeclock.js @@ -25,26 +25,73 @@ let timeclock = { // workplans.edit(); // }, rowContext:function(e, row){e.preventDefault(); }, - // groupBy:["weeknum"], - // groupStartOpen:[true], - // groupClosedShowCalcs:true, - // groupHeader:[ - // function(value, count, data){ - // return "Semaine " + value; - // }, - // ], + groupBy:["groupname"], + groupStartOpen:[true], + groupHeader:[function(value, count, data){ return ((value)?value:"");}], + cellDblClick:function(e, cell){ + //e - the click event object + //cell - cell component + }, + //groupClosedShowCalcs:true, + // groupHeader:[ + // function(value, count, data){ + // value; + // }, + // ], columns: [ { title: "{{ lbl.staffname }}",field: "staffname",headerFilter:"input"}, - { title: "{{ lbl.monday }}
DD.MM.YYYY",field: "montime"}, - { title: "{{ lbl.tuesday }}
DD.MM.YYYY",field: "tuetime"}, - { title: "{{ lbl.wednesday }}
DD.MM.YYYY",field: "wedtime" }, - { title: "{{ lbl.thursday }}
DD.MM.YYYY",field: "thutime"}, - { title: "{{ lbl.friday }}
DD.MM.YYYY",field: "fritime" }, - { title: "{{ lbl.saturday }}
DD.MM.YYYY",field: "sattime" }, - { title: "{{ lbl.sunday }}
DD.MM.YYYY",field: "suntime" }, - { title: "{{ lbl.weektotal }}",field: "weeksum"}, - { title: "{{ lbl.monthdiff }}",field: "monthdiff"}, - { title: "{{ lbl.perioddiff }}",field: "perioddiff"} + { title: "DD.MM.YYYY", + columns: [ + {title:'',field:"monentry",headerSort: false,width:60}, + {title:'',field:"monexit",headerSort: false,width:60}, + {title:'',field:"montime",headerSort: false,width:60,formatter:boldFormatter}, + ] + }, + { title: "DD.MM.YYYY", + columns: [ + {title:'',field:"tueentry",headerSort: false,width:60}, + {title:'',field:"tueexit",headerSort: false,width:60}, + {title:'',field:"tuetime",headerSort: false,width:60,formatter:boldFormatter}, + ] + }, + { title: "DD.MM.YYYY", + columns: [ + {title:'',field:"wedentry",headerSort: false,width:60}, + {title:'',field:"wedexit",headerSort: false,width:60}, + {title:'',field:"wedtime",headerSort: false,width:60,formatter:boldFormatter}, + ] + }, + { title: "DD.MM.YYYY", + columns: [ + {title:'',field:"thuentry",headerSort: false,width:60}, + {title:'',field:"thuexit",headerSort: false,width:60}, + {title:'',field:"thutime",headerSort: false,width:60,formatter:boldFormatter}, + ] + }, + { title: "DD.MM.YYYY", + columns: [ + {title:'',field:"frientry",headerSort: false,width:60}, + {title:'',field:"friexit",headerSort: false,width:60}, + {title:'',field:"fritime",headerSort: false,width:60,formatter:boldFormatter}, + ] + }, + { title: "DD.MM.YYYY", + columns: [ + {title:'',field:"satentry",headerSort: false,width:60}, + {title:'',field:"satexit",headerSort: false,width:60}, + {title:'',field:"sattime",headerSort: false,width:60,formatter:boldFormatter}, + ] + }, + { title: "DD.MM.YYYY", + columns: [ + {title:'',field:"sunentry",headerSort: false,width:60}, + {title:'',field:"sunexit",headerSort: false,width:60}, + {title:'',field:"suntime",headerSort: false,width:60,formatter:boldFormatter}, + ] + }, + { title: "{{ lbl.weektotal }}",field: "weeksum",headerSort: false,width:100,formatter:boldFormatter}, + // { title: "{{ lbl.monthdiff }}",field: "monthdiff",headerSort: false,width:100}, + // { title: "{{ lbl.perioddiff }}",field: "perioddiff",headerSort: false,width:100} ] }); document.getElementById('weekselect')._flatpickr.setDate(moment().format('YYYY-MM-DD')); @@ -54,12 +101,12 @@ let timeclock = { let wsobj = document.getElementById('weekselect').value; postData("db.php",{"cl":"TimeTracker","fn":"getWeekStamps","schema":schemata,"date":wsobj}).then(data => { let aa = ["mon","tue","wed","thu","fri","sat","sun"]; - let mondate = moment(wsobj).startOf('week').format('YYYY-MM-DD'); + let mondate = moment(wsobj).startOf('week').format('ddd, YYYY-MM-DD'); for (var d=0;d { document.getElementById('dlg_workplanday').style.display='none'; workplans.gettbldata(); diff --git a/dev/diff_app.sh b/dev/diff_app.sh index 74f3b0de..abdbb1a6 100644 --- a/dev/diff_app.sh +++ b/dev/diff_app.sh @@ -10,11 +10,11 @@ find . -type f -printf "%p|%s\n" | grep -v -e "\/data\/output\/" | grep -v -e "\ ssh -p ${SSHPORT} ${SSHUSER}@${SSHHOST} 'cd '${REMOTEAPPFOLDER}' && find . -type f -printf "%p|%s\n" | sort' > ${TMPDIR}/sourcefiles.remote.txt echo "To update:" -UPDFILES=`diff -y -W 200 ${TMPDIR}/sourcefiles.local.txt ${TMPDIR}/sourcefiles.remote.txt | grep " |" | awk '{ print $1 }' | cut -d"|" -f 1 | grep -v ".htaccess" | grep -v "dksconfig" | grep -v ".git" | grep -v "/media/"` +UPDFILES=`diff -y -W 200 ${TMPDIR}/sourcefiles.local.txt ${TMPDIR}/sourcefiles.remote.txt | grep " |" | awk '{ print $1 }' | cut -d"|" -f 1 | grep -v ".htaccess" | grep -v "/config.php" | grep -v ".git" | grep -v "/media/"` echo ${UPDFILES} echo "" echo "new files:" -INSFILES=`diff -y -W 200 ${TMPDIR}/sourcefiles.local.txt ${TMPDIR}/sourcefiles.remote.txt | grep " <" | awk '{ print $1 }' | cut -d"|" -f 1 | grep -v ".htaccess" | grep -v "dksconfig" | grep -v ".git" | grep -v "/media/"` +INSFILES=`diff -y -W 200 ${TMPDIR}/sourcefiles.local.txt ${TMPDIR}/sourcefiles.remote.txt | grep " <" | awk '{ print $1 }' | cut -d"|" -f 1 | grep -v ".htaccess" | grep -v "/config.php" | grep -v ".git" | grep -v "/media/"` echo ${INSFILES} echo "" echo "only online or OLD files:"