@extends('layouts.app') @section('title', '假別管理') @section('content')

假別管理

設定請假類型、規則與應備文件
@foreach(['success','error'] as $t) @if(session($t))
{{ session($t) }}
@endif @endforeach {{-- 勞工請假規則參考(全寬橫排) --}}
勞工請假規則參考
{{-- 特休 --}}
特休假(勞基法§38)
6個月~1年3日 1~2年7日 2~3年10日 3~5年14日 5~10年15日 10年起每年+1最多30日
{{-- 婚假 --}}
婚假(請假規則§2)
8天全薪。
自結婚日前10日起3個月內請畢(雇主同意可延至1年)。
需附結婚證書。
{{-- 喪假 --}}
喪假(請假規則§3)
父母、配偶8日 祖父母(含外祖父母)、子女、配偶父母6日 兄弟姊妹3日
全薪。需附相關證明文件。
{{-- 事假 --}}
事假(請假規則§7)
全年合計不超過14天。
不帶薪(工資不給付)。
{{-- 病假 --}}
病假(請假規則§4)
未住院:1年內前30日半薪,超過30日不支薪。
住院:不支薪。
需附醫療院所證明。
{{-- 現有假別 --}}
現有假別
@forelse($types as $lt) {{-- 編輯列 --}} @empty @endforelse
名稱 說明 需附件 有薪 狀態
{{ $lt->name }} {{ $lt->notes ?: '—' }} @if($lt->requires_document) @else @endif @if($lt->is_paid) @else @endif @if($lt->is_active) 啟用 @else 停用 @endif
@csrf @method('PUT')
requires_document ? 'checked' : '' }}>
needs_balance ? 'checked' : '' }}>
is_paid ? 'checked' : '' }}>
is_active ? 'checked' : '' }}>
尚無假別,請在右側新增
{{-- 右側:新增 + 快速新增 --}}
{{-- 新增假別 --}}
新增假別
@csrf
{{-- 快速新增常用假別 --}}
快速新增常用假別
@php // [name, code, color, is_paid, needs_balance, requires_document, notes] $presets = [ ['特休', 'annual', '#0d6efd', 1, 1, 0, '依年資計算(6個月3日~10年以上最多30日)。'], ['病假', 'sick', '#20c997', 1, 0, 1, '未住院:1年內30天以內半薪,超過30天不支薪。住院:不支薪。需附醫療院所證明。'], ['事假', 'personal', '#fd7e14', 0, 0, 0, '全年合計不超過14天,不帶薪(工資不給付)。'], ['婚假', 'marriage', '#d63384', 1, 0, 1, '8天全薪。自結婚之日前10日起3個月內請畢(雇主同意可延至1年內)。需附結婚證書。'], ['喪假', 'funeral', '#6c757d', 1, 0, 1, '依親等全薪。父母、配偶:8天;祖父母(含外祖父母)、子女、配偶父母:6天;兄弟姊妹:3天。需附相關證明文件。'], ['公假', 'official', '#0dcaf0', 1, 0, 0, '依法令規定,工資照給。'], ]; @endphp
@foreach($presets as [$name,$code,$color,$paid,$balance,$doc,$notes]) @if(!$types->where('code',$code)->count())
@csrf
@else
{{ $name }} 已建立 ✓
@endif @endforeach
@endsection