Proyectos de Subversion LeadersLinked - Backend

Rev

Rev 15243 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 15243 Rev 15244
Línea 82... Línea 82...
82
					})}
82
					})}
83
				</tr>
83
				</tr>
84
			</thead>
84
			</thead>
85
			<tbody>
85
			<tbody>
86
				{sortedData().map((item) => {
86
				{sortedData().map((item) => {
87
					const entries = Object.entries(item)
-
 
88
					return (
87
					return (
89
						<tr key={item.id} >
88
						<tr key={item.id} >
-
 
89
							<td className="text-vertical-middle sorting_1 dtr-control">
90
							{entries.map((element) => {
90
								{item.last_date_of_application}
91
 
91
							</td>
-
 
92
							<td className="text-vertical-middle sorting_1 dtr-control">
92
								if (element[0] === 'details') {
93
								{item.title}
93
									return (
94
							</td>
94
										<td>
95
							<td>
95
											<ul style={{ listStyle: 'none' }}>
96
								<ul style={{ listStyle: 'none' }}>
96
												<li>{labels.STATUS}: {element[1]['status']}</li>
97
									<li>{labels.STATUS}: {item?.details?.status}</li>
97
												<li>{labels.EMPLOYMENT_TYPE}: {element[1]['employment_type']}</li>
98
									<li>{labels.EMPLOYMENT_TYPE}: {item?.details?.employment_type}</li>
98
												<li>{labels.QTY_USERS_WHO_APPLIED}: {element[1]['users_who_applied']}</li>
99
									<li>{labels.QTY_USERS_WHO_APPLIED}: {item?.details?.users_who_applied}</li>
99
											</ul>
100
								</ul>
100
										</td>
101
							</td>
-
 
102
							<td
-
 
103
								className='d-flex flex-column py-2 px-15'
-
 
104
								style={{ gap: '5px' }}>
-
 
105
								{allowEdit === '1' &&
-
 
106
									<button
-
 
107
										className="btn btn-sm btn-block btn-primary btn-edit"
-
 
108
										onClick={() => onEdit({
-
 
109
											link: item.actions.link_edit,
-
 
110
											name: item.title
-
 
111
										})}
101
									)
112
									>
-
 
113
										<i className="fa fa-pencil" />
-
 
114
										{labels.EDIT}
-
 
115
									</button>
102
								}
116
								}
103
 
-
 
104
								if (element[0] === 'actions') {
-
 
105
									return (
-
 
106
										<td
-
 
107
											className='d-flex flex-column py-2 px-15'
-
 
108
											style={{ gap: '5px' }}>
-
 
109
											{allowEdit === '1' &&
-
 
110
												<button
-
 
111
													className="btn btn-sm btn-block btn-primary btn-edit"
-
 
112
													onClick={() => onEdit({
-
 
113
														link: element[1]['link_edit'],
-
 
114
														name: element[0]
-
 
115
													})}
-
 
116
												>
-
 
117
													<i className="fa fa-pencil" />
-
 
118
													{labels.EDIT}
-
 
119
												</button>
-
 
120
											}
-
 
121
											{allowDelete === '1' &&
117
								{allowDelete === '1' &&
122
												<button
118
									<button
123
													className="btn btn-sm btn-danger btn-delete"
119
										className="btn btn-sm btn-danger btn-delete"
124
													onClick={() => onDelete(item)}
120
										onClick={() => onDelete(item)}
125
												>
121
									>
126
													<i className="fa fa-trash" />
122
										<i className="fa fa-trash" />
127
													{labels.DELETE}
123
										{labels.DELETE}
128
												</button>
-
 
129
											}
-
 
130
											{(allowUsersWhoApplied === '1' && element[1]['link_users_who_applied'])
-
 
131
												&&
-
 
132
												<button
-
 
133
													className="btn btn-sm btn-primary btn-users-who-applied"
-
 
134
													onClick={() => handleUserWhoApplied(element[1]['link_users_who_applied'])}
-
 
135
												>
-
 
136
													<i className="fa fa-users" />
-
 
137
													{labels.USERS_WHO_APPLIED}
-
 
138
												</button>
124
									</button>
139
											}
-
 
140
										</td>
-
 
141
									)
-
 
142
								}
125
								}
143
 
-
 
-
 
126
								{(allowUsersWhoApplied === '1' && item.actions?.link_users_who_applied)
144
								if (element[0] !== 'id') {
127
									&&
145
									return (
128
									<button
146
										<td className="text-vertical-middle sorting_1 dtr-control">
129
										className="btn btn-sm btn-primary btn-users-who-applied"
147
											{element[1]}
130
										onClick={() => handleUserWhoApplied(item.actions.link_users_who_applied)}
148
										</td>
131
									>
-
 
132
										<i className="fa fa-users" />
-
 
133
										{labels.USERS_WHO_APPLIED}
149
									)
134
									</button>
150
								}
135
								}
151
								
-
 
152
							})}
136
							</td>
153
						</tr>
137
						</tr>
154
					)
138
					)
155
				})}
139
				})}
156
			</tbody>
140
			</tbody>
157
		</table >
141
		</table >