@extends('layouts.admin') @section('title', 'Upload Training Calendar') @section('content_header')

Upload Training Calendar

@stop @section('content')

Upload Training Calendar Excel Sheet

@if($errors->any()) @endif
CSV File Requirements (Indian Format Compatible):
  • File format: .csv only
  • Maximum file size: 10MB
  • First row should contain headers (will be skipped)
  • Required columns: Course Type, Training Course
  • Optional columns: Batch Type, Duration, From Date, To Date, Holidays, Standard Price, Promotional Offer, Note
  • Indian Date Format: DD/MM/YYYY or DD-MM-YYYY (e.g., "15/01/2024", "15-01-2024")
  • Indian Price Format: ₹15,000.00, ₹2,50,000, Rs.15000, or plain numbers
  • Holidays Format: Multiple dates separated by commas (e.g., "03/09/2025,11/09/2025,12/09/2025")
  • Price Validation: Must be between ₹100 and ₹50,00,000
  • Date Validation: From Date cannot be after To Date, dates must be valid (2020-2035)
  • Duplicate Handling: If a record with the same Course Type + Training Course + From Date + To Date exists, it will be updated instead of creating a duplicate
  • Data Replacement: Records not present in the new CSV will be soft deleted to maintain data consistency
  • Upload Strategy: Each CSV upload completely replaces the training calendar data
  • Database Protection: Unique constraint prevents duplicate entries at database level
Important Notes:
  • Data Replacement: Each upload completely replaces the training calendar - records not in the CSV will be soft deleted
  • Soft Delete Safety: Soft deleted records can be restored if needed - data is not permanently lost
  • Transaction Safety: All operations are wrapped in a database transaction - if upload fails, no changes are made
  • Check upload logs for detailed processing information including create/update/delete counts
@csrf
@error('excel_file') {{ $message }} @enderror Only .csv files are allowed. Maximum size: 10MB
Cancel

Sample CSV Format:
Course Type Training Course Batch Type Duration From Date To Date Holidays Standard Price Promotional Offer Note
ISO 9001 Quality Management System Weekend 3 Days 15/01/2024 17/01/2024 16/01/2024 ₹15,000.00 ₹12,000.00 Early bird discount available
ISO 14001 Environmental Management Weekday 2 Days 20/01/2024 21/01/2024 ₹12,000.00
ISO 45001 Occupational Health & Safety Weekend 5 Days 15-03-2024 19-03-2024 17/03/2024,18/03/2024 ₹2,50,000 Rs.2,25,000 Corporate training
Download Sample CSV:
Download Sample CSV
@endsection @push('css') @endpush @push('js') @endpush