[ 'model' => \Litecms\Leasing\Models\Lease::class, 'table' => 'litecms_leasing_leases', 'hidden'=> [], 'visible' => [], 'guarded' => ['*'], 'slugs' => ['slug' => 'name'], 'dates' => ['deleted_at', 'created_at', 'updated_at'], 'appends' => [], 'fillable' => ['agency_amount', 'ref', 'user_id', 'status', 'unit_id', 'reservation_type', 'start_date', 'end_date', 'leasing_type', 'period_stay', 'renewable', 'rent_year', 'contract_rent', 'renewal_fee', 'security_deposite', 'agency_fee', 'agency_fee_percent', 'payment_type', 'observations', 'notes', 'documents', 'contract_signed', 'contract_date', 'contract_issued_by', 'premises', 'payment_external_agency', 'ext_agency_name', 'commision', 'details', 'print_contract_on', 'vacating_date', 'mngmt_amt', 'mngmt_perc', 'tenant_id'], 'translatables' => [], 'upload_folder' => 'leasing/lease', '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" => "agency_amount", "type" => "text", "label" => 'leasing::lease.label.agency_amount', 'sort' => true, 'roles' => [], ], [ "key" => "ref", "type" => "text", "label" => 'leasing::lease.label.ref', 'sort' => true, 'roles' => [], ], [ "key" => "unit_id", "type" => "text", "label" => 'leasing::lease.label.unit_id', 'sort' => true, 'roles' => [], ], [ "key" => "reservation_type", "type" => "text", "label" => 'leasing::lease.label.reservation_type', 'sort' => true, 'roles' => [], ], [ "key" => "start_date", "type" => "text", "label" => 'leasing::lease.label.start_date', 'sort' => true, 'roles' => [], ], [ "key" => "end_date", "type" => "text", "label" => 'leasing::lease.label.end_date', 'sort' => true, 'roles' => [], ], [ "key" => "leasing_type", "type" => "text", "label" => 'leasing::lease.label.leasing_type', 'sort' => true, 'roles' => [], ], [ "key" => "period_stay", "type" => "text", "label" => 'leasing::lease.label.period_stay', 'sort' => true, 'roles' => [], ], [ "key" => "renewable", "type" => "text", "label" => 'leasing::lease.label.renewable', 'sort' => true, 'roles' => [], ], [ "key" => "rent_year", "type" => "text", "label" => 'leasing::lease.label.rent_year', 'sort' => true, 'roles' => [], ], [ "key" => "contract_rent", "type" => "text", "label" => 'leasing::lease.label.contract_rent', 'sort' => true, 'roles' => [], ], [ "key" => "renewal_fee", "type" => "text", "label" => 'leasing::lease.label.renewal_fee', 'sort' => true, 'roles' => [], ], [ "key" => "security_deposite", "type" => "text", "label" => 'leasing::lease.label.security_deposite', 'sort' => true, 'roles' => [], ], [ "key" => "agency_fee", "type" => "text", "label" => 'leasing::lease.label.agency_fee', 'sort' => true, 'roles' => [], ], [ "key" => "agency_fee_percent", "type" => "text", "label" => 'leasing::lease.label.agency_fee_percent', 'sort' => true, 'roles' => [], ], [ "key" => "payment_type", "type" => "text", "label" => 'leasing::lease.label.payment_type', 'sort' => true, 'roles' => [], ], [ "key" => "observations", "type" => "text", "label" => 'leasing::lease.label.observations', 'sort' => true, 'roles' => [], ], [ "key" => "contract_signed", "type" => "text", "label" => 'leasing::lease.label.contract_signed', 'sort' => true, 'roles' => [], ], [ "key" => "contract_date", "type" => "text", "label" => 'leasing::lease.label.contract_date', 'sort' => true, 'roles' => [], ], [ "key" => "contract_issued_by", "type" => "text", "label" => 'leasing::lease.label.contract_issued_by', 'sort' => true, 'roles' => [], ], [ "key" => "premises", "type" => "text", "label" => 'leasing::lease.label.premises', 'sort' => true, 'roles' => [], ], [ "key" => "payment_external_agency", "type" => "text", "label" => 'leasing::lease.label.payment_external_agency', 'sort' => true, 'roles' => [], ], [ "key" => "ext_agency_name", "type" => "text", "label" => 'leasing::lease.label.ext_agency_name', 'sort' => true, 'roles' => [], ], [ "key" => "commision", "type" => "text", "label" => 'leasing::lease.label.commision', 'sort' => true, 'roles' => [], ], [ "key" => "details", "type" => "text", "label" => 'leasing::lease.label.details', 'sort' => true, 'roles' => [], ], [ "key" => "print_contract_on", "type" => "text", "label" => 'leasing::lease.label.print_contract_on', 'sort' => true, 'roles' => [], ], [ "key" => "vacating_date", "type" => "text", "label" => 'leasing::lease.label.vacating_date', 'sort' => true, 'roles' => [], ], [ "key" => "mngmt_amt", "type" => "text", "label" => 'leasing::lease.label.mngmt_amt', 'sort' => true, 'roles' => [], ], [ "key" => "mngmt_perc", "type" => "text", "label" => 'leasing::lease.label.mngmt_perc', 'sort' => true, 'roles' => [], ], [ "key" => "tenant_id", "type" => "text", "label" => 'leasing::lease.label.tenant_id', 'sort' => true, 'roles' => [], ], ], 'form' => [ [ "key" => 'agency_amount', "element" => 'decimal', "type" => 'decimal', "label" => 'leasing::lease.label.agency_amount', "placeholder" => 'leasing::lease.placeholder.agency_amount', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'ref', "element" => 'text', "type" => 'text', "label" => 'leasing::lease.label.ref', "placeholder" => 'leasing::lease.placeholder.ref', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'unit_id', "element" => 'numeric', "type" => 'numeric', "label" => 'leasing::lease.label.unit_id', "placeholder" => 'leasing::lease.placeholder.unit_id', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'reservation_type', "element" => 'text', "type" => 'text', "label" => 'leasing::lease.label.reservation_type', "placeholder" => 'leasing::lease.placeholder.reservation_type', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'start_date', "element" => 'date_picker', "type" => 'date_picker', "label" => 'leasing::lease.label.start_date', "placeholder" => 'leasing::lease.placeholder.start_date', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'end_date', "element" => 'date_picker', "type" => 'date_picker', "label" => 'leasing::lease.label.end_date', "placeholder" => 'leasing::lease.placeholder.end_date', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'leasing_type', "element" => 'radios', "type" => 'radios', "label" => 'leasing::lease.label.leasing_type', "placeholder" => 'leasing::lease.placeholder.leasing_type', "rules" => '', "options" => function(){ return trans('leasing::lease.options.leasing_type'); }, "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'period_stay', "element" => 'radios', "type" => 'radios', "label" => 'leasing::lease.label.period_stay', "placeholder" => 'leasing::lease.placeholder.period_stay', "rules" => '', "options" => function(){ return trans('leasing::lease.options.period_stay'); }, "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'renewable', "element" => 'radios', "type" => 'radios', "label" => 'leasing::lease.label.renewable', "placeholder" => 'leasing::lease.placeholder.renewable', "rules" => '', "options" => function(){ return trans('leasing::lease.options.renewable'); }, "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'rent_year', "element" => 'decimal', "type" => 'decimal', "label" => 'leasing::lease.label.rent_year', "placeholder" => 'leasing::lease.placeholder.rent_year', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'contract_rent', "element" => 'decimal', "type" => 'decimal', "label" => 'leasing::lease.label.contract_rent', "placeholder" => 'leasing::lease.placeholder.contract_rent', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'renewal_fee', "element" => 'decimal', "type" => 'decimal', "label" => 'leasing::lease.label.renewal_fee', "placeholder" => 'leasing::lease.placeholder.renewal_fee', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'security_deposite', "element" => 'decimal', "type" => 'decimal', "label" => 'leasing::lease.label.security_deposite', "placeholder" => 'leasing::lease.placeholder.security_deposite', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'agency_fee', "element" => 'decimal', "type" => 'decimal', "label" => 'leasing::lease.label.agency_fee', "placeholder" => 'leasing::lease.placeholder.agency_fee', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'agency_fee_percent', "element" => 'decimal', "type" => 'decimal', "label" => 'leasing::lease.label.agency_fee_percent', "placeholder" => 'leasing::lease.placeholder.agency_fee_percent', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'payment_type', "element" => 'text', "type" => 'text', "label" => 'leasing::lease.label.payment_type', "placeholder" => 'leasing::lease.placeholder.payment_type', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'observations', "element" => 'text', "type" => 'text', "label" => 'leasing::lease.label.observations', "placeholder" => 'leasing::lease.placeholder.observations', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'notes', "element" => 'html_editor', "type" => 'html_editor', "label" => 'leasing::lease.label.notes', "placeholder" => 'leasing::lease.placeholder.notes', "rules" => '', "group" => "main.main", "col" => "12", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'documents', "element" => 'html_editor', "type" => 'html_editor', "label" => 'leasing::lease.label.documents', "placeholder" => 'leasing::lease.placeholder.documents', "rules" => '', "group" => "main.main", "col" => "12", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'contract_signed', "element" => 'radios', "type" => 'radios', "label" => 'leasing::lease.label.contract_signed', "placeholder" => 'leasing::lease.placeholder.contract_signed', "rules" => '', "options" => function(){ return trans('leasing::lease.options.contract_signed'); }, "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'contract_date', "element" => 'date_picker', "type" => 'date_picker', "label" => 'leasing::lease.label.contract_date', "placeholder" => 'leasing::lease.placeholder.contract_date', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'contract_issued_by', "element" => 'text', "type" => 'text', "label" => 'leasing::lease.label.contract_issued_by', "placeholder" => 'leasing::lease.placeholder.contract_issued_by', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'premises', "element" => 'text', "type" => 'text', "label" => 'leasing::lease.label.premises', "placeholder" => 'leasing::lease.placeholder.premises', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'payment_external_agency', "element" => 'radios', "type" => 'radios', "label" => 'leasing::lease.label.payment_external_agency', "placeholder" => 'leasing::lease.placeholder.payment_external_agency', "rules" => '', "options" => function(){ return trans('leasing::lease.options.payment_external_agency'); }, "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'ext_agency_name', "element" => 'text', "type" => 'text', "label" => 'leasing::lease.label.ext_agency_name', "placeholder" => 'leasing::lease.placeholder.ext_agency_name', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'commision', "element" => 'numeric', "type" => 'numeric', "label" => 'leasing::lease.label.commision', "placeholder" => 'leasing::lease.placeholder.commision', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'details', "element" => 'text', "type" => 'text', "label" => 'leasing::lease.label.details', "placeholder" => 'leasing::lease.placeholder.details', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'print_contract_on', "element" => 'radios', "type" => 'radios', "label" => 'leasing::lease.label.print_contract_on', "placeholder" => 'leasing::lease.placeholder.print_contract_on', "rules" => '', "options" => function(){ return trans('leasing::lease.options.print_contract_on'); }, "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'vacating_date', "element" => 'date_picker', "type" => 'date_picker', "label" => 'leasing::lease.label.vacating_date', "placeholder" => 'leasing::lease.placeholder.vacating_date', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'mngmt_amt', "element" => 'decimal', "type" => 'decimal', "label" => 'leasing::lease.label.mngmt_amt', "placeholder" => 'leasing::lease.placeholder.mngmt_amt', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'mngmt_perc', "element" => 'decimal', "type" => 'decimal', "label" => 'leasing::lease.label.mngmt_perc', "placeholder" => 'leasing::lease.placeholder.mngmt_perc', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'tenant_id', "element" => 'numeric', "type" => 'numeric', "label" => 'leasing::lease.label.tenant_id', "placeholder" => 'leasing::lease.placeholder.tenant_id', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], ], 'urls' => [ 'new' => [ 'url' => 'leasing/lease/new', 'method' => 'GET', ], 'create' => [ 'url' => 'leasing/lease/create', 'method' => 'GET', ], 'store' => [ 'url' => 'leasing/lease', 'method' => 'POST', ], 'update' => [ 'url' => 'leasing/lease', 'method' => 'PUT', ], 'list' => [ 'url' => 'leasing/lease', 'method' => 'GET', ], 'delete' => [ 'url' => 'leasing/lease', 'method' => 'DELETE', ], ], 'order' => [ 'created_at' => 'leasing::lease.label.created_at', 'name' => 'leasing::lease.label.name', 'status' => 'leasing::lease.label.status', ], 'groups' => [ [ 'icon' => "mdi:account-supervisor-outline", 'name' => "leasing::lease.groups.main", 'group' => "main.main", 'title' => "leasing::lease.groups.main", ], [ 'icon' => "fe:home", 'name' => "leasing::lease.groups.details", 'group' => "main.details", 'title' => "leasing::lease.groups.details", ], 'images' => [ 'icon' => "fe:home", 'name' => "leasing::lease.groups.images", 'group' => "main.images", 'title' => "leasing::lease.groups.images", ], 'settings' => [ 'icon' => "fe:home", 'name' => "leasing::lease.groups.settings", 'group' => "main.settings", 'title' => "leasing::lease.groups.settings", ] ], 'controller' => [ 'provider' => 'Litecms', 'package' => 'Leasing', 'module' => 'Lease', ], 'workflow' => [ 'type' => 'workflow', 'marking_store' => [ 'type' => 'multiple_state', 'arguments' => ['status'], // 'property' => 'status' ], 'supports' => [ \Litecms\Leasing\Models\Lease::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' => 'leasing::lease.action.copy', 'roles' => [ 'user' => ['superuser', 'admin'], 'team' => ['admin'], 'permission' => ['leasing.lease.copy', 'leasing.lease.duplicate'], ], 'form' => [ 'count' => [ "element" => 'select', "type" => 'select', "label" => 'leasing::lease.label.count', "placeholder" => 'leasing::lease.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" => 'leasing::lease.label.comment', "placeholder" => 'leasing::lease.placeholder.comment', "col" => "12", ], ], ], 'empty' => [ 'type' => ['List', 'Details'], 'label' => 'leasing::lease.action.empty', 'roles' => [ 'user' => ['superuser'], ], ], 'section' => [ 'type' => ['Group'], 'api_url' => '', 'action' => 'list', 'label' => 'leasing::lease.action.section', 'store' => 'main.units', 'group' => 'main.units' ], ] ];