Skip to content

Commit

Permalink
Merge pull request #50 from meshhq/taylorhalliday/fix-bugs
Browse files Browse the repository at this point in the history
Fixed urls and links
  • Loading branch information
kcoleman731 authored Jul 28, 2019
2 parents a1ad65f + 2676349 commit 1dafa8a
Show file tree
Hide file tree
Showing 25 changed files with 2,057 additions and 2,383 deletions.
12 changes: 6 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,18 @@ export NODE_ENV = test
# Shell command to find all .ts files.
src_files = $(shell find . -name '*.ts' ! -path '*/node_modules/*')

deps:
build: $(src_files) deps
@eval $(GULP) build --production
@echo "Re-Transpiling Project..."
@eval $(TSC)

deps: package.json
npm install --global foundation-cli
npm install

start:
@eval $(GULP)

build: $(src_files)
@eval $(GULP) build --production
@echo "Re-Transpiling Project..."
@eval $(TSC)

build-test: $(src_files)
@eval $(GULP) build --production --test
@echo "Re-Transpiling Project..."
Expand Down
6 changes: 2 additions & 4 deletions dist/clubs/dc-otto/mailer/templates/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,9 +166,7 @@ const membershipInquiryTemplate = (memberInfo, club) => {
};
exports.MembershipInquiryTemplate = membershipInquiryTemplate;
const membershipInquiryResponseTemplate = (memberFormInfo, club, url) => {
const defaultDomain = `${club.domain}.tryclubhub.com`;
const domain = ts_optchain_1.oc(club).clubSettings.customDomain(defaultDomain);
const applicationURL = `https://${domain}/forms/application`;
const applicationURL = `${club.baseURL}/forms/application`;
const admin = (club.name === core.Constants.Clubs.DRIVERS_CLUB) ? 'Amanda Friedman' : 'Eli Kogan';
const message = `
<p>Dear ${memberFormInfo.firstName},</p>
Expand Down Expand Up @@ -412,7 +410,7 @@ const bulletLine = (boldText, text) => {
return `<p style='font-weight:bold; display:inline;'>${boldText}</p> <p style='display:inline;'>${text}</p>`;
};
const linkLine = (boldText, shortLink, club) => {
return `<p style='font-weight:bold; display:inline;'>${boldText}</p> <a href="${club.domain}.tryclubhub.com/events/${shortLink}" style='display:inline;'>Event Link</a>`;
return `<p style='font-weight:bold; display:inline;'>${boldText}</p> <a href="${club.baseURL}/event/${shortLink}" style='display:inline;'>Event Link</a>`;
};
const regularText = (text) => {
return `<p>${text}</p>`;
Expand Down
2 changes: 1 addition & 1 deletion dist/models/club.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export interface ClubInfo {
name: string;
shortName: string;
domain: string;
baseURL: string;
website: string;
logoURL: string;
twitterURL?: string;
Expand Down
2 changes: 1 addition & 1 deletion dist/templates/confirmation.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/templates/event.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/templates/generic.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/templates/post.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/templates/welcome.html

Large diffs are not rendered by default.

12 changes: 5 additions & 7 deletions dist/transform/transform.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,13 @@ exports.BuildEventContent = (event, club, link) => {
return richContent;
};
exports.BuildWelcomeContent = (user, club, inviteLink) => {
const loginURL = ts_optchain_1.oc(club).clubSettings.customDomain(`https://${club.domain}.tryclubhub.com`);
const iosAppURL = ts_optchain_1.oc(club).clubSettings.iosAppURL(constants.iOSAppURL);
const androidAppURL = ts_optchain_1.oc(club).clubSettings.androidAppURL(constants.AndroidAppURL);
const unsubscribeURL = `${club.domain}/tryclubhub.com/user/me`;
const unsubscribeURL = `${club.baseURL}/user/me`;
const welcomeContent = {
firstName: user.firstName,
inviteLink: inviteLink,
loginURL: loginURL,
loginURL: club.baseURL,
iosAppURL: iosAppURL,
androidAppURL: androidAppURL,
iosBadgeURL: constants.iOSBadgeURL,
Expand Down Expand Up @@ -108,18 +107,17 @@ exports.BuildConfirmationContent = (reservation, event, group, club, url) => {
return confirmationInfo;
};
exports.BuildClubInfo = (club) => {
const loginURL = ts_optchain_1.oc(club).clubSettings.customDomain(`https://${club.domain}.tryclubhub.com`);
const clubInfo = {
name: club.name,
website: loginURL,
website: club.baseURL,
shortName: club.shortName,
domain: club.domain,
baseURL: club.baseURL,
logoURL: club.image.md,
street: club.locations[0].address1,
city: club.locations[0].city,
state: club.locations[0].state,
zip: club.locations[0].zip,
unsubscribeURL: `${loginURL}/user/me`
unsubscribeURL: `${club.baseURL}/user/me`
};
return clubInfo;
};
Loading

0 comments on commit 1dafa8a

Please sign in to comment.