Account Show page prepare..
This commit is contained in:
parent
83e7cc5b6c
commit
7a38e9cc08
@ -29,9 +29,9 @@ class Accounts extends Controller
|
|||||||
*
|
*
|
||||||
* @return Response
|
* @return Response
|
||||||
*/
|
*/
|
||||||
public function show()
|
public function show(Account $account)
|
||||||
{
|
{
|
||||||
return redirect()->route('accounts.index');
|
return view('banking.accounts.show', compact('account'));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -60,7 +60,7 @@ class Accounts extends Controller
|
|||||||
$response = $this->ajaxDispatch(new CreateAccount($request));
|
$response = $this->ajaxDispatch(new CreateAccount($request));
|
||||||
|
|
||||||
if ($response['success']) {
|
if ($response['success']) {
|
||||||
$response['redirect'] = route('accounts.index');
|
$response['redirect'] = route('accounts.show', $response['data']->id);
|
||||||
|
|
||||||
$message = trans('messages.success.added', ['type' => trans_choice('general.accounts', 1)]);
|
$message = trans('messages.success.added', ['type' => trans_choice('general.accounts', 1)]);
|
||||||
|
|
||||||
@ -76,6 +76,24 @@ class Accounts extends Controller
|
|||||||
return response()->json($response);
|
return response()->json($response);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Duplicate the specified resource.
|
||||||
|
*
|
||||||
|
* @param Account $account
|
||||||
|
*
|
||||||
|
* @return Response
|
||||||
|
*/
|
||||||
|
public function duplicate(Account $account)
|
||||||
|
{
|
||||||
|
$clone = $account->duplicate();
|
||||||
|
|
||||||
|
$message = trans('messages.success.duplicated', ['type' => trans_choice('general.accounts', 1)]);
|
||||||
|
|
||||||
|
flash($message)->success();
|
||||||
|
|
||||||
|
return redirect()->route('account.edit', $clone->id);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Show the form for editing the specified resource.
|
* Show the form for editing the specified resource.
|
||||||
*
|
*
|
||||||
@ -107,7 +125,7 @@ class Accounts extends Controller
|
|||||||
$response = $this->ajaxDispatch(new UpdateAccount($account, $request));
|
$response = $this->ajaxDispatch(new UpdateAccount($account, $request));
|
||||||
|
|
||||||
if ($response['success']) {
|
if ($response['success']) {
|
||||||
$response['redirect'] = route('accounts.index');
|
$response['redirect'] = route('accounts.show', $account->id);
|
||||||
|
|
||||||
$message = trans('messages.success.updated', ['type' => $account->name]);
|
$message = trans('messages.success.updated', ['type' => $account->name]);
|
||||||
|
|
||||||
|
@ -109,7 +109,7 @@ class Search extends Component
|
|||||||
'name' => $account->name,
|
'name' => $account->name,
|
||||||
'type' => trans_choice('general.accounts', 1),
|
'type' => trans_choice('general.accounts', 1),
|
||||||
'color' => '#55588b',
|
'color' => '#55588b',
|
||||||
'href' => route('accounts.edit', $account->id),
|
'href' => route('accounts.show', $account->id),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -44,7 +44,7 @@
|
|||||||
<td class="col-sm-2 col-md-1 col-lg-1 col-xl-1 d-none d-sm-block">
|
<td class="col-sm-2 col-md-1 col-lg-1 col-xl-1 d-none d-sm-block">
|
||||||
{{ Form::bulkActionGroup($item->id, $item->name) }}
|
{{ Form::bulkActionGroup($item->id, $item->name) }}
|
||||||
</td>
|
</td>
|
||||||
<td class="col-xs-4 col-sm-4 col-md-4 col-lg-4 col-xl-3 long-texts"><a href="{{ route('accounts.edit', $item->id) }}">{{ $item->name }}</a></td>
|
<td class="col-xs-4 col-sm-4 col-md-4 col-lg-4 col-xl-3 long-texts"><a href="{{ route('accounts.show', $item->id) }}">{{ $item->name }}</a></td>
|
||||||
<td class="col-md-2 col-lg-2 col-xl-2 d-none d-md-block text-left">{{ $item->number }}</td>
|
<td class="col-md-2 col-lg-2 col-xl-2 d-none d-md-block text-left">{{ $item->number }}</td>
|
||||||
<td class="col-sm-2 col-md-2 col-lg-2 col-xl-4 d-none d-sm-block text-right">@money($item->balance, $item->currency_code, true)</td>
|
<td class="col-sm-2 col-md-2 col-lg-2 col-xl-4 d-none d-sm-block text-right">@money($item->balance, $item->currency_code, true)</td>
|
||||||
<td class="col-xs-4 col-sm-2 col-md-1 col-lg-2 col-xl-1">
|
<td class="col-xs-4 col-sm-2 col-md-1 col-lg-2 col-xl-1">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user