Compare commits
9 Commits
v26.6.0.OS
...
feature/Ic
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
190984a560 | ||
|
|
91bb1d2d8a | ||
|
|
526ee66e2d | ||
|
|
0d92c820f7 | ||
|
|
15a45150cb | ||
|
|
984b0fac5c | ||
|
|
08a52d216c | ||
|
|
61abe71314 | ||
|
|
cae28f03a5 |
@@ -1,7 +1,11 @@
|
||||
services:
|
||||
- mysql
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- ant
|
||||
before_script:
|
||||
- echo "USE mysql;\nUPDATE user SET password=PASSWORD('dev') WHERE user='root';\nFLUSH PRIVILEGES;\n" | mysql -u root
|
||||
- echo "USE mysql;\nUPDATE user SET authentication_string=PASSWORD('dev') WHERE user='root';\nFLUSH PRIVILEGES;\n" | mysql -u root
|
||||
install:
|
||||
#- rm $TRAVIS_BUILD_DIR/tools/phpunit
|
||||
#- composer require --dev phpunit/phpunit ~6.5.5
|
||||
@@ -10,6 +14,8 @@ install:
|
||||
script: ant build-ci
|
||||
language: php
|
||||
php:
|
||||
- '5.6'
|
||||
- '7.0'
|
||||
- '7.1'
|
||||
- '7.2'
|
||||
after_failure: "cat /tmp/icehrm.test.log"
|
||||
|
||||
8
Vagrantfile
vendored
8
Vagrantfile
vendored
@@ -15,14 +15,12 @@ Vagrant.configure(2) do |config|
|
||||
|
||||
|
||||
config.vm.provision "shell", inline: <<-SHELL
|
||||
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys AA8E81B4331F7F50
|
||||
sudo apt-get update
|
||||
chmod ugo+x /vagrant/deployment/vagrant/runonce.sh
|
||||
sh /vagrant/deployment/vagrant/runonce.sh
|
||||
SHELL
|
||||
|
||||
config.vm.hostname = "icehrm.open"
|
||||
|
||||
config.hostsupdater.aliases = [
|
||||
"app.icehrm-open.test",
|
||||
"clients.icehrm-open.test"
|
||||
]
|
||||
|
||||
end
|
||||
|
||||
@@ -90,9 +90,9 @@ class AttendanceRestEndPoint extends RestEndPoint
|
||||
}
|
||||
|
||||
if ($user->user_level !== 'Admin' && !PermissionManager::manipulationAllowed(
|
||||
BaseService::getInstance()->getCurrentProfileId(),
|
||||
$this->getModelObject($parameter)
|
||||
)
|
||||
BaseService::getInstance()->getCurrentProfileId(),
|
||||
$this->getModelObject($parameter)
|
||||
)
|
||||
) {
|
||||
return new IceResponse(IceResponse::ERROR, self::RESPONSE_ERR_PERMISSION_DENIED, 403);
|
||||
}
|
||||
@@ -277,8 +277,16 @@ class AttendanceRestEndPoint extends RestEndPoint
|
||||
}
|
||||
}
|
||||
|
||||
protected function savePunch($employeeId, $inDateTime, $note = null, $outDateTime = null, $id = null, $latitude = null, $longitude = null, $ip = null)
|
||||
{
|
||||
protected function savePunch(
|
||||
$employeeId,
|
||||
$inDateTime,
|
||||
$note = null,
|
||||
$outDateTime = null,
|
||||
$id = null,
|
||||
$latitude = null,
|
||||
$longitude = null,
|
||||
$ip = null
|
||||
) {
|
||||
$employee = BaseService::getInstance()->getElement(
|
||||
'Employee',
|
||||
$employeeId,
|
||||
@@ -399,6 +407,5 @@ class AttendanceRestEndPoint extends RestEndPoint
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,25 +35,27 @@ class Timezone extends BaseModel
|
||||
$modifiedTimeZones[] = $tz;
|
||||
} catch (\Exception $e) {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
usort($modifiedTimeZones, function ($a, $b) { return strcmp($a->details, $b->details); });
|
||||
usort($modifiedTimeZones, function ($a, $b) {
|
||||
return strcmp($a->details, $b->details);
|
||||
});
|
||||
return $modifiedTimeZones;
|
||||
}
|
||||
|
||||
public function formatOffset($offset) {
|
||||
public function formatOffset($offset)
|
||||
{
|
||||
$hours = $offset / 3600;
|
||||
$remainder = $offset % 3600;
|
||||
$sign = $hours > 0 ? '+' : '-';
|
||||
$hour = (int) abs($hours);
|
||||
$minutes = (int) abs($remainder / 60);
|
||||
|
||||
if ($hour == 0 AND $minutes == 0) {
|
||||
if ($hour == 0 and $minutes == 0) {
|
||||
$sign = ' ';
|
||||
}
|
||||
return 'GMT' . $sign . str_pad($hour, 2, '0', STR_PAD_LEFT)
|
||||
.':'. str_pad($minutes,2, '0');
|
||||
.':'. str_pad($minutes, 2, '0');
|
||||
}
|
||||
|
||||
public function fieldValueMethods()
|
||||
|
||||
@@ -35,7 +35,16 @@ abstract class AbstractDataImporter implements DataImporter
|
||||
public function processHeader($data)
|
||||
{
|
||||
$columns = $this->dataImport->columns;
|
||||
$headers = json_decode($columns);
|
||||
|
||||
$headers = json_decode($columns);
|
||||
while(sizeof($headers)!=sizeof($data)){
|
||||
$name = $data[sizeof($headers)];
|
||||
$test = (object)["name" => $name, "title" => "", "type" => "Normal", "dependOn" => "NULL", "dependOnField" => "", "isKeyField" => "No", "idField" => "No", "id" => "columns_36"];
|
||||
|
||||
array_push($headers, $test);
|
||||
}
|
||||
|
||||
LogManager::getInstance()->info("test --------------");
|
||||
|
||||
$counter = 0;
|
||||
foreach ($headers as $column) {
|
||||
@@ -69,6 +78,7 @@ abstract class AbstractDataImporter implements DataImporter
|
||||
{
|
||||
$this->dataImport = new DataImport();
|
||||
$this->dataImport->Load("id =?", array($dataImportId));
|
||||
|
||||
}
|
||||
|
||||
public function updateCustomFields()
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
|
||||
namespace Settings\Rest;
|
||||
|
||||
|
||||
use Classes\IceResponse;
|
||||
use Classes\RestEndPoint;
|
||||
use Classes\SettingsManager;
|
||||
|
||||
@@ -7,20 +7,21 @@ class NetworkUtils
|
||||
public static function getClientIp()
|
||||
{
|
||||
$ipaddress = '';
|
||||
if (isset($_SERVER['HTTP_CLIENT_IP']))
|
||||
if (isset($_SERVER['HTTP_CLIENT_IP'])) {
|
||||
$ipaddress = $_SERVER['HTTP_CLIENT_IP'];
|
||||
else if(isset($_SERVER['HTTP_X_FORWARDED_FOR']))
|
||||
} elseif (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) {
|
||||
$ipaddress = $_SERVER['HTTP_X_FORWARDED_FOR'];
|
||||
else if(isset($_SERVER['HTTP_X_FORWARDED']))
|
||||
} elseif (isset($_SERVER['HTTP_X_FORWARDED'])) {
|
||||
$ipaddress = $_SERVER['HTTP_X_FORWARDED'];
|
||||
else if(isset($_SERVER['HTTP_FORWARDED_FOR']))
|
||||
} elseif (isset($_SERVER['HTTP_FORWARDED_FOR'])) {
|
||||
$ipaddress = $_SERVER['HTTP_FORWARDED_FOR'];
|
||||
else if(isset($_SERVER['HTTP_FORWARDED']))
|
||||
} elseif (isset($_SERVER['HTTP_FORWARDED'])) {
|
||||
$ipaddress = $_SERVER['HTTP_FORWARDED'];
|
||||
else if(isset($_SERVER['REMOTE_ADDR']))
|
||||
} elseif (isset($_SERVER['REMOTE_ADDR'])) {
|
||||
$ipaddress = $_SERVER['REMOTE_ADDR'];
|
||||
else
|
||||
} else {
|
||||
$ipaddress = 'UNKNOWN';
|
||||
}
|
||||
return $ipaddress;
|
||||
}
|
||||
}
|
||||
|
||||
26
deployment/vagrant/runonce.sh
Executable file
26
deployment/vagrant/runonce.sh
Executable file
@@ -0,0 +1,26 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ ! -f ~/runonce ]
|
||||
then
|
||||
|
||||
sudo apt-get install ant
|
||||
sudo chmod -R 777 /var/log/nginx
|
||||
cd /vagrant
|
||||
curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
|
||||
sudo apt-get install -y nodejs
|
||||
npm install
|
||||
sudo npm install -g gulp-cli
|
||||
|
||||
sudo sed 's/server_name clients.app.dev/server_name clients.icehrm-open.test/g' /etc/nginx/sites-available/clients.app.com > /tmp/clients.app.com
|
||||
sudo mv /tmp/clients.app.com /etc/nginx/sites-available/clients.app.com
|
||||
sudo sed 's/server_name app.app.dev/server_name app.icehrm-open.test/g' /etc/nginx/sites-available/app.app.com > /tmp/app.app.com
|
||||
sudo sed 's#root /vagrant/build/app#root /vagrant#g' /tmp/app.app.com > /tmp/mod.app.app.com
|
||||
sudo mv /tmp/mod.app.app.com /etc/nginx/sites-available/app.app.com
|
||||
sudo sed 's#xdebug.remote_host=192.168.30.1#xdebug.remote_host=192.168.40.1#g' /etc/php/7.0/fpm/conf.d/90-app.ini > /tmp/mod.90-app.ini
|
||||
sudo mv /tmp/mod.90-app.ini /etc/php/7.0/fpm/conf.d/90-app.ini
|
||||
|
||||
sudo service php7.0-fpm restart
|
||||
sudo service nginx restart
|
||||
|
||||
touch ~/runonce
|
||||
fi
|
||||
4677
package-lock.json
generated
4677
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "icehrm",
|
||||
"version": "25.0.0",
|
||||
"version": "1.0.0",
|
||||
"description": "IceHrm is a human resource management system",
|
||||
"main": "gulpfile.js",
|
||||
"directories": {
|
||||
@@ -35,7 +35,7 @@
|
||||
"d3": "^5.9.1",
|
||||
"event-stream": "^4.0.1",
|
||||
"gulp-concat": "^2.6.1",
|
||||
"gulp-copy": "^1.1.0",
|
||||
"gulp-copy": "^4.0.1",
|
||||
"gulp-rename": "^1.4.0",
|
||||
"qrcode": "^1.3.3"
|
||||
}
|
||||
|
||||
43
readme.md
43
readme.md
@@ -70,9 +70,6 @@ Preparing development VM with Vagrant
|
||||
|
||||
- Install Vagrant [https://www.vagrantup.com/downloads.html](https://www.vagrantup.com/downloads.html)
|
||||
|
||||
- Install Vagrant host updater plugin [https://github.com/cogitatio/vagrant-hostsupdater](https://github.com/cogitatio/vagrant-hostsupdater)
|
||||
|
||||
|
||||
- Run vagrant up in icehrm root directory (this will download icehrm vagrant image which is ~1 GB)
|
||||
|
||||
```
|
||||
@@ -85,55 +82,23 @@ Preparing development VM with Vagrant
|
||||
~ $ vagrant ssh
|
||||
```
|
||||
|
||||
- Setup the Vagrant box
|
||||
- Add following entries to the end of the host file to map icehrm domains to VagrantBox (on MacOS and Linux this is /etc/hosts | on windows this is Windows\System32\Drivers\etc\hosts)
|
||||
|
||||
```
|
||||
~ $ sudo apt-get install ant
|
||||
~ $ sudo chmod -R 777 /var/log/nginx
|
||||
~ $ cd /vagrant
|
||||
~ $ curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
|
||||
~ $ sudo apt-get install -y nodejs
|
||||
~ $ npm install
|
||||
~ $ sudo npm install -g gulp-cli
|
||||
```
|
||||
|
||||
- Make Changes to enable domain icehrm-open.test in Vagrant Box
|
||||
|
||||
```
|
||||
~ $ sudo sed 's/server_name clients.app.dev/server_name clients.icehrm-open.test/g' /etc/nginx/sites-available/clients.app.com > /tmp/clients.app.com
|
||||
~ $ sudo mv /tmp/clients.app.com /etc/nginx/sites-available/clients.app.com
|
||||
~ $ sudo sed 's/server_name app.app.dev/server_name app.icehrm-open.test/g' /etc/nginx/sites-available/app.app.com > /tmp/app.app.com
|
||||
~ $ sudo sed 's#root /vagrant/build/app#root /vagrant#g' /tmp/app.app.com > /tmp/mod.app.app.com
|
||||
~ $ sudo mv /tmp/mod.app.app.com /etc/nginx/sites-available/app.app.com
|
||||
|
||||
~ $ sudo service php7.0-fpm restart
|
||||
~ $ sudo service nginx restart
|
||||
```
|
||||
|
||||
- Build Icehrm (your icehrm root directory is mapped to /vagrant/ directory in VM)
|
||||
|
||||
```
|
||||
~ $ gulp
|
||||
~ $ ant buildlocal
|
||||
192.168.40.40 app.icehrm-open.test
|
||||
192.168.40.40 clients.icehrm-open.test
|
||||
```
|
||||
|
||||
- Navigate to [http://clients.icehrm-open.test/dev](http://clients.icehrm-open.test/dev) to load icehrm from VM. (user:admin/pass:admin)
|
||||
|
||||
### Notes to Developers
|
||||
|
||||
- When ever you have done a change to JavaScript or CSS files in icehrm/web
|
||||
- When ever you have done a change to JavaScript or CSS files in icehrm/web rebuild the frontend
|
||||
```
|
||||
~ $ cd /vagrant
|
||||
~ $ gulp
|
||||
```
|
||||
|
||||
|
||||
- When ever you have done a change to icehrm/core/src
|
||||
```
|
||||
~ $ cd /vagrant
|
||||
~ $ ant phpcs-ci
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
12
release.md
12
release.md
@@ -2,15 +2,21 @@ Release note v26.6.0.OS
|
||||
------------------------
|
||||
|
||||
### Features
|
||||
* Improvements to UI
|
||||
* Track IP and location of the employee when marking attendance
|
||||
* Some Improvements to UI such as updating Icons and upgrading font-awesome to its latest version
|
||||
* Tracking IP and location of the employee when marking attendance, this is done when updating attendance via mobile
|
||||
* Ability to control location tracking via mobile using server side settings
|
||||
* Improvements to translations
|
||||
* Compatible with location tracking with icehrm mobile app
|
||||
|
||||
### Mobile App
|
||||
* This release is coupled with mobile application release on AppStore (https://apple.co/2Yrtxoy) and Google Play (http://bit.ly/2OkMmKe)
|
||||
|
||||
### Fixes
|
||||
* Order projects by name on timesheets
|
||||
* Order projects by name on Timesheet project listing (This is to make it easier to edit timesheets with many projects)
|
||||
* Link home page user profile to employee profile update page
|
||||
* Fix issues related to configuring Api with mobile app
|
||||
|
||||
### Security Improvements
|
||||
* Upgrade npm missing dependencies
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user