License updated to GPLv3

🧲 New features
Custom user role permissions
Employee edit form updated
Employee daily task list
Attendance and employee distribution charts on dashboard
Improvements to company structure and company assets module
Improved tables for displaying data in several modules
Faster data loading (specially for employee module)
Initials based profile pictures
Re-designed login page
Re-designed user profile page
Improvements to filtering
New REST endpoints for employee qualifications

🐛 Bug fixes
Fixed, issue with managers being able to create performance reviews for employees who are not their direct reports
Fixed, issues related to using full profile image instead of using smaller version of profile image
Changing third gender to other
Improvements and fixes for internal frontend data caching
This commit is contained in:
Thilina Pituwala
2020-10-31 19:02:37 +01:00
parent 86b8345505
commit b1df0037db
29343 changed files with 867614 additions and 2191082 deletions

View File

@@ -11,7 +11,7 @@ if (php_sapi_name() != 'cli') {
error_reporting(0);
class RoboFile extends \Robo\Tasks
{
private function includeCientConfig($client){
private function includeClientConfig($client){
include dirname(__FILE__)."/../config.base.php";
//include ALL_CLIENT_BASE_PATH. $client . "/config.php";
@@ -28,60 +28,60 @@ class RoboFile extends \Robo\Tasks
}
public function languageList($client) {
$this->includeCientConfig($client);
$this->say("Supported Languages for ". $client);
$language = new \Metadata\Common\Model\SupportedLanguage();
$langs = $language->Find('1 = 1');
$this->includeClientConfig($client);
$this->say("Supported Languages for ". $client);
$language = new \Metadata\Common\Model\SupportedLanguage();
$langs = $language->Find('1 = 1');
$this->say(print_r(array_column($langs, 'name'), true));
$this->say(print_r(array_column($langs, 'name'), true));
}
public function languageExport($client) {
$this->includeCientConfig($client);
$language = new \Metadata\Common\Model\SupportedLanguage();
$languages = $language->Find('1 = 1 order by id');
$data = [];
$data[0] = [];
$data[0][] = 'Key';
foreach ($languages as $lang) {
$data[0][] = $lang->name;
$trans = \Classes\LanguageManager::getTranslations($lang->name);
$trans = json_decode($trans, true)['messages'][''];
$count = 1;
foreach ($trans as $enVal => $langVal) {
if (!isset($data[$count])) {
$data[$count] = [];
$data[$count][] = $enVal;
}
$data[$count][] = $langVal[0];
$count += 1;
}
}
$fp = fopen(CLIENT_BASE_PATH.'data/translations_export.csv', 'w');
foreach ($data as $fields) {
fprintf($fp, chr(0xEF).chr(0xBB).chr(0xBF));
fputcsv($fp, $fields);
}
fclose($fp);
$this->say('File saved');
public function languageExport($client, $file) {
$this->includeClientConfig($client);
$language = new \Metadata\Common\Model\SupportedLanguage();
$languages = $language->Find('1 = 1 order by id');
$data = [];
$data[0] = [];
$data[0][] = 'Key';
foreach ($languages as $lang) {
$data[0][] = $lang->name;
$trans = \Classes\LanguageManager::getTranslations($lang->name);
$trans = json_decode($trans, true)['messages'][''];
$count = 1;
foreach ($trans as $enVal => $langVal) {
if (!isset($data[$count])) {
$data[$count] = [];
$data[$count][] = $enVal;
}
$data[$count][] = $langVal[0];
$count += 1;
}
}
$fp = fopen(CLIENT_BASE_PATH.'data/'.$file, 'w');
foreach ($data as $fields) {
//fprintf($fp, chr(0xEF).chr(0xBB).chr(0xBF));
fputcsv($fp, $fields);
}
fclose($fp);
$this->say('File saved');
}
public function languageImport($client, $file) {
$this->includeCientConfig($client);
$this->includeClientConfig($client);
$language = new \Metadata\Common\Model\SupportedLanguage();
$languages = $language->Find('1 = 1 order by id');
foreach ($languages as $language) {
$str = $this->getUpdatedTranslationString($language->name, $file);
file_put_contents(
__DIR__.'/../lang/'.$language->name.'.po',
$str);
$this->say('Updated :'.realpath(__DIR__.'/../lang/'.$language->name.'.po'));
}
}
$language = new \Metadata\Common\Model\SupportedLanguage();
$languages = $language->Find('1 = 1 order by id');
foreach ($languages as $language) {
$str = $this->getUpdatedTranslationString($language->name, $file);
file_put_contents(
__DIR__.'/../lang/'.$language->name.'.po',
$str);
$this->say('Updated :'.realpath(__DIR__.'/../lang/'.$language->name.'.po'));
}
}
public function migrate($client, $action){
$this->includeCientConfig($client);
$this->includeClientConfig($client);
$this->say("DB Migrating " . $action . " for ". $client);
$migrationManager = new \Classes\Migration\MigrationManager();
$migrationManager->setMigrationPath(APP_BASE_PATH .'/migrations/');
@@ -90,7 +90,7 @@ class RoboFile extends \Robo\Tasks
}
public function migrateAll($client){
$this->includeCientConfig($client);
$this->includeClientConfig($client);
$this->say("Run all pending migrations " . " for ". $client);
$migrationManager = new \Classes\Migration\MigrationManager();
$migrationManager->setMigrationPath(APP_BASE_PATH .'/migrations/');
@@ -110,7 +110,7 @@ class RoboFile extends \Robo\Tasks
}
public function resetDb($client){
$this->includeCientConfig($client);
$this->includeClientConfig($client);
$connection = new mysqli(APP_HOST, APP_USERNAME, APP_PASSWORD);
if ($connection->connect_error) {
@@ -130,7 +130,7 @@ class RoboFile extends \Robo\Tasks
}
public function createTables($client){
$this->includeCientConfig($client);
$this->includeClientConfig($client);
$connection = new mysqli(APP_HOST, APP_USERNAME, APP_PASSWORD);
if ($connection->connect_error) {
@@ -165,7 +165,7 @@ class RoboFile extends \Robo\Tasks
}
public function executeFixtures($client){
$this->includeCientConfig($client);
$this->includeClientConfig($client);
$connection = new mysqli(APP_HOST, APP_USERNAME, APP_PASSWORD);
if ($connection->connect_error) {
@@ -195,45 +195,45 @@ class RoboFile extends \Robo\Tasks
}
}
/**
* @param $lang
* @param $file
* @return mixed
*/
protected function getUpdatedTranslationString($lang, $file)
{
$handle = fopen(CLIENT_BASE_PATH . 'data/' . $file, "r");
$langColumn = null;
/* @var \Gettext\Translations $trans */
$trans = \Classes\LanguageManager::getTranslationsObject($lang);
while (($data = fgetcsv($handle)) !== FALSE) {
if ($langColumn === null) {
$currentColumn = 0;
foreach ($data as $language) {
if ($language === $lang) {
$langColumn = $currentColumn;
break;
}
$currentColumn++;
}
/**
* @param $lang
* @param $file
* @return mixed
*/
protected function getUpdatedTranslationString($lang, $file)
{
$handle = fopen(CLIENT_BASE_PATH . 'data/' . $file, "r");
$langColumn = null;
/* @var \Gettext\Translations $trans */
$trans = \Classes\LanguageManager::getTranslationsObject($lang);
while (($data = fgetcsv($handle)) !== FALSE) {
if ($langColumn === null) {
$currentColumn = 0;
foreach ($data as $language) {
if ($language === $lang) {
$langColumn = $currentColumn;
break;
}
$currentColumn++;
}
if ($langColumn === null) {
$this->say('Invalid Language');
exit();
}
} else {
/* @var \Gettext\Translation $tran */
$tran = $trans->find('', $data[0]);
if ($tran !== false) {
$tran->setTranslation($data[$langColumn]);
} else {
$trans->insert('', $data[0]);
if ($langColumn === null) {
$this->say('Invalid Language');
exit();
}
} else {
/* @var \Gettext\Translation $tran */
$tran = $trans->find('', $data[0]);
if ($tran !== false) {
$tran->setTranslation($data[$langColumn]);
} else {
$trans->insert('', $data[0]);
$tran = $trans->find('', $data[0]);
$tran->setTranslation($data[$langColumn]);
}
}
}
}
}
}
return $trans->toPoString();
}
return $trans->toPoString();
}
}