[ 'model' => \Migrator\Happytenant\Models\Unit::class, 'table' => 'migrator_happytenant_units', 'hidden'=> [], 'visible' => [], 'guarded' => ['*'], 'slugs' => ['slug' => 'name'], 'dates' => ['deleted_at', 'created_at', 'updated_at'], 'appends' => [], 'fillable' => ['hp_id', 'migrated'], 'translatables' => [], 'upload_folder' => 'happytenant/unit', '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" => "hp_id", "type" => "text", "label" => 'happytenant::unit.label.hp_id', 'sort' => true, 'roles' => [], ], [ "key" => "migrated", "type" => "text", "label" => 'happytenant::unit.label.migrated', 'sort' => true, 'roles' => [], ], ], 'form' => [ [ "key" => 'hp_id', "element" => 'numeric', "type" => 'numeric', "label" => 'happytenant::unit.label.hp_id', "placeholder" => 'happytenant::unit.placeholder.hp_id', "rules" => '', "group" => "main", "section" => "first", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'migrated', "element" => 'numeric', "type" => 'numeric', "label" => 'happytenant::unit.label.migrated', "placeholder" => 'happytenant::unit.placeholder.migrated', "rules" => '', "group" => "main", "section" => "first", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], ], 'urls' => [ 'new' => [ 'url' => 'happytenant/unit/new', 'method' => 'GET', ], 'create' => [ 'url' => 'happytenant/unit/create', 'method' => 'GET', ], 'store' => [ 'url' => 'happytenant/unit', 'method' => 'POST', ], 'update' => [ 'url' => 'happytenant/unit', 'method' => 'PUT', ], 'list' => [ 'url' => 'happytenant/unit', 'method' => 'GET', ], 'delete' => [ 'url' => 'happytenant/unit', 'method' => 'DELETE', ], ], 'order' => [ 'created_at' => 'happytenant::unit.label.created_at', 'name' => 'happytenant::unit.label.name', 'status' => 'happytenant::unit.label.status', ], 'groups' => [ 'main' => [ 'icon' => "mdi:account-supervisor-outline", 'name' => "happytenant::unit.groups.main", 'key' => "main", 'title' => "happytenant::unit.groups.main", ], 'details' => [ 'icon' => "fe:home", 'name' => "happytenant::unit.groups.details", 'key' => "documents", 'title' => "happytenant::unit.groups.details", ], 'images' => [ 'icon' => "fe:home", 'name' => "happytenant::unit.groups.images", 'key' => "documents", 'title' => "happytenant::unit.groups.images", ], 'settings' => [ 'icon' => "fe:home", 'name' => "happytenant::unit.groups.settings", 'key' => "documents", 'title' => "happytenant::unit.groups.settings", ] ], 'controller' => [ 'provider' => 'Migrator', 'package' => 'Happytenant', 'module' => 'Unit', ], 'workflow' => [ 'type' => 'workflow', 'marking_store' => [ 'type' => 'multiple_state', 'arguments' => ['status'], // 'property' => 'status' ], 'supports' => [ \Migrator\Happytenant\Models\Unit::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' => [ 'count' => [ "element" => 'select', "type" => 'select', "label" => 'happytenant::unit.label.count', "placeholder" => 'happytenant::unit.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" => 'happytenant::unit.label.comment', "placeholder" => 'happytenant::unit.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' => 'happytenant::unit.action.copy', 'roles' => [ 'user' => ['superuser', 'admin'], 'team' => ['admin'], 'permission' => ['happytenant.unit.copy', 'happytenant.unit.duplicate'], ], 'form' => [ 'count' => [ "element" => 'select', "type" => 'select', "label" => 'happytenant::unit.label.count', "placeholder" => 'happytenant::unit.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" => 'happytenant::unit.label.comment', "placeholder" => 'happytenant::unit.placeholder.comment', "col" => "12", ], ], ], 'empty' => [ 'type' => ['List', 'Details'], 'label' => 'happytenant::unit.action.empty', 'roles' => [ 'user' => ['superuser'], ], ], ] ];