├── class ├── upgrade.php ├── addons.php ├── email.php └── seeder.php ├── assets ├── vendor │ ├── library.js │ ├── chosen-sprite.png │ ├── chosen-sprite@2x.png │ ├── const.js │ ├── tinymce │ │ └── plugins │ │ │ └── placeholder │ │ │ └── plugin.min.js │ ├── handler.js │ ├── Elegant-Loading-Indicator │ │ └── jquery.preloader.min.js │ └── tiptip │ │ ├── jquery.tipTip.min.js │ │ └── tipTip.css ├── src │ ├── components │ │ ├── payroll │ │ │ ├── tutorial │ │ │ │ ├── mixin.js │ │ │ │ ├── store.js │ │ │ │ ├── tutorial.vue │ │ │ │ └── router.js │ │ │ ├── group │ │ │ │ ├── form-fields.js │ │ │ │ ├── router.js │ │ │ │ └── new-group-form.vue │ │ │ ├── salary │ │ │ │ ├── mixin.js │ │ │ │ ├── router.js │ │ │ │ └── store.js │ │ │ ├── payroll.vue │ │ │ ├── tutorial.vue │ │ │ ├── revision │ │ │ │ ├── directive.js │ │ │ │ └── router.js │ │ │ ├── formula │ │ │ │ └── router.js │ │ │ ├── router.js │ │ │ └── loan.vue │ │ ├── attendance │ │ │ ├── tutorial │ │ │ │ ├── mixin.js │ │ │ │ ├── store.js │ │ │ │ ├── router.js │ │ │ │ └── tutorial.vue │ │ │ ├── shift │ │ │ │ ├── directive.js │ │ │ │ └── router.js │ │ │ ├── empty.vue │ │ │ ├── attendance.vue │ │ │ ├── mixin.js │ │ │ ├── attendance-customize.vue │ │ │ ├── attendance-report.vue │ │ │ ├── attendance-header.vue │ │ │ └── attendance-user-search.vue │ │ ├── leave │ │ │ ├── menu.js │ │ │ ├── leave-type-add-btn.vue │ │ │ ├── leave-records-add-btn.vue │ │ │ ├── leave-holidays-add-btn.vue │ │ │ ├── leave-configuration.vue │ │ │ ├── tutorial.vue │ │ │ ├── leave-requests.vue │ │ │ ├── empty.vue │ │ │ ├── leave-holidays.vue │ │ │ ├── leave-type.vue │ │ │ ├── leave-header.vue │ │ │ ├── leave-records-directive.js │ │ │ ├── leave-work-week.js │ │ │ └── leave-records.vue │ │ ├── organization │ │ │ ├── general │ │ │ │ ├── mixin.js │ │ │ │ ├── store.js │ │ │ │ └── router.js │ │ │ ├── router.js │ │ │ ├── organization.vue │ │ │ ├── notice │ │ │ │ ├── router.js │ │ │ │ └── new-notice-form.vue │ │ │ └── location │ │ │ │ ├── router.js │ │ │ │ └── new-location-form.vue │ │ ├── dashboard │ │ │ ├── store.js │ │ │ ├── directive.js │ │ │ ├── router.js │ │ │ └── mixin.js │ │ ├── settings │ │ │ ├── store.js │ │ │ ├── settings.vue │ │ │ ├── mixin.js │ │ │ ├── date-picker.vue │ │ │ ├── router.js │ │ │ └── general.vue │ │ ├── common │ │ │ ├── empty.vue │ │ │ ├── clock.vue │ │ │ ├── date-picker.vue │ │ │ └── do-action.vue │ │ ├── profile │ │ │ ├── store.js │ │ │ ├── profile.vue │ │ │ ├── skill │ │ │ │ ├── router.js │ │ │ │ └── new-skill-form.vue │ │ │ ├── education │ │ │ │ ├── router.js │ │ │ │ └── new-education-form.vue │ │ │ ├── work-experience │ │ │ │ ├── router.js │ │ │ │ └── new-work-experience-form.vue │ │ │ ├── mixin.js │ │ │ └── router.js │ │ ├── recruitment │ │ │ ├── router.js │ │ │ └── recruitment.vue │ │ ├── departments │ │ │ ├── department-add-btn.vue │ │ │ ├── department-search.vue │ │ │ ├── department-edit-btn.vue │ │ │ ├── department-paginate-drop-down.vue │ │ │ ├── router.js │ │ │ ├── store.js │ │ │ ├── mixin.js │ │ │ └── departments.vue │ │ ├── addons │ │ │ ├── router.js │ │ │ └── addons.vue │ │ ├── employee │ │ │ ├── router.js │ │ │ └── new-employee-form.vue │ │ └── designation │ │ │ ├── router.js │ │ │ └── new-designation-form.vue │ ├── start.js │ ├── store │ │ └── store.js │ ├── main.js │ ├── router │ │ └── router.js │ ├── helpers │ │ ├── menu-fix.js │ │ ├── common-components.js │ │ ├── Elegant-Loading-Indicator │ │ │ └── jquery.preloader.min.js │ │ └── tiptip │ │ │ └── jquery.tipTip.min.js │ └── App.vue └── css │ ├── chosen-sprite.png │ ├── images │ ├── loading.gif │ ├── load-icon.gif │ ├── hrm-loading.gif │ ├── ui-icons_222222_256x240.png │ ├── ui-icons_2e83ff_256x240.png │ ├── ui-icons_454545_256x240.png │ ├── ui-icons_888888_256x240.png │ ├── ui-icons_cd0a0a_256x240.png │ ├── ui-bg_flat_0_aaaaaa_40x100.png │ ├── ui-bg_flat_0_ffffff_40x100.png │ ├── ui-bg_flat_75_ffffff_40x100.png │ ├── ui-bg_glass_55_fbf9ee_1x400.png │ ├── ui-bg_glass_65_ffffff_1x400.png │ ├── ui-bg_glass_75_dadada_1x400.png │ ├── ui-bg_glass_75_e6e6e6_1x400.png │ ├── ui-bg_glass_95_fef1ec_1x400.png │ ├── ui-bg_diagonals-small_75_cccccc_40x40.png │ ├── ui-bg_highlight-soft_75_cccccc_1x100.png │ ├── sprites.svg │ └── sprites3.svg │ ├── chosen-sprite@2x.png │ ├── fontawesome │ └── fonts │ │ ├── FontAwesome.otf │ │ ├── fontawesome-webfont.eot │ │ ├── fontawesome-webfont.ttf │ │ ├── fontawesome-webfont.woff │ │ └── fontawesome-webfont.woff2 │ ├── jquery-ui-timepicker-addon.css │ └── Elegant-Loading-Indicator │ └── preloader.css ├── include ├── updates │ ├── update-2.1.php │ ├── update-1.1.php │ └── update-2.0.php ├── configurations.php ├── loaders.php ├── log.txt └── payroll_formula.php ├── templates ├── index.html └── addons │ ├── menu.php │ └── licenses.php ├── languages └── default.mo ├── .gitignore ├── core ├── Crud │ ├── Pattern.php │ └── Crud.php ├── common │ ├── Resource_Editors.php │ └── Traits │ │ └── Transformer_Manager.php ├── Transformer_Manager.php ├── Database │ └── Model.php └── Config │ └── Config.php ├── .babelrc ├── config └── db.php ├── models ├── Financial_Year.php ├── Holiday.php ├── Notice.php ├── Relation.php ├── Skill.php ├── Department.php ├── Formula.php ├── Work_Experience.php ├── Education.php ├── Location.php ├── meta.php ├── attendance.php ├── user.php ├── Salary.php ├── Designation.php ├── leave-type.php ├── Shift.php ├── Salary_Group.php └── leave.php ├── .svnignore ├── db └── migrations │ ├── crate_financial_year_table.php │ ├── create_migrations_table.php │ ├── create_designation_table.php │ ├── create_salary_group_table.php │ ├── create_formula_table.php │ └── create_salary_table.php ├── transformers ├── User_Transformer.php ├── Salary_Group_Transformer.php ├── Department_Transformer.php ├── Skill_Transformer.php ├── Notice_Transformer.php ├── Formula_Transformer.php ├── Work_Experience_Transformer.php ├── attendance_transformer.php ├── Education_Transformer.php ├── Location_Transformer.php ├── Leave_Type_Transform.php ├── Designation_Transformer.php ├── Salary_Transformer.php ├── Shift_Transformer.php └── Leave_Transformer.php ├── composer.json ├── phpcs.xml.dist ├── webpack.config.js └── package.json /class/upgrade.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/vendor/library.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /include/updates/update-2.1.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/src/components/payroll/tutorial/mixin.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /templates/index.html: -------------------------------------------------------------------------------- 1 |
-------------------------------------------------------------------------------- /assets/src/components/attendance/tutorial/mixin.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/src/components/payroll/group/form-fields.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/src/components/leave/menu.js: -------------------------------------------------------------------------------- 1 | export default { 2 | 3 | } -------------------------------------------------------------------------------- /assets/src/components/organization/general/mixin.js: -------------------------------------------------------------------------------- 1 | export default { 2 | 3 | } -------------------------------------------------------------------------------- /languages/default.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asaquzzaman/Human-Resource-Management/HEAD/languages/default.mo -------------------------------------------------------------------------------- /assets/src/components/dashboard/store.js: -------------------------------------------------------------------------------- 1 | export default { 2 | state: { 3 | 4 | }, 5 | 6 | mutations: { 7 | 8 | } 9 | }; -------------------------------------------------------------------------------- /assets/css/chosen-sprite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asaquzzaman/Human-Resource-Management/HEAD/assets/css/chosen-sprite.png -------------------------------------------------------------------------------- /assets/css/images/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asaquzzaman/Human-Resource-Management/HEAD/assets/css/images/loading.gif -------------------------------------------------------------------------------- /assets/src/components/payroll/tutorial/store.js: -------------------------------------------------------------------------------- 1 | export default { 2 | state: { 3 | 4 | }, 5 | 6 | mutations: { 7 | 8 | } 9 | } -------------------------------------------------------------------------------- /assets/css/chosen-sprite@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asaquzzaman/Human-Resource-Management/HEAD/assets/css/chosen-sprite@2x.png -------------------------------------------------------------------------------- /assets/css/images/load-icon.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asaquzzaman/Human-Resource-Management/HEAD/assets/css/images/load-icon.gif -------------------------------------------------------------------------------- /assets/src/components/attendance/tutorial/store.js: -------------------------------------------------------------------------------- 1 | export default { 2 | state: { 3 | 4 | }, 5 | 6 | mutations: { 7 | 8 | } 9 | } -------------------------------------------------------------------------------- /assets/vendor/chosen-sprite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asaquzzaman/Human-Resource-Management/HEAD/assets/vendor/chosen-sprite.png -------------------------------------------------------------------------------- /assets/css/images/hrm-loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asaquzzaman/Human-Resource-Management/HEAD/assets/css/images/hrm-loading.gif -------------------------------------------------------------------------------- /assets/vendor/chosen-sprite@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asaquzzaman/Human-Resource-Management/HEAD/assets/vendor/chosen-sprite@2x.png -------------------------------------------------------------------------------- /include/configurations.php: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 |
5 | 6 | 7 | -------------------------------------------------------------------------------- /assets/src/components/payroll/tutorial.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | -------------------------------------------------------------------------------- /core/Crud/Pattern.php: -------------------------------------------------------------------------------- 1 | 1%", "last 2 versions", "not ie <= 8"] 9 | } 10 | } 11 | ], 12 | "stage-2" 13 | ], 14 | "plugins": ["transform-runtime"] 15 | } -------------------------------------------------------------------------------- /core/common/Resource_Editors.php: -------------------------------------------------------------------------------- 1 | user; 11 | return $this->item( $user, new User_Transformer ); 12 | } 13 | } -------------------------------------------------------------------------------- /config/db.php: -------------------------------------------------------------------------------- 1 | 'mysql', 5 | 'host' => DB_HOST, 6 | 'database' => DB_NAME, 7 | 'username' => DB_USER, 8 | 'password' => DB_PASSWORD, 9 | 'charset' => 'utf8', 10 | 'collation' => 'utf8_general_ci', 11 | 'prefix' => $wpdb->prefix, 12 | ]; -------------------------------------------------------------------------------- /include/updates/update-1.1.php: -------------------------------------------------------------------------------- 1 | 'hrm_employer' 5 | ); 6 | 7 | $users = get_users( $args ); 8 | 9 | foreach ( $users as $key => $user ) { 10 | wp_update_user( array( 11 | 'ID' => $user->ID, 12 | 'role' => 'hrm_employee' 13 | )); 14 | 15 | update_user_meta( $user->ID, '_hrm_user_role', 'hrm_employee' ); 16 | } -------------------------------------------------------------------------------- /assets/src/components/common/empty.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | -------------------------------------------------------------------------------- /assets/src/components/organization/general/store.js: -------------------------------------------------------------------------------- 1 | export default { 2 | state: { 3 | organizationinfo: {}, 4 | countries: [], 5 | }, 6 | 7 | mutations: { 8 | setOrganizationInfo (state, organizationinfo) { 9 | state.organizationinfo = organizationinfo; 10 | }, 11 | setCountries (state, countries) { 12 | state.countries = countries; 13 | } 14 | } 15 | }; -------------------------------------------------------------------------------- /models/Financial_Year.php: -------------------------------------------------------------------------------- 1 | 2 |
3 |

Leave Type

4 | 5 | Add New 6 | 7 |
8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /assets/src/components/payroll/tutorial/tutorial.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /assets/src/components/recruitment/router.js: -------------------------------------------------------------------------------- 1 | 2 | import recruitment from './recruitment.vue' 3 | 4 | 5 | if(typeof HRM_ER_Vars == 'undefined') { 6 | HRMRegisterChildrenRoute ('hrm_root', 7 | [ 8 | 9 | { 10 | path: 'recruitment', 11 | component: recruitment, 12 | name: 'recruitment', 13 | } 14 | ] 15 | ); 16 | } 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /models/Relation.php: -------------------------------------------------------------------------------- 1 | 2 |
3 | Add 4 |
5 | 6 | 7 | 8 | 15 | -------------------------------------------------------------------------------- /assets/src/components/departments/department-search.vue: -------------------------------------------------------------------------------- 1 | 8 | 13 | -------------------------------------------------------------------------------- /.svnignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | .gitignore 3 | plugin-deploy.sh 4 | config.codekit 5 | export.sh 6 | .idea 7 | /.DS_Store 8 | nbproject 9 | node_modules 10 | includes/pro 11 | build 12 | secret.json 13 | .netbeans.xml 14 | npm-debug.log 15 | /node_modules/ 16 | composer.json 17 | composer.lock 18 | Gruntfile.js 19 | npm-debug.log 20 | package-lock.json 21 | package.json 22 | prev.json 23 | webpack.config.js 24 | /asset/js/src 25 | phpcs-report.txt 26 | phpcs.xml.dist 27 | -------------------------------------------------------------------------------- /include/loaders.php: -------------------------------------------------------------------------------- 1 | belongsToMany( 'HRM\Models\Leave_Type', hrm_tb_prefix() . 'hrm_leave', 'emp_id', 'type' ); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /assets/src/components/common/clock.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | -------------------------------------------------------------------------------- /assets/src/components/addons/router.js: -------------------------------------------------------------------------------- 1 | 2 | HRMRegisterModule('addons', 'addons'); 3 | 4 | import addons from './addons.vue' 5 | 6 | 7 | // let addons = resolve => { 8 | 9 | // require.ensure(['./addons.vue'], () => { 10 | // resolve(require('./addons.vue')); 11 | // }); 12 | // } 13 | 14 | HRMRegisterChildrenRoute ('hrm_root', 15 | [ 16 | 17 | { 18 | path: 'addons', 19 | component: addons, 20 | name: 'addons', 21 | } 22 | ] 23 | ); 24 | 25 | -------------------------------------------------------------------------------- /assets/src/components/dashboard/directive.js: -------------------------------------------------------------------------------- 1 | var HRM_Dashboard = { 2 | dialog (el, binding, vnode) { 3 | jQuery(el).dialog({ 4 | close () { 5 | vnode.context.notices.forEach(function(notice) { 6 | notice.popup = false; 7 | }); 8 | } 9 | }); 10 | } 11 | } 12 | 13 | 14 | // Register a global custom directive called v-cpm-datepicker 15 | hrm.Vue.directive('hrm-dialog', { 16 | inserted: function (el, binding, vnode) { 17 | 18 | HRM_Dashboard.dialog( el, binding, vnode ); 19 | } 20 | }); -------------------------------------------------------------------------------- /assets/src/components/payroll/tutorial/router.js: -------------------------------------------------------------------------------- 1 | 2 | HRMRegisterModule('tutotial', 'payroll/tutorial'); 3 | 4 | import Tutorial from './tutorial.vue' 5 | 6 | 7 | HRMRegisterChildrenRoute ('payroll', 8 | [ 9 | 10 | { 11 | path: 'tutorial', 12 | component: Tutorial, 13 | name: 'payroll_tutorial', 14 | meta: { 15 | label: 'Tutorial', 16 | order: 10 17 | } 18 | }, 19 | ] 20 | ); 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /models/attendance.php: -------------------------------------------------------------------------------- 1 | belongsToMany( 'HRM\Models\Leave_Type', hrm_tb_prefix() . 'hrm_leave', 'emp_id', 'type' ); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /assets/src/components/attendance/tutorial/router.js: -------------------------------------------------------------------------------- 1 | 2 | HRMRegisterModule('tutotial', 'attendance/tutorial'); 3 | 4 | import Tutorial from './tutorial.vue' 5 | 6 | 7 | HRMRegisterChildrenRoute ('attendance', 8 | [ 9 | 10 | { 11 | path: 'tutorial', 12 | component: Tutorial, 13 | name: 'attendance_tutorial', 14 | meta: { 15 | label: 'Tutorial', 16 | order: 10 17 | } 18 | }, 19 | ] 20 | ); 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /assets/src/components/leave/leave-records-add-btn.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | -------------------------------------------------------------------------------- /assets/src/components/settings/settings.vue: -------------------------------------------------------------------------------- 1 | 7 | 8 | -------------------------------------------------------------------------------- /class/addons.php: -------------------------------------------------------------------------------- 1 | 2 |
3 |

Holiday

4 | 5 | Add New 6 | 7 |
8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /assets/src/components/payroll/revision/directive.js: -------------------------------------------------------------------------------- 1 | var HRM_Dashboard = { 2 | dialog (el, binding, vnode) { 3 | jQuery(el).dialog({ 4 | 'width': '60%', 5 | close () { 6 | if(typeof vnode.context.afterCloseDialog != 'undefined') { 7 | vnode.context.afterCloseDialog(vnode.context); 8 | } 9 | } 10 | }); 11 | } 12 | } 13 | 14 | 15 | // Register a global custom directive called v-cpm-datepicker 16 | hrm.Vue.directive('hrm-dialog', { 17 | inserted: function (el, binding, vnode) { 18 | 19 | HRM_Dashboard.dialog( el, binding, vnode ); 20 | } 21 | }); -------------------------------------------------------------------------------- /assets/src/components/payroll/formula/router.js: -------------------------------------------------------------------------------- 1 | HRMRegisterModule('formula', 'payroll/formula'); 2 | 3 | import formula from './formula.vue' 4 | 5 | if(hrm_user_can('manage_payroll')) { 6 | HRMRegisterChildrenRoute ('payroll', 7 | [ 8 | 9 | { 10 | path: 'salary-components', 11 | component: formula, 12 | name: 'salary_components', 13 | meta: { 14 | label: 'Salary Components', 15 | order: 2 16 | } 17 | } 18 | ] 19 | ); 20 | } 21 | -------------------------------------------------------------------------------- /models/Salary.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /assets/src/components/organization/router.js: -------------------------------------------------------------------------------- 1 | import general from './general/router'; 2 | import location from './location/router'; 3 | import notice from './notice/router'; 4 | import Empty from './organization.vue'; 5 | 6 | let menu = [ 7 | { 8 | path: 'organization', 9 | component: Empty, 10 | name: 'organization', 11 | children: HRMGetRegisterChildrenRoute('organization'), 12 | meta: { 13 | label: 'Organization', 14 | order: 2 15 | } 16 | } 17 | ]; 18 | 19 | HRMRegisterChildrenRoute ('hrm_root', menu); 20 | 21 | export default menu; -------------------------------------------------------------------------------- /models/Designation.php: -------------------------------------------------------------------------------- 1 | hasOne( 'HRM\Models\Department', 'id', 'department' ); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /db/migrations/crate_financial_year_table.php: -------------------------------------------------------------------------------- 1 | hasTable( $table )) { 12 | Capsule::schema()->create( $table, function( $table ) { 13 | $table->increments( 'id' ); 14 | $table->timestamp( 'start' )->nullable(); 15 | $table->timestamps(); 16 | } ); 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /assets/src/components/attendance/tutorial/tutorial.vue: -------------------------------------------------------------------------------- 1 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /assets/css/jquery-ui-timepicker-addon.css: -------------------------------------------------------------------------------- 1 | .ui-timepicker-div .ui-widget-header { margin-bottom: 8px; } 2 | .ui-timepicker-div dl { text-align: left; } 3 | .ui-timepicker-div dl dt { float: left; clear:left; padding: 0 0 0 5px; } 4 | .ui-timepicker-div dl dd { margin: 0 10px 10px 40%; } 5 | .ui-timepicker-div td { font-size: 90%; } 6 | .ui-tpicker-grid-label { background: none; border: none; margin: 0; padding: 0; } 7 | 8 | .ui-timepicker-rtl{ direction: rtl; } 9 | .ui-timepicker-rtl dl { text-align: right; padding: 0 5px 0 0; } 10 | .ui-timepicker-rtl dl dt{ float: right; clear: right; } 11 | .ui-timepicker-rtl dl dd { margin: 0 40% 10px 10px; } -------------------------------------------------------------------------------- /assets/src/components/leave/leave-configuration.vue: -------------------------------------------------------------------------------- 1 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /db/migrations/create_migrations_table.php: -------------------------------------------------------------------------------- 1 | hasTable( $table_name ) ) { 13 | Capsule::schema()->create( $table_name, function( $table ) { 14 | $table->increments('id'); 15 | $table->string('migration')->nullable(); 16 | $table->timestamps(); 17 | }); 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /assets/src/components/dashboard/router.js: -------------------------------------------------------------------------------- 1 | 2 | HRMRegisterModule('dashboard', 'dashboard'); 3 | 4 | import dashboard from './dashboard.vue' 5 | 6 | 7 | // let dashboard = resolve => { 8 | 9 | // require.ensure(['./dashboard.vue'], () => { 10 | // resolve(require('./dashboard.vue')); 11 | // }); 12 | // } 13 | 14 | HRMRegisterChildrenRoute ('hrm_root', 15 | [ 16 | 17 | { 18 | path: 'dashboard', 19 | component: dashboard, 20 | name: 'dashboard', 21 | meta: { 22 | label: 'Dashboard', 23 | order: 1 24 | } 25 | } 26 | ] 27 | ); 28 | 29 | -------------------------------------------------------------------------------- /transformers/User_Transformer.php: -------------------------------------------------------------------------------- 1 | $user->ID, 13 | 'nicename' => $user->user_nicename, 14 | 'email' => $user->user_email, 15 | 'profile_url' => $user->user_url, 16 | 'display_name' => $user->display_name, 17 | 'avatar_url' => get_avatar_url( $user->user_email ), 18 | ]; 19 | 20 | return $data; 21 | } 22 | } -------------------------------------------------------------------------------- /models/leave-type.php: -------------------------------------------------------------------------------- 1 | belongsToMany( 'HRM\Models\Department', hrm_tb_prefix() . 'hrm_relation', 'from', 'to' ); 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /assets/src/main.js: -------------------------------------------------------------------------------- 1 | __webpack_public_path__ = HRM_Vars.hrm_url+ '/assets/js/'; 2 | 3 | import store from '@store/store'; 4 | import router from '@router/router'; 5 | import Mixin from '@helpers/mixin'; 6 | import Directive from '@directives/directives'; 7 | import Components from '@helpers/common-components'; 8 | import HRM from './App.vue'; 9 | import MenuFix from '@helpers/menu-fix'; 10 | 11 | window.hrmBus = new hrm.Vue(); 12 | 13 | var wpspear_hrm = { 14 | el: '#wpspear-hrm', 15 | store, 16 | router, 17 | render: h => h(HRM) 18 | } 19 | 20 | new hrm.Vue(wpspear_hrm); 21 | 22 | 23 | // fix the admin menu for the slug "vue-app" 24 | MenuFix('hr_management'); 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /assets/src/components/departments/department-edit-btn.vue: -------------------------------------------------------------------------------- 1 | 6 | 22 | -------------------------------------------------------------------------------- /models/Shift.php: -------------------------------------------------------------------------------- 1 | belongsToMany( 'HRM\Models\Department', hrm_tb_prefix() . 'hrm_relation', 'from', 'to' ); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /assets/src/components/attendance/shift/router.js: -------------------------------------------------------------------------------- 1 | HRMRegisterModule('shift', 'attendance/shift'); 2 | import Shift from './shift.vue' 3 | 4 | let menu = [ 5 | 6 | { 7 | path: 'shift', 8 | name: 'shift', 9 | component: Shift, 10 | meta: { 11 | label: 'Shift', 12 | order: 2 13 | }, 14 | 15 | children: [ 16 | { 17 | path: 'pages/:current_page_number', 18 | component: Shift, 19 | name: 'shift_pagination', 20 | }, 21 | ] 22 | } 23 | ] 24 | 25 | if ( hrm_user_can('manage_attendance') ) { 26 | HRMRegisterChildrenRoute ('attendance', menu); 27 | } 28 | -------------------------------------------------------------------------------- /assets/src/components/organization/general/router.js: -------------------------------------------------------------------------------- 1 | HRMRegisterModule('general', 'organization/general'); 2 | 3 | import general from './general-information.vue' 4 | 5 | 6 | // let general = resolve => { 7 | 8 | // require.ensure(['./general-information.vue'], () => { 9 | // resolve(require('./general-information.vue')); 10 | // }); 11 | // } 12 | 13 | HRMRegisterChildrenRoute ('organization', 14 | [ 15 | 16 | { 17 | path: 'general-information', 18 | component: general, 19 | name: 'general_information', 20 | meta: { 21 | label: 'General Information', 22 | } 23 | } 24 | ] 25 | ); 26 | 27 | -------------------------------------------------------------------------------- /models/Salary_Group.php: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 |
5 | 6 | 7 | -------------------------------------------------------------------------------- /assets/src/components/payroll/revision/router.js: -------------------------------------------------------------------------------- 1 | HRMRegisterModule('revision', 'payroll/revision'); 2 | 3 | import Revision from './revision.vue' 4 | 5 | HRMRegisterChildrenRoute ('payroll', 6 | [ 7 | 8 | { 9 | path: 'revision', 10 | component: Revision, 11 | name: 'revision', 12 | meta: { 13 | label: 'Revision', 14 | order: 4 15 | }, 16 | children: [ 17 | { 18 | path: 'pages/:current_page_number', 19 | component: Revision, 20 | name: 'revision_pagination', 21 | }, 22 | ] 23 | } 24 | ] 25 | ); 26 | 27 | -------------------------------------------------------------------------------- /templates/addons/menu.php: -------------------------------------------------------------------------------- 1 |
2 | 3 | 25 | 26 | 27 | 28 |
-------------------------------------------------------------------------------- /assets/src/components/payroll/salary/router.js: -------------------------------------------------------------------------------- 1 | 2 | HRMRegisterModule('salary', 'payroll/salary'); 3 | 4 | import Salary from './salary.vue' 5 | 6 | if(hrm_user_can('manage_payroll')) { 7 | HRMRegisterChildrenRoute ('payroll', 8 | [ 9 | 10 | { 11 | path: 'salary', 12 | component: Salary, 13 | name: 'salary', 14 | meta: { 15 | label: 'Salary', 16 | order: 1 17 | } 18 | }, 19 | 20 | { 21 | path: 'salary/employees/:employee_id', 22 | component: Salary, 23 | name: 'salary_update', 24 | } 25 | ] 26 | ); 27 | } 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /assets/src/components/settings/mixin.js: -------------------------------------------------------------------------------- 1 | 2 | export default { 3 | methods: { 4 | updateSettings (args) { 5 | var request = { 6 | data: args.data, 7 | success (res) { 8 | hrm.Toastr.success('Udpate settings successfully!'); 9 | if (typeof args.callback === 'function') { 10 | args.callback(res); 11 | } 12 | } 13 | }; 14 | 15 | this.httpRequest('update_settings', request); 16 | }, 17 | 18 | getSettings (key, pre_define ) { 19 | 20 | var pre_define = pre_define || false, 21 | settings = HRM_Vars.settings; 22 | 23 | if ( !HRM_Vars.settings[key] ) { 24 | return pre_define; 25 | } 26 | 27 | return HRM_Vars.settings[key]; 28 | } 29 | } 30 | }; -------------------------------------------------------------------------------- /assets/src/components/leave/tutorial.vue: -------------------------------------------------------------------------------- 1 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /assets/src/components/payroll/salary/store.js: -------------------------------------------------------------------------------- 1 | export default { 2 | state: { 3 | employees: [], 4 | designation: [], 5 | formulas: [], 6 | meta: { 7 | others: false, 8 | incomeTotal: 0, 9 | deductionTotal: 0, 10 | employeeGet: 0 11 | } 12 | }, 13 | 14 | mutations: { 15 | setEmployees (state, employees) { 16 | state.employees = employees; 17 | }, 18 | 19 | setDesignation (state, designation) { 20 | state.designation = designation; 21 | }, 22 | 23 | setFormulas (state, formulas) { 24 | state.formulas = formulas; 25 | }, 26 | 27 | setOthers (state, meta) { 28 | state.meta = meta.salaryMeta; 29 | }, 30 | setUpdateData (state, data) { 31 | state.formulas = data.data; 32 | state.meta = data.meta.salaryMeta; 33 | } 34 | } 35 | } -------------------------------------------------------------------------------- /include/log.txt: -------------------------------------------------------------------------------- 1 | [01.05.2018 03:35:05][akjsdhasd] {"request_status":true,"user_id":"693","email":"[email protected]","product_id":"hrm-frontend","license_key":"dNobbQ)qy)sr","home_url":"http:\/\/hrm.hrm","start_date":"2018-05-01 01:36:22","end_date":"2019-05-01 01:36:22","ip":"61.247.185.157"} 2 | -------------------------------------------------------------------------------- /assets/src/components/departments/department-paginate-drop-down.vue: -------------------------------------------------------------------------------- 1 | 14 | 19 | 20 | -------------------------------------------------------------------------------- /assets/src/components/payroll/group/router.js: -------------------------------------------------------------------------------- 1 | HRMRegisterModule('group', 'payroll/group'); 2 | 3 | import Group from './group.vue' 4 | 5 | if(hrm_user_can('manage_payroll')) { 6 | HRMRegisterChildrenRoute ('payroll', 7 | [ 8 | 9 | { 10 | path: 'group', 11 | component: Group, 12 | name: 'group', 13 | meta: { 14 | label: 'Component Group', 15 | order: 3 16 | }, 17 | children: [ 18 | { 19 | path: 'pages/:current_page_number', 20 | component: Group, 21 | name: 'group_pagination', 22 | }, 23 | ] 24 | } 25 | ] 26 | ); 27 | 28 | } 29 | -------------------------------------------------------------------------------- /transformers/Salary_Group_Transformer.php: -------------------------------------------------------------------------------- 1 | $item->id, 20 | 'name' => $item->name, 21 | 'income' => maybe_unserialize( $item->income ), 22 | 'deduction' => maybe_unserialize( $item->deduction ), 23 | ]; 24 | 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /assets/src/components/profile/profile.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | -------------------------------------------------------------------------------- /transformers/Department_Transformer.php: -------------------------------------------------------------------------------- 1 | $item->id, 22 | 'name' => $item->name, 23 | 'active' => $item->active, 24 | 'description' => $item->description, 25 | 'parent' => $item->parent 26 | ]; 27 | 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /transformers/Skill_Transformer.php: -------------------------------------------------------------------------------- 1 | $item->id, 21 | 'employee_id' => $item->employee_id, 22 | 'skill' => $item->skill, 23 | 'years_of_exp' => $item->years_of_exp, 24 | 'comments' => $item->comments 25 | ]; 26 | 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /assets/src/components/leave/leave-requests.vue: -------------------------------------------------------------------------------- 1 | 7 | 8 | 9 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /assets/src/components/organization/notice/router.js: -------------------------------------------------------------------------------- 1 | HRMRegisterModule('notice', 'organization/notice'); 2 | 3 | import notice from './notice.vue' 4 | 5 | // let notice = resolve => { 6 | 7 | // require.ensure(['./notice.vue'], () => { 8 | // resolve(require('./notice.vue')); 9 | // }); 10 | // } 11 | 12 | HRMRegisterChildrenRoute ('organization', 13 | [ 14 | 15 | { 16 | path: 'notice', 17 | component: notice, 18 | name: 'notice', 19 | meta: { 20 | label: 'Notice', 21 | }, 22 | 23 | children: [ 24 | { 25 | path: 'pages/:current_page_number', 26 | component: notice, 27 | name: 'notice_pagination', 28 | }, 29 | ] 30 | } 31 | ] 32 | ); 33 | 34 | -------------------------------------------------------------------------------- /transformers/Notice_Transformer.php: -------------------------------------------------------------------------------- 1 | $item->id, 24 | 'title' => $item->title, 25 | 'description' => $item->description, 26 | 'date' => hrm_get_date( $item->date ), 27 | ]; 28 | 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /assets/src/router/router.js: -------------------------------------------------------------------------------- 1 | import '@components/profile/router'; 2 | import '@components/organization/router'; 3 | import '@components/designation/router'; 4 | import '@components/dashboard/router'; 5 | import '@components/departments/router'; 6 | import '@components/attendance/router'; 7 | import '@components/leave/router'; 8 | import '@components/settings/router'; 9 | import '@components/employee/router'; 10 | import '@components/addons/router'; 11 | import '@components/payroll/router'; 12 | import '@components/recruitment/router'; 13 | 14 | import Empty from '@components/common/empty.vue'; 15 | 16 | HRM_Routers.push({ 17 | path: '/', 18 | component: Empty, 19 | name: 'hrm_root', 20 | 21 | children: HRMGetRegisterChildrenRoute('hrm_root') 22 | }); 23 | 24 | var router = new hrm.VueRouter({ 25 | routes: HRM_Routers, 26 | }); 27 | 28 | export default router; 29 | 30 | -------------------------------------------------------------------------------- /transformers/Formula_Transformer.php: -------------------------------------------------------------------------------- 1 | $item->id, 20 | 'name' => $item->name, 21 | 'description' => $item->description, 22 | 'type' => $item->type, 23 | 'formula' => $item->formula, 24 | 'status' => $item->status, 25 | ]; 26 | 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /assets/src/components/settings/date-picker.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | -------------------------------------------------------------------------------- /assets/src/components/organization/location/router.js: -------------------------------------------------------------------------------- 1 | HRMRegisterModule('location', 'organization/location'); 2 | 3 | import location from './location.vue' 4 | 5 | // let location = resolve => { 6 | 7 | // require.ensure(['./location.vue'], () => { 8 | // resolve(require('./location.vue')); 9 | // }); 10 | // } 11 | 12 | HRMRegisterChildrenRoute ('organization', 13 | [ 14 | 15 | { 16 | path: 'location', 17 | component: location, 18 | name: 'location', 19 | meta: { 20 | label: 'Location', 21 | }, 22 | 23 | children: [ 24 | { 25 | path: 'pages/:current_page_number', 26 | component: location, 27 | name: 'location_pagination', 28 | }, 29 | ] 30 | } 31 | ] 32 | ); 33 | 34 | -------------------------------------------------------------------------------- /db/migrations/create_designation_table.php: -------------------------------------------------------------------------------- 1 | hasTable( $table )) { 11 | Capsule::schema()->create( $table, function( $table ) { 12 | $table->increments( 'id' ); 13 | $table->string( 'title' )->nullable(); 14 | $table->text( 'description' )->nullable(); 15 | $table->bigInteger('department'); 16 | $table->unsignedInteger( 'created_by' )->nullable(); 17 | $table->unsignedInteger( 'updated_by' )->nullable(); 18 | $table->timestamps(); 19 | } ); 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /db/migrations/create_salary_group_table.php: -------------------------------------------------------------------------------- 1 | hasTable( $table )) { 11 | Capsule::schema()->create( $table, function( $table ) { 12 | $table->increments( 'id' ); 13 | $table->string( 'name' )->nullable(); 14 | $table->text( 'income' )->nullable(); 15 | $table->text( 'deduction' )->nullable(); 16 | $table->unsignedInteger( 'created_by' )->nullable(); 17 | $table->unsignedInteger( 'updated_by' )->nullable(); 18 | $table->timestamps(); 19 | } ); 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /assets/src/components/employee/router.js: -------------------------------------------------------------------------------- 1 | 2 | HRMRegisterModule('employee', 'employee'); 3 | 4 | import employee from './employee.vue' 5 | 6 | 7 | // let employee = resolve => { 8 | 9 | // require.ensure(['./employee.vue'], () => { 10 | // resolve(require('./employee.vue')); 11 | // }); 12 | // } 13 | 14 | HRMRegisterChildrenRoute ('hrm_root', 15 | [ 16 | 17 | { 18 | path: 'employee', 19 | component: employee, 20 | name: 'employee', 21 | meta: { 22 | label: 'Employees', 23 | order: 5 24 | }, 25 | 26 | children: [ 27 | { 28 | path: 'pages/:current_page_number', 29 | component: employee, 30 | name: 'employee_pagination', 31 | }, 32 | ] 33 | } 34 | ] 35 | ); 36 | 37 | -------------------------------------------------------------------------------- /assets/vendor/tinymce/plugins/placeholder/plugin.min.js: -------------------------------------------------------------------------------- 1 | tinymce.PluginManager.add("placeholder",function(a){a.on("init",function(){function d(){!a.settings.readonly==!0&&c.hide(),a.execCommand("mceFocus",!1)}function e(){""==a.getContent()?c.show():c.hide()}function f(){c.hide()}var c=new b;e(),tinymce.DOM.bind(c.el,"click",d),a.on("focus",d),a.on("blur",e),a.on("change",e),a.on("setContent",e),a.on("keydown",f)});var b=function(){var b=a.getElement().getAttribute("placeholder")||a.settings.placeholder,c=a.settings.placeholder_attrs||{style:{position:"absolute",top:"5px",left:0,color:"#888",padding:"1%",width:"98%",overflow:"hidden","white-space":"pre-wrap"}},d=a.getContentAreaContainer();tinymce.DOM.setStyle(d,"position","relative"),this.el=tinymce.DOM.add(d,a.settings.placeholder_tag||"label",c,b)};b.prototype.hide=function(){tinymce.DOM.setStyle(this.el,"display","none")},b.prototype.show=function(){tinymce.DOM.setStyle(this.el,"display","")}}); -------------------------------------------------------------------------------- /assets/src/components/designation/router.js: -------------------------------------------------------------------------------- 1 | 2 | HRMRegisterModule('designation', 'designation'); 3 | 4 | import designation from './designation.vue' 5 | 6 | 7 | // let designation = resolve => { 8 | 9 | // require.ensure(['./designation.vue'], () => { 10 | // resolve(require('./designation.vue')); 11 | // }); 12 | // } 13 | 14 | HRMRegisterChildrenRoute ('hrm_root', 15 | [ 16 | 17 | { 18 | path: 'designation', 19 | component: designation, 20 | name: 'designation', 21 | meta: { 22 | label: 'Designation', 23 | order: 4 24 | }, 25 | 26 | children: [ 27 | { 28 | path: 'pages/:current_page_number', 29 | component: designation, 30 | name: 'designation_pagination', 31 | }, 32 | ] 33 | } 34 | ] 35 | ); 36 | 37 | -------------------------------------------------------------------------------- /transformers/Work_Experience_Transformer.php: -------------------------------------------------------------------------------- 1 | $item->id, 21 | 'employee_id' => $item->employee_id, 22 | 'title' => $item->title, 23 | 'start' => hrm_get_date( $item->start ), 24 | 'end' => hrm_get_date( $item->end ), 25 | 'description' => $item->description, 26 | ]; 27 | 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /db/migrations/create_formula_table.php: -------------------------------------------------------------------------------- 1 | hasTable( $table )) { 11 | Capsule::schema()->create( $table, function( $table ) { 12 | $table->increments( 'id' ); 13 | $table->string( 'name' )->nullable(); 14 | $table->text( 'description' )->nullable(); 15 | $table->string( 'type' )->nullable(); 16 | $table->text( 'formula' )->nullable(); 17 | $table->string( 'status' )->nullable(); 18 | $table->unsignedInteger( 'created_by' )->nullable(); 19 | $table->unsignedInteger( 'updated_by' )->nullable(); 20 | $table->timestamps(); 21 | } ); 22 | } 23 | } 24 | } -------------------------------------------------------------------------------- /transformers/attendance_transformer.php: -------------------------------------------------------------------------------- 1 | $item->id, 20 | 'user_id' => $item->user_id, 21 | 'date' => hrm_get_date( $item->date ), 22 | 'punch_in' => $item->punch_in, 23 | 'punch_out' => $item->punch_out, 24 | 'shift_id' => $item->shift_id, 25 | 'total_second' => $item->total, 26 | 'second_to_time' => hrm_second_to_time_short_form( hrm_get_second( $item->punch_in, $item->punch_out ) ) 27 | ]; 28 | } 29 | 30 | } -------------------------------------------------------------------------------- /assets/src/components/attendance/attendance.vue: -------------------------------------------------------------------------------- 1 | 9 | 10 | 42 | 43 | -------------------------------------------------------------------------------- /assets/src/components/leave/empty.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | -------------------------------------------------------------------------------- /assets/src/helpers/menu-fix.js: -------------------------------------------------------------------------------- 1 | /** 2 | * As we are using hash based navigation, hack fix 3 | * to highlight the current selected menu 4 | * 5 | * Requires jQuery 6 | */ 7 | function menuFix(slug) { 8 | var $ = jQuery; 9 | 10 | let menuRoot = $('#toplevel_page_' + slug); 11 | let currentUrl = window.location.href; 12 | let currentPath = currentUrl.substr( currentUrl.indexOf('admin.php') ); 13 | 14 | menuRoot.on('click', 'a', function() { 15 | var self = $(this); 16 | 17 | $('ul.wp-submenu li', menuRoot).removeClass('current'); 18 | 19 | if ( self.hasClass('wp-has-submenu') ) { 20 | $('li.wp-first-item', menuRoot).addClass('current'); 21 | } else { 22 | self.parents('li').addClass('current'); 23 | } 24 | }); 25 | 26 | $('ul.wp-submenu a', menuRoot).each(function(index, el) { 27 | if ( $(el).attr( 'href' ) === currentPath ) { 28 | $(el).parent().addClass('current'); 29 | return; 30 | } 31 | }); 32 | } 33 | 34 | export default menuFix; -------------------------------------------------------------------------------- /transformers/Education_Transformer.php: -------------------------------------------------------------------------------- 1 | $item->id, 21 | 'employee_id' => $item->employee_id, 22 | 'education' => $item->education, 23 | 'institute' => $item->institute, 24 | 'major' => $item->major, 25 | 'year' => $item->year, 26 | 'score' => $item->score, 27 | 'start_date' => hrm_get_date( $item->start_date ), 28 | 'end_date' => hrm_get_date( $item->end_date ) 29 | ]; 30 | 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /core/Transformer_Manager.php: -------------------------------------------------------------------------------- 1 | setSerializer( new DataArraySerializer() ); 15 | 16 | if ( isset( $get_data['with'] ) ) { 17 | $manager->parseIncludes( $get_data['with'] ); 18 | } 19 | 20 | return $manager->createData( $resource )->toArray(); 21 | } 22 | 23 | public function get_json_response( $resource ) { 24 | $get_data = wp_unslash( $_GET ); 25 | 26 | $manager = new Manager(); 27 | $manager->setSerializer( new DataArraySerializer() ); 28 | 29 | if ( isset( $get_data['with'] ) ) { 30 | $manager->parseIncludes( $get_data['with'] ); 31 | } 32 | 33 | return json_encode( $manager->createData( $resource )->toArray() ); 34 | } 35 | } -------------------------------------------------------------------------------- /assets/src/components/payroll/router.js: -------------------------------------------------------------------------------- 1 | 2 | import './salary/router'; 3 | import './formula/router'; 4 | import './group/router'; 5 | import './revision/router'; 6 | import './tutorial/router'; 7 | import Empty from './payroll.vue'; 8 | import Loan from './loan.vue'; 9 | 10 | 11 | let menu = [ 12 | { 13 | path: 'payroll', 14 | name: 'payroll', 15 | component: Empty, 16 | children: HRMGetRegisterChildrenRoute('payroll'), 17 | meta: { 18 | label: 'Payroll', 19 | order: 2 20 | }, 21 | redirect: { 22 | name: hrm_user_can('manage_payroll') ? 'salary' : 'revision' 23 | } 24 | } 25 | ]; 26 | 27 | if(typeof HRM_Loan_Vars == 'undefined') { 28 | 29 | menu[0].children.push( 30 | { 31 | path: 'loan', 32 | name: 'loan', 33 | component: Loan, 34 | meta: { 35 | label: 'Loan', 36 | order: 4 37 | } 38 | } 39 | ); 40 | } 41 | 42 | HRMRegisterChildrenRoute ('hrm_root', menu); 43 | 44 | export default menu; -------------------------------------------------------------------------------- /transformers/Location_Transformer.php: -------------------------------------------------------------------------------- 1 | (int) $item->id, 22 | 'name' => $item->name, 23 | 'country_code' => $item->country_code, 24 | 'province' => $item->province, 25 | 'city' => $item->city, 26 | 'address' => $item->address, 27 | 'zip_code' => $item->zip_code, 28 | 'phone' => $item->phone, 29 | 'fax' => $item->fax, 30 | 'notes' => $item->notes, 31 | ]; 32 | 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /include/updates/update-2.0.php: -------------------------------------------------------------------------------- 1 | prefix . 'hrm_work_experience'; 6 | 7 | $wpdb->query( "DROP TABLE IF EXISTS " . $wpdb->prefix . "hrm_work_experience" ); 8 | } 9 | 10 | function hrm_create_workexperiance_table() { 11 | global $wpdb; 12 | $table_name = $wpdb->prefix . 'hrm_work_experience'; 13 | $sql = "CREATE TABLE IF NOT EXISTS {$table_name} ( 14 | `id` int(11) NOT NULL AUTO_INCREMENT, 15 | `employee_id` int(11) NOT NULL, 16 | `title` varchar(255) NOT NULL DEFAULT '0', 17 | `start` timestamp NULL DEFAULT NULL, 18 | `end` timestamp NULL DEFAULT NULL, 19 | `description` tinytext, 20 | `created_at` timestamp NULL DEFAULT NULL, 21 | `updated_at` timestamp NULL DEFAULT NULL, 22 | PRIMARY KEY (`id`) 23 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;"; 24 | 25 | require_once( ABSPATH . 'wp-admin/includes/upgrade.php' ); 26 | dbDelta( $sql ); 27 | } 28 | 29 | 30 | hrm_work_experiance_tb_update(); 31 | hrm_create_workexperiance_table(); -------------------------------------------------------------------------------- /assets/src/helpers/common-components.js: -------------------------------------------------------------------------------- 1 | import DoAction from '@components/common/do-action.vue'; 2 | import SettingsHeader from '@components/settings/header.vue'; 3 | import DatePicker from '@components/common/date-picker.vue'; 4 | import FormFields from '@components/common/form-fields.vue'; 5 | import Pagination from '@components/common/pagination.vue'; 6 | import HRMUploader from '@components/common/file-uploader.vue'; 7 | import EditFields from '@components/common/edit-fields.vue'; 8 | import PayrollMenu from '@components/payroll/menu.vue'; 9 | import AttendanceMenu from '@components/attendance/attendance-header.vue'; 10 | 11 | 12 | 13 | hrm.Vue.component('hrm-do-action', DoAction); 14 | hrm.Vue.component('hrm-settings-header', SettingsHeader); 15 | hrm.Vue.component('hrm-date-picker', DatePicker); 16 | hrm.Vue.component('hrm-form-fields', FormFields); 17 | hrm.Vue.component('hrm-pagination', Pagination); 18 | hrm.Vue.component('hrm-file-uploader', HRMUploader); 19 | hrm.Vue.component('hrm-edit-field', EditFields); 20 | hrm.Vue.component('hrm-payroll-menu', PayrollMenu); 21 | hrm.Vue.component('hrm-attendance-menu', AttendanceMenu); 22 | -------------------------------------------------------------------------------- /assets/src/components/common/date-picker.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | -------------------------------------------------------------------------------- /core/Database/Model.php: -------------------------------------------------------------------------------- 1 | getConnection()->db->prefix . $this->table; 21 | } 22 | 23 | public function getTableName() { 24 | return $this->table; 25 | } 26 | 27 | /** 28 | * Set the value of the "created at" attribute. 29 | * 30 | * @param mixed $value 31 | * @return void 32 | */ 33 | public function setCreatedAt( $value ) { 34 | $this->{static::CREATED_AT} = current_time( 'mysql' ); 35 | } 36 | 37 | /** 38 | * Set the value of the "updated at" attribute. 39 | * 40 | * @param mixed $value 41 | * @return void 42 | */ 43 | public function setUpdatedAt( $value ) { 44 | $this->{static::UPDATED_AT} = current_time( 'mysql' ); 45 | } 46 | } -------------------------------------------------------------------------------- /transformers/Leave_Type_Transform.php: -------------------------------------------------------------------------------- 1 | $item->id, 21 | 'name' => $item->leave_type_name, 22 | 'entitlement' => $item->entitlement, 23 | 'entitle_from' => $item->entitle_from, 24 | 'entitle_to' => $item->entitle_to, 25 | 'financial_id' => $item->f_year, 26 | 'next_year' => $item->carry, 27 | ]; 28 | } 29 | 30 | public function includeDepartments( Leave_Type $item ) { 31 | $departments = $item->departments; 32 | $resource = new Collection( $departments, new Department_Transformer ); 33 | 34 | return $resource; 35 | } 36 | } -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Human Resource Management", 3 | "description": "HR management plugin for WordPress", 4 | "type": "wordpress-plugin", 5 | "license": "GPL-2.0+", 6 | "authors": [ 7 | { 8 | "name": "asaquzzaman", 9 | "email": "joy.mishu@gmail.com", 10 | "homepage": "http://mishubd.com" 11 | } 12 | ], 13 | "require": { 14 | "php": "<=5.6.37", 15 | "league/fractal": "<=0.17.0", 16 | "tareq1988/wp-eloquent": "0.9" 17 | }, 18 | "autoload": { 19 | "classmap": [ 20 | "db" 21 | ], 22 | "psr-4": { 23 | "HRM\\Core\\": "core/", 24 | "HRM\\Include\\": "include/", 25 | "HRM\\Models\\": "models/", 26 | "HRM\\Transformers\\": "transformers/" 27 | }, 28 | "files": [ 29 | "include/loaders.php", 30 | "include/configurations.php", 31 | "include/function.php", 32 | "include/seed.php", 33 | "include/urls.php", 34 | "include/page.php", 35 | "include/payroll_formula.php" 36 | ] 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /transformers/Designation_Transformer.php: -------------------------------------------------------------------------------- 1 | $item->id, 25 | 'title' => $item->title, 26 | 'description' => $item->description, 27 | ]; 28 | 29 | } 30 | 31 | public function includeDepartment( Designation $item ) { 32 | $department = $item->dept()->first(); 33 | 34 | if ( $department ) { 35 | return $this->item( $department, new Department_Transformer ); 36 | } 37 | 38 | return null; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /assets/src/components/departments/router.js: -------------------------------------------------------------------------------- 1 | 2 | HRMRegisterModule('departments', 'departments'); 3 | 4 | import departments from './departments.vue' 5 | import pagination from './department-pagination.vue' 6 | 7 | 8 | // let departments = resolve => { 9 | 10 | // require.ensure(['./departments.vue'], () => { 11 | // resolve(require('./departments.vue')); 12 | // }); 13 | // } 14 | 15 | // let pagination = resolve => { 16 | 17 | // require.ensure(['./department-pagination.vue'], () => { 18 | // resolve(require('./department-pagination.vue')); 19 | // }); 20 | // } 21 | 22 | HRMRegisterChildrenRoute ('hrm_root', 23 | [ 24 | { 25 | path: 'departments', 26 | component: departments, 27 | name: 'departments', 28 | meta: { 29 | label: 'Department', 30 | order: 3 31 | }, 32 | 33 | children: [ 34 | { 35 | path: 'page/:page_number', 36 | component: pagination, 37 | name: 'department_pagination' 38 | }, 39 | ] 40 | } 41 | ] 42 | ); 43 | 44 | 45 | -------------------------------------------------------------------------------- /assets/src/components/profile/skill/router.js: -------------------------------------------------------------------------------- 1 | 2 | HRMRegisterModule('skill', 'profile/skill'); 3 | 4 | import skill from './skill.vue' 5 | 6 | // let skill = resolve => { 7 | 8 | // require.ensure(['./skill.vue'], () => { 9 | // resolve(require('./skill.vue')); 10 | // }); 11 | // } 12 | 13 | function HRM_URM_Params (self, params) { 14 | let employeeId = self.$route.params.employeeId 15 | ? self.$route.params.employeeId 16 | : HRM_Vars.current_user.data.ID 17 | 18 | return { 19 | employeeId: employeeId 20 | } 21 | } 22 | 23 | HRMRegisterChildrenRoute ('profile', 24 | [ 25 | { 26 | path: ':employeeId/skill', 27 | component: skill, 28 | name: 'skill', 29 | meta: { 30 | label: 'Skill', 31 | params (self, params) { 32 | return HRM_URM_Params(self, params); 33 | } 34 | }, 35 | 36 | children: [ 37 | { 38 | path: 'pages/:current_page_number', 39 | component: skill, 40 | name: 'skill_pagination', 41 | }, 42 | ] 43 | } 44 | ] 45 | ); 46 | 47 | -------------------------------------------------------------------------------- /assets/src/components/settings/router.js: -------------------------------------------------------------------------------- 1 | HRMRegisterModule('settings', 'settings'); 2 | 3 | import mixin from './mixin'; 4 | 5 | HRMMixin.settings = mixin; 6 | 7 | import Settings from './settings.vue'; 8 | import Hrm_Settings from './general.vue' 9 | import EmailSettings from './email-settings.vue' 10 | 11 | 12 | // const Hrm_Settings = resolve => { 13 | 14 | // require.ensure(['./general.vue'], () => { 15 | // resolve(require('./general.vue')); 16 | // }); 17 | // } 18 | 19 | let settingsMenu = [ 20 | { 21 | path: 'settings', 22 | component: Settings, 23 | name: 'hrm_setting', 24 | 25 | children: HRMGetRegisterChildrenRoute 26 | ( 27 | 'hrm_setting', 28 | [ 29 | { 30 | path: 'general', 31 | component: Hrm_Settings, 32 | name: 'hrm_general_settings', 33 | meta: { 34 | label: 'General' 35 | } 36 | }, 37 | { 38 | path: 'email-settings', 39 | component: EmailSettings, 40 | name: 'hrm_email_settings_settings', 41 | meta: { 42 | label: 'Email' 43 | } 44 | }, 45 | ] 46 | ) 47 | 48 | } 49 | ]; 50 | 51 | 52 | 53 | if (hrm_user_can('manage_settings')) { 54 | HRMRegisterChildrenRoute ('hrm_root', settingsMenu); 55 | } 56 | 57 | export default settingsMenu; 58 | -------------------------------------------------------------------------------- /assets/src/components/profile/education/router.js: -------------------------------------------------------------------------------- 1 | 2 | HRMRegisterModule('education', 'profile/education'); 3 | 4 | import education from './education.vue' 5 | 6 | // let education = resolve => { 7 | // require.ensure(['./education.vue'], () => { 8 | // resolve(require('./education.vue')); 9 | // }); 10 | // } 11 | 12 | function HRM_URM_Params (self, params) { 13 | let employeeId = self.$route.params.employeeId 14 | ? self.$route.params.employeeId 15 | : HRM_Vars.current_user.data.ID 16 | 17 | return { 18 | employeeId: employeeId 19 | } 20 | } 21 | 22 | HRMRegisterChildrenRoute ('profile', 23 | [ 24 | { 25 | path: ':employeeId/education', 26 | component: education, 27 | name: 'education', 28 | meta: { 29 | label: 'Education', 30 | params (self, params) { 31 | return HRM_URM_Params(self, params); 32 | } 33 | }, 34 | 35 | children: [ 36 | { 37 | path: 'pages/:current_page_number', 38 | component: education, 39 | name: 'education_pagination', 40 | }, 41 | ] 42 | } 43 | ] 44 | ); 45 | 46 | -------------------------------------------------------------------------------- /assets/src/components/attendance/mixin.js: -------------------------------------------------------------------------------- 1 | export default { 2 | methods: { 3 | getAttendance: function() { 4 | 5 | var request_data = { 6 | _wpnonce: HRM_Vars.nonce, 7 | search: this.$route.query, 8 | }, 9 | 10 | self = this; 11 | 12 | wp.ajax.send('get_attendance', { 13 | data: request_data, 14 | beforeSend () { 15 | self.loadingStart('hrm-list-table'); 16 | }, 17 | success: function(res) { 18 | 19 | self.$store.commit( 'attendance/setAttendance', { 20 | records: res.attendance, 21 | punch_in_formated_date: res.punch_in_formated_date, 22 | punch_out_formated_date: res.punch_out_formated_date, 23 | punch_in_date: res.punch_in_date, 24 | punch_out_date: res.punch_out_date, 25 | totalOfficeTime: res.total_time 26 | 27 | } ); 28 | self.loadingStop('hrm-list-table'); 29 | self.isFetchRecord = true; 30 | }, 31 | 32 | error: function(res) { 33 | 34 | } 35 | }); 36 | }, 37 | } 38 | } -------------------------------------------------------------------------------- /assets/src/components/payroll/loan.vue: -------------------------------------------------------------------------------- 1 | 22 | 23 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /phpcs.xml.dist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Generally-applicable sniffs for WordPress plugins 5 | 6 | 10 | */assets/* 11 | */src/* 12 | */lib/* 13 | */build/* 14 | */node_modules/* 15 | */vendor/* 16 | */tests/* 17 | */bin/* 18 | 19 | 20 | 21 | 22 | 23 | . 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /transformers/Salary_Transformer.php: -------------------------------------------------------------------------------- 1 | $item->id, 20 | 'month' => hrm_get_date( $item->month ), 21 | 'category' => $item->category, 22 | 'category_id' => $item->category_id, 23 | 'employee' => get_user_by( 'id', $item->employee_id ), 24 | 'group_id' => $item->group_id, 25 | 'salary_components_id' => maybe_unserialize( $item->salary_components_id ), 26 | 'all_components_id' => maybe_unserialize( $item->all_components_id ), 27 | 'info' => maybe_unserialize( $item->info ), 28 | 'type' => $item->type, 29 | 'salary' => $item->salary, 30 | 31 | ]; 32 | 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /assets/src/components/recruitment/recruitment.vue: -------------------------------------------------------------------------------- 1 | 21 | 22 | 46 | 47 | -------------------------------------------------------------------------------- /assets/css/images/sprites.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /assets/src/components/profile/work-experience/router.js: -------------------------------------------------------------------------------- 1 | 2 | HRMRegisterModule('workExperience', 'profile/work-experience'); 3 | 4 | import workExperience from './work-experience.vue' 5 | 6 | // let workExperience = resolve => { 7 | // require.ensure(['./work-experience.vue'], () => { 8 | // resolve(require('./work-experience.vue')); 9 | // }); 10 | // } 11 | 12 | function HRM_URM_Params (self, params) { 13 | let employeeId = self.$route.params.employeeId 14 | ? self.$route.params.employeeId 15 | : HRM_Vars.current_user.data.ID 16 | 17 | return { 18 | employeeId: employeeId 19 | } 20 | } 21 | 22 | HRMRegisterChildrenRoute ('profile', 23 | [ 24 | 25 | { 26 | path: ':employeeId/work-experience', 27 | component: workExperience, 28 | name: 'work_experience', 29 | meta: { 30 | label: 'Work Experience', 31 | params (self, params) { 32 | return HRM_URM_Params(self, params); 33 | } 34 | }, 35 | 36 | children: [ 37 | { 38 | path: 'pages/:current_page_number', 39 | component: workExperience, 40 | name: 'work_experiance_pagination', 41 | }, 42 | ] 43 | } 44 | ] 45 | ); 46 | 47 | -------------------------------------------------------------------------------- /db/migrations/create_salary_table.php: -------------------------------------------------------------------------------- 1 | hasTable( $table )) { 11 | Capsule::schema()->create( $table, function( $table ) { 12 | $table->increments( 'id' ); 13 | $table->timestamp( 'month' )->nullable(); 14 | $table->string( 'category' )->nullable()->comment('employee, designation'); 15 | $table->unsignedInteger( 'category_id' )->nullable(); 16 | $table->bigInteger('employee_id'); 17 | $table->unsignedInteger( 'group_id' )->nullable(); 18 | $table->text( 'salary_components_id' )->nullable(); 19 | $table->text( 'all_components_id' )->nullable(); 20 | $table->text( 'info' )->nullable(); 21 | $table->string( 'type' )->nullable()->comment('monthly, annual'); 22 | $table->string( 'salary' )->nullable(); 23 | $table->unsignedInteger( 'created_by' )->nullable(); 24 | $table->unsignedInteger( 'updated_by' )->nullable(); 25 | $table->timestamps(); 26 | } ); 27 | } 28 | } 29 | } -------------------------------------------------------------------------------- /assets/src/components/leave/leave-holidays.vue: -------------------------------------------------------------------------------- 1 | 11 | 12 | 13 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /transformers/Shift_Transformer.php: -------------------------------------------------------------------------------- 1 | $item->id, 26 | 'name' => $item->name, 27 | 'status' => $item->status, 28 | 'start' => $item->punch_start, 29 | 'times' => maybe_unserialize( $item->times ), 30 | 'created_at' => $item->created_at, 31 | 'updated_at' => $item->updated_at 32 | ]; 33 | } 34 | 35 | public function includeDepartments( Shift $item ) { 36 | $departments = $item->departments() 37 | ->get(); 38 | 39 | if ( $departments ) { 40 | return $this->collection( $departments, new Department_Transformer ); 41 | } 42 | 43 | return null; 44 | } 45 | 46 | 47 | } -------------------------------------------------------------------------------- /assets/vendor/handler.js: -------------------------------------------------------------------------------- 1 | const HRM_Routers = []; 2 | const HRM_Components = []; 3 | const HRM_Store = []; 4 | const hrm = { 5 | 'Multiselect': {} 6 | }; 7 | 8 | const HRMMixin = {}; 9 | const HRMProMixin = {}; 10 | const HRMChildrenRouter = {}; 11 | const HRMModules = []; 12 | const HRMProModules = []; 13 | 14 | function HRMRegisterChildrenRoute (parentRouteName, routes) { 15 | routes.forEach(function(route) { 16 | if (HRMChildrenRouter.hasOwnProperty(parentRouteName) ) { 17 | HRMChildrenRouter[parentRouteName].push(route); 18 | } else { 19 | HRMChildrenRouter[parentRouteName] = [route]; 20 | } 21 | }); 22 | }; 23 | 24 | function HRMGetRegisterChildrenRoute(parentRouteName, prevRoute) { 25 | var prevRoute = prevRoute || []; 26 | 27 | if (HRMChildrenRouter.hasOwnProperty(parentRouteName) ) { 28 | return prevRoute.concat(HRMChildrenRouter[parentRouteName]); 29 | } 30 | 31 | return prevRoute; 32 | } 33 | 34 | function HRMRegisterModule(module, path) { 35 | HRMModules.push( 36 | { 37 | 'name': module, 38 | 'path': path 39 | } 40 | ); 41 | } 42 | 43 | function HRMProRegisterModule(module, path) { 44 | HRMProModules.push( 45 | { 46 | 'name': module, 47 | 'path': path 48 | } 49 | ); 50 | } 51 | 52 | function hrm_user_can(cap) { 53 | 54 | if( 55 | HRM_Vars.current_user.allcaps.hasOwnProperty(cap) 56 | && 57 | HRM_Vars.current_user.allcaps[cap] 58 | ) { 59 | return true; 60 | } 61 | 62 | return false; 63 | } 64 | 65 | -------------------------------------------------------------------------------- /core/common/Traits/Transformer_Manager.php: -------------------------------------------------------------------------------- 1 | setSerializer( new DataArraySerializer() ); 16 | 17 | if ( isset( $get_data['with'] ) ) { 18 | $manager->parseIncludes( $get_data['with'] ); 19 | } 20 | 21 | if ($resource) { 22 | $response = $manager->createData( $resource )->toArray(); 23 | 24 | } else { 25 | $response = []; 26 | } 27 | 28 | return array_merge( $extra, $response ); 29 | } 30 | 31 | public function get_json_response( $resource, $extra = [] ) { 32 | $get_data = wp_unslash( $_GET ); 33 | 34 | $manager = new Manager(); 35 | $manager->setSerializer( new DataArraySerializer() ); 36 | 37 | if ( isset( $get_data['with'] ) ) { 38 | $manager->parseIncludes( $get_data['with'] ); 39 | } 40 | 41 | if ($resource) { 42 | $response = $manager->createData( $resource )->toArray(); 43 | } else { 44 | $response = []; 45 | } 46 | 47 | return json_encode( array_merge( $extra, $response ) ); 48 | } 49 | } -------------------------------------------------------------------------------- /assets/src/components/attendance/attendance-customize.vue: -------------------------------------------------------------------------------- 1 | 22 | 23 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /assets/src/components/attendance/attendance-report.vue: -------------------------------------------------------------------------------- 1 | 22 | 23 | 24 | 48 | 49 | 50 | 59 | 60 | -------------------------------------------------------------------------------- /assets/src/components/leave/leave-type.vue: -------------------------------------------------------------------------------- 1 | 13 | 14 | 59 | -------------------------------------------------------------------------------- /assets/src/App.vue: -------------------------------------------------------------------------------- 1 | 9 | 10 | 15 | 16 | 54 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /assets/src/components/departments/store.js: -------------------------------------------------------------------------------- 1 | export default { 2 | state: { 3 | is_department_form_active: false, 4 | departments: [], 5 | department_id: false, 6 | del_dept: [], 7 | dept_pagination: { 8 | total: 0, 9 | limit: 5, 10 | page_number: 1 11 | }, 12 | dept_drop_down: [] 13 | }, 14 | 15 | mutations: { 16 | showHideDepartmentForm: function(state, status) { 17 | if ( status === 'toggle' ) { 18 | state.is_department_form_active = state.is_department_form_active ? false : true; 19 | } else { 20 | state.is_department_form_active = status; 21 | } 22 | }, 23 | 24 | setDepartments: function(state, departments) { 25 | state.departments = departments.departments; 26 | state.dept_pagination.total = departments.total_dept; 27 | state.dept_drop_down = departments.dept_drop_down; 28 | }, 29 | 30 | department_edit_id: function(state, department) { 31 | state.department_id = department.department_id; 32 | }, 33 | 34 | updateDepartment: function(state, department) { 35 | if (department.is_update) { 36 | state.departments = department.departments; 37 | } else { 38 | state.departments = department.departments; 39 | } 40 | 41 | state.dept_drop_down = department.dept_drop_down; 42 | state.department_id = false; 43 | }, 44 | 45 | departmentDelId: function(state, del_dept) { 46 | state.del_dept = del_dept.del_dept; 47 | }, 48 | afterDeleteDept: function(state, deleted_dept) { 49 | state.departments.splice(deleted_dept.target_del_dept, 1); 50 | state.dept_drop_down = deleted_dept.dept_drop_down; 51 | } 52 | } 53 | }; -------------------------------------------------------------------------------- /assets/src/components/common/do-action.vue: -------------------------------------------------------------------------------- 1 | 62 | 63 | 64 | -------------------------------------------------------------------------------- /transformers/Leave_Transformer.php: -------------------------------------------------------------------------------- 1 | (int) $item->id, 26 | 'status' => $item->status, 27 | 'comments' => $item->comments, 28 | 'leave_type' => $this->includeLeaveType( $item ), //$item->leaveType, 29 | 'emp_id' => $item->emp_id, 30 | 'start_time' => $item->start_time, 31 | 'end_time' => $item->end_time, 32 | 'apply_at' => $item->created_at, 33 | 'avatar' => hrm_get_avater( $item->emp_id ) 34 | ]; 35 | 36 | } 37 | 38 | public function includeLeaveType( Leave $item ) { 39 | if ( $item->type === '0' ) { 40 | return [ 41 | 'data' => [ 42 | 'name' => 'Extra' 43 | ] 44 | ]; 45 | } 46 | 47 | $leave_type = $item->leaveType 48 | ->where( 'id', $item->type ) 49 | ->first(); 50 | 51 | $resource = new Item( $leave_type, new Leave_Type_Transform ); 52 | 53 | return $this->get_response( $resource ); 54 | 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /assets/css/images/sprites3.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /core/Config/Config.php: -------------------------------------------------------------------------------- 1 | 'load', 44 | 'params' => [], 45 | 'property' => null 46 | ]) 47 | ); 48 | 49 | $configs = self::$configs; 50 | 51 | if ( $key ) { 52 | $keys = explode( '.', $key ); 53 | 54 | foreach ( $keys as $key ) { 55 | $configs = $configs[$key]; 56 | } 57 | } 58 | 59 | return $configs; 60 | } 61 | } -------------------------------------------------------------------------------- /assets/vendor/Elegant-Loading-Indicator/jquery.preloader.min.js: -------------------------------------------------------------------------------- 1 | !function(e,t,n,i){function o(t,n){this.element=t,this.options=e.extend({},d,n),this._defaults=d,this._name=p,this.init()}var r,s,a,l,p="preloader",d={text:"",percent:"",duration:"",zIndex:"",setRelative:!1},c='',h='',u=!1,f={remove:function(){r&&(u=!1,r.remove())},update:function(e){var t=e[1];if(t.percent.length>0&&l)l.text(t.percent+"%");else if(!l)return console.warn("Значение не может быть обновлено"),!1;if(t.text.length>0&&a)a.text(t.text);else if(!a)return console.warn("Значение не может быть обновлено"),!1}};o.prototype.init=function(){function t(){var e,t=f.scrollTop(),n=$preloaderContainer.height();e=Math.round(i/2-n/2+t)+"px",$preloaderContainer.css({top:e})}var n,i,o,d,f=e(this.element);return u?(console.warn("Plugin "+p+" is already initialized"),!1):(f.prepend('
'),r=f.find(".preloader"),$preloaderContainer=f.find(".preloader-container"),s=r.find(".preloader-animation"),i=f.height(),o=f[0].scrollHeight,d=r.height(),o>d&&(r.height(o),f.on("scroll",t).trigger("scroll")),this.options.text.length>0&&($preloaderContainer.prepend(c),a=f.find(".preloader-text"),a.text(this.options.text)),this.options.percent.length>0&&(n=this.options.percent,n<0?n=0:n>100&&(n=100),$preloaderContainer.prepend(h),l=f.find(".preloader-percent"),l.text(n+"%")),this.options.duration.length>0&&setTimeout(function(){r.remove()},this.options.duration),this.options.zIndex.length>0&&r.css("z-index",this.options.zIndex),1==this.options.setRelative&&f.css("position","relative"),void(u=!0))},e.fn[p]=function(t,n){var i=arguments[0],r=Array.prototype.slice.call(arguments);return f[i]?this.each(function(){f[i].call(this,r)}):"object"!=typeof i&&i?void e.error("Method "+i+" does not exist on jQuery."+p):this.each(function(){e.data(this,"plugin_"+p)||e.data(this,"plugin_"+p),new o(this,i)})}}(jQuery,window,document); -------------------------------------------------------------------------------- /assets/src/helpers/Elegant-Loading-Indicator/jquery.preloader.min.js: -------------------------------------------------------------------------------- 1 | !function(e,t,n,i){function o(t,n){this.element=t,this.options=e.extend({},d,n),this._defaults=d,this._name=p,this.init()}var r,s,a,l,p="preloader",d={text:"",percent:"",duration:"",zIndex:"",setRelative:!1},c='',h='',u=!1,f={remove:function(){r&&(u=!1,r.remove())},update:function(e){var t=e[1];if(t.percent.length>0&&l)l.text(t.percent+"%");else if(!l)return console.warn("Значение не может быть обновлено"),!1;if(t.text.length>0&&a)a.text(t.text);else if(!a)return console.warn("Значение не может быть обновлено"),!1}};o.prototype.init=function(){function t(){var e,t=f.scrollTop(),n=$preloaderContainer.height();e=Math.round(i/2-n/2+t)+"px",$preloaderContainer.css({top:e})}var n,i,o,d,f=e(this.element);return u?(console.warn("Plugin "+p+" is already initialized"),!1):(f.prepend('
'),r=f.find(".preloader"),$preloaderContainer=f.find(".preloader-container"),s=r.find(".preloader-animation"),i=f.height(),o=f[0].scrollHeight,d=r.height(),o>d&&(r.height(o),f.on("scroll",t).trigger("scroll")),this.options.text.length>0&&($preloaderContainer.prepend(c),a=f.find(".preloader-text"),a.text(this.options.text)),this.options.percent.length>0&&(n=this.options.percent,n<0?n=0:n>100&&(n=100),$preloaderContainer.prepend(h),l=f.find(".preloader-percent"),l.text(n+"%")),this.options.duration.length>0&&setTimeout(function(){r.remove()},this.options.duration),this.options.zIndex.length>0&&r.css("z-index",this.options.zIndex),1==this.options.setRelative&&f.css("position","relative"),void(u=!0))},e.fn[p]=function(t,n){var i=arguments[0],r=Array.prototype.slice.call(arguments);return f[i]?this.each(function(){f[i].call(this,r)}):"object"!=typeof i&&i?void e.error("Method "+i+" does not exist on jQuery."+p):this.each(function(){e.data(this,"plugin_"+p)||e.data(this,"plugin_"+p),new o(this,i)})}}(jQuery,window,document); -------------------------------------------------------------------------------- /assets/src/components/departments/mixin.js: -------------------------------------------------------------------------------- 1 | export default { 2 | data () { 3 | return { 4 | isFetchRecord: false 5 | } 6 | }, 7 | methods: { 8 | showHideDepartmentForm (status, department) { 9 | var department = department || false, 10 | department = jQuery.isEmptyObject(department) ? false : department; 11 | 12 | if ( department ) { 13 | if ( status === 'toggle' ) { 14 | department.edit_mode = department.edit_mode ? false : true; 15 | } else { 16 | department.edit_mode = status; 17 | } 18 | } else { 19 | this.$store.commit( 'departments/showHideDepartmentForm', status); 20 | } 21 | }, 22 | 23 | manageDepartment() { 24 | return hrm_user_can('manage_department'); 25 | }, 26 | 27 | getDepartments: function() { 28 | var request_data = { 29 | _wpnonce: HRM_Vars.nonce, 30 | }, 31 | self = this; 32 | 33 | wp.ajax.send('get_departments', { 34 | data: request_data, 35 | beforeSend () { 36 | self.loadingStart('hrm-department-tbl-wrap'); 37 | }, 38 | success: function(res) { 39 | self.$store.commit( 40 | 'departments/setDepartments', 41 | { 42 | departments: res.departments, 43 | total: res.total_dept, 44 | dept_drop_down: res.dept_drop_down 45 | } 46 | ); 47 | self.isFetchRecord = true; 48 | self.loadingStop('hrm-department-tbl-wrap'); 49 | }, 50 | 51 | error: function(res) { 52 | 53 | } 54 | }); 55 | }, 56 | 57 | } 58 | } -------------------------------------------------------------------------------- /templates/addons/licenses.php: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 | 5 | $license ) {?> 6 | 7 | 8 | 9 | 15 | 16 | 17 |
10 | license_key_callback( $license ); 13 | ?> 14 |
18 | 19 |
20 |
21 |
22 | 23 | 68 | -------------------------------------------------------------------------------- /assets/src/components/profile/mixin.js: -------------------------------------------------------------------------------- 1 | export default { 2 | methods: { 3 | hasProfileEditPermission () { 4 | let employeeId = this.$route.params ? this.$route.params.employeeId : false; 5 | let currentUserId = HRM_Vars.current_user.ID; 6 | 7 | if(employeeId == currentUserId) { 8 | return true; 9 | } 10 | 11 | if(hrm_user_can('manage_employee_profile')) { 12 | return true; 13 | } 14 | 15 | return false; 16 | }, 17 | getPersonalInfo (args) { 18 | var self = this; 19 | 20 | var request_data = { 21 | data: { 22 | employee_id: args.employee_id 23 | }, 24 | beforeSend () { 25 | self.loadingStart('hrm-general-info'); 26 | }, 27 | success: function(res) { 28 | self.$store.commit('profile/setPersonalInfo', res); 29 | self.loadingStop('hrm-general-info'); 30 | self.isFetchRecord = true; 31 | 32 | if (typeof args.callback === 'function') { 33 | args.callback(res); 34 | } 35 | } 36 | }; 37 | 38 | self.httpRequest('hrm_get_personal_info', request_data); 39 | }, 40 | 41 | getJobLocation (args) { 42 | var self = this; 43 | 44 | var request_data = { 45 | data: { 46 | employee_id: args.employee_id 47 | }, 48 | beforeSend () { 49 | self.loadingStart('hrm-location-wrap'); 50 | }, 51 | success: function(res) { 52 | self.$store.commit('profile/setJobLocation', res.data); 53 | self.loadingStop('hrm-location-wrap'); 54 | self.isFetchRecord = true; 55 | 56 | if (typeof args.callback === 'function') { 57 | args.callback(res); 58 | } 59 | } 60 | }; 61 | 62 | self.httpRequest('hrm_get_employee_job_location', request_data); 63 | } 64 | } 65 | } -------------------------------------------------------------------------------- /models/leave.php: -------------------------------------------------------------------------------- 1 | array ( 12 | 'type' => 'required', 13 | 'message' => array( 14 | 'required' => 'Start time is required', 15 | ) 16 | ), 17 | 18 | 'end_time' => array ( 19 | 'type' => 'required', 20 | 'message' => array( 21 | 'required' => 'End time is required', 22 | ) 23 | ), 24 | 25 | 'emp_id' => array ( 26 | 'type' => 'required', 27 | 'message' => array( 28 | 'required' => 'Please select employee', 29 | ) 30 | ), 31 | 32 | 'type' => array ( 33 | 'type' => 'relational_required:disable_leave_type,false', 34 | 'message' => array( 35 | 'required' => 'Leave type is required', 36 | ) 37 | ) 38 | ); 39 | 40 | protected $primaryKey = 'id'; 41 | protected $table = 'hrm_leave'; 42 | public $timestamps = true; 43 | 44 | protected $fillable = [ 45 | 'status', 46 | 'comments', 47 | 'type', 48 | 'emp_id', 49 | 'start_time', 50 | 'end_time', 51 | ]; 52 | 53 | public function setEmpIdAttribute( $value ) { 54 | $this->attributes['emp_id'] = absint( $value ) > 0 ? $value : get_current_user_id(); 55 | } 56 | 57 | public function setLeaveCommentsAttribute( $value ) { 58 | $this->attributes['comments'] = ! trim( $value ) ? __( 'No comment', 'hrm' ) : $value; 59 | } 60 | 61 | public function setLeaveStatusAttribute( $value ) { 62 | $this->attributes['status'] = absint( $value ) ? 1 : $value; 63 | } 64 | 65 | public function setLeaveTypeIdAttribute( $value ) { 66 | $this->attributes['type'] = absint( $value ) <= 0 ? 0 : $value; 67 | } 68 | 69 | public function leaveType() { 70 | return $this->hasOne( 'HRM\Models\Leave_Type', 'id', 'type' ); 71 | } 72 | 73 | public function user() { 74 | return $this->hasOne( 'HRM\Models\User', 'ID', 'emp_id' ); 75 | } 76 | } 77 | 78 | -------------------------------------------------------------------------------- /core/Crud/Crud.php: -------------------------------------------------------------------------------- 1 | postdata = $postdata; 26 | } 27 | 28 | /** 29 | * Get form submited data 30 | * 31 | * @return array() 32 | */ 33 | public function get_post_data() { 34 | return $this->postdata; 35 | } 36 | 37 | /** 38 | * Set class name 39 | * 40 | * @param string $class_name 41 | * 42 | * @return void 43 | */ 44 | public function set_class( $class_name ) { 45 | $this->class = $class_name; 46 | } 47 | 48 | /** 49 | * Get class name 50 | * 51 | * @return string 52 | */ 53 | public function get_class() { 54 | return $this->class; 55 | } 56 | 57 | /** 58 | * Set method 59 | * 60 | * @param string $method 61 | * 62 | * @return void 63 | */ 64 | public function set_method( $method ) { 65 | $this->method = $method; 66 | } 67 | 68 | /** 69 | * Get method 70 | * 71 | * @return string 72 | */ 73 | public function get_method() { 74 | return $this->method; 75 | } 76 | 77 | 78 | public static function ajax_data_process() { 79 | check_ajax_referer('hrm_nonce'); 80 | 81 | $success = self::data_process( $_POST ); 82 | 83 | if ( is_wp_error( $success ) ) { 84 | wp_send_json_error( array( 85 | 'error' => $success->get_error_messages() 86 | )); 87 | } 88 | 89 | wp_send_json_success(array( 90 | 'success' => __( 'Successfully updated', 'hrm' ) 91 | )); 92 | } 93 | 94 | public static function data_process( $postdata ) { 95 | $class = isset( $postdata['class'] ) ? $postdata['class'] : ''; 96 | $method = isset( $postdata['method'] ) ? $postdata['method'] : ''; 97 | $self = self::getInstance(); 98 | 99 | $self->set_post_data( $postdata ); 100 | $self->set_class( $class ); 101 | $self->set_method( $method ); 102 | 103 | return $self->$method(); 104 | } 105 | } -------------------------------------------------------------------------------- /include/payroll_formula.php: -------------------------------------------------------------------------------- 1 | load_templae( $template, $args ); 22 | return ob_get_clean(); 23 | } 24 | 25 | public function load_templae( $file, $args = null ) { 26 | if ( $args && is_array( $args ) ) { 27 | extract( $args ); 28 | } 29 | 30 | if ( file_exists( $file ) ){ 31 | include( $file ); 32 | } 33 | } 34 | 35 | public function from_email() { 36 | $email = get_option( 'hrm_email_settings', [ 37 | 'form_email' => get_bloginfo( 'admin_email' ) 38 | ]); 39 | return apply_filters('hrm_from_email', $email['form_email'] ); 40 | } 41 | 42 | public function email_tyle() { 43 | $settings = get_option( 'hrm_email_settings', []); 44 | return apply_filters('hrm_email_type', $settings['email_type'] ); 45 | } 46 | 47 | /** 48 | * Get WordPress blog name. 49 | * 50 | * @return string 51 | */ 52 | public function get_blogname() { 53 | return wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES ); 54 | } 55 | 56 | public static function send( $to, $subject, $message, $headers = [], $attachments = null ) { 57 | $server = wp_unslash( $_SERVER ); 58 | $blogname = self::getInstance()->get_blogname(); 59 | $no_reply = 'no-reply@' . preg_replace( '#^www\.#', '', strtolower( $server['SERVER_NAME'] ) ); 60 | $content_type = 'Content-Type: text/html'; 61 | $charset = 'Charset: UTF-8'; 62 | $from_email = self::getInstance()->from_email(); 63 | $from = "From: $blogname <$from_email>"; 64 | $reply_to = "Reply-To: $no_reply"; 65 | 66 | $headers = array( 67 | $reply_to, 68 | $content_type, 69 | $charset, 70 | $from, 71 | ); 72 | 73 | return wp_mail( $to, $subject, $message, $headers, $attachments ); 74 | 75 | } 76 | } -------------------------------------------------------------------------------- /assets/src/components/dashboard/mixin.js: -------------------------------------------------------------------------------- 1 | export default { 2 | data () { 3 | return { 4 | 5 | } 6 | }, 7 | methods: { 8 | getHeaderBlock (args) { 9 | var self = this; 10 | 11 | var form_data = { 12 | data: {}, 13 | success: function(res) { 14 | if (typeof args.callback != 'undefined') { 15 | args.callback(res); 16 | } 17 | }, 18 | }; 19 | 20 | this.httpRequest('hrm_get_dashboard_header_block', form_data); 21 | }, 22 | 23 | getDashboardAttendance (args) { 24 | var self = this; 25 | args = args || {}; 26 | 27 | var form_data = { 28 | data: {}, 29 | success: function(res) { 30 | if (typeof args.callback != 'undefined') { 31 | args.callback(res); 32 | } 33 | }, 34 | }; 35 | 36 | this.httpRequest('hrm_get_dashboard_attendance', form_data); 37 | }, 38 | 39 | getDashboardLeaves (args) { 40 | var self = this; 41 | args = args || {}; 42 | 43 | var form_data = { 44 | data: {}, 45 | success: function(res) { 46 | if (typeof args.callback != 'undefined') { 47 | args.callback(res); 48 | } 49 | }, 50 | }; 51 | 52 | this.httpRequest('hrm_get_dashboard_leaves', form_data); 53 | }, 54 | 55 | getDashboardNotices (args) { 56 | var self = this; 57 | 58 | var postData = { 59 | 'class': 'Notice', 60 | 'method': 'gets', 61 | 'transformers': 'Notice_Transformer', 62 | 'page': 1 63 | }; 64 | 65 | var request_data = { 66 | data: postData, 67 | success: function(res) { 68 | if(typeof args.callback != 'undefined') { 69 | args.callback(res); 70 | } 71 | } 72 | }; 73 | 74 | self.httpRequest('hrm_get_records', request_data); 75 | }, 76 | 77 | getDashboardBirthdays (args) { 78 | var self = this; 79 | args = args || {}; 80 | 81 | var form_data = { 82 | data: {}, 83 | success: function(res) { 84 | if (typeof args.callback != 'undefined') { 85 | args.callback(res); 86 | } 87 | }, 88 | }; 89 | 90 | this.httpRequest('hrm_get_dashboard_birthdays', form_data); 91 | } 92 | } 93 | } -------------------------------------------------------------------------------- /assets/src/components/departments/departments.vue: -------------------------------------------------------------------------------- 1 | 39 | 40 | 70 | 71 | -------------------------------------------------------------------------------- /assets/src/components/addons/addons.vue: -------------------------------------------------------------------------------- 1 | 55 | 56 | 80 | 81 | -------------------------------------------------------------------------------- /assets/src/components/profile/router.js: -------------------------------------------------------------------------------- 1 | 2 | HRMRegisterModule('profile', 'profile'); 3 | 4 | import './work-experience/router'; 5 | import './education/router'; 6 | import './skill/router'; 7 | 8 | import personalInformation from './personal-information.vue' 9 | import jobLocation from './job-location.vue' 10 | import profile from './profile.vue' 11 | 12 | // let personalInformation = resolve => { 13 | // require.ensure(['./personal-information.vue'], () => { 14 | // resolve(require('./personal-information.vue')); 15 | // }); 16 | // } 17 | 18 | // let jobLocation = resolve => { 19 | // require.ensure(['./job-location.vue'], () => { 20 | // resolve(require('./job-location.vue')); 21 | // }); 22 | // } 23 | 24 | // let profile = resolve => { 25 | // require.ensure(['./profile.vue'], () => { 26 | // resolve(require('./profile.vue')); 27 | // }); 28 | // } 29 | 30 | function HRM_URM_Params (self, params) { 31 | let employeeId = self.$route.params.employeeId 32 | ? self.$route.params.employeeId 33 | : HRM_Vars.current_user.data.ID 34 | 35 | return { 36 | employeeId: employeeId 37 | } 38 | } 39 | 40 | let menu = [ 41 | { 42 | path: 'employees', 43 | component: profile, 44 | name: 'profile', 45 | meta: { 46 | label: 'Profile', 47 | order: 6 48 | }, 49 | 50 | children: HRMGetRegisterChildrenRoute( 'profile', 51 | [ 52 | { 53 | path: ':employeeId/general-information', 54 | component: personalInformation, 55 | name: 'employee_general_information', 56 | meta: { 57 | label: 'General Information', 58 | params (self, params) { 59 | return HRM_URM_Params(self, params); 60 | } 61 | } 62 | }, 63 | 64 | { 65 | path: ':employeeId/job-location', 66 | component: jobLocation, 67 | name: 'job_location', 68 | meta: { 69 | label: 'Job Loaction', 70 | params (self, params) { 71 | return HRM_URM_Params(self, params); 72 | } 73 | } 74 | } 75 | ] 76 | ) 77 | }, 78 | ]; 79 | 80 | HRMRegisterChildrenRoute ('hrm_root', menu); 81 | 82 | export default menu; 83 | 84 | -------------------------------------------------------------------------------- /assets/src/components/designation/new-designation-form.vue: -------------------------------------------------------------------------------- 1 | 24 | 25 | -------------------------------------------------------------------------------- /assets/src/components/organization/location/new-location-form.vue: -------------------------------------------------------------------------------- 1 | 24 | 25 | -------------------------------------------------------------------------------- /assets/src/components/settings/general.vue: -------------------------------------------------------------------------------- 1 | 33 | 75 | -------------------------------------------------------------------------------- /assets/css/Elegant-Loading-Indicator/preloader.css: -------------------------------------------------------------------------------- 1 | .preloader { 2 | background: #ffffff; 3 | position: absolute; 4 | top: 0; 5 | bottom: 0; 6 | left: 0; 7 | right: 0; 8 | width: 100%; 9 | min-height: 100%; 10 | z-index: 1; 11 | opacity: .8; } 12 | .preloader.full-preloader { 13 | position: fixed; 14 | z-index: 2000; } 15 | .preloader.full-preloader .preloader-animation { 16 | position: absolute; 17 | top: calc(50% - 3.25em); 18 | left: calc(50% - 3.25em); } 19 | .preloader-container { 20 | position: absolute; 21 | top: calc(50% - 3.25em); 22 | text-align: center; 23 | width: 100%; } 24 | .preloader-animation { 25 | display: inline-block; 26 | height: 6.5em; 27 | width: 6.5em; 28 | border-radius: 50%; 29 | border: 3px solid transparent; 30 | border-top-color: #ffa726; 31 | -webkit-animation: spin 2s linear infinite; 32 | animation: spin 2s linear infinite; } 33 | .preloader-animation:before { 34 | content: ""; 35 | position: absolute; 36 | top: 3px; 37 | left: 3px; 38 | right: 3px; 39 | bottom: 3px; 40 | border-radius: 50%; 41 | border: 3px solid transparent; 42 | border-top-color: #34495e; 43 | -webkit-animation: spin 1.5s linear infinite; 44 | animation: spin 1.5s linear infinite; } 45 | .preloader-animation:after { 46 | content: ""; 47 | position: absolute; 48 | top: 10px; 49 | left: 10px; 50 | right: 10px; 51 | bottom: 10px; 52 | border-radius: 50%; 53 | border: 3px solid transparent; 54 | border-top-color: #62cb31; 55 | -webkit-animation: spin 1s linear infinite; 56 | animation: spin 1s linear infinite; } 57 | .preloader-text, .preloader-percent { 58 | position: absolute; 59 | text-align: center; 60 | color: #34495e; 61 | z-index: 1; } 62 | .preloader-text { 63 | width: 50%; 64 | top: calc(50% - 6.5em); 65 | left: 25%; } 66 | .preloader-percent { 67 | width: 3em; 68 | top: calc(50% - .75em); 69 | left: calc(50% - 1.5em); } 70 | 71 | @-webkit-keyframes spin { 72 | 0% { 73 | -webkit-transform: rotate(0deg); 74 | -ms-transform: rotate(0deg); 75 | transform: rotate(0deg); } 76 | 100% { 77 | -webkit-transform: rotate(360deg); 78 | -ms-transform: rotate(360deg); 79 | transform: rotate(360deg); } } 80 | 81 | @keyframes spin { 82 | 0% { 83 | -webkit-transform: rotate(0deg); 84 | -ms-transform: rotate(0deg); 85 | transform: rotate(0deg); } 86 | 100% { 87 | -webkit-transform: rotate(360deg); 88 | -ms-transform: rotate(360deg); 89 | transform: rotate(360deg); } } 90 | -------------------------------------------------------------------------------- /assets/src/components/leave/leave-header.vue: -------------------------------------------------------------------------------- 1 | 19 | 20 | 87 | -------------------------------------------------------------------------------- /assets/src/components/leave/leave-records-directive.js: -------------------------------------------------------------------------------- 1 | var HRM_Employee_Leave_Recors = { 2 | vnode: {}, 3 | eventCallback: '', 4 | 5 | init (el, binding, vnode) { 6 | var self = this; 7 | this.vnode = vnode; 8 | 9 | jQuery('.hrm-employee-leave-records').fullCalendar(self.getCalendarProperty()); 10 | }, 11 | 12 | getCalendarProperty () { 13 | return { 14 | header: { 15 | left: 'prev,next', 16 | center: 'title', 17 | right: 'listYear,prev,next' 18 | }, 19 | defaultView: 'listYear', 20 | height: 400, 21 | navLinks: false, // can click day/week names to navigate views 22 | editable: false, 23 | eventLimit: true, // allow "more" link when too many events 24 | fixedWeekCount: false, //remove others month days for current month 25 | showNonCurrentDates: false, 26 | displayEventTime: false, 27 | allDay: true, 28 | events: this.getLeaveRecords, 29 | resourceGroupField: 'building', 30 | 31 | resources: [ 32 | 33 | { id: 'b', building: '564 Pacific', title: 'Auditorium V' }, 34 | { id: 'b', building: '564 Pacific', title: 'Auditorium W' }, 35 | { id: 'c', building: '564 Pacific', title: 'Auditorium X' }, 36 | { id: 'c', building: '564 Pacific', title: 'Auditorium Y' }, 37 | { id: 'c', building: '564 Pacific', title: 'Auditorium Z' } 38 | 39 | ] 40 | } 41 | }, 42 | 43 | getLeaveRecords (start, end, timezone, callback) { 44 | var self = HRM_Employee_Leave_Recors; 45 | 46 | self.vnode.context.getLeaveRecords({ 47 | 'emp_id': HRM_Vars.current_user.data.ID, 48 | 'callback': self.setEvents 49 | }); 50 | 51 | self.eventCallback = callback; 52 | }, 53 | 54 | setEvents (res) { 55 | var self = HRM_Employee_Leave_Recors; 56 | var events = []; 57 | 58 | jQuery.each(res.data, function(key, val) { 59 | 60 | var obj = { 61 | id: val.id, 62 | title: val.type == '0' ? 'Extra' : val.leave_type.name, 63 | start: hrm.Moment(val.start_time).format('YYYY-MM-DD'), 64 | end: hrm.Moment(val.end_time).add(1, 'days').format('YYYY-MM-DD'), 65 | backgroundColor: '#e08989', 66 | borderColor: '#e08989', 67 | allDay: true, 68 | }; 69 | 70 | events.push(obj); 71 | }); 72 | 73 | self.eventCallback([ 74 | { id: '1', resourceId: 'b', start: '2017-10-01', end: '2017-10-31', title: 'event 1' }, 75 | { id: '2', resourceId: 'c', start: '2017-11-01', end: '2017-11-31', title: 'event 2' }, 76 | ]); 77 | } 78 | } 79 | 80 | 81 | 82 | 83 | 84 | // Register a global custom directive called v-cpm-datepicker 85 | hrm.Vue.directive('employee-leave-records', { 86 | inserted (el, binding, vnode) { 87 | HRM_Employee_Leave_Recors.init( el, binding, vnode ); 88 | } 89 | }); -------------------------------------------------------------------------------- /assets/vendor/tiptip/jquery.tipTip.min.js: -------------------------------------------------------------------------------- 1 | !function(a){a.fn.tipTip=function(b){var c={activation:"hover",keepAlive:!1,maxWidth:"200px",edgeOffset:3,defaultPosition:"bottom",delay:400,fadeIn:200,fadeOut:200,attribute:"title",content:!1,enter:function(){},exit:function(){}},d=a.extend(c,b);if(a("#tiptip_holder").length<=0){var e=a('
'),f=a('
'),g=a('
');a("body").append(e.html(f).prepend(g.html('
')))}else var e=a("#tiptip_holder"),f=a("#tiptip_content"),g=a("#tiptip_arrow");return this.each(function(){function b(){d.enter.call(this),f.html(i),e.hide().removeAttr("class").css("margin","0"),g.removeAttr("style");var b=parseInt(h.offset().top),c=parseInt(h.offset().left),k=parseInt(h.outerWidth()),l=parseInt(h.outerHeight()),m=e.outerWidth(),n=e.outerHeight(),o=Math.round((k-m)/2),p=Math.round((l-n)/2),q=Math.round(c+o),r=Math.round(b+l+d.edgeOffset),s="",t="",u=Math.round(m-12)/2;"bottom"==d.defaultPosition?s="_bottom":"top"==d.defaultPosition?s="_top":"left"==d.defaultPosition?s="_left":"right"==d.defaultPosition&&(s="_right");var v=o+cparseInt(a(window).width());v&&0>o||"_right"==s&&!w||"_left"==s&&co||"_left"==s&&!v)&&(s="_left",t=Math.round(n-13)/2,u=Math.round(m),q=Math.round(c-(m+d.edgeOffset+5)),r=Math.round(b+p));var x=b+l+d.edgeOffset+n+8>parseInt(a(window).height()+a(window).scrollTop()),y=b+l-(d.edgeOffset+n+8)<0;x||"_bottom"==s&&x||"_top"==s&&!y?("_top"==s||"_bottom"==s?s="_top":s+="_top",t=n,r=Math.round(b-(n+5+d.edgeOffset))):(y|("_top"==s&&y)||"_bottom"==s&&!x)&&("_top"==s||"_bottom"==s?s="_bottom":s+="_bottom",t=-12,r=Math.round(b+l+d.edgeOffset)),"_right_top"==s||"_left_top"==s?r+=5:("_right_bottom"==s||"_left_bottom"==s)&&(r-=5),("_left_top"==s||"_left_bottom"==s)&&(q+=5),g.css({"margin-left":u+"px","margin-top":t+"px"}),e.css({"margin-left":q+"px","margin-top":r+"px"}).attr("class","tip"+s),j&&clearTimeout(j),j=setTimeout(function(){e.stop(!0,!0).fadeIn(d.fadeIn)},d.delay)}function c(){d.exit.call(this),j&&clearTimeout(j),e.fadeOut(d.fadeOut)}var h=a(this);if(d.content)var i=d.content;else var i=h.attr(d.attribute);if(""!=i){d.content||h.removeAttr(d.attribute);var j=!1;"hover"==d.activation?(h.hover(function(){b()},function(){d.keepAlive||c()}),d.keepAlive&&e.hover(function(){},function(){c()})):"focus"==d.activation?h.focus(function(){b()}).blur(function(){c()}):"click"==d.activation&&(h.click(function(){return b(),!1}).hover(function(){},function(){d.keepAlive||c()}),d.keepAlive&&e.hover(function(){},function(){c()}))}})}}(jQuery); -------------------------------------------------------------------------------- /assets/src/helpers/tiptip/jquery.tipTip.min.js: -------------------------------------------------------------------------------- 1 | !function(a){a.fn.tipTip=function(b){var c={activation:"hover",keepAlive:!1,maxWidth:"200px",edgeOffset:3,defaultPosition:"bottom",delay:400,fadeIn:200,fadeOut:200,attribute:"title",content:!1,enter:function(){},exit:function(){}},d=a.extend(c,b);if(a("#tiptip_holder").length<=0){var e=a('
'),f=a('
'),g=a('
');a("body").append(e.html(f).prepend(g.html('
')))}else var e=a("#tiptip_holder"),f=a("#tiptip_content"),g=a("#tiptip_arrow");return this.each(function(){function b(){d.enter.call(this),f.html(i),e.hide().removeAttr("class").css("margin","0"),g.removeAttr("style");var b=parseInt(h.offset().top),c=parseInt(h.offset().left),k=parseInt(h.outerWidth()),l=parseInt(h.outerHeight()),m=e.outerWidth(),n=e.outerHeight(),o=Math.round((k-m)/2),p=Math.round((l-n)/2),q=Math.round(c+o),r=Math.round(b+l+d.edgeOffset),s="",t="",u=Math.round(m-12)/2;"bottom"==d.defaultPosition?s="_bottom":"top"==d.defaultPosition?s="_top":"left"==d.defaultPosition?s="_left":"right"==d.defaultPosition&&(s="_right");var v=o+cparseInt(a(window).width());v&&0>o||"_right"==s&&!w||"_left"==s&&co||"_left"==s&&!v)&&(s="_left",t=Math.round(n-13)/2,u=Math.round(m),q=Math.round(c-(m+d.edgeOffset+5)),r=Math.round(b+p));var x=b+l+d.edgeOffset+n+8>parseInt(a(window).height()+a(window).scrollTop()),y=b+l-(d.edgeOffset+n+8)<0;x||"_bottom"==s&&x||"_top"==s&&!y?("_top"==s||"_bottom"==s?s="_top":s+="_top",t=n,r=Math.round(b-(n+5+d.edgeOffset))):(y|("_top"==s&&y)||"_bottom"==s&&!x)&&("_top"==s||"_bottom"==s?s="_bottom":s+="_bottom",t=-12,r=Math.round(b+l+d.edgeOffset)),"_right_top"==s||"_left_top"==s?r+=5:("_right_bottom"==s||"_left_bottom"==s)&&(r-=5),("_left_top"==s||"_left_bottom"==s)&&(q+=5),g.css({"margin-left":u+"px","margin-top":t+"px"}),e.css({"margin-left":q+"px","margin-top":r+"px"}).attr("class","tip"+s),j&&clearTimeout(j),j=setTimeout(function(){e.stop(!0,!0).fadeIn(d.fadeIn)},d.delay)}function c(){d.exit.call(this),j&&clearTimeout(j),e.fadeOut(d.fadeOut)}var h=a(this);if(d.content)var i=d.content;else var i=h.attr(d.attribute);if(""!=i){d.content||h.removeAttr(d.attribute);var j=!1;"hover"==d.activation?(h.hover(function(){b()},function(){d.keepAlive||c()}),d.keepAlive&&e.hover(function(){},function(){c()})):"focus"==d.activation?h.focus(function(){b()}).blur(function(){c()}):"click"==d.activation&&(h.click(function(){return b(),!1}).hover(function(){},function(){d.keepAlive||c()}),d.keepAlive&&e.hover(function(){},function(){c()}))}})}}(jQuery); -------------------------------------------------------------------------------- /webpack.config.js: -------------------------------------------------------------------------------- 1 | const path = require('path'); 2 | const webpack = require('webpack'); 3 | const shell = require('shelljs'); 4 | const UglifyJsPlugin = require('uglifyjs-webpack-plugin') 5 | const outputPath = path.resolve( __dirname, 'assets/js') 6 | const isProduction = (process.env.NODE_ENV == 'production') 7 | const plugins = [] 8 | 9 | 10 | //Remove all webpack build file 11 | shell.rm('-rf', outputPath) 12 | 13 | function resolve (dir) { 14 | return path.join(__dirname, './assets/src', dir) 15 | } 16 | 17 | if (isProduction) { 18 | plugins.push( 19 | new UglifyJsPlugin() 20 | ) 21 | } 22 | 23 | module.exports = { 24 | entry: { 25 | 'hrm': './assets/src/start.js', 26 | // 'library': './assets/src/helpers/library.js', 27 | }, 28 | 29 | output: { 30 | path: outputPath, 31 | filename: '[name].js', 32 | publicPath: '', 33 | chunkFilename: 'chunk/[chunkhash].chunk-bundle.js', 34 | jsonpFunction: 'wpSpearHrm', 35 | }, 36 | 37 | resolve: { 38 | extensions: ['.js', '.vue', '.json'], 39 | alias: { 40 | '@components': resolve('components'), 41 | '@directives': resolve('directives'), 42 | '@helpers': resolve('helpers'), 43 | '@router': resolve('router'), 44 | '@store': resolve('store'), 45 | '@src': resolve('') 46 | } 47 | }, 48 | 49 | module: { 50 | rules: [ 51 | // doc url https://vue-loader.vuejs.org/en/options.html#loaders 52 | { 53 | test: /\.vue$/, 54 | loader: 'vue-loader', 55 | options: { 56 | loaders: { 57 | js: 'babel-loader' 58 | } 59 | } 60 | }, 61 | { 62 | test: /\.js$/, 63 | loader: 'babel-loader', 64 | include: [ 65 | resolve(''), 66 | path.resolve('node_modules/vue-color'), 67 | path.resolve('node_modules/vue-multiselect') 68 | ], 69 | query: { 70 | presets:[ "env", "stage-3" , "es2015" ] 71 | } 72 | }, 73 | { 74 | test: /\.(png|jpg|gif|svg)$/, 75 | loader: 'file-loader', 76 | exclude: /node_modules/, 77 | options: { 78 | name: '[name].[ext]?[hash]' 79 | } 80 | }, 81 | { 82 | test: /\.less$/, 83 | use: [{ 84 | loader: "style-loader" // creates style nodes from JS strings 85 | }, { 86 | loader: "css-loader" // translates CSS into CommonJS 87 | }, { 88 | loader: "less-loader" // compiles Less to CSS 89 | }] 90 | } 91 | ] 92 | }, 93 | 94 | plugins: plugins 95 | } 96 | 97 | 98 | -------------------------------------------------------------------------------- /assets/src/components/leave/leave-work-week.js: -------------------------------------------------------------------------------- 1 | var Hrm_Leave_Work_Week = { 2 | template: '#tmpl-hrm-leave-work-week', 3 | 4 | mixins: [Mixin], 5 | 6 | store: HRM_Leave_Store, 7 | 8 | data: function() { 9 | return { 10 | saturday: 'full', 11 | sunday: 'full', 12 | monday: 'full', 13 | tuesday: 'full', 14 | wednesday: 'full', 15 | thursday: 'full', 16 | friday: 'full' 17 | 18 | } 19 | }, 20 | 21 | computed: { 22 | 23 | }, 24 | 25 | created: function() { 26 | this.getWorkWeek(); 27 | }, 28 | methods: { 29 | getWorkWeek: function() { 30 | var request_data = { 31 | _wpnonce: HRM_Vars.nonce, 32 | }, 33 | self = this; 34 | 35 | wp.ajax.send('get_work_week', { 36 | data: request_data, 37 | 38 | success: function(res) { 39 | // Display a success toast, with a title 40 | //hrm.Toastr.success(res.success); 41 | 42 | self.saturday = res.work_week.saturday; 43 | self.sunday = res.work_week.sunday; 44 | self.monday = res.work_week.monday; 45 | self.tuesday = res.work_week.tuesday; 46 | self.wednesday = res.work_week.wednesday; 47 | self.thursday = res.work_week.thursday; 48 | self.friday = res.work_week.friday; 49 | 50 | }, 51 | 52 | error: function(res) { 53 | self.show_spinner = false; 54 | // Showing error 55 | res.error.map( function( value, index ) { 56 | hrm.Toastr.error(value); 57 | }); 58 | } 59 | }); 60 | }, 61 | saveWorkWeek: function() { 62 | 63 | var request_data = { 64 | _wpnonce: HRM_Vars.nonce, 65 | saturday: this.saturday, 66 | sunday: this.sunday, 67 | monday: this.monday, 68 | tuesday: this.tuesday, 69 | wednesday: this.wednesday, 70 | thursday: this.thursday, 71 | friday: this.friday 72 | }; 73 | 74 | 75 | wp.ajax.send('save_work_week', { 76 | data: request_data, 77 | 78 | success: function(res) { 79 | // Display a success toast, with a title 80 | hrm.Toastr.success(res.success); 81 | 82 | }, 83 | 84 | error: function(res) { 85 | self.show_spinner = false; 86 | // Showing error 87 | res.error.map( function( value, index ) { 88 | hrm.Toastr.error(value); 89 | }); 90 | } 91 | }); 92 | } 93 | } 94 | }; -------------------------------------------------------------------------------- /assets/src/components/employee/new-employee-form.vue: -------------------------------------------------------------------------------- 1 | 24 | 25 | -------------------------------------------------------------------------------- /assets/src/components/attendance/attendance-header.vue: -------------------------------------------------------------------------------- 1 | 20 | 21 | 88 | 89 | -------------------------------------------------------------------------------- /assets/src/components/organization/notice/new-notice-form.vue: -------------------------------------------------------------------------------- 1 | 26 | 27 | -------------------------------------------------------------------------------- /assets/src/components/profile/work-experience/new-work-experience-form.vue: -------------------------------------------------------------------------------- 1 | 24 | 25 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "HRM", 3 | "version": "2.2.14", 4 | "description": "Human resourcee management", 5 | "main": "index.js", 6 | "directories": { 7 | "test": "tests" 8 | }, 9 | "scripts": { 10 | "hrm": "webpack", 11 | "build": "webpack-dev-server", 12 | "dev": "webpack --progress --colors --watch", 13 | "reset": "NODE_ENV=production webpack --progress --colors" 14 | }, 15 | "repository": { 16 | "type": "git", 17 | "url": "git+https://github.com/weDevsOfficial/wp-project-manager.git" 18 | }, 19 | "author": "", 20 | "license": "ISC", 21 | "bugs": { 22 | "url": "https://github.com/weDevsOfficial/wp-project-manager/issues" 23 | }, 24 | "homepage": "https://github.com/weDevsOfficial/wp-project-manager#readme", 25 | "devDependencies": { 26 | "ajv": "^5.5.2", 27 | "ajv-keywords": "^2.1.1", 28 | "babel-core": "^6.26.0", 29 | "babel-loader": "^7.1.2", 30 | "babel-plugin-syntax-dynamic-import": "^6.18.0", 31 | "babel-plugin-transform-runtime": "^6.23.0", 32 | "babel-preset-env": "^1.7.0", 33 | "babel-preset-es2015": "^6.24.1", 34 | "babel-preset-stage-2": "^6.24.1", 35 | "coffee-loader": "^0.8.0", 36 | "coffeescript": "^1.12.7", 37 | "css-loader": "^0.28.9", 38 | "es6-promise": "^4.2.4", 39 | "eslint": "^4.17.0", 40 | "eslint-loader": "^1.9.0", 41 | "file-loader": "^0.11.2", 42 | "grunt": "^1.0.2", 43 | "grunt-browserify": "^5.0.0", 44 | "grunt-contrib-clean": "^1.0.0", 45 | "grunt-contrib-compress": "^1.4.1", 46 | "grunt-contrib-concat": "^1.0.1", 47 | "grunt-contrib-copy": "^1.0.0", 48 | "grunt-contrib-jshint": "^1.1.0", 49 | "grunt-contrib-less": "^1.4.0", 50 | "grunt-contrib-watch": "^1.0.0", 51 | "grunt-run": "^0.8.0", 52 | "grunt-ssh": "^0.12.9", 53 | "grunt-wp-i18n": "^1.0.0", 54 | "html-webpack-plugin": "^2.30.1", 55 | "less": "^3.0.1", 56 | "less-loader": "^4.1.0", 57 | "node-sass": "^4.7.2", 58 | "pug": "^2.0.0-rc.4", 59 | "react": "^15.6.2", 60 | "rimraf": "^2.6.1", 61 | "sass-loader": "^6.0.6", 62 | "shelljs": "^0.8.1", 63 | "uglify-js": "^3.3.9", 64 | "uglifyjs-webpack-plugin": "^1.2.4", 65 | "vue-loader": "^13.7.1", 66 | "vue-template-compiler": "^2.5.13", 67 | "watch": "^1.0.2", 68 | "webpack": "^2.7.0", 69 | "webpack-dev-server": "^2.11.1" 70 | }, 71 | "dependencies": { 72 | "code-split-component": "^2.0.0-alpha.5", 73 | "fullcalendar": "3.4.0", 74 | "jquery-timepicker": "^1.3.3", 75 | "moment": "^2.19.1", 76 | "moment-range": "^4.0.1", 77 | "moment-timezone": "^0.5.13", 78 | "nprogress": "^0.2.0", 79 | "promise-polyfill": "7.0.0", 80 | "proposal": "^3.0.0", 81 | "toastr": "^2.1.2", 82 | "vue": "^2.5.2", 83 | "vue-multiselect": "^2.0.3", 84 | "vue-router": "^3.0.1", 85 | "vuex": "^3.0.0" 86 | } 87 | } 88 | -------------------------------------------------------------------------------- /assets/src/components/profile/skill/new-skill-form.vue: -------------------------------------------------------------------------------- 1 | 24 | 25 | -------------------------------------------------------------------------------- /assets/src/components/attendance/attendance-user-search.vue: -------------------------------------------------------------------------------- 1 | 22 | 23 | 97 | 98 | 99 | -------------------------------------------------------------------------------- /assets/src/components/leave/leave-records.vue: -------------------------------------------------------------------------------- 1 | 25 | 26 | 27 | 86 | 87 | 105 | 106 | 107 | 108 | 109 | -------------------------------------------------------------------------------- /assets/src/components/payroll/group/new-group-form.vue: -------------------------------------------------------------------------------- 1 | 24 | 25 | -------------------------------------------------------------------------------- /assets/src/components/profile/education/new-education-form.vue: -------------------------------------------------------------------------------- 1 | 25 | 26 | -------------------------------------------------------------------------------- /class/seeder.php: -------------------------------------------------------------------------------- 1 | create_employees(50); 4 | class HRM_Seeder { 5 | 6 | private static $instance; 7 | 8 | public static function getInstance() { 9 | if( ! self::$instance ) { 10 | self::$instance = new HRM_Seeder(); 11 | } 12 | 13 | return self::$instance; 14 | } 15 | 16 | function create_employees( $length = 10 ) { 17 | 18 | for ( $i=0; $i < $length; $i++ ) { 19 | 20 | $postdata['first_name'] = $this->generateRandomString(); 21 | $postdata['last_name'] = $this->generateRandomString(); 22 | $postdata['user_name'] = $this->generateRandomString(); 23 | $postdata['email'] = $this->mail_generator(); 24 | $postdata['emp_job_category'] = rand(1, 7); 25 | $postdata['emp_location'] = $this->generateRandomString(); 26 | $postdata['job_desc'] = $this->generateRandomString(); 27 | $postdata['status'] = array_rand(array('yes' => 'Enable', 'no'=> 'Desable')); 28 | $postdata['gender'] = array_rand(array('male' => '1', 'female'=> '2')); 29 | $postdata['mobile'] = rand(11, 11); 30 | 31 | Hrm_Employee::getInstance()->add_new_employee( $postdata ); 32 | } 33 | } 34 | 35 | function generateRandomString() { 36 | $length = rand(5, 10); 37 | $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; 38 | $charactersLength = strlen($characters); 39 | $randomString = ''; 40 | for ($i = 0; $i < $length; $i++) { 41 | $randomString .= $characters[rand(0, $charactersLength - 1)]; 42 | } 43 | return ucfirst( $randomString ); 44 | } 45 | 46 | function mail_generator() { 47 | // array of possible top-level domains 48 | $tlds = array("com", "net", "gov", "org", "edu", "biz", "info"); 49 | 50 | // string of possible characters 51 | $char = "0123456789abcdefghijklmnopqrstuvwxyz"; 52 | 53 | 54 | // main loop - this gives 1000 addresses 55 | 56 | 57 | // choose random lengths for the username ($ulen) and the domain ($dlen) 58 | $ulen = mt_rand(5, 10); 59 | $dlen = mt_rand(4, 4); 60 | 61 | // reset the address 62 | $a = ""; 63 | 64 | // get $ulen random entries from the list of possible characters 65 | // these make up the username (to the left of the @) 66 | for ($i = 1; $i <= $ulen; $i++) { 67 | $a .= substr($char, mt_rand(0, strlen($char)), 1); 68 | } 69 | 70 | // wouldn't work so well without this 71 | $a .= "@"; 72 | 73 | // now get $dlen entries from the list of possible characters 74 | // this is the domain name (to the right of the @, excluding the tld) 75 | for ($i = 1; $i <= $dlen; $i++) { 76 | $a .= substr($char, mt_rand(0, strlen($char)), 1); 77 | } 78 | 79 | // need a dot to separate the domain from the tld 80 | $a .= "."; 81 | 82 | // finally, pick a random top-level domain and stick it on the end 83 | $a .= $tlds[mt_rand(0, (sizeof($tlds)-1))]; 84 | 85 | // done - echo the address inside a link 86 | 87 | return $a; 88 | } 89 | } -------------------------------------------------------------------------------- /assets/vendor/tiptip/tipTip.css: -------------------------------------------------------------------------------- 1 | /* TipTip CSS - Version 1.2 */ 2 | 3 | #tiptip_holder { 4 | display: none; 5 | position: absolute; 6 | top: 0; 7 | left: 0; 8 | z-index: 99999; 9 | } 10 | 11 | #tiptip_holder.tip_top { 12 | padding-bottom: 5px; 13 | } 14 | 15 | #tiptip_holder.tip_bottom { 16 | padding-top: 5px; 17 | } 18 | 19 | #tiptip_holder.tip_right { 20 | padding-left: 5px; 21 | } 22 | 23 | #tiptip_holder.tip_left { 24 | padding-right: 5px; 25 | } 26 | 27 | #tiptip_content { 28 | font-size: 11px; 29 | color: #fff; 30 | text-shadow: 0 0 2px #000; 31 | padding: 4px 8px; 32 | border: 1px solid rgba(255,255,255,0.25); 33 | background-color: rgb(25,25,25); 34 | background-color: rgba(25,25,25,0.92); 35 | background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from(transparent), to(#000)); 36 | border-radius: 3px; 37 | -webkit-border-radius: 3px; 38 | -moz-border-radius: 3px; 39 | /*box-shadow: 0 0 3px #555; 40 | -webkit-box-shadow: 0 0 3px #555; 41 | -moz-box-shadow: 0 0 3px #555;*/ 42 | } 43 | 44 | #tiptip_arrow, #tiptip_arrow_inner { 45 | position: absolute; 46 | border-color: transparent; 47 | border-style: solid; 48 | border-width: 6px; 49 | height: 0; 50 | width: 0; 51 | } 52 | 53 | #tiptip_holder.tip_top #tiptip_arrow { 54 | border-top-color: #fff; 55 | border-top-color: rgba(255,255,255,0.35); 56 | } 57 | 58 | #tiptip_holder.tip_bottom #tiptip_arrow { 59 | border-bottom-color: #fff; 60 | border-bottom-color: rgba(255,255,255,0.35); 61 | } 62 | 63 | #tiptip_holder.tip_right #tiptip_arrow { 64 | border-right-color: #fff; 65 | border-right-color: rgba(255,255,255,0.35); 66 | } 67 | 68 | #tiptip_holder.tip_left #tiptip_arrow { 69 | border-left-color: #fff; 70 | border-left-color: rgba(255,255,255,0.35); 71 | } 72 | 73 | #tiptip_holder.tip_top #tiptip_arrow_inner { 74 | margin-top: -7px; 75 | margin-left: -6px; 76 | border-top-color: rgb(25,25,25); 77 | border-top-color: rgba(25,25,25,0.92); 78 | } 79 | 80 | #tiptip_holder.tip_bottom #tiptip_arrow_inner { 81 | margin-top: -5px; 82 | margin-left: -6px; 83 | border-bottom-color: rgb(25,25,25); 84 | border-bottom-color: rgba(25,25,25,0.92); 85 | } 86 | 87 | #tiptip_holder.tip_right #tiptip_arrow_inner { 88 | margin-top: -6px; 89 | margin-left: -5px; 90 | border-right-color: rgb(25,25,25); 91 | border-right-color: rgba(25,25,25,0.92); 92 | } 93 | 94 | #tiptip_holder.tip_left #tiptip_arrow_inner { 95 | margin-top: -6px; 96 | margin-left: -7px; 97 | border-left-color: rgb(25,25,25); 98 | border-left-color: rgba(25,25,25,0.92); 99 | } 100 | 101 | /* Webkit Hacks */ 102 | @media screen and (-webkit-min-device-pixel-ratio:0) { 103 | #tiptip_content { 104 | padding: 4px 8px 5px 8px; 105 | background-color: rgba(45,45,45,0.88); 106 | } 107 | #tiptip_holder.tip_bottom #tiptip_arrow_inner { 108 | border-bottom-color: rgba(45,45,45,0.88); 109 | } 110 | #tiptip_holder.tip_top #tiptip_arrow_inner { 111 | border-top-color: rgba(20,20,20,0.92); 112 | } 113 | } --------------------------------------------------------------------------------