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