@extends('layouts.admin')
@section('style')
@parent
@endSection
@php
$form = config('admin.schedule_form');
$conds = $conds ?? [];
@endphp
@section('content')
@component('admin.components.step_form_pages', [
'post_url' => '',
'type' => 'schedules',
'title'=> 'Setup',
])
@php
$id = 'name';
$comp = $form[$id];
@endphp
@component('admin.components.form_field_50',
[
'label' => $comp['label'],
'required' => $comp['req'],
'description' => $comp['descr'],
'hasError' => ($hasError = $errors->has($id)),
])
@component('admin.components.form_error_msg', ['hasError' => $hasError])
{{ $errors->first($id) }}
@endcomponent
@endcomponent
@php
$id = 'workflow';
$comp = $form[$id];
$select2 = $comp['ajax_select2'] ?? []
@endphp
@component('admin.components.form_field_50',
[
'label' => $comp['label'],
'required' => $comp['req'],
'description' => $comp['descr'],
'hasError' => ($hasError = $errors->has($id)),
])
@component('admin.components.form_error_msg', ['hasError' => $hasError])
{{ $errors->first($id) }}
@endcomponent
@endcomponent
@php
$id = 'is_ended_chat';
$comp = $form[$id];
@endphp
@component('admin.components.form_field_50',
[
'label' => $comp['label'],
'required' => $comp['req'],
'description' => $comp['descr'],
'hasError' => ($hasError = $errors->has($id)),
])
@component('admin.components.form_error_msg', ['hasError' => $hasError])
{{ $errors->first($id) }}
@endcomponent
@endcomponent
@php
$id = 'is_after_channel_date_start';
$comp = $form[$id];
@endphp
@component('admin.components.form_field_50',
[
'label' => $comp['label'],
'required' => $comp['req'],
'description' => $comp['descr'],
'hasError' => ($hasError = $errors->has($id)),
])
@component('admin.components.form_error_msg', ['hasError' => $hasError])
{{ $errors->first($id) }}
@endcomponent
@endcomponent
@php
$id = 'conditions';
$comp = $form[$id];
@endphp
@component('admin.components.form_field_100',
[
'label' => $comp['label'],
'required' => $comp['req'],
'description' => $comp['descr'],
'hasError' => ($hasError = false),
])
@php
$comp = 'admin.components.form_field';
$class = 'pl-1 pr-1 my-1';
$col_cls = 'col-';
$col_name = 'col-cond-';
@endphp
{{ __('headings.txt_and') }}
@component($comp, ['class' => "{$class} {$col_cls}2",])
@endcomponent
@component($comp, ['class' => "{$class} {$col_cls}4",])
@endcomponent
@component($comp, ['class' => "{$class} {$col_cls}1",])
@endcomponent
@component($comp, ['class' => "{$class} {$col_cls}1",])
@endcomponent
@component($comp, ['class' => "{$class} {$col_cls}2",])
@endcomponent
@component($comp, ['class' => "col-sm-4 my-2",])
@endcomponent
@endcomponent
@php
$id = 'cron_settings';
$comp = $form[$id];
$childs = ['minute', 'hour', 'day', 'weekday'];
@endphp
@component('admin.components.form_field_100',
[
'label' => $comp['label'],
'required' => $comp['req'],
'description' => $comp['descr'],
'hasError' => ($hasError = false),
])
@php
$id = 'cron_settings.helper';
$ccomp = $form[$id];
@endphp
@component('admin.components.form_field_100',
[
'label' => $ccomp['label'],
'required' => $ccomp['req'],
'description' => $ccomp['descr'],
'hasError' => ($cHasError = false),
])
@endcomponent
@foreach ($childs as $key)
@php
$cid = 'cron_settings.' . $key;
$ccomp = $form[$cid];
@endphp
@component('admin.components.form_field_50',
[
'label' => $ccomp['label'],
'required' => $ccomp['req'],
'description' => $ccomp['descr'],
'hasError' => ($cHasError = $errors->has($cid)),
])
@component('admin.components.form_error_msg', ['hasError' => $cHasError])
{{ $errors->first($cid) }}
@endcomponent
@endcomponent
@endforeach
@endcomponent
@slot('footer_next')
{{ __('headings.btn_save') }}
@endslot
@endcomponent
@endsection
@section('script')
@parent
@endsection