[ 'model' => \Bixo\Employee\Models\Document::class, 'table' => 'bixo_employee_documents', 'hidden'=> [], 'visible' => [], 'guarded' => ['*'], 'slugs' => ['slug' => 'name'], 'dates' => ['deleted_at', 'created_at', 'updated_at'], 'appends' => [], 'fillable' => ['ref', 'employee_id', 'type', 'name', 'number', 'description', 'expiry_date', 'issue_date', 'details', 'files', 'user_type', 'user_id'], 'translatables' => [], 'upload_folder' => 'employee/document', '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" => "ref", "type" => "text", "label" => 'employee::document.label.ref', 'sort' => true, 'roles' => [], ], [ "key" => "employee_id", "type" => "text", "label" => 'employee::document.label.employee_id', 'sort' => true, 'roles' => [], ], [ "key" => "type", "type" => "text", "label" => 'employee::document.label.type', 'sort' => true, 'roles' => [], ], [ "key" => "name", "type" => "text", "label" => 'employee::document.label.name', 'sort' => true, 'roles' => [], ], [ "key" => "number", "type" => "text", "label" => 'employee::document.label.number', 'sort' => true, 'roles' => [], ], [ "key" => "description", "type" => "text", "label" => 'employee::document.label.description', 'sort' => true, 'roles' => [], ], [ "key" => "expiry_date", "type" => "text", "label" => 'employee::document.label.expiry_date', 'sort' => true, 'roles' => [], ], [ "key" => "issue_date", "type" => "text", "label" => 'employee::document.label.issue_date', 'sort' => true, 'roles' => [], ], [ "key" => "details", "type" => "text", "label" => 'employee::document.label.details', 'sort' => true, 'roles' => [], ], [ "key" => "files", "type" => "text", "label" => 'employee::document.label.files', 'sort' => true, 'roles' => [], ], ], 'form' => [ [ "key" => 'ref', "element" => 'text', "type" => 'text', "label" => 'employee::document.label.ref', "placeholder" => 'employee::document.placeholder.ref', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'employee_id', "element" => 'numeric', "type" => 'numeric', "label" => 'employee::document.label.employee_id', "placeholder" => 'employee::document.placeholder.employee_id', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'type', "element" => 'text', "type" => 'text', "label" => 'employee::document.label.type', "placeholder" => 'employee::document.placeholder.type', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'name', "element" => 'text', "type" => 'text', "label" => 'employee::document.label.name', "placeholder" => 'employee::document.placeholder.name', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'number', "element" => 'text', "type" => 'text', "label" => 'employee::document.label.number', "placeholder" => 'employee::document.placeholder.number', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'description', "element" => 'text', "type" => 'text', "label" => 'employee::document.label.description', "placeholder" => 'employee::document.placeholder.description', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'expiry_date', "element" => 'date_picker', "type" => 'date_picker', "label" => 'employee::document.label.expiry_date', "placeholder" => 'employee::document.placeholder.expiry_date', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'issue_date', "element" => 'date_picker', "type" => 'date_picker', "label" => 'employee::document.label.issue_date', "placeholder" => 'employee::document.placeholder.issue_date', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'details', "element" => 'text', "type" => 'text', "label" => 'employee::document.label.details', "placeholder" => 'employee::document.placeholder.details', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'files', "element" => 'text', "type" => 'text', "label" => 'employee::document.label.files', "placeholder" => 'employee::document.placeholder.files', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], ], 'urls' => [ 'new' => [ 'url' => 'employee/document/new', 'method' => 'GET', ], 'create' => [ 'url' => 'employee/document/create', 'method' => 'GET', ], 'store' => [ 'url' => 'employee/document', 'method' => 'POST', ], 'update' => [ 'url' => 'employee/document', 'method' => 'PUT', ], 'list' => [ 'url' => 'employee/document', 'method' => 'GET', ], 'delete' => [ 'url' => 'employee/document', 'method' => 'DELETE', ], ], 'order' => [ 'created_at' => 'employee::document.label.created_at', 'name' => 'employee::document.label.name', 'status' => 'employee::document.label.status', ], 'groups' => [ [ 'icon' => "mdi:account-supervisor-outline", 'name' => "employee::document.groups.main", 'group' => "main.main", 'title' => "employee::document.groups.main", ], [ 'icon' => "fe:home", 'name' => "employee::document.groups.details", 'group' => "main.details", 'title' => "employee::document.groups.details", ], 'images' => [ 'icon' => "fe:home", 'name' => "employee::document.groups.images", 'group' => "main.images", 'title' => "employee::document.groups.images", ], 'settings' => [ 'icon' => "fe:home", 'name' => "employee::document.groups.settings", 'group' => "main.settings", 'title' => "employee::document.groups.settings", ] ], 'controller' => [ 'provider' => 'Bixo', 'package' => 'Employee', 'module' => 'Document', ], 'workflow' => [ 'type' => 'workflow', 'marking_store' => [ 'type' => 'multiple_state', 'arguments' => ['status'], // 'property' => 'status' ], 'supports' => [ \Bixo\Employee\Models\Document::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' => 'employee::document.action.copy', 'roles' => [ 'user' => ['superuser', 'admin'], 'team' => ['admin'], 'permission' => ['employee.document.copy', 'employee.document.duplicate'], ], 'form' => [ 'count' => [ "element" => 'select', "type" => 'select', "label" => 'employee::document.label.count', "placeholder" => 'employee::document.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" => 'employee::document.label.comment', "placeholder" => 'employee::document.placeholder.comment', "col" => "12", ], ], ], 'empty' => [ 'type' => ['List', 'Details'], 'label' => 'employee::document.action.empty', 'roles' => [ 'user' => ['superuser'], ], ], 'section' => [ 'type' => ['Group'], 'api_url' => '', 'action' => 'list', 'label' => 'employee::document.action.section', 'store' => 'main.units', 'group' => 'main.units' ], ] ];