[ 'model' => \Bixo\Schedule\Models\Task::class, 'table' => 'bixo_schedule_tasks', 'hidden'=> [], 'visible' => [], 'guarded' => ['*'], 'slugs' => ['slug' => 'name'], 'dates' => ['deleted_at', 'created_at', 'updated_at'], 'appends' => [], 'fillable' => ['title', 'status', 'priority', 'assigned_to', 'created_by', 'start_date', 'estimate', 'description', 'documents', 'comments', 'type', 'data', 'subject_id', 'subject_type', 'user_type', 'group_by'], 'translatables' => [], 'upload_folder' => 'schedule/task', '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" => "title", "type" => "text", "label" => 'schedule::task.label.title', 'sort' => true, 'roles' => [], ], [ "key" => "priority", "type" => "text", "label" => 'schedule::task.label.priority', 'sort' => true, 'roles' => [], ], [ "key" => "assigned_to", "type" => "text", "label" => 'schedule::task.label.assigned_to', 'sort' => true, 'roles' => [], ], [ "key" => "created_by", "type" => "text", "label" => 'schedule::task.label.created_by', 'sort' => true, 'roles' => [], ], [ "key" => "start_date", "type" => "text", "label" => 'schedule::task.label.start_date', 'sort' => true, 'roles' => [], ], [ "key" => "estimate", "type" => "text", "label" => 'schedule::task.label.estimate', 'sort' => true, 'roles' => [], ], [ "key" => "description", "type" => "text", "label" => 'schedule::task.label.description', 'sort' => true, 'roles' => [], ], [ "key" => "documents", "type" => "text", "label" => 'schedule::task.label.documents', 'sort' => true, 'roles' => [], ], [ "key" => "comments", "type" => "text", "label" => 'schedule::task.label.comments', 'sort' => true, 'roles' => [], ], [ "key" => "type", "type" => "text", "label" => 'schedule::task.label.type', 'sort' => true, 'roles' => [], ], [ "key" => "data", "type" => "text", "label" => 'schedule::task.label.data', 'sort' => true, 'roles' => [], ], [ "key" => "subject_id", "type" => "text", "label" => 'schedule::task.label.subject_id', 'sort' => true, 'roles' => [], ], [ "key" => "subject_type", "type" => "text", "label" => 'schedule::task.label.subject_type', 'sort' => true, 'roles' => [], ], [ "key" => "group_by", "type" => "text", "label" => 'schedule::task.label.group_by', 'sort' => true, 'roles' => [], ], ], 'form' => [ [ "key" => 'title', "element" => 'text', "type" => 'text', "label" => 'schedule::task.label.title', "placeholder" => 'schedule::task.placeholder.title', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'priority', "element" => 'text', "type" => 'text', "label" => 'schedule::task.label.priority', "placeholder" => 'schedule::task.placeholder.priority', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'assigned_to', "element" => 'numeric', "type" => 'numeric', "label" => 'schedule::task.label.assigned_to', "placeholder" => 'schedule::task.placeholder.assigned_to', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'created_by', "element" => 'numeric', "type" => 'numeric', "label" => 'schedule::task.label.created_by', "placeholder" => 'schedule::task.placeholder.created_by', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'start_date', "element" => 'date_time_picker', "type" => 'date_time_picker', "label" => 'schedule::task.label.start_date', "placeholder" => 'schedule::task.placeholder.start_date', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'estimate', "element" => 'time_picker', "type" => 'time_picker', "label" => 'schedule::task.label.estimate', "placeholder" => 'schedule::task.placeholder.estimate', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'description', "element" => 'text', "type" => 'text', "label" => 'schedule::task.label.description', "placeholder" => 'schedule::task.placeholder.description', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'documents', "element" => 'text', "type" => 'text', "label" => 'schedule::task.label.documents', "placeholder" => 'schedule::task.placeholder.documents', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'comments', "element" => 'text', "type" => 'text', "label" => 'schedule::task.label.comments', "placeholder" => 'schedule::task.placeholder.comments', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'type', "element" => 'radios', "type" => 'radios', "label" => 'schedule::task.label.type', "placeholder" => 'schedule::task.placeholder.type', "rules" => '', "options" => function(){ return trans('schedule::task.options.type'); }, "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'data', "element" => 'text', "type" => 'text', "label" => 'schedule::task.label.data', "placeholder" => 'schedule::task.placeholder.data', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'subject_id', "element" => 'numeric', "type" => 'numeric', "label" => 'schedule::task.label.subject_id', "placeholder" => 'schedule::task.placeholder.subject_id', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'subject_type', "element" => 'text', "type" => 'text', "label" => 'schedule::task.label.subject_type', "placeholder" => 'schedule::task.placeholder.subject_type', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'group_by', "element" => 'text', "type" => 'text', "label" => 'schedule::task.label.group_by', "placeholder" => 'schedule::task.placeholder.group_by', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], ], 'urls' => [ 'new' => [ 'url' => 'schedule/task/new', 'method' => 'GET', ], 'create' => [ 'url' => 'schedule/task/create', 'method' => 'GET', ], 'store' => [ 'url' => 'schedule/task', 'method' => 'POST', ], 'update' => [ 'url' => 'schedule/task', 'method' => 'PUT', ], 'list' => [ 'url' => 'schedule/task', 'method' => 'GET', ], 'delete' => [ 'url' => 'schedule/task', 'method' => 'DELETE', ], ], 'order' => [ 'created_at' => 'schedule::task.label.created_at', 'name' => 'schedule::task.label.name', 'status' => 'schedule::task.label.status', ], 'groups' => [ [ 'icon' => "mdi:account-supervisor-outline", 'name' => "schedule::task.groups.main", 'group' => "main.main", 'title' => "schedule::task.groups.main", ], [ 'icon' => "fe:home", 'name' => "schedule::task.groups.details", 'group' => "main.details", 'title' => "schedule::task.groups.details", ], 'images' => [ 'icon' => "fe:home", 'name' => "schedule::task.groups.images", 'group' => "main.images", 'title' => "schedule::task.groups.images", ], 'settings' => [ 'icon' => "fe:home", 'name' => "schedule::task.groups.settings", 'group' => "main.settings", 'title' => "schedule::task.groups.settings", ] ], 'controller' => [ 'provider' => 'Bixo', 'package' => 'Schedule', 'module' => 'Task', ], 'workflow' => [ 'type' => 'workflow', 'marking_store' => [ 'type' => 'multiple_state', 'arguments' => ['status'], // 'property' => 'status' ], 'supports' => [ \Bixo\Schedule\Models\Task::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::task.action.copy', 'roles' => [ 'user' => ['superuser', 'admin'], 'team' => ['admin'], 'permission' => ['schedule.task.copy', 'schedule.task.duplicate'], ], 'form' => [ 'count' => [ "element" => 'select', "type" => 'select', "label" => 'schedule::task.label.count', "placeholder" => 'schedule::task.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::task.label.comment', "placeholder" => 'schedule::task.placeholder.comment', "col" => "12", ], ], ], 'empty' => [ 'type' => ['List', 'Details'], 'label' => 'schedule::task.action.empty', 'roles' => [ 'user' => ['superuser'], ], ], 'section' => [ 'type' => ['Group'], 'api_url' => '', 'action' => 'list', 'label' => 'schedule::task.action.section', 'store' => 'main.units', 'group' => 'main.units' ], ] ];