File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -178,7 +178,7 @@ export default function Kategorije() {
178178 < thead >
179179 < tr >
180180 < th > Naziv</ th >
181- < th > Status </ th >
181+ < th > Aktivna </ th >
182182 < th > Akcije</ th >
183183 </ tr >
184184 </ thead >
@@ -187,28 +187,29 @@ export default function Kategorije() {
187187 < tr key = { category . id } className = { ! category . active ? "inactive" : "" } >
188188 < td > { category . name } </ td >
189189 < td >
190- < span className = { `badge-${ category . active ? "success" : "danger" } ` } >
191- { category . active ? "Aktivna" : "Neaktivna" }
192- </ span >
190+ < label className = "toggle-switch" >
191+ < input
192+ type = "checkbox"
193+ checked = { category . active }
194+ onChange = { ( ) => toggleActive ( category . id , category . active ) }
195+ />
196+ < span className = "toggle-slider" > </ span >
197+ </ label >
193198 </ td >
194199 < td className = "actions" >
195200 < button
196201 onClick = { ( ) => handleEdit ( category ) }
197- className = "btn-small btn-primary"
202+ className = "icon-btn edit"
203+ title = "Uredi"
198204 >
199- Uredi
200- </ button >
201- < button
202- onClick = { ( ) => toggleActive ( category . id , category . active ) }
203- className = { `btn-small ${ category . active ? "btn-warning" : "btn-info" } ` }
204- >
205- { category . active ? "Deaktiviraj" : "Aktiviraj" }
205+ < i className = "fas fa-edit" > </ i >
206206 </ button >
207207 < button
208208 onClick = { ( ) => handleDelete ( category . id ) }
209- className = "btn-small btn-danger"
209+ className = "icon-btn delete"
210+ title = "Obriši"
210211 >
211- Obriši
212+ < i className = "fas fa-trash" > </ i >
212213 </ button >
213214 </ td >
214215 </ tr >
Original file line number Diff line number Diff line change @@ -284,7 +284,7 @@ export default function ProdajnaMjesta() {
284284 < th > Prostor</ th >
285285 < th > Uređaj</ th >
286286 < th > API Ključ</ th >
287- < th > Status </ th >
287+ < th > Aktivno </ th >
288288 < th > Akcije</ th >
289289 </ tr >
290290 </ thead >
@@ -296,16 +296,22 @@ export default function ProdajnaMjesta() {
296296 < td > < code > { loc . paymentDevice } </ code > </ td >
297297 < td > < code > { loc . firaApiKey || "-" } </ code > </ td >
298298 < td >
299- < span className = { `badge-${ loc . active ? "success" : "danger" } ` } >
300- { loc . active ? "Aktivno" : "Neaktivno" }
301- </ span >
299+ < label className = "toggle-switch" >
300+ < input
301+ type = "checkbox"
302+ checked = { loc . active }
303+ onChange = { ( ) => toggleActive ( loc . id , loc . active ) }
304+ />
305+ < span className = "toggle-slider" > </ span >
306+ </ label >
302307 </ td >
303308 < td className = "actions" >
304- < button onClick = { ( ) => handleEdit ( loc ) } className = "btn-small btn-primary" > Uredi</ button >
305- < button onClick = { ( ) => toggleActive ( loc . id , loc . active ) } className = { `btn-small ${ loc . active ? "btn-warning" : "btn-info" } ` } >
306- { loc . active ? "Deaktiviraj" : "Aktiviraj" }
309+ < button onClick = { ( ) => handleEdit ( loc ) } className = "icon-btn edit" title = "Uredi" >
310+ < i className = "fas fa-edit" > </ i >
311+ </ button >
312+ < button onClick = { ( ) => handleDelete ( loc . id ) } className = "icon-btn delete" title = "Obriši" >
313+ < i className = "fas fa-trash" > </ i >
307314 </ button >
308- < button onClick = { ( ) => handleDelete ( loc . id ) } className = "btn-small btn-danger" > Obriši</ button >
309315 </ td >
310316 </ tr >
311317 ) ) }
You can’t perform that action at this time.
0 commit comments