characterFields.js 1.4 KB

12345678910111213141516171819202122232425
  1. export const characterFields = {
  2. faeName: { type: "text", initialValue: "", showColumn: true },
  3. mortalName: { type: "text", initialValue: "", showColumn: true },
  4. player: { type: "autocomplete", initialValue: "", showColumn: true },
  5. kith: { type: "autocomplete", initialValue: "", showColumn: true },
  6. house: { type: "autocomplete", initialValue: "", showColumn: false },
  7. bannerhouse: { type: "autocomplete", initialValue: "", showColumn: false },
  8. seeming: { type: "autocomplete", initialValue: "", showColumn: true },
  9. rank: { type: "autocomplete", initialValue: "", showColumn: true },
  10. location: { type: "autocomplete", initialValue: "", showColumn: true },
  11. position: { type: "autocomplete", initialValue: "", showColumn: true },
  12. description: { type: "richText", initialValue: "", showColumn: false },
  13. notes: { type: "richText", initialValue: "", showColumn: false }
  14. }
  15. export const nameFields = _pickBy(characterFields, { type: "text" })
  16. export const categoryFields = _pickBy(characterFields, { type: "autocomplete" })
  17. export const richTextFields = _pickBy(characterFields, { type: "richText" })
  18. export const columnFields = _pickBy(characterFields, { showColumn: true })
  19. export const optionsFields = _pickBy(columnFields, { type: "autocomplete" })
  20. export const globalFilterFieldNames = _map(
  21. characterFields,
  22. ({ type }, field) => (type === "richText" ? `${field}PlainText` : field)
  23. )