diff --git a/api-doc.md b/api-doc.md index ba1a22502..fee784eff 100644 --- a/api-doc.md +++ b/api-doc.md @@ -309,10 +309,11 @@ - Headers : none - Body : { - "name": "mansi dhameliya", - "date": "3 jan 2023", // OR if you want to add multiple dates, you can add like this : "3 jan 2023 to 5 jan 2023" - "status": 1, // you can use 1 for request - "reason": "Casual Leave", + "name": "mansi dhameliya", + "date": "3 jan 2023", // OR if you want to add multiple dates, you can add like this : "3 jan 2023 to 5 jan 2023" + "duration": "morning" // // You can add morning or evening or 3 days as you want + "status": 1, // you can use 1 for request + "reason": "Casual Leave", "receiver": "hr@canopas.com", } - Response : diff --git a/leave/leave.go b/leave/leave.go index f2718d311..e7a700275 100644 --- a/leave/leave.go +++ b/leave/leave.go @@ -21,6 +21,7 @@ const ( type LeaveData struct { Name string `json:"name" form:"name"` Date string `json:"date" form:"date"` + Duration string `json:"duration" form:"duration"` Status int `json:"status" form:"status"` Reason string `json:"reason" form:"reason"` Receiver string `json:"receiver" form:"receiver"` diff --git a/leave/templates/new-leave-email-template.html b/leave/templates/new-leave-email-template.html index e3423c1a4..0a7dbef47 100644 --- a/leave/templates/new-leave-email-template.html +++ b/leave/templates/new-leave-email-template.html @@ -11,11 +11,11 @@
- There's a new leave request from {{.Name}}. Please check Unity for + There's a new leave request for the {{.Duration}} from {{.Name}}. Please check Unity for more information.
- Date : {{.Date}}Date : {{.Date}} ({{.Duration}})
Status:
{{.StatusValue}}
diff --git a/templates/new-leave-email-template.html b/templates/new-leave-email-template.html
index e3423c1a4..0a7dbef47 100644
--- a/templates/new-leave-email-template.html
+++ b/templates/new-leave-email-template.html
@@ -11,11 +11,11 @@
- There's a new leave request from {{.Name}}. Please check Unity for + There's a new leave request for the {{.Duration}} from {{.Name}}. Please check Unity for more information.
- Date : {{.Date}}Date : {{.Date}} ({{.Duration}})
Status:
{{.StatusValue}}