[ 'model' => \Bixo\Schedule\Models\Calendar::class, 'table' => 'bixo_schedule_calendars', 'hidden'=> [], 'visible' => [], 'guarded' => ['*'], 'slugs' => ['slug' => 'name'], 'dates' => ['deleted_at', 'created_at', 'updated_at'], 'appends' => [], 'fillable' => ['location_id', 'subject', 'date', 'starts_at', 'ends_at', 'calendar_id', 'calendar_type', 'reminders', 'recurrence', 'description', 'url', 'synced_at', 'user_id'], 'translatables' => [], 'upload_folder' => 'schedule/calendar', 'uploads' => [ /* 'images' => [ 'count' => 10, 'type' => 'image', ], 'file' => [ 'count' => 1, 'type' => 'file', ], */ ], 'casts' => [ 'marking' => 'array', /* 'images' => 'array', 'file' => 'array', */ ], 'revision' => [], 'perPage' => '20', 'search' => [ 'name' => 'like', 'status', ] ], 'search' => [ ], 'list' => [ [ "key" => "location_id", "type" => "text", "label" => 'schedule::calendar.label.location_id', 'sort' => true, 'roles' => [], ], [ "key" => "subject", "type" => "text", "label" => 'schedule::calendar.label.subject', 'sort' => true, 'roles' => [], ], [ "key" => "date", "type" => "text", "label" => 'schedule::calendar.label.date', 'sort' => true, 'roles' => [], ], [ "key" => "starts_at", "type" => "text", "label" => 'schedule::calendar.label.starts_at', 'sort' => true, 'roles' => [], ], [ "key" => "ends_at", "type" => "text", "label" => 'schedule::calendar.label.ends_at', 'sort' => true, 'roles' => [], ], [ "key" => "calendar_id", "type" => "text", "label" => 'schedule::calendar.label.calendar_id', 'sort' => true, 'roles' => [], ], [ "key" => "calendar_type", "type" => "text", "label" => 'schedule::calendar.label.calendar_type', 'sort' => true, 'roles' => [], ], [ "key" => "reminders", "type" => "text", "label" => 'schedule::calendar.label.reminders', 'sort' => true, 'roles' => [], ], [ "key" => "recurrence", "type" => "text", "label" => 'schedule::calendar.label.recurrence', 'sort' => true, 'roles' => [], ], [ "key" => "description", "type" => "text", "label" => 'schedule::calendar.label.description', 'sort' => true, 'roles' => [], ], [ "key" => "url", "type" => "text", "label" => 'schedule::calendar.label.url', 'sort' => true, 'roles' => [], ], [ "key" => "synced_at", "type" => "text", "label" => 'schedule::calendar.label.synced_at', 'sort' => true, 'roles' => [], ], ], 'form' => [ [ "key" => 'location_id', "element" => 'numeric', "type" => 'numeric', "label" => 'schedule::calendar.label.location_id', "placeholder" => 'schedule::calendar.placeholder.location_id', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'subject', "element" => 'text', "type" => 'text', "label" => 'schedule::calendar.label.subject', "placeholder" => 'schedule::calendar.placeholder.subject', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'date', "element" => 'date_picker', "type" => 'date_picker', "label" => 'schedule::calendar.label.date', "placeholder" => 'schedule::calendar.placeholder.date', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'starts_at', "element" => 'time_picker', "type" => 'time_picker', "label" => 'schedule::calendar.label.starts_at', "placeholder" => 'schedule::calendar.placeholder.starts_at', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'ends_at', "element" => 'time_picker', "type" => 'time_picker', "label" => 'schedule::calendar.label.ends_at', "placeholder" => 'schedule::calendar.placeholder.ends_at', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'calendar_id', "element" => 'numeric', "type" => 'numeric', "label" => 'schedule::calendar.label.calendar_id', "placeholder" => 'schedule::calendar.placeholder.calendar_id', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'calendar_type', "element" => 'text', "type" => 'text', "label" => 'schedule::calendar.label.calendar_type', "placeholder" => 'schedule::calendar.placeholder.calendar_type', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'reminders', "element" => 'text', "type" => 'text', "label" => 'schedule::calendar.label.reminders', "placeholder" => 'schedule::calendar.placeholder.reminders', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'recurrence', "element" => 'text', "type" => 'text', "label" => 'schedule::calendar.label.recurrence', "placeholder" => 'schedule::calendar.placeholder.recurrence', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'description', "element" => 'text', "type" => 'text', "label" => 'schedule::calendar.label.description', "placeholder" => 'schedule::calendar.placeholder.description', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'url', "element" => 'text', "type" => 'text', "label" => 'schedule::calendar.label.url', "placeholder" => 'schedule::calendar.placeholder.url', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'synced_at', "element" => 'date_time_picker', "type" => 'date_time_picker', "label" => 'schedule::calendar.label.synced_at', "placeholder" => 'schedule::calendar.placeholder.synced_at', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], ], 'urls' => [ 'new' => [ 'url' => 'schedule/calendar/new', 'method' => 'GET', ], 'create' => [ 'url' => 'schedule/calendar/create', 'method' => 'GET', ], 'store' => [ 'url' => 'schedule/calendar', 'method' => 'POST', ], 'update' => [ 'url' => 'schedule/calendar', 'method' => 'PUT', ], 'list' => [ 'url' => 'schedule/calendar', 'method' => 'GET', ], 'delete' => [ 'url' => 'schedule/calendar', 'method' => 'DELETE', ], ], 'order' => [ 'created_at' => 'schedule::calendar.label.created_at', 'name' => 'schedule::calendar.label.name', 'status' => 'schedule::calendar.label.status', ], 'groups' => [ [ 'icon' => "mdi:account-supervisor-outline", 'name' => "schedule::calendar.groups.main", 'group' => "main.main", 'title' => "schedule::calendar.groups.main", ], [ 'icon' => "fe:home", 'name' => "schedule::calendar.groups.details", 'group' => "main.details", 'title' => "schedule::calendar.groups.details", ], 'images' => [ 'icon' => "fe:home", 'name' => "schedule::calendar.groups.images", 'group' => "main.images", 'title' => "schedule::calendar.groups.images", ], 'settings' => [ 'icon' => "fe:home", 'name' => "schedule::calendar.groups.settings", 'group' => "main.settings", 'title' => "schedule::calendar.groups.settings", ] ], 'controller' => [ 'provider' => 'Bixo', 'package' => 'Schedule', 'module' => 'Calendar', ], 'workflow' => [ 'type' => 'workflow', 'marking_store' => [ 'type' => 'multiple_state', 'arguments' => ['status'], // 'property' => 'status' ], 'supports' => [ \Bixo\Schedule\Models\Calendar::class, ], 'places' => [ 'Draft', 'Pending', 'Approved', 'Closed', 'Published', 'Archived', 'Unpublished', ], 'initial_places' => ['Draft'], 'transitions' => [ 'submit' => [ 'from' => 'Draft', 'to' => 'Pending', 'metadata' => [ 'roles' => [ 'user' => ['*'], ], 'rules' => [ 'name' => 'required', ] ], ], 'reject' => [ 'from' => 'Pending', 'to' => 'Draft', 'metadata' => [ 'roles' => [ 'user' => ['superuser'], 'team' => ['admin', 'manager'], ], 'form' => [ 'title' => 'Reject', 'button' => [ 'cancel' > [ 'icon' > '', 'varient' > '', 'label' > 'Cancel' ], 'submit' > [ 'icon' > '', 'varient' > 'primary', 'label' > 'Reject' ] ], 'fields' => [ 'count' => [ "element" => 'select', "type" => 'select', "label" => 'advert::advert.label.count', "placeholder" => 'advert::advert.placeholder.count', "options" => call_user_func(function () { return [ 1 => ['value' => 1, 'text' => 1], 2 => ['value' => 2, 'text' => 2], 3 => ['value' => 3, 'text' => 3], 4 => ['value' => 4, 'text' => 4], ]; }), "col" => "12", ], 'comment' => [ "element" => 'textarea', "type" => 'text', "required" => 'required', "label" => 'advert::advert.label.comment', "placeholder" => 'advert::advert.placeholder.comment', "col" => "12", ], ], ], ], ], 'approve' => [ 'from' => 'Pending', 'to' => 'Approved', 'metadata' => [ 'roles' => [ 'user' => ['superuser'], 'team' => ['admin', 'manager'], ] ], ], 'publish' => [ 'from' => ['Approved', 'Unpublished'], 'to' => 'Published', 'metadata' => [ 'roles' => [ 'user' => ['superuser'], 'team' => ['admin'], ] ], ], 'unpublish' => [ 'from' => ['Published'], 'to' => 'Unpublished', 'metadata' => [ 'roles' => [ 'user' => ['superuser', 'admin'], 'team' => ['admin'], ] ], ], 'archive' => [ 'from' => ['Published', 'Unpublished'], 'to' => 'Archived', 'metadata' => [ 'roles' => [ 'user' => ['superuser', 'admin'], 'team' => ['admin'], ] ], ], 'unarchive' => [ 'from' => ['Archived'], 'to' => 'Draft', 'metadata' => [ 'roles' => [ 'user' => ['superuser', 'admin'], 'team' => ['admin'], ] ], ], ], ], 'actions' => [ 'copy' => [ 'type' => ['Details', 'List'], 'label' => 'schedule::calendar.action.copy', 'roles' => [ 'user' => ['superuser', 'admin'], 'team' => ['admin'], 'permission' => ['schedule.calendar.copy', 'schedule.calendar.duplicate'], ], 'form' => [ 'count' => [ "element" => 'select', "type" => 'select', "label" => 'schedule::calendar.label.count', "placeholder" => 'schedule::calendar.placeholder.count', "options" => call_user_func(function () { return [ 1 => ['value' => 1, 'text' => 1], 2 => ['value' => 2, 'text' => 2], 3 => ['value' => 3, 'text' => 3], 4 => ['value' => 4, 'text' => 4], ]; }), "col" => "12", ], 'comment' => [ "element" => 'textarea', "type" => 'text', "required" => 'required', "label" => 'schedule::calendar.label.comment', "placeholder" => 'schedule::calendar.placeholder.comment', "col" => "12", ], ], ], 'empty' => [ 'type' => ['List', 'Details'], 'label' => 'schedule::calendar.action.empty', 'roles' => [ 'user' => ['superuser'], ], ], 'section' => [ 'type' => ['Group'], 'api_url' => '', 'action' => 'list', 'label' => 'schedule::calendar.action.section', 'store' => 'main.units', 'group' => 'main.units' ], ] ];