Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactoring - Remove unused endpoints and use Apollo Client 2.0 #45

Merged
merged 16 commits into from
Jun 10, 2018
Merged
Show file tree
Hide file tree
Changes from 13 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
9 changes: 9 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,18 @@ curl -s 'https://raw.githubusercontent.com/HackGT/registration/master/api.graphq
./node_modules/.bin/graphql-typewriter -i ./api.graphql
mv ./api.graphql.types.ts ./server/graphql.types.ts

# Generate types for client side queries and responses
./node_modules/.bin/apollo-codegen introspect-schema \
./api.graphql \
--output ./apis/checkin.schema.json
./node_modules/.bin/gql2ts \
-o ./apis/checkin.d.ts \
./apis/checkin.schema.json

# Compile
./node_modules/typescript/bin/tsc -p server/
./node_modules/typescript/bin/tsc -p client/
./node_modules/typescript/bin/tsc -p test/

# Bundle client side js
./node_modules/.bin/browserify ./client/js/main.js -o ./client/js/bundle.js
73 changes: 0 additions & 73 deletions client/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,23 +44,10 @@ <h1 class="mdc-typography--title">HackGT Check In</h1>
{{/each}}
</select>
</a>
<a class="mdc-list-item" href="#attendees" id="open-attendees">
<i class="material-icons mdc-list-item__start-detail" aria-hidden="true">playlist_add</i>
Add attendees
</a>
<a class="mdc-list-item" href="#tags" id="open-tags">
<i class="material-icons mdc-list-item__start-detail" aria-hidden="true">mode_edit</i>
Edit tags
</a>
<a class="mdc-list-item" href="#" style="display: none;">
<i class="material-icons mdc-list-item__start-detail" aria-hidden="true">delete_sweep</i>
<select class="mdc-list-item tags" id="tag-delete">
<option selected value="">Choose tag to delete</option>
{{#each tags}}
<option>{{this}}</option>
{{/each}}
</select>
</a>
<a class="mdc-list-item" href="#users" id="open-users">
<i class="material-icons mdc-list-item__start-detail" aria-hidden="true">account_box</i>
Configure users
Expand Down Expand Up @@ -123,65 +110,6 @@ <h1 class="mdc-typography--title">HackGT Check In</h1>
</div>
</section>

<section id="import" style="display: none;">
<div class="card">
<div class="card-content">
<section class="center">
<h1 class="mdc-typography--headline">Import attendees</h1>

<div class="mdc-textfield" data-mdc-auto-init="MDCTextfield">
<input class="mdc-textfield__input" type="text" id="import-tag">
<label class="mdc-textfield__label" for="import-tag">Tag(s) for this import (comma delimited)</label>
</div>

<input class="mdc-textfield__input" type="file" name="import">

<!-- Default header values match up with HackGTeeny survey headers -->
<div class="mdc-textfield mdc-textfield--upgraded">
<label class="mdc-textfield__label mdc-textfield__label--float-above" for="name-header">CSV name header</label>
<input class="mdc-textfield__input" type="text" id="name-header" placeholder="name">
</div>

<div class="mdc-textfield mdc-textfield--upgraded">
<input class="mdc-textfield__input" type="text" id="email-headers" placeholder="gt email address, email address">
<label class="mdc-textfield__label mdc-textfield__label--float-above" for="email-headers">CSV email headers (comma delimited)</label>
</div>
<button class="mdc-button mdc-button--primary mdc-ripple-surface mdc-button--raised" data-mdc-auto-init="MDCRipple" id="import-attendees">
Import
</button>
</section>
</div>
</div>
<div class="card">
<div class="card-content">
<section class="center">
<h1 class="mdc-typography--headline">Add an attendee</h1>

<div class="mdc-textfield" data-mdc-auto-init="MDCTextfield">
<input class="mdc-textfield__input" type="text" id="add-tag" list="autocomplete-tags">
<datalist id="autocomplete-tags">
{{#each tags}}
<option value="{{this}}"></option>
{{/each}}
</datalist>
<label class="mdc-textfield__label" for="add-tag">Tag(s) (comma delimited)</label>
</div>
<div class="mdc-textfield" data-mdc-auto-init="MDCTextfield">
<input class="mdc-textfield__input" type="text" id="add-name">
<label class="mdc-textfield__label" for="add-name">Name</label>
</div>
<div class="mdc-textfield" data-mdc-auto-init="MDCTextfield">
<input class="mdc-textfield__input" type="text" id="add-email">
<label class="mdc-textfield__label" for="add-email">Email(s) (comma delimited)</label>
</div>
<button class="mdc-button mdc-button--primary mdc-ripple-surface mdc-button--raised" data-mdc-auto-init="MDCRipple" id="add-attendee">
Add
</button>
</section>
</div>
</div>
</section>

<section id="manage-users" style="display: none;">
<div class="card">
<div class="card-content">
Expand Down Expand Up @@ -276,7 +204,6 @@ <h1 class="mdc-typography--headline">Add Tags</h1>
<label for="my-checkbox">Label</label>
</div>
</template>
<script src="https://unpkg.com/subscriptions-transport-ws@0.8.3/browser/client.js"></script>
<script src="/node_modules/material-components-web/dist/material-components-web.js"></script>
<script src="/js/bundle.js"></script>
</body>
Expand Down
Loading