22 @include (' dasbor.data-desa' )
33</div >
44
5-
6-
75@push (' js' )
86 <script nonce =" {{ csp_nonce () } }" >
97 document .addEventListener (" DOMContentLoaded" , function (event ) {
1412 processing: true ,
1513 serverSide: true ,
1614 autoWidth: false ,
17- ordering: false ,
15+ // ordering: false,
1816 searchPanes: {
1917 viewTotal: false ,
2018 columns: [0 ]
3028 " filter[kode_kabupaten]" : $ (" #filter_kabupaten" ).val (),
3129 " filter[kode_kecamatan]" : $ (" #filter_kecamatan" ).val (),
3230 " filter[kode_desa]" : $ (" #filter_desa" ).val (),
31+ // sort by multiple column
32+ " sort" : (row .order .length > 0 && row .columns [row .order [0 ].column ].name )
33+ ? (row .order [0 ].dir == ' asc' ? ' ' : ' -' )+ row .columns [row .order [0 ].column ].name
34+ : ' -surat_count,-artikel_count,-traffic_count' ,
3335 };
3436 },
3537 dataSrc : function (json ) {
@@ -52,7 +54,7 @@ className: 'text-nowrap',
5254 }
5355 },
5456 {
55- targets: [0 , 1 , 2 , 3 ],
57+ targets: [0 , 1 , 2 ],
5658 orderable: false ,
5759 searchable: false ,
5860 },
@@ -87,8 +89,38 @@ className: 'text-nowrap',
8789 return ` <a target="_blank" href=${ urlDetail .href } >${ data .attributes .penduduk_count } </a>`
8890 },
8991 name: " penduduk_count" ,
90- className: ' text-center'
92+ className: ' text-center' ,
93+ searchable: false
94+ },
95+ {
96+ data: " attributes.surat_count" ,
97+ name: " surat_count" ,
98+ className: ' text-center' ,
99+ searchable: false
91100 },
101+ {
102+ data: " attributes.artikel_count" ,
103+ name: " artikel_count" ,
104+ className: ' text-center' ,
105+ searchable: false
106+ },
107+ {
108+ data: " attributes.traffic_count" ,
109+ name: " traffic_count" ,
110+ className: ' text-center' ,
111+ searchable: false
112+ },
113+ {
114+ data : function (data ) {
115+ return data .attributes .last_login ? (new Date (
116+ data .attributes .last_login ))
117+ .toLocaleString () : ' -' ;
118+ },
119+ name: " last_login" ,
120+ className: ' text-center' ,
121+ searchable: false
122+ },
123+
92124 ],
93125 })
94126 $ (' #tabel_penduduk_block' ).change (function (event ) {
0 commit comments