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