feat(display-attendies): display restaurant
This commit is contained in:
parent
84eff374ee
commit
151151e39e
9 changed files with 64 additions and 42 deletions
|
@ -89,6 +89,16 @@ func GetAttendiesByEventPublicTable(c *fiber.Ctx) error {
|
||||||
"WaitinglistDesc": localizer.MustLocalize(&i18n.LocalizeConfig{
|
"WaitinglistDesc": localizer.MustLocalize(&i18n.LocalizeConfig{
|
||||||
MessageID: "WaitinglistDesc",
|
MessageID: "WaitinglistDesc",
|
||||||
}),
|
}),
|
||||||
|
"Restaurant": localizer.MustLocalize(&i18n.LocalizeConfig{
|
||||||
|
MessageID: "Restaurant",
|
||||||
|
PluralCount: 1,
|
||||||
|
}),
|
||||||
|
"Yes": localizer.MustLocalize(&i18n.LocalizeConfig{
|
||||||
|
MessageID: "Yes",
|
||||||
|
}),
|
||||||
|
"No": localizer.MustLocalize(&i18n.LocalizeConfig{
|
||||||
|
MessageID: "No",
|
||||||
|
}),
|
||||||
}
|
}
|
||||||
sort.Sort(entities.ByRegistrationTime(attendies))
|
sort.Sort(entities.ByRegistrationTime(attendies))
|
||||||
roleSuiter, _ := service.GetRoleByName("Suiter")
|
roleSuiter, _ := service.GetRoleByName("Suiter")
|
||||||
|
@ -106,5 +116,6 @@ func GetAttendiesByEventPublicTable(c *fiber.Ctx) error {
|
||||||
"Attendies": attendies,
|
"Attendies": attendies,
|
||||||
"SuiterWaitingList": suiterWaitingList,
|
"SuiterWaitingList": suiterWaitingList,
|
||||||
"Locals": localizations,
|
"Locals": localizations,
|
||||||
|
"EventType": *(event).EventType,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,3 +34,11 @@ tbody>tr:nth-child(even) {
|
||||||
tbody>tr:nth-child(odd) {
|
tbody>tr:nth-child(odd) {
|
||||||
background-color: #e9e9e9;
|
background-color: #e9e9e9;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.tdgreen {
|
||||||
|
background-color: #8bff6e;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tdred {
|
||||||
|
background-color: #ff6e6e;
|
||||||
|
}
|
|
@ -80,7 +80,6 @@ func GetAttendieListFromPretixJson(pretixEvent entities.Pretix_Event, event enti
|
||||||
func GetAttendiesFromPretixJsonWithRoleQuestion(pretixEvent *entities.Pretix_Event, event *entities.Db_Event) ([]entities.Db_Attendies, error) {
|
func GetAttendiesFromPretixJsonWithRoleQuestion(pretixEvent *entities.Pretix_Event, event *entities.Db_Event) ([]entities.Db_Attendies, error) {
|
||||||
var attendies []entities.Db_Attendies
|
var attendies []entities.Db_Attendies
|
||||||
for _, order := range pretixEvent.Results {
|
for _, order := range pretixEvent.Results {
|
||||||
fmt.Println("Here")
|
|
||||||
if order.Status == "c" || order.Status == "e" {
|
if order.Status == "c" || order.Status == "e" {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,6 +6,9 @@
|
||||||
<tr class="tableHeading">
|
<tr class="tableHeading">
|
||||||
<th>{{ .Locals.Name }}</th>
|
<th>{{ .Locals.Name }}</th>
|
||||||
<th>{{ .Locals.Role }}</th>
|
<th>{{ .Locals.Role }}</th>
|
||||||
|
{{ if eq .EventType "Suitwalk" }}
|
||||||
|
<th>{{ .Locals.Restaurant }}</th>
|
||||||
|
{{ end }}
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
|
@ -23,6 +26,11 @@
|
||||||
{{ else if eq $suiter.Role.Name "Guest" }}
|
{{ else if eq $suiter.Role.Name "Guest" }}
|
||||||
<td>{{ $.Locals.Guest }}</td>
|
<td>{{ $.Locals.Guest }}</td>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
{{ if $suiter.AttendsRestaurant }}
|
||||||
|
<td class="tdgreen">✓ {{ $.Locals.Yes }}</td>
|
||||||
|
{{ else }}
|
||||||
|
<td class="tdred">❌ {{ $.Locals.No }}</td>
|
||||||
|
{{ end }}
|
||||||
</tr>
|
</tr>
|
||||||
{{end}}
|
{{end}}
|
||||||
</tbody>
|
</tbody>
|
||||||
|
@ -35,6 +43,9 @@
|
||||||
<tr class="tableHeading">
|
<tr class="tableHeading">
|
||||||
<th>{{ .Locals.Name }}</th>
|
<th>{{ .Locals.Name }}</th>
|
||||||
<th>{{ .Locals.Role }}</th>
|
<th>{{ .Locals.Role }}</th>
|
||||||
|
{{ if eq .EventType "Suitwalk" }}
|
||||||
|
<th>Restaurant</th>
|
||||||
|
{{ end }}
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
|
|
|
@ -76,4 +76,17 @@ var defaultMessages = []i18n.Message{
|
||||||
One: "#SpecialAnimal",
|
One: "#SpecialAnimal",
|
||||||
Other: "#SpecialAnimals",
|
Other: "#SpecialAnimals",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
ID: "Restaurant",
|
||||||
|
One: "Restaurant",
|
||||||
|
Other: "Restaurantes",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
ID: "Yes",
|
||||||
|
Other: "Yes",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
ID: "No",
|
||||||
|
Other: "No",
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,6 +18,10 @@
|
||||||
"one": "Name",
|
"one": "Name",
|
||||||
"other": "Namen"
|
"other": "Namen"
|
||||||
},
|
},
|
||||||
|
"No": {
|
||||||
|
"hash": "sha1-816c52fd2bdd94a63cd0944823a6c0aa9384c103",
|
||||||
|
"other": "Nein"
|
||||||
|
},
|
||||||
"Photographer": {
|
"Photographer": {
|
||||||
"hash": "sha1-dc41992cfe878fe6744f94c3a3fc5843d9f1bc11",
|
"hash": "sha1-dc41992cfe878fe6744f94c3a3fc5843d9f1bc11",
|
||||||
"one": "Pfotograph*in",
|
"one": "Pfotograph*in",
|
||||||
|
@ -27,6 +31,11 @@
|
||||||
"hash": "sha1-a844fcf834e7d026e7936e042c0ce2777b7fb4d9",
|
"hash": "sha1-a844fcf834e7d026e7936e042c0ce2777b7fb4d9",
|
||||||
"other": "Angemeldet"
|
"other": "Angemeldet"
|
||||||
},
|
},
|
||||||
|
"Restaurant": {
|
||||||
|
"hash": "sha1-2b8fd2cb645ab1f1b09fbecda98978ec3518a9d9",
|
||||||
|
"one": "Restaurant",
|
||||||
|
"other": "Restaurnts"
|
||||||
|
},
|
||||||
"Role": {
|
"Role": {
|
||||||
"hash": "sha1-47dcc27d6e87ece8baebe7e3877a261a5467093d",
|
"hash": "sha1-47dcc27d6e87ece8baebe7e3877a261a5467093d",
|
||||||
"one": "Rolle",
|
"one": "Rolle",
|
||||||
|
@ -52,7 +61,11 @@
|
||||||
"other": "Suiter Warteliste"
|
"other": "Suiter Warteliste"
|
||||||
},
|
},
|
||||||
"WaitinglistDesc": {
|
"WaitinglistDesc": {
|
||||||
"hash": "sha1-aadc433a212fca8d927e9134520f5a10aa7e4263",
|
"hash": "sha1-295479637ef85418e233d16735fdba609595dee7",
|
||||||
"other": "Wir setzen für jedes Event ein Verhältnis von Suitern pro Spotter fest, damit die Spotter auch noch alle versorgen können. Falls du hier gelistet bist, haben sich noch nicht genügend Spotter angemeldet."
|
"other": "Wir setzen für jedes Event ein Verhältnis von Suitern pro Spotter fest, damit die Spotter auch noch alle versorgen können. Falls du hier gelistet bist, haben sich noch nicht genügend Spotter angemeldet."
|
||||||
|
},
|
||||||
|
"Yes": {
|
||||||
|
"hash": "sha1-5397e0583f14f6c88de06b1ef28f460a1fb5b0ae",
|
||||||
|
"other": "Ja"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,11 +12,16 @@
|
||||||
"one": "Name",
|
"one": "Name",
|
||||||
"other": "Names"
|
"other": "Names"
|
||||||
},
|
},
|
||||||
|
"No": "No",
|
||||||
"Photographer": {
|
"Photographer": {
|
||||||
"one": "Photographer",
|
"one": "Photographer",
|
||||||
"other": "Photographers"
|
"other": "Photographers"
|
||||||
},
|
},
|
||||||
"Registered": "Registered",
|
"Registered": "Registered",
|
||||||
|
"Restaurant": {
|
||||||
|
"one": "Restaurant",
|
||||||
|
"other": "Restaurnts"
|
||||||
|
},
|
||||||
"Role": {
|
"Role": {
|
||||||
"one": "Role",
|
"one": "Role",
|
||||||
"other": "Roles"
|
"other": "Roles"
|
||||||
|
@ -34,5 +39,6 @@
|
||||||
"other": "Suiters"
|
"other": "Suiters"
|
||||||
},
|
},
|
||||||
"SuiterWaitinglist": "Suiter Watinglist",
|
"SuiterWaitinglist": "Suiter Watinglist",
|
||||||
"WaitinglistDesc": "We set a ratio of Suiters per Spotter for each event in order to keep the count of suiters manageble for them. If you are listed here we don't have enough spotters yet."
|
"WaitinglistDesc": "We set a ratio of Suiters per Spotter for each event in order to keep the count of suiters manageble for them. If you are listed here we don't have enough spotters yet.",
|
||||||
|
"Yes": "Yes"
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,21 +0,0 @@
|
||||||
{
|
|
||||||
"Attendie": {
|
|
||||||
"hash": "sha1-4c29d6c952ccd2b114d1792c7b18fa7f7052ebed",
|
|
||||||
"one": "Attendie",
|
|
||||||
"other": "Attendies"
|
|
||||||
},
|
|
||||||
"HelloWorld": {
|
|
||||||
"hash": "sha1-6225ffc638ce81e53cdf7868fe0c7435594f11e4",
|
|
||||||
"other": "Hello newer World"
|
|
||||||
},
|
|
||||||
"Name": {
|
|
||||||
"hash": "sha1-2b7c08c3ab75f37e2da656c1aab228f5f3a793b1",
|
|
||||||
"one": "Name",
|
|
||||||
"other": "Names"
|
|
||||||
},
|
|
||||||
"Role": {
|
|
||||||
"hash": "sha1-47dcc27d6e87ece8baebe7e3877a261a5467093d",
|
|
||||||
"one": "Role",
|
|
||||||
"other": "Roles"
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,18 +0,0 @@
|
||||||
[Attendie]
|
|
||||||
hash = "sha1-4c29d6c952ccd2b114d1792c7b18fa7f7052ebed"
|
|
||||||
one = "Attendie"
|
|
||||||
other = "Attendies"
|
|
||||||
|
|
||||||
[HelloWorld]
|
|
||||||
hash = "sha1-6225ffc638ce81e53cdf7868fe0c7435594f11e4"
|
|
||||||
other = "Hello newer World"
|
|
||||||
|
|
||||||
[Name]
|
|
||||||
hash = "sha1-2b7c08c3ab75f37e2da656c1aab228f5f3a793b1"
|
|
||||||
one = "Name"
|
|
||||||
other = "Names"
|
|
||||||
|
|
||||||
[Role]
|
|
||||||
hash = "sha1-47dcc27d6e87ece8baebe7e3877a261a5467093d"
|
|
||||||
one = "Role"
|
|
||||||
other = "Roles"
|
|
Loading…
Reference in a new issue