Compare commits
2 Commits
863d0e7b98
...
78c432eaa0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
78c432eaa0 | ||
|
|
16487dadf5 |
@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Http\Requests\Admin\HR;
|
||||
|
||||
use App\Concerns\CurrencyStripping;
|
||||
use App\Enums\EmploymentStatus;
|
||||
use App\Enums\Gender;
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
@ -9,12 +10,19 @@
|
||||
|
||||
class EmployeeRequest extends FormRequest
|
||||
{
|
||||
use CurrencyStripping;
|
||||
|
||||
public function authorize(): bool
|
||||
{
|
||||
return $this->user()->can('employees.create')
|
||||
|| $this->user()->can('employees.update');
|
||||
}
|
||||
|
||||
public function prepareForValidation(): void
|
||||
{
|
||||
$this->merge($this->stripCurrencyDot($this->all(), 'base_salary'));
|
||||
}
|
||||
|
||||
public function rules(): array
|
||||
{
|
||||
$userId = $this->route('user')?->id;
|
||||
|
||||
@ -401,6 +401,10 @@ export default function EmployeeEdit({ employee, roles, canViewAll }: Props) {
|
||||
</Label>
|
||||
<RupiahInput
|
||||
name="base_salary"
|
||||
defaultValue={
|
||||
employee.employee
|
||||
?.base_salary ?? 0
|
||||
}
|
||||
/>
|
||||
<InputError
|
||||
message={
|
||||
|
||||
@ -60,15 +60,6 @@ export default function Login() {
|
||||
<InputError message={errors.password} />
|
||||
</div>
|
||||
|
||||
<div className="flex items-center space-x-3">
|
||||
<Checkbox
|
||||
id="remember"
|
||||
name="remember"
|
||||
tabIndex={3}
|
||||
/>
|
||||
<Label htmlFor="remember">Ingat saya</Label>
|
||||
</div>
|
||||
|
||||
<Button
|
||||
type="submit"
|
||||
className="mt-4 w-full"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user