@@ -256,38 +256,38 @@ function initializeDataTable() {
256
256
getScrapedTitleColumn ( ) ,
257
257
getGeneratedTitleColumn ( ) ,
258
258
getDocumentTypeColumn ( ) ,
259
- // getDivisionColumn(),
259
+ getDivisionColumn ( ) ,
260
260
{ data : "id" , visible : false , searchable : false } ,
261
261
{ data : "generated_title_id" , visible : false , searchable : false } ,
262
262
{ data : "match_pattern_type" , visible : false , searchable : false } ,
263
263
{ data : "candidate_urls_count" , visible : false , searchable : false } ,
264
264
{ data : "excluded" , visible : false , searchable : false } ,
265
- // {
266
- // data: null,
267
- // render: function (data, type, row) {
268
- // if (!row.document_type) return "Select";
269
- // return dict[row.document_type];
270
- // },
271
- // visible: false,
272
- // },
273
- // {
274
- // data: null,
275
- // render: function (data, type, row) {
276
- // const excludedDict = {
277
- // true: "Yes",
278
- // false: "No",
279
- // };
280
- // return excludedDict[row.excluded];
281
- // },
282
- // visible: false,
283
- // },
284
- // {
285
- // data: null,
286
- // render: function (data, type, row) {
287
- // return row.generated_title;
288
- // },
289
- // visible: false,
290
- // },
265
+ {
266
+ data : null ,
267
+ render : function ( data , type , row ) {
268
+ if ( ! row . document_type ) return "Select" ;
269
+ return dict [ row . document_type ] ;
270
+ } ,
271
+ visible : false ,
272
+ } ,
273
+ {
274
+ data : null ,
275
+ render : function ( data , type , row ) {
276
+ const excludedDict = {
277
+ true : "Yes" ,
278
+ false : "No" ,
279
+ } ;
280
+ return excludedDict [ row . excluded ] ;
281
+ } ,
282
+ visible : false ,
283
+ } ,
284
+ {
285
+ data : null ,
286
+ render : function ( data , type , row ) {
287
+ return row . generated_title ;
288
+ } ,
289
+ visible : false ,
290
+ } ,
291
291
// ...(is_multi_division === 'true' ? [getDivisionColumn()] : []),
292
292
// getDivisionColumn(),
293
293
] ,
@@ -829,6 +829,7 @@ function getDivisionColumn() {
829
829
return {
830
830
data : "division" ,
831
831
width : "10%" ,
832
+ visible : ( ( is_multi_division ) ? 'true' : 'false' ) , searchable : is_multi_division ,
832
833
render : function ( data , type , row ) {
833
834
let button_text = data ? divisionDict [ data ] : "Select" ;
834
835
let button_color = data ? "btn-success" : "btn-secondary" ;
0 commit comments