From fadf058b9ba5e64c3e1daea9895f6527855e517c Mon Sep 17 00:00:00 2001 From: Dedan Date: Sat, 3 Aug 2024 11:55:56 +0300 Subject: [PATCH] Changes to files: Entities/Announcement.php Entities/Department.php Entities/Dependent.php Entities/Designation.php Entities/Education.php Entities/Employee.php Entities/EmployeeHistory.php Entities/EmployeeNote.php Entities/EmployeePerformance.php Entities/EmployeeRemoteWorkRequest.php Entities/EmployeeResignRequest.php Entities/FinancialYear.php Entities/Holiday.php Entities/HolidayIndv.php Entities/Leave.php Entities/LeaveApprovalStatus.php Entities/LeaveEncashmentRequest.php Entities/LeaveEntitlement.php Entities/LeavePolicy.php Entities/LeavePolicySegregation.php Entities/LeaveRequest.php Entities/LeaveRequestDetail.php Entities/LeaveUnpaid.php Entities/PayrollAdditionalAllowanceDeduction.php Entities/PayrollCalendarTypeSetting.php Entities/PayrollFixedPayment.php Entities/PayrollPayCalendar.php Entities/PayrollPayCalendarEmployee.php Entities/PayrollPayitem.php Entities/PayrollPayrun.php Entities/PayrollPayrunDetail.php Entities/UserLeave.php Entities/WorkExperience.php --- Entities/Announcement.php | 81 ------------ Entities/Department.php | 91 ------------- Entities/Dependent.php | 72 ----------- Entities/Designation.php | 82 ------------ Entities/Education.php | 100 --------------- Entities/Employee.php | 102 --------------- Entities/EmployeeHistory.php | 84 ------------ Entities/EmployeeNote.php | 81 ------------ Entities/EmployeePerformance.php | 106 --------------- Entities/EmployeeRemoteWorkRequest.php | 87 ------------- Entities/EmployeeResignRequest.php | 85 ------------ Entities/FinancialYear.php | 84 ------------ Entities/Holiday.php | 88 ------------- Entities/HolidayIndv.php | 70 ---------- Entities/Leave.php | 80 ------------ Entities/LeaveApprovalStatus.php | 85 ------------ Entities/LeaveEncashmentRequest.php | 97 -------------- Entities/LeaveEntitlement.php | 100 --------------- Entities/LeavePolicy.php | 121 ------------------ Entities/LeavePolicySegregation.php | 100 --------------- Entities/LeaveRequest.php | 101 --------------- Entities/LeaveRequestDetail.php | 94 -------------- Entities/LeaveUnpaid.php | 96 -------------- .../PayrollAdditionalAllowanceDeduction.php | 92 ------------- Entities/PayrollCalendarTypeSetting.php | 91 ------------- Entities/PayrollFixedPayment.php | 85 ------------ Entities/PayrollPayCalendar.php | 70 ---------- Entities/PayrollPayCalendarEmployee.php | 71 ---------- Entities/PayrollPayitem.php | 82 ------------ Entities/PayrollPayrun.php | 90 ------------- Entities/PayrollPayrunDetail.php | 97 -------------- Entities/UserLeave.php | 71 ---------- Entities/WorkExperience.php | 91 ------------- 33 files changed, 2927 deletions(-) delete mode 100755 Entities/Announcement.php delete mode 100755 Entities/Department.php delete mode 100755 Entities/Dependent.php delete mode 100755 Entities/Designation.php delete mode 100755 Entities/Education.php delete mode 100755 Entities/Employee.php delete mode 100755 Entities/EmployeeHistory.php delete mode 100755 Entities/EmployeeNote.php delete mode 100755 Entities/EmployeePerformance.php delete mode 100755 Entities/EmployeeRemoteWorkRequest.php delete mode 100755 Entities/EmployeeResignRequest.php delete mode 100755 Entities/FinancialYear.php delete mode 100755 Entities/Holiday.php delete mode 100755 Entities/HolidayIndv.php delete mode 100755 Entities/Leave.php delete mode 100755 Entities/LeaveApprovalStatus.php delete mode 100755 Entities/LeaveEncashmentRequest.php delete mode 100755 Entities/LeaveEntitlement.php delete mode 100755 Entities/LeavePolicy.php delete mode 100755 Entities/LeavePolicySegregation.php delete mode 100755 Entities/LeaveRequest.php delete mode 100755 Entities/LeaveRequestDetail.php delete mode 100755 Entities/LeaveUnpaid.php delete mode 100755 Entities/PayrollAdditionalAllowanceDeduction.php delete mode 100755 Entities/PayrollCalendarTypeSetting.php delete mode 100755 Entities/PayrollFixedPayment.php delete mode 100755 Entities/PayrollPayCalendar.php delete mode 100755 Entities/PayrollPayCalendarEmployee.php delete mode 100755 Entities/PayrollPayitem.php delete mode 100755 Entities/PayrollPayrun.php delete mode 100755 Entities/PayrollPayrunDetail.php delete mode 100755 Entities/UserLeave.php delete mode 100755 Entities/WorkExperience.php diff --git a/Entities/Announcement.php b/Entities/Announcement.php deleted file mode 100755 index 3a8689f..0000000 --- a/Entities/Announcement.php +++ /dev/null @@ -1,81 +0,0 @@ - - */ - protected $fillable = ['partner_id', 'post_id', 'status', 'email_status']; - /** - * The fields that are to be render when performing relationship queries. - * - * @var array - */ - public $rec_names = ['partner_id', 'post_id']; - - /** - * List of tables names that are need in this model during migration. - * - * @var array - */ - public array $migrationDependancy = []; - - /** - * The table associated with the model. - * - * @var string - */ - protected $table = "hrm_announcement"; - - /** - * List of fields to be migrated to the datebase when creating or updating model during migration. - * - * @param Blueprint $table - * @return void - */ - public function fields(Blueprint $table = null): void - { - $this->fields = $table ?? new Blueprint($this->table); - - $this->fields->bigIncrements('id')->html('text'); - $this->fields->unsignedBigInteger('partner_id')->index('partner_id')->html('recordpicker')->relation(['users']); - $this->fields->bigInteger('post_id')->index('post_id')->html('text'); - $this->fields->string('status', 30)->index('status')->html('switch'); - $this->fields->string('email_status', 30)->html('switch'); - } - - /** - * List of structure for this model. - */ - public function structure($structure): array - { - $structure['table'] = ['partner_id', 'post_id', 'status', 'email_status']; - $structure['filter'] = ['partner_id', 'post_id', 'status', 'email_status']; - - return $structure; - } - - - /** - * Define rights for this model. - * - * @return array - */ - public function rights(): array - { - $rights = parent::rights(); - - $rights['staff'] = ['view' => true]; - $rights['registered'] = ['view' => true]; - $rights['guest'] = []; - - return $rights; - } -} diff --git a/Entities/Department.php b/Entities/Department.php deleted file mode 100755 index 3414ace..0000000 --- a/Entities/Department.php +++ /dev/null @@ -1,91 +0,0 @@ - - */ - protected $fillable = ['title', 'slug', 'description', 'lead', 'parent', 'status']; - - /** - * The fields that are to be render when performing relationship queries. - * - * @var array - */ - public $rec_names = ['title']; - - /** - * List of tables names that are need in this model during migration. - * - * @var array - */ - public array $migrationDependancy = []; - - /** - * The table associated with the model. - * - * @var string - */ - protected $table = "hrm_department"; - - /** - * List of fields to be migrated to the datebase when creating or updating model during migration. - * - * @param Blueprint $table - * @return void - */ - public function fields(Blueprint $table = null): void - { - $this->fields = $table ?? new Blueprint($this->table); - - $this->fields->increments('id')->html('hidden'); - $this->fields->string('title', 200)->default('')->html('text'); - $this->fields->string('slug')->nullable()->html('text'); - $this->fields->text('description')->nullable()->html('textarea'); - $this->fields->unsignedInteger('lead')->default(0)->html('switch'); - $this->fields->unsignedInteger('parent')->default(0)->html('switch'); - $this->fields->unsignedTinyInteger('status')->default(1)->html('switch'); - } - - /** - * List of structure for this model. - */ - public function structure($structure): array - { - $structure['table'] = ['title', 'slug', 'lead', 'parent', 'status']; - $structure['form'] = [ - ['label' => 'Department Title', 'class' => 'col-span-full', 'fields' => ['title']], - ['label' => 'Department Description', 'class' => 'col-span-full md:col-span-6 md:pr-2', 'fields' => ['description']], - ['label' => 'Department Lead', 'class' => 'col-span-full md:col-span-6 md:pr-2', 'fields' => ['slug', 'lead']], - ['label' => 'Department Status', 'class' => 'col-span-full md:col-span-6 md:pr-2', 'fields' => ['parent', 'status']], - ]; - $structure['filter'] = ['title', 'slug', 'lead', 'status']; - - return $structure; - } - - - /** - * Define rights for this model. - * - * @return array - */ - public function rights(): array - { - $rights = parent::rights(); - - $rights['staff'] = ['view' => true]; - $rights['registered'] = []; - $rights['guest'] = []; - - return $rights; - } - -} diff --git a/Entities/Dependent.php b/Entities/Dependent.php deleted file mode 100755 index 9228095..0000000 --- a/Entities/Dependent.php +++ /dev/null @@ -1,72 +0,0 @@ - - */ - protected $fillable = ['employee_id', 'name', 'relation', 'dob']; - - /** - * The fields that are to be render when performing relationship queries. - * - * @var array - */ - public $rec_names = ['name']; - - /** - * List of tables names that are need in this model during migration. - * - * @var array - */ - public array $migrationDependancy = []; - - /** - * The table associated with the model. - * - * @var string - */ - protected $table = "hrm_dependent"; - - /** - * List of fields to be migrated to the datebase when creating or updating model during migration. - * - * @param Blueprint $table - * @return void - */ - public function fields(Blueprint $table = null): void - { - $this->fields = $table ?? new Blueprint($this->table); - - $this->fields->increments('id')->html('hidden'); - $this->fields->integer('employee_id')->nullable()->index('employee_id')->html('recordpicker')->relation(['hrm', 'employee']); - $this->fields->string('name', 100)->nullable()->html('text'); - $this->fields->string('relation', 100)->nullable()->html('textarea'); - $this->fields->date('dob')->nullable()->html('date'); - } - - - /** - * Define rights for this model. - * - * @return array - */ - public function rights(): array - { - $rights = parent::rights(); - - $rights['staff'] = ['view' => true]; - $rights['registered'] = ['view' => true]; - $rights['guest'] = []; - - return $rights; - } -} diff --git a/Entities/Designation.php b/Entities/Designation.php deleted file mode 100755 index c1f5b75..0000000 --- a/Entities/Designation.php +++ /dev/null @@ -1,82 +0,0 @@ - - */ - protected $fillable = ['title', 'slug', 'description', 'status']; - - /** - * The fields that are to be render when performing relationship queries. - * - * @var array - */ - public $rec_names = ['title']; - - /** - * List of tables names that are need in this model during migration. - * - * @var array - */ - public array $migrationDependancy = []; - - /** - * The table associated with the model. - * - * @var string - */ - protected $table = "hrm_designation"; - - /** - * List of fields to be migrated to the datebase when creating or updating model during migration. - * - * @param Blueprint $table - * @return void - */ - public function fields(Blueprint $table = null): void - { - $this->fields = $table ?? new Blueprint($this->table); - - $this->fields->increments('id')->html('hidden'); - $this->fields->string('title', 200)->default('')->html('text'); - $this->fields->string('slug')->nullable()->html('text'); - $this->fields->text('description')->nullable()->html('textarea'); - $this->fields->boolean('status')->default(1)->html('switch'); - } - - /** - * List of structure for this model. - */ - public function structure($structure): array - { - $structure['table'] = ['title', 'slug', 'status']; - $structure['filter'] = ['title', 'slug', 'status']; - - return $structure; - } - - - /** - * Define rights for this model. - * - * @return array - */ - public function rights(): array - { - $rights = parent::rights(); - - $rights['staff'] = ['view' => true]; - $rights['registered'] = ['view' => true]; - $rights['guest'] = []; - - return $rights; - } -} diff --git a/Entities/Education.php b/Entities/Education.php deleted file mode 100755 index e308828..0000000 --- a/Entities/Education.php +++ /dev/null @@ -1,100 +0,0 @@ - - */ - protected $fillable = [ - 'employee_id', 'school', 'degree', 'field', 'result', 'result_type', - 'finished', 'notes', 'interest', - ]; - - /** - * The fields that are to be render when performing relationship queries. - * - * @var array - */ - public $rec_names = ['school', 'degree']; - - /** - * List of tables names that are need in this model during migration. - * - * @var array - */ - public array $migrationDependancy = []; - - /** - * The table associated with the model. - * - * @var string - */ - protected $table = "hrm_education"; - - /** - * List of fields to be migrated to the datebase when creating or updating model during migration. - * - * @param Blueprint $table - * @return void - */ - public function fields(Blueprint $table = null): void - { - $this->fields = $table ?? new Blueprint($this->table); - - $result_types = ['grade' => 'Grade', 'percentage' => 'Percentage']; - - $this->fields->increments('id'); - $this->fields->unsignedInteger('employee_id')->nullable()->index('employee_id')->html('recordpicker')->relation(['hrm', 'employee']); - $this->fields->string('school', 100)->nullable()->html('text'); - $this->fields->string('degree', 100)->nullable()->html('text'); - $this->fields->string('field', 100)->nullable()->html('text'); - $this->fields->string('result', 50)->nullable()->html('text'); - $this->fields->enum('result_type', array_keys($result_types))->options($result_types)->nullable()->html('switch'); - $this->fields->unsignedInteger('finished')->nullable()->html('switch'); - $this->fields->text('notes')->nullable()->html('textarea'); - $this->fields->text('interest')->nullable()->html('switch'); - } - - /** - * List of structure for this model. - */ - public function structure($structure): array - { - - $structure['table'] = ['employee_id', 'school', 'degree', 'field', 'finished']; - $structure['form'] = [ - ['label' => 'School Information', 'class' => 'col-span-full', 'fields' => ['school']], - ['label' => 'School Employee', 'class' => 'col-span-full md:col-span-6 md:pr-2', 'fields' => ['employee_id', 'field', 'result']], - ['label' => 'School Result', 'class' => 'col-span-full md:col-span-6 md:pr-2', 'fields' => ['result_type', 'finished']], - ['label' => 'School Notes', 'class' => 'col-span-full', 'fields' => ['notes', 'interest']], - ]; - $structure['filter'] = ['employee_id', 'school', 'degree', 'field', 'finished']; - - return $structure; - } - - - /** - * Define rights for this model. - * - * @return array - */ - public function rights(): array - { - $rights = parent::rights(); - - $rights['staff'] = ['view' => true]; - $rights['registered'] = ['view' => true]; - $rights['guest'] = []; - - return $rights; - } - -} diff --git a/Entities/Employee.php b/Entities/Employee.php deleted file mode 100755 index bb4005d..0000000 --- a/Entities/Employee.php +++ /dev/null @@ -1,102 +0,0 @@ - - */ - protected $fillable = [ - 'partner_id', 'employee_id', 'designation', 'department', 'location', 'hiring_source', - 'termination_date', 'date_of_birth', 'reporting_to', 'pay_rate', 'pay_type', 'type', - 'status', - ]; - - /** - * The fields that are to be render when performing relationship queries. - * - * @var array - */ - public $rec_names = ['partner_id', 'employee_id']; - - /** - * List of tables names that are need in this model during migration. - * - * @var array - */ - public array $migrationDependancy = []; - - /** - * The table associated with the model. - * - * @var string - */ - protected $table = "hrm_employee"; - - /** - * List of fields to be migrated to the datebase when creating or updating model during migration. - * - * @param Blueprint $table - * @return void - */ - public function fields(Blueprint $table = null): void - { - $this->fields = $table ?? new Blueprint($this->table); - - $this->fields->bigIncrements('id'); - $this->fields->unsignedBigInteger('partner_id')->default(0)->index('partner_id')->html('recordpicker')->relation(['users']); - $this->fields->string('employee_id', 20)->nullable()->index('employee_id')->html('recordpicker')->relation(['hrm', 'employee']); - $this->fields->unsignedInteger('designation')->default(0)->index('designation')->html('recordpicker')->relation(['hrm', 'designation']); - $this->fields->unsignedInteger('department')->default(0)->index('department')->html('recordpicker')->relation(['hrm', 'department']); - $this->fields->unsignedInteger('location')->default(0)->html('recordpicker')->relation(['hrm', 'location']); - $this->fields->string('hiring_source', 20)->html('text'); - $this->fields->date('hiring_date')->html('date'); - $this->fields->date('termination_date')->html('date'); - $this->fields->date('date_of_birth')->html('date'); - $this->fields->unsignedBigInteger('reporting_to')->default(0)->html('recordpicker')->relation(['hrm', 'employee']); - $this->fields->unsignedDecimal('pay_rate', 20, 2)->default(0.00)->html('amount'); - $this->fields->string('pay_type', 20)->default('')->html('text'); - $this->fields->string('type', 20)->html('text'); - $this->fields->string('status', 10)->default('')->index('status')->html('switch'); - } - - /** - * List of structure for this model. - */ - public function structure($structure): array - { - - $structure['table'] = ['partner_id', 'employee_id', 'designation', 'department', 'location', 'termination_date', 'date_of_birth', 'status']; - $structure['form'] = [ - ['label' => 'Employee Information', 'class' => 'col-span-full', 'fields' => ['employee_id']], - ['label' => 'Employee Bio Info', 'class' => 'col-span-full md:col-span-6 md:pr-2', 'fields' => ['designation', 'department', 'location', 'hiring_source', 'termination_date', 'date_of_birth']], - ['label' => 'Employee Other Setting', 'class' => 'col-span-full md:col-span-6 md:pr-2', 'fields' => ['partner_id', 'reporting_to', 'pay_rate', 'pay_type', 'type', 'status']], - ]; - $structure['filter'] = ['partner_id', 'employee_id', 'designation', 'department', 'location', 'status']; - - return $structure; - } - - - /** - * Define rights for this model. - * - * @return array - */ - public function rights(): array - { - $rights = parent::rights(); - - $rights['staff'] = ['view' => true]; - $rights['registered'] = ['view' => true]; - $rights['guest'] = []; - - return $rights; - } -} diff --git a/Entities/EmployeeHistory.php b/Entities/EmployeeHistory.php deleted file mode 100755 index 7642a77..0000000 --- a/Entities/EmployeeHistory.php +++ /dev/null @@ -1,84 +0,0 @@ - - */ - protected $fillable = ['partner_id', 'module', 'category', 'type', 'comment', 'data', 'date']; - - /** - * The fields that are to be render when performing relationship queries. - * - * @var array - */ - public $rec_names = ['partner_id', 'module']; - - /** - * List of tables names that are need in this model during migration. - * - * @var array - */ - public array $migrationDependancy = []; - - /** - * The table associated with the model. - * - * @var string - */ - protected $table = "hrm_employee_history"; - - /** - * List of fields to be migrated to the datebase when creating or updating model during migration. - * - * @param Blueprint $table - * @return void - */ - public function fields(Blueprint $table = null): void - { - $this->fields = $table ?? new Blueprint($this->table); - - $this->fields->increments('id')->html('hidden'); - $this->fields->unsignedBigInteger('partner_id')->default(0)->index('partner_id')->html('recordpicker')->relation(['users']); - $this->fields->string('module', 20)->nullable()->index('module')->html('text'); - $this->fields->string('category', 20)->nullable()->html('text'); - $this->fields->string('type', 20)->nullable()->html('text'); - $this->fields->text('comment')->nullable()->html('text'); - $this->fields->longText('data')->nullable()->html('text'); - $this->fields->dateTime('date')->html('date'); - } - - /** - * List of structure for this model. - */ - public function structure($structure): array - { - $structure['table'] = ['partner_id', 'module', 'category', 'type', 'date']; - $structure['filter'] = ['partner_id', 'module', 'category', 'type', 'date']; - - return $structure; - } - - /** - * Define rights for this model. - * - * @return array - */ - public function rights(): array - { - $rights = parent::rights(); - - $rights['staff'] = ['view' => true]; - $rights['registered'] = ['view' => true]; - $rights['guest'] = []; - - return $rights; - } -} diff --git a/Entities/EmployeeNote.php b/Entities/EmployeeNote.php deleted file mode 100755 index 3b43e65..0000000 --- a/Entities/EmployeeNote.php +++ /dev/null @@ -1,81 +0,0 @@ - - */ - protected $fillable = ['partner_id', 'comment', 'comment_by']; - - /** - * The fields that are to be render when performing relationship queries. - * - * @var array - */ - public $rec_names = ['partner_id', 'comment']; - - /** - * List of tables names that are need in this model during migration. - * - * @var array - */ - public array $migrationDependancy = []; - - /** - * The table associated with the model. - * - * @var string - */ - protected $table = "hrm_employee_note"; - - /** - * List of fields to be migrated to the datebase when creating or updating model during migration. - * - * @param Blueprint $table - * @return void - */ - public function fields(Blueprint $table = null): void - { - $this->fields = $table ?? new Blueprint($this->table); - - $this->fields->bigIncrements('id')->html('text'); - $this->fields->unsignedBigInteger('partner_id')->default(0)->html('recordpicker')->relation(['users']); - $this->fields->text('comment')->html('text'); - $this->fields->unsignedBigInteger('comment_by')->html('recordpicker')->relation(['users']); - } - - /** - * List of structure for this model. - */ - public function structure($structure): array - { - $structure['table'] = ['partner_id', 'comment', 'comment_by']; - $structure['filter'] = ['partner_id', 'comment']; - - return $structure; - } - - - /** - * Define rights for this model. - * - * @return array - */ - public function rights(): array - { - $rights = parent::rights(); - - $rights['staff'] = ['view' => true]; - $rights['registered'] = ['view' => true]; - $rights['guest'] = []; - - return $rights; - } -} diff --git a/Entities/EmployeePerformance.php b/Entities/EmployeePerformance.php deleted file mode 100755 index f0c69ca..0000000 --- a/Entities/EmployeePerformance.php +++ /dev/null @@ -1,106 +0,0 @@ - - */ - protected $fillable = [ - 'employee_id', 'reporting_to', 'job_knowledge', 'work_quality', 'attendance', - 'communication', 'dependablity', 'reviewer', 'comments', 'completion_date', - 'goal_description', 'employee_assessment', 'supervisor', 'supervisor_assessment', - 'type', 'performance_date', - ]; - - /** - * The fields that are to be render when performing relationship queries. - * - * @var array - */ - public $rec_names = ['employee_id', 'reporting_to']; - - /** - * List of tables names that are need in this model during migration. - * - * @var array - */ - public array $migrationDependancy = []; - - /** - * The table associated with the model. - * - * @var string - */ - protected $table = "hrm_employee_performance"; - - /** - * List of fields to be migrated to the datebase when creating or updating model during migration. - * - * @param Blueprint $table - * @return void - */ - public function fields(Blueprint $table = null): void - { - $this->fields = $table ?? new Blueprint($this->table); - - $this->fields->increments('id')->html('hidden'); - $this->fields->unsignedInteger('employee_id')->nullable()->index('employee_id')->html('recordpicker')->relation(['hrm', 'employee']); - $this->fields->unsignedInteger('reporting_to')->nullable()->html('recordpicker')->relation(['hrm', 'employee']); - $this->fields->string('job_knowledge', 100)->nullable()->html('text'); - $this->fields->string('work_quality', 100)->nullable()->html('text'); - $this->fields->string('attendance', 100)->nullable()->html('text'); - $this->fields->string('communication', 100)->nullable()->html('text'); - $this->fields->string('dependablity', 100)->nullable()->html('text'); - $this->fields->unsignedInteger('reviewer')->nullable()->html('recordpicker')->relation(['hrm', 'employee']); - $this->fields->text('comments')->nullable()->html('text'); - $this->fields->dateTime('completion_date')->nullable()->html('date'); - $this->fields->text('goal_description')->nullable()->html('textarea'); - $this->fields->text('employee_assessment')->nullable()->html('textarea'); - $this->fields->unsignedInteger('supervisor')->nullable()->html('recordpicker')->relation(['hrm', 'employee']); - $this->fields->text('supervisor_assessment')->nullable()->html('textarea'); - $this->fields->text('type')->nullable()->html('text'); - $this->fields->dateTime('performance_date')->nullable()->html('date'); - } - - /** - * List of structure for this model. - */ - public function structure($structure): array - { - - $structure['table'] = ['employee_id', 'reporting_to', 'completion_date', 'supervisor', 'type', 'performance_date']; - $structure['form'] = [ - ['label' => 'Employee Performance', 'class' => 'col-span-full', 'fields' => ['employee_id']], - ['label' => 'Employee Performance Details', 'class' => 'col-span-full md:col-span-6 md:pr-2', 'fields' => ['reporting_to', 'job_knowledge', 'work_quality', 'attendance', 'communication', 'dependablity', 'reviewer', 'comments', 'completion_date']], - ['label' => 'Other Employee Performance Setting', 'class' => 'col-span-full md:col-span-6 md:pr-2', 'fields' => ['goal_description', 'employee_assessment', 'supervisor', 'supervisor_assessment', 'type', 'performance_date']], - ]; - $structure['filter'] = ['employee_id', 'reporting_to', 'completion_date', 'supervisor', 'performance_date']; - - return $structure; - } - - - /** - * Define rights for this model. - * - * @return array - */ - public function rights(): array - { - $rights = parent::rights(); - - $rights['staff'] = ['view' => true]; - $rights['registered'] = ['view' => true]; - $rights['guest'] = []; - - return $rights; - } - -} diff --git a/Entities/EmployeeRemoteWorkRequest.php b/Entities/EmployeeRemoteWorkRequest.php deleted file mode 100755 index 9c9c181..0000000 --- a/Entities/EmployeeRemoteWorkRequest.php +++ /dev/null @@ -1,87 +0,0 @@ - - */ - protected $fillable = ['partner_id', 'reason', 'start_date', 'end_date', 'days', 'status']; - - /** - * The fields that are to be render when performing relationship queries. - * - * @var array - */ - public $rec_names = ['partner_id', 'reason']; - - /** - * List of tables names that are need in this model during migration. - * - * @var array - */ - public array $migrationDependancy = []; - - /** - * The table associated with the model. - * - * @var string - */ - protected $table = "hrm_employee_remote_work_request"; - - /** - * List of fields to be migrated to the datebase when creating or updating model during migration. - * - * @param Blueprint $table - * @return void - */ - public function fields(Blueprint $table = null): void - { - $this->fields = $table ?? new Blueprint($this->table); - - $statuses = ['pending' => 'Pending', 'approved' => 'Approved', 'rejected' => 'Rejected']; - $statuses_color = ['pending' => 'gray', 'approved' => 'green', 'rejected' => 'red']; - - $this->fields->bigIncrements('id')->html('text'); - $this->fields->unsignedBigInteger('partner_id')->default(0)->index('partner_id')->html('recordpicker')->relation(['users']); - $this->fields->string('reason')->nullable()->html('textarea'); - $this->fields->date('start_date')->html('date'); - $this->fields->date('end_date')->html('date'); - $this->fields->unsignedSmallInteger('days')->default(0)->html('text'); - $this->fields->enum('status', array_keys($statuses))->options($statuses)->color($statuses_color)->default('pending')->html('switch'); - } - - /** - * List of structure for this model. - */ - public function structure($structure): array - { - $structure['table'] = ['partner_id', 'start_date', 'end_date', 'days', 'status']; - $structure['filter'] = ['partner_id', 'start_date', 'end_date', 'status']; - - return $structure; - } - - - /** - * Define rights for this model. - * - * @return array - */ - public function rights(): array - { - $rights = parent::rights(); - - $rights['staff'] = ['view' => true]; - $rights['registered'] = ['view' => true]; - $rights['guest'] = []; - - return $rights; - } -} diff --git a/Entities/EmployeeResignRequest.php b/Entities/EmployeeResignRequest.php deleted file mode 100755 index 23e325e..0000000 --- a/Entities/EmployeeResignRequest.php +++ /dev/null @@ -1,85 +0,0 @@ - - */ - protected $fillable = ['partner_id', 'reason', 'date', 'status']; - - /** - * The fields that are to be render when performing relationship queries. - * - * @var array - */ - public $rec_names = ['partner_id', 'reason']; - - /** - * List of tables names that are need in this model during migration. - * - * @var array - */ - public array $migrationDependancy = []; - - /** - * The table associated with the model. - * - * @var string - */ - protected $table = "hrm_employee_resign_request"; - - /** - * List of fields to be migrated to the datebase when creating or updating model during migration. - * - * @param Blueprint $table - * @return void - */ - public function fields(Blueprint $table = null): void - { - $this->fields = $table ?? new Blueprint($this->table); - - $statuses = ['pending' => 'Pending', 'approved' => 'Approved', 'rejected' => 'Rejected']; - $statuses_color = ['pending' => 'gray', 'approved' => 'green', 'rejected' => 'red']; - - $this->fields->bigIncrements('id')->html('text'); - $this->fields->unsignedBigInteger('partner_id')->default(0)->index('partner_id')->html('recordpicker')->relation(['users']); - $this->fields->string('reason')->nullable()->html('textarea'); - $this->fields->date('date')->html('date'); - $this->fields->enum('status', array_keys($statuses))->options($statuses)->color($statuses_color)->default('pending')->html('switch'); - } - - /** - * List of structure for this model. - */ - public function structure($structure): array - { - $structure['table'] = ['partner_id', 'date', 'status']; - $structure['filter'] = ['partner_id', 'date', 'status']; - - return $structure; - } - - - /** - * Define rights for this model. - * - * @return array - */ - public function rights(): array - { - $rights = parent::rights(); - - $rights['staff'] = ['view' => true]; - $rights['registered'] = ['view' => true]; - $rights['guest'] = []; - - return $rights; - } -} diff --git a/Entities/FinancialYear.php b/Entities/FinancialYear.php deleted file mode 100755 index 80da07e..0000000 --- a/Entities/FinancialYear.php +++ /dev/null @@ -1,84 +0,0 @@ - - */ - protected $fillable = ['fy_name', 'start_date', 'end_date', 'description']; - - /** - * The fields that are to be render when performing relationship queries. - * - * @var array - */ - public $rec_names = ['fy_name']; - - /** - * List of tables names that are need in this model during migration. - * - * @var array - */ - public array $migrationDependancy = []; - - /** - * The table associated with the model. - * - * @var string - */ - protected $table = "hrm_financial_year"; - - /** - * List of fields to be migrated to the datebase when creating or updating model during migration. - * - * @param Blueprint $table - * @return void - */ - public function fields(Blueprint $table = null): void - { - $this->fields = $table ?? new Blueprint($this->table); - - $this->fields->increments('id')->html('hidden'); - $this->fields->string('fy_name')->nullable()->html('text'); - $this->fields->integer('start_date')->nullable()->index('start_date')->html('date'); - $this->fields->integer('end_date')->nullable()->index('end_date')->html('date'); - $this->fields->string('description')->nullable()->html('textarea'); - - $this->fields->index(['start_date', 'end_date'], 'year_search'); - } - - /** - * List of structure for this model. - */ - public function structure($structure): array - { - $structure['table'] = ['fy_name', 'start_date', 'end_date']; - $structure['filter'] = ['fy_name', 'start_date', 'end_date']; - - return $structure; - } - - - /** - * Define rights for this model. - * - * @return array - */ - public function rights(): array - { - $rights = parent::rights(); - - $rights['staff'] = ['view' => true]; - $rights['registered'] = ['view' => true]; - $rights['guest'] = []; - - return $rights; - } -} diff --git a/Entities/Holiday.php b/Entities/Holiday.php deleted file mode 100755 index 93c84b9..0000000 --- a/Entities/Holiday.php +++ /dev/null @@ -1,88 +0,0 @@ - - */ - protected $fillable = ['title', 'start', 'end', 'description', 'range_status']; - - /** - * The fields that are to be render when performing relationship queries. - * - * @var array - */ - public $rec_names = ['title']; - - /** - * List of tables names that are need in this model during migration. - * - * @var array - */ - public array $migrationDependancy = []; - - /** - * The table associated with the model. - * - * @var string - */ - protected $table = "hrm_holiday"; - - /** - * List of fields to be migrated to the datebase when creating or updating model during migration. - * - * @param Blueprint $table - * @return void - */ - public function fields(Blueprint $table = null): void - { - $this->fields = $table ?? new Blueprint($this->table); - - $this->fields->bigIncrements('id')->html('text'); - $this->fields->string('title', 200)->html('text'); - $this->fields->timestamp('start')->useCurrent()->html('date'); - $this->fields->timestamp('end')->nullable()->default(null)->html('date'); - $this->fields->text('description')->html('textarea'); - $this->fields->string('range_status', 5)->html('switch'); - } - - /** - * List of structure for this model. - */ - public function structure($structure): array - { - $structure['table'] = ['title', 'start', 'end', 'range_status']; - $structure['form'] = [ - ['label' => 'Holiday Title', 'class' => 'col-span-full', 'fields' => ['title']], - ['label' => 'Holiday Description', 'class' => 'col-span-full', 'fields' => ['description']], - ['label' => 'Holiday Date', 'class' => 'col-span-full md:col-span-6 md:pr-2', 'fields' => ['start', 'end']], - ['label' => 'Other Holiday Setting', 'class' => 'col-span-full md:col-span-6 md:pr-2', 'fields' => ['range_status']], - ]; - $structure['filter'] = ['title', 'start', 'end', 'range_status']; - - return $structure; - } - - /** - * Define rights for this model. - * - * @return array - */ - public function rights(): array - { - $rights = parent::rights(); - - $rights['staff'] = ['view' => true]; - $rights['registered'] = ['view' => true]; - $rights['guest'] = []; - - return $rights; - } -} diff --git a/Entities/HolidayIndv.php b/Entities/HolidayIndv.php deleted file mode 100755 index feb86a5..0000000 --- a/Entities/HolidayIndv.php +++ /dev/null @@ -1,70 +0,0 @@ - - */ - protected $fillable = ['holiday_id', 'title', 'date']; - - /** - * The fields that are to be render when performing relationship queries. - * - * @var array - */ - public $rec_names = ['title']; - - /** - * List of tables names that are need in this model during migration. - * - * @var array - */ - public array $migrationDependancy = []; - - /** - * The table associated with the model. - * - * @var string - */ - protected $table = "hrm_holiday_indv"; - - /** - * List of fields to be migrated to the datebase when creating or updating model during migration. - * - * @param Blueprint $table - * @return void - */ - public function fields(Blueprint $table = null): void - { - $this->fields = $table ?? new Blueprint($this->table); - - $this->fields->bigIncrements('id')->html('text'); - $this->fields->integer('holiday_id')->nullable()->html('recordpicker')->relation(['hrm', 'holiday']); - $this->fields->string('title')->nullable()->html('text'); - $this->fields->date('date')->nullable()->html('date'); - } - - - /** - * Define rights for this model. - * - * @return array - */ - public function rights(): array - { - $rights = parent::rights(); - - $rights['staff'] = ['view' => true]; - $rights['registered'] = ['view' => true]; - $rights['guest'] = []; - - return $rights; - } -} diff --git a/Entities/Leave.php b/Entities/Leave.php deleted file mode 100755 index c160778..0000000 --- a/Entities/Leave.php +++ /dev/null @@ -1,80 +0,0 @@ - - */ - protected $fillable = ['name', 'description']; - - /** - * The fields that are to be render when performing relationship queries. - * - * @var array - */ - public $rec_names = ['name']; - - /** - * List of tables names that are need in this model during migration. - * - * @var array - */ - public array $migrationDependancy = []; - - /** - * The table associated with the model. - * - * @var string - */ - protected $table = "hrm_leave"; - - /** - * List of fields to be migrated to the datebase when creating or updating model during migration. - * - * @param Blueprint $table - * @return void - */ - public function fields(Blueprint $table = null): void - { - $this->fields = $table ?? new Blueprint($this->table); - - $this->fields->increments('id')->html('hidden'); - $this->fields->string('name', 150)->html('text'); - $this->fields->text('description')->nullable()->html('textarea'); - } - - /** - * List of structure for this model. - */ - public function structure($structure): array - { - $structure['table'] = ['name']; - $structure['filter'] = ['name']; - - return $structure; - } - - - /** - * Define rights for this model. - * - * @return array - */ - public function rights(): array - { - $rights = parent::rights(); - - $rights['staff'] = ['view' => true]; - $rights['registered'] = ['view' => true]; - $rights['guest'] = []; - - return $rights; - } -} diff --git a/Entities/LeaveApprovalStatus.php b/Entities/LeaveApprovalStatus.php deleted file mode 100755 index 7c0927c..0000000 --- a/Entities/LeaveApprovalStatus.php +++ /dev/null @@ -1,85 +0,0 @@ - - */ - protected $fillable = [ - 'leave_request_id', 'approval_status_id', 'approved_by', 'message', - ]; - - /** - * The fields that are to be render when performing relationship queries. - * - * @var array - */ - public $rec_names = ['leave_request_id', 'approval_status_id', 'approved_by']; - - /** - * List of tables names that are need in this model during migration. - * - * @var array - */ - public array $migrationDependancy = []; - - /** - * The table associated with the model. - * - * @var string - */ - protected $table = "hrm_leave_approval_status"; - - /** - * List of fields to be migrated to the datebase when creating or updating model during migration. - * - * @param Blueprint $table - * @return void - */ - public function fields(Blueprint $table = null): void - { - $this->fields = $table ?? new Blueprint($this->table); - - $this->fields->bigIncrements('id')->html('text'); - $this->fields->unsignedBigInteger('leave_request_id')->index('leave_request_id')->html('recordpicker')->relation(['hrm', 'leave_request']); - $this->fields->unsignedTinyInteger('approval_status_id')->default(0)->index('approval_status_id')->html('recordpicker')->relation(['hrm', 'approval_status']); - $this->fields->unsignedBigInteger('approved_by')->nullable()->html('recordpicker')->relation(['users']); - $this->fields->text('message')->nullable()->html('text'); - } - - /** - * List of structure for this model. - */ - public function structure($structure): array - { - $structure['table'] = ['leave_request_id', 'approval_status_id', 'approved_by', 'message']; - $structure['filter'] = ['leave_request_id', 'approval_status_id', 'approved_by']; - - return $structure; - } - - - /** - * Define rights for this model. - * - * @return array - */ - public function rights(): array - { - $rights = parent::rights(); - - $rights['staff'] = ['view' => true]; - $rights['registered'] = ['view' => true]; - $rights['guest'] = []; - - return $rights; - } -} diff --git a/Entities/LeaveEncashmentRequest.php b/Entities/LeaveEncashmentRequest.php deleted file mode 100755 index b7f5226..0000000 --- a/Entities/LeaveEncashmentRequest.php +++ /dev/null @@ -1,97 +0,0 @@ - - */ - protected $fillable = [ - 'partner_id', 'leave_id', 'approved_by', 'approval_status_id', 'encash_days', - 'forward_days', 'amount', 'total', 'f_year', - ]; - - /** - * The fields that are to be render when performing relationship queries. - * - * @var array - */ - public $rec_names = ['partner_id', 'leave_id']; - - /** - * List of tables names that are need in this model during migration. - * - * @var array - */ - public array $migrationDependancy = []; - - /** - * The table associated with the model. - * - * @var string - */ - protected $table = "hrm_leave_encashment_request"; - - /** - * List of fields to be migrated to the datebase when creating or updating model during migration. - * - * @param Blueprint $table - * @return void - */ - public function fields(Blueprint $table = null): void - { - $this->fields = $table ?? new Blueprint($this->table); - - $this->fields->bigIncrements('id')->html('text'); - $this->fields->unsignedBigInteger('partner_id')->index('partner_id')->html('recordpicker')->relation(['users']); - $this->fields->unsignedSmallInteger('leave_id')->index('leave_id')->html('recordpicker')->relation(['hrm', 'leave']); - $this->fields->unsignedBigInteger('approved_by')->nullable()->html('recordpicker')->relation(['users']); - $this->fields->unsignedTinyInteger('approval_status_id')->default(1)->html('recordpicker')->relation(['hrm', 'approval_status']); - $this->fields->unsignedDecimal('encash_days', 4, 1)->default(0.0)->html('number'); - $this->fields->unsignedDecimal('forward_days', 4, 1)->default(0.0)->html('number'); - $this->fields->decimal('amount', 20, 2)->default(0.00)->html('number'); - $this->fields->decimal('total', 20, 2)->default(0.00)->html('number'); - $this->fields->unsignedSmallInteger('f_year')->index('f_year')->html('number'); - } - - /** - * List of structure for this model. - */ - public function structure($structure): array - { - - $structure['table'] = ['partner_id', 'leave_id', 'approved_by', 'approval_status_id', 'encash_days', 'forward_days', 'amount', 'total', 'f_year']; - $structure['form'] = [ - ['label' => 'Leave Encashment Request', 'class' => 'col-span-full', 'fields' => ['leave_id']], - ['label' => 'Leave Encashment Request Detail', 'class' => 'col-span-full', 'fields' => ['partner_id', 'approved_by', 'approval_status_id', 'encash_days']], - ['label' => 'Leave Encashment Request Setting', 'class' => 'col-span-full', 'fields' => ['forward_days', 'amount', 'total', 'f_year']], - ]; - $structure['filter'] = ['partner_id', 'leave_id', 'approved_by', 'approval_status_id']; - - return $structure; - } - - - /** - * Define rights for this model. - * - * @return array - */ - public function rights(): array - { - $rights = parent::rights(); - - $rights['staff'] = ['view' => true]; - $rights['registered'] = ['view' => true]; - $rights['guest'] = []; - - return $rights; - } - -} diff --git a/Entities/LeaveEntitlement.php b/Entities/LeaveEntitlement.php deleted file mode 100755 index 45f54d2..0000000 --- a/Entities/LeaveEntitlement.php +++ /dev/null @@ -1,100 +0,0 @@ - - */ - protected $fillable = [ - 'partner_id', 'leave_id', 'trn_id', 'trn_type', 'day_in', 'day_out', 'description', 'f_year', - ]; - - /** - * The fields that are to be render when performing relationship queries. - * - * @var array - */ - public $rec_names = ['partner_id', 'leave_id']; - - /** - * List of tables names that are need in this model during migration. - * - * @var array - */ - public array $migrationDependancy = []; - - /** - * The table associated with the model. - * - * @var string - */ - protected $table = "hrm_leave_entitlement"; - - /** - * List of fields to be migrated to the datebase when creating or updating model during migration. - * - * @param Blueprint $table - * @return void - */ - public function fields(Blueprint $table = null): void - { - $this->fields = $table ?? new Blueprint($this->table); - - $trn_types = ['leave_policies' => 'Leave Policies', 'leave_approval_status' => 'Leave Approval Status', 'leave_encashment_requests' => 'Leave Encashment Requests', 'leave_entitlements' => 'Leave Entitlements', 'unpaid_leave' => 'Unpaid Leave', 'leave_encashment' => 'Leave Encashment', 'leave_carryforward' => 'Leave Carryforward', 'manual_leave_policies' => 'Manual Leave Policies', 'accounts' => 'Accounts', 'others' => 'Others', 'leave_accrual' => 'Leave Accrual', 'carry_forward_leave_expired' => 'Carry Forward Leave Expired']; - - $this->fields->bigIncrements('id'); - $this->fields->unsignedBigInteger('partner_id')->html('recordpicker')->relation(['users']); - $this->fields->unsignedSmallInteger('leave_id')->index('leave_id')->html('recordpicker')->relation(['hrm', 'leave']); - $this->fields->unsignedBigInteger('trn_id')->index('trn_id')->html('number'); - $this->fields->enum('trn_type', array_keys($trn_types))->options($trn_types)->default('leave_policies')->html('switch'); - $this->fields->unsignedDecimal('day_in', 5, 1)->default(0.0)->html('number'); - $this->fields->unsignedDecimal('day_out', 5, 1)->default(0.0)->html('number'); - $this->fields->text('description')->nullable()->html('textarea'); - $this->fields->smallInteger('f_year')->html('number'); - - $this->fields->index(['partner_id', 'leave_id', 'f_year', 'trn_type'], 'comp_key_1'); - } - - /** - * List of structure for this model. - */ - public function structure($structure): array - { - - $structure['table'] = ['partner_id', 'leave_id', 'trn_id', 'trn_type', 'day_in', 'day_out', 'f_year']; - $structure['form'] = [ - ['label' => 'Leave Entitlement', 'class' => 'col-span-full', 'fields' => ['leave_id']], - ['label' => 'Leave Entitlement Description', 'class' => 'col-span-full', 'fields' => ['description']], - ['label' => 'Leave Entitlement Detail', 'class' => 'col-span-full md:col-span-6 md:pr-2', 'fields' => ['partner_id', 'trn_id', 'trn_type', 'f_year']], - ['label' => 'Leave Entitlement Day', 'class' => 'col-span-full md:col-span-6 md:pr-2', 'fields' => ['day_in', 'day_out']], - ]; - $structure['filter'] = ['partner_id', 'leave_id', 'trn_id', 'day_in', 'day_out', 'f_year']; - - return $structure; - } - - - /** - * Define rights for this model. - * - * @return array - */ - public function rights(): array - { - $rights = parent::rights(); - - $rights['staff'] = ['view' => true]; - $rights['registered'] = ['view' => true]; - $rights['guest'] = []; - - return $rights; - } - -} diff --git a/Entities/LeavePolicy.php b/Entities/LeavePolicy.php deleted file mode 100755 index 31110d3..0000000 --- a/Entities/LeavePolicy.php +++ /dev/null @@ -1,121 +0,0 @@ - - */ - protected $fillable = [ - 'leave_id', 'description', 'days', 'color', 'apply_limit', 'employee_type', 'department_id', - 'location_id', 'designation_id', 'gender', 'marital', 'f_year', 'apply_for_new_users', - 'carryover_days', 'carryover_uses_limit', 'encashment_based_on', 'forward_default', - 'applicable_from_days', 'accrued_amount', 'accrued_max_days', 'halfday_enable', - ]; - - /** - * The fields that are to be render when performing relationship queries. - * - * @var array - */ - public $rec_names = ['leave_id']; - - /** - * List of tables names that are need in this model during migration. - * - * @var array - */ - public array $migrationDependancy = []; - - /** - * The table associated with the model. - * - * @var string - */ - protected $table = "hrm_leave_policy"; - - /** - * List of fields to be migrated to the datebase when creating or updating model during migration. - * - * @param Blueprint $table - * @return void - */ - public function fields(Blueprint $table = null): void - { - $this->fields = $table ?? new Blueprint($this->table); - - $employee_type = ['none' => 'None', 'permanent' => 'Permanent', 'parttime' => 'Parttime', 'contract' => 'Contract', 'temporary' => 'Temporary', 'trainee' => 'Trainee']; - $gender = ['none' => 'None', 'male' => 'Male', 'female' => 'Female', 'other' => 'other']; - $marital = ['none' => 'None', 'single' => 'Single', 'married' => 'Married', 'widowed' => 'Widowed']; - $encashment_based_on = ['pay_rate' => 'Pay Rate', 'basic' => 'Basic', 'gross' => 'Gross']; - $forward_default = ['encashment' => 'Encashment', 'carryover' => 'Carryover']; - - $this->fields->increments('id'); - $this->fields->unsignedSmallInteger('leave_id')->index('leave_id')->html('recordpicker')->relation(['hrm', 'leave']); - $this->fields->text('description')->nullable()->html('text'); - $this->fields->unsignedTinyInteger('days')->default(0)->html('number'); - $this->fields->string('color', 10)->nullable()->html('text'); - $this->fields->unsignedTinyInteger('apply_limit')->default(0)->html('number'); - $this->fields->enum('employee_type', array_keys($employee_type))->options($employee_type)->default('permanent')->html('switch'); - $this->fields->integer('department_id')->default(-1)->html('text'); - $this->fields->integer('location_id')->default(-1)->html('text'); - $this->fields->integer('designation_id')->default(-1)->html('text'); - $this->fields->enum('gender', array_keys($gender))->options($gender)->default('none')->html('switch'); - $this->fields->enum('marital', array_keys($marital))->options($marital)->default('none')->html('switch'); - $this->fields->unsignedSmallInteger('f_year')->nullable()->index('f_year')->html('number'); - $this->fields->unsignedTinyInteger('apply_for_new_users')->default(0)->html('number'); - $this->fields->unsignedTinyInteger('carryover_days')->default(0)->html('number'); - $this->fields->unsignedTinyInteger('carryover_uses_limit')->default(0)->html('number'); - $this->fields->unsignedTinyInteger('encashment_days')->default(0)->html('number'); - $this->fields->enum('encashment_based_on', array_keys($encashment_based_on))->options($encashment_based_on)->nullable()->html('switch'); - $this->fields->enum('forward_default', array_keys($forward_default))->options($forward_default)->default('encashment')->html('switch'); - $this->fields->unsignedSmallInteger('applicable_from_days')->default(0)->html('number'); - $this->fields->decimal('accrued_amount', 10, 2)->default(0.00)->html('amount'); - $this->fields->unsignedSmallInteger('accrued_max_days')->default(0)->html('number'); - $this->fields->unsignedTinyInteger('halfday_enable')->default(0)->html('switch'); - } - - /** - * List of structure for this model. - */ - public function structure($structure): array - { - - $structure['table'] = ['leave_id', 'days', 'apply_limit', 'employee_type', 'department_id', 'location_id', 'designation_id', 'halfday_enable']; - $structure['form'] = [ - ['label' => 'Leave Policy', 'class' => 'col-span-full', 'fields' => ['leave_id']], - ['label' => 'Leave Policy Description', 'class' => 'col-span-full', 'fields' => ['description']], - ['label' => 'Leave Policy Date', 'class' => 'col-span-full md:col-span-6 md:pr-2', 'fields' => ['days', 'color', 'apply_limit', 'employee_type', 'department_id', 'location_id']], - ['label' => 'Leave Policy Setting', 'class' => 'col-span-full md:col-span-6 md:pr-2', 'fields' => ['designation_id', 'gender', 'marital', 'f_year', 'apply_for_new_users']], - ['label' => 'Leave Policy Limit', 'class' => 'col-span-full md:col-span-6 md:pr-2', 'fields' => ['carryover_days', 'carryover_uses_limit', 'encashment_based_on', 'forward_default']], - ['label' => 'Leave Policy Range', 'class' => 'col-span-full md:col-span-6 md:pr-2', 'fields' => ['applicable_from_days', 'accrued_amount', 'accrued_max_days', 'halfday_enable']], - ]; - $structure['filter'] = ['department_id', 'location_id', 'designation_id']; - - return $structure; - } - - - /** - * Define rights for this model. - * - * @return array - */ - public function rights(): array - { - $rights = parent::rights(); - - $rights['staff'] = ['view' => true]; - $rights['registered'] = ['view' => true]; - $rights['guest'] = []; - - return $rights; - } - -} diff --git a/Entities/LeavePolicySegregation.php b/Entities/LeavePolicySegregation.php deleted file mode 100755 index 721b18f..0000000 --- a/Entities/LeavePolicySegregation.php +++ /dev/null @@ -1,100 +0,0 @@ - - */ - protected $fillable = [ - 'leave_policy_id', 'jan', 'feb', 'mar', 'apr', 'may', 'jun', 'jul', - 'aug', 'sep', 'oct', 'nov', 'dec', - ]; - - /** - * The fields that are to be render when performing relationship queries. - * - * @var array - */ - public $rec_names = ['leave_policy_id']; - - /** - * List of tables names that are need in this model during migration. - * - * @var array - */ - public array $migrationDependancy = []; - - /** - * The table associated with the model. - * - * @var string - */ - protected $table = "hrm_leave_policy_segregation"; - - /** - * List of fields to be migrated to the datebase when creating or updating model during migration. - * - * @param Blueprint $table - * @return void - */ - public function fields(Blueprint $table = null): void - { - $this->fields = $table ?? new Blueprint($this->table); - - $this->fields->bigIncrements('id'); - $this->fields->unsignedBigInteger('leave_policy_id')->index('leave_policy_id')->html('recordpicker')->relation(['hrm', 'leave_policy']); - $this->fields->unsignedTinyInteger('jan')->default(0)->html('number'); - $this->fields->unsignedTinyInteger('feb')->default(0)->html('number'); - $this->fields->unsignedTinyInteger('mar')->default(0)->html('number'); - $this->fields->unsignedTinyInteger('apr')->default(0)->html('number'); - $this->fields->unsignedTinyInteger('may')->default(0)->html('number'); - $this->fields->unsignedTinyInteger('jun')->default(0)->html('number'); - $this->fields->unsignedTinyInteger('jul')->default(0)->html('number'); - $this->fields->unsignedTinyInteger('aug')->default(0)->html('number'); - $this->fields->unsignedTinyInteger('sep')->default(0)->html('number'); - $this->fields->unsignedTinyInteger('oct')->default(0)->html('number'); - $this->fields->unsignedTinyInteger('nov')->default(0)->html('number'); - $this->fields->unsignedTinyInteger('dec')->default(0)->html('number'); - } - - /** - * List of structure for this model. - */ - public function structure($structure): array - { - - $structure['table'] = ['leave_policy_id', 'jan', 'feb', 'mar', 'apr', 'may', 'jun', 'jul', 'aug', 'sep', 'oct', 'nov', 'dec']; - $structure['form'] = [ - ['label' => 'Leave Policy Segregation', 'class' => 'col-span-full', 'fields' => ['leave_policy_id']], - ['label' => '[Jan-Jun] Leave Policy Segregation', 'class' => 'col-span-full md:col-span-6 md:pr-2', 'fields' => ['jan', 'feb', 'mar', 'apr', 'may', 'jun']], - ['label' => '[Jul-Dec] Leave Policy Segregation', 'class' => 'col-span-full md:col-span-6 md:pr-2', 'fields' => ['jul', 'aug', 'sep', 'oct', 'nov', 'dec']], - ]; - $structure['filter'] = ['leave_policy_id']; - - return $structure; - } - - - /** - * Define rights for this model. - * - * @return array - */ - public function rights(): array - { - $rights = parent::rights(); - - $rights['staff'] = ['view' => true]; - $rights['registered'] = ['view' => true]; - $rights['guest'] = []; - - return $rights; - } -} diff --git a/Entities/LeaveRequest.php b/Entities/LeaveRequest.php deleted file mode 100755 index ca4c9e9..0000000 --- a/Entities/LeaveRequest.php +++ /dev/null @@ -1,101 +0,0 @@ - - */ - protected $fillable = [ - 'partner_id', 'leave_id', 'leave_entitlement_id', 'day_status_id', 'days', - 'start_date', 'end_date', 'reason', 'last_status', - ]; - - /** - * The fields that are to be render when performing relationship queries. - * - * @var array - */ - public $rec_names = ['partner_id', 'leave_id']; - - /** - * List of tables names that are need in this model during migration. - * - * @var array - */ - public array $migrationDependancy = []; - - /** - * The table associated with the model. - * - * @var string - */ - protected $table = "leave_request"; - - /** - * List of fields to be migrated to the datebase when creating or updating model during migration. - * - * @param Blueprint $table - * @return void - */ - public function fields(Blueprint $table = null): void - { - $this->fields = $table ?? new Blueprint($this->table); - - $this->fields->bigIncrements('id')->html('text'); - $this->fields->unsignedBigInteger('partner_id')->index('partner_id')->html('recordpicker')->relation(['users']); - $this->fields->unsignedSmallInteger('leave_id')->html('recordpicker')->relation(['hrm', 'leave']); - $this->fields->unsignedBigInteger('leave_entitlement_id')->default(0)->index('leave_entitlement_id')->html('recordpicker')->relation(['hrm', 'leave_entitlement']); - $this->fields->unsignedSmallInteger('day_status_id')->default(1)->html('recordpicker')->relation(['hrm', 'day_status']); - $this->fields->unsignedDecimal('days', 5, 1)->default(0.0)->html('number'); - $this->fields->integer('start_date')->html('datetime'); - $this->fields->integer('end_date')->html('datetime'); - $this->fields->text('reason')->nullable()->html('textarea'); - $this->fields->unsignedSmallInteger('last_status')->default(2)->index('last_status')->html('number'); - - $this->fields->index(['partner_id', 'leave_id'], 'user_leave'); - $this->fields->index(['partner_id', 'leave_entitlement_id'], 'user_entitlement'); - } - - /** - * List of structure for this model. - */ - public function structure($structure): array - { - - $structure['table'] = ['partner_id', 'leave_id', 'leave_entitlement_id', 'day_status_id', 'days', 'start_date', 'end_date', 'last_status']; - $structure['form'] = [ - ['label' => 'Leave Request', 'class' => 'col-span-full', 'fields' => ['leave_id']], - ['label' => 'Leave Request Detail', 'class' => 'col-span-full md:col-span-6 md:pr-2', 'fields' => ['partner_id', 'leave_entitlement_id', 'day_status_id']], - ['label' => 'Leave Request Dates', 'class' => 'col-span-full md:col-span-6 md:pr-2', 'fields' => ['start_date', 'end_date']], - ['label' => 'Leave Request Last Status', 'class' => 'col-span-full md:col-span-6 md:pr-2', 'fields' => ['last_status']], - ['label' => 'Leave Request Reason', 'class' => 'col-span-full', 'fields' => ['reason']], - ]; - $structure['filter'] = ['partner_id', 'leave_id', 'leave_entitlement_id', 'day_status_id']; - - return $structure; - } - - - /** - * Define rights for this model. - * - * @return array - */ - public function rights(): array - { - $rights = parent::rights(); - - $rights['staff'] = ['view' => true]; - $rights['registered'] = ['view' => true]; - $rights['guest'] = []; - - return $rights; - } -} diff --git a/Entities/LeaveRequestDetail.php b/Entities/LeaveRequestDetail.php deleted file mode 100755 index bed7c05..0000000 --- a/Entities/LeaveRequestDetail.php +++ /dev/null @@ -1,94 +0,0 @@ - - */ - protected $fillable = [ - 'leave_request_id', 'leave_approval_status_id', 'workingday_status', - 'partner_id', 'f_year', 'leave_date', - ]; - - /** - * The fields that are to be render when performing relationship queries. - * - * @var array - */ - public $rec_names = ['leave_request_id', 'leave_approval_status_id', 'partner_id']; - - /** - * List of tables names that are need in this model during migration. - * - * @var array - */ - public array $migrationDependancy = []; - - /** - * The table associated with the model. - * - * @var string - */ - protected $table = "hrm_leave_request_detail"; - - /** - * List of fields to be migrated to the datebase when creating or updating model during migration. - * - * @param Blueprint $table - * @return void - */ - public function fields(Blueprint $table = null): void - { - $this->fields = $table ?? new Blueprint($this->table); - - $this->fields->bigIncrements('id')->html('number'); - $this->fields->unsignedBigInteger('leave_request_id')->index('leave_request_id')->html('recordpicker')->relation(['hrm', 'leave_request']); - $this->fields->unsignedBigInteger('leave_approval_status_id')->html('recordpicker')->relation(['hrm', 'leave_approval_status']); - $this->fields->unsignedTinyInteger('workingday_status')->default(1)->html('number'); - $this->fields->unsignedBigInteger('partner_id')->index('partner_id')->html('recordpicker')->relation(['users']); - $this->fields->smallInteger('f_year')->html('number'); - $this->fields->integer('leave_date')->html('date'); - - $this->fields->index(['partner_id', 'f_year', 'leave_date'], 'user_fyear_leave'); - } - - /** - * List of structure for this model. - */ - public function structure($structure): array - { - - $structure['table'] = ['leave_request_id', 'leave_approval_status_id', 'workingday_status', 'partner_id', 'f_year', 'leave_date']; - $structure['form'] = [ - ['label' => 'Leave Request Detail', 'class' => 'col-span-full', 'fields' => ['leave_request_id']], - ['label' => 'Leave Request Detail Setting', 'class' => 'col-span-full md:col-span-6 md:pr-2', 'fields' => ['leave_approval_status_id', 'workingday_status', 'partner_id']], - ['label' => 'Leave Request Detail Date', 'class' => 'w-/12', 'fields' => ['f_year', 'leave_date']], - ]; - $structure['filter'] = ['leave_request_id', 'leave_approval_status_id', 'workingday_status', 'partner_id']; - - return $structure; - } - - /** - * Define rights for this model. - * - * @return array - */ - public function rights(): array - { - $rights = parent::rights(); - - $rights['staff'] = ['view' => true]; - $rights['registered'] = ['view' => true]; - $rights['guest'] = []; - - return $rights; - } -} diff --git a/Entities/LeaveUnpaid.php b/Entities/LeaveUnpaid.php deleted file mode 100755 index 394ba97..0000000 --- a/Entities/LeaveUnpaid.php +++ /dev/null @@ -1,96 +0,0 @@ - - */ - protected $fillable = [ - 'leave_id', 'leave_request_id', 'leave_approval_status_id', 'partner_id', 'days', - 'amount', 'total', 'f_year', - ]; - - /** - * The fields that are to be render when performing relationship queries. - * - * @var array - */ - public $rec_names = ['leave_id', 'leave_request_id']; - - /** - * List of tables names that are need in this model during migration. - * - * @var array - */ - public array $migrationDependancy = []; - - /** - * The table associated with the model. - * - * @var string - */ - protected $table = "hrm_leave_unpaid"; - - /** - * List of fields to be migrated to the datebase when creating or updating model during migration. - * - * @param Blueprint $table - * @return void - */ - public function fields(Blueprint $table = null): void - { - $this->fields = $table ?? new Blueprint($this->table); - - $this->fields->bigIncrements('id')->html('number'); - $this->fields->unsignedSmallInteger('leave_id')->index('leave_id')->html('recordpicker')->relation(['hrm', 'leave']); - $this->fields->unsignedBigInteger('leave_request_id')->index('leave_request_id')->html('recordpicker')->relation(['hrm', 'leave_request']); - $this->fields->unsignedBigInteger('leave_approval_status_id')->index('leave_approval_status_id')->html('recordpicker')->relation(['hrm', 'leave_approval_status']); - $this->fields->unsignedBigInteger('partner_id')->index('partner_id')->html('recordpicker')->relation(['users']); - $this->fields->unsignedDecimal('days', 4, 1)->default(0.0)->html('number'); - $this->fields->decimal('amount', 20, 2)->default(0.00)->html('number'); - $this->fields->decimal('total', 20, 2)->default(0.00)->html('number'); - $this->fields->unsignedSmallInteger('f_year')->index('f_year')->html('number'); - } - - /** - * List of structure for this model. - */ - public function structure($structure): array - { - - $structure['table'] = ['leave_id', 'leave_request_id', 'leave_approval_status_id', 'partner_id', 'days', 'amount', 'total', 'f_year']; - $structure['form'] = [ - ['label' => 'Leave Unpaid', 'class' => 'col-span-full', 'fields' => ['leave_id']], - ['label' => 'Leave Unpaid Detail', 'class' => 'col-span-full md:col-span-6 md:pr-2', 'fields' => ['leave_request_id', 'leave_approval_status_id', 'partner_id', 'days']], - ['label' => 'Leave Unpaid Setting', 'class' => 'col-span-full md:col-span-6 md:pr-2', 'fields' => ['amount', 'total', 'f_year']], - ]; - $structure['filter'] = ['leave_id', 'leave_request_id', 'leave_approval_status_id', 'partner_id']; - - return $structure; - } - - - /** - * Define rights for this model. - * - * @return array - */ - public function rights(): array - { - $rights = parent::rights(); - - $rights['staff'] = ['view' => true]; - $rights['registered'] = ['view' => true]; - $rights['guest'] = []; - - return $rights; - } - -} diff --git a/Entities/PayrollAdditionalAllowanceDeduction.php b/Entities/PayrollAdditionalAllowanceDeduction.php deleted file mode 100755 index 492da33..0000000 --- a/Entities/PayrollAdditionalAllowanceDeduction.php +++ /dev/null @@ -1,92 +0,0 @@ - - */ - protected $fillable = [ - 'pay_item_id', 'pay_item_amount', 'empid', 'pay_item_add_or_deduct', 'payrun_id', 'note', - ]; - - /** - * The fields that are to be render when performing relationship queries. - * - * @var array - */ - public $rec_names = ['pay_item_id', 'pay_item_amount']; - - /** - * List of tables names that are need in this model during migration. - * - * @var array - */ - public array $migrationDependancy = []; - - /** - * The table associated with the model. - * - * @var string - */ - protected $table = "hrm_payroll_additional_allowance_deduction"; - - /** - * List of fields to be migrated to the datebase when creating or updating model during migration. - * - * @param Blueprint $table - * @return void - */ - public function fields(Blueprint $table = null): void - { - $this->fields = $table ?? new Blueprint($this->table); - - $this->fields->increments('id')->html('number'); - $this->fields->integer('pay_item_id')->html('recordpicker')->relation(['hrm', 'payroll_additional_allowance_deduction']); - $this->fields->decimal('pay_item_amount', 10, 2)->html('number'); - $this->fields->integer('empid')->html('number'); - $this->fields->integer('pay_item_add_or_deduct')->html('number'); - $this->fields->integer('payrun_id')->html('number'); - $this->fields->string('note')->nullable()->html('text'); - } - - /** - * List of structure for this model. - */ - public function structure($structure): array - { - - $structure['table'] = ['pay_item_id', 'pay_item_amount', 'empid', 'pay_item_add_or_deduct', 'payrun_id', 'note']; - $structure['form'] = [ - ['label' => 'Pay Item', 'class' => 'col-span-full', 'fields' => ['pay_item_id']], - ['label' => 'Payroll Additional Allowance Deduction Detail', 'class' => 'col-span-full md:col-span-6 md:pr-2', 'fields' => ['pay_item_amount', 'empid']], - ['label' => 'Other Payroll Additional Allowance Deduction Setting', 'class' => 'col-span-full md:col-span-6 md:pr-2', 'fields' => ['pay_item_add_or_deduct', 'payrun_id']], - ['label' => 'Payroll Additional Allowance Deduction Note', 'class' => 'col-span-full', 'fields' => ['note']], - ]; - $structure['filter'] = ['pay_item_id', 'pay_item_amount', 'empid', 'pay_item_add_or_deduct', 'payrun_id']; - - return $structure; - } - - /** - * Define rights for this model. - * - * @return array - */ - public function rights(): array - { - $rights = parent::rights(); - - $rights['staff'] = ['view' => true]; - $rights['registered'] = ['view' => true]; - $rights['guest'] = []; - - return $rights; - } -} diff --git a/Entities/PayrollCalendarTypeSetting.php b/Entities/PayrollCalendarTypeSetting.php deleted file mode 100755 index e4a3874..0000000 --- a/Entities/PayrollCalendarTypeSetting.php +++ /dev/null @@ -1,91 +0,0 @@ - - */ - protected $fillable = [ - 'pay_calendar_id', 'cal_type', 'pay_day', 'custom_month_day', 'pay_day_mode', - ]; - - /** - * The fields that are to be render when performing relationship queries. - * - * @var array - */ - public $rec_names = ['pay_calendar_id', 'cal_type']; - - /** - * List of tables names that are need in this model during migration. - * - * @var array - */ - public array $migrationDependancy = []; - - /** - * The table associated with the model. - * - * @var string - */ - protected $table = "hrm_payroll_calendar_type_setting"; - - /** - * List of fields to be migrated to the datebase when creating or updating model during migration. - * - * @param Blueprint $table - * @return void - */ - public function fields(Blueprint $table = null): void - { - $this->fields = $table ?? new Blueprint($this->table); - - $this->fields->increments('id')->html('number'); - $this->fields->integer('pay_calendar_id')->html('recordpicker')->relation(['hrm', 'payroll_calendar']); - $this->fields->integer('cal_type')->default(0)->html('number'); - $this->fields->integer('pay_day')->default(0)->html('number'); - $this->fields->integer('custom_month_day')->default(0)->html('number'); - $this->fields->integer('pay_day_mode')->default(0)->html('number'); - } - - /** - * List of structure for this model. - */ - public function structure($structure): array - { - - $structure['table'] = ['pay_calendar_id', 'cal_type', 'pay_day', 'custom_month_day', 'pay_day_mode']; - $structure['form'] = [ - ['label' => 'Pay Calendar', 'class' => 'col-span-full', 'fields' => ['pay_calendar_id']], - ['label' => 'Payroll Calendar Type Setting', 'class' => 'col-span-full md:col-span-6 md:pr-2', 'fields' => ['cal_type', 'pay_day']], - ['label' => 'Payroll Calendar Type More Info', 'class' => 'col-span-full md:col-span-6 md:pr-2', 'fields' => ['custom_month_day', 'pay_day_mode']], - ]; - $structure['filter'] = ['pay_calendar_id', 'cal_type', 'pay_day']; - - return $structure; - } - - - /** - * Define rights for this model. - * - * @return array - */ - public function rights(): array - { - $rights = parent::rights(); - - $rights['staff'] = ['view' => true]; - $rights['registered'] = ['view' => true]; - $rights['guest'] = []; - - return $rights; - } -} diff --git a/Entities/PayrollFixedPayment.php b/Entities/PayrollFixedPayment.php deleted file mode 100755 index 6ab634c..0000000 --- a/Entities/PayrollFixedPayment.php +++ /dev/null @@ -1,85 +0,0 @@ - - */ - protected $fillable = [ - 'pay_item_id', 'pay_item_amount', 'empid', 'pay_item_add_or_deduct', 'note', - ]; - - /** - * The fields that are to be render when performing relationship queries. - * - * @var array - */ - public $rec_names = ['pay_item_id', 'pay_item_amount']; - - /** - * List of tables names that are need in this model during migration. - * - * @var array - */ - public array $migrationDependancy = []; - - /** - * The table associated with the model. - * - * @var string - */ - protected $table = "hrm_payroll_fixed_payment"; - - /** - * List of fields to be migrated to the datebase when creating or updating model during migration. - * - * @param Blueprint $table - * @return void - */ - public function fields(Blueprint $table = null): void - { - $this->fields = $table ?? new Blueprint($this->table); - - $this->fields->increments('id')->html('number'); - $this->fields->integer('pay_item_id')->html('recordpicker')->relation(['hrm', 'payroll_additional_allowance_deduction']); - $this->fields->decimal('pay_item_amount', 10, 2)->html('number'); - $this->fields->integer('empid')->html('number'); - $this->fields->integer('pay_item_add_or_deduct')->html('number'); - $this->fields->string('note')->nullable()->html('text'); - } - - /** - * List of structure for this model. - */ - public function structure($structure): array - { - $structure['table'] = ['pay_item_id', 'pay_item_amount', 'empid', 'pay_item_add_or_deduct']; - $structure['filter'] = ['pay_item_id', 'pay_item_amount', 'empid', 'pay_item_add_or_deduct']; - - return $structure; - } - - - /** - * Define rights for this model. - * - * @return array - */ - public function rights(): array - { - $rights = parent::rights(); - - $rights['staff'] = ['view' => true]; - $rights['registered'] = ['view' => true]; - $rights['guest'] = []; - - return $rights; - } -} diff --git a/Entities/PayrollPayCalendar.php b/Entities/PayrollPayCalendar.php deleted file mode 100755 index c4d79c6..0000000 --- a/Entities/PayrollPayCalendar.php +++ /dev/null @@ -1,70 +0,0 @@ - - */ - protected $fillable = ['pay_calendar_name', 'pay_calendar_type']; - - /** - * The fields that are to be render when performing relationship queries. - * - * @var array - */ - public $rec_names = ['pay_calendar_name', 'pay_calendar_type']; - - /** - * List of tables names that are need in this model during migration. - * - * @var array - */ - public array $migrationDependancy = []; - - /** - * The table associated with the model. - * - * @var string - */ - protected $table = "hrm_payroll_pay_calendar"; - - /** - * List of fields to be migrated to the datebase when creating or updating model during migration. - * - * @param Blueprint $table - * @return void - */ - public function fields(Blueprint $table = null): void - { - $this->fields = $table ?? new Blueprint($this->table); - - $this->fields->increments('id')->html('hidden'); - $this->fields->string('pay_calendar_name', 64)->nullable()->html('text'); - $this->fields->string('pay_calendar_type', 16)->html('text'); - } - - - /** - * Define rights for this model. - * - * @return array - */ - public function rights(): array - { - $rights = parent::rights(); - - $rights['staff'] = ['view' => true]; - $rights['registered'] = ['view' => true]; - $rights['guest'] = []; - - return $rights; - } - -} diff --git a/Entities/PayrollPayCalendarEmployee.php b/Entities/PayrollPayCalendarEmployee.php deleted file mode 100755 index 04cb60a..0000000 --- a/Entities/PayrollPayCalendarEmployee.php +++ /dev/null @@ -1,71 +0,0 @@ - - */ - protected $fillable = ['pay_calendar_id', 'empid']; - - /** - * The fields that are to be render when performing relationship queries. - * - * @var array - */ - public $rec_names = ['pay_calendar_id', 'empid']; - - /** - * List of tables names that are need in this model during migration. - * - * @var array - */ - public array $migrationDependancy = []; - - /** - * The table associated with the model. - * - * @var string - */ - protected $table = "hrm_payroll_pay_calendar_employee"; - - /** - * List of fields to be migrated to the datebase when creating or updating model during migration. - * - * @param Blueprint $table - * - * @return void - */ - public function fields(Blueprint $table = null): void - { - $this->fields = $table ?? new Blueprint($this->table); - - $this->fields->increments('id'); - $this->fields->integer('pay_calendar_id')->html('recordpicker')->relation(['hrm', 'payroll_pay_calenda']); - $this->fields->bigInteger('empid')->html('number'); - } - - - /** - * Define rights for this model. - * - * @return array - */ - public function rights(): array - { - $rights = parent::rights(); - - $rights['staff'] = ['view' => true]; - $rights['registered'] = ['view' => true]; - $rights['guest'] = []; - - return $rights; - } - -} diff --git a/Entities/PayrollPayitem.php b/Entities/PayrollPayitem.php deleted file mode 100755 index b1f6aae..0000000 --- a/Entities/PayrollPayitem.php +++ /dev/null @@ -1,82 +0,0 @@ - - */ - protected $fillable = ['type', 'payitem', 'slug', 'pay_item_add_or_deduct']; - - /** - * The fields that are to be render when performing relationship queries. - * - * @var array - */ - public $rec_names = ['slug']; - - /** - * List of tables names that are need in this model during migration. - * - * @var array - */ - public array $migrationDependancy = []; - - /** - * The table associated with the model. - * - * @var string - */ - protected $table = "hrm_payroll_payitem"; - - /** - * List of fields to be migrated to the datebase when creating or updating model during migration. - * - * @param Blueprint $table - * @return void - */ - public function fields(Blueprint $table = null): void - { - $this->fields = $table ?? new Blueprint($this->table); - - $this->fields->increments('id')->html('hidden'); - $this->fields->string('type')->html('text'); - $this->fields->string('payitem')->html('text'); - $this->fields->string('slug')->html('text'); - $this->fields->integer('pay_item_add_or_deduct')->html('text'); - } - - /** - * List of structure for this model. - */ - public function structure($structure): array - { - $structure['table'] = ['type', 'payitem', 'slug', 'pay_item_add_or_deduct']; - $structure['filter'] = ['type', 'payitem', 'slug']; - - return $structure; - } - - - /** - * Define rights for this model. - * - * @return array - */ - public function rights(): array - { - $rights = parent::rights(); - - $rights['staff'] = ['view' => true]; - $rights['registered'] = ['view' => true]; - $rights['guest'] = []; - - return $rights; - } -} diff --git a/Entities/PayrollPayrun.php b/Entities/PayrollPayrun.php deleted file mode 100755 index c5dc5b5..0000000 --- a/Entities/PayrollPayrun.php +++ /dev/null @@ -1,90 +0,0 @@ - - */ - protected $fillable = ['pay_cal_id', 'payment_date', 'from_date', 'to_date', 'approve_status', 'jr_tran_id']; - - /** - * The fields that are to be render when performing relationship queries. - * - * @var array - */ - public $rec_names = ['pay_cal_id', 'payment_date']; - /** - * List of tables names that are need in this model during migration. - * - * @var array - */ - public array $migrationDependancy = []; - - /** - * The table associated with the model. - * - * @var string - */ - protected $table = "hrm_payroll_payrun"; - - /** - * List of fields to be migrated to the datebase when creating or updating model during migration. - * - * @param Blueprint $table - * @return void - */ - public function fields(Blueprint $table = null): void - { - $this->fields = $table ?? new Blueprint($this->table); - - $this->fields->increments('id')->html('number'); - $this->fields->unsignedInteger('pay_cal_id')->html('recordpicker')->relation(['hrm', 'payroll_pay_calendar']); - $this->fields->date('payment_date')->nullable()->html('date'); - $this->fields->date('from_date')->nullable()->html('date'); - $this->fields->date('to_date')->nullable()->html('date'); - $this->fields->unsignedInteger('approve_status')->default(0)->html('switch'); - $this->fields->unsignedInteger('jr_tran_id')->default(0)->html('number'); - } - - /** - * List of structure for this model. - */ - public function structure($structure): array - { - - $structure['table'] = ['pay_cal_id', 'payment_date', 'from_date', 'to_date', 'approve_status', 'jr_tran_id']; - $structure['form'] = [ - ['label' => 'Payroll Payrun Pay Cal', 'class' => 'col-span-full', 'fields' => ['pay_cal_id']], - ['label' => 'Payroll Payrun Payment', 'class' => 'col-span-full md:col-span-6 md:pr-2', 'fields' => ['payment_date', 'from_date', 'to_date']], - ['label' => 'Payroll Payrun Date', 'class' => 'col-span-full md:col-span-6 md:pr-2', 'fields' => ['approve_status', 'jr_tran_id']], - ]; - $structure['filter'] = ['pay_cal_id', 'payment_date', 'from_date', 'to_date', 'approve_status', 'jr_tran_id']; - - return $structure; - } - - - /** - * Define rights for this model. - * - * @return array - */ - public function rights(): array - { - $rights = parent::rights(); - - $rights['staff'] = ['view' => true]; - $rights['registered'] = ['view' => true]; - $rights['guest'] = []; - - return $rights; - } - -} diff --git a/Entities/PayrollPayrunDetail.php b/Entities/PayrollPayrunDetail.php deleted file mode 100755 index 7b78d56..0000000 --- a/Entities/PayrollPayrunDetail.php +++ /dev/null @@ -1,97 +0,0 @@ - - */ - protected $fillable = [ - 'payrun_id', 'pay_cal_id', 'payment_date', 'empid', 'pay_item_id', 'pay_item_amount', - 'pay_item_add_or_deduct', 'note', 'approve_status', - ]; - - /** - * The fields that are to be render when performing relationship queries. - * - * @var array - */ - public $rec_names = ['payrun_id', 'payment_date']; - - /** - * List of tables names that are need in this model during migration. - * - * @var array - */ - public array $migrationDependancy = []; - - /** - * The table associated with the model. - * - * @var string - */ - protected $table = "hrm_payroll_payrun_detail"; - - /** - * List of fields to be migrated to the datebase when creating or updating model during migration. - * - * @param Blueprint $table - * @return void - */ - public function fields(Blueprint $table = null): void - { - $this->fields = $table ?? new Blueprint($this->table); - - $this->fields->increments('id')->html('number'); - $this->fields->unsignedInteger('payrun_id')->html('number'); - $this->fields->unsignedInteger('pay_cal_id')->html('number'); - $this->fields->date('payment_date')->nullable()->html('date'); - $this->fields->unsignedInteger('empid')->html('number'); - $this->fields->integer('pay_item_id')->html('number'); - $this->fields->decimal('pay_item_amount', 10, 2)->html('number'); - $this->fields->integer('pay_item_add_or_deduct')->html('number'); - $this->fields->string('note')->nullable()->html('text'); - $this->fields->unsignedInteger('approve_status')->default(0)->html('switch'); - } - - /** - * List of structure for this model. - */ - public function structure($structure): array - { - - $structure['table'] = ['payrun_id', 'pay_cal_id', 'payment_date', 'empid', 'pay_item_id', 'pay_item_amount', 'approve_status']; - $structure['form'] = [ - ['label' => 'Payroll Payrun Payrun', 'class' => 'col-span-full', 'fields' => ['payrun_id']], - ['label' => 'Payroll Payrun Detail', 'class' => 'col-span-full md:col-span-6 md:pr-2', 'fields' => ['pay_cal_id', 'payment_date', 'empid', 'pay_item_id']], - ['label' => 'Payroll Payrun Other', 'class' => 'col-span-full md:col-span-6 md:pr-2', 'fields' => ['pay_item_amount', 'pay_item_add_or_deduct', 'note', 'approve_status']], - ]; - $structure['filter'] = ['payrun_id', 'pay_cal_id', 'payment_date', 'empid', 'pay_item_id', 'pay_item_amount']; - - return $structure; - } - - - /** - * Define rights for this model. - * - * @return array - */ - public function rights(): array - { - $rights = parent::rights(); - - $rights['staff'] = ['view' => true]; - $rights['registered'] = ['view' => true]; - $rights['guest'] = []; - - return $rights; - } - -} diff --git a/Entities/UserLeave.php b/Entities/UserLeave.php deleted file mode 100755 index 2914f35..0000000 --- a/Entities/UserLeave.php +++ /dev/null @@ -1,71 +0,0 @@ - - */ - protected $fillable = ['partner_id', 'request_id', 'title', 'date']; - - /** - * The fields that are to be render when performing relationship queries. - * - * @var array - */ - public $rec_names = ['partner_id', 'request_id']; - - /** - * List of tables names that are need in this model during migration. - * - * @var array - */ - public array $migrationDependancy = []; - - /** - * The table associated with the model. - * - * @var string - */ - protected $table = "hrm_user_leave"; - - /** - * List of fields to be migrated to the datebase when creating or updating model during migration. - * - * @param Blueprint $table - * @return void - */ - public function fields(Blueprint $table = null): void - { - $this->fields = $table ?? new Blueprint($this->table); - - $this->fields->bigIncrements('id')->html('number'); - $this->fields->integer('partner_id')->nullable()->html('number'); - $this->fields->integer('request_id')->nullable()->html('number'); - $this->fields->string('title')->nullable()->html('text'); - $this->fields->date('date')->nullable()->html('date'); - } - - - /** - * Define rights for this model. - * - * @return array - */ - public function rights(): array - { - $rights = parent::rights(); - - $rights['staff'] = ['view' => true]; - $rights['registered'] = ['view' => true]; - $rights['guest'] = []; - - return $rights; - } -} diff --git a/Entities/WorkExperience.php b/Entities/WorkExperience.php deleted file mode 100755 index 9314788..0000000 --- a/Entities/WorkExperience.php +++ /dev/null @@ -1,91 +0,0 @@ - - */ - protected $fillable = ['employee_id', 'company_name', 'job_title', 'from', 'to', 'description']; - - /** - * The fields that are to be render when performing relationship queries. - * - * @var array - */ - public $rec_names = ['employee_id', 'company_name']; - /** - * List of tables names that are need in this model during migration. - * - * @var array - */ - public array $migrationDependancy = []; - - /** - * The table associated with the model. - * - * @var string - */ - protected $table = "hrm_work_experience"; - - /** - * List of fields to be migrated to the datebase when creating or updating model during migration. - * - * @param Blueprint $table - * @return void - */ - public function fields(Blueprint $table = null): void - { - $this->fields = $table ?? new Blueprint($this->table); - - $this->fields->increments('id')->html('number'); - $this->fields->integer('employee_id')->nullable()->index('employee_id')->html('number'); - $this->fields->string('company_name', 100)->nullable()->html('text'); - $this->fields->string('job_title', 100)->nullable()->html('text'); - $this->fields->date('from')->nullable()->html('date'); - $this->fields->date('to')->nullable()->html('date'); - $this->fields->text('description')->nullable()->html('textarea'); - } - - /** - * List of structure for this model. - */ - public function structure($structure): array - { - - $structure['table'] = ['employee_id', 'company_name', 'job_title', 'from', 'to']; - $structure['form'] = [ - ['label' => 'Work Experience Job Title', 'class' => 'col-span-full', 'fields' => ['job_title']], - ['label' => 'Work Experience Detail', 'class' => 'col-span-full md:col-span-6 md:pr-2', 'fields' => ['employee_id', 'company_name']], - ['label' => 'Work Experience From - To', 'class' => 'col-span-full md:col-span-6 md:pr-2', 'fields' => ['from', 'to']], - ['label' => 'Work Experience Description', 'class' => 'col-span-full', 'fields' => ['description']], - ]; - $structure['filter'] = ['employee_id', 'company_name', 'job_title']; - - return $structure; - } - - - /** - * Define rights for this model. - * - * @return array - */ - public function rights(): array - { - $rights = parent::rights(); - - $rights['staff'] = ['view' => true]; - $rights['registered'] = ['view' => true]; - $rights['guest'] = []; - - return $rights; - } - -}