function rekaphadirdosen(){
var ds_stsmt = store_stsmt();
var ds_jabatan_dekan = new Ext.data.JsonStore({
proxy: new Ext.data.HttpProxy({
url: BASE_URL + 'data_controller/get_jabatan_dekan',
method: 'POST'
}),
autoLoad: true,
root: 'data',
fields: [
{ name: "idjabatan", mapping: "idjabatan" }
, { name: "nmjabatan", mapping: "nmjabatan" }
]
});
var fields_dosen_pengajar = RH.storeFields('nidu','nmdos','niduganti','nmdosganti'
,'nidudisp','nidndisp','nmdosdisp','kdjk','nmprodi','nmstaktiv','nmstikj');
var ds_dosen_pengajar = RH.JsonStore({
url : BASE_URL + 'absen_controller/get_pengajar_koord',
fields : fields_dosen_pengajar,
limit : 15,
params: [
{key:'kdstsemester', id:'cb.stsemesterdos'}
],
enableSearch: true,
});
//SEARCH COMPONENT
var sb_dosen_pengajar = RH.searchComp({
id: 'sb_dosen_pengajar',
fields : ['nidudisp:NIDU',
'nidndisp:NIDN',
'nmdosdisp:Nama Dosen',
'kdjk:(L/P)',
'nmprodi:Program Studi',
'nmstaktiv:Status Aktivitas',
'nmstikj:Status Ikatan Kerja'],
selected : 'nmdosdisp',
store : ds_dosen_pengajar,
textWidth : 200
});
//Checkbox pada Grid
var sm_dosen_pengajar = new Ext.grid.RowSelectionModel({ singleSelect: true });
// COLUMN MODEL
var cm_dosen_pengajar = new Ext.grid.ColumnModel({
columns: [
new Ext.grid.RowNumberer(), //for rows numbering
{
xtype: 'actioncolumn',
width: 50,
header: 'Cetak',
align:'center',
items: [{
getClass: function(v, meta, record) {
meta.attr = "style='cursor:pointer;'";
},
icon : 'resources/img/icons/fam/printer.png',
tooltip: 'Cetak Rekap Kehadiran',
handler: function(grid, rowIndex) {
var rec = ds_dosen_pengajar.getAt(rowIndex);
if (RH.getCompValue('cb.ttd', true)) {
RH.ShowReport(BASE_URL + 'rpt/rpt_rekaphadirdosen/get_rekaphadir_dosen/'
+RH.getCompValue('cb.stsemesterdos', true)+'/'+rec.get('nidudisp')+'/'+RH.getCompValue('cb.ttd', true));
} else {
Ext.Msg.alert("Info", "Silahkan Tentukan Penandatangan");
}
}
}]
}, {
header: 'NIDU', width: 70, align:'center',
dataIndex: 'nidudisp', sortable: true
}, {
header: 'NIDN', width: 100, align:'center',
dataIndex: 'nidndisp', sortable: true
}, {
header: 'Nama Dosen', width: 250, align:'left',
dataIndex: 'nmdosdisp', sortable: true
}, {
header: '(L/P)', width: 50, align:'center',
dataIndex: 'kdjk', sortable: true
}, {
header: 'Program Studi', width: 250, align:'left',
dataIndex: 'nmprodi', sortable: true
}, {
header: 'Status Aktivitas', width: 170, align:'left',
dataIndex: 'nmstaktiv', sortable: true
}, {
header: 'Status Ikatan Kerja', width: 170, align:'left',
dataIndex: 'nmstikj', sortable: true
}]
});
// Grid View
var gv_dosen_pengajar = new Ext.grid.GridView({ emptyText: '< Belum ada Data >' });
//GridPanel
var gp_dosen_pengajar = new Ext.grid.GridPanel({
ds: ds_dosen_pengajar,
cm: cm_dosen_pengajar,
sm: sm_dosen_pengajar,
view: gv_dosen_pengajar,
forceFit: true,
layout:'anchor',
autoSizeColumns: true, //autoExpandColumn: 'nmmkind',
autoScroll:true,
enableColumnResize: true,
enableColumnHide: false,
enableColumnMove: false,
columnLines: true,
loadMask: true,
tbar:[sb_dosen_pengajar],
bbar: new Ext.PagingToolbar({
store: ds_dosen_pengajar,
displayInfo: true, pageSize: 15, mode: 'local',
displayMsg: 'Data {0} - {1} dari {2}',
emptyMsg: "Belum ada data"
})
});
var p_rekap_hadir_dosen = new Ext.Panel({
title: 'Daftar Dosen Pengajar', iconCls: 'silk-group',
buttonAlign: 'left',
border: false,
layout: 'border',
waitMsg: 'Waiting...',
maskDisabled: false,
monitorValid: true,
frame: true,
items: [{
xtype: 'fieldset', layout: 'form',
autoHeight:true, region:'north',
items: [{
xtype: 'container', layout: 'hbox',
items:[{
layout:'form', labelWidth: 200, labelAlign: 'right',
items: [
RH.ActionCombo({
id: 'cb.stsemesterdos', label: 'Tahun Akademik - Semester', width: 200,
data: ds_stsmt, key: 'kdstsemester', display: 'nmsmt',
fnSelect: function(combo, record){ reloadDosPengajar(record.data.kdstsemester); }
})
]
},{
layout:'form', labelWidth: 200, labelAlign: 'right',
items: [
RH.ActionCombo({
id: 'cb.ttd', label: 'Penandatangan', width: 200,
data: ds_jabatan_dekan, key: 'idjabatan', display: 'nmjabatan',
fnSelect: function(){ }
})
]
}]
}]
},{
xtype: 'panel', layout:'fit', region:'center',
items: [gp_dosen_pengajar]
}]
});
SET_PAGE_CONTENT(p_rekap_hadir_dosen);
function reloadDosPengajar(kdstsemester) {
if (kdstsemester) {
ds_dosen_pengajar.reload({
params: {
kdstsemester: kdstsemester
}
});
}
}
}