Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions apps/web/app/components/SponsorPageSection.vue
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ const {
silverSponsors,
bronzeSponsors,
specialNamingRightSponsors,
namingRightSponsors,
specialLunchSponsors,
afterPartySponsors,
nameCardSponsors,
Expand Down Expand Up @@ -146,6 +147,7 @@ const {
<SponsorList v-bind="silverSponsors" />
<SponsorList v-bind="bronzeSponsors" />
<SponsorList v-bind="specialNamingRightSponsors" />
<SponsorList v-bind="namingRightSponsors" />
<div class="sponsor-list-layout-separate">
<SponsorList v-bind="specialLunchSponsors" />
<SponsorList v-bind="afterPartySponsors" />
Expand Down
1 change: 1 addition & 0 deletions apps/web/app/composables/useSponsor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export function useSponsor() {
'option-separate',
'name-card',
'special-naming-rights',
'naming-rights',
'after-party',
'simultaneous-interpretation',
'special-lunch',
Expand Down
1 change: 1 addition & 0 deletions apps/web/app/lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@
"silver": "Silver",
"bronze": "Bronze",
"special_naming_rights": "Special Naming Rights",
"naming_rights": "Naming Rights",
"special_lunch": "Special Lunch",
"after_party": "After Party",
"name_card": "Name Card",
Expand Down
1 change: 1 addition & 0 deletions apps/web/app/lang/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@
"silver": "シルバー",
"bronze": "ブロンズ",
"special_naming_rights": "スペシャルネーミングライツ",
"naming_rights": "ネーミングライツ",
"special_lunch": "スペシャルランチ",
"after_party": "アフターパーティー",
"name_card": "ネームカード",
Expand Down
16 changes: 16 additions & 0 deletions apps/web/app/server/api/sponsors.get.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,21 @@ export default defineEventHandler(async (event) => {
}),
}

const namingRightSponsors: SponsorInfo = {
type: 'option',
title: 'naming_rights',
list: sponsors
.filter((s: Sponsor) => {
if (process.env.NODE_ENV === 'production') return s['tag'].includes('naming-rights') && s.is_open === true
return s['tag'].includes('naming-rights')
})
.sort((a: Sponsor, b: Sponsor) => {
if (!a.display_order) return a.created_at < b.created_at ? -1 : 1
if (!b.display_order) return a.created_at < b.created_at ? -1 : 1
return a.display_order - b.display_order
}),
}

const specialLunchSponsors: SponsorInfo = {
type: 'option-separate',
title: 'special_lunch',
Expand Down Expand Up @@ -190,6 +205,7 @@ export default defineEventHandler(async (event) => {
silverSponsors,
bronzeSponsors,
specialNamingRightSponsors,
namingRightSponsors,
specialLunchSponsors,
afterPartySponsors,
nameCardSponsors,
Expand Down
2 changes: 2 additions & 0 deletions packages/model/lib/sponsor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export type SponsorCategory =
| 'silverSponsors'
| 'bronzeSponsors'
| 'specialNamingRightSponsors'
| 'namingRightSponsors'
| 'specialLunchSponsors'
| 'afterPartySponsors'
| 'nameCardSponsors'
Expand All @@ -17,6 +18,7 @@ export type SponsorCategory =
export type OptionSponsorType =
| 'name-card'
| 'special-naming-rights'
| 'naming-rights'
| 'after-party'
| 'simultaneous-interpretation'
| 'special-lunch'
Expand Down