0.1.34 • Published 2 years ago

hrmscorefunction v0.1.34

Weekly downloads
5
License
ISC
Repository
github
Last release
2 years ago

coreFunction

Ini adalah kumpulan beberapa lib untuk hrms

Setup :

npm i hrms_corefunction@0.0.x (newest version)
please setup db connection on app/config

List function

module.exports = {
  notifLib: (req, callback)=>{
    return new Promise((resolve, reject) => {
      controller.test_lab_ctrl(req, message => {
        return resolve(message);
      });
    })
  },
  notifLeaveOnly: (req, callback)=>{
    return new Promise((resolve, reject) => {
      controller.notif_leave_only_ctrl(req, message => {
        return resolve(message);
      });
    })
  },
  pool_update: (req, callback)=>{
    controller.pool_update(req, message => {
      return message;
    })
  },
  calculation: (req, callback)=>{
    controller.calculation(req, (err, message) => {
      return message;
    })
  },
  check_previllage_request: (req, callback)=>{
    controller.check_previllage_request(req, (err, message) => {
      return message;
    })
  },
}

Cara pakai :

  1. config set di dalam libnya
mysql 	: {
		host 		: ENV.DB_HOST 		|| "192.168.1.xx", // ip database
		port 		: ENV.DB_PORT 		|| "3306",
		user 		: ENV.DB_USER 		|| "root",
		password	: ENV.DB_PASSWORD 	|| "yourpassword",
		database 	: 'database', // DB
	},
  1. require dulu
const library   = require('hrmscorefunction');
  1. cara pakai
let val_notif = {
    type: value.type,
    name: value.name,
    local_it: 'local', // memang nilainya harcode kaya gini
    user: 'user', // memang nilainya harcode kaya gini
    from_type: 'attendance', // memang nilainya harcode kaya gini
    swap: value.swap // beri nilai null jika bukan swap shift
};
// panggil si notif
let notif = await library.notifLib(val_notif);

console.log(notif.jsonData, '===== LURR');
0.1.34

2 years ago

0.1.32

2 years ago

0.1.33

2 years ago

0.1.30

3 years ago

0.1.27

3 years ago

0.1.28

3 years ago

0.1.29

3 years ago

0.1.25

3 years ago

0.1.26

3 years ago

0.1.24

3 years ago

0.1.20

3 years ago

0.1.21

3 years ago

0.1.22

3 years ago

0.1.23

3 years ago

0.1.17

3 years ago

0.1.18

3 years ago

0.1.19

3 years ago

0.1.11

3 years ago

0.1.12

3 years ago

0.1.13

3 years ago

0.1.14

3 years ago

0.1.15

3 years ago

0.1.16

3 years ago

0.1.10

3 years ago

0.1.9

3 years ago

0.1.8

3 years ago

0.1.7

4 years ago

0.1.6

4 years ago

0.1.5

4 years ago

0.1.4

4 years ago

0.1.3

4 years ago

0.1.2

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago

0.0.23

4 years ago

0.0.24

4 years ago

0.0.22

4 years ago

0.0.21

4 years ago

0.0.20

4 years ago

0.0.18

4 years ago

0.0.19

4 years ago

0.0.17

4 years ago

0.0.16

4 years ago

0.0.15

4 years ago

0.0.14

4 years ago

0.0.13

4 years ago

0.0.12

4 years ago

0.0.10

4 years ago

0.0.11

4 years ago

0.0.8

4 years ago

0.0.6

4 years ago

0.0.4

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago