This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export default { | |
className: PropTypes.string, | |
searchFieldProps: PropTypes.shape({ | |
loading: PropTypes.bool, | |
blockInput: PropTypes.bool, | |
showSearch: PropTypes.bool, | |
handleSubmit: PropTypes.func, | |
}), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. start with these initial values: | |
get `tempId` method: | |
import { tempId } from 'json-api-client'; | |
use like: | |
fields.push({ | |
type: 'specifications', | |
id: tempId('specifications'), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"id"=>"813790d9e9e124ce39fb6f37b8efb268.pdf", | |
"storage"=>"store", | |
"metadata"=> { | |
"filename"=>"FCA - FPA Field Guide 3.19.2019.pdf", | |
"size"=>2422720, | |
"mime_type"=>"application/pdf", | |
"url"=>"https://storage.googleapis.com/catalystxl-admin-api/store/813790d9e9e124ce39fb6f37b8efb268.pdf" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Prefix Verb URI Pattern | |
new_admin_session GET /admin/sign_in | |
admin_session POST /admin/sign_in | |
destroy_admin_session DELETE /admin/sign_out | |
new_admin_password GET /admin/password/new | |
edit_admin_password GET /admin/password/edit | |
admin_password PATCH /admin/password | |
PUT /admin/password | |
POST /admin/password | |
cancel_admin_registration GET /admin/cancel |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// given this class | |
class LoginForm extends Component { | |
static propTypes = { | |
login: PropTypes.func, | |
}; | |
render() { | |
<Formik onSubmit={v => this.props.login(v.username, v.password)}> | |
{({ handleSubmit }) => ( | |
<form onSubmit={handleSubmit}> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/Users/lynnhurley/Code/CatalystXL/catalystxl-admin-client/src/components/AdminIndexPage/AdminIndexPage.js | |
36:3 error Useless constructor no-useless-constructor | |
/Users/lynnhurley/Code/CatalystXL/catalystxl-admin-client/src/components/CardIndexPage/CardIndexPage.js | |
4:15 error 'isUndefined' is defined but never used no-unused-vars | |
4:28 error 'uniq' is defined but never used no-unused-vars | |
4:34 error 'map' is defined but never used no-unused-vars | |
4:39 error 'filter' is defined but never used no-unused-vars | |
5:10 error 'ResourceIndex' is defined but never used no-unused-vars | |
35:7 error Unused state field: 'selectedIds' react/no-unused-state |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
return ( | |
<Resource | |
id={cardId} | |
type="cards" | |
endpoint={endpoint} | |
componentClass={CardDetailPage} | |
componentProps={{ | |
match, | |
orgId, | |
cardId, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"c657beab-c9ea-4eb5-a279-92fcbb01f35d":{ | |
"name":"Box Level - 2nd Floor", | |
"availability":"0", | |
"availabilityFormatted":"0", | |
"availabilityClass":"soldout", | |
"pricing":{ | |
"areaPricing":{ | |
"9eb3ac0c-4c9b-42ad-b9ae-eb0f2ed4e014":{ | |
"name":"General Public", |
- on the model, define a method called
export_data
. this should return an array of 2D arrays (aka a 3D array) of tables that contain all of the export data. there is a helper method calledexport_sheet
defined in theapp/models/application_record.rb
that will help with formatting the data.
example: