@extends('loja.default', ['title' => 'Minha conta']) @section('css') @endsection @section('content')
@csrf @method('put')

Seus Dados

@if($errors->has('nome'))
{{ $errors->first('nome') }} @endif
@if($errors->has('email'))
{{ $errors->first('email') }} @endif
@if($errors->has('senha'))
{{ $errors->first('senha') }} @endif
Sair

Endereços

@foreach($cliente->enderecosEcommerce as $e)
Rua: {{ $e->rua }}
Número: {{ $e->numero }}
Bairro: {{ $e->bairro }}
Cidade: {{ $e->cidade->info }}
Referência: {{ $e->referencia }}
CEP: {{ $e->cep }}
@if($e->padrao)

Endereço padrão

@endif
@endforeach

Pedidos

@foreach($cliente->pedidosEcommerce as $p)
Data: {{ __data_pt($p->created_at) }}
Valor total: R${{ __moeda($p->valor_total) }}
Valor frete: R${{ __moeda($p->valor_frete) }}
Desconto: R${{ __moeda($p->desconto) }}

Itens do pedido
@foreach($p->itens as $i)
Valor unitário: R${{ __moeda($i->valor_unitario) }}
Quantidade: {{ number_format($i->quantidade, 0) }}
Subtotal: R${{ __moeda($i->sub_total) }}

@endforeach
Tipo de pagamento: {{ strtoupper($p->tipo_pagamento) }}
Status de pagamento: @if($p->status_pagamento == 'approved') PAGO @else PENDENTE @endif
#{{ $p->hash_pedido }}
@if($p->tipo_pagamento == 'pix' && $p->status_pagamento != 'approved') @endif @if($p->tipo_pagamento == 'boleto') @endif @if($p->observacao)
Observação: {{ $p->observacao }}
@endif
@endforeach
@endsection @section('js') @endsection