File tree Expand file tree Collapse file tree 4 files changed +42
-4
lines changed
js/views/__backoffice/users Expand file tree Collapse file tree 4 files changed +42
-4
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ import {
11
11
withStyles ,
12
12
} from '@material-ui/core' ;
13
13
14
+ import * as UrlUtils from '../../../utils/URL' ;
14
15
import * as NavigationUtils from '../../../utils/Navigation' ;
15
16
import { User } from '../../../models' ;
16
17
import { LinearIndeterminate } from '../../../ui/Loaders' ;
@@ -137,6 +138,13 @@ class Edit extends Component {
137
138
138
139
async componentDidMount ( ) {
139
140
const { params } = this . props . match ;
141
+ const { location } = this . props ;
142
+
143
+ const queryParams = UrlUtils . _queryParams ( location . search ) ;
144
+
145
+ if ( queryParams . hasOwnProperty ( 'step' ) ) {
146
+ this . setState ( { activeStep : parseInt ( queryParams . step ) } ) ;
147
+ }
140
148
141
149
await this . fetchUser ( params . id ) ;
142
150
}
Original file line number Diff line number Diff line change @@ -8,7 +8,11 @@ import {
8
8
Typography ,
9
9
} from '@material-ui/core' ;
10
10
11
- import { Delete as DeleteIcon , Edit as EditIcon } from '@material-ui/icons' ;
11
+ import {
12
+ Delete as DeleteIcon ,
13
+ Edit as EditIcon ,
14
+ Image as ImageIcon ,
15
+ } from '@material-ui/icons' ;
12
16
13
17
import * as RandomUtils from '../../../utils/Random' ;
14
18
import * as NavigationUtils from '../../../utils/Navigation' ;
@@ -436,7 +440,31 @@ class List extends Component {
436
440
) ,
437
441
email : user . email ,
438
442
actions : (
439
- < div style = { { width : '5rem' } } >
443
+ < div style = { { width : 120 , flex : 'no-wrap' } } >
444
+ < Tooltip
445
+ title = { Lang . get ( 'resources.edit_image' , {
446
+ name : 'User' ,
447
+ } ) }
448
+ >
449
+ < IconButton
450
+ onClick = { ( ) =>
451
+ history . push (
452
+ NavigationUtils . _route (
453
+ 'backoffice.users.edit' ,
454
+ {
455
+ id : user . id ,
456
+ } ,
457
+ {
458
+ step : 2 ,
459
+ } ,
460
+ ) ,
461
+ )
462
+ }
463
+ >
464
+ < ImageIcon />
465
+ </ IconButton >
466
+ </ Tooltip >
467
+
440
468
< Tooltip
441
469
title = { Lang . get ( 'resources.edit' , {
442
470
name : 'User' ,
Original file line number Diff line number Diff line change 15
15
'show ' => 'View :name ' ,
16
16
'edit ' => 'Edit :name ' ,
17
17
'delete ' => 'Delete :name ' ,
18
+ 'edit_image ' => "Edit :name's image " ,
18
19
19
20
'delete_confirmation_title ' => 'You are deleting a :name ' ,
20
21
'delete_confirmation_body ' => "If not undone, the :name won't be recovered anymore. " ,
Original file line number Diff line number Diff line change 15
15
'show ' => 'Tingnan ang :name ' ,
16
16
'edit ' => 'I-edit ang :name ' ,
17
17
'delete ' => 'Burahin ang :name ' ,
18
+ 'edit_image ' => "I-edit ang imahe ng :name " ,
18
19
19
20
'delete_confirmation_title ' => 'Ikaw ay nagbubura ng isang :name ' ,
20
21
'delete_confirmation_body ' => "Kung maituloy, ang :name ay di na mare-recover pa. " ,
23
24
'not_fetched ' => 'Error sa pagkuha ng mga :name! ' ,
24
25
'created ' => 'Ang :name ay matagumpay na nagawa! ' ,
25
26
'not_created ' => 'Ang :name ay hindi nagawa! ' ,
26
- 'updated ' => 'Ang :name ay matagumpay na na-updated ! ' ,
27
- 'not_updated ' => 'Ang :name ay hindi ma-updated ! ' ,
27
+ 'updated ' => 'Ang :name ay matagumpay na na-update ! ' ,
28
+ 'not_updated ' => 'Ang :name ay hindi ma-update ! ' ,
28
29
'deleted ' => 'Ang :name ay burado na! ' ,
29
30
'not_deleted ' => 'Ang :name ay hindi nabura! ' ,
30
31
'restored ' => 'Ang :name ay naibalik! ' ,
You can’t perform that action at this time.
0 commit comments