Skip to content

Instantly share code, notes, and snippets.

export default {
className: PropTypes.string,
searchFieldProps: PropTypes.shape({
loading: PropTypes.bool,
blockInput: PropTypes.bool,
showSearch: PropTypes.bool,
handleSubmit: PropTypes.func,
}),
1. start with these initial values:
get `tempId` method:
import { tempId } from 'json-api-client';
use like:
fields.push({
type: 'specifications',
id: tempId('specifications'),
{
"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"
}
}
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
// 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}>
/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
return (
<Resource
id={cardId}
type="cards"
endpoint={endpoint}
componentClass={CardDetailPage}
componentProps={{
match,
orgId,
cardId,
{
"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",
@lynndylanhurley
lynndylanhurley / export.md
Last active September 7, 2017 23:39
Instructions for setting up an export

steps to create export

  1. 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 called export_sheet defined in the app/models/application_record.rb that will help with formatting the data.

example: