Skip to content

Commit

Permalink
Merge pull request #25 from snowcamp/feat/remove-early-birds
Browse files Browse the repository at this point in the history
Fixed ticket pricing and removed early birds
  • Loading branch information
kraiss authored Oct 29, 2024
2 parents f52e1c1 + 36daeae commit 51cb92b
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 24 deletions.
12 changes: 4 additions & 8 deletions src/components/StoreStatus.astro
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,22 @@ import ticket from '../data/ticket.json';
const lang = (Astro.locals as any).lang;
const store = ticket.store;
const early_birds = store.early
const early_birds_status = early_birds.status;
const classic = ticket.store.classic;
const classic_status = classic.status
let storeStatus = '';
if ((early_birds_status === "closed" || early_birds_status === "deactivated") && classic_status === "closed") {
if (classic_status === "closed") {
storeStatus = t('store_is_soldout');
} else if ((early_birds_status === "closed" || classic_status === "deactivated") && (classic_status === "not_open" || classic_status === "open")) {
} else if (classic_status === "not_open" || classic_status === "open") {
storeStatus = t('store_classic_dates', (classic.open_date as any)[lang]);
} else if (early_birds_status === "open" || classic_status === "open") {
} else if (classic_status === "open") {
storeStatus = t('store_is_open');
} else if (early_birds_status === "not_open" && (early_birds.open_date as any)[lang]) {
storeStatus = t('store_early_birds_open', (early_birds.open_date as any)[lang]);
} else {
storeStatus = t('store_not_open');
}
---
<span class="emph">{storeStatus}</span>
{store.url && (early_birds_status === "open" || classic_status === "open") ?
{store.url && (classic_status === "open") ?
<p>
<a href={store.url} target="_blank">
<i class="fa fa-hand-o-right" aria-hidden="true"><span> <b>{t('store_here')}</b></span></i>
Expand Down
14 changes: 1 addition & 13 deletions src/data/ticket.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,9 @@
{
"store": {
"url": "https://www.billetweb.fr/shop.php?event=snowcamp-2025",
"early": {
"title": "Early Birds",
"price_conf": 42,
"price_univ": 100,
"possible_status": ["not_open", "open", "closed", "deactivated"],
"status": "deactivated",
"open_date": {
"default": "unknown",
"fr": "",
"en": ""
}
},
"classic": {
"title": "Standard",
"price_conf": 75,
"price_conf": 90,
"price_univ": 160,
"possible_status": ["not_open", "open", "closed", "deactivated"],
"status": "not_open",
Expand Down
1 change: 0 additions & 1 deletion src/i18n/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,6 @@ export function init() {
i18n.store_access_meet_and_greet = 'Meet & Greet on Thursday evening';
i18n.store_classic_dates = (date: string) => `The store opens on ${date}`;
i18n.store_not_open = 'The store is not open yet';
i18n.store_early_birds_open = (date: string) => `Early Birds sell starts on ${date}!`;
i18n.store_opens_on = (date: string) => `Store opens on the ${date}!`;
i18n.store_is_open = 'The store is open';
i18n.store_is_soldout = 'The store is soldout!';
Expand Down
1 change: 0 additions & 1 deletion src/i18n/fr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,6 @@ contrat avec ce sponsoring pour laisser la place à un autre sponsor.`;
i18n.store_access_meet_and_greet = 'Meet & Greet le Jeudi soir';
i18n.store_classic_dates = (date: string) => `La billetterie ouvre le ${date}`;
i18n.store_not_open = 'La billetterie n\'est pas encore ouverte';
i18n.store_early_birds_open = (date: string) => `Vente des Early Birds le ${date}!`;
i18n.store_opens_on = (date: string) => `La billetterie ouvre le ${date}!`;
i18n.store_is_open = 'La billetterie est ouverte';
i18n.store_is_soldout = 'La billetterie est épuisée !';
Expand Down
2 changes: 1 addition & 1 deletion src/styles/ticket.less
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
line-height: 3.9rem
}

.snc-ticket .single .single-top .price span {
.snc-ticket .single .single-top .price {
color: @white
}

Expand Down

0 comments on commit 51cb92b

Please sign in to comment.