fix amount 8
This commit is contained in:
@@ -36,7 +36,7 @@ class ProductController extends SuperController
|
||||
$query->where('owner', $user->id);
|
||||
})->with(['wallet' => function ($query) use ($user) {
|
||||
$query->where('owner', $user->id);
|
||||
}])->get();
|
||||
}, 'file'])->get();
|
||||
|
||||
// Prepare the response
|
||||
$user['rows'] = $products->map(function ($product) {
|
||||
@@ -46,6 +46,10 @@ class ProductController extends SuperController
|
||||
'group_type' => $product->group_type ?? null,
|
||||
]);
|
||||
|
||||
if ($product->relationLoaded('file') && $product->file) {
|
||||
$product->file->setAttribute('full_src', $product->file->src);
|
||||
}
|
||||
|
||||
return $product;
|
||||
});
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@ use App\Models\BankAccount;
|
||||
use App\Models\Price;
|
||||
use App\Models\Setting;
|
||||
use App\Http\Controllers\Admin\TahesabController;
|
||||
use App\Services\AssetSummaryService;
|
||||
use App\Services\ZaarboxPriceService;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Http;
|
||||
@@ -47,6 +48,15 @@ class WalletController extends Controller
|
||||
return response()->json($wallet);
|
||||
}
|
||||
|
||||
public function assetsSummary(AssetSummaryService $assetSummaryService)
|
||||
{
|
||||
$user = auth('customer')->user();
|
||||
|
||||
return response()->json(
|
||||
$assetSummaryService->buildForCustomer((int) $user->id, (int) $user->type)
|
||||
);
|
||||
}
|
||||
|
||||
public function priceData(Request $request, ZaarboxPriceService $zaarboxPriceService)
|
||||
{
|
||||
return response()->json([
|
||||
|
||||
Reference in New Issue
Block a user