function pKonversi(){ /* var fields_konversi = RH.storeFields('nopmb','tglpmb','nama','kdptasal','nmptasal', 'kdprodi','nmprodi','kdprodi1','nmprodi1','kdprodi2','nmprodi2','kdprodiasal','nmprodiasal','nim','thnmasuk','statuskonversi'); var pageSize = 10; var ds_konversi = RH.JsonStore({ url : BASE_URL + 'konversi_controller/get_mhs_konversi', fields : fields_konversi, limit : pageSize, enableSearch: true, }); var sb_konversi = RH.searchComp({ id : 'sb_konversi', fields : ['nopmb:No. PMB','nama:Nama','nmptasal:Asal PT/PTS','nmprodiasal:Asal Prodi', 'nmprodi1:Prodi Pilihan 1','nmprodi2:Prodi Pilihan 2','nmprodi:Prodi Yg Dipilih'], selected : 'nopmb', store : ds_konversi, textWidth : 250, }); var cm_konversi = new Ext.grid.ColumnModel([ new Ext.grid.RowNumberer(), { header: 'No. PMB', width:100, dataIndex: 'nopmb', sortable: true, align:'left', }, { header: 'Nama', width: 200, dataIndex: 'nama', align:'left', sortable: true, }, { header: 'Asal PT/PTS', width: 200, dataIndex: 'nmptasal', align:'left', sortable: true, }, { header: 'Asal Prodi', width: 200, dataIndex: 'nmprodiasal', align:'left', sortable: true, }, { header: 'Prodi Pilihan 1', width: 200, dataIndex: 'nmprodi1', align:'left', sortable: true, }, { header: 'Prodi Pilihan 2', width: 200, dataIndex: 'nmprodi2', align:'left', sortable: true, }, { header: 'Prodi Yg Dipilih', width: 200, dataIndex: 'nmprodi', align:'left', sortable: true, }, { header: 'NPM', width: 150, dataIndex: 'nim', align:'left', sortable: true, }, { header: 'Tahun Masuk', width: 90, dataIndex: 'thnmasuk', align:'left', sortable: true, }, { header: RH.h3('Status Konversi'), width: 50, align: 'center', dataIndex: 'statuskonversi', renderer : render_status, sortable: true } ] ); */ var ds_prodireg = store_prodireg(); var ds_years = store_tahun(); var ds_stkonversi = store_stkonversi(); var ds_jenpdkpendaftar = new Ext.data.JsonStore({ //from database public proxy: new Ext.data.HttpProxy({ url : BASE_URL + 'konversi_controller/get_jenpdkpendaftar_public', method: 'POST' }), autoLoad: true, root: 'data', fields: [ { name: "idjenpdkpendaftar", mapping: "idjenpdkpendaftar" } , { name: "kdjenpdkpendaftar", mapping: "kdjenpdkpendaftar" } , { name: "nmjenpdkpendaftar", mapping: "nmjenpdkpendaftar" } , { name: "deskripsi", mapping: "deskripsi" } ] }); var ds_prodi = new Ext.data.JsonStore({ //from database proxy: new Ext.data.HttpProxy({ url: BASE_URL + 'konversi_controller/get_prodipilihan', method: 'POST' }), autoLoad: true, root: 'data', fields: [ { name: "kdprodi", mapping: "kdprodi" } , { name: "lnmprodi", mapping: "lnmprodi" } , { name: "nidu", mapping: "nidu" } , { name: "nmdosdgngelar", mapping: "nmdosdgngelar" } ] }); var ds_nilai = new Ext.data.JsonStore({ //from database proxy: new Ext.data.HttpProxy({ url : BASE_URL + 'nilai_controller/get_bonilaiByProdiSmt', method: 'POST' }), autoLoad: true, root: 'data', fields: [ { name: "kdprodi", mapping: "kdprodi" } , { name: "kdstsemester", mapping: "kdstsemester" } , { name: "nilaihuruf", mapping: "nilaihuruf" } , { name: "bobotnilai", mapping: "bobotnilai" } ] }); var storesObj = {years:ds_years, stkonversi:ds_stkonversi, jenpdkpendaftar:ds_jenpdkpendaftar, prodi:ds_prodi,nilai:ds_nilai}; var fields_konversi = RH.storeFields('idkn','tglkn','kdprodi','nmprodi','tahun', 'nim','nmmhs','idstkonversi','nmstkonversi','userid','nmuserinput','nopmb','nmpendaftar','kdptasal','nmptasal', 'kdprodiasal','nmprodiasal','kdjenjangstudiasal','nmjenjangstudiasal','noijazahasal','tglijazahasal','pengkonversi','nmpengkonversi','acc','keterangan'); var pageSize = 10; var ds_konversi = RH.JsonStore({ url : BASE_URL + 'konversi_controller/get_v_konversi', fields : fields_konversi, limit : pageSize, params: [{key:'kdprodi', id:'cb.prodi-kon'}, {key:'tahun', id:'cb.thmasuk-kon'}], enableSearch: true, }); var sb_konversi = RH.searchComp({ id : 'sb_konversi', fields : ['nopmb:No. PMB','nmpendaftar:Nama Pendaftar','nmptasal:Asal PT/PTS','nmprodiasal:Asal Prodi', 'nmjenjangstudiasal:Jenjang Studi Asal','nim:NPM','nmmhs:Nama Mahasiswa','nmprodi:Prodi','nmstkonversi:Status Konversi'], selected : 'nopmb', store : ds_konversi, textWidth : 250, }); var cm_konversi = new Ext.grid.ColumnModel([ new Ext.grid.RowNumberer(), { header: 'No. PMB', width:100, dataIndex: 'nopmb', sortable: true, align:'left', }, { header: 'Nama Pendaftar', width: 200, dataIndex: 'nmpendaftar', align:'left', sortable: true, }, { header: 'Asal PT/PTS', width: 200, dataIndex: 'nmptasal', align:'left', sortable: true, }, { header: 'Asal Prodi', width: 200, dataIndex: 'nmprodiasal', align:'left', sortable: true, }, { header: 'Jenjang Studi Asal', width: 100, dataIndex: 'nmjenjangstudiasal', align:'left', sortable: true, }, { header: 'NPM', width: 100, dataIndex: 'nim', align:'left', sortable: true, }, { header: 'Nama Mahasiswa', width: 200, dataIndex: 'nmmhs', align:'left', sortable: true, }, { header: 'Prodi', width: 200, dataIndex: 'nmprodi', align:'left', sortable: true, }, { header: 'Status Konversi', width: 100, align: 'center', dataIndex: 'idstkonversi', renderer : render_status, sortable: true } ] ); // Selection Model var sm_konversi = new Ext.grid.RowSelectionModel({ singleSelect: true }); // Grid View var gv_konversi = new Ext.grid.GridView({emptyText: '< Belum ada Data >'}); /** GRID PANEL */ var gp_konversi = new Ext.grid.GridPanel({ //PAKE EditorGridPanel ds: ds_konversi, cm: cm_konversi, sm: sm_konversi, view: gv_konversi, forceFit: true, //autoHeight: true, layout:'anchor', //autoSizeColumns: true, autoScroll:true, //enableColumnResize: true, columnLines: true, loadMask: true, frame: true, tbar:[{ text: 'Tambah', id: 'tb.add-kon', iconCls: 'silk-add', handler: function() { fKonversi(false,gp_konversi,null,storesObj); } },'->',sb_konversi], bbar: new Ext.PagingToolbar({ store: ds_konversi, displayInfo: true, pageSize: pageSize, mode: 'local', displayMsg: 'Data {0} - {1} dari {2}', emptyMsg: "Belum ada data" }), listeners: { cellclick: onCellclik } }); /* var panel_konversi = new Ext.Panel({ xtype: 'form', title: 'Konversi Nilai', iconCls:'silk-book', buttonAlign: 'left', bodyStyle: 'padding: 5px', border: false, layout: 'fit', waitMsg: 'Waiting...', maskDisabled: false, monitorValid: true, autoScroll:true, frame: true, items: [{ xtype: 'fieldset', flex: 1, region:'north', layout:'form', autoHeight:true, items: [{ xtype: 'container', layout: 'hbox', items:[{ layout:'form', labelWidth:90, labelAlign:'right', items: [ RH.ActionCombo({ id: 'cb.prodi-kur', label: 'Program Studi', width: 300, data: ds_prodi, key: 'kdprodi', display: 'lnmprodi', fnSelect: function(){ reloadGridKur(); } }) ] },{ layout:'form', labelWidth:190, labelAlign:'right', items: [ RH.ActionCombo({ id: 'cb.thmasuk-kur', label: 'Tahun Masuk/Angkatan', width: 100, data: ds_years, key: 'kode', display: 'nama', fnSelect: function(){ reloadGridKur(); } }) ] },{ xtype: 'textfield', id: 'hidden.kdmkkur', hidden:true, }] }] }, gp_konversi] }); */ var panel_konversi = RH.GPContainer1_wHeaders({ title: 'Konversi Nilai', iconCls:'silk-book', gridPanel: gp_konversi, headers: [{ xtype: 'fieldset', flex: 1, region:'north', layout:'form', autoHeight:true, items: [{ xtype: 'container', layout: 'hbox', items:[{ layout:'form', labelWidth:90, labelAlign:'right', items: [ RH.ActionCombo({ id: 'cb.prodi-kon', label: 'Program Studi', width: 300, data: ds_prodireg, key: 'kdprodi', display: 'lnmprodi', fnSelect: function(){ reload_konversi(); } }) ] },{ layout:'form', labelWidth:190, labelAlign:'right', items: [ RH.ActionCombo({ id: 'cb.thmasuk-kon', label: 'Tahun Masuk/Angkatan', width: 100, data: ds_years, key: 'kode', display: 'nama', fnSelect: function(){ reload_konversi(); } }) ] },{ xtype: 'textfield', id: 'hidden.kdmkkur', hidden:true, }] }] }], }); SET_PAGE_CONTENT(panel_konversi); /* function render_status(val) { Ext.QuickTips.init(); if (val=='1') { return ''; } else { return ''; } } */ function reload_konversi() { if (!RH.getCompValue('cb.prodi-kon', true) || !RH.getCompValue('cb.thmasuk-kon', true)) return; ds_konversi.reload({ params: { kdprodi: RH.getCompValue('cb.prodi-kon', true), tahun: RH.getCompValue('cb.thmasuk-kon', true) } }); } function render_status(val) { var value = RH.getRecordFieldValue(ds_stkonversi, 'nmstkonversi', 'idstkonversi', val); Ext.QuickTips.init(); if (val=='1') { return ''; } else { return ''; } } function onCellclik(grid, rowIndex, columnIndex, e) { var t = e.getTarget(); var record = ds_konversi.getAt(rowIndex); fKonversi(true,grid,record,storesObj); } }