Skip to content

Conversation

@IanFangQuad
Copy link
Owner

  • refine js in index.blade / php in calendar service
  • add enum to display leave type in Chinese on calendar
  • prevent leave from edit/deleting by other user
  • bug fix: count hour

@EvanWood00
Copy link

app/Http/Requests/LeavePostRequest.php

  1. dayoff的條件可以放在Repository
  2. function參數建議給強型態
    app/Services/CalendarService.php
  3. $type = LeaveType::fromKey($leave->type);
    $leave->type = $type;
    可以併成一行
  4. 可以直接用$range跑迴圈塞$leavesReform就好
  5. 詢問collect()->push($leave)的用意
  6. Enum的用途應是對應各假別的代號,用fromKey抓Enum後,再用$event['type']->key,其實沒必要
  7. 請假天數判斷,可改成如開始為下午+0.5、結束為中午+0.5,除此之外都+1
  8. 用js判斷是否顯示編輯/刪除鈕,需確認後端有驗證

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants