/******************************************************************* PHP Class : /Controller/Table/Gel/GajiController Description : Master Standar Gaji Created By : Siau Pheng (siaupheng@3fonia.com). Created Date : September 17th, 2014. Last Modified : September 4th, 2026. (c) 3FONIA Software; WWW.3FONIA.COM. *******************************************************************/ var GajiJS = { PHP: '', KODE: '', index() { $('#butUbah').click(() => this.proses_edit()); $('#butSimpan').click(() => this.proses_save()); this.data_query('view'); }, proses_edit() { this.data_query('update'); }, proses_save() { new Request({ url: this.PHP + '/form_gaji', sendParam: ['mode_detail=save','REG_ID','LEMBUR','BONUS1','BONUS2'], onSuccess: (ajson) => { $('#divMaster').html(ajson.html); this.update_event(); FoniaJS.showInfo('Data Standar Gaji Karyawan sukses disimpan!'); } }).send() }, data_query(mode) { new Request({ url: this.PHP + '/form_gaji', sendParam: ['mode_detail='+mode,'REG_ID'], onSuccess: (ajson) => { $('#divMaster').html(ajson.html); this.update_event(); } }).send() }, update_event() { if ($.inArray($('#mode_detail').val(), ['update']) >= 0) { $("#butUbah").prop('disabled', true); $("#butSimpan").prop('disabled', false); } else { $("#butUbah").prop('disabled', false); $("#butSimpan").prop('disabled', true); } } };