[ 'model' => \Bixo\Offplan\Models\Booking::class, 'table' => 'bixo_offplan_bookings', 'hidden'=> [], 'visible' => [], 'guarded' => ['*'], 'slugs' => ['slug' => 'name'], 'dates' => ['deleted_at', 'created_at', 'updated_at'], 'appends' => [], 'fillable' => ['unit_id', 'name', 'mobile', 'email', 'price', 'documents', 'status', 'approved_by', 'approved_at', 'rejected_by', 'rejected_at', 'rejected_reason', 'agent_id', 'created_by'], 'translatables' => [], 'upload_folder' => 'offplan/booking', '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" => "unit_id", "type" => "text", "label" => 'offplan::booking.label.unit_id', 'sort' => true, 'roles' => [], ], [ "key" => "name", "type" => "text", "label" => 'offplan::booking.label.name', 'sort' => true, 'roles' => [], ], [ "key" => "mobile", "type" => "text", "label" => 'offplan::booking.label.mobile', 'sort' => true, 'roles' => [], ], [ "key" => "email", "type" => "text", "label" => 'offplan::booking.label.email', 'sort' => true, 'roles' => [], ], [ "key" => "price", "type" => "text", "label" => 'offplan::booking.label.price', 'sort' => true, 'roles' => [], ], [ "key" => "documents", "type" => "text", "label" => 'offplan::booking.label.documents', 'sort' => true, 'roles' => [], ], [ "key" => "approved_by", "type" => "text", "label" => 'offplan::booking.label.approved_by', 'sort' => true, 'roles' => [], ], [ "key" => "approved_at", "type" => "text", "label" => 'offplan::booking.label.approved_at', 'sort' => true, 'roles' => [], ], [ "key" => "rejected_by", "type" => "text", "label" => 'offplan::booking.label.rejected_by', 'sort' => true, 'roles' => [], ], [ "key" => "rejected_at", "type" => "text", "label" => 'offplan::booking.label.rejected_at', 'sort' => true, 'roles' => [], ], [ "key" => "rejected_reason", "type" => "text", "label" => 'offplan::booking.label.rejected_reason', 'sort' => true, 'roles' => [], ], [ "key" => "agent_id", "type" => "text", "label" => 'offplan::booking.label.agent_id', 'sort' => true, 'roles' => [], ], [ "key" => "created_by", "type" => "text", "label" => 'offplan::booking.label.created_by', 'sort' => true, 'roles' => [], ], ], 'form' => [ [ "key" => 'unit_id', "element" => 'numeric', "type" => 'numeric', "label" => 'offplan::booking.label.unit_id', "placeholder" => 'offplan::booking.placeholder.unit_id', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'name', "element" => 'text', "type" => 'text', "label" => 'offplan::booking.label.name', "placeholder" => 'offplan::booking.placeholder.name', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'mobile', "element" => 'text', "type" => 'text', "label" => 'offplan::booking.label.mobile', "placeholder" => 'offplan::booking.placeholder.mobile', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'email', "element" => 'text', "type" => 'text', "label" => 'offplan::booking.label.email', "placeholder" => 'offplan::booking.placeholder.email', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'price', "element" => 'numeric', "type" => 'numeric', "label" => 'offplan::booking.label.price', "placeholder" => 'offplan::booking.placeholder.price', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'documents', "element" => 'text', "type" => 'text', "label" => 'offplan::booking.label.documents', "placeholder" => 'offplan::booking.placeholder.documents', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'approved_by', "element" => 'numeric', "type" => 'numeric', "label" => 'offplan::booking.label.approved_by', "placeholder" => 'offplan::booking.placeholder.approved_by', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'approved_at', "element" => 'date_time_picker', "type" => 'date_time_picker', "label" => 'offplan::booking.label.approved_at', "placeholder" => 'offplan::booking.placeholder.approved_at', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'rejected_by', "element" => 'numeric', "type" => 'numeric', "label" => 'offplan::booking.label.rejected_by', "placeholder" => 'offplan::booking.placeholder.rejected_by', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'rejected_at', "element" => 'date_time_picker', "type" => 'date_time_picker', "label" => 'offplan::booking.label.rejected_at', "placeholder" => 'offplan::booking.placeholder.rejected_at', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'rejected_reason', "element" => 'text', "type" => 'text', "label" => 'offplan::booking.label.rejected_reason', "placeholder" => 'offplan::booking.placeholder.rejected_reason', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'agent_id', "element" => 'numeric', "type" => 'numeric', "label" => 'offplan::booking.label.agent_id', "placeholder" => 'offplan::booking.placeholder.agent_id', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'created_by', "element" => 'numeric', "type" => 'numeric', "label" => 'offplan::booking.label.created_by', "placeholder" => 'offplan::booking.placeholder.created_by', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], ], 'urls' => [ 'new' => [ 'url' => 'offplan/booking/new', 'method' => 'GET', ], 'create' => [ 'url' => 'offplan/booking/create', 'method' => 'GET', ], 'store' => [ 'url' => 'offplan/booking', 'method' => 'POST', ], 'update' => [ 'url' => 'offplan/booking', 'method' => 'PUT', ], 'list' => [ 'url' => 'offplan/booking', 'method' => 'GET', ], 'delete' => [ 'url' => 'offplan/booking', 'method' => 'DELETE', ], ], 'order' => [ 'created_at' => 'offplan::booking.label.created_at', 'name' => 'offplan::booking.label.name', 'status' => 'offplan::booking.label.status', ], 'groups' => [ [ 'icon' => "mdi:account-supervisor-outline", 'name' => "offplan::booking.groups.main", 'group' => "main.main", 'title' => "offplan::booking.groups.main", ], [ 'icon' => "fe:home", 'name' => "offplan::booking.groups.details", 'group' => "main.details", 'title' => "offplan::booking.groups.details", ], 'images' => [ 'icon' => "fe:home", 'name' => "offplan::booking.groups.images", 'group' => "main.images", 'title' => "offplan::booking.groups.images", ], 'settings' => [ 'icon' => "fe:home", 'name' => "offplan::booking.groups.settings", 'group' => "main.settings", 'title' => "offplan::booking.groups.settings", ] ], 'controller' => [ 'provider' => 'Bixo', 'package' => 'Offplan', 'module' => 'Booking', ], 'workflow' => [ 'type' => 'workflow', 'marking_store' => [ 'type' => 'multiple_state', 'arguments' => ['status'], // 'property' => 'status' ], 'supports' => [ \Bixo\Offplan\Models\Booking::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' => 'offplan::booking.action.copy', 'roles' => [ 'user' => ['superuser', 'admin'], 'team' => ['admin'], 'permission' => ['offplan.booking.copy', 'offplan.booking.duplicate'], ], 'form' => [ 'count' => [ "element" => 'select', "type" => 'select', "label" => 'offplan::booking.label.count', "placeholder" => 'offplan::booking.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" => 'offplan::booking.label.comment', "placeholder" => 'offplan::booking.placeholder.comment', "col" => "12", ], ], ], 'empty' => [ 'type' => ['List', 'Details'], 'label' => 'offplan::booking.action.empty', 'roles' => [ 'user' => ['superuser'], ], ], 'section' => [ 'type' => ['Group'], 'api_url' => '', 'action' => 'list', 'label' => 'offplan::booking.action.section', 'store' => 'main.units', 'group' => 'main.units' ], ] ];