mirror of
https://github.com/RustyRaptor/schej.it.git
synced 2026-12-04 00:05:20 -07:00
save start on monday prop on the backend
This commit is contained in:
1 parent
46440abaf3
commit
59ebaf2fe9
3 files changed
+12
No files matched your search
@@ -602,6 +602,7 @@ export default {
|
||||
? parseInt(this.sendEmailAfterXResponses)
|
||||
: -1,
|
||||
collectEmails: this.collectEmails,
|
||||
startOnMonday: this.startOnMonday,
|
||||
}
|
||||
const posthogPayload = {
|
||||
eventName: this.name,
|
||||
@@ -616,6 +617,7 @@ export default {
|
||||
? parseInt(this.sendEmailAfterXResponses)
|
||||
: -1,
|
||||
eventCollectEmails: this.collectEmails,
|
||||
eventStartOnMonday: this.startOnMonday,
|
||||
}
|
||||
|
||||
if (!this.edit) {
|
||||
@@ -760,6 +762,9 @@ export default {
|
||||
selectedDaysOfWeek.push(date.getUTCDay())
|
||||
}
|
||||
this.selectedDaysOfWeek = selectedDaysOfWeek
|
||||
if (this.event.startOnMonday) {
|
||||
this.startOnMonday = true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,6 +29,9 @@ type Event struct {
|
||||
|
||||
Type EventType `json:"type" bson:"type,omitempty"`
|
||||
|
||||
// Whether to start the event on Monday (as opposed to Sunday, used for DOW events)
|
||||
StartOnMonday *bool `json:"startOnMonday" bson:"startOnMonday,omitempty"`
|
||||
|
||||
// Whether to enable blind availability
|
||||
BlindAvailabilityEnabled *bool `json:"blindAvailabilityEnabled" bson:"blindAvailabilityEnabled,omitempty"`
|
||||
|
||||
|
||||
@@ -56,6 +56,7 @@ func createEvent(c *gin.Context) {
|
||||
Type models.EventType `json:"type" binding:"required"`
|
||||
|
||||
// Only for events (not groups)
|
||||
StartOnMonday *bool `json:"startOnMonday"`
|
||||
NotificationsEnabled *bool `json:"notificationsEnabled"`
|
||||
BlindAvailabilityEnabled *bool `json:"blindAvailabilityEnabled"`
|
||||
DaysOnly *bool `json:"daysOnly"`
|
||||
@@ -91,6 +92,7 @@ func createEvent(c *gin.Context) {
|
||||
Name: payload.Name,
|
||||
Duration: payload.Duration,
|
||||
Dates: payload.Dates,
|
||||
StartOnMonday: payload.StartOnMonday,
|
||||
NotificationsEnabled: payload.NotificationsEnabled,
|
||||
BlindAvailabilityEnabled: payload.BlindAvailabilityEnabled,
|
||||
DaysOnly: payload.DaysOnly,
|
||||
@@ -219,6 +221,7 @@ func editEvent(c *gin.Context) {
|
||||
Description *string `json:"description"`
|
||||
|
||||
// Only for events (not groups)
|
||||
StartOnMonday *bool `json:"startOnMonday"`
|
||||
NotificationsEnabled *bool `json:"notificationsEnabled"`
|
||||
BlindAvailabilityEnabled *bool `json:"blindAvailabilityEnabled"`
|
||||
DaysOnly *bool `json:"daysOnly"`
|
||||
@@ -264,6 +267,7 @@ func editEvent(c *gin.Context) {
|
||||
event.Description = payload.Description
|
||||
event.Duration = payload.Duration
|
||||
event.Dates = payload.Dates
|
||||
event.StartOnMonday = payload.StartOnMonday
|
||||
event.NotificationsEnabled = payload.NotificationsEnabled
|
||||
event.BlindAvailabilityEnabled = payload.BlindAvailabilityEnabled
|
||||
event.DaysOnly = payload.DaysOnly
|
||||
|
||||
Reference in new issue
Block a user