[ 'model' => \Bixo\Employee\Models\Attendance::class, 'table' => 'bixo_employee_attendances', 'hidden'=> [], 'visible' => [], 'guarded' => ['*'], 'slugs' => ['slug' => 'name'], 'dates' => ['deleted_at', 'created_at', 'updated_at'], 'appends' => [], 'fillable' => ['related_id', 'employee_id', 'request_id', 'handover_id', 'date', 'date_start', 'date_end', 'half_day', 'type', 'type_old', 'period', 'paid', 'unpaid', 'time_in', 'time_out', 'description', 'import', 'return_to', 'user_id', 'user_type'], 'translatables' => [], 'upload_folder' => 'employee/attendance', '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" => "related_id", "type" => "text", "label" => 'employee::attendance.label.related_id', 'sort' => true, 'roles' => [], ], [ "key" => "employee_id", "type" => "text", "label" => 'employee::attendance.label.employee_id', 'sort' => true, 'roles' => [], ], [ "key" => "request_id", "type" => "text", "label" => 'employee::attendance.label.request_id', 'sort' => true, 'roles' => [], ], [ "key" => "handover_id", "type" => "text", "label" => 'employee::attendance.label.handover_id', 'sort' => true, 'roles' => [], ], [ "key" => "date", "type" => "text", "label" => 'employee::attendance.label.date', 'sort' => true, 'roles' => [], ], [ "key" => "date_start", "type" => "text", "label" => 'employee::attendance.label.date_start', 'sort' => true, 'roles' => [], ], [ "key" => "date_end", "type" => "text", "label" => 'employee::attendance.label.date_end', 'sort' => true, 'roles' => [], ], [ "key" => "half_day", "type" => "text", "label" => 'employee::attendance.label.half_day', 'sort' => true, 'roles' => [], ], [ "key" => "type", "type" => "text", "label" => 'employee::attendance.label.type', 'sort' => true, 'roles' => [], ], [ "key" => "type_old", "type" => "text", "label" => 'employee::attendance.label.type_old', 'sort' => true, 'roles' => [], ], [ "key" => "period", "type" => "text", "label" => 'employee::attendance.label.period', 'sort' => true, 'roles' => [], ], [ "key" => "paid", "type" => "text", "label" => 'employee::attendance.label.paid', 'sort' => true, 'roles' => [], ], [ "key" => "unpaid", "type" => "text", "label" => 'employee::attendance.label.unpaid', 'sort' => true, 'roles' => [], ], [ "key" => "time_in", "type" => "text", "label" => 'employee::attendance.label.time_in', 'sort' => true, 'roles' => [], ], [ "key" => "time_out", "type" => "text", "label" => 'employee::attendance.label.time_out', 'sort' => true, 'roles' => [], ], [ "key" => "description", "type" => "text", "label" => 'employee::attendance.label.description', 'sort' => true, 'roles' => [], ], [ "key" => "import", "type" => "text", "label" => 'employee::attendance.label.import', 'sort' => true, 'roles' => [], ], [ "key" => "return_to", "type" => "text", "label" => 'employee::attendance.label.return_to', 'sort' => true, 'roles' => [], ], ], 'form' => [ [ "key" => 'related_id', "element" => 'numeric', "type" => 'numeric', "label" => 'employee::attendance.label.related_id', "placeholder" => 'employee::attendance.placeholder.related_id', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'employee_id', "element" => 'numeric', "type" => 'numeric', "label" => 'employee::attendance.label.employee_id', "placeholder" => 'employee::attendance.placeholder.employee_id', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'request_id', "element" => 'numeric', "type" => 'numeric', "label" => 'employee::attendance.label.request_id', "placeholder" => 'employee::attendance.placeholder.request_id', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'handover_id', "element" => 'numeric', "type" => 'numeric', "label" => 'employee::attendance.label.handover_id', "placeholder" => 'employee::attendance.placeholder.handover_id', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'date', "element" => 'date_picker', "type" => 'date_picker', "label" => 'employee::attendance.label.date', "placeholder" => 'employee::attendance.placeholder.date', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'date_start', "element" => 'date_time_picker', "type" => 'date_time_picker', "label" => 'employee::attendance.label.date_start', "placeholder" => 'employee::attendance.placeholder.date_start', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'date_end', "element" => 'date_time_picker', "type" => 'date_time_picker', "label" => 'employee::attendance.label.date_end', "placeholder" => 'employee::attendance.placeholder.date_end', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'half_day', "element" => 'numeric', "type" => 'numeric', "label" => 'employee::attendance.label.half_day', "placeholder" => 'employee::attendance.placeholder.half_day', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'type', "element" => 'text', "type" => 'text', "label" => 'employee::attendance.label.type', "placeholder" => 'employee::attendance.placeholder.type', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'type_old', "element" => 'text', "type" => 'text', "label" => 'employee::attendance.label.type_old', "placeholder" => 'employee::attendance.placeholder.type_old', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'period', "element" => 'text', "type" => 'text', "label" => 'employee::attendance.label.period', "placeholder" => 'employee::attendance.placeholder.period', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'paid', "element" => 'decimal', "type" => 'decimal', "label" => 'employee::attendance.label.paid', "placeholder" => 'employee::attendance.placeholder.paid', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'unpaid', "element" => 'decimal', "type" => 'decimal', "label" => 'employee::attendance.label.unpaid', "placeholder" => 'employee::attendance.placeholder.unpaid', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'time_in', "element" => 'time_picker', "type" => 'time_picker', "label" => 'employee::attendance.label.time_in', "placeholder" => 'employee::attendance.placeholder.time_in', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'time_out', "element" => 'time_picker', "type" => 'time_picker', "label" => 'employee::attendance.label.time_out', "placeholder" => 'employee::attendance.placeholder.time_out', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'description', "element" => 'text', "type" => 'text', "label" => 'employee::attendance.label.description', "placeholder" => 'employee::attendance.placeholder.description', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'import', "element" => 'numeric', "type" => 'numeric', "label" => 'employee::attendance.label.import', "placeholder" => 'employee::attendance.placeholder.import', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'return_to', "element" => 'date_time_picker', "type" => 'date_time_picker', "label" => 'employee::attendance.label.return_to', "placeholder" => 'employee::attendance.placeholder.return_to', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], ], 'urls' => [ 'new' => [ 'url' => 'employee/attendance/new', 'method' => 'GET', ], 'create' => [ 'url' => 'employee/attendance/create', 'method' => 'GET', ], 'store' => [ 'url' => 'employee/attendance', 'method' => 'POST', ], 'update' => [ 'url' => 'employee/attendance', 'method' => 'PUT', ], 'list' => [ 'url' => 'employee/attendance', 'method' => 'GET', ], 'delete' => [ 'url' => 'employee/attendance', 'method' => 'DELETE', ], ], 'order' => [ 'created_at' => 'employee::attendance.label.created_at', 'name' => 'employee::attendance.label.name', 'status' => 'employee::attendance.label.status', ], 'groups' => [ [ 'icon' => "mdi:account-supervisor-outline", 'name' => "employee::attendance.groups.main", 'group' => "main.main", 'title' => "employee::attendance.groups.main", ], [ 'icon' => "fe:home", 'name' => "employee::attendance.groups.details", 'group' => "main.details", 'title' => "employee::attendance.groups.details", ], 'images' => [ 'icon' => "fe:home", 'name' => "employee::attendance.groups.images", 'group' => "main.images", 'title' => "employee::attendance.groups.images", ], 'settings' => [ 'icon' => "fe:home", 'name' => "employee::attendance.groups.settings", 'group' => "main.settings", 'title' => "employee::attendance.groups.settings", ] ], 'controller' => [ 'provider' => 'Bixo', 'package' => 'Employee', 'module' => 'Attendance', ], 'workflow' => [ 'type' => 'workflow', 'marking_store' => [ 'type' => 'multiple_state', 'arguments' => ['status'], // 'property' => 'status' ], 'supports' => [ \Bixo\Employee\Models\Attendance::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' => 'employee::attendance.action.copy', 'roles' => [ 'user' => ['superuser', 'admin'], 'team' => ['admin'], 'permission' => ['employee.attendance.copy', 'employee.attendance.duplicate'], ], 'form' => [ 'count' => [ "element" => 'select', "type" => 'select', "label" => 'employee::attendance.label.count', "placeholder" => 'employee::attendance.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" => 'employee::attendance.label.comment', "placeholder" => 'employee::attendance.placeholder.comment', "col" => "12", ], ], ], 'empty' => [ 'type' => ['List', 'Details'], 'label' => 'employee::attendance.action.empty', 'roles' => [ 'user' => ['superuser'], ], ], 'section' => [ 'type' => ['Group'], 'api_url' => '', 'action' => 'list', 'label' => 'employee::attendance.action.section', 'store' => 'main.units', 'group' => 'main.units' ], ] ];