%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /www/loslex/demo/resources/views/contests/partials/
Upload File :
Create Path :
Current File : /www/loslex/demo/resources/views/contests/partials/export-import.blade.php

<div class="top-20 p-6 text-gray-700 dark:text-gray-300">
    <div class="font-semibold text-lg mb-2">{{ __("Export present shooters") }}</div>
    <div class="flex flex-1 flex-wrap gap-2">
        <div class="grow text-center"><a href="{{ route('contest.export', [$contest->id, 'psc']) }}"><x-primary-button title="{{ __('Exports present shooters into Practiscore file') }}">{{ __('PractiScore') }}</x-primary-button></a></div>
        <div class="grow text-center"><a href="{{ route('contest.export', [$contest->id, 'excel']) }}"><x-primary-button title="{{ __('Exports present shooters into Excel file') }}">{{ __('Excel') }}</x-primary-button></a></div>
        <div class="grow text-center"><a href="{{ route('contest.export', [$contest->id, 'tsv']) }}"><x-primary-button title="{{ __('Exports present shooters into tab-separated CSV') }}">{{ __('TSV') }}</x-primary-button></a></div>
    </div>
    <div class="font-semibold text-lg mb-2 mt-4">{{ __("Export all shooters") }}</div>
    <div class="flex flex-1 flex-wrap gap-2 justify center">
        <div class="grow text-center"><a href="{{ route('contest.export', [$contest->id, 'psc', 'all' => true]) }}"><x-primary-button title="{{ __('Exports all shooters into Practiscore file') }}">{{ __('PractiScore') }}</x-primary-button></a></div>
        <div class="grow text-center"><a href="{{ route('contest.export', [$contest->id, 'excel', 'all' => true]) }}"><x-primary-button title="{{ __('Exports all shooters into Excel file') }}">{{ __('Excel') }}</x-primary-button></a></div>
        <div class="grow text-center"><a href="{{ route('contest.export', [$contest->id, 'tsv', 'all' => true]) }}"><x-primary-button title="{{ __('Exports all shooters into tab-separated CSV file') }}">{{ __('TSV') }}</x-primary-button></a></div>
    </div>
    <div class="mt-4 text-center font-semibold text-xs">{{ __('TSV Export is NOT meant to be imported into PractiScore!') }}</div>

    <div class="mt-4 border-t">
        <div class="justify-self-start col-span-2 font-semibold text-lg mb-2 mt-4">{{ __("Email addresses") }}</div>
        <div class="flex flex-row flex-wrap justify-center gap-2">
            <a href="{{route('contest.email', [$contest->id, 'all'])}}"><x-primary-button>{{ __('All registered') }}</x-primary-button></a>
            <a href="{{route('contest.email', [$contest->id, 'contestants'])}}"><x-primary-button>{{ __('Shooters') }}</x-primary-button></a>
            <a href="{{route('contest.email', [$contest->id, 'squadr'])}}"><x-primary-button>{{ __('Referees/helpers') }}</x-primary-button></a>
            <a href="{{route('contest.email', [$contest->id, 'builders'])}}"><x-primary-button>{{ __('Builders') }}</x-primary-button></a>
            <a href="{{route('contest.email', [$contest->id, 'notpaid'])}}"><x-primary-button>{{ __('Not paid') }}</x-primary-button></a>
        </div>
    </div>

    <div class="mt-6 grid grid-cols-2 justify-items-center border-t gap-2">
        <div class="justify-self-start col-span-2 font-semibold text-lg mb-2 mt-4">{{ __("Contest presentation") }}</div>
        <div><a href="{{ route('contest.presentation', [$contest->id]) }}" target="_blank"><x-primary-button title="{{ __('Opens presentation table ready for printing') }}">{{ __('Present shooters') }}</x-primary-button></a></div>
        <div><a href="{{ route('contest.presentation', [$contest->id, 'all' => true]) }}" target="_blank"><x-primary-button title="{{ __('Opens presentation table ready for printing') }}">{{ __('All shooters') }}</x-primary-button></a></div>
    </div>

    <form class="mt-6 grid grid-cols-1 justify-items-center border-t"
        method="POST" action="{{ route('contest.process-import', [$contest->id]) }}" enctype="multipart/form-data">
        @csrf
        <div class="justify-self-start text-lg font-semibold mt-4 mb-2">{{ __('Import contest results') }}</div>
        <div class="flex flex-row flex-wrap gap-4 justify-center">
            @if ($contest->isAfterContest || $contest->isContestDay || auth()->user()->is_admin)
                <input type="hidden" name="contest_id" value="{{$contest->id}}" />
                <x-text-input class="border w-full md:w-auto" type="file" name="file" required id="chooseFile" />
                {{-- <label class="ml-4 custom-file-label" for="chooseFile">{{ __('File to import') }}</label> --}}
                <x-primary-button class="">{{ __('Submit for import') }}</x-primary-button>
            @else
                {{ __('Results import is not available until the contest day!') }}
            @endif
        </div>
    </form>

    @if (auth()->user()->is_admin)
        <div class="mt-6 grid grid-cols-1 justify-items-center border-t gap-2">
            <div class="justify-self-start col-span-1 font-semibold text-lg mb-2 mt-4">{{ __("Contest related files") }}</div>
            <div class="grid grid-cols-[auto_min_min] gap-x-2 text-sm">
                @foreach ($contestfiles as $cf)
                    <div class="">{{basename($cf['file'])}}</div>
                    <div class=""><a title="{{ __('Download') }}" href="{{ route('contest.fdownload', [$contest->id, basename($cf['file'])]) }}"><span class="fa-solid fa-file-arrow-down text-blue-500"></span></a></div>
                    <div class=""><a title="{{ __('Delete') }}" href="{{ route('contest.fdelete', [$contest->id, basename($cf['file'])]) }}"><span class="fa-solid fa-square-xmark text-red-500"></span></a></div>
                    <div class="col-span-3 text-xs mb-2">{{ $cf['size'] }} kB, {{ $cf['modified'] }}</div>
                @endforeach
            </div>
        </div>
    @endif
</div>

Zerion Mini Shell 1.0