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

Airtable refactor, bug fixes, Auth overhaul #48

Merged
merged 45 commits into from
Apr 3, 2020
Merged
Changes from 1 commit
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
7ec5a16
Add material UI. Changing error states.
tommypoa Mar 23, 2020
130fb04
Error working, but working on better UI.
tommypoa Mar 23, 2020
bd89278
Update prettier rules to match clerk repo, and no longer conflict wit…
annieyro Mar 24, 2020
9118740
Update packages - upgrade generator version
annieyro Mar 24, 2020
59a5081
Update Airtable schema
annieyro Mar 25, 2020
c128f77
Refactor MapScreen and related components
annieyro Mar 25, 2020
d3cf863
Refactor News and related components
annieyro Mar 25, 2020
3915fb2
Clean up AppNavigator.js
annieyro Mar 25, 2020
1f57b24
Refactor Resources
annieyro Mar 25, 2020
f24205d
Replace getUser
annieyro Mar 25, 2020
b92ea4c
Refactor Rewards and related components.
annieyro Mar 25, 2020
c79e52d
Use constants/Rewards.js for reward point value
annieyro Mar 25, 2020
ae7b262
Error working with both signup and login. Styling not done.
tommypoa Mar 26, 2020
33e0f7a
Overhaul Signup
annieyro Mar 26, 2020
2d63467
Undo prettier width change and cleanup
annieyro Mar 26, 2020
18b1530
Add workspace-specific shared settings (format and run eslint on save)
annieyro Mar 27, 2020
61ed95b
Update prettier config
annieyro Mar 27, 2020
70f5fae
Update prettier config and run prettier on all ours
annieyro Mar 27, 2020
5a0f4e6
Update schema with changed fields
annieyro Mar 29, 2020
dce398c
Add workspace-specific color
annieyro Mar 29, 2020
eb8d9b3
Merge branch 'master' into annie/update-airtable
annieyro Mar 30, 2020
ab42e4b
Merge branch 'tommy/materialui_refactor' into annie/update-airtable
annieyro Mar 30, 2020
b34379f
Small fixes
annieyro Mar 30, 2020
b6d1f69
Merge branch 'master' into annie/update-airtable
annieyro Mar 31, 2020
129eb86
Add back filter for Clerk Training, enforce ordering on location upda…
annieyro Mar 31, 2020
91eb9f2
Update login code
annieyro Mar 31, 2020
88a8716
Bugfix
annieyro Mar 31, 2020
ec7f020
Remove .eslintignore
annieyro Mar 31, 2020
5c9f171
Bump version, run generator to update schema
annieyro Mar 31, 2020
086d8a6
Update schema again
annieyro Mar 31, 2020
0437200
Updated error message for login and added styling
annieyro Apr 1, 2020
371f4d9
Handle permissions on text change in Signup
annieyro Apr 1, 2020
4d6a718
Remove deprecated Airtable code in common.js
annieyro Apr 1, 2020
3470012
Support base change to development Airtable base
annieyro Apr 2, 2020
f3126ee
Add rewardDollarValue
annieyro Apr 2, 2020
8c0acca
Fix typo
annieyro Apr 2, 2020
ab6bd5f
Filter out clerk training in dev as well
annieyro Apr 2, 2020
e341af2
Cleanup .env.example
annieyro Apr 2, 2020
68da60c
Update login and logout
annieyro Apr 2, 2020
55a5608
Remove permissions from state and calculate in render. Update SignUp …
annieyro Apr 2, 2020
f6e80ee
Merge branch 'master' into annie/update-airtable
annieyro Apr 2, 2020
f0fa653
Update line widths
annieyro Apr 3, 2020
588542b
Display duplicate customer error
annieyro Apr 3, 2020
ac5e0eb
Merge branch 'master' of https://github.com/calblueprint/dccentralkit…
wangannie Apr 3, 2020
6214dd9
Merge branch 'annie/update-airtable' of https://github.com/calbluepri…
wangannie Apr 3, 2020
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
Prev Previous commit
Next Next commit
Refactor Resources
  • Loading branch information
annieyro committed Mar 25, 2020
commit 1f57b240dd7005ef0640d5cb744c26598570bad0
25 changes: 0 additions & 25 deletions lib/resourceUtils.js

This file was deleted.

54 changes: 28 additions & 26 deletions screens/resources/ResourcesScreen.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
import { FontAwesome5 } from '@expo/vector-icons';
import React from 'react';
import { TopText } from '../../styled/resources';
import { TouchableOpacity, ScrollView, View, Button } from 'react-native';
import getResources from '../../lib/resourceUtils';
import { ScrollView, View } from 'react-native';
import { NavButton } from '../../components/BaseComponents';
import ResourceCard from '../../components/resources/ResourceCard';
import { Title, NavButton } from '../../components/BaseComponents';
import ResourceCategoryBar from '../../components/resources/ResourceCategoryBar';
import { FontAwesome5 } from '@expo/vector-icons';
import { getAllResources } from '../../lib/airtable/request';
import { TopText } from '../../styled/resources';

class ResourcesScreen extends React.Component {
constructor(props) {
super(props);
this.state = {
resources: [],
DCCentralKitchenResources: [],
CommunityResources: [],
GovernmentResources: [],
@@ -20,26 +19,29 @@ class ResourcesScreen extends React.Component {
}

async componentDidMount() {
getResources().then(resources => {
(DCCentralKitchenResources = resources.filter(
try {
const resources = await getAllResources();
const DCCentralKitchenResources = resources.filter(
resource => resource.category == 'DC Central Kitchen Resources'
)),
(CommunityResources = resources.filter(
resource => resource.category == 'Community Resources'
)),
(GovernmentResources = resources.filter(
resource => resource.category == 'Government Resources'
)),
(ResourcesForSeniors = resources.filter(
resource => resource.category == 'Resources for Seniors'
)),
this.setState({
DCCentralKitchenResources,
CommunityResources,
GovernmentResources,
ResourcesForSeniors
});
});
);
const CommunityResources = resources.filter(
resource => resource.category == 'Community Resources'
);
const GovernmentResources = resources.filter(
resource => resource.category == 'Government Resources'
);
const ResourcesForSeniors = resources.filter(
resource => resource.category == 'Resources for Seniors'
);
this.setState({
DCCentralKitchenResources,
CommunityResources,
GovernmentResources,
ResourcesForSeniors
});
} catch (err) {
console.error('[ResourcesScreen] Airtable: ', err);
}
}

render() {
@@ -85,7 +87,7 @@ class ResourcesScreen extends React.Component {
navigation={this.props.navigation}
/>
))}
<View style={{ paddingBottom: 100 }}></View>
<View style={{ paddingBottom: 100 }} />
</ScrollView>
</View>
);