mivita/resources/views/user/team/export.blade.php
2025-08-12 18:01:59 +02:00

105 lines
4.5 KiB
PHP

@extends('layouts.layout-2')
@section('content')
@if ($errors->any())
<div class="row">
<div class="col-sm-12">
<div class="alert alert-danger">
<ul>
@foreach ($errors->all() as $error)
<li>{{ $error }}</li>
@endforeach
</ul>
</div>
</div>
</div>
@endif
<h4 class="font-weight-bold py-2 mb-2">
{{ __('navigation.my_team') }}
</h4>
<div class="card">
<h5 class="card-header">
{{__('team.export')}}
</h5>
<div class="card-body">
{!! Form::open(['action' => route('user_team_export_download'), 'class' => '']) !!}
{!! Form::hidden('key', 'value') !!}
<button type="submit" name="action" value="export" class="btn btn-md btn-primary mb-2"><i class="ion ion-md-download"></i> &nbsp;{{ __('team.export_as_xls') }}</button>
{!! Form::close() !!}
<div class="card">
<div class="card-datatable table-responsive">
<table class="table table-striped table-bordered" id="datatable-user-team">
<thead>
<tr>
<th>{{__('tables.line') }}</th>
<th>{{__('tables.level')}}</th>
<th>{{__('tables.email')}}</th>
<th>{{__('tables.firstname')}}</th>
<th>{{__('tables.lastname')}}</th>
<th>{{__('tables.address')}}</th>
<th>{{__('tables.addition') }}</th>
<th>{{__('tables.postcode') }}</th>
<th>{{__('tables.city') }}</th>
<th>{{__('tables.country') }}</th>
<th>{{__('tables.phone') }}</th>
<th>{{__('tables.mobil') }}</th>
<th>{{__('tables.birthday') }}</th>
<th>{{__('tables.partner_since') }}</th>
<th>{{__('tables.account') }}</th>
<th>{{__('tables.account_to') }}</th>
<th>{{__('tables.sponsor')}}</th>
</tr>
</thead>
<tbody>
@if(isset($ExportBot) && isset($ExportBot->user_list->childs))
@foreach ($ExportBot->user_list->childs as $child)
<tr>
<td>{{ $child->line }}</td>
<td>{{ $child->level_name }}</td>
<td>{{ $child->email }}</td>
<td>{{ $child->first_name }}</td>
<td>{{ $child->last_name }}</td>
<td>{{ $child->address }}</td>
<td>{{ $child->address_2 }}</td>
<td>{{ $child->zipcode }}</td>
<td>{{ $child->city }}</td>
<td>{{ $child->country_id }}</td>
<td>{{ $child->phone }}</td>
<td>{{ $child->mobil }}</td>
<td>{{ $child->birthday }}</td>
<td>{{ $child->partner_since }}</td>
<td>{!! ($child->active_account == 1 ? __('yes') : __('no')) !!}</td>
<td>{{ $child->payment_account_date }}</td>
<td>{{ $child->sponsor_name }}</td>
</tr>
@endforeach
@endif
</tbody>
</table>
</div>
</div>
</div>
</div>
<script>
$( document ).ready(function() {
$('#datatable-user-team').dataTable({
"bLengthChange": false,
"iDisplayLength": 50,
"order": [[ 1, "desc" ]],
"language": {
"url": "/js/datatables-{{ \App::getLocale() }}.json"
}
});
});
</script>
@endsection