0.1.61 • Published 10 months ago

@isi-hrms/hrmscorefunction v0.1.61

Weekly downloads
-
License
ISC
Repository
github
Last release
10 months 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.61

10 months ago

0.1.60

1 year ago

0.1.59

1 year ago

0.1.58

1 year ago

0.1.57

1 year ago

0.1.56

1 year ago

0.1.55

1 year ago

0.1.54

1 year ago

0.1.53

1 year ago

0.1.52

2 years ago

0.1.51

2 years ago

0.1.42

2 years ago

0.1.43

2 years ago

0.1.44

2 years ago

0.1.45

2 years ago

0.1.46

2 years ago

0.1.47

2 years ago

0.1.48

2 years ago

0.1.50

2 years ago

0.1.49

2 years ago

0.1.41

2 years ago

0.1.40

2 years ago

0.1.39

2 years ago

0.1.38

2 years ago

0.1.37

3 years ago

0.1.36

3 years ago

0.1.35

3 years ago