mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Cloning products
This commit is contained in:
parent
4aa8abdbee
commit
ec7b4fe393
@ -82,7 +82,7 @@ class ProductController extends BaseController
|
|||||||
*
|
*
|
||||||
* @return \Illuminate\Contracts\View\View
|
* @return \Illuminate\Contracts\View\View
|
||||||
*/
|
*/
|
||||||
public function edit($publicId, $clone = false)
|
public function edit(ProductRequest $request, $publicId, $clone = false)
|
||||||
{
|
{
|
||||||
$account = Auth::user()->account;
|
$account = Auth::user()->account;
|
||||||
$product = Product::scope($publicId)->withTrashed()->firstOrFail();
|
$product = Product::scope($publicId)->withTrashed()->firstOrFail();
|
||||||
|
@ -71,7 +71,7 @@ class ProductDatatable extends EntityDatatable
|
|||||||
[
|
[
|
||||||
trans('texts.clone_product'),
|
trans('texts.clone_product'),
|
||||||
function ($model) {
|
function ($model) {
|
||||||
return "javascript:submitForm_product('clone', {$model->public_id})";
|
return URL::to("products/{$model->public_id}/clone");
|
||||||
},
|
},
|
||||||
function ($model) {
|
function ($model) {
|
||||||
return Auth::user()->can('create', ENTITY_PRODUCT);
|
return Auth::user()->can('create', ENTITY_PRODUCT);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user