File size: 5,235 Bytes
8f2f1a5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
import React from 'react';


export const columns = [
    {
        title: 'No',
        dataIndex: 'index',
        key: 'index',
        width: 80,
        render: (text, record, index) => index + 1, // Renders the row number
      },
    {
        title: 'Purpose',
        dataIndex: 'purpose',
        key: 'purpose',
        width: 500
    },
    {
        title: 'Question',
        dataIndex: 'question',
        key: 'question',
        width: 500
    },
];


export const paperColumns = (papersFilterData, handleCheckboxChange) => [
  {
      width: 65,
      title: 'Filter',
      dataIndex: 'checkbox',
      render: (_, record) => (
        <input
          type="checkbox"
          checked={papersFilterData.includes(record)}
          onChange={() => handleCheckboxChange(record)}
        />
      ),
  },
  {
      title: 'No',
      dataIndex: 'index',
      key: 'index',
      width: 80,
      render: (text, record, index) => index + 1, // Renders the row number
  },
  { title: 'Title', dataIndex: 'title', key: 'title', width: 200 },
  { title: 'Author', dataIndex: 'creator', key: 'creator', width: 100 },

  { title: 'Publication URL', dataIndex: 'link', key: 'link', width: 400 },
  { title: 'Journal Name', dataIndex: 'publicationName', key: 'publicationName', width: 200 },
  { title: 'DOI', dataIndex: 'doi', key: 'doi', width: 200 },
  { title: 'Paper Type', dataIndex: 'aggregationType', key: 'aggregationType', width: 150 },
  { title: 'Affiliation Country', dataIndex: 'affiliation-country', key: 'affiliation-country', width: 100 },
  { title: 'Affiliation Name', dataIndex: 'affilname', key: 'affilname', width: 200 },
  { title: 'Volume', dataIndex: 'volume', key: 'volume', width: 90 },
  { title: 'Publication Year', dataIndex: 'year', key: 'year', width: 90 },
  { title: 'Open Access', dataIndex: 'openaccess', key: 'openaccess', render: text => text ? 'Yes' : 'No', width: 150 }, // Assuming openaccess is a boolean
];


// export const paperColumns= (papersFilterData, handleCheckboxChange) => [
//     {
//         width:65,
//         title: 'Filter',
//         dataIndex: 'checkbox',
//         render: (_, record) => (
//           <input
//             type="checkbox"
//             checked={papersFilterData.includes(record)}
//             onChange={() => handleCheckboxChange(record)}
//           />
//         ),
//     },
//     {
//         title: 'No',
//         dataIndex: 'index',
//         key: 'index',
//         width: 80,
//         render: (text, record, index) => index + 1, // Renders the row number
//       },
//     { title: 'Title', dataIndex: 'title', key: 'title', width: 200 },
//     { title: 'Author', dataIndex: 'creator', key: 'creator', width: 100 },

//     { title: 'Publication URL', dataIndex: 'link', key: 'link', width: 400 },
//     { title: 'Journal Name', dataIndex: 'publicationName', key: 'publicationName', width: 200 },
//     { title: 'DOI', dataIndex: 'doi', key: 'doi', width: 200 },
//     { title: 'Paper Type', dataIndex: 'aggregationType', key: 'aggregationType', width: 150 },
//     { title: 'Affiliation Country', dataIndex: 'affiliation-country', key: 'affiliation-country', width: 100 },
//     { title: 'Affiliation Name', dataIndex: 'affilname', key: 'affilname', width: 200 },
//     { title: 'Volume', dataIndex: 'volume', key: 'volume', width: 90 },
//     { title: 'Publication Year', dataIndex: 'year', key: 'year', width: 90 },
//     { title: 'Open Access', dataIndex: 'openaccess', key: 'openaccess', render: text => text ? 'Yes' : 'No', width: 150 }, // Assuming openaccess is a boolean
// ];

export const filterColumns = [
    {
        title: 'No',
        dataIndex: 'index',
        key: 'index',
        width: 80,
        render: (text, record, index) => index + 1, // Renders the row number
      },
    { title: 'Title', dataIndex: 'title', key: 'title', width: 200 },
    { title: 'Author', dataIndex: 'creator', key: 'creator', width: 100 },

    { title: 'Publication URL', dataIndex: 'link', key: 'link', width: 400 },
    { title: 'Journal Name', dataIndex: 'publicationName', key: 'publicationName', width: 200 },
    { title: 'DOI', dataIndex: 'doi', key: 'doi', width: 200 },
    { title: 'Paper Type', dataIndex: 'aggregationType', key: 'aggregationType', width: 150 },
    { title: 'Affiliation Country', dataIndex: 'affiliation-country', key: 'affiliation-country', width: 100 },
    { title: 'Affiliation Name', dataIndex: 'affilname', key: 'affilname', width: 200 },
    { title: 'Volume', dataIndex: 'volume', key: 'volume', width: 90 },
    { title: 'Publication Year', dataIndex: 'year', key: 'year', width: 90 },
    { title: 'Open Access', dataIndex: 'openaccess', key: 'openaccess', render: text => text ? 'Yes' : 'No', width: 150 }, // Assuming openaccess is a boolean
];

export const answers = [
    {
        title: 'No',
        dataIndex: 'index',
        key: 'index',
        width: 80,
        render: (text, record, index) => index + 1, // Renders the row number
      },
    {
        title: 'Question',
        dataIndex: 'question',
        key: 'question',
        width: 280
    },
    {
        title: 'Answer',
        dataIndex: 'answer',
        key: 'answer',
    },
];