# Master Profil Gaji

- Module key: `MasterProfilGaji`
- Category: `HRIS`
- Path: `app/Modules/MasterProfilGaji`

## Ringkasan

Master Profil Gaji berada di kategori HRIS. Modul ini memiliki 15 definisi route, 1 controller, 2 model, dan 1 view. Database module terdeteksi pada tabel: `master_profil_gajis`, `master_profil_gaji_details`.

## Flowchart

```mermaid
flowchart TD
    A[User / Operator] --> B[Menu Master Profil Gaji]
    B --> C[Routes: 15]
    C --> D[Controllers: 1]
    D --> E[Views: 1]
    D --> F[(Tables: 2<br/>master_profil_gajis<br/>master_profil_gaji_details)]
    D --> G[Validation / Business Rules]
    G --> F
    F --> H[Report / Export / Audit]
```


## Routes

- `Route::middleware(['auth', 'ip.block', 'menu.access'])->group(function () {`  
  File: `app/Modules/MasterProfilGaji/routes/web.php`
- `Route::prefix('master-profil-gaji')->name('master_profil_gaji.')->group(function () {`  
  File: `app/Modules/MasterProfilGaji/routes/web.php`
- `Route::get('/', [MasterProfilGajiController::class, 'index'])->name('index');`  
  File: `app/Modules/MasterProfilGaji/routes/web.php`
- `Route::get('data', [MasterProfilGajiController::class, 'data'])->name('data');`  
  File: `app/Modules/MasterProfilGaji/routes/web.php`
- `Route::get('refs', [MasterProfilGajiController::class, 'refs'])->name('refs');`  
  File: `app/Modules/MasterProfilGaji/routes/web.php`
- `Route::post('/', [MasterProfilGajiController::class, 'store'])->name('store');`  
  File: `app/Modules/MasterProfilGaji/routes/web.php`
- `Route::post('{id}/copy', [MasterProfilGajiController::class, 'copy'])->name('copy');`  
  File: `app/Modules/MasterProfilGaji/routes/web.php`
- `Route::put('{id}', [MasterProfilGajiController::class, 'update'])->name('update');`  
  File: `app/Modules/MasterProfilGaji/routes/web.php`
- `Route::delete('{id}', [MasterProfilGajiController::class, 'destroy'])->name('destroy');`  
  File: `app/Modules/MasterProfilGaji/routes/web.php`
- `Route::get('{id}/details', [MasterProfilGajiController::class, 'detailData'])->name('details.data');`  
  File: `app/Modules/MasterProfilGaji/routes/web.php`
- `Route::get('{id}/details/upload-template', [MasterProfilGajiController::class, 'downloadDetailImportTemplate'])->name('details.upload_template');`  
  File: `app/Modules/MasterProfilGaji/routes/web.php`
- `Route::post('{id}/details/upload', [MasterProfilGajiController::class, 'uploadDetails'])->name('details.upload');`  
  File: `app/Modules/MasterProfilGaji/routes/web.php`
- `Route::post('{id}/details', [MasterProfilGajiController::class, 'storeDetail'])->name('details.store');`  
  File: `app/Modules/MasterProfilGaji/routes/web.php`
- `Route::put('details/{id}', [MasterProfilGajiController::class, 'updateDetail'])->name('details.update');`  
  File: `app/Modules/MasterProfilGaji/routes/web.php`
- `Route::delete('details/{id}', [MasterProfilGajiController::class, 'destroyDetail'])->name('details.destroy');`  
  File: `app/Modules/MasterProfilGaji/routes/web.php`

## Controllers

- `app/Modules/MasterProfilGaji/Http/Controllers/MasterProfilGajiController.php`

## Models

- `app/Modules/MasterProfilGaji/Models/ProfilGajiDetailModel.php`
- `app/Modules/MasterProfilGaji/Models/ProfilGajiModel.php`

## Views

- `app/Modules/MasterProfilGaji/Resources/views/index.blade.php`

## Database / Migration

### `master_profil_gajis`
- Actions: `create`, `table`
- Columns: 10
  - `code:string`
  - `name:string`
  - `description:text`
  - `is_active:boolean`
  - `salary_scheme:enum`
  - `absence_deduction_mode:enum`
  - `absence_deduction_mode:dropColumn`
  - `salary_scheme:dropColumn`
  - `monthly_hour_base:unsignedSmallInteger`
  - `monthly_hour_base:dropColumn`
- Migrations:
  - `app/Modules/MasterProfilGaji/Database/migrations/2026_02_24_163000_create_master_profil_gajis_table.php`
  - `app/Modules/MasterProfilGaji/Database/migrations/2026_03_05_080000_add_all_in_policy_to_master_profil_gajis_table.php`
  - `app/Modules/MasterProfilGaji/Database/migrations/2026_03_12_150000_add_monthly_hour_base_to_master_profil_gajis_table.php`
### `master_profil_gaji_details`
- Actions: `create`
- Columns: 14
  - `profil_gaji_id:foreignId`
  - `component_group:enum`
  - `komponen_pendapatan_id:foreignId`
  - `komponen_potongan_id:foreignId`
  - `calc_type:enum`
  - `amount:decimal`
  - `percent_value:decimal`
  - `percent_base:enum`
  - `is_prorate:boolean`
  - `effective_start:date`
  - `effective_end:date`
  - `sort_order:unsignedSmallInteger`
  - `notes:text`
  - `is_active:boolean`
- Migrations:
  - `app/Modules/MasterProfilGaji/Database/migrations/2026_02_24_163100_create_master_profil_gaji_details_table.php`
