From 12305948ad840c5b3e6054fd9c38ad63d039cb59 Mon Sep 17 00:00:00 2001 From: Priyanka Gour Date: Tue, 12 Sep 2023 11:49:34 +0530 Subject: [PATCH] merge master --- api-doc.md | 9 +++++---- leave/leave.go | 1 + leave/templates/new-leave-email-template.html | 4 ++-- templates/new-leave-email-template.html | 4 ++-- 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/api-doc.md b/api-doc.md index ba1a22502..2074f370f 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": "first-half" // You can add first-half or second-half 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..76a66baf2 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..76a66baf2 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}}