@extends('layouts.partials.master') @section('title', 'Produtos') @push('styles') @endpush @section('content')
@include('layouts.components.section-title', ['title' => 'Gerir Preçários']) Voltar
@include('layouts.components.alerts')
@csrf @method('POST')
@include('layouts.components.section-marker', ['section_name' => 'Produto', 'mt' => 'mt-0'])
{{ $product['name'] }}
@include('layouts.components.section-marker', ['section_name' => 'Preço Base', 'mt' => 'mt-3'])
@if ($errors->has('sku'))
{{ $errors->first('sku') }}
@endif
@if ($errors->has('price'))
{{ $errors->first('price') }}
@endif
@if ($errors->has('discount_price'))
{{ $errors->first('discount_price') }}
@endif
@if ($errors->has('quantity'))
{{ $errors->first('quantity') }}
@endif
@if($product['has_variants'] && count($attributes) > 0 && !empty($defaultVariant))
@csrf @method('POST')
@include('layouts.components.section-marker', ['section_name' => 'Variantes', 'mt' => 'mt-0'])
@foreach($attributes as $attribute)
@endforeach @if ($errors->has('attribute_values'))
{{ $errors->first('attribute_values') }}
@endif
@if ($errors->has('sku_v'))
{{ $errors->first('sku_v') }}
@endif
@if ($errors->has('price_v'))
{{ $errors->first('price_v') }}
@endif
@if ($errors->has('discount_price_v'))
{{ $errors->first('discount_price_v') }}
@endif
@if ($errors->has('quantity_v'))
{{ $errors->first('quantity_v') }}
@endif
@endif @if(count($variants) > 0)
@forelse($variants as $variant) @empty @endforelse
ID Atributo SKU Preço Desconto Quantidade Ações
{{ $variant->id }} @foreach ($variant->attributeValues as $attributeValue) {{ $attributeValue->attributeValue->value }}{{ !$loop->last ? ', ' : '' }} @endforeach {{ $variant->sku }} {{ $variant->price }} {{ $variant->discount_price }} {{ $variant->quantity }}
@csrf @method('DELETE')

{{ __('translations.no_results') }}

@endif
@include('layouts.components.confirmation-modal') @endsection