|
|
|
@ -12,7 +12,7 @@ class EventCalendarImport implements ToModel |
|
|
|
{ |
|
|
|
protected string $user_id; |
|
|
|
protected OperationLogService $logService; |
|
|
|
protected int $index = 1; |
|
|
|
protected int $index = 0; |
|
|
|
protected array $error = []; |
|
|
|
|
|
|
|
public function __construct(string $user_id) |
|
|
|
@ -28,10 +28,11 @@ class EventCalendarImport implements ToModel |
|
|
|
*/ |
|
|
|
public function model(array $row) |
|
|
|
{ |
|
|
|
if ($this->index == 1) { |
|
|
|
if (!$this->index) { |
|
|
|
$this->index += 1; |
|
|
|
return; |
|
|
|
} |
|
|
|
$this->index += 1; |
|
|
|
$pattern_name = $row[1] ?? ''; |
|
|
|
$start_date = $row[2] ?? ''; |
|
|
|
$start_time = $row[3] ?? ''; |
|
|
|
@ -117,7 +118,6 @@ class EventCalendarImport implements ToModel |
|
|
|
$model = EventCalendar::query()->create($create); |
|
|
|
|
|
|
|
$this->logService->logCreated($model, 'event_calendar.import'); |
|
|
|
$this->index += 1; |
|
|
|
} |
|
|
|
|
|
|
|
protected function validateDate($datetime) |
|
|
|
|