[ 'model' => \Bixo\Opportunity\Models\Offer::class, 'table' => 'bixo_opportunity_offers', 'hidden'=> [], 'visible' => [], 'guarded' => ['*'], 'slugs' => ['slug' => 'name'], 'dates' => ['deleted_at', 'created_at', 'updated_at'], 'appends' => [], 'fillable' => ['ref', 'opportunity_id', 'customer_by', 'property_by', 'property_id', 'viewing_id', 'status', 'priority', 'date_time', 'price', 'cheques', 'frequency', 'feedbacks', 'property_type', 'category_type', 'category', 'beds', 'region_id', 'location_id', 'sublocation_id', 'building_id', 'listing_price', 'baths', 'bua', 'furnished', 'view', 'parking', 'unit', 'notification', 'user_id', 'user_type'], 'translatables' => [], 'upload_folder' => 'opportunity/offer', '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" => "ref", "type" => "text", "label" => 'opportunity::offer.label.ref', 'sort' => true, 'roles' => [], ], [ "key" => "opportunity_id", "type" => "text", "label" => 'opportunity::offer.label.opportunity_id', 'sort' => true, 'roles' => [], ], [ "key" => "customer_by", "type" => "text", "label" => 'opportunity::offer.label.customer_by', 'sort' => true, 'roles' => [], ], [ "key" => "property_by", "type" => "text", "label" => 'opportunity::offer.label.property_by', 'sort' => true, 'roles' => [], ], [ "key" => "property_id", "type" => "text", "label" => 'opportunity::offer.label.property_id', 'sort' => true, 'roles' => [], ], [ "key" => "viewing_id", "type" => "text", "label" => 'opportunity::offer.label.viewing_id', 'sort' => true, 'roles' => [], ], [ "key" => "priority", "type" => "text", "label" => 'opportunity::offer.label.priority', 'sort' => true, 'roles' => [], ], [ "key" => "date_time", "type" => "text", "label" => 'opportunity::offer.label.date_time', 'sort' => true, 'roles' => [], ], [ "key" => "price", "type" => "text", "label" => 'opportunity::offer.label.price', 'sort' => true, 'roles' => [], ], [ "key" => "cheques", "type" => "text", "label" => 'opportunity::offer.label.cheques', 'sort' => true, 'roles' => [], ], [ "key" => "frequency", "type" => "text", "label" => 'opportunity::offer.label.frequency', 'sort' => true, 'roles' => [], ], [ "key" => "feedbacks", "type" => "text", "label" => 'opportunity::offer.label.feedbacks', 'sort' => true, 'roles' => [], ], [ "key" => "property_type", "type" => "text", "label" => 'opportunity::offer.label.property_type', 'sort' => true, 'roles' => [], ], [ "key" => "category_type", "type" => "text", "label" => 'opportunity::offer.label.category_type', 'sort' => true, 'roles' => [], ], [ "key" => "category", "type" => "text", "label" => 'opportunity::offer.label.category', 'sort' => true, 'roles' => [], ], [ "key" => "beds", "type" => "text", "label" => 'opportunity::offer.label.beds', 'sort' => true, 'roles' => [], ], [ "key" => "region_id", "type" => "text", "label" => 'opportunity::offer.label.region_id', 'sort' => true, 'roles' => [], ], [ "key" => "location_id", "type" => "text", "label" => 'opportunity::offer.label.location_id', 'sort' => true, 'roles' => [], ], [ "key" => "sublocation_id", "type" => "text", "label" => 'opportunity::offer.label.sublocation_id', 'sort' => true, 'roles' => [], ], [ "key" => "building_id", "type" => "text", "label" => 'opportunity::offer.label.building_id', 'sort' => true, 'roles' => [], ], [ "key" => "listing_price", "type" => "text", "label" => 'opportunity::offer.label.listing_price', 'sort' => true, 'roles' => [], ], [ "key" => "baths", "type" => "text", "label" => 'opportunity::offer.label.baths', 'sort' => true, 'roles' => [], ], [ "key" => "bua", "type" => "text", "label" => 'opportunity::offer.label.bua', 'sort' => true, 'roles' => [], ], [ "key" => "furnished", "type" => "text", "label" => 'opportunity::offer.label.furnished', 'sort' => true, 'roles' => [], ], [ "key" => "view", "type" => "text", "label" => 'opportunity::offer.label.view', 'sort' => true, 'roles' => [], ], [ "key" => "parking", "type" => "text", "label" => 'opportunity::offer.label.parking', 'sort' => true, 'roles' => [], ], [ "key" => "unit", "type" => "text", "label" => 'opportunity::offer.label.unit', 'sort' => true, 'roles' => [], ], [ "key" => "notification", "type" => "text", "label" => 'opportunity::offer.label.notification', 'sort' => true, 'roles' => [], ], ], 'form' => [ [ "key" => 'ref', "element" => 'text', "type" => 'text', "label" => 'opportunity::offer.label.ref', "placeholder" => 'opportunity::offer.placeholder.ref', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'opportunity_id', "element" => 'numeric', "type" => 'numeric', "label" => 'opportunity::offer.label.opportunity_id', "placeholder" => 'opportunity::offer.placeholder.opportunity_id', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'customer_by', "element" => 'numeric', "type" => 'numeric', "label" => 'opportunity::offer.label.customer_by', "placeholder" => 'opportunity::offer.placeholder.customer_by', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'property_by', "element" => 'numeric', "type" => 'numeric', "label" => 'opportunity::offer.label.property_by', "placeholder" => 'opportunity::offer.placeholder.property_by', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'property_id', "element" => 'numeric', "type" => 'numeric', "label" => 'opportunity::offer.label.property_id', "placeholder" => 'opportunity::offer.placeholder.property_id', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'viewing_id', "element" => 'numeric', "type" => 'numeric', "label" => 'opportunity::offer.label.viewing_id', "placeholder" => 'opportunity::offer.placeholder.viewing_id', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'priority', "element" => 'text', "type" => 'text', "label" => 'opportunity::offer.label.priority', "placeholder" => 'opportunity::offer.placeholder.priority', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'date_time', "element" => 'date_time_picker', "type" => 'date_time_picker', "label" => 'opportunity::offer.label.date_time', "placeholder" => 'opportunity::offer.placeholder.date_time', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'price', "element" => 'decimal', "type" => 'decimal', "label" => 'opportunity::offer.label.price', "placeholder" => 'opportunity::offer.placeholder.price', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'cheques', "element" => 'numeric', "type" => 'numeric', "label" => 'opportunity::offer.label.cheques', "placeholder" => 'opportunity::offer.placeholder.cheques', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'frequency', "element" => 'text', "type" => 'text', "label" => 'opportunity::offer.label.frequency', "placeholder" => 'opportunity::offer.placeholder.frequency', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'feedbacks', "element" => 'text', "type" => 'text', "label" => 'opportunity::offer.label.feedbacks', "placeholder" => 'opportunity::offer.placeholder.feedbacks', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'property_type', "element" => 'radios', "type" => 'radios', "label" => 'opportunity::offer.label.property_type', "placeholder" => 'opportunity::offer.placeholder.property_type', "rules" => '', "options" => function(){ return trans('opportunity::offer.options.property_type'); }, "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'category_type', "element" => 'radios', "type" => 'radios', "label" => 'opportunity::offer.label.category_type', "placeholder" => 'opportunity::offer.placeholder.category_type', "rules" => '', "options" => function(){ return trans('opportunity::offer.options.category_type'); }, "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'category', "element" => 'text', "type" => 'text', "label" => 'opportunity::offer.label.category', "placeholder" => 'opportunity::offer.placeholder.category', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'beds', "element" => 'text', "type" => 'text', "label" => 'opportunity::offer.label.beds', "placeholder" => 'opportunity::offer.placeholder.beds', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'region_id', "element" => 'numeric', "type" => 'numeric', "label" => 'opportunity::offer.label.region_id', "placeholder" => 'opportunity::offer.placeholder.region_id', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'location_id', "element" => 'numeric', "type" => 'numeric', "label" => 'opportunity::offer.label.location_id', "placeholder" => 'opportunity::offer.placeholder.location_id', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'sublocation_id', "element" => 'numeric', "type" => 'numeric', "label" => 'opportunity::offer.label.sublocation_id', "placeholder" => 'opportunity::offer.placeholder.sublocation_id', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'building_id', "element" => 'numeric', "type" => 'numeric', "label" => 'opportunity::offer.label.building_id', "placeholder" => 'opportunity::offer.placeholder.building_id', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'listing_price', "element" => 'numeric', "type" => 'numeric', "label" => 'opportunity::offer.label.listing_price', "placeholder" => 'opportunity::offer.placeholder.listing_price', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'baths', "element" => 'text', "type" => 'text', "label" => 'opportunity::offer.label.baths', "placeholder" => 'opportunity::offer.placeholder.baths', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'bua', "element" => 'numeric', "type" => 'numeric', "label" => 'opportunity::offer.label.bua', "placeholder" => 'opportunity::offer.placeholder.bua', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'furnished', "element" => 'text', "type" => 'text', "label" => 'opportunity::offer.label.furnished', "placeholder" => 'opportunity::offer.placeholder.furnished', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'view', "element" => 'text', "type" => 'text', "label" => 'opportunity::offer.label.view', "placeholder" => 'opportunity::offer.placeholder.view', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'parking', "element" => 'numeric', "type" => 'numeric', "label" => 'opportunity::offer.label.parking', "placeholder" => 'opportunity::offer.placeholder.parking', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'unit', "element" => 'text', "type" => 'text', "label" => 'opportunity::offer.label.unit', "placeholder" => 'opportunity::offer.placeholder.unit', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'notification', "element" => 'numeric', "type" => 'numeric', "label" => 'opportunity::offer.label.notification', "placeholder" => 'opportunity::offer.placeholder.notification', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], ], 'urls' => [ 'new' => [ 'url' => 'opportunity/offer/new', 'method' => 'GET', ], 'create' => [ 'url' => 'opportunity/offer/create', 'method' => 'GET', ], 'store' => [ 'url' => 'opportunity/offer', 'method' => 'POST', ], 'update' => [ 'url' => 'opportunity/offer', 'method' => 'PUT', ], 'list' => [ 'url' => 'opportunity/offer', 'method' => 'GET', ], 'delete' => [ 'url' => 'opportunity/offer', 'method' => 'DELETE', ], ], 'order' => [ 'created_at' => 'opportunity::offer.label.created_at', 'name' => 'opportunity::offer.label.name', 'status' => 'opportunity::offer.label.status', ], 'groups' => [ [ 'icon' => "mdi:account-supervisor-outline", 'name' => "opportunity::offer.groups.main", 'group' => "main.main", 'title' => "opportunity::offer.groups.main", ], [ 'icon' => "fe:home", 'name' => "opportunity::offer.groups.details", 'group' => "main.details", 'title' => "opportunity::offer.groups.details", ], 'images' => [ 'icon' => "fe:home", 'name' => "opportunity::offer.groups.images", 'group' => "main.images", 'title' => "opportunity::offer.groups.images", ], 'settings' => [ 'icon' => "fe:home", 'name' => "opportunity::offer.groups.settings", 'group' => "main.settings", 'title' => "opportunity::offer.groups.settings", ] ], 'controller' => [ 'provider' => 'Bixo', 'package' => 'Opportunity', 'module' => 'Offer', ], 'workflow' => [ 'type' => 'workflow', 'marking_store' => [ 'type' => 'multiple_state', 'arguments' => ['status'], // 'property' => 'status' ], 'supports' => [ \Bixo\Opportunity\Models\Offer::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' => 'opportunity::offer.action.copy', 'roles' => [ 'user' => ['superuser', 'admin'], 'team' => ['admin'], 'permission' => ['opportunity.offer.copy', 'opportunity.offer.duplicate'], ], 'form' => [ 'count' => [ "element" => 'select', "type" => 'select', "label" => 'opportunity::offer.label.count', "placeholder" => 'opportunity::offer.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" => 'opportunity::offer.label.comment', "placeholder" => 'opportunity::offer.placeholder.comment', "col" => "12", ], ], ], 'empty' => [ 'type' => ['List', 'Details'], 'label' => 'opportunity::offer.action.empty', 'roles' => [ 'user' => ['superuser'], ], ], 'section' => [ 'type' => ['Group'], 'api_url' => '', 'action' => 'list', 'label' => 'opportunity::offer.action.section', 'store' => 'main.units', 'group' => 'main.units' ], ] ];