diff --git a/resources/js/views/__backoffice/users/Edit.js b/resources/js/views/__backoffice/users/Edit.js index 7c475fa..7af1794 100755 --- a/resources/js/views/__backoffice/users/Edit.js +++ b/resources/js/views/__backoffice/users/Edit.js @@ -11,6 +11,7 @@ import { withStyles, } from '@material-ui/core'; +import * as UrlUtils from '../../../utils/URL'; import * as NavigationUtils from '../../../utils/Navigation'; import { User } from '../../../models'; import { LinearIndeterminate } from '../../../ui/Loaders'; @@ -137,6 +138,13 @@ class Edit extends Component { async componentDidMount() { const { params } = this.props.match; + const { location } = this.props; + + const queryParams = UrlUtils._queryParams(location.search); + + if (queryParams.hasOwnProperty('step')) { + this.setState({ activeStep: parseInt(queryParams.step) }); + } await this.fetchUser(params.id); } diff --git a/resources/js/views/__backoffice/users/List.js b/resources/js/views/__backoffice/users/List.js index 1b9e2e5..73e0274 100755 --- a/resources/js/views/__backoffice/users/List.js +++ b/resources/js/views/__backoffice/users/List.js @@ -8,7 +8,11 @@ import { Typography, } from '@material-ui/core'; -import { Delete as DeleteIcon, Edit as EditIcon } from '@material-ui/icons'; +import { + Delete as DeleteIcon, + Edit as EditIcon, + Image as ImageIcon, +} from '@material-ui/icons'; import * as RandomUtils from '../../../utils/Random'; import * as NavigationUtils from '../../../utils/Navigation'; @@ -436,7 +440,31 @@ class List extends Component { ), email: user.email, actions: ( -
+
+ + + history.push( + NavigationUtils._route( + 'backoffice.users.edit', + { + id: user.id, + }, + { + step: 2, + }, + ), + ) + } + > + + + + 'View :name', 'edit' => 'Edit :name', 'delete' => 'Delete :name', + 'edit_image' => "Edit :name's image", 'delete_confirmation_title' => 'You are deleting a :name', 'delete_confirmation_body' => "If not undone, the :name won't be recovered anymore.", diff --git a/resources/lang/fil/resources.php b/resources/lang/fil/resources.php index cb2583a..9d3804b 100644 --- a/resources/lang/fil/resources.php +++ b/resources/lang/fil/resources.php @@ -15,6 +15,7 @@ 'show' => 'Tingnan ang :name', 'edit' => 'I-edit ang :name', 'delete' => 'Burahin ang :name', + 'edit_image' => "I-edit ang imahe ng :name", 'delete_confirmation_title' => 'Ikaw ay nagbubura ng isang :name', 'delete_confirmation_body' => "Kung maituloy, ang :name ay di na mare-recover pa.", @@ -23,8 +24,8 @@ 'not_fetched' => 'Error sa pagkuha ng mga :name!', 'created' => 'Ang :name ay matagumpay na nagawa!', 'not_created' => 'Ang :name ay hindi nagawa!', - 'updated' => 'Ang :name ay matagumpay na na-updated!', - 'not_updated' => 'Ang :name ay hindi ma-updated!', + 'updated' => 'Ang :name ay matagumpay na na-update!', + 'not_updated' => 'Ang :name ay hindi ma-update!', 'deleted' => 'Ang :name ay burado na!', 'not_deleted' => 'Ang :name ay hindi nabura!', 'restored' => 'Ang :name ay naibalik!',