[ 'model' => \Bixo\Account\Models\Coa::class, 'table' => 'bixo_account_coas', 'hidden'=> [], 'visible' => [], 'guarded' => ['*'], 'slugs' => ['slug' => 'name'], 'dates' => ['deleted_at', 'created_at', 'updated_at'], 'appends' => [], 'fillable' => ['parent_id', 'nest_left', 'nest_right', 'nest_depth', 'company_id', 'branch_id', 'is_group', 'type', 'code', 'name', 'description', 'remarks', 'debit', 'credit', 'balance', 'debit_or_credit', 'icon', 'color', 'status', 'user_id', 'user_type'], 'translatables' => [], 'upload_folder' => 'account/coa', '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" => "parent_id", "type" => "text", "label" => 'account::coa.label.parent_id', 'sort' => true, 'roles' => [], ], [ "key" => "nest_left", "type" => "text", "label" => 'account::coa.label.nest_left', 'sort' => true, 'roles' => [], ], [ "key" => "nest_right", "type" => "text", "label" => 'account::coa.label.nest_right', 'sort' => true, 'roles' => [], ], [ "key" => "nest_depth", "type" => "text", "label" => 'account::coa.label.nest_depth', 'sort' => true, 'roles' => [], ], [ "key" => "company_id", "type" => "text", "label" => 'account::coa.label.company_id', 'sort' => true, 'roles' => [], ], [ "key" => "branch_id", "type" => "text", "label" => 'account::coa.label.branch_id', 'sort' => true, 'roles' => [], ], [ "key" => "is_group", "type" => "text", "label" => 'account::coa.label.is_group', 'sort' => true, 'roles' => [], ], [ "key" => "type", "type" => "text", "label" => 'account::coa.label.type', 'sort' => true, 'roles' => [], ], [ "key" => "code", "type" => "text", "label" => 'account::coa.label.code', 'sort' => true, 'roles' => [], ], [ "key" => "name", "type" => "text", "label" => 'account::coa.label.name', 'sort' => true, 'roles' => [], ], [ "key" => "description", "type" => "text", "label" => 'account::coa.label.description', 'sort' => true, 'roles' => [], ], [ "key" => "remarks", "type" => "text", "label" => 'account::coa.label.remarks', 'sort' => true, 'roles' => [], ], [ "key" => "debit", "type" => "text", "label" => 'account::coa.label.debit', 'sort' => true, 'roles' => [], ], [ "key" => "credit", "type" => "text", "label" => 'account::coa.label.credit', 'sort' => true, 'roles' => [], ], [ "key" => "balance", "type" => "text", "label" => 'account::coa.label.balance', 'sort' => true, 'roles' => [], ], [ "key" => "debit_or_credit", "type" => "text", "label" => 'account::coa.label.debit_or_credit', 'sort' => true, 'roles' => [], ], [ "key" => "icon", "type" => "text", "label" => 'account::coa.label.icon', 'sort' => true, 'roles' => [], ], [ "key" => "color", "type" => "text", "label" => 'account::coa.label.color', 'sort' => true, 'roles' => [], ], ], 'form' => [ [ "key" => 'parent_id', "element" => 'numeric', "type" => 'numeric', "label" => 'account::coa.label.parent_id', "placeholder" => 'account::coa.placeholder.parent_id', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'nest_left', "element" => 'numeric', "type" => 'numeric', "label" => 'account::coa.label.nest_left', "placeholder" => 'account::coa.placeholder.nest_left', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'nest_right', "element" => 'numeric', "type" => 'numeric', "label" => 'account::coa.label.nest_right', "placeholder" => 'account::coa.placeholder.nest_right', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'nest_depth', "element" => 'numeric', "type" => 'numeric', "label" => 'account::coa.label.nest_depth', "placeholder" => 'account::coa.placeholder.nest_depth', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'company_id', "element" => 'numeric', "type" => 'numeric', "label" => 'account::coa.label.company_id', "placeholder" => 'account::coa.placeholder.company_id', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'branch_id', "element" => 'numeric', "type" => 'numeric', "label" => 'account::coa.label.branch_id', "placeholder" => 'account::coa.placeholder.branch_id', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'is_group', "element" => 'radios', "type" => 'radios', "label" => 'account::coa.label.is_group', "placeholder" => 'account::coa.placeholder.is_group', "rules" => '', "options" => function(){ return trans('account::coa.options.is_group'); }, "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'type', "element" => 'radios', "type" => 'radios', "label" => 'account::coa.label.type', "placeholder" => 'account::coa.placeholder.type', "rules" => '', "options" => function(){ return trans('account::coa.options.type'); }, "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'code', "element" => 'text', "type" => 'text', "label" => 'account::coa.label.code', "placeholder" => 'account::coa.placeholder.code', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'name', "element" => 'text', "type" => 'text', "label" => 'account::coa.label.name', "placeholder" => 'account::coa.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::coa.label.description', "placeholder" => 'account::coa.placeholder.description', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'remarks', "element" => 'text', "type" => 'text', "label" => 'account::coa.label.remarks', "placeholder" => 'account::coa.placeholder.remarks', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'debit', "element" => 'decimal', "type" => 'decimal', "label" => 'account::coa.label.debit', "placeholder" => 'account::coa.placeholder.debit', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'credit', "element" => 'decimal', "type" => 'decimal', "label" => 'account::coa.label.credit', "placeholder" => 'account::coa.placeholder.credit', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'balance', "element" => 'decimal', "type" => 'decimal', "label" => 'account::coa.label.balance', "placeholder" => 'account::coa.placeholder.balance', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'debit_or_credit', "element" => 'radios', "type" => 'radios', "label" => 'account::coa.label.debit_or_credit', "placeholder" => 'account::coa.placeholder.debit_or_credit', "rules" => '', "options" => function(){ return trans('account::coa.options.debit_or_credit'); }, "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'icon', "element" => 'text', "type" => 'text', "label" => 'account::coa.label.icon', "placeholder" => 'account::coa.placeholder.icon', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'color', "element" => 'text', "type" => 'text', "label" => 'account::coa.label.color', "placeholder" => 'account::coa.placeholder.color', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], ], 'urls' => [ 'new' => [ 'url' => 'account/coa/new', 'method' => 'GET', ], 'create' => [ 'url' => 'account/coa/create', 'method' => 'GET', ], 'store' => [ 'url' => 'account/coa', 'method' => 'POST', ], 'update' => [ 'url' => 'account/coa', 'method' => 'PUT', ], 'list' => [ 'url' => 'account/coa', 'method' => 'GET', ], 'delete' => [ 'url' => 'account/coa', 'method' => 'DELETE', ], ], 'order' => [ 'created_at' => 'account::coa.label.created_at', 'name' => 'account::coa.label.name', 'status' => 'account::coa.label.status', ], 'groups' => [ [ 'icon' => "mdi:account-supervisor-outline", 'name' => "account::coa.groups.main", 'group' => "main.main", 'title' => "account::coa.groups.main", ], [ 'icon' => "fe:home", 'name' => "account::coa.groups.details", 'group' => "main.details", 'title' => "account::coa.groups.details", ], 'images' => [ 'icon' => "fe:home", 'name' => "account::coa.groups.images", 'group' => "main.images", 'title' => "account::coa.groups.images", ], 'settings' => [ 'icon' => "fe:home", 'name' => "account::coa.groups.settings", 'group' => "main.settings", 'title' => "account::coa.groups.settings", ] ], 'controller' => [ 'provider' => 'Bixo', 'package' => 'Account', 'module' => 'Coa', ], 'workflow' => [ 'type' => 'workflow', 'marking_store' => [ 'type' => 'multiple_state', 'arguments' => ['status'], // 'property' => 'status' ], 'supports' => [ \Bixo\Account\Models\Coa::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::coa.action.copy', 'roles' => [ 'user' => ['superuser', 'admin'], 'team' => ['admin'], 'permission' => ['account.coa.copy', 'account.coa.duplicate'], ], 'form' => [ 'count' => [ "element" => 'select', "type" => 'select', "label" => 'account::coa.label.count', "placeholder" => 'account::coa.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::coa.label.comment', "placeholder" => 'account::coa.placeholder.comment', "col" => "12", ], ], ], 'empty' => [ 'type' => ['List', 'Details'], 'label' => 'account::coa.action.empty', 'roles' => [ 'user' => ['superuser'], ], ], 'section' => [ 'type' => ['Group'], 'api_url' => '', 'action' => 'list', 'label' => 'account::coa.action.section', 'store' => 'main.units', 'group' => 'main.units' ], ] ];