@extends('admin.layouts.app') @section('title', get_setting('site_name').' | '.__('Payroll Register Export')) @section('content') @php use App\Services\PayrollRegisterExportSettingsService as Pres; $exportPackaging = old('export_packaging', $settings['export_packaging'] ?? Pres::EXPORT_PACKAGING_WORKBOOK); $formSheets = old('sheets', $sheets ?? []); if (! is_array($formSheets) || $formSheets === []) { $formSheets = [Pres::defaultSheet()]; } $maxSheets = Pres::MAX_SHEETS; @endphp

{{ __('Payroll Register (Excel)') }}

{{ __('Build a workbook with one or more sheets. Each sheet can use its own column preset.') }}

@if(session('message'))
{{ session('message') }}
@endif @if($errors->any())
{{ $errors->first() }}
@endif
@csrf
{{ __('Export packaging') }}
@foreach([ Pres::EXPORT_PACKAGING_WORKBOOK => [__('Single workbook'), __('All sheets in one .xlsx file.')], Pres::EXPORT_PACKAGING_ZIP => [__('ZIP archive'), __('Each sheet as a separate Excel file in a ZIP.')], ] as $val => [$title, $desc])
@endforeach
{{ __('Quick templates') }}

{{ __('Templates replace the sheet list below. You can still edit each sheet after applying.') }}

{{ __('Workbook sheets') }} {{ count($formSheets) }}
@foreach($formSheets as $index => $sheet) @include('admin.payroll.partials.register_export_sheet', [ 'index' => $index, 'sheet' => $sheet, 'registry' => $registry, 'groups' => $groups, ]) @endforeach
@foreach($sheetPreviews as $preview)
{{ $preview['title'] }} {{ count($preview['columns']) }} {{ __('cols') }}
@foreach($preview['columns'] as $col) @endforeach
{{ __('Column') }}{{ __('Group') }}
{{ $col['label'] }} {{ $groups[$col['group']] ?? $col['group'] }}
@endforeach
@endsection @section('script') @endsection